An NSNotificationCenter object (or simply, notification center) provides a mechanism for broadcasting information within a program. An NSNotificationCenter object is essentially a notification dispatch table. Objects register with a notification center to receive notifications (NSNotification objects) using the addObserver:selector:name:object: or addObserverForName:object:queue:usingBlock: methods. Each invocation of this method specifies a set of notifications. Therefore, objects may [...]
Here, i am just checking whether network connectivity is available to a server and its done synchronously. You can use Reachability if you need notifications when there is any change in the network connectivity. For this you have to include the SystemConfiguration.framework in your project. Now add, #import "SystemConfiguration/SystemConfiguration.h" and the below function to your [...]
StrictMode.ThreadPolicy was introduced since API Level 9 and the default thread policy had been changed since API Level 11, which in short, does not allow network operation (include HttpClient and HttpUrlConnection) get executed on UI thread. if you do this, you get NetworkOnMainThreadException.
This tutorial will guide you to create a simple app with a Login screen which takes username and password from the user and then posts it to a url and parses the JSON response form the server.
Process and array or a hash inside a perl template #Print an Array named items [% FOREACH item IN items -%] [% item %] [% END -%] #Print a HASH named items [% FOREACH key IN items.keys.sort -%] [% key %]: [% terms.$key %] [% END -%] Enjoy coding!





