w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Photoshop's Save For Web and Devices option works for Android icon design?
Sure you can use this icons with 72 dpi on Android devices :) Photoshop is not able to save an image with resolution higher than 72 dpi. But you must understand a difference between size of image with resolution >72dpi and an actual size. Please take a look at this image: http://www.mediafire.com/view/tmy5omyibnoxuv7/photoshop-dpi.jpg. As you can see both of pictures have the same actual size - 512x512px, but different document size. When you will export this image you will get 512px image. But you can convert the image to lower or higher resolution, you just need to un-check the checkbox "Resample image". If you leave this checkbox as checked, the image will change its actual size. Hope this will help you a bit :) -- Alex

Categories : Android

Is there a method, other than enumeration, to get sockets for many IrDA devices when devices all have same deviceID?
Closing the loop on this old question: The short answer is no, There is not another method. IrDA sockets are created and in my case, in Windows 7, enumerated based on a Windows interrogation of any and all IrDA signals active and in range. The enumeration process stores data for each unique Device ID (specifically, IrDA Dev id) it finds. If it sees 3 unique Device IDs, then data for each can be stored, and made available for a connection to be completed. Subsequently, for each connection made, separate conversations can be held with each of those devices. However, if the same three devices are active, and in range, but have identical Device IDs, Windows will only store data corresponding to that one ID, and only one connection can be made.

Categories : C

Loading Animation Starts On Pre ICS Devices But Will Not Start On Post ICS Devices
From the developer documentation at http://developer.android.com/guide/topics/resources/animation-resource.html#Frame The example shows a call to start() method of the animation. ImageView rocketImage = (ImageView) findViewById(R.id.rocket_image); rocketImage.setBackgroundResource(R.drawable.rocket_thrust); rocketAnimation = (AnimationDrawable) rocketImage.getBackground(); rocketAnimation.start(); // <--------- Does no harm to PRE ICS devices If you are going to target various droid releases (JB included), why not call this method?

Categories : Java

Android 4.x devices receive GCM messages, but Android 2.3 devices Don't
The first potential problem I can see is this : The package name in the permission element is not the same as the one in the uses-permission element. In my app (which targets Android 2.2) they are identical. <uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" /> <uses-permission android:name="my.package.matchtracker.permission.C2D_MESSAGE" /> <permission android:name="my.package.permission.C2D_MESSAGE" android:protectionLevel="signature" />

Categories : Android

How to save the save the full file path in mysql table when using the upload form
mysql_query is deprecated in the newest PHP and it's also not so safe. I'd highly suggest switching to Mysqli or PDO. To answer your question though, try using mysql_real_escape_string() on your variables before inserting them in the DB. It will escape special chars.

Categories : PHP

Calling save on a destroyed object returns true, but doesn't save
Model#save Saves the changed attributes to the database atomically, or insert the document if new. Will raise an error of validations fail. After destruction, the document is not new and there are no attributes that have changed, so save just returns without errors. In a strict sense this seems to be the expected behavior. You could use Model#upsert: Performs a MongoDB upsert on the document. If the document exists in the database, it will get overwritten with the current attributes of the document in memory. If the document does not exist in the database, it will be inserted. This will actually save the document using the same ID, but it will still be frozen? and marked as destroyed?. Therefore it might be better to just clone the document as suggested by insane-36 in the

Categories : Ruby

How to automatically create a folder / run a "save as" and "save to" function in browser when downloading PDF
If you are using a web application you won't be able to create a folder through a browser on the clients computer because that would be a security issue. If you are doing this in another type of application that is on the user's computer. Then all you have to do is include System.IO and do a Directory.CreateDirectory http://msdn.microsoft.com/en-us/library/54a0at6s(v=vs.100).aspx

Categories : C#

Oracle Forms 10g - why do I have to click save so that my insert query will save to database
Oracle Forms provides a great deal of functionality for you so that you don't have to write it. For example, if you base a block on a table, and if the user enters data and clicks "Save", Oracle Forms knows whether to execute Insert, Update or Delete statements appropriately followed by a Commit. In your case, you have ignored that functionality and have hardcoded an Insert and Commit in your button code. Therefore, the user does not have to click the Save button, because the data has already been "saved" by your Add button.

Categories : Oracle

Save Properties.Settings.Default items to list, change the values and then save it to the file
You could access the settings by name, like so. Settings.Default["Item1"]; Since you have the naming convention Item + Incrementing Number in your for loop you could do this, for (int i = 0; i < list.Count; i++) { Settings.Default["Item" + i.ToString()] = listBox1.GetSelected(i); } Properties.Settings.Default.Save();

Categories : C#

Save an Image generated during runtime onto the Picture library using File Save picker C# Win 8 Metro App?
var response = await HttpWebRequest.Create(url).GetResponseAsync(); List<Byte> allBytes = new List<byte>(); using (Stream imageStream = response.GetResponseStream()) { byte[] buffer = new byte[4000]; int bytesRead = 0; while ((bytesRead = await imageStream.ReadAsync(buffer, 0, 4000)) > 0) { allBytes.AddRange(buffer.Take(bytesRead)); } } StorageFolder storageFolder = awai KnownFolders.PicturesLibrary.CreateFolderAsync("QR Codes Generator",CreationCollisionOption.OpenIfExists ); //var file = await ApplicationData.Current.LocalFolder.CreateFileAsync(

Categories : C#

Barcode Scanner Phonegap plugin; Can't save results into global variable, or save to hidden field
You need to pass functions for callback to .scan() so they can be called after the scan intent finishes. You want something like this: scanner.scan(success,error); function success(result) { document.getElementById('barcode').value = result.text; } function error(error) { alert(error); }

Categories : Javascript

Mobile web site - explicit save button or implicit save?
Since your program is a website and not an App, most users will use the Back button to go back to the previous page. I suggest you should add a save button since most people are used to seeing them on websites, and will treat your site as such. thanks, Alex M

Categories : Android

Either save state of Fragment or save file and update from that - Android
I think you are correct to try to find a simple approach to this. Case 1: You haven't posted your TabListener code, so firstly I am going to assume that you are adding fragments in onTabSelected and removing them in onTabUnselected. IF this is the case then you should look at using attach and detach instead. The difference is the same instance of the fragment will be used each time you press tab 1. Case 2: Based on what you have said (fragment 1 not being destroyed immediately) you may already using attach / detach. If this is the case, then the system may be responsible for destroying fragment 1 as part of its housekeeping. In this case, look at using setRetainInstance(true) for fragment 1. My concern about this approach is that you are updating your UI in this fragment , so you may ne

Categories : Android

Ruby 101: How Can I Save, Read, Write, then Save the Contents of an Array?
Array#to_s does indeed have different behaviour in ruby 1.8 and 1.9. There's universal way to get the string that you want. Array has a join method that concatenates all elements of the array with a separator. Your separator would be a string ', '. @points = [1, 2, 3, 4] s = "SAVED_POINTS2 = [#{@points.join(', ')}]" s # => "SAVED_POINTS2 = [1, 2, 3, 4]"

Categories : Ruby

Save PNG to Disk, but save file path to Core Data
You don't say if you have anything else in Core Data. If you do, simply create an imagePath attribute on your model, and assign the path to the document into it. Then, simply load the image into the UIImage when you need to, based on the model, using UIImage's imageWithContentsOfFile: method. If you don't already have Core Data in place and models generated, well, you really need to learn Core Data, and StackOverflow might not be the best place for that. This tutorial might be a good place to start. My first piece of advise when it comes to Core Data is to use the MagicalRecord library, which makes the general use of Core Data much, much easier.

Categories : IOS

save new tab data in separate table when save cms >> page form
I got answer this problem now. Here is link actually I post this question in two panel of the StackExchange (stackoverflow & magento.stackexchange). I got answer on magento.stackexchange. Thanks to ProxiBlue, who resolve my issue. Here I am sharing this thread for whom are mostly stackoverflow visitors.

Categories : Magento

In Qt Framework based Python desktop application , is it possible to give a internally created CSV save as or select location to save option?
You can probably use this class: http://doc.qt.io/qt-4.8/qfiledialog.html (Qt 4.8) http://doc.qt.io/qt-5/qfiledialog.html (Qt 5.0)

Categories : Python

Save by cell and not by line #: IPython %save magic: Is there a way?
After talking with the IPython dev team minrk found an answer: %%writefile filename.py will write everything below it in the cell to filename.py. link to the converastion.

Categories : Javascript

IPersistFile::Save method keeps failing to save the shortcut
you have only initialized hres to 0 and then ur checking if it succeded ? u are never realling declaring it somewhere, and -2147024891 probably means that the variable is not initialized yet. a wild guess is that it never even reahes the: hres = ppf->Save(wsz, TRUE); line and therefore it is not initialized :P try putting out some breakpoints when debugging and maybe use some watches to peek into variables :) Best regards.

Categories : C++

Are `save` and `save!` the only methods that persist ActiveRecord objects?
Looking at ActiveRecord 3.2.13 callbacks.rb, line 264. The save callbacks are triggered whenever create_or_update is called. That method is only called by save and save!. update_column bypasses create_or_update and uses update_all instead. first_or_create calls create, which calls save. I'd be looking in two places: 1. Does the save trigger a save in an associated record that attempts to save the original model again? If so, I'd expect the save method to get called again, so likely not this. 2. Are you sure that the before_save is what is getting called? Assuming you have "before_save :do_something", and do_something is getting called twice. Is anything calling :do_something outside of the context of the save? Or another before_save callback calls :do_something in addition to the callback

Categories : Ruby

Backbone not making a put request with save() after save
The reason why change didn't trigger for your second example is because it is the same object and Backbone ignore it. Hence no change event triggered. As for why the first one failed; do you have validator for your model? May be something that validating for empty string perhaps? val() can return an empty string and split() on empty string will return [""] Also, your defaults should be a function otherwise all your model would have the same instance of comments, tags and authorizedUsers From Backbone doc. Remember that in JavaScript, objects are passed by reference, so if you include an object as a default value, it will be shared among all instances. Instead, define defaults as a function. Arrays are object too. var PostModel = Backbone.Model.extend({ urlRoot : '/tweet',

Categories : Javascript

How to Automatically Click Save on a Save As Dialog Box?
Assuming you're talking about a page viewed in a web browser, no - there's no way to automatically click the "Save" button for the user. Allowing a webpage to arbitrarily save files to the user's hard drive with no user interaction would be a huge security problem. That being said, there are ways to encourage the browser to open/view the file directly instead of asking the user to save it, as well as options for a page to save some data locally in local storage.

Categories : PHP

Having an Ajax Save button and save in database
You can use jquery $.ajax() to send data from client side to PHP. (eg) $.ajax({ url : 'path/to/php/page', data : { id : '1', name : 'name' }, dataType : 'JSON', type : 'POST', cache: false, success : function(succ) { alert(succ); }, error : function(err) { alert(err); } }); Then in PHP page, use $_POST[] to capture data and insert it into database. $id = $_POST['id']; $name = $_POST['name']; Make sure you escape the values and make it safe for sql insert.

Categories : PHP

How to save Image(imported from gallery of phone to android app) and save into android app local directory?
Using for example: File path = getExternalFilesDir(Environment.DIRECTORY_DCIM); File image = new File(path,imageFileName ); Your image will be save in your app directory.

Categories : Android

save(commit=False) returns: save() got an unexpected keyword argument 'commit'
Django's Model class doesn't have defined the save method that way. That is for ModelForms. The method signature for normal Model's save method is this one: def save(self, force_insert=False, force_update=False, using=None): You'll have to try another approach. This is the dev's doc for Model's save method and this one is the version 1.4's Hope this helps!

Categories : Python

Django : difference between calling self.model.save() and self.model.save(*args,**kwargs)
The obvious difference is that in the first case you are passing positional and keyword arguments. If you wonder what arguments Model.save() takes and what they do, the simplest thing is to read the source code. Then you'll find something like: def save(self, force_insert=False, force_update=False, using=None): """ Saves the current instance. Override this in a subclass if you want to control the saving process. The 'force_insert' and 'force_update' parameters can be used to insist that the "save" must be an SQL insert or update (or equivalent for non-SQL backends), respectively. Normally, they should not be set. """ if force_insert and force_update: raise ValueError("Cannot force both insert and updating in model saving.") self.save_base(using

Categories : Python

Use iTextSharp to save a PDF to a SQL Server 2008 Blob, and read that Blob to save to disk
The need to deal with a pdf in multiple passes was not immediately clear when I first started working them, so maybe this is some help to you. In the method below, we create a pdf, render it to a byte[], load it for post processing, render the pdf again and return the result. The rest of your question deals with getting a byte[] into and out of a varbinary[max], saving a byte[] to file and reading it back out, which you can google easily enough. public byte[] PdfGeneratorAndPostProcessor() { byte[] newPdf; using (var pdf = new MemoryStream()) using (var doc = new Document(iTextSharp.text.PageSize.A4)) using (PdfWriter.GetInstance(doc, pdf)) { doc.Open(); // do stuff to the newly created doc... doc.Close(); newPdf = pdf.GetBuffer(); } byte[] post

Categories : C#

How many devices can be used for test?
100 devices / developer account. but You can register an account on TestFlight app there you can publish your app for teating to all your customers. https://testflightapp.com

Categories : IOS

How to set different height in dpi to different devices
Some example i use in fragment it can give you some idea: getActivity().getWindowManager().getDefaultDisplay().getMetrics(this._metrics); final int _lowDensityWidth = 55; final int _lowDensityHeight = 55; final int _medDensityWidth = 85; final int _medDensityHeight = 85; final int _higDensityWidth = 155; final int _higDensityHeight = 155; switch (_metrics.densityDpi) { case DisplayMetrics.DENSITY_LOW: imageView.setLayoutParams(new GridView.LayoutParams(_lowDensityWidth, _lowDensityHeight)); break; case DisplayMetrics.DENSITY_MEDIUM: imageView.setLayoutParams(new GridView.LayoutParams(_medDensityWidth, _medDensityHeight)); break; case

Categories : Android

iOS app run on selected devices
You can configure your tiapp.xml to set a minimum version for iOS and minimum device processor. Something like this: <ios> <min-ios-ver>4.3</min-ios-ver> <plist> <dict> <key>UIRequiredDeviceCapabilities</key> <array> <string>armv7</string> <string>armv7s</string> </array> </dict> </plist> </ios> And here is the list of devices that use each processor ARMv6 = iPhone 2G/3G, iPod 1G/2G ARMv7 = iPhone 3GS, iPhone 4, iPhone 4S, iPod 3G/4G/5G, iPad, iPad 2, iPad 3, iPad Mini ARMv7s = iPhone 5, iPad 4

Categories : IOS

This application is available to over 0 devices?
This is usual in Google Play. The Google Play won't show all the supported devices immediately. It takes some time may be an hour or even a day to show all the supported devices. So you don't have to worry about that. Check some time later. You will be happy. I faced this too.

Categories : Android

Xib for different iOS devices/simulator?
Create image.png and image@2x.png in your project. When referencing the image, use image.png. The OS will automatically select the correct image for the display. To handle iPhone 5 vs iPhone 4, use auto resize, also known as springs and struts. This is what was used to handle dynamic layouts before autolayout came along. You should only need two xibs by using these methods, one for iPad and one for iPhone.

Categories : IOS

GCM PHP to send all devices
You're overwriting the array in each iteration. You want to push the elements to the end of the registrationIds array. Here's how: $resultcoment = mysql_query("SELECT * FROM notificaciones"); $registrationIDs = array(); while ($row = mysql_fetch_array($resultcoment)){ $result = '"' . $row['regId'] . '", '; //print_r($result); $registrationIDs[] = $result; } $message = $_POST['message']; $fields = array( 'registration_ids' => $registrationIDs, 'data' => array( "message" => $message ), );

Categories : PHP

CSS - Mobile Devices
Change the <link> order :) - might work depends how you've written the code... You can also set for welcome_style.css media="only screen and (min-width:480px)" Your problem is that only screen is still true for mobile..

Categories : HTML

HLS streaming onto IOS devices
It's normal that when the playlist is for a live stream (without the #EXT-X-ENDLIST) that the client will start playing a few segments from the end of the playlist. This is because it expects that the playlist will be continually updated with more segments and the client will retrieve the playlist in a loop. You can fix it just by adding the #EXT-X-ENDLIST tag at the end of the playlist. Or maybe you expect that the stream continues to grow, in that case, you can try with an event playlist with this tag: #EXT-X-PLAYLIST-TYPE:EVENT The expected behavior of the client is not specified, so I don't know for sure if the application will start playing it from the beginning, but at least it should be able to seek to the start.

Categories : IOS

Why my app is not compatible with some devices?
You can try using one more thing in manifest which is for compatible screens: <compatible-screens <screen android:screenSize="small" android:screenDensity="ldpi"> <screen android:screenSize="small" android:screenDensity="hdpi"> </compatible-screens> Like above you can keep adding different combinations which your app is going to support.

Categories : Android

iOS Default.png always comes up on some devices
Genrally Your App Enter in to Foreground ,IOS 5 simulator displays a Lunch Image where IOS 4.3 simulator take a screen shot of the App when it was entering in to background , but testing on real device its work perfect.

Categories : IOS

how to run googlemap API V2 on 2.2 devices?
You will need to use the google-support library to run Google Maps API V2 on this version of android. Take a look at this blog post I wrote on how to do that: Google Maps API V2 using support library Take importent notice at steps number 4 to add the support library: 4. Another import we have to make in order to make our application work on Operation system prior to API11 is to import the support library this can be done very easily using Eclipse: Right-Click you project and choose “Android Tools” and then choose “Add Support Library…”:

Categories : Android

How to find usb devices in c#?
If you use libusbdotnet you should be able to do something like this: public static void RetrieveUSBDevices(int vid, int pid) { var usbFinder = new UsbDeviceFinder(vid, pid); var usbDevices = new UsbRegDeviceList(); usbDevices = usbDevices.FindAll(usbFinder); } You should then be able to iterate the usbDevices and check for the correct FullName. Haven´t tested this though so it´s theoretical. UPDATE: Tried that and it worked fine - what is the problem? Why vote down due to your own incompetence? This would also work: private static void Method() { var list = GetMyUSBDevices(); //Iterate list here and use Description to find exact device } private static List<UsbDevice> GetMyUSBDevices() { var vid = 32903; var pid = 36; ManagementObjectCo

Categories : C#

Get the name of the sound devices in C#
If you want to enumerate audio devices, it becomes very easy by using SlimDX. It requires DirectX to be installed in the computer though. For example, to enumerate the audio capture devices: DeviceCollection coll = DirectSoundCapture.GetDevices(); foreach( DeviceInformation dev in coll ) { ... } To enumerate audio playback devices: DeviceCollection coll = DirectSound.GetDevices(); foreach( DeviceInformation di in coll ) { } The DeviceInformation class has a Description property of type string. It also has a DriverGuid property of type Guid that enables you to "select" the device to perform either audio capture or playback (that can also be done by means of SlimDX). EDIT: a method using Winmm.dll Please take a look at the following entry in Code Project. It builds an

Categories : C#



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.