Recent Notes

Displaying keyword search results 1 - 4
Created by magnum on September 11, 2011 19:46:09    Last update: September 11, 2011 19:46:09
A pair of C functions convert between an Internet address and a string (ASCII): #include <arpa/inet.h> /* * Returns a poin... However , these functions do not support IPv6. The new pair is: #include <arpa/inet.h> /* Convert a Internet ad... Examples: #include <sys/socket.h> #include <netinet/in.h>...
Created by freyo on July 29, 2011 16:04:45    Last update: July 29, 2011 16:04:45
To start the Settings application: # am start -n com.android.settings/.Settings St... To start the Browser : # am start -n com.android.browser/.BrowserActivity... To start the phone dialer: # am start tel:210-385-0098 Starting: Intent { ... Help for am command: # am usage: am [subcommand] [options] ...
Created by woolf on June 30, 2011 15:15:50    Last update: June 30, 2011 15:15:50
You have to add the l flag to printf , otherwise it prints the truncated int: #include <stdio.h> int main() { long... Prints: Truncated value of i: 1701209960 Truncated valu...
Created by Dr. Xi on April 20, 2011 21:44:15    Last update: May 02, 2011 20:56:58
The String.format() method provides versatile formatting capabilities. This tutorial tries to present these capabilities in a accessible manner. The format string A format string can contain zero, one, or more format specifiers . The general form of a format specifier is: %[argument_index$] [flags] [width] [.precision]co... where things in square brackets are optional, and conversion is a character indicating the conversion to be applied to the corresponding variable value. The only required characters in the format specifier is the percent sign % and the conversion character. A simple example: public static void simpleFormat() { System.out... The Argument index The argument index is specified by a number, terminated by the dollar sign $ . The same argument may be repeated multiple times in a format string. Unindexed...