<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;AkEDSHw6cCp7ImA9WhRbF0Q.&quot;"><id>tag:blogger.com,1999:blog-2484637286305291771</id><updated>2012-02-09T06:44:39.218-08:00</updated><category term="DatePicker programmatically" /><category term="Visual Studio" /><category term="DatePicker" /><category term="localization" /><category term="ssl connection" /><category term="windows phone 7" /><category term="xCode" /><category term="Silverlight Toolkit" /><category term="detect" /><category term="DatePicker control" /><category term="http" /><category term="ZipArchive" /><category term="download" /><category term="wp7" /><category term="objective C" /><category term="Mouse Wheeling Ticker" /><category term="lproj" /><category term="background" /><category term="ObjectiveC categories" /><category term="image" /><category term="iOS" /><category term="file" /><category term="IsolatedStorage" /><category term="static library" /><category term="windows registry" /><category term="UITextField" /><category term="authorization" /><category term="bind" /><category term="sort" /><category term="JQuery plugin" /><category term="compress" /><category term="zip file" /><category term="merge" /><category term="local notification" /><category term="WebBrowser" /><category term="java" /><category term="SharpZipLib" /><category term="UINavigationBar" /><category term="uncompress" /><category term="UIScrollView" /><category term="localize DatePicker" /><category term="ticker" /><category term="jquery" /><category term="Date Picker" /><category term="android" /><category term="post data" /><category term="iPhone" /><category term="Silverlight DatePicker" /><category term="NSSortDescriptor" /><category term="emulator" /><category term="ssl certificate" /><category term="embedded html" /><category term="scroller" /><category term="exception" /><category term="iPad" /><category term="UIWebVeiw" /><category term="send post data" /><category term="bounce" /><category term="unzip" /><category term="prototype" /><category term="json" /><category term="zip" /><title>Step by Step</title><subtitle type="html" /><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://transoceanic.blogspot.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://transoceanic.blogspot.com/" /><author><name>transoceanic</name><uri>http://www.blogger.com/profile/07533121345262806709</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>22</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/blogspot/yBrpr" /><feedburner:info uri="blogspot/ybrpr" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry gd:etag="W/&quot;DUIERXs4cCp7ImA9WhRQGEo.&quot;"><id>tag:blogger.com,1999:blog-2484637286305291771.post-2704191888816052172</id><published>2011-12-14T06:53:00.000-08:00</published><updated>2011-12-14T07:45:04.538-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-12-14T07:45:04.538-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="UITextField" /><category scheme="http://www.blogger.com/atom/ns#" term="background" /><category scheme="http://www.blogger.com/atom/ns#" term="objective C" /><title>Objective C: UITextField controlling background image/color</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
If you set
&lt;pre class="brush:cpp"&gt;
UITextField *tf = [[UITextField alloc] init];
tf.borderStyle = UITextBorderStyleRoundedRect;
&lt;/pre&gt;
you can't control background of text field.
To controlling background you need
&lt;pre class="brush:cpp"&gt;
#import "QuartzCore/QuartzCore.h"
...

UITextField *tf = [[UITextField alloc] init];
tf.borderStyle = UITextBorderStyleDefault;
tf.background = [UIImage imageNamed:@"bg_000000_20.png"];
tf.layer.cornerRadius = 5.0;
tf.layer.masksToBounds = YES;

// for vertical align
tf.contentVerticalAlignment = UIControlContentVerticalAlignmentCenter;

// for border
tf.layer.borderWidth = 1.0;
tf.layer.borderColor = [[UIColor darkGrayColor] CGColor];

// for left padding
tf.leftView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 5, 20)];
tf.leftViewMode = UITextFieldViewModeAlways;
&lt;/pre&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2484637286305291771-2704191888816052172?l=transoceanic.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/vj41RS87DBlNZfA8KX1IOXPvrO4/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/vj41RS87DBlNZfA8KX1IOXPvrO4/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/vj41RS87DBlNZfA8KX1IOXPvrO4/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/vj41RS87DBlNZfA8KX1IOXPvrO4/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/yBrpr/~4/WPzdutoe8Fs" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://transoceanic.blogspot.com/feeds/2704191888816052172/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://transoceanic.blogspot.com/2011/12/objective-c-uitextfield-controlling.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2484637286305291771/posts/default/2704191888816052172?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2484637286305291771/posts/default/2704191888816052172?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/yBrpr/~3/WPzdutoe8Fs/objective-c-uitextfield-controlling.html" title="Objective C: UITextField controlling background image/color" /><author><name>transoceanic</name><uri>http://www.blogger.com/profile/07533121345262806709</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://transoceanic.blogspot.com/2011/12/objective-c-uitextfield-controlling.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEIGR3Y5eSp7ImA9WhRQF0U.&quot;"><id>tag:blogger.com,1999:blog-2484637286305291771.post-7022901136434609889</id><published>2011-12-13T06:28:00.000-08:00</published><updated>2011-12-13T06:28:46.821-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-12-13T06:28:46.821-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="java" /><category scheme="http://www.blogger.com/atom/ns#" term="windows registry" /><title>Java: Read key from Windows Registry.</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
After create new windows registry in cmd by:
&lt;br /&gt;
&lt;pre class="brush:java"&gt;reg add HKLM\SOFTWARE\Policies\MyApplication\AES /v SecurityKey /d 12345678901234567890123456789012
&lt;/pre&gt;
need read it from java
&lt;br /&gt;
&lt;pre class="brush:java"&gt;import java.io.IOException;
import java.io.InputStream;
import java.io.StringWriter;

/**
 * @author Oleg Ryaboy, based on work by Miguel Enriquez 
 */
public class WindowsReqistry {

    /**
     * 
     * @param location path in the registry
     * @param key registry key
     * @return registry value or null if not found
     */
    public static final String readRegistry(String location, String key){
        try {
            // Run reg query, then read output with StreamReader (internal class)
            Process process = Runtime.getRuntime().exec("reg query " + 
                    '"'+ location + "\" /v " + key);

            StreamReader reader = new StreamReader(process.getInputStream());
            reader.start();
            process.waitFor();
            reader.join();

            // Parse out the value
            String[] parsed = reader.getResult().split("\\s+");
            if (parsed.length &gt; 1) {
                return parsed[parsed.length-1];
            }
        } catch (Exception e) {}

        return null;
    }

    static class StreamReader extends Thread {
        private InputStream is;
        private StringWriter sw= new StringWriter();

        public StreamReader(InputStream is) {
            this.is = is;
        }

        public void run() {
            try {
                int c;
                while ((c = is.read()) != -1)
                    sw.write(c);
            } catch (IOException e) { 
            }
        }

        public String getResult() {
            return sw.toString();
        }
    }
    public static void main(String[] args) {

        // Sample usage
        String value = WindowsReqistry.readRegistry("HKLM\\SOFTWARE\\Policies\\MyApplication\\AES", "SecurityKey");
        System.out.println(value);
    }
}
&lt;/value&gt;&lt;/registry&gt;&lt;/key&gt;&lt;/version&gt;&lt;/pre&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2484637286305291771-7022901136434609889?l=transoceanic.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/3TlQP92QBszwNvp6fBPZVUC9wEk/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/3TlQP92QBszwNvp6fBPZVUC9wEk/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/3TlQP92QBszwNvp6fBPZVUC9wEk/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/3TlQP92QBszwNvp6fBPZVUC9wEk/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/yBrpr/~4/aJgeU4W2CVA" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://transoceanic.blogspot.com/feeds/7022901136434609889/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://transoceanic.blogspot.com/2011/12/java-read-key-from-windows-registry.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2484637286305291771/posts/default/7022901136434609889?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2484637286305291771/posts/default/7022901136434609889?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/yBrpr/~3/aJgeU4W2CVA/java-read-key-from-windows-registry.html" title="Java: Read key from Windows Registry." /><author><name>transoceanic</name><uri>http://www.blogger.com/profile/07533121345262806709</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://transoceanic.blogspot.com/2011/12/java-read-key-from-windows-registry.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0cFQ3s6eCp7ImA9WhRTFUo.&quot;"><id>tag:blogger.com,1999:blog-2484637286305291771.post-1493247853565691043</id><published>2011-11-06T03:30:00.000-08:00</published><updated>2011-11-06T03:30:12.510-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-06T03:30:12.510-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="ssl connection" /><category scheme="http://www.blogger.com/atom/ns#" term="java" /><category scheme="http://www.blogger.com/atom/ns#" term="android" /><category scheme="http://www.blogger.com/atom/ns#" term="ssl certificate" /><title>Android: Import SSL certificate and use it to SSL connection</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;br /&gt;
&lt;ol style="text-align: left;"&gt;
&lt;li&gt;First of all you need get SSL certificate. You can obtain certificate (file with .cer extention) from the chain included in the endpoint certificate or from the official site of the issuer (in the Base64 encoded X.509 format).&lt;br /&gt;&lt;br /&gt;Or if you have this certificate installed on you local computer you can obtain it by run "mmc" (Microsoft Management Console) from command line ("Prompt" or "Run"). If you don't have Certificate snap-in go to &amp;nbsp;File -&amp;gt; Add/Remove Snap-in... -&amp;gt; Select from available snap-ins "Certificates" -&amp;gt; Add to Selected snap-ins -&amp;gt; Ok.&lt;br /&gt;&lt;br /&gt;
Find certificate what do you need -&amp;gt; Right click -&amp;gt; All Tasks -&amp;gt; Export -&amp;gt; Select Base-64 encoded X.509 (.CER) -&amp;gt; Save into &lt;i&gt;my_certificate.cer&lt;/i&gt; in&lt;i&gt; my_certificate_path&lt;/i&gt; place.&lt;br /&gt;&lt;br /&gt;
Content of this file look like:
&lt;pre class="brush: xml;"&gt;-----BEGIN CERTIFICATE-----
MIIEIDCCAwigAwIBAgIQNE7VVyDV7exJ9C/ON9srbTANBgkqhkiG9w0B...
-----END CERTIFICATE-----
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;For create the keystore download latest release of &lt;a href="http://www.bouncycastle.org/latest_releases.html" target="_blank"&gt;Bouncy Castle provider&lt;/a&gt; (bcprov-jdkxx-xxx.jar) and store it in &lt;i&gt;provider_path&lt;/i&gt; place. You must have JRE installation for invoke &lt;i&gt;keytool&lt;/i&gt; (located under bin folder). You may add path to &lt;i&gt;keytool&lt;/i&gt; into CLASSPATH environment variable or use absolute path.&lt;/li&gt;
&lt;li&gt;Execute this command for create mykeystore.bks (don't use upper case and "_" for name):
&lt;pre class="brush:xml"&gt;D:/PROGRA~1/Java/jre7/bin/keytool -importcert -v -trustcacerts -file "my_certificate_pathmy_certificate.cer" -alias myAlias -keystore "my_keystore_path/mykeystore.bks" -provider org.bouncycastle.jce.provider.BouncyCastleProvider -providerpath "provider_path/bcprov-jdkxx-xxx.jar" -storetype BKS -storepass "my_password"
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;You may verify if the certificate was imported correctly
&lt;pre class="brush:xml"&gt;D:/PROGRA~1/Java/jre7/bin/keytool -list -keystore "my_keystore_path/mykeystore.bks" -provider org.bouncycastle.jce.provider.BouncyCastleProvider -providerpath "provider_path/bcprov-jdkxx-xxx.jar" -storetype BKS -storepass "my_password"
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;
Paste you &lt;i&gt;mykeystore.bks&lt;/i&gt; as a raw resource under res/raw (this generate R.raw.mykeystore resource)
&lt;/li&gt;
&lt;li&gt;
Create a custom &lt;code&gt;HttpClient&lt;/code&gt; to use you SSL certificate for HTTPS connection:
&lt;pre class="brush: java"&gt;import java.io.InputStream;
import java.security.KeyStore;

import org.apache.http.conn.ClientConnectionManager;
import org.apache.http.conn.scheme.PlainSocketFactory;
import org.apache.http.conn.scheme.Scheme;
import org.apache.http.conn.scheme.SchemeRegistry;
import org.apache.http.conn.ssl.SSLSocketFactory;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.impl.conn.SingleClientConnManager;

import android.content.Context;

public class MyHttpsClient extends DefaultHttpClient {
  
    final Context context;
 
    public MyHttpsClient(Context context) {
        this.context = context;
    }
 
    @Override
    protected ClientConnectionManager createClientConnectionManager() {
        SchemeRegistry registry = new SchemeRegistry();
        registry.register(new Scheme("http", PlainSocketFactory.getSocketFactory(), 80));
        // Register for port 443 our SSLSocketFactory with our keystore
        // to the ConnectionManager
        registry.register(new Scheme("https", newSslSocketFactory(), 443));
        return new SingleClientConnManager(getParams(), registry);
    }
 
    private SSLSocketFactory newSslSocketFactory() {
        try {
            // Get an instance of the Bouncy Castle KeyStore format
            KeyStore trusted = KeyStore.getInstance("BKS");
            // Get the raw resource, which contains the keystore with
            // your trusted certificates (root and any intermediate certs)
            InputStream in = context.getResources().openRawResource(R.raw.mykeystore);
            try {
                // Initialize the keystore with the provided trusted certificates
                // Also provide the password of the keystore
                trusted.load(in, "my_password".toCharArray());
            } finally {
                in.close();
            }
            // Pass the keystore to the SSLSocketFactory. The factory is responsible
            // for the verification of the server certificate.
            SSLSocketFactory sf = new SSLSocketFactory(trusted);
            // Hostname verification from certificate
            // http://hc.apache.org/httpcomponents-client-ga/tutorial/html/connmgmt.html#d4e506
            sf.setHostnameVerifier(SSLSocketFactory.STRICT_HOSTNAME_VERIFIER);
            return sf;
        } catch (Exception e) {
            throw new AssertionError(e);
        }
    }
}
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;
Use you custom &lt;code&gt;HttpClient&lt;/code&gt;:
&lt;pre class="brush: java"&gt;DefaultHttpClient client = new MyHttpsClient(getApplicationContext());
&lt;/pre&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2484637286305291771-1493247853565691043?l=transoceanic.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/541N-cB5kFmvNi6Un18ni2SoBGc/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/541N-cB5kFmvNi6Un18ni2SoBGc/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/541N-cB5kFmvNi6Un18ni2SoBGc/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/541N-cB5kFmvNi6Un18ni2SoBGc/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/yBrpr/~4/r-zkHWDyG4M" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://transoceanic.blogspot.com/feeds/1493247853565691043/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://transoceanic.blogspot.com/2011/11/android-import-ssl-certificate-and-use.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2484637286305291771/posts/default/1493247853565691043?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2484637286305291771/posts/default/1493247853565691043?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/yBrpr/~3/r-zkHWDyG4M/android-import-ssl-certificate-and-use.html" title="Android: Import SSL certificate and use it to SSL connection" /><author><name>transoceanic</name><uri>http://www.blogger.com/profile/07533121345262806709</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://transoceanic.blogspot.com/2011/11/android-import-ssl-certificate-and-use.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0YGRH4_cSp7ImA9WhdaGUs.&quot;"><id>tag:blogger.com,1999:blog-2484637286305291771.post-5706548669224546897</id><published>2011-10-27T01:30:00.000-07:00</published><updated>2011-10-30T00:52:05.049-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-30T00:52:05.049-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="detect" /><category scheme="http://www.blogger.com/atom/ns#" term="UIScrollView" /><category scheme="http://www.blogger.com/atom/ns#" term="iPhone" /><category scheme="http://www.blogger.com/atom/ns#" term="iPad" /><category scheme="http://www.blogger.com/atom/ns#" term="bounce" /><category scheme="http://www.blogger.com/atom/ns#" term="iOS" /><category scheme="http://www.blogger.com/atom/ns#" term="objective C" /><category scheme="http://www.blogger.com/atom/ns#" term="scroller" /><title>Objective C: Detect start of bouncing effect for UIScrollView</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
For detect bouncing of UIScrollView (or UITableView ...) using UIScrollViewDelegate:
&lt;br /&gt;
&lt;pre class="brush:cpp"&gt;static BOOL _draggingView = NO;

- (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView {
 _draggingView = YES;
}

- (void)scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL)decelerate {
 _draggingView = NO;
}

- (void)scrollViewDidScroll:(UIScrollView *)scrollView {
 NSInteger pullingDetectFrom = 50;
 if (self.contentOffset.y &amp;lt; -startDetecting) {
  _draggingView = NO;
  NSLog(@"Pull Down");
 } else if (self.contentSize.height &amp;lt;= self.frame.size.height &amp;amp;&amp;amp; self.contentOffset.y &amp;gt; startDetecting) {
  _draggingView = NO;
  NSLog(@"Pull Up");
 } else if (self.contentSize.height &amp;gt; self.frame.size.height &amp;amp;&amp;amp; 
       self.contentSize.height-self.frame.size.height-self.contentOffset.y &amp;lt; -startDetecting) {
  _draggingView = NO;
  NSLog(@"Pull Up");
 }
}
&lt;/pre&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2484637286305291771-5706548669224546897?l=transoceanic.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/kHuKQsCTzDg9S5fNyfw9vt-DCRs/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/kHuKQsCTzDg9S5fNyfw9vt-DCRs/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/kHuKQsCTzDg9S5fNyfw9vt-DCRs/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/kHuKQsCTzDg9S5fNyfw9vt-DCRs/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/yBrpr/~4/UxlLlO8BqHU" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://transoceanic.blogspot.com/feeds/5706548669224546897/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://transoceanic.blogspot.com/2011/10/objective-c-detect-start-of-bouncing.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2484637286305291771/posts/default/5706548669224546897?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2484637286305291771/posts/default/5706548669224546897?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/yBrpr/~3/UxlLlO8BqHU/objective-c-detect-start-of-bouncing.html" title="Objective C: Detect start of bouncing effect for UIScrollView" /><author><name>transoceanic</name><uri>http://www.blogger.com/profile/07533121345262806709</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://transoceanic.blogspot.com/2011/10/objective-c-detect-start-of-bouncing.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0QMSXozfip7ImA9WhdbGU8.&quot;"><id>tag:blogger.com,1999:blog-2484637286305291771.post-997683221072657109</id><published>2011-10-18T02:16:00.000-07:00</published><updated>2011-10-18T02:16:28.486-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-18T02:16:28.486-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="NSSortDescriptor" /><category scheme="http://www.blogger.com/atom/ns#" term="iPhone" /><category scheme="http://www.blogger.com/atom/ns#" term="iPad" /><category scheme="http://www.blogger.com/atom/ns#" term="objective C" /><category scheme="http://www.blogger.com/atom/ns#" term="sort" /><title>Objective C: Sort array of objects</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
If we have array of some objects:&lt;br /&gt;
&lt;pre class="brush:cpp"&gt;@interface SimpleObject : NSObject {
 NSInteger key;
 NSString *name;
        . . .
}
&lt;/pre&gt;
and we need to sort this array by "name" property of SimpleObject.
Use NSSortDescriptor:
&lt;br /&gt;
&lt;pre class="brush:cpp"&gt;// declare array with SimpleObject instances
self.simpleObjectsArray = . . .

NSSortDescriptor *sortDescriptor =
        [[[NSSortDescriptor alloc] initWithKey:@"name" ascending:YES] autorelease];
NSArray *sortDescriptors = 
        [NSArray arrayWithObject:sortDescriptor];
// array contained all instances sorted by "name" field
NSArray *sortedArray = 
        [self.simpleObjectsArray sortedArrayUsingDescriptors:sortDescriptors];
&lt;/pre&gt;
&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2484637286305291771-997683221072657109?l=transoceanic.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/1k9VZ1lx8vjAOyEyQq9YAfnIe7k/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/1k9VZ1lx8vjAOyEyQq9YAfnIe7k/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/1k9VZ1lx8vjAOyEyQq9YAfnIe7k/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/1k9VZ1lx8vjAOyEyQq9YAfnIe7k/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/yBrpr/~4/FjmqMq29fYk" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://transoceanic.blogspot.com/feeds/997683221072657109/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://transoceanic.blogspot.com/2011/10/objective-c-sort-array-of-objects.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2484637286305291771/posts/default/997683221072657109?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2484637286305291771/posts/default/997683221072657109?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/yBrpr/~3/FjmqMq29fYk/objective-c-sort-array-of-objects.html" title="Objective C: Sort array of objects" /><author><name>transoceanic</name><uri>http://www.blogger.com/profile/07533121345262806709</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://transoceanic.blogspot.com/2011/10/objective-c-sort-array-of-objects.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0QAQ306cCp7ImA9WhdaGUs.&quot;"><id>tag:blogger.com,1999:blog-2484637286305291771.post-1762174724597549481</id><published>2011-10-11T05:54:00.000-07:00</published><updated>2011-10-30T00:55:42.318-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-30T00:55:42.318-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="UIWebVeiw" /><category scheme="http://www.blogger.com/atom/ns#" term="local notification" /><category scheme="http://www.blogger.com/atom/ns#" term="iPhone" /><category scheme="http://www.blogger.com/atom/ns#" term="iPad" /><category scheme="http://www.blogger.com/atom/ns#" term="iOS" /><category scheme="http://www.blogger.com/atom/ns#" term="objective C" /><title>Objective C: Bring back user to your application during/after he End the Call</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;div&gt;
Sometime you need come back to application after phone call initiated by your own application.&lt;/div&gt;
&lt;div&gt;
Exist two options (each from them not 100% that do you want), but if no choice..&lt;br /&gt;
&lt;br /&gt;
&lt;ol style="text-align: left;"&gt;
&lt;li&gt;After starting phone call you getting local notification alert with two option&lt;/li&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;Cancel (stay on call screen)&lt;/li&gt;
&lt;li&gt;Return (back to application during your call)&lt;/li&gt;
&lt;a href="http://3.bp.blogspot.com/-XvEQKyIhjw8/TpQ5t0WPyrI/AAAAAAAAA2Y/AfV43CWR5Yw/s1600/photo.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://3.bp.blogspot.com/-XvEQKyIhjw8/TpQ5t0WPyrI/AAAAAAAAA2Y/AfV43CWR5Yw/s320/photo.PNG" width="213" /&gt;&lt;/a&gt;&lt;/ul&gt;
&lt;pre class="brush:cpp"&gt;NSURL *phoneSchemaURL = [NSURL URLWithString:@"tel://123456789"];
 
[[UIApplication sharedApplication] openURL:phoneSchemaURL];

UILocalNotification *localNotification = [[UILocalNotification alloc] init];
if (localNotification != nil) {
 NSDate *notificationDate = [[NSDate alloc] initWithTimeIntervalSinceNow: 3];
  
 localNotification.fireDate = notificationDate;
 [notificationDate release];
  
 localNotification.alertBody = @"Stay in app";
 localNotification.alertAction = @"Return";
  
 localNotification.soundName = UILocalNotificationDefaultSoundName;
  
 [[UIApplication sharedApplication] scheduleLocalNotification:localNotification];
}
[localNotification release];
&lt;/pre&gt;
&lt;li&gt;After ending phone call your application retrieve focus.
&lt;pre class="brush:cpp"&gt;NSURL *phoneSchemaURL = [NSURL URLWithString:@"tel://123456789"];
 
 NSString *osVersion = [[UIDevice currentDevice] systemVersion];
 
if([osVersion compare: @"3.1" options: NSNumericSearch] &amp;gt;= NSOrderedSame ) {
 UIWebView *webview = [[UIWebView alloc] initWithFrame:[UIScreen mainScreen].applicationFrame];
 //or if you just want to call and back to application
 //UIWebView *webview = [[UIWebView alloc] init];

 [webview loadRequest:[NSURLRequest requestWithURL:phoneSchemaURL]];
  
 //if you just want to call and back to application remark code&amp;nbsp;below, but don't forget release webview&lt;/pre&gt;
&lt;pre class="brush:cpp"&gt; [self.view addSubview:webview];
 [webview release];
} else {
 // On 3.0 and below, dial as usual
 [[UIApplication sharedApplication] openURL: phoneSchemaURL];          
}
&lt;/pre&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2484637286305291771-1762174724597549481?l=transoceanic.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/kdk9kx4W2X0mJMgsWiWhtglFuIM/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/kdk9kx4W2X0mJMgsWiWhtglFuIM/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/kdk9kx4W2X0mJMgsWiWhtglFuIM/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/kdk9kx4W2X0mJMgsWiWhtglFuIM/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/yBrpr/~4/VH9GHOKrbCA" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://transoceanic.blogspot.com/feeds/1762174724597549481/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://transoceanic.blogspot.com/2011/10/objective-c-user-back-to-your.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2484637286305291771/posts/default/1762174724597549481?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2484637286305291771/posts/default/1762174724597549481?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/yBrpr/~3/VH9GHOKrbCA/objective-c-user-back-to-your.html" title="Objective C: Bring back user to your application during/after he End the Call" /><author><name>transoceanic</name><uri>http://www.blogger.com/profile/07533121345262806709</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-XvEQKyIhjw8/TpQ5t0WPyrI/AAAAAAAAA2Y/AfV43CWR5Yw/s72-c/photo.PNG" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://transoceanic.blogspot.com/2011/10/objective-c-user-back-to-your.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEQHSXgzfSp7ImA9WhdUFUg.&quot;"><id>tag:blogger.com,1999:blog-2484637286305291771.post-2496159413392529165</id><published>2011-10-02T03:45:00.000-07:00</published><updated>2011-10-02T03:45:38.685-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-02T03:45:38.685-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="http" /><category scheme="http://www.blogger.com/atom/ns#" term="authorization" /><category scheme="http://www.blogger.com/atom/ns#" term="iPhone" /><category scheme="http://www.blogger.com/atom/ns#" term="iPad" /><category scheme="http://www.blogger.com/atom/ns#" term="objective C" /><title>Objective C: Basic HTTP Authorization</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;&amp;nbsp;First version of "Authorization":&lt;br /&gt;
&lt;pre class="brush:cpp"&gt;NSString *loginString = [NSString stringWithFormat:@"%@:%@", [self userName], [self password]];
NSString *encodedLoginData = [Base64 encode:[loginString dataUsingEncoding:NSUTF8StringEncoding]];  
NSString *base64LoginData = [NSString stringWithFormat:@"Basic %@",encodedLoginData];

NSURL *url=[NSURL URLWithString:@"http://my_url.com"];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url cachePolicy:NSURLRequestReloadIgnoringLocalAndRemoteCacheData
                timeoutInterval:10.0];

[request setHTTPMethod:@"POST"];

[request setValue:base64LoginData forHTTPHeaderField:@"Authorization"];

NSURLConnection *urlConnection = [[NSURLConnection alloc] initWithRequest:request delegate:self];
&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;Second version of "Authorization":&lt;br /&gt;
&lt;pre class="brush:cpp"&gt;NSURL *URL = [NSURL URLWithString:url];
NSURLRequest *request = [NSURLRequest requestWithURL:URL
                                         cachePolicy:NSURLRequestUseProtocolCachePolicy
                                     timeoutInterval:10.0];

NSURLConnection *connection = [[NSURLConnection alloc] initWithRequest:request delegate:self];
&lt;/pre&gt;
NSURLConnection Delegates&lt;br /&gt;
&lt;pre class="brush:cpp"&gt;- (void)connection:(NSURLConnection *)connection didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge {
    if ([challenge previousFailureCount] == 0) {
        NSLog(@"received authentication challenge");
        NSURLCredential *newCredential = [NSURLCredential credentialWithUser:@"USER"
                                                                    password:@"PASSWORD"
                                                                 persistence:NSURLCredentialPersistenceForSession];
        NSLog(@"credential created");
        [[challenge sender] useCredential:newCredential forAuthenticationChallenge:challenge];
        NSLog(@"responded to authentication challenge");    
    }
    else {
        NSLog(@"previous authentication failure");
    }
}
&lt;/pre&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2484637286305291771-2496159413392529165?l=transoceanic.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/QkyM3bqkKLqmh9Hsgq0JIfU4eTc/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/QkyM3bqkKLqmh9Hsgq0JIfU4eTc/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/QkyM3bqkKLqmh9Hsgq0JIfU4eTc/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/QkyM3bqkKLqmh9Hsgq0JIfU4eTc/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/yBrpr/~4/CS6oS0Olk54" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://transoceanic.blogspot.com/feeds/2496159413392529165/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://transoceanic.blogspot.com/2011/10/objective-c-basic-http-authorization.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2484637286305291771/posts/default/2496159413392529165?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2484637286305291771/posts/default/2496159413392529165?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/yBrpr/~3/CS6oS0Olk54/objective-c-basic-http-authorization.html" title="Objective C: Basic HTTP Authorization" /><author><name>transoceanic</name><uri>http://www.blogger.com/profile/07533121345262806709</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://transoceanic.blogspot.com/2011/10/objective-c-basic-http-authorization.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkYBQX8yeip7ImA9WhRSF0Q.&quot;"><id>tag:blogger.com,1999:blog-2484637286305291771.post-9068081453064503343</id><published>2011-09-18T23:35:00.001-07:00</published><updated>2011-11-20T03:55:50.192-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-20T03:55:50.192-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="iPhone" /><category scheme="http://www.blogger.com/atom/ns#" term="iPad" /><category scheme="http://www.blogger.com/atom/ns#" term="objective C" /><title>Objective C: Change title of back button in navigation bar</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
You need change title of the back button from view controller which call to next view controller:
&lt;pre class="brush:cpp"&gt;
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
    if (self.detailsViewController == nil) {
        self.detailsViewController = [[DetailsViewController alloc] initWithNibName:@"DetailsViewController" bundle:nil];
 }
 
 [self.navigationController pushViewController:detailsViewController animated:YES];
 
 [tableView deselectRowAtIndexPath:indexPath animated:YES];
}

- (void)viewDidLoad {
 self.title = NSLocalizedString(@"root_tab_title_0", @"My Title");

 //Set title for back button to this controller
 self.navigationItem.backBarButtonItem =
  [[[UIBarButtonItem alloc] initWithTitle:@"My back button"
      style:UIBarButtonItemStyleBordered
      target:nil
      action:nil] autorelease];
}

&lt;/pre&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2484637286305291771-9068081453064503343?l=transoceanic.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/e6I3mu7Ou2ywtdmDF1Xkx5XPP_w/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/e6I3mu7Ou2ywtdmDF1Xkx5XPP_w/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/e6I3mu7Ou2ywtdmDF1Xkx5XPP_w/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/e6I3mu7Ou2ywtdmDF1Xkx5XPP_w/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/yBrpr/~4/gAopB3-1-VA" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://transoceanic.blogspot.com/feeds/9068081453064503343/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://transoceanic.blogspot.com/2011/09/objective-c-change-title-of-back-button.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2484637286305291771/posts/default/9068081453064503343?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2484637286305291771/posts/default/9068081453064503343?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/yBrpr/~3/gAopB3-1-VA/objective-c-change-title-of-back-button.html" title="Objective C: Change title of back button in navigation bar" /><author><name>transoceanic</name><uri>http://www.blogger.com/profile/07533121345262806709</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://transoceanic.blogspot.com/2011/09/objective-c-change-title-of-back-button.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DU8CRH06eip7ImA9WhRSGEs.&quot;"><id>tag:blogger.com,1999:blog-2484637286305291771.post-7365042402619972120</id><published>2011-09-18T23:31:00.001-07:00</published><updated>2011-11-21T01:31:05.312-08:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-11-21T01:31:05.312-08:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="iPhone" /><category scheme="http://www.blogger.com/atom/ns#" term="iPad" /><category scheme="http://www.blogger.com/atom/ns#" term="UINavigationBar" /><category scheme="http://www.blogger.com/atom/ns#" term="objective C" /><title>Objective C: Change title font in navigation bar</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
&lt;pre class="brush:cpp"&gt;UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 320, 30)];
label.textAlignment = UITextAlignmentCenter;
label.adjustsFontSizeToFitWidth = YES;
label.minimumFontSize = 10.0;
[label setFont:[UIFont boldSystemFontOfSize:16.0]];
[label setBackgroundColor:[UIColor clearColor]];
[label setTextColor:[UIColor whiteColor]];
[label setText:@"My Favorite Title"];

[self.navigationItem setTitleView:label];
[label release];

&lt;/pre&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2484637286305291771-7365042402619972120?l=transoceanic.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/uBfbWlyRPGAjwQPrWaJzs1O7XRw/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/uBfbWlyRPGAjwQPrWaJzs1O7XRw/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/uBfbWlyRPGAjwQPrWaJzs1O7XRw/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/uBfbWlyRPGAjwQPrWaJzs1O7XRw/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/yBrpr/~4/l-D7Eqgp1LM" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://transoceanic.blogspot.com/feeds/7365042402619972120/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://transoceanic.blogspot.com/2011/09/objective-c-change-title-font-in.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2484637286305291771/posts/default/7365042402619972120?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2484637286305291771/posts/default/7365042402619972120?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/yBrpr/~3/l-D7Eqgp1LM/objective-c-change-title-font-in.html" title="Objective C: Change title font in navigation bar" /><author><name>transoceanic</name><uri>http://www.blogger.com/profile/07533121345262806709</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://transoceanic.blogspot.com/2011/09/objective-c-change-title-font-in.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0QMRH08eyp7ImA9WhdVEEU.&quot;"><id>tag:blogger.com,1999:blog-2484637286305291771.post-2102047797018978117</id><published>2011-09-15T05:23:00.000-07:00</published><updated>2011-09-15T05:23:05.373-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-15T05:23:05.373-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="ObjectiveC categories" /><category scheme="http://www.blogger.com/atom/ns#" term="json" /><category scheme="http://www.blogger.com/atom/ns#" term="static library" /><category scheme="http://www.blogger.com/atom/ns#" term="xCode" /><category scheme="http://www.blogger.com/atom/ns#" term="objective C" /><title>Xcode: include ObjectiveC categories int static library</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;If you need to include&amp;nbsp;ObjectiveC categories or other framework using ObjectiveC categories&amp;nbsp;( for example JSON framework ) into your own static library you probably get&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style="font: 11.0px Menlo; margin: 0.0px 0.0px 0.0px 28.0px; text-indent: -28.0px;"&gt;&lt;b&gt;-[__NSCFDictionary JSONRepresentation]: unrecognized selector sent to instance&lt;/b&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
In your project that using your static library you need to set in Project Settings for "Other Linker Flags" property two additional flags:&lt;br /&gt;
&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Menlo; font-size: 11px;"&gt;&lt;b&gt;-ObjC&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: Menlo; font-size: 11px;"&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;b&gt;-all_load&lt;/b&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2484637286305291771-2102047797018978117?l=transoceanic.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/mkQW4mgMoVlgphK2Lnz-3bqWtI0/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/mkQW4mgMoVlgphK2Lnz-3bqWtI0/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/mkQW4mgMoVlgphK2Lnz-3bqWtI0/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/mkQW4mgMoVlgphK2Lnz-3bqWtI0/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/yBrpr/~4/Pt17F43GxRE" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://transoceanic.blogspot.com/feeds/2102047797018978117/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://transoceanic.blogspot.com/2011/09/xcode-include-objectivec-categories-int.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2484637286305291771/posts/default/2102047797018978117?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2484637286305291771/posts/default/2102047797018978117?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/yBrpr/~3/Pt17F43GxRE/xcode-include-objectivec-categories-int.html" title="Xcode: include ObjectiveC categories int static library" /><author><name>transoceanic</name><uri>http://www.blogger.com/profile/07533121345262806709</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://transoceanic.blogspot.com/2011/09/xcode-include-objectivec-categories-int.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0IBRXwyeSp7ImA9WhdWFEs.&quot;"><id>tag:blogger.com,1999:blog-2484637286305291771.post-6415087688415258302</id><published>2011-09-08T00:05:00.000-07:00</published><updated>2011-09-08T00:05:54.291-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-08T00:05:54.291-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="merge" /><category scheme="http://www.blogger.com/atom/ns#" term="image" /><category scheme="http://www.blogger.com/atom/ns#" term="iPhone" /><category scheme="http://www.blogger.com/atom/ns#" term="iPad" /><category scheme="http://www.blogger.com/atom/ns#" term="objective C" /><title>Objective C: Merge two images</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;pre class="brush:cpp"&gt;+ (UIImage*)mergeImage:(UIImage*)first withImage:(UIImage*)second
{
 // get size of the first image
 CGImageRef firstImageRef = first.CGImage;
 CGFloat firstWidth = CGImageGetWidth(firstImageRef);
 CGFloat firstHeight = CGImageGetHeight(firstImageRef);
 
 // get size of the second image
 CGImageRef secondImageRef = second.CGImage;
 CGFloat secondWidth = CGImageGetWidth(secondImageRef);
 CGFloat secondHeight = CGImageGetHeight(secondImageRef);
 
 // build merged size
 CGSize mergedSize = CGSizeMake(MAX(firstWidth, secondWidth), MAX(firstHeight, secondHeight));
 
 // capture image context ref
 UIGraphicsBeginImageContext(mergedSize);
 
 //Draw images onto the context
 [first drawInRect:CGRectMake(0, 0, firstWidth, firstHeight)];
 [second drawInRect:CGRectMake(0, 0, secondWidth, secondHeight)]; 
 
 // assign context to new UIImage
 UIImage *newImage = UIGraphicsGetImageFromCurrentImageContext();
 
 // end context
 UIGraphicsEndImageContext();

 return newImage;
}
&lt;/pre&gt;&lt;br /&gt;
If you want to&amp;nbsp;resize&amp;nbsp;new image to new&amp;nbsp;desired size use function from &lt;a href="http://transoceanic.blogspot.com/2011/09/objective-c-resize-image.html"&gt;previous post&lt;/a&gt;.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2484637286305291771-6415087688415258302?l=transoceanic.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/BCovwR7D-N6T1wSHpX1rKPkGk3Q/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/BCovwR7D-N6T1wSHpX1rKPkGk3Q/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/BCovwR7D-N6T1wSHpX1rKPkGk3Q/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/BCovwR7D-N6T1wSHpX1rKPkGk3Q/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/yBrpr/~4/CdtjGHC8VcA" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://transoceanic.blogspot.com/feeds/6415087688415258302/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://transoceanic.blogspot.com/2011/09/objective-c-merge-two-images.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2484637286305291771/posts/default/6415087688415258302?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2484637286305291771/posts/default/6415087688415258302?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/yBrpr/~3/CdtjGHC8VcA/objective-c-merge-two-images.html" title="Objective C: Merge two images" /><author><name>transoceanic</name><uri>http://www.blogger.com/profile/07533121345262806709</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://transoceanic.blogspot.com/2011/09/objective-c-merge-two-images.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkMNRXcycSp7ImA9WhdWFE0.&quot;"><id>tag:blogger.com,1999:blog-2484637286305291771.post-2656621504937617334</id><published>2011-09-07T08:14:00.000-07:00</published><updated>2011-09-07T08:14:54.999-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-07T08:14:54.999-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="image" /><category scheme="http://www.blogger.com/atom/ns#" term="iPhone" /><category scheme="http://www.blogger.com/atom/ns#" term="iPad" /><category scheme="http://www.blogger.com/atom/ns#" term="objective C" /><title>Objective C: Resize image</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;pre class="brush:cpp"&gt;+ (UIImage*)resizeImageWithImage:(UIImage*)image toSize:(CGSize)newSize
{
    // Create a graphics image context
    UIGraphicsBeginImageContext(newSize);
 
    // draw in new context, with the new size
    [image drawInRect:CGRectMake(0, 0, newSize.width, newSize.height)];
 
    // Get the new image from the context
    UIImage* newImage = UIGraphicsGetImageFromCurrentImageContext();
 
    // End the context
    UIGraphicsEndImageContext();
 
    return newImage;
}
&lt;/pre&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2484637286305291771-2656621504937617334?l=transoceanic.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/crCbQJIRzycaXnXW6K4p3Kaoc8Y/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/crCbQJIRzycaXnXW6K4p3Kaoc8Y/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/crCbQJIRzycaXnXW6K4p3Kaoc8Y/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/crCbQJIRzycaXnXW6K4p3Kaoc8Y/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/yBrpr/~4/UKQqrlYmmMA" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://transoceanic.blogspot.com/feeds/2656621504937617334/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://transoceanic.blogspot.com/2011/09/objective-c-resize-image.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2484637286305291771/posts/default/2656621504937617334?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2484637286305291771/posts/default/2656621504937617334?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/yBrpr/~3/UKQqrlYmmMA/objective-c-resize-image.html" title="Objective C: Resize image" /><author><name>transoceanic</name><uri>http://www.blogger.com/profile/07533121345262806709</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://transoceanic.blogspot.com/2011/09/objective-c-resize-image.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C08NRHk6fSp7ImA9WhdWE0U.&quot;"><id>tag:blogger.com,1999:blog-2484637286305291771.post-2464622948703495901</id><published>2011-09-07T00:50:00.000-07:00</published><updated>2011-09-07T00:51:35.715-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-07T00:51:35.715-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="exception" /><category scheme="http://www.blogger.com/atom/ns#" term="emulator" /><category scheme="http://www.blogger.com/atom/ns#" term="android" /><title>Android Emulator: invalid command-line parameter exception.</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;The default installation location is:&lt;b&gt;&lt;i&gt; C:\Program Files\Android\android-sdk.&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
If you&amp;nbsp;set&amp;nbsp;&lt;b&gt;&lt;i&gt;C:\Program Files\Android\android-sdk&lt;/i&gt;&lt;/b&gt;&amp;nbsp;as SDK Location (&lt;b&gt;Window&amp;nbsp;&lt;/b&gt;-&amp;gt;&amp;nbsp;&lt;b&gt;Preferences&amp;nbsp;&lt;/b&gt;-&amp;gt;&amp;nbsp;&lt;b&gt;Android&lt;/b&gt;) and&amp;nbsp;try to run android application from Eclipse&amp;nbsp;most likely you'll get an error:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span class="Apple-style-span" style="background-color: #f3f3f3;"&gt;&lt;span class="Apple-style-span" style="color: red; font-family: 'Courier New', Courier, monospace;"&gt;[Emulator] invalid command-line parameter: Files\Android\android-sdk\tools/emulator-arm.exe.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="background-color: #f3f3f3;"&gt;&lt;span class="Apple-style-span" style="color: red; font-family: 'Courier New', Courier, monospace;"&gt;[Emulator] Hint: use '@foo' to launch a virtual device named 'foo'.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="background-color: #f3f3f3;"&gt;&lt;span class="Apple-style-span" style="color: red; font-family: 'Courier New', Courier, monospace;"&gt;[Emulator] please use -help for more information&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;In my opinion, this is because of space in &lt;i style="font-weight: bold;"&gt;Program Files&lt;/i&gt;,&lt;br /&gt;
so set&amp;nbsp;SDK Location&amp;nbsp;for 32-bit Windows&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;C:\PROGRA~1\Android\android-sdk&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;and for 64-bit Windows&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;C:\PROGRA~2\Android\android-sdk&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2484637286305291771-2464622948703495901?l=transoceanic.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/OSeQeP5aTbIkUR9nhpk1vBT78vE/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/OSeQeP5aTbIkUR9nhpk1vBT78vE/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/OSeQeP5aTbIkUR9nhpk1vBT78vE/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/OSeQeP5aTbIkUR9nhpk1vBT78vE/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/yBrpr/~4/Vscb6AnlUr0" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://transoceanic.blogspot.com/feeds/2464622948703495901/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://transoceanic.blogspot.com/2011/09/android-emulator-invalid-command-line.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2484637286305291771/posts/default/2464622948703495901?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2484637286305291771/posts/default/2464622948703495901?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/yBrpr/~3/Vscb6AnlUr0/android-emulator-invalid-command-line.html" title="Android Emulator: invalid command-line parameter exception." /><author><name>transoceanic</name><uri>http://www.blogger.com/profile/07533121345262806709</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://transoceanic.blogspot.com/2011/09/android-emulator-invalid-command-line.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0cEQHs9fyp7ImA9WhdWEkw.&quot;"><id>tag:blogger.com,1999:blog-2484637286305291771.post-7857667846904231595</id><published>2011-09-05T01:58:00.000-07:00</published><updated>2011-09-05T03:36:41.567-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-05T03:36:41.567-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="windows phone 7" /><category scheme="http://www.blogger.com/atom/ns#" term="post data" /><category scheme="http://www.blogger.com/atom/ns#" term="wp7" /><category scheme="http://www.blogger.com/atom/ns#" term="send post data" /><title>WP7: Sending "POST" data and receive response</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Let's send "POST" data from our Windows Phone and get response.&lt;br /&gt;
&lt;div&gt;&lt;ol style="text-align: left;"&gt;&lt;li&gt;Create Windows Phone Application named "SendPOSTdata".&lt;/li&gt;
&lt;li&gt;In MainPage.xaml.cs include some "using":&lt;br /&gt;
&lt;pre class="brush:csharp"&gt;using System;
using System.IO;
using System.Text;
using System.Diagnostics;
using System.Net;
using System.Windows;
using Microsoft.Phone.Controls;
&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;Create loaded event handler:&lt;br /&gt;
&lt;pre class="brush:csharp"&gt;using System;
public MainPage()
{
    InitializeComponent();

    Loaded += new RoutedEventHandler(MainPage_Loaded);
}

void MainPage_Loaded(object sender, RoutedEventArgs e)
{
    System.Uri myUri = new System.Uri("http://myPageUrlAddress.com/");
    HttpWebRequest myRequest = (HttpWebRequest)HttpWebRequest.Create(myUri);
    textRequest.Method = "POST";
    textRequest.ContentType = "application/x-www-form-urlencoded";
    textRequest.BeginGetRequestStream(new AsyncCallback(GetRequestStreamCallback),myRequest);
}
&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;Now we need create our "POST" data stream:&lt;br /&gt;
&lt;pre class="brush:csharp"&gt;void GetRequestStreamCallback(IAsyncResult callbackResult)
{
    HttpWebRequest myRequest = (HttpWebRequest)callbackResult.AsyncState;
    // End the stream request operation
    Stream postStream = myRequest.EndGetRequestStream(callbackResult);

    // Create the post data
    string postData = "param1=value1&amp;amp;param2=value2";
    byte[] byteArray = Encoding.UTF8.GetBytes(postData);

    // Add the post data to the web request
    postStream.Write(byteArray, 0, byteArray.Length);
    postStream.Close();

    // Start the web request
    myRequest.BeginGetResponse(new AsyncCallback(GetResponsetStreamCallback), myRequest);
}
&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;And at the end receive response:&lt;br /&gt;
&lt;pre class="brush:csharp"&gt;void GetResponsetStreamCallback(IAsyncResult callbackResult)
{
    HttpWebRequest request = (HttpWebRequest)callbackResult.AsyncState;
    HttpWebResponse response = (HttpWebResponse)request.EndGetResponse(callbackResult);
    using (StreamReader httpWebStreamReader = new StreamReader(response.GetResponseStream()))
    {
        string result = httpWebStreamReader.ReadToEnd();
        //For debug: show results
        Debug.WriteLine(result);
    }
}
&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;Run.&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2484637286305291771-7857667846904231595?l=transoceanic.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/fIx5RAfgFnbSdAAU7DkbDL1ngh8/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/fIx5RAfgFnbSdAAU7DkbDL1ngh8/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/fIx5RAfgFnbSdAAU7DkbDL1ngh8/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/fIx5RAfgFnbSdAAU7DkbDL1ngh8/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/yBrpr/~4/ofbsaaaDLSw" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://transoceanic.blogspot.com/feeds/7857667846904231595/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://transoceanic.blogspot.com/2011/09/wp7-sending-post-data-and-receive.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2484637286305291771/posts/default/7857667846904231595?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2484637286305291771/posts/default/7857667846904231595?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/yBrpr/~3/ofbsaaaDLSw/wp7-sending-post-data-and-receive.html" title="WP7: Sending &quot;POST&quot; data and receive response" /><author><name>transoceanic</name><uri>http://www.blogger.com/profile/07533121345262806709</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://transoceanic.blogspot.com/2011/09/wp7-sending-post-data-and-receive.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUQASHs-cCp7ImA9WhdWEU8.&quot;"><id>tag:blogger.com,1999:blog-2484637286305291771.post-2638133199380415318</id><published>2011-08-21T06:58:00.000-07:00</published><updated>2011-09-04T02:09:09.558-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-04T02:09:09.558-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="windows phone 7" /><category scheme="http://www.blogger.com/atom/ns#" term="DatePicker programmatically" /><category scheme="http://www.blogger.com/atom/ns#" term="DatePicker control" /><category scheme="http://www.blogger.com/atom/ns#" term="Date Picker" /><category scheme="http://www.blogger.com/atom/ns#" term="Silverlight DatePicker" /><category scheme="http://www.blogger.com/atom/ns#" term="localize DatePicker" /><category scheme="http://www.blogger.com/atom/ns#" term="wp7" /><category scheme="http://www.blogger.com/atom/ns#" term="DatePicker" /><category scheme="http://www.blogger.com/atom/ns#" term="localization" /><title>WP7: How to Localize you DatePicker</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;Create your DatePicker application described in this &lt;a href="http://transoceanic.blogspot.com/2011/08/wp7-create-datepicker-control.html"&gt;article&lt;/a&gt; or your own application.&lt;/li&gt;
&lt;li&gt;Insert in MainPage.xaml.cs&lt;br /&gt;
&lt;pre class="brush:csharp"&gt;using System.Globalization;
using System.Threading;
&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class="Apple-style-span" style="font-family: 'Segoe UI', Verdana, Arial; font-size: 14px;"&gt;Windows&amp;nbsp;Phone supports the display languages you may find &lt;a href="http://msdn.microsoft.com/en-us/library/hh202918(v=vs.92).aspx" target="_blank"&gt;here&lt;/a&gt;&lt;/span&gt; &lt;/li&gt;
&lt;li&gt;Next code fragment do all you need (of course you must choose "&lt;span class="Apple-style-span" style="background-color: #e5e5e5; font-family: 'Segoe UI', Verdana, Arial; font-size: 15px;"&gt;Culture code&lt;/span&gt;" you need):&lt;br /&gt;
&lt;pre class="brush:csharp"&gt;public MainPage()
{
    CultureInfo newCulture = new CultureInfo("en-GB");
    Thread.CurrentThread.CurrentCulture = newCulture;
    Thread.CurrentThread.CurrentUICulture = newCulture;

    ...
}
&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;But if your language not supported by windows phone?&lt;br /&gt;
&lt;pre class="brush:csharp"&gt;public MainPage()
{
    CultureInfo newCulture = new CultureInfo("en-GB");

    //change format of DatePicker to you own format
    newCulture.DateTimeFormat.ShortDatePattern = "d/MMM/yyyy";

    //set day names
    newCulture.DateTimeFormat.DayNames = new string[] { "first day", 
                                                        "second day", 
                                                        "third day", 
                                                        "4 day", 
                                                        "5 day", 
                                                        "6 day", 
                                                        "7 day" };

    //set month names
    newCulture.DateTimeFormat.MonthNames = new string[] {"1 month", 
                                                         "2 month", 
                                                         "3 month", 
                                                         "4 month", 
                                                         "5 month", 
                                                         "6 month", 
                                                         "7 month", 
                                                         "8 month", 
                                                         "9 month", 
                                                         "10 month", 
                                                         "11 month", 
                                                         "12 month", 
                                                         ""};

    Thread.CurrentThread.CurrentCulture = newCulture;
    Thread.CurrentThread.CurrentUICulture = newCulture;

    ...
}
&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;Enjoy&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2484637286305291771-2638133199380415318?l=transoceanic.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/nRvShpDrUvGdsmK6as9xsWEfioo/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/nRvShpDrUvGdsmK6as9xsWEfioo/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/nRvShpDrUvGdsmK6as9xsWEfioo/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/nRvShpDrUvGdsmK6as9xsWEfioo/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/yBrpr/~4/vH1GgJhhDMQ" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://transoceanic.blogspot.com/feeds/2638133199380415318/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://transoceanic.blogspot.com/2011/08/wp7-how-to-localize-you-datepicker.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2484637286305291771/posts/default/2638133199380415318?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2484637286305291771/posts/default/2638133199380415318?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/yBrpr/~3/vH1GgJhhDMQ/wp7-how-to-localize-you-datepicker.html" title="WP7: How to Localize you DatePicker" /><author><name>transoceanic</name><uri>http://www.blogger.com/profile/07533121345262806709</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://transoceanic.blogspot.com/2011/08/wp7-how-to-localize-you-datepicker.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUUNSXszfCp7ImA9WhdQFUs.&quot;"><id>tag:blogger.com,1999:blog-2484637286305291771.post-5206973680491251368</id><published>2011-08-16T23:39:00.000-07:00</published><updated>2011-08-16T23:41:38.584-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-08-16T23:41:38.584-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="JQuery plugin" /><category scheme="http://www.blogger.com/atom/ns#" term="ticker" /><category scheme="http://www.blogger.com/atom/ns#" term="Mouse Wheeling Ticker" /><category scheme="http://www.blogger.com/atom/ns#" term="scroller" /><title>SourceForge.net: Mouse Wheeling Ticker: SCM</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;a href="https://sourceforge.net/scm/?type=svn&amp;amp;group_id=337484#.Tktguv59US8.blogger"&gt;SourceForge.net: Mouse Wheeling Ticker: SCM&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://turboticker.sourceforge.net/" target="_blank"&gt;Mouse Wheeling Ticker&lt;/a&gt; - ticker to scroll any content (in any browser) without much action which does not load the CPU and allows the mouse wheel to scroll. Enjoy :)&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2484637286305291771-5206973680491251368?l=transoceanic.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/gdhjVfSQh6-e4aHNWnuJlQj3j2k/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/gdhjVfSQh6-e4aHNWnuJlQj3j2k/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/gdhjVfSQh6-e4aHNWnuJlQj3j2k/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/gdhjVfSQh6-e4aHNWnuJlQj3j2k/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/yBrpr/~4/KARUTn8SZxk" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://transoceanic.blogspot.com/feeds/5206973680491251368/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://transoceanic.blogspot.com/2011/08/sourceforgenet-mouse-wheeling-ticker.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2484637286305291771/posts/default/5206973680491251368?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2484637286305291771/posts/default/5206973680491251368?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/yBrpr/~3/KARUTn8SZxk/sourceforgenet-mouse-wheeling-ticker.html" title="SourceForge.net: Mouse Wheeling Ticker: SCM" /><author><name>transoceanic</name><uri>http://www.blogger.com/profile/07533121345262806709</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://transoceanic.blogspot.com/2011/08/sourceforgenet-mouse-wheeling-ticker.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0cGSXc6fyp7ImA9WhdWEkQ.&quot;"><id>tag:blogger.com,1999:blog-2484637286305291771.post-6551552623412944566</id><published>2011-08-15T03:25:00.000-07:00</published><updated>2011-09-05T23:37:08.917-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-09-05T23:37:08.917-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="windows phone 7" /><category scheme="http://www.blogger.com/atom/ns#" term="DatePicker programmatically" /><category scheme="http://www.blogger.com/atom/ns#" term="DatePicker control" /><category scheme="http://www.blogger.com/atom/ns#" term="Date Picker" /><category scheme="http://www.blogger.com/atom/ns#" term="Silverlight DatePicker" /><category scheme="http://www.blogger.com/atom/ns#" term="wp7" /><category scheme="http://www.blogger.com/atom/ns#" term="DatePicker" /><category scheme="http://www.blogger.com/atom/ns#" term="Silverlight Toolkit" /><title>WP7 - Create DatePicker control programmatically</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;If you need use DatePicker in your windows phone application you must create control field in xaml file. Or no...&lt;br /&gt;
Let's create DatePicker control programmatically without any code in xaml file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ol style="text-align: left;"&gt;&lt;li&gt;Install&amp;nbsp;&lt;a href="http://silverlight.codeplex.com/releases"&gt;Silverlight Toolkit&lt;/a&gt;&amp;nbsp;last version.&lt;/li&gt;
&lt;li&gt;Create new "Windows Phone Application" named "DatePickerControlProgrammatically".&lt;/li&gt;
&lt;li&gt;Adding new reference to Microsoft.Phone.Controls.Toolkit&lt;/li&gt;
&lt;ul&gt;&lt;li&gt;Main Menu -&amp;gt; Project -&amp;gt; Add Reference -&amp;gt; Tab ".NET" -&amp;gt; choose Microsoft.Phone.Controls.Toolkit.&lt;/li&gt;
&lt;li&gt;If you no find&amp;nbsp;Microsoft.Phone.Controls.Toolkit in ".NET" tab go to "Browse" tab and navigate to this dll in you computer (for me "C:\Program Files\Microsoft SDKs\Windows Phone\v7.0\Toolkit\Sep10\Bin\Microsoft.Phone.Controls.Toolkit.dll").&lt;/li&gt;
&lt;/ul&gt;&lt;li&gt;Create new folder in project "Toolkit.Content" and put inside two images for cancel and check control (you can get them in Silverlight Toolkit project or create you own icons):&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-CwhYwPhot50/Tkjo_UpkZbI/AAAAAAAAA2Q/Gtr16QWCei8/s1600/ScreenClip.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/-CwhYwPhot50/Tkjo_UpkZbI/AAAAAAAAA2Q/Gtr16QWCei8/s1600/ScreenClip.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;Don't forget change "Build Action" property for each image to "Content" from "Resource". &lt;/li&gt;
&lt;li&gt;Override DatePicker class with our custom DatePickerCustom class. Create new class "DatePickerCustom.cs":&lt;br /&gt;
&lt;pre class="brush:csharp"&gt;using System.Windows.Automation.Peers;
using System.Windows.Automation.Provider;
using System.Windows.Controls;
using Microsoft.Phone.Controls;  

namespace DatePickerControlProgrammatically
{
    public class DatePickerCustom : DatePicker
    {
        public void ClickTemplateButton()
        {
            Button btn = (GetTemplateChild("DateTimeButton") as Button);
            ButtonAutomationPeer peer = new ButtonAutomationPeer(btn);
            IInvokeProvider provider = (peer.GetPattern(PatternInterface.Invoke) as IInvokeProvider);

            provider.Invoke();
        }
    }
}
&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;MainPage.xaml.cs - create new DatePickerCustom on Loaded event: &lt;br /&gt;
&lt;pre class="brush:csharp"&gt;using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls;

namespace DatePickerControlProgrammatically
{
    public partial class MainPage : PhoneApplicationPage
    {
        private DatePickerCustom datePicker;

        // Constructor
        public MainPage()
        {
            InitializeComponent();

            Loaded += new RoutedEventHandler(MainPage_Loaded);
        }

        void MainPage_Loaded(object sender, RoutedEventArgs e)
        {
            // create datePicker programmatically
            if (this.datePicker == null)
            {
                this.datePicker = new DatePickerCustom();
                this.datePicker.IsTabStop = false;
                this.datePicker.MaxHeight = 0;

                this.datePicker.ValueChanged += new EventHandler&amp;lt;DateTimeValueChangedEventArgs&amp;gt;(datePicker_ValueChanged);

                LayoutRoot.Children.Add(this.datePicker);

            }
        }

        void datePicker_ValueChanged(object sender, DateTimeValueChangedEventArgs e)
        {
            // now we may use got value from datePicker
            PageTitle.Text = this.datePicker.ValueString;
        }
    }
}&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;For test add to MainPage.xaml two buttons - "Get Date" and "Clear Date": &lt;br /&gt;
&lt;pre class="brush:xml"&gt;&amp;lt;Button Content="Get Date" Height="72" HorizontalAlignment="Left" 
    Name="button1" VerticalAlignment="Top" 
    Width="160" Click="button1_Click"/&amp;gt;
&amp;lt;Button Content="Clear Date" Height="72" HorizontalAlignment="Right" 
    Name="button2" VerticalAlignment="Top" 
    Width="160" Click="button2_Click"/&amp;gt;
&lt;/pre&gt;&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;And to MainPage.xaml.cs add control for our buttons: &lt;br /&gt;
&lt;pre class="brush:csharp"&gt;private void button1_Click(object sender, RoutedEventArgs e)
{
    this.datePicker.ClickTemplateButton();
}

private void button2_Click(object sender, RoutedEventArgs e)
{
    PageTitle.Text = "Page Title";
    clearDatePicker();
}

void clearDatePicker()
{
    this.datePicker.ValueChanged -= new EventHandler&amp;lt;DateTimeValueChangedEventArgs&amp;gt;(datePicker_ValueChanged);

    //this.datePicker.Value = "8/16/2011";
    this.datePicker.Value = null;

    this.datePicker.ValueChanged += new EventHandler&amp;lt;DateTimeValueChangedEventArgs&amp;gt;(datePicker_ValueChanged);
}
&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;Run&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2484637286305291771-6551552623412944566?l=transoceanic.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/7XeKChTiIecfyALuxDSE9w0M2Hs/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/7XeKChTiIecfyALuxDSE9w0M2Hs/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/7XeKChTiIecfyALuxDSE9w0M2Hs/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/7XeKChTiIecfyALuxDSE9w0M2Hs/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/yBrpr/~4/Vc4EvaQIEnQ" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://transoceanic.blogspot.com/feeds/6551552623412944566/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://transoceanic.blogspot.com/2011/08/wp7-create-datepicker-control.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2484637286305291771/posts/default/6551552623412944566?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2484637286305291771/posts/default/6551552623412944566?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/yBrpr/~3/Vc4EvaQIEnQ/wp7-create-datepicker-control.html" title="WP7 - Create DatePicker control programmatically" /><author><name>transoceanic</name><uri>http://www.blogger.com/profile/07533121345262806709</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-CwhYwPhot50/Tkjo_UpkZbI/AAAAAAAAA2Q/Gtr16QWCei8/s72-c/ScreenClip.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://transoceanic.blogspot.com/2011/08/wp7-create-datepicker-control.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUYARX45eSp7ImA9WhdRF00.&quot;"><id>tag:blogger.com,1999:blog-2484637286305291771.post-8857055971606556714</id><published>2011-08-07T01:22:00.000-07:00</published><updated>2011-08-07T01:52:24.021-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-08-07T01:52:24.021-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="windows phone 7" /><category scheme="http://www.blogger.com/atom/ns#" term="zip file" /><category scheme="http://www.blogger.com/atom/ns#" term="unzip" /><category scheme="http://www.blogger.com/atom/ns#" term="download" /><category scheme="http://www.blogger.com/atom/ns#" term="wp7" /><category scheme="http://www.blogger.com/atom/ns#" term="SharpZipLib" /><category scheme="http://www.blogger.com/atom/ns#" term="file" /><category scheme="http://www.blogger.com/atom/ns#" term="IsolatedStorage" /><category scheme="http://www.blogger.com/atom/ns#" term="Visual Studio" /><title>WP7 - Download zip file, unzip and save to isolated storage</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;br /&gt;
&lt;ol style="text-align: left;"&gt;&lt;li&gt;Create New "Windows Phone Application".&lt;/li&gt;
&lt;li&gt;Download "Silverlight SharpZipLib" from&amp;nbsp;&lt;a href="http://slsharpziplib.codeplex.com/releases/view/50561"&gt;http://slsharpziplib.codeplex.com/releases/view/50561&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Unpack&amp;nbsp;"Silverlight SharpZipLib" and copy Bin/Release/SharpZipLib.WindowsPhone7.dll&lt;/li&gt;
&lt;li&gt;Create new folder "SharpZip" and past into copied SharpZipLib.WindowsPhone7.dll.&lt;/li&gt;
&lt;li&gt;Right click on project and "Add Reference...".&lt;/li&gt;
&lt;li&gt;Choose from "Browse" tab&amp;nbsp;SharpZipLib.WindowsPhone7.dll from your project location.&lt;/li&gt;
&lt;li&gt;Add to "MainPage.xaml.cs" (probably you need to remove "using System.Windows.Shapes" because conflict System.Windows.Shapes.Path vs System.IO.Path):&lt;br /&gt;
&lt;pre class="brush:csharp"&gt;using System.IO;
using System.IO.IsolatedStorage;
using ICSharpCode.SharpZipLib.Zip;
using ICSharpCode.SharpZipLib.Zip.Compression.Streams;
&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;Add code for download file from web: &lt;br /&gt;
&lt;pre class="brush:csharp"&gt;public MainPage()
{
    InitializeComponent();

    Loaded += new RoutedEventHandler(MainPage_Loaded);
}

void MainPage_Loaded(object sender, RoutedEventArgs e)
{
    System.Uri targetUri = new System.Uri("http://MyDomain/Archive.zip");
    HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(targetUri);
    //create asynchronous tast and declare callback to get data stream
    request.BeginGetResponse(new AsyncCallback(ReadWebRequestCallback), request);
}
&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;And add function "ReadWebRequestCallback" to unzip &amp;amp; save file we got:&lt;br /&gt;
&lt;pre class="brush:csharp"&gt;private void ReadWebRequestCallback(IAsyncResult callbackResult)
{
    HttpWebRequest myRequest = (HttpWebRequest)callbackResult.AsyncState;
    HttpWebResponse myResponse = (HttpWebResponse)myRequest.EndGetResponse(callbackResult);
    using (StreamReader httpwebStreamReader = new StreamReader(myResponse.GetResponseStream()))
    {
        //open isolated storage to save files
        using (IsolatedStorageFile isoStore = IsolatedStorageFile.GetUserStoreForApplication())
        {
            using (ZipInputStream s = new ZipInputStream(httpwebStreamReader.BaseStream))
            {
                ZipEntry theEntry;
                try
                {
                    while ((theEntry = s.GetNextEntry()) != null)
                    {
                        string directoryName = Path.GetDirectoryName(theEntry.Name);
                        string fileName = Path.GetFileName(theEntry.Name);

                        // create directory
                        if (directoryName.Length &amp;gt; 0)
                        {
                            Directory.CreateDirectory(directoryName);
                        }

                        if (fileName != String.Empty)
                        {
                            //save file to isolated storage
                            using (BinaryWriter streamWriter = 
                                    new BinaryWriter(new IsolatedStorageFileStream(theEntry.Name,
                                        FileMode.OpenOrCreate, FileAccess.Write, FileShare.Write, isoStore)))
                            {

                                int size = 2048;
                                byte[] data = new byte[2048];
                                while (true)
                                {
                                    size = s.Read(data, 0, data.Length);
                                    if (size &amp;gt; 0)
                                    {
                                        streamWriter.Write(data, 0, size);
                                    }
                                    else
                                    {
                                        break;
                                    }
                                }
                            }

                        }
                    }
                }
                catch (ZipException ze)
                {
                    Debug.WriteLine(ze.Message);
                }
            }
        }

    }
}
&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;&lt;br /&gt;
Run your application and enjoy.&lt;br /&gt;
&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2484637286305291771-8857055971606556714?l=transoceanic.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/NJTR3mr4wxJ401g-B08VQlDkGM4/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/NJTR3mr4wxJ401g-B08VQlDkGM4/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/NJTR3mr4wxJ401g-B08VQlDkGM4/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/NJTR3mr4wxJ401g-B08VQlDkGM4/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/yBrpr/~4/HnaodPFMsK0" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://transoceanic.blogspot.com/feeds/8857055971606556714/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://transoceanic.blogspot.com/2011/08/wp7-download-zip-file-unzip-and-save-to.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2484637286305291771/posts/default/8857055971606556714?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2484637286305291771/posts/default/8857055971606556714?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/yBrpr/~3/HnaodPFMsK0/wp7-download-zip-file-unzip-and-save-to.html" title="WP7 - Download zip file, unzip and save to isolated storage" /><author><name>transoceanic</name><uri>http://www.blogger.com/profile/07533121345262806709</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://transoceanic.blogspot.com/2011/08/wp7-download-zip-file-unzip-and-save-to.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEYNSH8-eyp7ImA9WhdQFEU.&quot;"><id>tag:blogger.com,1999:blog-2484637286305291771.post-8760080147460728107</id><published>2011-07-26T02:13:00.000-07:00</published><updated>2011-08-16T01:09:59.153-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-08-16T01:09:59.153-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="uncompress" /><category scheme="http://www.blogger.com/atom/ns#" term="unzip" /><category scheme="http://www.blogger.com/atom/ns#" term="iPhone" /><category scheme="http://www.blogger.com/atom/ns#" term="iPad" /><category scheme="http://www.blogger.com/atom/ns#" term="compress" /><category scheme="http://www.blogger.com/atom/ns#" term="iOS" /><category scheme="http://www.blogger.com/atom/ns#" term="zip" /><category scheme="http://www.blogger.com/atom/ns#" term="objective C" /><category scheme="http://www.blogger.com/atom/ns#" term="ZipArchive" /><title>Zip/Unzip files on iPhone/iPad/iOS</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;br /&gt;
&lt;ol style="text-align: left;"&gt;&lt;li&gt;Download ZipArchive from&amp;nbsp;&lt;a href="http://code.google.com/p/ziparchive/downloads/list"&gt;http://code.google.com/p/ziparchive/downloads/list&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Drag into project.&lt;/li&gt;
&lt;li&gt;Add to project existing framework libz.1.2.3.dylib (last version).&lt;/li&gt;
&lt;li&gt;Import to project:&lt;br /&gt;
&lt;pre class="brush: cpp"&gt;#import "ZipArchive.h"
&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;Uncompress zip file example:&lt;br /&gt;
&lt;pre class="brush: cpp"&gt;NSString *documentsDirectory = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0];

NSString *zipFilePath = [documentsDirectory stringByAppendingPathComponent:@"myZipFileName.zip"];

NSString *output = [documentsDirectory stringByAppendingPathComponent:@"unZipDirName"];

ZipArchive* za = [[ZipArchive alloc] init];

if( [za UnzipOpenFile:zipFilePath] ) {
    if( [za UnzipFileTo:output overWrite:YES] != NO ) {
        //unzip data success
        //do something
    }

    [za UnzipCloseFile];
}

[za release];
&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;Compress directory or file example:&lt;br /&gt;
&lt;pre class="brush: cpp"&gt;BOOL isDir=NO;

NSString *documentsDirectory = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0];

NSArray *subpaths;

NSString *toCompress = [NSString stringWithString:@"dirToZip_OR_fileNameToZip"];
NSString *pathToCompress = [documentsDirectory stringByAppendingPathComponent:toCompress];

NSFileManager *fileManager = [NSFileManager defaultManager]; 
if ([fileManager fileExistsAtPath:pathToCompress isDirectory:&amp;amp;isDir] &amp;amp;&amp;amp; isDir){
    subpaths = [fileManager subpathsAtPath:pathToCompress];
} else if ([fileManager fileExistsAtPath:pathToCompress]) {
    subpaths = [NSArray arrayWithObject:pathToCompress];
}

NSString *zipFilePath = [documentsDirectory stringByAppendingPathComponent:@"myZipFileName.zip"];
  
ZipArchive *za = [[ZipArchive alloc] init];
[za CreateZipFile2:zipFilePath];
if (isDir) {
    for(NSString *path in subpaths){  
        NSString *fullPath = [pathToCompress stringByAppendingPathComponent:path];
        if([fileManager fileExistsAtPath:fullPath isDirectory:&amp;amp;isDir] &amp;amp;&amp;amp; !isDir){
            [za addFileToZip:fullPath newname:path];  
        }
    }
} else {
    [za addFileToZip:pathToCompress newname:toCompress];
}

BOOL successCompressing = [archiver CloseZipFile2];

&lt;/pre&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2484637286305291771-8760080147460728107?l=transoceanic.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/jnUVfpKuRIoU3sbixm1IfI9ZIwE/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/jnUVfpKuRIoU3sbixm1IfI9ZIwE/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/jnUVfpKuRIoU3sbixm1IfI9ZIwE/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/jnUVfpKuRIoU3sbixm1IfI9ZIwE/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/yBrpr/~4/d_5g4vUrIcI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://transoceanic.blogspot.com/feeds/8760080147460728107/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://transoceanic.blogspot.com/2011/07/compressuncompress-files-on.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2484637286305291771/posts/default/8760080147460728107?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2484637286305291771/posts/default/8760080147460728107?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/yBrpr/~3/d_5g4vUrIcI/compressuncompress-files-on.html" title="Zip/Unzip files on iPhone/iPad/iOS" /><author><name>transoceanic</name><uri>http://www.blogger.com/profile/07533121345262806709</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://transoceanic.blogspot.com/2011/07/compressuncompress-files-on.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DU4FRnwzfCp7ImA9WhdUFUg.&quot;"><id>tag:blogger.com,1999:blog-2484637286305291771.post-7366613790494581043</id><published>2011-07-18T07:11:00.000-07:00</published><updated>2011-10-02T05:18:37.284-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-10-02T05:18:37.284-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="windows phone 7" /><category scheme="http://www.blogger.com/atom/ns#" term="wp7" /><category scheme="http://www.blogger.com/atom/ns#" term="IsolatedStorage" /><category scheme="http://www.blogger.com/atom/ns#" term="Visual Studio" /><category scheme="http://www.blogger.com/atom/ns#" term="embedded html" /><category scheme="http://www.blogger.com/atom/ns#" term="WebBrowser" /><title>WP7 - Load local HTML files and all related files (js, css) to WebBrowser</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;
Agenda : we have several files html, css, js interconnected and we would start our web application in WebBrowser.&lt;br /&gt;
0. Create new project "&lt;span class="Apple-style-span" style="font-family: monospace; white-space: pre;"&gt;SilverlightWebBrowser&lt;/span&gt;"&lt;br /&gt;
1. In the project navigator will create a new folder and name "HTML". &lt;br /&gt;
2. Copy all our files in that folder (if you want include image files don't forget change "Build Action" property of the images to "Content" from "Resource").&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-X7EwOWeK_T0/TiQ5gk0iKAI/AAAAAAAAA0M/Nsyj6B50Ugk/s1600/ScreenClip.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/-X7EwOWeK_T0/TiQ5gk0iKAI/AAAAAAAAA0M/Nsyj6B50Ugk/s1600/ScreenClip.png" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;br /&gt;&lt;/div&gt;
3. Add to MainPage.xaml code for show WebBrowser:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: xml;"&gt;&amp;lt;Grid x:Name="ContentPanel" Grid.Row="1" Margin="0,0,0,0"&amp;gt;
    &amp;lt;phone:WebBrowser IsScriptEnabled="True" Name="webBrowser1" Width="450" Height="548"/&amp;gt;
&amp;lt;/Grid&amp;gt;
&lt;/pre&gt;
&lt;br /&gt;
4. MainPage.xaml.cs&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: csharp;"&gt;#define DEBUG

using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.IO.IsolatedStorage;
using System.Linq;
using System.Net;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Resources;
using Microsoft.Phone.Controls;

namespace SilverlightWebBrowser
{
    public partial class MainPage : PhoneApplicationPage
    {
        // Constructor
        public MainPage()
        {
            InitializeComponent();

            SaveFilesInHTMLFolderToIsoStore();

            webBrowser1.Navigate(new Uri("HTML/Index.html", UriKind.Relative));

        }

        private static void SaveFilesInHTMLFolderToIsoStore()
        {
#if DEBUG
            // This deletes all existing files in IsolatedStorage - Useful in testing
            // In live should not do this, but only load files once - this speeds subsequent loading of the app
            using (IsolatedStorageFile isoStore = IsolatedStorageFile.GetUserStoreForApplication())
            {
                isoStore.Remove();
            }
#endif
            string[] files = AllFilesInHTMLFolder();

            using (IsolatedStorageFile isoStore = IsolatedStorageFile.GetUserStoreForApplication())
            {
                Debug.WriteLine("check for exist " + files[0]);
                if (!isoStore.FileExists(files[0]))
                {
                    foreach (string f in files)
                    {
                        Debug.WriteLine("copy to isolated storage " + f.ToString());
                        StreamResourceInfo sr = Application.GetResourceStream(new Uri(f, UriKind.Relative));

                        // T4 Template includes all files in source folder(s). This may include some which are not in the project
                        if (sr != null)
                        {
                            using (BinaryReader br = new BinaryReader(sr.Stream))
                            {
                                byte[] data = br.ReadBytes((int)sr.Stream.Length);
                                SaveFileToIsoStore(f, data);
                            }
                        }
                    }
                }
            }
        }

        private static void SaveFileToIsoStore(string fileName, byte[] data)
        {
            string strBaseDir = string.Empty;
            const string DelimStr = "/";
            char[] delimiter = DelimStr.ToCharArray();
            string[] dirsPath = fileName.Split(delimiter);

            // Get the IsoStore
            using (IsolatedStorageFile isoStore = IsolatedStorageFile.GetUserStoreForApplication())
            {
                // Recreate the directory structure
                for (int i = 0; i &amp;lt; dirsPath.Length - 1; i++)
                {
                    strBaseDir = Path.Combine(strBaseDir, dirsPath[i]);
                    isoStore.CreateDirectory(strBaseDir);
                }

                // Create the file if not exists
                // or override if exist
                using (BinaryWriter bw = new BinaryWriter(new IsolatedStorageFileStream(fileName,
                        FileMode.Create, FileAccess.Write, FileShare.Write, isoStore)))
                {
                    bw.Write(data);
                }
            }
        }



        //generated from MainPage.xaml.tt -&amp;gt; Run Custom Tool
        private static string[] AllFilesInHTMLFolder()
        {
            return new[] {
                           "HTML/index.css",
                           "HTML/Index.html",
                           "HTML/inner.js",
                        };
        }
    
    }
}
&lt;/pre&gt;
&lt;br /&gt;
5. And then run emulator&lt;br /&gt;
6. Now We see our page with our css and js&lt;br /&gt;
7. But if we don't know in advance a list of files or it's large enough that would get lost, you can use preprocessed text template.&lt;br /&gt;
&lt;br /&gt;
MainPage.xaml.tt&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: csharp;"&gt;&amp;lt;#@ template debug="false" hostspecific="true" language="C#" #&amp;gt;
&amp;lt;#@ output extension=".gen.cs" #&amp;gt;
&amp;lt;#@ import namespace="System.IO"#&amp;gt;
// &amp;lt;auto-generated /&amp;gt;
using Microsoft.Phone.Controls;

namespace SilverlightWebBrowser
{
    public partial class MainPage : PhoneApplicationPage
    {
        private static string[] AllFilesInHTMLFolder()
        {
            return new[] {
&amp;lt;#
            DirectoryInfo directoryInfo = new DirectoryInfo(Path.Combine(Path.GetDirectoryName(Host.TemplateFile), "HTML"));

            foreach(FileInfo file in directoryInfo.GetFiles("*.*", SearchOption.AllDirectories))
            {
    if (!file.FullName.Contains(@"\."))
    {#&amp;gt;
                           "&amp;lt;#= file.FullName.Substring(file.FullName.IndexOf("HTML")).Replace(@"\", "/") #&amp;gt;",
&amp;lt;#           }
   }
#&amp;gt;
                        };
        }
    }
}
&lt;/pre&gt;
&lt;br /&gt;
8. Copy file MainPage.xaml.tt into project&lt;br /&gt;
&amp;nbsp; &amp;nbsp; -&amp;gt; select file in navigation project&lt;br /&gt;
&amp;nbsp; &amp;nbsp; -&amp;gt; right click -&amp;gt; Run Custom Tools&lt;br /&gt;
&amp;nbsp; &amp;nbsp; -&amp;gt; open generated file MainPage.xaml.gen.cs&lt;br /&gt;
&amp;nbsp; &amp;nbsp; -&amp;gt; we see our function&amp;nbsp;AllFilesInHTMLFolder() with all exist files&lt;br /&gt;
&amp;nbsp; &amp;nbsp; -&amp;gt; if you want to see all code in one place as copy/paste to MainPage.xaml.cs and delete&amp;nbsp;MainPage.xaml.gen.cs. If no as go to 10.&lt;br /&gt;
10. It's all.&lt;/div&gt;
&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2484637286305291771-7366613790494581043?l=transoceanic.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/mV54wFoHyMK7voalBu8n8L9goFI/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/mV54wFoHyMK7voalBu8n8L9goFI/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/mV54wFoHyMK7voalBu8n8L9goFI/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/mV54wFoHyMK7voalBu8n8L9goFI/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/yBrpr/~4/FO1-7-RYoIs" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://transoceanic.blogspot.com/feeds/7366613790494581043/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://transoceanic.blogspot.com/2011/07/wp7-load-local-html-files-and-all.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2484637286305291771/posts/default/7366613790494581043?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2484637286305291771/posts/default/7366613790494581043?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/yBrpr/~3/FO1-7-RYoIs/wp7-load-local-html-files-and-all.html" title="WP7 - Load local HTML files and all related files (js, css) to WebBrowser" /><author><name>transoceanic</name><uri>http://www.blogger.com/profile/07533121345262806709</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-X7EwOWeK_T0/TiQ5gk0iKAI/AAAAAAAAA0M/Nsyj6B50Ugk/s72-c/ScreenClip.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://transoceanic.blogspot.com/2011/07/wp7-load-local-html-files-and-all.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkUHRno7cSp7ImA9WhdQFkg.&quot;"><id>tag:blogger.com,1999:blog-2484637286305291771.post-172522118717217174</id><published>2011-07-14T01:40:00.000-07:00</published><updated>2011-08-18T00:57:17.409-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-08-18T00:57:17.409-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="file" /><category scheme="http://www.blogger.com/atom/ns#" term="localization" /><category scheme="http://www.blogger.com/atom/ns#" term="iOS" /><category scheme="http://www.blogger.com/atom/ns#" term="xCode" /><category scheme="http://www.blogger.com/atom/ns#" term="lproj" /><title>How to create additional localization on your iOS app - Files (plist, ...)</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&amp;nbsp;1. Create a directory under project directory (in Finder) in format: language_region.lproj or language.lproj&lt;br /&gt;
&lt;br /&gt;
languages list:&amp;nbsp;&lt;a href="http://www.loc.gov/standards/iso639-2/php/code_list.php"&gt;ISO 639-2 Language Codes&lt;/a&gt;&lt;br /&gt;
regions list: &lt;a href="http://www.iso.org/iso/country_codes/iso_3166_code_lists/english_country_names_and_code_elements.htm"&gt;ISO - Maintenance Agency&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
2. Right click on "Resource" in xCode project.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Add -&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;New File -&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Choose "Other" from Mac OS X -&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Choose "Empty File" -&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Next&amp;nbsp;-&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;In "File Name" field change from "untitle" to "MyFileName.MyExtention" (usually &lt;b&gt;Localizable.strings&lt;/b&gt; or MyFileName.&lt;b&gt;plist&lt;/b&gt;) -&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;In "Location" field choose language_region.lproj folder you created&amp;nbsp;-&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Finish&lt;br /&gt;
&lt;br /&gt;
3. Fill file with content do you want (copy/paste or replace file in Finder)&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2484637286305291771-172522118717217174?l=transoceanic.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/Ie-slCZGsYmrUjMs3AIeL4h-gXk/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Ie-slCZGsYmrUjMs3AIeL4h-gXk/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/Ie-slCZGsYmrUjMs3AIeL4h-gXk/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/Ie-slCZGsYmrUjMs3AIeL4h-gXk/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/yBrpr/~4/MDI-zuZ85iI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://transoceanic.blogspot.com/feeds/172522118717217174/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://transoceanic.blogspot.com/2011/07/how-to-create-additional-localization.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2484637286305291771/posts/default/172522118717217174?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2484637286305291771/posts/default/172522118717217174?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/yBrpr/~3/MDI-zuZ85iI/how-to-create-additional-localization.html" title="How to create additional localization on your iOS app - Files (plist, ...)" /><author><name>transoceanic</name><uri>http://www.blogger.com/profile/07533121345262806709</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://transoceanic.blogspot.com/2011/07/how-to-create-additional-localization.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUcHQ387eSp7ImA9WhdTGUU.&quot;"><id>tag:blogger.com,1999:blog-2484637286305291771.post-4948435224031998117</id><published>2011-07-12T07:26:00.000-07:00</published><updated>2011-07-18T02:57:12.101-07:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2011-07-18T02:57:12.101-07:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="jquery" /><category scheme="http://www.blogger.com/atom/ns#" term="bind" /><category scheme="http://www.blogger.com/atom/ns#" term="prototype" /><title>jQuery Equivalent of Prototype Function.bind with the transfer of arguments</title><content type="html">&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;pre class="brush: jscript"&gt;MyClass = Class.create( {
...  
    displayFeeds: function(items){
        var ul = $('itemsList');
        for (var i = 0; i &amp;lt; items.length; i++) {
            var li = new Element('li');
            var text = new Element('a', {'href': '#'}).update(items[i].title);
            li.insert(text);
            ul.insert(li);
            text.observe('click', this.printDynamic.bind(this,items[i].link));
        }
    },

    localVar : "my class local variable",

    printDynamic: function(link){
        this.localVar = link;
    }
});
&lt;/pre&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-size: large;"&gt;We have JQuery full equivalent below&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="brush: jscript"&gt;MyClass = Class.create( {
...
    displayFeeds: function(items){
        var ul = $('#itemsList');
        for (var i = 0; i &amp;lt; items.length; i++) {
            var li = $("&amp;lt;li&amp;gt;&amp;lt;a href='#DetailsScreen'&amp;gt;"+items[i].title+"&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;");
            li.bind('click',{url:items[i].link}, $.proxy(this.printDynamic, this));
            li.appendTo( ul );
        }
    },
    localVar : "my class local variable",
    printDynamic: function(event){
        this.localVar = event.data.url;
    }
});
&lt;/pre&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2484637286305291771-4948435224031998117?l=transoceanic.blogspot.com' alt='' /&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://feedads.g.doubleclick.net/~a/-SQU4IyNcdLCEEU7kWGZqVEoxRg/0/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/-SQU4IyNcdLCEEU7kWGZqVEoxRg/0/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;br/&gt;
&lt;a href="http://feedads.g.doubleclick.net/~a/-SQU4IyNcdLCEEU7kWGZqVEoxRg/1/da"&gt;&lt;img src="http://feedads.g.doubleclick.net/~a/-SQU4IyNcdLCEEU7kWGZqVEoxRg/1/di" border="0" ismap="true"&gt;&lt;/img&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/blogspot/yBrpr/~4/h88Urxrv8qU" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://transoceanic.blogspot.com/feeds/4948435224031998117/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://transoceanic.blogspot.com/2011/07/jquery-equivalent-of-prototype.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/2484637286305291771/posts/default/4948435224031998117?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/2484637286305291771/posts/default/4948435224031998117?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/blogspot/yBrpr/~3/h88Urxrv8qU/jquery-equivalent-of-prototype.html" title="jQuery Equivalent of Prototype Function.bind with the transfer of arguments" /><author><name>transoceanic</name><uri>http://www.blogger.com/profile/07533121345262806709</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://transoceanic.blogspot.com/2011/07/jquery-equivalent-of-prototype.html</feedburner:origLink></entry></feed>

