A simple Exception Handling example – C Sharp/C#
Hi, As you know an exception is an error that occurs during the runtime. Here is a simple exception handling example using C Sharp/C#. 🙂
Hi, As you know an exception is an error that occurs during the runtime. Here is a simple exception handling example using C Sharp/C#. 🙂
Hi, This is how you can simply rename a namespace in C Sharp/C#, This will print out ‘Hello’! 🙂
The program contains a class complex with two member variables x and y and a string class with one member variable. Two objects are created for complex class and string class and accepted values through read () function and their values are added using the operator overloaded function and assigned to the third object for… Read More »
Three file objects are created using the fstream class one for first, second for second file and third for the appended file. The first two files are opened in the input mode and third in the append mode. The first file is opened and checked for error condition if the file exist its contents are… Read More »
Two file objects are created using the fstream class for the two files, one for source file and another destination file. The first file is opened and its contents are copied to the second file using get ( ) and put ( ) function. Each time the source file is opened error checking is done… Read More »
Hi, For making non colliding bodies in Box2D, you may need to give SAME, NEGATIVE, group index to the b2FixtureDef of bodies you created. See the following code. The bodies with the above two fixture definitions won’t collide. 🙂
Hi, For Pausing all schedulers and actions in Cocos2D, use this line. For resuming the paused schedulers and actions, use this. 🙂
Hi, For opening a Web Link/URL from an iPhone application, follow the two simple steps. Step 1 : Create an NSURL object and initialize it with your URL string ; Step 2 : Use the openURL method by passing your NSURL object Done. 🙂
Hi, Some times while game building via Box2D Physics Engine, you may need to find out whether your bodies (from b2Body) are moving or not. Use the following sample of code to find out whether the given b2Body is moving or not. 🙂
Hello all.. This is an example demo showing the color picker in ANDROID. This example is from the developer site of ANDROID. You can go to the developer site and download the Demo. However here I am introducing it to you for easiness. This is the output you will get after running this application. Color… Read More »
In iphone programming there is no direct method to move the UITextField above the keyboard. Instead we do some adjustment. Iphone keyboard occupies the bottom 216 pixels on the screen so the UITextField placed at the bottom will not be visible. Try this method The first function will move the UITextField to the position we… Read More »
Hi, The following warning, ‘Multiple Build Commands For Output File’ occurs when you try to delete resource files by ‘delete reference’ other than the correct method of‘move to trash’ while deleting files from ‘Resources’ folder of your project. Therefore the Copy Bundle Resources still holds the references of the same file you have deleted and… Read More »
Hi, The following warning, ‘Multiple Build Commands For Output File’ occurs when you try to delete resource files by ‘delete reference’ other than the correct method of‘move to trash’ while deleting files from ‘Resources’ folder of your project. Therefore the Copy Bundle Resources still holds the references of the same file you have deleted and… Read More »
Hi, The following warning, ‘Multiple Build Commands For Output File’ occurs when you try to delete resource files by ‘delete reference’ other than the correct method of‘move to trash’ while deleting files from ‘Resources’ folder of your project. Therefore the Copy Bundle Resources still holds the references of the same file you have deleted and… Read More »
Hi, In order to get the selected item name from an NSPopUpButton using in any iOS application, use the following sample of code. 🙂
Hi all.. In today’s post I will show you how to get all information from the ANDROID Contacts programatically. Just copy and paste this code to your mail java file and check the Logcat for output. Note : Make sure you add this permission to the AndroidManifest File. Download the complete android java source code… Read More »
Hi, Given below is an example of a C#/C Sharp Random Access File. And the output will be… First value is A Second value is B Last value is E This example shows how you can randomly access data. 🙂
Hi all….. In this post I will show you a simple animation using a textView. It’s really simple. Steps. 1. Create a fresh project and copy this java code into it. 2. Create a folder named “anim” inside the res folder and create a file named “animation.xml” and copy this code into it. 3. copy… Read More »
Hello all….. In the previous post I have shown you how to parse a Simple JSON String in ANDROID. In today’s tutorial I will show you how to parse a complex JSON String. Take a look at the example Here the JSON String used is Now let’s dothe operation……….. Please check the Logcat for the… Read More »
JSON are alternative to XML and easy to understand than XML. As other languages Java also supports JSON parsing. Here is a simple example of JSON parsing in ANDROID. This is the JSON String that I am going to parse. And this JSON is same as this xml. Here is the code for this parsing.… Read More »
Complex JSON String parsing in ANDROID http://www.coderzheaven.com/2011/06/10/complex-json-string-parsing-in-android/ Parsing JSON Object in ANDROID. http://www.coderzheaven.com/2011/06/09/parsing-json-objects-in-android/
Hi, For removing or deleting duplicates from a NSMutableArray , use the following lines of code. It will simply check for duplicates elements and get it deleted or removed. 🙂
Hi, In order to simply set the iPhone/iPad table view transparent use the following line of code. Here ‘urTblView’ is the table view that you want to make transparent. Try it out. This single line will make your table view transparent and looks better. 🙂
Hi, Sometimes during the execution of program you may need to change the z order value of sprite for better working. Use the following sample of code to change the z order value of a sprite in Cocos2D/Box2D iPhone programming. 🙂
Hi, Sometimes you may need to get a sprite using tag while doing a project using Cocos2D. It’s easy to get a sprite by a tag in Cocos2D, use the following code to get it. Here ‘tempSprite’ is your CCSprite and it will get the sprite with tag 7. 🙂