How to find if a string starts with a particular word – JAVA ?
Hi, In order to find whether a given string starts with a particular string or not in JAVA, use the following code.
Hi, In order to find whether a given string starts with a particular string or not in JAVA, use the following code.
Hello all.. ScrollBars are our basic needs in a UI if we have to show a content that do not fit fully into our layout. A normal scrollBar doesn’t look so beautiful, but don’t worry ANDROID is so customizable that you can customize your scrollBar also. Here is a simple demo to make a customโฆ Read More »
Merging layout is an excellent feature in android.ย Separateย xml can be included in a single xml. For this first i create a main.xml file In the bottom you can see that i have included a xml file named footer2button.xml The Merged layout will be like this
Hello everyone.. In today’s tutorial I will show you how to use camera in ANDROID in your program. In this tutorial we will be having a button which will open the camera and after taking the photo it will show it in an imageView. Note: This program will work only in the real device notโฆ Read More »
Hi, For creating a new file using JAVA, use the following code.
Hi, Given below is a code snippet which will demonstrate an exception handling in Java with Divide by zero error. ๐
Hi, Given below is a simple concatenation example in JAVA where two strings are joined together to form a single string. And…the output will be.. “CoderzHeaven” ๐
Hi, For searching for a particular substring from a starting index of a string and get the starting index of it in JAVA, use the following sample of code. It will print out the starting index of the substring ‘co’ (the second ‘co’), that is 6. ๐
Hi, For searching for a particular character from a string and getting the index of that particular character, use the following code. It will print out the index of ‘o’, that’s 1. ๐
Hi, In order to get the UUID of an iPhone, iPod or iPad, do the following in your code. Here ‘myUUIDStr’ will contain the UUID of your specified iOS device. ๐
Hi, In order to make a UITextField a Password Field / Password Mode do the following. In your .h class file, In your .m class file, This will make your UITextField in a Password entry mode or a Password Field. ๐
Hi, In order to set the font type of UITextView, do the following. In your .h class file, In your .m class file, This will set ‘urTextView’ with font name ‘Arial Rounded MT Bold’ with font size 18. ๐
Hi, In order to make a UITextField with out or no border, do like this. In your .h class file, In your .m class file, Thus you will get a UITextField named urTextField without border. ๐
Hi, In order to sort the elements in a string array in C Sharp/C#, we use the sort() method. Given below is a simple example using sort() method to sort the elements in a string array. It will print out, Sorted string Array: urStringArray[0] = apple urStringArray[1] = coderz urStringArray[2] = heaven123 urStringArray[3] = heaven777โฆ Read More »
Here is a simple example to show how to use seek Bar in android. Create a new project and place this code in it. The main.xml file The strings.xml file. Here is another example to show How to get the current progress on your SeekBar in android? Please leave your valuable cmments
Hello…. In today’s tutorial I will show you how to style your text in ANDROID. This is a simple example to show how styling is done using XML in android. This will also show you how to get a string from the resources in java code. First create a new project and name it “StyleTextDemo”โฆ Read More »
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. ๐