w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML Categories
How to find MS Access version number in java code
From the java.sql.Connection you have getMetaData() to get the DatabaseMetaData. Several methods are available here (eg. getDatabaseMajorVersion()) to get version information, if the Driver implement this info.

Categories : Java

How to debug application on newer iOS version from an older version of xcode?
In order to do this you'll need to have multiple versions of xcode installed. Can I have multiple Xcode versions installed? Xcode shares device and symbol information across all versions of xcode. If you open the newer xcode version that supports the newer version of ios, you can add the device there. Once the device is added, close the newer version of xcode, and open your older version (4.6) that you want to deveop on. If everything went smoothly the device should be available in organizer, and you should be able to run and debug normally on it.

Categories : Iphone

Is a library ,created in .net version 4.0, access with in the lower version from its version
Create a library in .Net 2.0 Framework so there will be no issue with higher versions, you can set the version from project properties (right click the project and select properties in visual studio) Select Application tab from properties window and select Target Framework combobox select .Net Framework 2.0

Categories : C#

wamp with two php verisons older verison not working
There seems to be a problem with particular PHP release. So, you can try few things. Check if required version of Microsoft Visual C++ is installed. In case of PHP 5.2.x, I guess the required one is VC6 (x86) Check if you are using correct version of Apache Handler. Apache Handler are different for each release of PHP and shouldn't be used of different release.. Try running Apache httpd.exe from the command prompt to see if you get an error.

Categories : PHP

How do I copy an old version of the iOS SDK to a new version of Xcode?
1. Copy the SDK from old Xcode to new Xcode Open your Applications folder. Right-click on the old version of Xcode and select Show Package Contents. Navigate to Contents -> Developer -> Platforms -> iPhoneOS.platform -> Developer -> SDKs. In a new window, open the same folder inside the new version of Xcode. Copy the SDK you want from old to new. If the new version of Xcode is running, you'll need to restart it now. 2. Set your SDK when building In your project settings, select the target you're building on the left. Then select Build Settings, then Base SDK. You should now see two versions of the SDK. Select the SDK you'd like to build against.

Categories : IOS

iOS app, programmatically get build version
You can try using the infoDictionary NSDictionary *infoDictionary = [[NSBundle mainBundle]infoDictionary]; NSString *version = infoDictionary[@"CFBundleShortVersionString"]; NSString *build = infoDictionary[(NSString*)kCFBundleVersionKey]; NSString *bundleName = infoDictionary[(NSString *)kCFBundleNameKey];

Categories : IOS

Programmatically Change Display Rotation on Mac OS using Xcode
Extracted from https://github.com/CdLbB/fb-rotate - it seems IOKit can do the job although the behavior seems a bit odd to me. In a nutshell: io_service_t service = CGDisplayIOServicePort(myDisplayID); //IOKit Handle (get myDisplayID yourself) IOOptionBits options = (0x00000400 | (kIOScaleRotate90) << 16) //Some undocumented hex'ing IOServiceRequestProbe(service, options); //Set rotation to display Don't forget to link against IOKit.

Categories : Objective C

how to detect html version programmatically
Using JavaScript, you can try document.doctype, however as far as HTML version detection (I assume to check features and compatibility), it's usually recommended to look for specific feature detection instead, so something like Modernizr is better...

Categories : HTML

Which is my Xcode version?
If Xcode is running, the version and build number can be obtained from the “Xcode > About Xcode” menu. Alternatively, you can obtain this information by typing on a terminal: $ /usr/bin/xcodebuild -version

Categories : Xcode

Enable GPS programmatically in android 4.1 or heigher version
You can check this code .It is working for me.. import android.net.Uri; import android.provider.Settings private void turnGPSOn() { String provider = Settings.Secure.getString(getContentResolver(), Settings.Secure.LOCATION_PROVIDERS_ALLOWED); if(!provider.contains("gps")) { final Intent poke = new Intent(); poke.setClassName("com.android.settings", "com.android.settings.widget.SettingsAppWidgetProvider"); poke.addCategory(Intent.CATEGORY_ALTERNATIVE); poke.setData(Uri.parse("3")); sendBroadcast(poke); } }

Categories : Android

xcode version visible from the ipa
If you can browse down to your Info.plist, there is a field called DTXcodeBuild and it will have a string value, like 4H1503. You can actually go to your xcode archive or .app and Open Package Contents, and then go to Products/Applications/YourApp.app and Open That package contents. The Info.plist should be in the root. That is where you'll find your DTXCodeBuild. That is for an .app file. .IPA is a different though. It should be a binary. You could rename it to a .zip and look around, but chances are you won't find too much in there. Look at this thread discussing, ipa, renaming it, and the binary aspect of it: https://discussions.apple.com/thread/4258197?start=0&tstart=0

Categories : Xcode

How to check if AppEngine application version already exists programmatically
It might be possible if you let your app serve an url for which you don't have to log in with a google account which then shows a bunch of info that your script can use. For example https://yourapp.appspot.com/info could display version information. It looks like version info is now available serverside if you use the new Modules api: https://developers.google.com/appengine/docs/java/javadoc/com/google/appengine/api/labs/modules/ModulesService#getVersions(java.lang.String)

Categories : Java

How to learn which version of application installed programmatically in android
Yes, like this: String packageToCheck = "com.facebook"; List<PackageInfo> packages = getPackageManager().getInstalledPackages(0); for (int i=0; i<packages.size(); i++) { PackageInfo p = packages.get(i); if (p.packageName.contains(packageToCheck)) { String name = p.applicationInfo.loadLabel(getPackageManager()).toString(); String pname = p.applicationInfo.loadLabel(getPackageManager()).toString(); String packageName = p.packageName; String versionName = p.versionName; int versionCode = p.versionCode; Log.i(TAG, name + ": " + pname + ": " + packageName + ": " + versionName + ": " + versionCode); } }

Categories : Android

Google App Engine: Can I programmatically find out if this is the default version?
One not so full proof way you can get around this is by checking the URL. If it matches X.name.appspot.com, it probably isn't the default version. It might be, but it's definitely not a normal user accessing your page and therefore probably a development operation. Far from perfect, but might be enough...

Categories : Java

Xcode / phonegap - make new version
To change the version of your project you need to Open project Go to Resources Open -Info.plist Change bundle version string You can also edit this file without opening the project. The file is in the folder, sibling with the www folder.

Categories : Xcode

Checking PhoneGap version in xCode
you can use device object's cordova(device.cordova) property to get the version of phonegap. Below link provides more information for same. http://docs.phonegap.com/en/3.0.0/cordova_device_device.md.html#Device

Categories : Xcode

How to force close windows phone app programmatically if version is not compatible
If you develop the app targetting Windows Phone 8, the user won't be able to install it in a device running Windows Phone 7. So you don't have to worry about it. In order to be executable in both platforms, the app has to target Windows Phone 7.1. But that doesn't make sense in your case. If you want only Windows Phone 8 users to use your app, set it's target to Windows Phone 8, and it will only execute in that platform.

Categories : C#

How do I copy my sqlite file from documents directory to app bundle using XCode menu and not programmatically
1.Drag and drop .sqlite file from finder on to Xcode files section. 2.Run the code below from application didFinishLaunchingWithOptions: BOOL successBool; NSFileManager *fileManager = [NSFileManager defaultManager]; NSError *error; NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask, YES); NSString *documentsDirectory = [paths objectAtIndex:0]; NSString *writableDBPath = [documentsDirectory stringByAppendingPathComponent:@"YourDatabaseName.sqlite"]; successBool = [fileManager fileExistsAtPath:writableDBPath]; if (successBool) { return; } NSString *defaultDBPath = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"YourDatabseName.sqlite"]; successBool = [fileManager copyItemAtPath:defaultDBPath toPath:writableDBPath error:&

Categories : Misc

Change app Version with only IPA file provided (no xcode)
Rename the .ipa to .zip, and unzip the archive. Inside should be a folder called "payload", and inside that folder should be your application archive. Right-click the application archive, and choose "show package contents." Find the Info.plist file (either named "Info.plist" or "AppName_Info.plist"). Open that file with a text editor Change the value of "CFBundleVersion" and "CFBundleShortVersionString" to your desired version number. Re-zip the archive Rename the .zip to .ipa Re-sign the .ipa

Categories : IOS

Programmatically save OpenXml document as previous version (Word 2007)
One of the most common causes of this symptom is that the document contains elements/attributes in the Office 14 namespace. As an example, you might have markup like this: <w:rPr> <w:color w:val="5B9BD5" w:themeColor="accent1"/> <w14:shadow w14:blurRad="38100" w14:dist="25400" w14:dir="5400000" w14:sx="100000" w14:sy="100000" w14:kx="0" w14:ky="0" w14:algn="ctr"> <w14:srgbClr w14:val="6E747A"> <w14:alpha w14:val="57000"/> </w14:srgbClr> </w14:shadow> You probably have that w14 namespace declared, but there also needs to be an attribute in the root element

Categories : C#

How to transfer code from old version of xcode to the newest verision?
Depends what type of app is it ? OpenGL game, normal app, what ? Please specify. Xcode 4 apps won't have much difficulty being ported on Xcode 5 unless your app doesn't have Automatic Reference Counting. Otherwise, just open the .xcodeproj file in the new version of Xcode and everything will happen automatically.

Categories : Iphone

XCode Error: No provisioned iOS devices are available with a compatible iOS version
Answering my own question here. Wasted a bunch of time on this, but sometimes it's the simplest thing that kills you. It turns out someone on my team had changed the target's supported Device (under Targets -> APP_TARGET -> Summary -> Devices in the project settings) to 'iPad', when the app was supposed to be 'Universal' all along, and I was trying to deploy to an iPhone.

Categories : IOS

Bug in current version of Xcode 4.6.3 (BOOL is showing wrong)
Apple means: Right click on the variable in the Variables View and select "Edit Summary Format…". Do you see the string "NO" in there? If so, delete that. Double clicking on a variable in Xcode 4.x edit's it's summary format, which can be a bit confusing, since you might expect that to edit it's value. We've changed this behavior in Xcode 5 to do nothing.

Categories : Misc

best practice: how to add an external framework to xcode project which is under version control?
AFAIK, there are basically two ways to be absolutely sure that a given commit uses a known version of a framework. Commit the built framework into your repository. This is the common approach. Use submodules to reference a repository that houses builds of the framework. You'll probably have to create and maintain such a repository yourself. Option 2 has the benefit of keeping your repository small, but is more hassle, particularly since submodules are something of a pain to work with.

Categories : IOS

Running PyObjC application (built in Xcode) on previous version of Mac OS?
Good question. I wrestled with this for an embedding problem a few years ago and ended up dynamically linking against a specific version that I knew was available on every platform. I had assumed originally that the Python.framework's Current would be adequate, but it seems to get resolved at link time by Xcode, therefore making the link specific to a particular version. For my purposes, I was able to link directly to /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/Python.framework/Versions/2.7/Python Which works for OS X 10.7 and 10.8. If you need to go back to 10.6, you'll want to try linking to /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/

Categories : Python

Xcode modifies current CoreData model version at every launch
Solved: The problem was an old entry in the project.pbxproj file (Open PROJECT.xcodeproj with right click -> "Show package content"). I deleted the section as shown in my screenshot and everything is running fine.

Categories : IOS

Version Number does not use the SVN build number
Variables must have one of the three prefixes, depending on how they are created: var. env. sys. Documentation Where is this "svn.BUILD_NUMBER" coming from? UPDATE: From your comment, it seems like you need to get the revision number from outside your project and bring it inside. There are many ways to do this. Some CI servers will set an environment variable for the build that gives the revision number. In any case, you have to correct your preprocessor variable usage by using var. or env.: <?ifdef env.BUILD_NUMBER?> <?define PRODUCTVERSION="1.0.$(env.BUILD_NUMBER).0"?> <?else?> <?define PRODUCTVERSION="1.0.1.0"?> <?endif?> If you need to create the environment variable first, running a command like this would do it: set BUILD_NUMBER= for /F

Categories : Wix

Xcode iOS project, how to store dev user/pass without putting in version control
I also have to add this to the Xcode project navigator so that the framework can find this file when I look for it in the bundle. You don't have to, instead add a shell script to Build Phases to copy files from anywhere to the app bundle, e.g. ditto -V ./Secret/ "$TARGET_BUILD_DIR/$UNLOCALIZED_RESOURCES_FOLDER_PATH"

Categories : IOS

Unable to install Fabric on OSX using recommended Homebrew and pip. Xcode is latest version
So it was: pip install fabric It wasn't working for me previously because I was on Mac OSX and no one ever told me I had to have Command Line Tools installed to actually do anything useful with the Mac (this really should be better emphasized as it's taken me until December to finally install Fabric due to compliation errors until I installed those tools).

Categories : Osx

FB login fails after duplicating xcode project to create lite version of app
I missed something really obvious! In trying to duplicate everything I had done for the full app, I, correctly, added a test user to the Facebook app but I forgot to login to that test user account on Facebook and accept the request! Hope that helps someone else :-)

Categories : Iphone

Twitter access token and access secret is returning null exception after changing to twitter api version 1.1 in android?
Finally I have figured my problem. Just need to change these things: https://api.twitter.com/oauth/authenticate?force_login=true from http://api.twitter.com/oauth/authenticate

Categories : Android

Programmatically add layout from number of files
I'd recommend you use a ListView, instead of doing that layout stuff manually. You can then implement an Adapter providing the list, and specify individual list elements (using xml layouts). Advantage is that you don't have to write everything from scratch, the ListView can even recycle old views when the user switches folders, etc. -> more responsive UI. To make things even more simple: let your activity/fragment extend ListActivity/ListFragment and give the ListView the id @android:id/list. You also do not need the ScrollView when using an ListView, the ListView scrolls by itself. See the articles linked for a simple example.

Categories : Java

How to get Access Point Name programmatically
For Selected APN: Cursor c = context.getContentResolver().query(Uri.parse("content://telephony/carriers/preferapn"), null, null, null, null); For All APN Names: Cursor c = context.getContentResolver().query(Uri.parse("content://telephony/carriers/current"), null, null, null, null);

Categories : Android

How to add limited number of posts programmatically in wordpress?
Try this: Check the number of posts in the category before inserting any post. $args = array( 'include' => '9', 'taxonomy' => 'category', 'pad_counts' => true ); $categories = get_categories( $args ); if($category[0]->count < 10){ // Your Code Goes Here }

Categories : PHP

Edit name/phone number of contact programmatically
You should specify the mimetype in your selection. .withSelection(ContactsContract.CommonDataKinds.Phone._ID + "=? AND " + Data.MIMETYPE + "='" + ContactsContract.CommonDataKinds.Phone.CONTENT_ITEM_TYPE + "'", new String[]{contact_id}) If you haven't figured this out yet, give that a go. I found updating contacts to be very tricky in getting the selection arguments right.

Categories : Android

Android: programmatically get battery serial number
As Android runs on Linux you might get this information from the /proc and/or /sys directories. For example on some devices you can get the serial number by calling cat /sys/class/power_supply/battery/serial_number As this is device-dependent it might work or not work for your device. As you can see from this code the actual location of the battery information is usually different on each system, so this approach will only work if you know the location of this data on each of the device you want to support

Categories : Android

Is there anyway of programmatically scaling the number Heroku workers?
Found this article that shows how to scale workers via a Ruby script: http://engineering.nulogy.com/posts/automatically-scaling-heroku-workers/

Categories : Ruby

Access Asset Catalog programmatically
In order to access the image from the Asset Catalog, you only need to access the name of the asset group without any extensions. So, if you add an image named @"my-button@2x.png" to the Asset Catalog, it will create an asset group called my-button. Now, all you have to do is access the image like so: [UIImage imageNamed:@"my-button"]; Also, you can edit the asset group by renaming it (without renaming the images) or changing it's individual components. This will allow you to follow easier naming conventions as well as show completely different assets between different UIScreen scales without any scale checks. In order to incorporate images for different device sizes, you may need to toggle it under the "Devices" subheading in the Asset Catalog Group's options. Here is an example of t

Categories : IOS

Soundhound - Android - How to programmatically access Favorites ?
Local app storage is generally restricted. One application can not access the local storage of another's without explicit permission of some sort. Either the application (Soundhound) has to set access to global (unlikely) or explicitly expose the data via some sort of API (also extremely unlikely). I would expect this to not be reasonably possible (without root permissions).

Categories : Android

Enable access for assistive devices programmatically on 10.9
This doesn’t answer your question, but it’s good to know about a new API call that appeared in 10.9 and lets you display the authorization screen or bypass it: NSDictionary *options = @{(id)kAXTrustedCheckOptionPrompt: @YES}; BOOL accessibilityEnabled = AXIsProcessTrustedWithOptions((CFDictionaryRef)options); Passing YES will force the authorization screen to appear, passing NO will silently skip it. The return value is the same as the one returned by AXAPIEnabled(), which is getting deprecated in 10.9. To make sure that the function is available on your system, just compare it to NULL: if (AXIsProcessTrustedWithOptions != NULL) { // 10.9 and later } else { // 10.8 and older } You'll need to add ApplicationServices.framework to your project, and import to your .m or .h fi

Categories : Objective C



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