<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-1293315848732557676</id><updated>2024-12-18T19:32:01.195-08:00</updated><category term="Windows Phone"/><category term="Windows Phone 7"/><category term="ASP.NET"/><category term="C#"/><category term="Windows"/><category term="FreeBSD"/><category term="Power Shell"/><category term="SQL Server"/><category term="Stored procedure"/><category term="Windows Server"/><category term="Windows XP"/><category term="FreeBSD 8.2"/><category term="PostgreSQL"/><category term="Windows 7"/><category term="Google Maps"/><category term="Jail"/><category term="Mango"/><category term="Ubuntu"/><category term="Visual Studio"/><category term="Windows Server 2008"/><category term=".Net"/><category term="AD"/><category term="Active Directory"/><category term="Administrator"/><category term="Android"/><category term="Bing"/><category term="Cloud Computing"/><category term="Command"/><category term="Cryptography"/><category term="DataTable"/><category term="Database"/><category term="Emulator"/><category term="Get-Process"/><category term="Gnome"/><category term="Google API"/><category term="Google+"/><category term="JavaScript"/><category term="Linux"/><category term="ListView"/><category term="Maps"/><category term="Nginx"/><category term="Npgsql"/><category term="PHP"/><category term="PHP-FPM"/><category term="Password"/><category term="Ruby on Rails"/><category term="SQLite"/><category term="Samba"/><category term="Sendmail"/><category term="TOP"/><category term="Theme"/><category term="Varnish"/><category term="Webmin"/><category term="Windows Vista"/><category term="Zune"/><category term="hyder"/><category term="hyder Ruby on Rails Cloud Computing"/><category term="jqGrid"/><category term="sudo"/><category term="網域"/><title type='text'>hyder no blog</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://hyderest.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1293315848732557676/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://hyderest.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/1293315848732557676/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/11626174194942519396</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>40</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1293315848732557676.post-2778137095956483051</id><published>2012-04-02T01:13:00.000-07:00</published><updated>2012-04-02T01:13:02.347-07:00</updated><title type='text'>[ubuntu] Edit fstab in recovery root-shell</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
在 Ubuntu 11.04 遇到了 fstab 設定錯誤以致於無法 mount 磁碟機，&lt;br /&gt;
可在開機選單選擇 Recovery Mode 進入修復模式，&lt;br /&gt;
在修復模式選單中可選擇使用 Root Shell 進入系統。&lt;br /&gt;
&lt;br /&gt;
但此時系統為唯讀狀態，&lt;br /&gt;
無法修改任何 /etc/ 底下的設定檔，&lt;br /&gt;
紛紛會吐給你 Read-Only System 的訊息。&lt;br /&gt;
&amp;nbsp;此時輸入：&lt;br /&gt;
&amp;nbsp;&amp;nbsp;
&lt;code&gt;# mount -o remount,rw /dev/sda1 /&lt;/code&gt;

即可重新 remount 磁碟機，並允許修改檔案。
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hyderest.blogspot.com/feeds/2778137095956483051/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://hyderest.blogspot.com/2012/04/ubuntu-edit-fstab-in-recovery-root.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1293315848732557676/posts/default/2778137095956483051'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1293315848732557676/posts/default/2778137095956483051'/><link rel='alternate' type='text/html' href='http://hyderest.blogspot.com/2012/04/ubuntu-edit-fstab-in-recovery-root.html' title='[ubuntu] Edit fstab in recovery root-shell'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/11626174194942519396</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1293315848732557676.post-5949825477724779493</id><published>2012-03-15T19:51:00.000-07:00</published><updated>2012-03-15T19:51:04.182-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Bing"/><category scheme="http://www.blogger.com/atom/ns#" term="Google Maps"/><category scheme="http://www.blogger.com/atom/ns#" term="Maps"/><category scheme="http://www.blogger.com/atom/ns#" term="Windows Phone"/><category scheme="http://www.blogger.com/atom/ns#" term="Windows Phone 7"/><title type='text'>Removing the &#39;Invalid Credentials... &#39; message from Bing Maps on WP7</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; trbidi=&quot;on&quot;&gt;
How to remove the overlay message you can get when using the Bing Maps control on WP7. Now I&#39;ve only ever seen this appear for two scenarios - invalid credentials or when in flight&amp;nbsp;mode. It just so happens the control uses the same set of controls to display these messages, example shown below:&lt;br /&gt;&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgmPhIPsufdEex2zVWND8vs7tSqYD-7v7jGsRh-gB0AznnlQ8j0tqnB_jQUOYxSjLE90y-hWC9Osy39HOspl5kmkFzTnQBHBtcble0fmckijTngy3yCXwexI5vRfSgBDBfnxz4KUjvJLZH/s1600/overlay+messaage.PNG&quot; imageanchor=&quot;1&quot; style=&quot;-webkit-transition-delay: initial; -webkit-transition-duration: 0.3s; -webkit-transition-property: color; -webkit-transition-timing-function: initial; color: #009eb8; display: inline; margin-left: 1em; margin-right: 1em; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: none;&quot;&gt;&lt;img border=&quot;0&quot; class=&quot;hoverZoomLink&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgmPhIPsufdEex2zVWND8vs7tSqYD-7v7jGsRh-gB0AznnlQ8j0tqnB_jQUOYxSjLE90y-hWC9Osy39HOspl5kmkFzTnQBHBtcble0fmckijTngy3yCXwexI5vRfSgBDBfnxz4KUjvJLZH/s1600/overlay+messaage.PNG&quot; style=&quot;-webkit-border-image: url(data:image/png; background-color: white; border-bottom-style: none; border-bottom-width: 9px; border-color: initial; border-color: initial; border-image: url(data:image/png; border-left-style: none; border-left-width: 9px; border-right-style: none; border-right-width: 9px; border-top-style: none; border-top-width: 9px; border-width: initial; border-width: initial; box-sizing: border-box; display: inline-block; height: auto; margin-bottom: 10px; margin-left: auto; margin-right: auto; margin-top: 10px; max-width: 100%; padding-bottom: 8px; padding-left: 8px; padding-right: 8px; padding-top: 8px; position: relative;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Now obviously they don&#39;t want you to hide\remove this message :)&lt;br /&gt;&lt;br /&gt;The&amp;nbsp;obvious way to remove the &#39;&lt;i&gt;Invalid credentials...&lt;/i&gt;&#39; message is to actual supply valid credentials, but what about if you want to remove the &#39;&lt;i&gt;Unable to contact server.Please try again&lt;/i&gt;&#39; when using the map control in flight mode.&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Matt found a previous post that had done&amp;nbsp;&lt;a href=&quot;http://guinnesslee.wordpress.com/2011/08/18/how-to-remove-unable-to-connect-to-server-please-try-again-error-in-bing-maps-control-in-wp7/&quot; style=&quot;-webkit-transition-delay: initial; -webkit-transition-duration: 0.3s; -webkit-transition-property: color; -webkit-transition-timing-function: initial; color: #009eb8; display: inline; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: none;&quot;&gt;this&lt;/a&gt;, not sure how this guy was achieving this as the current build for the map control is sealed and access to the RootLayer property is not allowed...&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
This didn&#39;t stop me :)&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
So XAML is all about composition - everything is built as layers of UI controls, known as the &#39;visual tree&#39;. This means you can use extension methods to&amp;nbsp;re-curse&amp;nbsp;the visual tree. I used Colin Eberhardt&#39;s&amp;nbsp;linq-to-visual-tree extension methods, available&amp;nbsp;&lt;a href=&quot;http://www.scottlogic.co.uk/blog/colin/2010/03/linq-to-visual-tree/&quot; style=&quot;-webkit-transition-delay: initial; -webkit-transition-duration: 0.3s; -webkit-transition-property: color; -webkit-transition-timing-function: initial; color: #009eb8; display: inline; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: none;&quot;&gt;here&lt;/a&gt;&amp;nbsp;(LinqToVisualTree.cs).&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Here you go...&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; font-size: 14px; line-height: 19px;&quot;&gt;&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;public&lt;/span&gt; partial &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;class&lt;/span&gt; MainPage &lt;span style=&quot;color: #808030;&quot;&gt;:&lt;/span&gt; PhoneApplicationPage
&lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;
    &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;bool&lt;/span&gt; removed&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
        
    &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;public&lt;/span&gt; MainPage&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;
    &lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;
        InitializeComponent&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;

        map&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;ZoomLevel &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #008c00;&quot;&gt;8&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
        map&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;Center &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;new&lt;/span&gt; GeoCoordinate&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;49.109838&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;-&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;5.976562&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
        map&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;LayoutUpdated &lt;span style=&quot;color: #808030;&quot;&gt;+&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;sender&lt;span style=&quot;color: #808030;&quot;&gt;,&lt;/span&gt; args&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;&amp;gt;&lt;/span&gt;
        &lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;
            &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;!&lt;/span&gt;removed&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;
            &lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;
                RemoveOverlayTextBlock&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
            &lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;
        &lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
    &lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;

    &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;private&lt;/span&gt; &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;void&lt;/span&gt; RemoveOverlayTextBlock&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;
    &lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;
        var textBlock &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; map&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;DescendantsAndSelf&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;
                           &lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;OfType&lt;span style=&quot;color: #808030;&quot;&gt;&amp;lt;&lt;/span&gt;TextBlock&lt;span style=&quot;color: #808030;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;
                           &lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;SingleOrDefault&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;d &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;&amp;gt;&lt;/span&gt; d&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;Text&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;Contains&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000e6;&quot;&gt;Invalid Credentials&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt; ||
                                                 d&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;Text&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;Contains&lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000e6;&quot;&gt;Unable to contact Server&lt;/span&gt;&lt;span style=&quot;color: maroon;&quot;&gt;&quot;&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;

        &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;textBlock &lt;span style=&quot;color: #808030;&quot;&gt;!&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;null&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;
        &lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;
            var parentBorder &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; textBlock&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;Parent &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;as&lt;/span&gt; Border&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
            &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;if&lt;/span&gt; &lt;span style=&quot;color: #808030;&quot;&gt;(&lt;/span&gt;parentBorder &lt;span style=&quot;color: #808030;&quot;&gt;!&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;null&lt;/span&gt;&lt;span style=&quot;color: #808030;&quot;&gt;)&lt;/span&gt;
            &lt;span style=&quot;color: purple;&quot;&gt;{&lt;/span&gt;
                parentBorder&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;Visibility &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; Visibility&lt;span style=&quot;color: #808030;&quot;&gt;.&lt;/span&gt;Collapsed&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
            &lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;

            removed &lt;span style=&quot;color: #808030;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;true&lt;/span&gt;&lt;span style=&quot;color: purple;&quot;&gt;;&lt;/span&gt;
        &lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;
    &lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;
&lt;span style=&quot;color: purple;&quot;&gt;}&lt;/span&gt;
&lt;/pre&gt;
&lt;br style=&quot;font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot; /&gt;&lt;span style=&quot;font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt;And you get the following:&lt;/span&gt;&lt;br style=&quot;font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot; /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; color: #333333; font-family: &#39;Helvetica Neue Light&#39;, HelveticaNeue-Light, &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5GLZLhbtO8CTblotsTU1nPdsP9R3ERz5hFgRjQWyaBrwlunWgi6mzL9A_QvR046dw-1j0FnOJgKyYvpIdau6W1Ruuwpss-OztXq82MntNQ3UrgOMs4Vtap4WyvM31TwlMLX6BYYS7yb43/s1600/overlay+messaage+2.PNG&quot; imageanchor=&quot;1&quot; style=&quot;-webkit-transition-delay: initial; -webkit-transition-duration: 0.3s; -webkit-transition-property: color; -webkit-transition-timing-function: initial; color: #009eb8; display: inline; margin-left: 1em; margin-right: 1em; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: none;&quot;&gt;&lt;img border=&quot;0&quot; class=&quot;hoverZoomLink&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5GLZLhbtO8CTblotsTU1nPdsP9R3ERz5hFgRjQWyaBrwlunWgi6mzL9A_QvR046dw-1j0FnOJgKyYvpIdau6W1Ruuwpss-OztXq82MntNQ3UrgOMs4Vtap4WyvM31TwlMLX6BYYS7yb43/s1600/overlay+messaage+2.PNG&quot; style=&quot;-webkit-border-image: url(data:image/png; border-bottom-style: none; border-bottom-width: 9px; border-color: initial; border-color: initial; border-image: url(data:image/png; border-left-style: none; border-left-width: 9px; border-right-style: none; border-right-width: 9px; border-top-style: none; border-top-width: 9px; border-width: initial; border-width: initial; box-sizing: border-box; display: inline-block; height: auto; margin-bottom: 10px; margin-left: auto; margin-right: auto; margin-top: 10px; max-width: 100%; padding-bottom: 8px; padding-left: 8px; padding-right: 8px; padding-top: 8px; position: relative;&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br class=&quot;Apple-interchange-newline&quot; /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hyderest.blogspot.com/feeds/5949825477724779493/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://hyderest.blogspot.com/2012/03/removing-invalid-credentials-message.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1293315848732557676/posts/default/5949825477724779493'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1293315848732557676/posts/default/5949825477724779493'/><link rel='alternate' type='text/html' href='http://hyderest.blogspot.com/2012/03/removing-invalid-credentials-message.html' title='Removing the &#39;Invalid Credentials... &#39; message from Bing Maps on WP7'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/11626174194942519396</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgmPhIPsufdEex2zVWND8vs7tSqYD-7v7jGsRh-gB0AznnlQ8j0tqnB_jQUOYxSjLE90y-hWC9Osy39HOspl5kmkFzTnQBHBtcble0fmckijTngy3yCXwexI5vRfSgBDBfnxz4KUjvJLZH/s72-c/overlay+messaage.PNG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1293315848732557676.post-8108533883217163967</id><published>2012-03-08T00:11:00.000-08:00</published><updated>2012-03-08T00:11:55.575-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Windows Phone"/><category scheme="http://www.blogger.com/atom/ns#" term="Windows Phone 7"/><category scheme="http://www.blogger.com/atom/ns#" term="Zune"/><title type='text'>Making WPConnect Easier to Use</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;div style=&quot;font-family: arial, sans-serif; font-size: 13px; line-height: 22px; text-align: -webkit-auto;&quot;&gt;
If you are building a Windows Phone application and you are using your phone to debug AND you are using the Photo Chooser or or the Camera Launcher task you may have found out that it will not let you access the camera or pictures while you are connected to Zune.&lt;/div&gt;
&lt;div style=&quot;font-family: arial, sans-serif; font-size: 13px; line-height: 22px; text-align: -webkit-auto;&quot;&gt;
But, you have to be connected to Zune to debug on the phone.&amp;nbsp; Well, kind of.&amp;nbsp; The Windows Phone Team put out a tool called WPConnect.exe that allows you to dubug on the phone without having Zune open.&lt;/div&gt;
&lt;div style=&quot;font-family: arial, sans-serif; font-size: 13px; line-height: 22px; text-align: -webkit-auto;&quot;&gt;
Here are the steps.&lt;/div&gt;
&lt;ol style=&quot;font-family: arial, sans-serif; font-size: 13px; line-height: 22px; list-style-image: initial; list-style-position: initial; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 20px; padding-bottom: 0px; padding-left: 35px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
&lt;li style=&quot;list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 5px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Connect your phone&lt;/li&gt;
&lt;li style=&quot;list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 5px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Make sure Zune launches and connects to your phone.&lt;/li&gt;
&lt;li style=&quot;list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 5px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Shut down Zune&lt;/li&gt;
&lt;li style=&quot;list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 5px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Using a Dos Prompt, Navigate to&lt;ol style=&quot;list-style-image: initial; list-style-position: initial; margin-bottom: 5px; margin-left: 0px; margin-right: 0px; margin-top: 5px; padding-bottom: 0px; padding-left: 35px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;li style=&quot;list-style-image: initial; list-style-position: initial; list-style-type: upper-alpha; margin-bottom: 5px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(for 64 bit machines) C:\Program Files (x86)\Microsoft SDKs\Windows Phone\v7.1\Tools\WPConnect\x64&lt;/li&gt;
&lt;li style=&quot;list-style-image: initial; list-style-position: initial; list-style-type: upper-alpha; margin-bottom: 5px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;(for 32 Bit machines) C:\Program Files\Microsoft SDKs\Windows Phone\v7.1\Tools\WPConnect\x86&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li style=&quot;list-style-image: initial; list-style-position: initial; list-style-type: decimal; margin-bottom: 5px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Type WPConnect.exe&lt;/li&gt;
&lt;/ol&gt;
&lt;div style=&quot;font-family: arial, sans-serif; font-size: 13px; line-height: 22px; text-align: -webkit-auto;&quot;&gt;
It will then tell you that you are good to go.&lt;/div&gt;
&lt;div style=&quot;font-family: arial, sans-serif; font-size: 13px; line-height: 22px; text-align: -webkit-auto;&quot;&gt;
NOW FOR THE EASY WAY&lt;/div&gt;
&lt;div style=&quot;font-family: arial, sans-serif; font-size: 13px; line-height: 22px; text-align: -webkit-auto;&quot;&gt;
I got tired of having to navigate using a command prompt (Too may keystrokes) and I use this often enough to matter, so I created a shortcut for the Dos Prompt that takes me right to my designated spot in one click. Here is how you do it.&lt;/div&gt;
&lt;div style=&quot;font-family: arial, sans-serif; font-size: 13px; line-height: 22px; text-align: -webkit-auto;&quot;&gt;
1. Right-click in the open space of your desktop and click&amp;nbsp;&lt;strong style=&quot;font-weight: bold;&quot;&gt;New &amp;gt; Shortcut&lt;/strong&gt;.&lt;/div&gt;
&lt;div style=&quot;font-family: arial, sans-serif; font-size: 13px; line-height: 22px; text-align: -webkit-auto;&quot;&gt;
2. For the location, type or copy and paste the following:&lt;/div&gt;
&lt;div style=&quot;font-family: arial, sans-serif; font-size: 13px; line-height: 22px; text-align: -webkit-auto;&quot;&gt;
&lt;code&gt;%windir%\system32\cmd.exe /k&lt;/code&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: arial, sans-serif; font-size: 13px; line-height: 22px; text-align: -webkit-auto;&quot;&gt;
&lt;a class=&quot;hoverZoomLink&quot; href=&quot;http://thesociablegeek.com/wp-content/uploads/2012/03/image.png&quot; style=&quot;color: #333333; outline-color: initial; outline-style: none; outline-width: initial;&quot;&gt;&lt;img alt=&quot;image&quot; border=&quot;0&quot; height=&quot;278&quot; src=&quot;http://thesociablegeek.com/wp-content/uploads/2012/03/image_thumb2.png&quot; style=&quot;background-image: none; border-bottom-width: 0px; border-color: initial; border-color: initial; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-style: initial; border-top-width: 0px; border-width: initial; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; title=&quot;image&quot; width=&quot;367&quot; /&gt;&lt;/a&gt;&lt;strong style=&quot;font-weight: bold;&quot;&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: arial, sans-serif; font-size: 13px; line-height: 22px; text-align: -webkit-auto;&quot;&gt;
3. Click&amp;nbsp;&lt;strong style=&quot;font-weight: bold;&quot;&gt;Next&lt;/strong&gt;.&lt;/div&gt;
&lt;div style=&quot;font-family: arial, sans-serif; font-size: 13px; line-height: 22px; text-align: -webkit-auto;&quot;&gt;
4. For the name, type something descriptive, like “Command Prompt for WPConnect” then click&amp;nbsp;&lt;strong style=&quot;font-weight: bold;&quot;&gt;Finish&lt;/strong&gt;.&lt;/div&gt;
&lt;div style=&quot;font-family: arial, sans-serif; font-size: 13px; line-height: 22px; text-align: -webkit-auto;&quot;&gt;
&lt;a class=&quot;hoverZoomLink&quot; href=&quot;http://thesociablegeek.com/wp-content/uploads/2012/03/image1.png&quot; style=&quot;color: #333333; outline-color: initial; outline-style: none; outline-width: initial;&quot;&gt;&lt;img alt=&quot;image&quot; border=&quot;0&quot; height=&quot;299&quot; src=&quot;http://thesociablegeek.com/wp-content/uploads/2012/03/image_thumb3.png&quot; style=&quot;background-image: none; border-bottom-width: 0px; border-color: initial; border-color: initial; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-style: initial; border-top-width: 0px; border-width: initial; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; title=&quot;image&quot; width=&quot;399&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: arial, sans-serif; font-size: 13px; line-height: 22px; text-align: -webkit-auto;&quot;&gt;
5. Right-click on the new shortcut and choose&amp;nbsp;&lt;strong style=&quot;font-weight: bold;&quot;&gt;Properties&lt;/strong&gt;.&lt;/div&gt;
&lt;div style=&quot;font-family: arial, sans-serif; font-size: 13px; line-height: 22px; text-align: -webkit-auto;&quot;&gt;
6. Change the “&lt;strong style=&quot;font-weight: bold;&quot;&gt;Start In&lt;/strong&gt;” field to whatever directory you want the command prompt to start in.In my case, I want it to start in the 64 bit folder we talked about above:&lt;/div&gt;
&lt;div style=&quot;font-family: arial, sans-serif; font-size: 13px; line-height: 22px; text-align: -webkit-auto;&quot;&gt;
&lt;strong style=&quot;font-weight: bold;&quot;&gt;&lt;code&gt;&quot;C:\Program Files (x86)\Microsoft SDKs\Windows Phone\v7.1\Tools\WPConnect\x64&quot;&lt;/code&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;font-family: arial, sans-serif; font-size: 13px; line-height: 22px; text-align: -webkit-auto;&quot;&gt;
&lt;a class=&quot;hoverZoomLink&quot; href=&quot;http://thesociablegeek.com/wp-content/uploads/2012/03/image2.png&quot; style=&quot;color: #333333; outline-color: initial; outline-style: none; outline-width: initial;&quot;&gt;&lt;img alt=&quot;image&quot; border=&quot;0&quot; height=&quot;451&quot; src=&quot;http://thesociablegeek.com/wp-content/uploads/2012/03/image_thumb4.png&quot; style=&quot;background-image: none; border-bottom-width: 0px; border-color: initial; border-color: initial; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-style: initial; border-top-width: 0px; border-width: initial; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; title=&quot;image&quot; width=&quot;321&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: arial, sans-serif; font-size: 13px; line-height: 22px; text-align: -webkit-auto;&quot;&gt;
Be sure to include the quotation marks, and of course you would need to customize this file path to your own system (32 or 64).&lt;/div&gt;
&lt;div style=&quot;font-family: arial, sans-serif; font-size: 13px; line-height: 22px; text-align: -webkit-auto;&quot;&gt;
Now when I want to use WPConnect.&amp;nbsp; I just use the pined shortcut&lt;/div&gt;
&lt;div style=&quot;font-family: arial, sans-serif; font-size: 13px; line-height: 22px; text-align: -webkit-auto;&quot;&gt;
&lt;a class=&quot;hoverZoomLink&quot; href=&quot;http://thesociablegeek.com/wp-content/uploads/2012/03/image3.png&quot; style=&quot;color: #333333; outline-color: initial; outline-style: none; outline-width: initial;&quot;&gt;&lt;img alt=&quot;image&quot; border=&quot;0&quot; height=&quot;97&quot; src=&quot;http://thesociablegeek.com/wp-content/uploads/2012/03/image_thumb5.png&quot; style=&quot;background-image: none; border-bottom-width: 0px; border-color: initial; border-color: initial; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-style: initial; border-top-width: 0px; border-width: initial; display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; title=&quot;image&quot; width=&quot;215&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: arial, sans-serif; font-size: 13px; line-height: 22px; text-align: -webkit-auto;&quot;&gt;
and Type WPConnect.exe&lt;/div&gt;
&lt;div style=&quot;font-family: arial, sans-serif; font-size: 13px; line-height: 22px; text-align: -webkit-auto;&quot;&gt;
&lt;a class=&quot;hoverZoomLink&quot; href=&quot;http://thesociablegeek.com/wp-content/uploads/2012/03/image4.png&quot; style=&quot;color: #333333; outline-color: initial; outline-style: none; outline-width: initial;&quot;&gt;&lt;img alt=&quot;image&quot; border=&quot;0&quot; height=&quot;274&quot; src=&quot;http://thesociablegeek.com/wp-content/uploads/2012/03/image_thumb6.png&quot; style=&quot;background-image: none; border-bottom-width: 0px; border-color: initial; border-color: initial; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-style: initial; border-top-width: 0px; border-width: initial; display: inline; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; title=&quot;image&quot; width=&quot;531&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br class=&quot;Apple-interchange-newline&quot; /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hyderest.blogspot.com/feeds/8108533883217163967/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://hyderest.blogspot.com/2012/03/making-wpconnect-easier-to-use.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1293315848732557676/posts/default/8108533883217163967'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1293315848732557676/posts/default/8108533883217163967'/><link rel='alternate' type='text/html' href='http://hyderest.blogspot.com/2012/03/making-wpconnect-easier-to-use.html' title='Making WPConnect Easier to Use'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/11626174194942519396</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1293315848732557676.post-856683412217643096</id><published>2012-01-30T02:00:00.000-08:00</published><updated>2012-01-30T02:00:49.779-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Google API"/><category scheme="http://www.blogger.com/atom/ns#" term="Google Maps"/><title type='text'>How to use Google Static Maps data in mobile applications</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Tahoma, Geneva, sans-serif; font-size: 12px; font: inherit; line-height: 18px; margin-bottom: 18px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
This article explains how to use&amp;nbsp;&lt;a class=&quot;external text&quot; href=&quot;http://maps.google.com/&quot; rel=&quot;nofollow&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://www.developer.nokia.com/Community/Wiki/skins/nokiadev/images/external-link-ltr-icon.png?v=1646); background-origin: initial; background-position: 100% 50%; background-repeat: no-repeat no-repeat; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #3366bb; cursor: pointer; font-size: 12px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 13px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;Google Maps&lt;/a&gt;&amp;nbsp;data in a mobile application.&lt;br /&gt;
Google Maps offers&amp;nbsp;&lt;a class=&quot;external text&quot; href=&quot;http://en.wikipedia.org/wiki/REST&quot; rel=&quot;nofollow&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://www.developer.nokia.com/Community/Wiki/skins/nokiadev/images/external-link-ltr-icon.png?v=1646); background-origin: initial; background-position: 100% 50%; background-repeat: no-repeat no-repeat; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #3366bb; cursor: pointer; font-size: 12px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 13px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;REST&lt;/a&gt;&amp;nbsp;services that allow accessing its data with simple HTTP requests, so they can be easily integrated into mobile applications.&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Tahoma, Geneva, sans-serif; font-size: 12px; font: inherit; line-height: 18px; margin-bottom: 18px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Tahoma, Geneva, sans-serif; font-size: 12px; font: inherit; line-height: 18px; margin-bottom: 18px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;/div&gt;
&lt;h2 style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-color: rgb(51, 51, 51); border-top-style: solid; border-top-width: 2px; font-family: NokiaPureTextLight; font-size: 22px; font-weight: normal; font: inherit; letter-spacing: -0.07em; line-height: 22px; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 12px; vertical-align: baseline;&quot;&gt;

&lt;span class=&quot;mw-headline&quot; id=&quot;Sign_up_for_a_Google_Maps_API_key&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 22px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Sign up for a Google Maps API key&lt;/span&gt;&lt;/h2&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Tahoma, Geneva, sans-serif; font-size: 12px; font: inherit; line-height: 18px; margin-bottom: 18px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
NOTE: Usage of this code with the free Google Maps API Key breaks Google&#39;s&amp;nbsp;&lt;a class=&quot;external text&quot; href=&quot;http://code.google.com/apis/maps/terms.html&quot; rel=&quot;nofollow&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://www.developer.nokia.com/Community/Wiki/skins/nokiadev/images/external-link-ltr-icon.png?v=1646); background-origin: initial; background-position: 100% 50%; background-repeat: no-repeat no-repeat; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #3366bb; cursor: pointer; font-size: 12px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 13px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;Terms and Conditions&lt;/a&gt;&amp;nbsp;(section 10.8). You should purchase an Enterprise License if you wish to use the Google Maps API as shown in this example.&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Tahoma, Geneva, sans-serif; font-size: 12px; font: inherit; line-height: 18px; margin-bottom: 18px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
First you need to sign up on this page:&lt;br /&gt;
&lt;a class=&quot;external free&quot; href=&quot;http://code.google.com/apis/maps/signup.html&quot; rel=&quot;nofollow&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://www.developer.nokia.com/Community/Wiki/skins/nokiadev/images/external-link-ltr-icon.png?v=1646); background-origin: initial; background-position: 100% 50%; background-repeat: no-repeat no-repeat; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #3366bb; cursor: pointer; font-size: 12px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 13px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;http://code.google.com/apis/maps/signup.html&lt;/a&gt;&lt;br /&gt;
Once you have signed up, you get a key (a simple string) that you can use for all your queries to Google Maps services.&lt;/div&gt;
&lt;h2 style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-color: rgb(51, 51, 51); border-top-style: solid; border-top-width: 2px; font-family: NokiaPureTextLight; font-size: 22px; font-weight: normal; font: inherit; letter-spacing: -0.07em; line-height: 22px; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 12px; vertical-align: baseline;&quot;&gt;

&lt;span class=&quot;mw-headline&quot; id=&quot;Google_Static_Maps_API_no_longer_requires_a_Maps_API_key&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 22px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Google Static Maps API no longer requires a Maps API key&lt;/span&gt;&lt;/h2&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Tahoma, Geneva, sans-serif; font-size: 12px; font: inherit; line-height: 18px; margin-bottom: 18px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
For updated information on Google Static Maps API, please visit&amp;nbsp;&lt;a class=&quot;external free&quot; href=&quot;http://code.google.com/apis/maps/documentation/staticmaps/&quot; rel=&quot;nofollow&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://www.developer.nokia.com/Community/Wiki/skins/nokiadev/images/external-link-ltr-icon.png?v=1646); background-origin: initial; background-position: 100% 50%; background-repeat: no-repeat no-repeat; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #3366bb; cursor: pointer; font-size: 12px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 13px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;http://code.google.com/apis/maps/documentation/staticmaps/&lt;/a&gt;&lt;/div&gt;
&lt;h2 style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-color: rgb(51, 51, 51); border-top-style: solid; border-top-width: 2px; font-family: NokiaPureTextLight; font-size: 22px; font-weight: normal; font: inherit; letter-spacing: -0.07em; line-height: 22px; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 12px; vertical-align: baseline;&quot;&gt;

&lt;span class=&quot;mw-headline&quot; id=&quot;Static_maps&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 22px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Static maps&lt;/span&gt;&lt;/h2&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Tahoma, Geneva, sans-serif; font-size: 12px; font: inherit; line-height: 18px; margin-bottom: 18px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
Standard Google Maps code is suitable for Web applications. However, it includes a lot of Ajax functionalities that are not really useful if you are building a mobile application. The solution is to use the&amp;nbsp;&lt;a class=&quot;external text&quot; href=&quot;http://code.google.com/apis/maps/documentation/staticmaps/&quot; rel=&quot;nofollow&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://www.developer.nokia.com/Community/Wiki/skins/nokiadev/images/external-link-ltr-icon.png?v=1646); background-origin: initial; background-position: 100% 50%; background-repeat: no-repeat no-repeat; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #3366bb; cursor: pointer; font-size: 12px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 13px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;static maps&lt;/a&gt;&amp;nbsp;service that allows retrieving single images that can easily be used in mobile applications.&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Tahoma, Geneva, sans-serif; font-size: 12px; font: inherit; line-height: 18px; margin-bottom: 18px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
The static maps service supports different image formats (png32, GIF, JPG) and customizable image size, so you can get perfect images for all purposes. For example, if you want to retrieve the location at:&lt;/div&gt;
&lt;ul style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Tahoma, Geneva, sans-serif; font-size: 12px; font: inherit; line-height: 18px; list-style-image: url(http://www.developer.nokia.com/images/l/bullet.png); list-style-position: initial; margin-bottom: 0px; margin-left: 17px; margin-right: 0px; margin-top: 2px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 12px; font: inherit; line-height: 15px; margin-bottom: 5px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;latitude: 41.867878&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 12px; font: inherit; line-height: 15px; margin-bottom: 5px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;longitude: 12.471516&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Tahoma, Geneva, sans-serif; font-size: 12px; font: inherit; line-height: 18px; margin-bottom: 18px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
You can simply retrieve this URL with an HTTP GET request:&lt;/div&gt;
&lt;pre class=&quot;text&quot; style=&quot;border-bottom-color: rgb(202, 201, 201) !important; border-bottom-left-radius: 8px; border-bottom-style: solid !important; border-bottom-width: 1px !important; border-color: initial; border-image: initial !important; border-left-color: rgb(202, 201, 201) !important; border-left-style: solid !important; border-left-width: 1px !important; border-right-color: rgb(202, 201, 201) !important; border-right-style: solid !important; border-right-width: 1px !important; border-style: initial; border-top-color: rgb(202, 201, 201) !important; border-top-style: solid !important; border-top-width: 1px !important; font-size: 12px; font: inherit; line-height: 18px; margin-bottom: 12px; overflow-x: auto; overflow-y: hidden; padding-bottom: 10px !important; padding-left: 15px !important; padding-right: 15px !important; padding-top: 10px !important; vertical-align: baseline;&quot;&gt;http://maps.google.com/staticmap?center=41.867878,12.471516&amp;amp;format=png32&amp;amp;zoom=8&amp;amp;size=240x320&amp;amp;key=&amp;lt;API_KEY&amp;gt;&lt;/pre&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Tahoma, Geneva, sans-serif; font-size: 12px; font: inherit; line-height: 18px; margin-bottom: 18px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
This way you will get a PNG32 image with a width of 240 pixels and a height of 320 pixels, centered at point (41.867878,12.471516), and with a zoom level of 8 (the zoom range is from 0 to a maximum level of 19)&lt;br /&gt;
&lt;a class=&quot;image&quot; href=&quot;http://www.developer.nokia.com/Community/Wiki/File:Google_staticmap.jpg&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #395796; cursor: pointer; font-size: 12px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;img alt=&quot;Google staticmap.jpg&quot; height=&quot;320&quot; src=&quot;http://www.developer.nokia.com/Community/Wiki/images/c/c8/Google_staticmap.jpg?20080513203335&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 12px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot; width=&quot;240&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;h2 style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-color: rgb(51, 51, 51); border-top-style: solid; border-top-width: 2px; font-family: NokiaPureTextLight; font-size: 22px; font-weight: normal; font: inherit; letter-spacing: -0.07em; line-height: 22px; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 12px; vertical-align: baseline;&quot;&gt;

&lt;span class=&quot;mw-headline&quot; id=&quot;Geocode_an_address&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 22px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Geocode an address&lt;/span&gt;&lt;/h2&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Tahoma, Geneva, sans-serif; font-size: 12px; font: inherit; line-height: 18px; margin-bottom: 18px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
From Google Maps docs:&lt;br /&gt;
&lt;i style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 12px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Geocoding is the process of converting addresses (such as &quot;1600 Amphitheatre Parkway, Mountain View, CA&quot;) into geographic coordinates (like latitude 37.423021 and longitude -122.083739)&lt;/i&gt;&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Tahoma, Geneva, sans-serif; font-size: 12px; font: inherit; line-height: 18px; margin-bottom: 18px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
The following example describes building an application that displays the address typed by the end user. First you need to geocode its address into geographic coordinates.&lt;br /&gt;
To do this, Google Maps offers another REST service that can easily be accessed with simple HTTP requests.&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 12px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;If you want to geocode this address&lt;/b&gt;&lt;br /&gt;
&lt;i style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 12px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Leicester Square, London&lt;/i&gt;&lt;br /&gt;
Request this URL from your code&lt;/div&gt;
&lt;pre class=&quot;text&quot; style=&quot;border-bottom-color: rgb(202, 201, 201) !important; border-bottom-left-radius: 8px; border-bottom-style: solid !important; border-bottom-width: 1px !important; border-color: initial; border-image: initial !important; border-left-color: rgb(202, 201, 201) !important; border-left-style: solid !important; border-left-width: 1px !important; border-right-color: rgb(202, 201, 201) !important; border-right-style: solid !important; border-right-width: 1px !important; border-style: initial; border-top-color: rgb(202, 201, 201) !important; border-top-style: solid !important; border-top-width: 1px !important; font-size: 12px; font: inherit; line-height: 18px; margin-bottom: 12px; overflow-x: auto; overflow-y: hidden; padding-bottom: 10px !important; padding-left: 15px !important; padding-right: 15px !important; padding-top: 10px !important; vertical-align: baseline;&quot;&gt;http://maps.google.com/maps/geo?q=Leicester%20Square,%20London&amp;amp;output=csv&amp;amp;key=&amp;lt;API_KEY&amp;gt;&lt;/pre&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Tahoma, Geneva, sans-serif; font-size: 12px; font: inherit; line-height: 18px; margin-bottom: 18px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
and you will get this output:&lt;/div&gt;
&lt;pre class=&quot;text&quot; style=&quot;border-bottom-color: rgb(202, 201, 201) !important; border-bottom-left-radius: 8px; border-bottom-style: solid !important; border-bottom-width: 1px !important; border-color: initial; border-image: initial !important; border-left-color: rgb(202, 201, 201) !important; border-left-style: solid !important; border-left-width: 1px !important; border-right-color: rgb(202, 201, 201) !important; border-right-style: solid !important; border-right-width: 1px !important; border-style: initial; border-top-color: rgb(202, 201, 201) !important; border-top-style: solid !important; border-top-width: 1px !important; font-size: 12px; font: inherit; line-height: 18px; margin-bottom: 12px; overflow-x: auto; overflow-y: hidden; padding-bottom: 10px !important; padding-left: 15px !important; padding-right: 15px !important; padding-top: 10px !important; vertical-align: baseline;&quot;&gt;200,6,51.510605,-0.130728&lt;/pre&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Tahoma, Geneva, sans-serif; font-size: 12px; font: inherit; line-height: 18px; margin-bottom: 18px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
Where:&lt;/div&gt;
&lt;ul style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Tahoma, Geneva, sans-serif; font-size: 12px; font: inherit; line-height: 18px; list-style-image: url(http://www.developer.nokia.com/images/l/bullet.png); list-style-position: initial; margin-bottom: 0px; margin-left: 17px; margin-right: 0px; margin-top: 2px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 12px; font: inherit; line-height: 15px; margin-bottom: 5px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;The first number is a code, which in this case (200) means that geocoding has been successfull (for a full list of status codes see:&amp;nbsp;&lt;a class=&quot;external autonumber&quot; href=&quot;http://code.google.com/apis/maps/documentation/javascript/v2/reference.html#GGeoStatusCode&quot; rel=&quot;nofollow&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://www.developer.nokia.com/Community/Wiki/skins/nokiadev/images/external-link-ltr-icon.png?v=1646); background-origin: initial; background-position: 100% 50%; background-repeat: no-repeat no-repeat; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #3366bb; cursor: pointer; font-size: 12px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 13px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;[1]&lt;/a&gt;)&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 12px; font: inherit; line-height: 15px; margin-bottom: 5px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;The second number gives a measure of the geocoding accuracy (from 0 to 9 - maximum accuracy)&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 12px; font: inherit; line-height: 15px; margin-bottom: 5px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;The 3rd and 4th numbers represent latitude and longitude of the geocoded address, so these are the coordinates used to retrieve the map through the static map service.&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Tahoma, Geneva, sans-serif; font-size: 12px; font: inherit; line-height: 18px; margin-bottom: 18px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
As you can see, there is an &#39;output&#39; parameter in the geocode request. This means that you can choose the output format you prefer. The supported formats are:&lt;/div&gt;
&lt;ul style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Tahoma, Geneva, sans-serif; font-size: 12px; font: inherit; line-height: 18px; list-style-image: url(http://www.developer.nokia.com/images/l/bullet.png); list-style-position: initial; margin-bottom: 0px; margin-left: 17px; margin-right: 0px; margin-top: 2px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 12px; font: inherit; line-height: 15px; margin-bottom: 5px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;xml&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 12px; font: inherit; line-height: 15px; margin-bottom: 5px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;kml (same as xml, but with different Content-Type)&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 12px; font: inherit; line-height: 15px; margin-bottom: 5px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;json (not really useful for mobile apps)&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 12px; font: inherit; line-height: 15px; margin-bottom: 5px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;csv (comma-separated values)&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-color: rgb(51, 51, 51); border-top-style: solid; border-top-width: 2px; font-family: NokiaPureTextLight; font-size: 22px; font-weight: normal; font: inherit; letter-spacing: -0.07em; line-height: 22px; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 12px; vertical-align: baseline;&quot;&gt;

&lt;span class=&quot;mw-headline&quot; id=&quot;Proxy_server.2C_usage_limits&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 22px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Proxy server, usage limits&lt;/span&gt;&lt;/h2&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Tahoma, Geneva, sans-serif; font-size: 12px; font: inherit; line-height: 18px; margin-bottom: 18px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
Since your Google Maps API key is bound to a specific URL, in order to access map services&amp;nbsp;&lt;b style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 12px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;you need to setup a proxy server&lt;/b&gt;&amp;nbsp;that will receive HTTP requests from the mobile application and forward them to Google Maps REST URLs, returning Google responses to mobile clients.&amp;nbsp;&lt;i style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 12px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;(as pointed out in the Comment page, this is not a fully clear point yet)&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
Also, be aware that there is a&amp;nbsp;&lt;b style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 12px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;limit to the number of requests&lt;/b&gt;, both for static maps and geocode service, you can do each day. For personal uses they are more than enough, but you need to keep this issue in mind if you plan to develop commercial services.&lt;/div&gt;
&lt;h2 style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-color: rgb(51, 51, 51); border-top-style: solid; border-top-width: 2px; font-family: NokiaPureTextLight; font-size: 22px; font-weight: normal; font: inherit; letter-spacing: -0.07em; line-height: 22px; margin-bottom: 25px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 12px; vertical-align: baseline;&quot;&gt;

&lt;span class=&quot;mw-headline&quot; id=&quot;Sample_application&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 22px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Sample application&lt;/span&gt;&lt;/h2&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Tahoma, Geneva, sans-serif; font-size: 12px; font: inherit; line-height: 18px; margin-bottom: 18px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;a class=&quot;image&quot; href=&quot;http://www.developer.nokia.com/Community/Wiki/File:J2me_google_maps.jpg&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #395796; cursor: pointer; font-size: 12px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;img alt=&quot;J2me google maps.jpg&quot; height=&quot;280&quot; src=&quot;http://www.developer.nokia.com/Community/Wiki/images/e/e2/J2me_google_maps.jpg?20080513202912&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 12px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot; width=&quot;475&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
A sample J2ME application, using the approach described here, is available on this page:&amp;nbsp;&lt;a class=&quot;external text&quot; href=&quot;http://www.jappit.com/blog/j2me-online-emulator?midlet=google_maps&quot; rel=&quot;nofollow&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://www.developer.nokia.com/Community/Wiki/skins/nokiadev/images/external-link-ltr-icon.png?v=1646); background-origin: initial; background-position: 100% 50%; background-repeat: no-repeat no-repeat; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #3366bb; cursor: pointer; font-size: 12px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 13px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;Google Maps J2ME Test&lt;/a&gt;&lt;br /&gt;
Google Maps J2ME API source code used in this example is also available here:&amp;nbsp;&lt;a class=&quot;mw-redirect&quot; href=&quot;http://www.developer.nokia.com/Community/Wiki/J2ME_Google_Maps_API&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #395796; cursor: pointer; font-size: 12px; font: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot; title=&quot;J2ME Google Maps API&quot;&gt;J2ME Google Maps API&lt;/a&gt;&lt;/div&gt;
Reference To:&amp;nbsp;&lt;a href=&quot;http://www.developer.nokia.com/Community/Wiki/How_to_use_Google_Maps_data_in_mobile_applications&quot;&gt;http://www.developer.nokia.com/Community/Wiki/How_to_use_Google_Maps_data_in_mobile_applications&lt;/a&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hyderest.blogspot.com/feeds/856683412217643096/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://hyderest.blogspot.com/2012/01/how-to-use-google-static-maps-data-in.html#comment-form' title='1 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1293315848732557676/posts/default/856683412217643096'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1293315848732557676/posts/default/856683412217643096'/><link rel='alternate' type='text/html' href='http://hyderest.blogspot.com/2012/01/how-to-use-google-static-maps-data-in.html' title='How to use Google Static Maps data in mobile applications'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/11626174194942519396</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1293315848732557676.post-2267591483948250135</id><published>2012-01-30T00:38:00.000-08:00</published><updated>2012-01-30T00:38:29.287-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Mango"/><category scheme="http://www.blogger.com/atom/ns#" term="Theme"/><category scheme="http://www.blogger.com/atom/ns#" term="Windows Phone"/><category scheme="http://www.blogger.com/atom/ns#" term="Windows Phone 7"/><title type='text'>SETTING VISIBILITY BASED ON WP7 THEMES</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;h2 style=&quot;color: #506269; font-family: &#39;Lucida Grande&#39;, &#39;Lucida Sans Unicode&#39;, Arial, Helvetica, sans-serif; font-size: 24px; font-weight: normal; margin-bottom: 19px; margin-left: 0px; margin-right: 0px; margin-top: 19px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; text-transform: uppercase;&quot;&gt;

INTRO&lt;/h2&gt;
&lt;div style=&quot;margin-bottom: 12px; margin-top: 12px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
The&amp;nbsp;&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/hh184840(v=vs.92).aspx&quot; style=&quot;color: #6e858f; font-family: &#39;Lucida Grande&#39;, &#39;Lucida Sans Unicode&#39;, Arial, Helvetica, sans-serif; letter-spacing: 1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; target=&quot;_blank&quot;&gt;Technical Certification Requirements&lt;/a&gt;&amp;nbsp;for Windows Phone 7 applications state the following:&lt;/div&gt;
&lt;blockquote style=&quot;background-color: #d0d8db; background-image: url(http://www.timmykokke.com/wp-content/themes/timmykokke/images/postquote.png); background-position: 0% 0%; background-repeat: no-repeat no-repeat; border-bottom-color: rgb(182, 194, 199); border-bottom-style: solid; border-bottom-width: 0px; border-image: initial; border-left-color: rgb(182, 194, 199); border-left-style: solid; border-left-width: 0px; border-right-color: rgb(182, 194, 199); border-right-style: solid; border-right-width: 0px; border-top-color: rgb(182, 194, 199); border-top-style: solid; border-top-width: 0px; clear: both; color: #06181c; font-style: italic; margin-bottom: 10px; margin-left: 50px; margin-right: 10px; margin-top: 10px; overflow-x: auto; overflow-y: auto; padding-bottom: 10px; padding-left: 34px; padding-right: 10px; padding-top: 10px;&quot;&gt;
&lt;div style=&quot;margin-bottom: 17px; margin-left: 17px; margin-top: 17px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;strong&gt;5.5.2 – Content and Themes&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 17px; margin-left: 17px; margin-top: 17px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Application content, such as text and visual elements, must be visible and legible regardless of the phone theme. For example, if the phone theme changes from black background to white background, the text and visual elements of your application must be visible or legible.&lt;/div&gt;
&lt;/blockquote&gt;
&lt;div style=&quot;margin-bottom: 12px; margin-top: 12px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
This means that everything in you application, including images, should be well visible in the dark and light theming of the phone. Handling dark/light support is very easy.&lt;/div&gt;
&lt;h2 style=&quot;color: #506269; font-family: &#39;Lucida Grande&#39;, &#39;Lucida Sans Unicode&#39;, Arial, Helvetica, sans-serif; font-size: 24px; font-weight: normal; margin-bottom: 19px; margin-left: 0px; margin-right: 0px; margin-top: 19px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; text-transform: uppercase;&quot;&gt;

DARK AND LIGHT&lt;/h2&gt;
&lt;div style=&quot;margin-bottom: 12px; margin-top: 12px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Often companies have a special version of their logos for different situations (Bing for example). For this demo I’ve created two logos, a black and a white one. The white logo should be used when the theme is set to dark, the other when a light theme has been selected.&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 12px; margin-top: 12px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;a class=&quot;hoverZoomLink&quot; href=&quot;http://www.timmykokke.com/Make_F546/Logo-White.png&quot; style=&quot;color: #6e858f; font-family: &#39;Lucida Grande&#39;, &#39;Lucida Sans Unicode&#39;, Arial, Helvetica, sans-serif; letter-spacing: 1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;img alt=&quot;Logo-White&quot; border=&quot;0&quot; height=&quot;141&quot; src=&quot;http://www.timmykokke.com/Make_F546/Logo-White_thumb.png&quot; style=&quot;background-image: none; border-bottom-color: rgb(157, 173, 180); border-bottom-style: solid; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-color: rgb(157, 173, 180); border-left-style: solid; border-left-width: 0px; border-right-color: rgb(157, 173, 180); border-right-style: solid; border-right-width: 0px; border-style: initial; border-top-color: rgb(157, 173, 180); border-top-style: solid; border-top-width: 0px; display: block; float: none; margin-bottom: 0px; margin-left: auto; margin-right: auto; margin-top: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; title=&quot;Logo-White&quot; width=&quot;450&quot; /&gt;&lt;/a&gt;&lt;a class=&quot;hoverZoomLink&quot; href=&quot;http://www.timmykokke.com/Make_F546/Logo-Black.png&quot; style=&quot;color: #6e858f; font-family: &#39;Lucida Grande&#39;, &#39;Lucida Sans Unicode&#39;, Arial, Helvetica, sans-serif; letter-spacing: 1px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;img alt=&quot;Logo-Black&quot; border=&quot;0&quot; height=&quot;141&quot; src=&quot;http://www.timmykokke.com/Make_F546/Logo-Black_thumb.png&quot; style=&quot;background-image: none; border-bottom-color: rgb(157, 173, 180); border-bottom-style: solid; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-color: rgb(157, 173, 180); border-left-style: solid; border-left-width: 0px; border-right-color: rgb(157, 173, 180); border-right-style: solid; border-right-width: 0px; border-style: initial; border-top-color: rgb(157, 173, 180); border-top-style: solid; border-top-width: 0px; display: block; float: none; margin-bottom: 0px; margin-left: auto; margin-right: auto; margin-top: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; title=&quot;Logo-Black&quot; width=&quot;450&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 12px; margin-top: 12px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
I’ve dropped these images into Expression Blend and grouped them together in a Grid control (&lt;em&gt;Ctrl+G&amp;nbsp;&lt;/em&gt;). This grid is placed in the title panel, which resulted in the following XAML:&lt;/div&gt;
&lt;div class=&quot;syntaxhighlighter  &quot; id=&quot;highlighter_654937&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-width: 0px !important; bottom: auto !important; float: none !important; font-family: Consolas, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, Courier, monospace !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 1em !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 1em !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; padding-bottom: 1px !important; padding-left: 1px !important; padding-right: 1px !important; padding-top: 1px !important; position: relative !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: 734px;&quot;&gt;
&lt;div class=&quot;lines&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-width: 0px !important; bottom: auto !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;
&lt;div class=&quot;line alt1&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-width: 0px !important; bottom: auto !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;
&lt;pre style=&quot;line-height: normal; text-align: -webkit-auto;&quot;&gt;&amp;lt;StackPanel x:Name=&quot;TitlePanel&quot; Grid.Row=&quot;0&quot;&amp;gt;
    &amp;lt;Grid&amp;gt;
        &amp;lt;Image Source=&quot;Logo-Black.png&quot; /&amp;gt;
        &amp;lt;Image Source=&quot;Logo-White.png&quot; /&amp;gt;
    &amp;lt;/Grid&amp;gt;
&amp;lt;/StackPanel&amp;gt; &lt;/pre&gt;
&lt;/div&gt;
&lt;div class=&quot;line alt2&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-width: 0px !important; bottom: auto !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;
&lt;table style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-width: 0px !important; border-collapse: collapse !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-width: 0px !important; bottom: auto !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; text-align: left !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;&lt;tbody style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-width: 0px !important; bottom: auto !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;
&lt;tr style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-width: 0px !important; bottom: auto !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: baseline !important; width: auto !important;&quot;&gt;&lt;td class=&quot;number&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-width: 0px !important; border-right-width: 0px !important; border-style: initial !important; border-top-width: 0px !important; bottom: auto !important; color: rgb(175, 175, 175) !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; padding-bottom: 0px !important; padding-left: 0px !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: top !important; width: 3em !important;&quot;&gt;&lt;br /&gt;&lt;/td&gt;&lt;td class=&quot;content&quot; style=&quot;background-attachment: initial !important; background-clip: initial !important; background-color: initial !important; background-image: none !important; background-origin: initial !important; border-bottom-width: 0px !important; border-color: initial !important; border-image: initial !important; border-left-color: rgb(108, 226, 108) !important; border-left-style: solid !important; border-left-width: 3px !important; border-right-width: 0px !important; border-style: initial !important; border-top-width: 0px !important; bottom: auto !important; float: none !important; font-size: 1em !important; height: auto !important; left: auto !important; line-height: 1.1em !important; margin-bottom: 0px !important; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; min-height: inherit !important; outline-color: initial !important; outline-style: initial !important; outline-width: 0px !important; padding-bottom: 0px !important; padding-left: 0.5em !important; padding-right: 0px !important; padding-top: 0px !important; position: static !important; right: auto !important; top: auto !important; vertical-align: top !important; width: auto !important;&quot;&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 12px; margin-top: 12px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
To get the white logo to be only visible when the dark theme is set, select the image of the white logo. With the image selected click on the “Advanced options”-peg:&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 12px; margin-top: 12px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;img alt=&quot;image&quot; border=&quot;0&quot; height=&quot;226&quot; src=&quot;http://www.timmykokke.com/Make_F546/image.png&quot; style=&quot;background-image: none; border-bottom-color: rgb(157, 173, 180); border-bottom-style: solid; border-bottom-width: 0px; border-image: initial; border-left-color: rgb(157, 173, 180); border-left-style: solid; border-left-width: 0px; border-right-color: rgb(157, 173, 180); border-right-style: solid; border-right-width: 0px; border-top-color: rgb(157, 173, 180); border-top-style: solid; border-top-width: 0px; display: block; float: none; margin-bottom: 0px; margin-left: auto; margin-right: auto; margin-top: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; title=&quot;image&quot; width=&quot;472&quot; /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 12px; margin-top: 12px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Now, go to “System Resource” and select the “PhoneDarkThemeVisibility” resource.&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 12px; margin-top: 12px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;img alt=&quot;image&quot; border=&quot;0&quot; height=&quot;369&quot; src=&quot;http://www.timmykokke.com/Make_F546/image_3.png&quot; style=&quot;background-image: none; border-bottom-color: rgb(157, 173, 180); border-bottom-style: solid; border-bottom-width: 0px; border-image: initial; border-left-color: rgb(157, 173, 180); border-left-style: solid; border-left-width: 0px; border-right-color: rgb(157, 173, 180); border-right-style: solid; border-right-width: 0px; border-top-color: rgb(157, 173, 180); border-top-style: solid; border-top-width: 0px; display: block; float: none; margin-bottom: 0px; margin-left: auto; margin-right: auto; margin-top: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; title=&quot;image&quot; width=&quot;471&quot; /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 12px; margin-top: 12px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
At this point a green rectangle is placed around the visibility property of the images letting you know a resource is set on that property.&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 12px; margin-top: 12px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
To get the same results for the dark logo, repeat the process on that images. But select the “PhoneLightThemeVisibility” instead.&lt;/div&gt;
&lt;h2 style=&quot;color: #506269; font-family: &#39;Lucida Grande&#39;, &#39;Lucida Sans Unicode&#39;, Arial, Helvetica, sans-serif; font-size: 24px; font-weight: normal; margin-bottom: 19px; margin-left: 0px; margin-right: 0px; margin-top: 19px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; text-transform: uppercase;&quot;&gt;

TESTING&lt;/h2&gt;
&lt;div style=&quot;margin-bottom: 12px; margin-top: 12px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
To test the results right in Expression Blend, got to the “Device” tab. On this tab you can set different device settings, including the Accent Color and the Light or Dark themes.&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 12px; margin-top: 12px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;img alt=&quot;image&quot; border=&quot;0&quot; height=&quot;147&quot; src=&quot;http://www.timmykokke.com/Make_F546/image_4.png&quot; style=&quot;background-image: none; border-bottom-color: initial; border-bottom-style: initial; border-bottom-width: 0px; border-image: initial; border-left-color: initial; border-left-style: initial; border-left-width: 0px; border-right-color: initial; border-right-style: initial; border-right-width: 0px; border-top-color: initial; border-top-style: initial; border-top-width: 0px; display: block; float: none; margin-bottom: 0px; margin-left: auto; margin-right: auto; margin-top: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; title=&quot;image&quot; width=&quot;449&quot; /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 12px; margin-top: 12px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Switching from dark to light and back should result in the images below.&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 12px; margin-top: 12px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;img alt=&quot;image&quot; border=&quot;0&quot; height=&quot;490&quot; src=&quot;http://www.timmykokke.com/Make_F546/image_5.png&quot; style=&quot;background-image: none; border-bottom-color: initial; border-bottom-style: initial; border-bottom-width: 0px; border-image: initial; border-left-color: initial; border-left-style: initial; border-left-width: 0px; border-right-color: initial; border-right-style: initial; border-right-width: 0px; border-top-color: initial; border-top-style: initial; border-top-width: 0px; display: block; float: none; margin-bottom: 0px; margin-left: auto; margin-right: auto; margin-top: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; title=&quot;image&quot; width=&quot;552&quot; /&gt;&lt;/div&gt;
&lt;h2 style=&quot;color: #506269; font-family: &#39;Lucida Grande&#39;, &#39;Lucida Sans Unicode&#39;, Arial, Helvetica, sans-serif; font-size: 24px; font-weight: normal; margin-bottom: 19px; margin-left: 0px; margin-right: 0px; margin-top: 19px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; text-transform: uppercase;&quot;&gt;

WRAP-UP&lt;/h2&gt;
&lt;div style=&quot;margin-bottom: 12px; margin-top: 12px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Setting the visibility like this can be done on every element in your XAML. And whenever you need to use the visibility for other purposes, there’s a similar resource for the Opacity.&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 12px; margin-top: 12px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 12px; margin-top: 12px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Reference To:&amp;nbsp;&lt;a href=&quot;http://www.timmykokke.com/2012/01/setting-visibility-based-on-wp7-themes/#.Tx3BK5wBfT0.twitter&quot;&gt;http://www.timmykokke.com/2012/01/setting-visibility-based-on-wp7-themes/#.Tx3BK5wBfT0.twitter&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hyderest.blogspot.com/feeds/2267591483948250135/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://hyderest.blogspot.com/2012/01/setting-visibility-based-on-wp7-themes.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1293315848732557676/posts/default/2267591483948250135'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1293315848732557676/posts/default/2267591483948250135'/><link rel='alternate' type='text/html' href='http://hyderest.blogspot.com/2012/01/setting-visibility-based-on-wp7-themes.html' title='SETTING VISIBILITY BASED ON WP7 THEMES'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/11626174194942519396</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1293315848732557676.post-5413965997543966844</id><published>2012-01-30T00:07:00.000-08:00</published><updated>2012-01-30T00:07:42.835-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Emulator"/><category scheme="http://www.blogger.com/atom/ns#" term="Windows Phone"/><category scheme="http://www.blogger.com/atom/ns#" term="Windows Phone 7"/><title type='text'>[Windows Phone 7.5] Run multiple instances of the emulator</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;h2 style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 1.2em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0.5em; padding-left: 0em; padding-right: 0em; padding-top: 0.5em;&quot;&gt;



&lt;/h2&gt;
&lt;div 10px;&quot;=&quot;&quot; 10px;=&quot;&quot; 12px;=&quot;&quot; arial,=&quot;&quot; font-family:=&quot;&quot; font-size:=&quot;&quot; helvetica,=&quot;&quot; lang=&quot;en&quot; margin-bottom:=&quot;&quot; margin-top:=&quot;&quot; sans-serif;=&quot;&quot; verdana,=&quot;&quot;&gt;
Hello everyone!&lt;/div&gt;
&lt;div 10px;&quot;=&quot;&quot; 10px;=&quot;&quot; 12px;=&quot;&quot; align=&quot;justify&quot; arial,=&quot;&quot; font-family:=&quot;&quot; font-size:=&quot;&quot; helvetica,=&quot;&quot; margin-bottom:=&quot;&quot; margin-top:=&quot;&quot; sans-serif;=&quot;&quot; verdana,=&quot;&quot;&gt;
&lt;span lang=&quot;en&quot;&gt;Today I bring you a little trick that can be very useful.&amp;nbsp;&lt;/span&gt;&lt;span lang=&quot;en&quot;&gt;It&#39;s being able to run multiple instances of the emulator for Windows Phone on the same PC.&lt;/span&gt;&lt;/div&gt;
&lt;div 10px;&quot;=&quot;&quot; 10px;=&quot;&quot; 12px;=&quot;&quot; arial,=&quot;&quot; font-family:=&quot;&quot; font-size:=&quot;&quot; helvetica,=&quot;&quot; margin-bottom:=&quot;&quot; margin-top:=&quot;&quot; sans-serif;=&quot;&quot; verdana,=&quot;&quot;&gt;
&lt;a class=&quot;hoverZoomLink&quot; href=&quot;http://www.microsofttranslator.com/bv.aspx?from=&amp;amp;to=en&amp;amp;a=http%3A%2F%2Fgeeks.ms%2Fcfs-file.ashx%2F__key%2FCommunityServer.Blogs.Components.WeblogFiles%2Fjyeray%2Fimage_5F00_2A8231B2.png&quot; style=&quot;color: #006666;&quot; target=&quot;_top&quot;&gt;&lt;img alt=&quot;image&quot; border=&quot;0&quot; height=&quot;507&quot; src=&quot;http://geeks.ms/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jyeray/image_5F00_thumb_5F00_48140CB1.png&quot; style=&quot;background-image: none; border-bottom-color: initial; border-bottom-style: initial; border-bottom-width: 0px; border-left-color: initial; border-left-style: initial; border-left-width: 0px; border-right-color: initial; border-right-style: initial; border-right-width: 0px; border-top-color: initial; border-top-style: initial; border-top-width: 0px; display: block; float: none; margin-bottom: 0px; margin-left: auto; margin-right: auto; margin-top: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div 10px;&quot;=&quot;&quot; 10px;=&quot;&quot; 12px;=&quot;&quot; align=&quot;justify&quot; arial,=&quot;&quot; font-family:=&quot;&quot; font-size:=&quot;&quot; helvetica,=&quot;&quot; lang=&quot;en&quot; margin-bottom:=&quot;&quot; margin-top:=&quot;&quot; sans-serif;=&quot;&quot; verdana,=&quot;&quot;&gt;
This will tremendously help us if we are developing applications that interact between users, and may have 2 or 3 emulators in your PC with the launched application or if you want to take a long test of an application while working in another.&lt;/div&gt;
&lt;div 10px;&quot;=&quot;&quot; 10px;=&quot;&quot; 12px;=&quot;&quot; align=&quot;justify&quot; arial,=&quot;&quot; font-family:=&quot;&quot; font-size:=&quot;&quot; helvetica,=&quot;&quot; margin-bottom:=&quot;&quot; margin-top:=&quot;&quot; sans-serif;=&quot;&quot; verdana,=&quot;&quot;&gt;
&lt;span lang=&quot;en&quot;&gt;As we get it?&amp;nbsp;&lt;/span&gt;&lt;span lang=&quot;en&quot;&gt;The first thing we have to do is go to the Inbox AddOns from the Phone Tools we can find in the following path:&lt;/span&gt;&lt;/div&gt;
&lt;div 10px;&quot;=&quot;&quot; 10px;=&quot;&quot; 12px;=&quot;&quot; align=&quot;justify&quot; arial,=&quot;&quot; font-family:=&quot;&quot; font-size:=&quot;&quot; helvetica,=&quot;&quot; margin-bottom:=&quot;&quot; margin-top:=&quot;&quot; sans-serif;=&quot;&quot; verdana,=&quot;&quot;&gt;
&lt;strong lang=&quot;en&quot;&gt;C:\ProgramData\Microsoft\Phone Tools\CoreCon\10.0\addons&lt;/strong&gt;&lt;/div&gt;
&lt;div 10px;&quot;=&quot;&quot; 10px;=&quot;&quot; 12px;=&quot;&quot; align=&quot;justify&quot; arial,=&quot;&quot; font-family:=&quot;&quot; font-size:=&quot;&quot; helvetica,=&quot;&quot; margin-bottom:=&quot;&quot; margin-top:=&quot;&quot; sans-serif;=&quot;&quot; verdana,=&quot;&quot;&gt;
&lt;span lang=&quot;en&quot;&gt;Once there we will find a file called&amp;nbsp;&lt;strong&gt;ImageConfig.en-US.xsl&lt;/strong&gt;.If edit you with a text editor will see that you it&#39;s an XML with the data for the implementation of the emulator.&amp;nbsp;&lt;/span&gt;&lt;span lang=&quot;en&quot;&gt;Within this XML have to change three properties: the name of the emulator, the GUID for the emulator and the VMID GUID.&lt;/span&gt;&lt;/div&gt;
&lt;div 10px;&quot;=&quot;&quot; 10px;=&quot;&quot; 12px;=&quot;&quot; align=&quot;justify&quot; arial,=&quot;&quot; font-family:=&quot;&quot; font-size:=&quot;&quot; helvetica,=&quot;&quot; lang=&quot;en&quot; margin-bottom:=&quot;&quot; margin-top:=&quot;&quot; sans-serif;=&quot;&quot; verdana,=&quot;&quot;&gt;
The first two will find them at the beginning of the file:&lt;/div&gt;
&lt;div 10px;&quot;=&quot;&quot; 10px;=&quot;&quot; 12px;=&quot;&quot; align=&quot;justify&quot; arial,=&quot;&quot; font-family:=&quot;&quot; font-size:=&quot;&quot; helvetica,=&quot;&quot; margin-bottom:=&quot;&quot; margin-top:=&quot;&quot; sans-serif;=&quot;&quot; verdana,=&quot;&quot;&gt;
&lt;strong lang=&quot;en&quot;&gt;&amp;lt; DEVICE Protected = &quot;true&quot; Name = &quot;Windows Phone Emulator&quot; ID = &quot;5E7661DF-D928-40ff-B747-A4B1957194F9&quot; &amp;gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div 10px;&quot;=&quot;&quot; 10px;=&quot;&quot; 12px;=&quot;&quot; align=&quot;justify&quot; arial,=&quot;&quot; font-family:=&quot;&quot; font-size:=&quot;&quot; helvetica,=&quot;&quot; lang=&quot;en&quot; margin-bottom:=&quot;&quot; margin-top:=&quot;&quot; sans-serif;=&quot;&quot; verdana,=&quot;&quot;&gt;
We need to generate a GUID, for example with the tool that includes Visual Studio Tools &amp;gt; Create GUID,&amp;nbsp;&lt;strong&gt;it is important to write the GUID without the keys generated by the tool!&lt;/strong&gt;&lt;/div&gt;
&lt;div 10px;&quot;=&quot;&quot; 10px;=&quot;&quot; 12px;=&quot;&quot; arial,=&quot;&quot; font-family:=&quot;&quot; font-size:=&quot;&quot; helvetica,=&quot;&quot; margin-bottom:=&quot;&quot; margin-top:=&quot;&quot; sans-serif;=&quot;&quot; verdana,=&quot;&quot;&gt;
&lt;a class=&quot;hoverZoomLink&quot; href=&quot;http://www.microsofttranslator.com/bv.aspx?from=&amp;amp;to=en&amp;amp;a=http%3A%2F%2Fgeeks.ms%2Fcfs-file.ashx%2F__key%2FCommunityServer.Blogs.Components.WeblogFiles%2Fjyeray%2Fimage_5F00_7F0DEAEA.png&quot; style=&quot;color: #006666;&quot; target=&quot;_top&quot;&gt;&lt;img alt=&quot;image&quot; border=&quot;0&quot; height=&quot;240&quot; src=&quot;http://geeks.ms/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jyeray/image_5F00_thumb_5F00_4FDBFF53.png&quot; style=&quot;background-image: none; border-bottom-color: initial; border-bottom-style: initial; border-bottom-width: 0px; border-left-color: initial; border-left-style: initial; border-left-width: 0px; border-right-color: initial; border-right-style: initial; border-right-width: 0px; border-top-color: initial; border-top-style: initial; border-top-width: 0px; display: block; float: none; margin-bottom: 0px; margin-left: auto; margin-right: auto; margin-top: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; width=&quot;236&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div 10px;&quot;=&quot;&quot; 10px;=&quot;&quot; 12px;=&quot;&quot; align=&quot;justify&quot; arial,=&quot;&quot; font-family:=&quot;&quot; font-size:=&quot;&quot; helvetica,=&quot;&quot; margin-bottom:=&quot;&quot; margin-top:=&quot;&quot; sans-serif;=&quot;&quot; verdana,=&quot;&quot;&gt;
&lt;span lang=&quot;en&quot;&gt;We also have to give it a unique name, for example &quot;&lt;strong&gt;Windows Phone Emulator 2&lt;/strong&gt;&quot;.&amp;nbsp;&lt;/span&gt;&lt;span lang=&quot;en&quot;&gt;The following key to modify the VMID, we can perform a search to locate it:&lt;/span&gt;&lt;/div&gt;
&lt;div 10px;&quot;=&quot;&quot; 10px;=&quot;&quot; 12px;=&quot;&quot; arial,=&quot;&quot; font-family:=&quot;&quot; font-size:=&quot;&quot; helvetica,=&quot;&quot; margin-bottom:=&quot;&quot; margin-top:=&quot;&quot; sans-serif;=&quot;&quot; verdana,=&quot;&quot;&gt;
&lt;strong&gt;&lt;span lang=&quot;en&quot;&gt;&amp;lt; PROPERTY ID = &quot;VMID&quot; Protected = &quot;false&quot; &amp;gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span lang=&quot;en&quot;&gt;{DF24EFAA-0FD3-44D1-8837-55E386D2905E}&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span lang=&quot;en&quot;&gt;&amp;lt; /PROPERTY &amp;gt;&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div 10px;&quot;=&quot;&quot; 10px;=&quot;&quot; 12px;=&quot;&quot; arial,=&quot;&quot; font-family:=&quot;&quot; font-size:=&quot;&quot; helvetica,=&quot;&quot; margin-bottom:=&quot;&quot; margin-top:=&quot;&quot; sans-serif;=&quot;&quot; verdana,=&quot;&quot;&gt;
&lt;span lang=&quot;en&quot;&gt;Here we have to copy another GUID, this time including the keys.&amp;nbsp;&lt;/span&gt;&lt;span lang=&quot;en&quot;&gt;Once done, if we open Visual Studio and load a Windows Phone project, we can see the different instances that run our application:&lt;/span&gt;&lt;/div&gt;
&lt;div 10px;&quot;=&quot;&quot; 10px;=&quot;&quot; 12px;=&quot;&quot; arial,=&quot;&quot; font-family:=&quot;&quot; font-size:=&quot;&quot; helvetica,=&quot;&quot; margin-bottom:=&quot;&quot; margin-top:=&quot;&quot; sans-serif;=&quot;&quot; verdana,=&quot;&quot;&gt;
&lt;a class=&quot;hoverZoomLink&quot; href=&quot;http://www.microsofttranslator.com/bv.aspx?from=&amp;amp;to=en&amp;amp;a=http%3A%2F%2Fgeeks.ms%2Fcfs-file.ashx%2F__key%2FCommunityServer.Blogs.Components.WeblogFiles%2Fjyeray%2Fimage_5F00_2A720BE5.png&quot; style=&quot;color: #006666;&quot; target=&quot;_top&quot;&gt;&lt;img alt=&quot;image&quot; border=&quot;0&quot; height=&quot;252&quot; src=&quot;http://geeks.ms/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jyeray/image_5F00_thumb_5F00_41BD1056.png&quot; style=&quot;background-image: none; border-bottom-color: initial; border-bottom-style: initial; border-bottom-width: 0px; border-left-color: initial; border-left-style: initial; border-left-width: 0px; border-right-color: initial; border-right-style: initial; border-right-width: 0px; border-top-color: initial; border-top-style: initial; border-top-width: 0px; display: block; float: none; margin-bottom: 0px; margin-left: auto; margin-right: auto; margin-top: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div 10px;&quot;=&quot;&quot; 10px;=&quot;&quot; 12px;=&quot;&quot; align=&quot;justify&quot; arial,=&quot;&quot; font-family:=&quot;&quot; font-size:=&quot;&quot; helvetica,=&quot;&quot; lang=&quot;en&quot; margin-bottom:=&quot;&quot; margin-top:=&quot;&quot; sans-serif;=&quot;&quot; verdana,=&quot;&quot;&gt;
They also will be available in the application of deployment:&lt;/div&gt;
&lt;div 10px;&quot;=&quot;&quot; 10px;=&quot;&quot; 12px;=&quot;&quot; align=&quot;justify&quot; arial,=&quot;&quot; font-family:=&quot;&quot; font-size:=&quot;&quot; helvetica,=&quot;&quot; margin-bottom:=&quot;&quot; margin-top:=&quot;&quot; sans-serif;=&quot;&quot; verdana,=&quot;&quot;&gt;
&lt;a class=&quot;hoverZoomLink&quot; href=&quot;http://www.microsofttranslator.com/bv.aspx?from=&amp;amp;to=en&amp;amp;a=http%3A%2F%2Fgeeks.ms%2Fcfs-file.ashx%2F__key%2FCommunityServer.Blogs.Components.WeblogFiles%2Fjyeray%2Fimage_5F00_46BF4E05.png&quot; style=&quot;color: #006666;&quot; target=&quot;_top&quot;&gt;&lt;img alt=&quot;image&quot; border=&quot;0&quot; height=&quot;480&quot; src=&quot;http://geeks.ms/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/jyeray/image_5F00_thumb_5F00_05449BAC.png&quot; style=&quot;background-image: none; border-bottom-color: initial; border-bottom-style: initial; border-bottom-width: 0px; border-left-color: initial; border-left-style: initial; border-left-width: 0px; border-right-color: initial; border-right-style: initial; border-right-width: 0px; border-top-color: initial; border-top-style: initial; border-top-width: 0px; display: block; float: none; margin-bottom: 0px; margin-left: auto; margin-right: auto; margin-top: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; width=&quot;525&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div 10px;&quot;=&quot;&quot; 10px;=&quot;&quot; 12px;=&quot;&quot; align=&quot;justify&quot; arial,=&quot;&quot; font-family:=&quot;&quot; font-size:=&quot;&quot; helvetica,=&quot;&quot; margin-bottom:=&quot;&quot; margin-top:=&quot;&quot; sans-serif;=&quot;&quot; verdana,=&quot;&quot;&gt;
&lt;span lang=&quot;en&quot;&gt;With this little trick can have several emulators on the same computer, in my tests have worked me extremely well up to a maximum of 3 emulators.&amp;nbsp;&lt;/span&gt;&lt;span lang=&quot;en&quot;&gt;With the 4th starting team has become unstable until block fully and I had to do a reset.&amp;nbsp;&lt;/span&gt;&lt;span lang=&quot;en&quot;&gt;It is very possible that this is due to that has not been able to gain control of a core by VT.&amp;nbsp;&lt;/span&gt;&lt;span lang=&quot;en&quot;&gt;Also, with 3 emulators initiates had been the same effect to answer a Skype voice call.&amp;nbsp;&lt;/span&gt;&lt;span lang=&quot;en&quot;&gt;However with 2 emulators I have not had any impact.&lt;/span&gt;&lt;span lang=&quot;en&quot;&gt;Consumption is very low on memory, about 100 Mb per emulator, so do not think that the problem comes from memory, I think that more is a question of processor resources.&amp;nbsp;&lt;/span&gt;&lt;span lang=&quot;en&quot;&gt;My PC is a Core i7 with 4 cores / 8 threads and 8 Gb of RAM.&lt;/span&gt;&lt;/div&gt;
&lt;div 10px;&quot;=&quot;&quot; 10px;=&quot;&quot; 12px;=&quot;&quot; align=&quot;justify&quot; arial,=&quot;&quot; font-family:=&quot;&quot; font-size:=&quot;&quot; helvetica,=&quot;&quot; lang=&quot;en&quot; margin-bottom:=&quot;&quot; margin-top:=&quot;&quot; sans-serif;=&quot;&quot; verdana,=&quot;&quot;&gt;
With this setting, having 3 initiated emulators not significantly affects the performance of the team.&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hyderest.blogspot.com/feeds/5413965997543966844/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://hyderest.blogspot.com/2012/01/windows-phone-75-run-multiple-instances.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1293315848732557676/posts/default/5413965997543966844'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1293315848732557676/posts/default/5413965997543966844'/><link rel='alternate' type='text/html' href='http://hyderest.blogspot.com/2012/01/windows-phone-75-run-multiple-instances.html' title='[Windows Phone 7.5] Run multiple instances of the emulator'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/11626174194942519396</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1293315848732557676.post-3181529408079963794</id><published>2012-01-29T18:38:00.000-08:00</published><updated>2012-01-29T18:40:33.766-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="FreeBSD"/><category scheme="http://www.blogger.com/atom/ns#" term="Jail"/><category scheme="http://www.blogger.com/atom/ns#" term="Sendmail"/><title type='text'>hash map &quot;Alias0&quot;: missing map file /etc/mail/aliases.db in FreeBSD jail</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;b style=&quot;font-family: arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;Problem:&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;Jan 30 18:11:22 hyder-home sm-mta[90213]: qJHNnr429401: SYSERR(root): hash map &quot;Alias0&quot;: missing map file /etc/mail/aliases.db: No such file or directory&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;font-family: arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;Solution:&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;# sendmail -bi&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;# ls -l /etc/mail/aliases.db&lt;/span&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: arial, sans-serif; font-size: 13px; text-align: -webkit-auto;&quot;&gt;Reference To:&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;http://gala4th.blogspot.com/2012/01/hash-map-alias0-missing-map-file.html&quot;&gt;http://gala4th.blogspot.com/2012/01/hash-map-alias0-missing-map-file.html&lt;/a&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hyderest.blogspot.com/feeds/3181529408079963794/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://hyderest.blogspot.com/2012/01/hash-map-alias0-missing-map-file.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1293315848732557676/posts/default/3181529408079963794'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1293315848732557676/posts/default/3181529408079963794'/><link rel='alternate' type='text/html' href='http://hyderest.blogspot.com/2012/01/hash-map-alias0-missing-map-file.html' title='hash map &quot;Alias0&quot;: missing map file /etc/mail/aliases.db in FreeBSD jail'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/11626174194942519396</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1293315848732557676.post-3668892199831322706</id><published>2012-01-29T18:34:00.000-08:00</published><updated>2012-01-29T18:34:08.560-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="FreeBSD"/><category scheme="http://www.blogger.com/atom/ns#" term="FreeBSD 8.2"/><category scheme="http://www.blogger.com/atom/ns#" term="Jail"/><title type='text'>Install Jails on FreeBSD 8.2</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;Install Jails on FreeBSD 8.2&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;Jails, sometimes referred to as an enhanced replacement of chroot environments, are a very powerful tool for system administrators, but their basic usage can also be useful for advanced users.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;Setting up the Host Environment&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;First, you will want to set up your real system&#39;s environment to be &quot;jail-friendly&quot;.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;For consistency, we will refer to the parent box as the &quot;host environment&quot;, and to the jailed virtual machine as the &quot;jail environment&quot;. Since jail is implemented using IP aliases, one of the first things to do is to disable IP services on the host system that listen on all local IP addresses for a service. If a network service is present in the host environment that binds all available IP addresses rather than specific IP addresses, it may service requests sent to jail IP addresses if the jail did not bind the port. This means changing inetd(8) to only listen on the appropriate IP address, and so forth. Add the following to /etc/rc.conf in the host environment:&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;sendmail_enable=&quot;NO&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;inetd_flags=&quot;-wW -a 192.168.0.1&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;rpcbind_enable=&quot;NO&quot;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;man inetd for more information.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;192.168.0.1 is the native IP address for the host system, in this example. Daemons that run out of inetd(8) can be easily set to use only the specified host IP address. Other daemons will need to be manually configured for some this is possible through the rc.conf(5) flags entries; for others it is necessary to modify per-application configuration files, or to recompile the applications. The following frequently deployed services must have their individual configuration files modified to limit the application to listening to a specific IP address:&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;To configure sshd(8), it is necessary to modify /etc/ssh/sshd_config.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;To configure sendmail(8), it is necessary to modify&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;/etc/mail/sendmail.cf.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;For named(8), it is necessary to modify /etc/namedb/named.conf.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;In addition, a number of services must be recompiled in order to run them in the host environment. This includes most applications providing services using rpc(3), such as rpcbind(8), nfsd(8), and mountd(8). In general, applications for which it is not possible to specify which IP address to bind should not be run in the host environment unless they should also service requests sent to jail IP addresses. Attempting to serve NFS from the host environment may also cause confusion, and cannot be easily reconfigured to use only specific IPs, as some NFS services are hosted directly from the kernel. Any third-party network software running in the host environment should also be checked and configured so that it does not bind all IP addresses, which would result in those services&#39; also appearing to be offered by the jail environments.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;Once these daemons have been disabled or fixed in the host environment, it is best to reboot so that all daemons are in a known state, to reduce the potential for confusion later (such as finding that when you send mail to a jail, and its sendmail is down, the mail is delivered to the host, etc.).&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;Getting services to not listen to *&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;First off, we should make sure we get the system so that we have nothing listening on *, to check what what we need to modify issue this command&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# sockstat | grep &quot;\*:[0-9]&quot;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;This should give you a synopsys of all the processes and ports you need to trim down. Here are some hints with your ipv4 addr being 10.0.0.1 and your ipv6 addr being 2002::7ea9&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# vi /etc/rc.conf&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;sendmail_enable=&quot;NO&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;inetd_flags=&quot;-wW -a 192.168.0.1&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;rpcbind_enable=&quot;NO&quot;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;sshd:&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# vim /etc/ssh/sshd_config&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;change ListenAddress derivative&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;ListenAddress 192.168.0.1&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;ListenAddress 192.168.0.111&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;ListenAddress 2002::7ea9&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;syslogd:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# vim /etc/rc.conf&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;### enable syslogd, no network socket will be opened for syslogd&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;syslogd_enable=&quot;YES&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;syslogd_flags=&quot;-s -s&quot;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;rsyncd:&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# vim /usr/local/etc/rsyncd.conf&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;address = 192.168.0.1&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;MySQL:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# vim /etc/my.cnf&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;bind-address=10.0.0.1&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;Samba:&lt;/b&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;&amp;nbsp;(this will get you most of the way there)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;edit /usr/local/etc/smb.conf&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;change the following:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;interfaces = 10.0.0.242/24 127.0.0.1&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;socket address = 10.0.0.242&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;bind interfaces only = yes&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;note: if you don&#39;t need wins lookups and netbios name translation&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;you can safely disable nmbd. There doesn&#39;t seem to be a way&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;for nmb to not listen to *:138 anyhow.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;To disable nmb go to /etc/rc.conf and replace samba_enable=&quot;YES&quot; with smbd_enable=&quot;YES&quot;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;open ntpd&lt;/b&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;&amp;nbsp;(xntpd listens on all and cannot be changed)&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# vim /usr/local/etc/ntpd.conf&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;listen on 10.0.0.1&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;listen on 2002::7ea9&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;bind&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;edit your named.conf (may be in /var/named/etc/named.conf)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;In the options section:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;listen-on { 10.0.0.242; };&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;listen-on-v6 port 53 { 2002:d8fe:10f1:6:202:b3ff:fea9:7ea9; };&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;query-source address 10.0.0.242 port *;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;query-source-v6 address 2002:d8fe:10f1:6:202:b3ff:fea9:7ea9 port *;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;The file system layout is described in the following list:&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;- Each jail will be mounted under the /home/jail/THE_JAIL_NAME directory.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;- /home/jail/read-only/root # is the template for each jail and the read-only partition for all of the jails.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;- A blank directory will be created for each jail under the /home/jail directory.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;- Each jail shall have its own read-write system that is based upon /home/jail/read-only/skel.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;- Each jailspace (read-write portion of each jail) shall be created in /home/jail/read-write/THE_JAIL_NAME.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;- Each jail will have a /s directory, that will be linked to the read-write portion of the system.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;Creating the Template&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;This section will describe the steps needed to create the master template that will be the read-only portion for the jails to use.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;It is always a good idea to update the FreeBSD system to the latest -RELEASE branch. Check the corresponding Handbook Chapter to accomplish this task. In the case the update is not feasible, the buildworld will be required in order to be able to proceed. Additionally, the sysutils/cpdup package will be required. We will use the portsnap(8) utility to download the FreeBSD Ports Collection. The Handbook Portsnap Chapter is always good reading for newcomers.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;Install cpdup&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# cd /usr/ports/sysutils/cpdup ; make install clean&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;Create directories&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# mkdir /home/jail&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# mkdir /home/jail/read-only&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# mkdir /home/jail/read-write&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;Create a directory structure for the read-only file system which will contain the FreeBSD binaries for our jails:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# mkdir /home/jail/read-only/root&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;Change directory to the FreeBSD source tree and install the read-only file system to the jail template:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# cd /usr/src&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;If you have already rebuilt your userland using make world or make buildworld, you can skip following step and install your existing userland into the new jail.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# make buildworld&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;This command will populate the directory subtree chosen as jail&#39;s physical location on the file system with the necessary binaries, libraries, manual pages and so on.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# make installworld DESTDIR=/home/jail/read-only/root&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;The distribution target for make installs every needed configuration file. In simple words, it installs every installable file of /usr/src/etc/ to the /etc directory of the jail environment: /home/jail/THE_JAIL_NAME/etc/.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# make distribution DESTDIR=/home/jail/read-only/root&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;Next, prepare a FreeBSD Ports Collection for the jails as well as a FreeBSD source tree, which is required for mergemaster:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# mkdir /home/jail/read-only/root/usr/ports&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# portsnap -p /home/jail/read-only/root/usr/ports fetch extract&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# portsnap -p /home/jail/read-only/root/usr/ports fetch update&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# cpdup /usr/src /home/jail/read-only/root/usr/src&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;Setup for Drupal:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# cd /home/jail/read-only/root&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# mkdir www&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# cd www&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# fetch http://ftp.drupal.org/files/projects/drupal-6.22.tar.gz&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# tar zxvf drupal-6.22.tar.gz&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# mv drupal-6.22 drupal6&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# chown -R root:wheel drupal6&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;Create a skeleton for the read-write portion of the system:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# mkdir /home/jail/read-only/skel&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# mkdir /home/jail/read-only/skel/home&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# mkdir /home/jail/read-only/skel/usr-X11R6&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# mkdir /home/jail/read-only/skel/distfiles&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;??? # mkdir /home/jail/read-only/skel/drupal-sites&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;??? # mkdir /home/jail/read-only/skel/drupal-files&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# cd /home/jail/read-only/root&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# mv etc /home/jail/read-only/skel&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# mv usr/local /home/jail/read-only/skel/usr-local&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# mv tmp /home/jail/read-only/skel&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# mv var /home/jail/read-only/skel&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# mv root /home/jail/read-only/skel&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# mv www/drupal6/sites /home/jail/read-only/skel/drupal-sites&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;Use mergemaster to install missing configuration files. Then get rid of the extra directories that mergemaster creates:&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# mergemaster -t /home/jail/read-only/skel/var/tmp/temproot -D /home/jail/read-only/skel -i&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;How should I handle ./.cshrc? [Leave it to install later] enter&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;How should I handle ./.profile? [Leave it to install later] enter&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;...&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;keep pressing space until you see end : q&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;*** You installed a login.conf file, so make sure that you run&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;&#39;/usr/bin/cap_mkdb /home/jail/read-only/skel/etc/login.conf&#39;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;to rebuild your login.conf database&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;Would you like to run it now? y or n [n] y&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;*** You installed a services file, so make sure that you run&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;&#39;/usr/sbin/services_mkdb -q -o /home/jail/read-only/skel/var/db/services.db /home/jail/read-only/skel/etc/services&#39;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;to rebuild your services database&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;Would you like to run it now? y or n [n] y&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;*** You installed a new master.passwd file, so make sure that you run&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;&#39;/usr/sbin/pwd_mkdb -d /home/jail/read-only/skel/etc -p /home/jail/read-only/skel/etc/master.passwd&#39;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;to rebuild your password files&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;Would you like to run it now? y or n [n] y&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# cd /home/jail/read-only/skel&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# rm -R bin boot lib libexec mnt proc rescue sbin sys usr dev&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;Now, symlink the read-write file system to the read-only file system. Please make sure that the symlinks are created in the correct s/ locations. Real directories or the creation of directories in the wrong locations will cause the installation to fail.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# cd /home/jail/read-only/root&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# mkdir s&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# ln -s s/etc etc&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# ln -s s/home home&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# ln -s s/root root&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# ln -s ../s/usr-local usr/local&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# ln -s ../s/usr-X11R6 usr/X11R6&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# ln -s ../../s/distfiles usr/ports/distfiles&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# ln -s s/tmp tmp&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# ln -s s/var var&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# ln -s s/home/cwn_www/nginx www&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# ln -s s/home/cwn_www/scripts scripts&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;??? # ln -s ../../s/drupal-sites www/drupal6/sites&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;??? # ln -s ../../../../s/drupal-files www/drupal6/sites/default/files&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;??? Changing the directory permission&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;??? # find /home/jail -type d -print0 | xargs -0 -I @ sh -c &#39;chmod 700 @ ; chown root:wheel @&#39;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;As a last step, create a generic /home/jail/read-only/skel/etc/make.conf with its contents as shown below:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# echo &#39;WRKDIRPREFIX?= /s/portbuild&#39; &amp;gt;&amp;gt; /home/jail/read-only/skel/etc/make.conf&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;Having WRKDIRPREFIX set up this way will make it possible to compile FreeBSD ports inside each jail. Remember that the ports directory is part of the read-only system. The custom path for WRKDIRPREFIX allows builds to be done in the read-write portion of every jail.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;Creating Jails:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;Now that we have a complete FreeBSD jail template, we can setup and configure the jails in /etc/rc.conf. This example demonstrates the creation of 3 jails: &quot;NS&quot;, &quot;MAIL&quot; and &quot;WWW&quot;.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;Put the following lines into the /etc/fstab file, so that the read-only template for the jails and the read-write space will be available in the respective jails:&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# vim /etc/fstab&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;### read-only partitions&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;/home/jail/read-only/root /home/jail/read-only/ns nullfs ro 0 0&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;/home/jail/read-only/root /home/jail/read-only/mail nullfs ro 0 0&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;/home/jail/read-only/root /home/jail/read-only/www nullfs ro 0 0&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;### read-write partitions&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;/home/jail/read-write/ns /home/jail/read-only/ns/s nullfs rw 0 0&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;/home/jail/read-write/mail /home/jail/read-only/mail/s nullfs rw 0 0&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;/home/jail/read-write/www /home/jail/read-only/www/s nullfs rw 0 0&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;Note:&lt;/b&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;&amp;nbsp;Partitions marked with a 0 pass number are not checked by fsck(8) during boot, and partitions marked with a 0 dump number are not backed up by dump(8). We do not want fsck to check nullfs mounts or dump to back up the read-only nullfs mounts of the jails. This is why they are marked with &quot;0 0&quot; in the last two columns of each fstab entry above.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# vim /etc/rc.conf&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;text-align: -webkit-auto; text-indent: 10px;&quot;&gt;### for jail host
ifconfig_re0=&quot;inet 192.168.0.1  netmask 255.255.255.0&quot;

### for jail guests
ifconfig_re0_alias0=&quot;inet 192.168.0.2 netmask 255.255.255.255&quot;
ifconfig_re0_alias1=&quot;inet 192.168.0.3 netmask 255.255.255.255&quot;
ifconfig_re0_alias2=&quot;inet 192.168.0.4 netmask 255.255.255.255&quot;

### jail settings
jail_enable=&quot;YES&quot;                   # Set to NO to disable starting of any jails
jail_set_hostname_allow=&quot;NO&quot;        # Allow root user in a jail to change its hostname
#jail_socket_unixiproute_only=&quot;YES&quot; # Route only TCP/IP within a jail
jail_list=&quot;ns mail www&quot;             # Space separated list of names of jails
                                    # Note: Jail names in jail_list should contain alphanumeric characters only.

### j-ns
jail_ns_hostname=&quot;j-ns.local&quot;                  # jail&#39;s hostname
jail_ns_ip=&quot;192.168.0.2&quot;                 # jail&#39;s IP address
jail_ns_rootdir=&quot;/home/jail/read-only/ns&quot; # jail&#39;s root directory
jail_ns_devfs_enable=&quot;YES&quot;               # mount devfs in the jail
jail_ns_devfs_ruleset=&quot;ns_ruleset&quot;       # devfs ruleset to apply to jail

### j-mail
jail_mail_hostname=&quot;j-mail.local&quot;                  # jail&#39;s hostname
jail_mail_ip=&quot;192.168.0.3&quot;                   # jail&#39;s IP address
jail_mail_rootdir=&quot;/home/jail/read-only/mail&quot; # jail&#39;s root directory
jail_mail_devfs_enable=&quot;YES&quot;                 # mount devfs in the jail
jail_mail_devfs_ruleset=&quot;mail_ruleset&quot;       # devfs ruleset to apply to jail

### j-www
jail_www_hostname=&quot;j-www.local&quot;                  # jail&#39;s hostname
jail_www_ip=&quot;192.168.0.4&quot;                  # jail&#39;s IP address
jail_www_rootdir=&quot;/home/jail/read-only/www&quot; # jail&#39;s root directory
jail_www_devfs_enable=&quot;YES&quot;                # mount devfs in the jail
jail_www_devfs_ruleset=&quot;www_ruleset&quot;       # devfs ruleset to apply to jail
&lt;/pre&gt;
&lt;br /&gt;
&lt;b style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;Note:&lt;/b&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;&amp;nbsp;The jail_name_rootdir variable must not be set to a path which includes a symbolic link, otherwise the jails will refuse to start. Use the realpath(1) utility to determine a value which should be set to this variable. Please see the FreeBSD-SA-07:01.jail Security Advisory for more information.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;Note:&lt;/b&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;&amp;nbsp;for devfs ruleset, cat /etc/defaults/devfs.rules.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;Make sure your jail host has all the IP addresses for jail guests:&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# /etc/rc.d/netif restart &amp;amp;&amp;amp; /etc/rc.d/routing restart&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# ifconfig&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;Create the required mount points for the read-only file system of each jail:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# cd /home/jail/read-only&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# mkdir ns mail www&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;??? # chmod 700 ns mail www&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;??? # chown root:wheel ns mail www&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;Install the read-write template into each jail. Note the use of sysutils/cpdup, which helps to ensure that a correct copy is done of each directory:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# cpdup /home/jail/read-only/skel /home/jail/read-write/ns&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# cpdup /home/jail/read-only/skel /home/jail/read-write/mail&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# cpdup /home/jail/read-only/skel /home/jail/read-write/www&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;In this phase, the jails are built and prepared to run. First, mount the required file systems for each jail, and then start them using the /etc/rc.d/jail script:&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# mount -a&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# df -h&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;Start a specific jail:&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# /etc/rc.d/jail start ns&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# /etc/rc.d/jail start mail&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# /etc/rc.d/jail start www&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;Start all jails:&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# /etc/rc.d/jail start&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;Stop a specific jail:&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# /etc/rc.d/jail stop www&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;A clean way to shut down a jail(8) is not available at the moment. This is because commands normally used to accomplish a clean system shutdown cannot be used inside a jail. The best way to shut down a jail is to run the following command from within the jail itself or using the jexec(8) utility from outside the jail:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;j-www # sh /etc/rc.shutdown&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;or&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# jexec 2 shutdown -p now&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;The jails should be running now. To check if they have started correctly, use the jls(8) command. Its output should be similar to the following:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# jls&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;JID IP Address Hostname Path&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;7 192.168.0.2 j-ns /home/jail/read-only/ns&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;8 192.168.0.3 j-mail /home/jail/read-only/mail&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;9 192.168.0.4 j-www /home/jail/read-only/www&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;At this point, it should be possible to log onto each jail, add new users or configure daemons. The JID column indicates the jail identification number of each running jail. Use the following command in order to perform administrative tasks in the jail whose JID is 9:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# jexec 9 tcsh&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;Use google&#39;s public DNS server as a DNS resolver:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;j-www # vi /etc/resolv.conf&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;nameserver 8.8.8.8&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;nameserver 8.8.4.4&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;Modify /etc/rc.conf:&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;j-www # vi /etc/rc.conf&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;### enable syslogd, no network socket will be opened for syslogd&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;syslogd_enable=&quot;YES&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;syslogd_flags=&quot;-s -s&quot;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;### SendMail&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;sendmail_enable=&quot;NO&quot;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;Modify /etc/hosts:&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;j-www # vim /etc/hosts&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;::1 localhost localhost.j-www.local&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;127.0.0.1 localhost localhost.j-www.local&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;192.168.100.34 j-www.local j-www&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;To fix this error &quot;hash map &quot;Alias0&quot;: missing map file /etc/mail/aliases.db in FreeBSD jail&quot;:&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# sendmail -bi&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# ls -l /etc/mail/aliases.db&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;Note:&lt;/b&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;&amp;nbsp;you must edit /etc/hosts before running sendmail -bi command.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;Comment out adjkerntz in crontab:&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;j-www # vim /etc/crontab&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;#1,31 0-5 * * * root adjkerntz -a&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;SVN server setup&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# cd /usr/ports/devel/subversion&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# make install clean&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;Make sure you DO uncheck this option:&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;[] BDB=off &quot;db4 repository backend&quot;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# mv /usr/local/bin/svn /usr/local/bin/svn.orig&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# vi /usr/local/bin/svn&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;text-align: -webkit-auto; text-indent: 10px;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;
#!/bin/sh

### initialize
svnarg=&quot;&quot;

### use encoding utf-8 as default if run &quot;svn ci&quot; or &quot;svn commit&quot;.
if [ &quot;$1&quot; != &quot;help&quot; ]; then
  for myarg in &quot;$@&quot;; do
    if [ &quot;${myarg}&quot; = &quot;commit&quot; ] || [ &quot;${myarg}&quot; = &quot;ci&quot; ]; then
      svnarg=&quot;--encoding utf-8&quot;
      break
    fi
  done
fi

### wrapper script to set umask to 027 on subversion binaries
### Note: the meaning of each umask:
### umask 002 // File permission 644. Owner can read/write. Group and Others can only read.
### umask 007 // File permission 660. Owner and Group can read/write. Others can not read or write.
### umask 027 // File permission 640. Owner can read/write. Group can read. Others can not read or write.
umask 027

### svn command
/usr/local/bin/svn.orig ${svnarg} &quot;$@&quot;
&lt;/span&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;Don&#39;t forget to make your wrapper script executable:&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# chmod +x /usr/local/bin/svn&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# mkdir /home/jail/svn-rep&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# cd /home/jail/svn-rep&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# svnadmin create ns&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# svnadmin create mail&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# svnadmin create www&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# vi www/conf/svnserve.conf&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;[general]&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;anon-access = none&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;auth-access = write&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;password-db = passwd&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# vi www/conf/passwd&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;[users]&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;danny = mypassword&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; font-weight: bold; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;Start SVN server as a stand-alone daemon&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# /usr/local/bin/svnserve -d --listen-port=3690 --listen-host=0.0.0.0 -r /home/jail/svn-rep&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# vi /etc/rc.conf&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;### SVN&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;svnserve_enable=&quot;YES&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;svnserve_flags=&quot;-d --listen-port=3690 --listen-host=0.0.0.0&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;svnserve_data=&quot;/home/jail/svn-rep&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;svnserve_user=&quot;root&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;svnserve_group=&quot;wheel&quot;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# svn import /home/jail/read-only/skel/drupal-sites/all file:///home/jail/svn-rep/www -m &quot;initial import&quot;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;SVN client setup&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# rm -r /www/drupal6/sites/all/*&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# svn checkout svn://192.168.0.1/www /www/drupal6/sites/all&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;sending mail through sendmail inside a jail:&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# cat mail.php&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;&amp;lt;?php&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;mail(&#39;test@example.com&#39;, &#39;My Subject&#39;, &#39;my msg&#39;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# php mail.php&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;collect: Cannot write ./dfpA4NVE5H097195 (bfcommit, uid=25, gid=25): Permission denied&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;queueup: cannot create queue file ./qfpA4NVE5H097195, euid=25, fd=-1, fp=0x0: Permission denied&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# chown smmsp:smmsp /var/spool/clientmqueue&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# chmod 770 /var/spool/clientmqueue&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;Fine Tuning and Administration&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;There are several options which can be set for any jail, and various ways of combining a host FreeBSD system with jails, to produce higher level applications. This section presents:&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;Some of the options available for tuning the behavior and security restrictions implemented by a jail installation.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;Some of the high-level applications for jail management, which are available through the FreeBSD Ports Collection, and can be used to implement overall jail-based solutions.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;Fine tuning of a jail&#39;s configuration is mostly done by setting sysctl(8) variables. A special subtree of sysctl exists as a basis for organizing all the relevant options: the security.jail.* hierarchy of FreeBSD kernel options. Here is a list of the main jail-related sysctls, complete with their default value. Names should be self-explanatory, but for more information about them, please refer to the jail(8) and sysctl(8) manual pages.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;security.jail.set_hostname_allowed: 1&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;security.jail.socket_unixiproute_only: 1&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;security.jail.sysvipc_allowed: 0&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;security.jail.enforce_statfs: 2&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;security.jail.allow_raw_sockets: 0&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;security.jail.chflags_allowed: 0&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;security.jail.jailed: 0&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;These variables can be used by the system administrator of the host system to add or remove some of the limitations imposed by default on the root user. Note that there are some limitations which cannot be removed. The root user is not allowed to mount or unmount file systems from within a jail(8). The root inside a jail may not load or unload devfs(8) rulesets, set firewall rules, or do many other administrative tasks which require modifications of in-kernel data, such as setting the securelevel of the kernel.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;Ping from jail not permitted error&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;ICMP is disallowed by defaut for jails, see the sysctl :&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# echo security.jail.allow_raw_sockets=1 &amp;gt;&amp;gt; /etc/sysctl.conf&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;Now restart your jails and the problem should be fixed.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;There are good reasons for this default, so if you test remember to set it back when you are done.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;Also, on a point of style, jails in their current form (see VIMAGE) do not get a network stack of their own so they don&#39;t have a firewall but share the hosts&#39; network and firewall, etc.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;Cannot remove files inside a jail directory&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;override r-sr-xr-x root/wheel schg for j/mroot/bin/rcp? y&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;rm: j/mroot/bin/rcp: Operation not permitted&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;rm: j/mroot/bin: Directory not empty&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;override r--r--r-- root/wheel schg for j/mroot/lib/libc.so.7? y&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;rm: j/mroot/lib/libc.so.7: Operation not permitted&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# chflags -R noschg /home/jail/read-write/ns&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# rm -r /home/jail/read-write/ns&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;High-level administrative tools in FreeBSD Ports Collection&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# cd /usr/ports/sysutils/jailutils ; make install clean&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# cd /usr/ports/sysutils/ezjail ; make install clean&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;Reference To:&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;http://gala4th.blogspot.com/2012/01/install-jails-on-freebsd-82.html&quot;&gt;http://gala4th.blogspot.com/2012/01/install-jails-on-freebsd-82.html&lt;/a&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hyderest.blogspot.com/feeds/3668892199831322706/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://hyderest.blogspot.com/2012/01/install-jails-on-freebsd-82.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1293315848732557676/posts/default/3668892199831322706'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1293315848732557676/posts/default/3668892199831322706'/><link rel='alternate' type='text/html' href='http://hyderest.blogspot.com/2012/01/install-jails-on-freebsd-82.html' title='Install Jails on FreeBSD 8.2'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/11626174194942519396</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1293315848732557676.post-4510373865173658755</id><published>2012-01-15T21:08:00.000-08:00</published><updated>2012-01-15T21:08:13.805-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="FreeBSD"/><category scheme="http://www.blogger.com/atom/ns#" term="FreeBSD 8.2"/><category scheme="http://www.blogger.com/atom/ns#" term="Samba"/><title type='text'>Install Samba on FreeBSD 8.2</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;div class=&quot;post-body entry-content&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;
root@bmw0 [/root] # cd /usr/ports/net/samba36; make install clean&lt;br /&gt;
&lt;br /&gt;
Edit smb.conf&lt;br /&gt;
&lt;br /&gt;
root@bmw0 [/root] # vi /usr/local/etc/smb.conf&lt;br /&gt;
security = user&lt;br /&gt;
hosts allow = 192.168.100. 192.168.200.168 127.&lt;br /&gt;
&lt;br /&gt;
[syncdb]&lt;br /&gt;
comment = hmm&lt;br /&gt;
path = /usr/local/www/apache22/data/syncdb&lt;br /&gt;
valid users = sambauser&lt;br /&gt;
public = no&lt;br /&gt;
writable = yes&lt;br /&gt;
printable = no&lt;br /&gt;
create mask = 0640&lt;br /&gt;
; write list = @staff&lt;br /&gt;
&lt;br /&gt;
Add a user called &quot;sambauser&quot;&lt;br /&gt;
root@bmw0 [/root] # adduser&lt;br /&gt;
&lt;br /&gt;
Adding users to samba&lt;br /&gt;
root@bmw0 [/root] # smbpasswd –a&lt;br /&gt;
or&lt;br /&gt;
root@bmw0 [/root] # /usr/local/bin/pdbedit -a username&lt;br /&gt;
&lt;br /&gt;
Start Samba&lt;br /&gt;
root@bmw0 [/root] # /usr/local/etc/rc.d/samba start&lt;br /&gt;
&lt;br /&gt;
Check to see if samba is running&lt;br /&gt;
root@bmw0 [/root] # ps -auwxx | egrep &#39;[sn]mbd&#39;&lt;br /&gt;
&lt;br /&gt;
Test samba using smbclient&lt;br /&gt;
root@bmw0 [/root] # /usr/local/bin/smbclient -U username \\\\localhost\\username&lt;br /&gt;
or&lt;br /&gt;
root@bmw0 [/root] # /usr/local/bin/smbclient -U username //localhost/username&lt;br /&gt;
&lt;br /&gt;
Edit rc.conf&lt;br /&gt;
root@bmw0 [/root] # vi /etc/rc.conf&lt;br /&gt;
### Samba&lt;br /&gt;
samba_enable=&quot;YES&quot;&lt;br /&gt;
nmbd_enable=&quot;YES&quot;&lt;br /&gt;
smbd_enable=&quot;YES&quot;&lt;br /&gt;
&lt;br /&gt;
Edit ipfw.rules&lt;br /&gt;
root@bmw0 [/root] # vi /usr/local/etc/ipfw.rules&lt;br /&gt;
### samba&lt;br /&gt;
$IPF 260 allow tcp from 192.168.100.0/24 to any 139 in&lt;/div&gt;
&lt;div class=&quot;post-body entry-content&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;post-body entry-content&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;
Refernce To:&lt;a href=&quot;http://gala4th.blogspot.com/2012/01/install-samba-on-freebsd-82.html&quot; style=&quot;background-color: transparent; text-align: left;&quot;&gt;http://gala4th.blogspot.com/2012/01/install-samba-on-freebsd-82.html&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hyderest.blogspot.com/feeds/4510373865173658755/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://hyderest.blogspot.com/2012/01/install-samba-on-freebsd-82.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1293315848732557676/posts/default/4510373865173658755'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1293315848732557676/posts/default/4510373865173658755'/><link rel='alternate' type='text/html' href='http://hyderest.blogspot.com/2012/01/install-samba-on-freebsd-82.html' title='Install Samba on FreeBSD 8.2'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/11626174194942519396</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1293315848732557676.post-6830864549708780683</id><published>2012-01-10T21:00:00.000-08:00</published><updated>2012-01-10T21:00:54.638-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="FreeBSD"/><category scheme="http://www.blogger.com/atom/ns#" term="FreeBSD 8.2"/><category scheme="http://www.blogger.com/atom/ns#" term="Nginx"/><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><category scheme="http://www.blogger.com/atom/ns#" term="PHP-FPM"/><category scheme="http://www.blogger.com/atom/ns#" term="Varnish"/><title type='text'>Install Nginx, PHP-FPM and Varnish on FreeBSD 8.2</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;Install Nginx, PHP-FPM and Varnish on FreeBSD 8.2&lt;/span&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# cd /usr/ports/www/nginx&lt;/span&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# make install clean&lt;/span&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;b style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;Note:&lt;/b&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;&amp;nbsp;make sure you select important option such as:&lt;/span&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;HTTP_REWRITE_MODULE=on&lt;/span&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;HTTP_SSL_MODULE=on&lt;/span&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;and others as per your requirements.&lt;/span&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# echo &#39;### Nginx&#39; &amp;lt;&amp;lt; /etc/rc.conf&lt;/span&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# echo &#39;nginx_enable=&quot;YES&quot;&#39; &amp;lt;&amp;lt; /etc/rc.conf&lt;/span&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# vim /usr/local/etc/nginx/nginx.conf&lt;/span&gt;&lt;br /&gt;
&lt;pre style=&quot;text-align: -webkit-auto; text-indent: 10px;&quot;&gt;gzip on;
    gzip_min_length 1000;
    gzip_proxied expired no-cache no-store private auth;
    gzip_disable &quot;MSIE [1-6]\.&quot;;
    gzip_types text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript;

    server {
            server_name mydomain1.com mydomain2.com mydomain3.com;
            root /usr/local/www/nginx/drupal7; ## &amp;lt;-- Your only path reference.

            client_max_body_size 20M; # Maximum allowed size for uploaded files

            location = /favicon.ico {
                    log_not_found off;
                    access_log off;
            }

            location = /robots.txt {
                    allow all;
                    log_not_found off;
                    access_log off;
            }

            # This matters if you use drush
            location = /backup {
                    deny all;
            }

            # Very rarely should these ever be accessed outside of your lan
            location ~* \.(txt|log)$ {
                    allow 192.168.0.0/16;
                    deny all;
            }

            location ~ \..*/.*\.php$ {
                    return 403;
            }

            location / {
                    # This is cool because no php is touched for static content
                    try_files $uri @rewrite;
            }

            location @rewrite {
                    # Some modules enforce no slash (/) at the end of the URL
                    # Else this rewrite block wouldn&#39;t be needed (GlobalRedirect)
                    rewrite ^/(.*)$ /index.php?q=$1;
            }

            location ~ \.php$ {
                    fastcgi_split_path_info ^(.+\.php)(/.+)$;
                    ### NOTE: You should have &quot;cgi.fix_pathinfo = 0&quot; in php.ini
                    include fastcgi_params;
                    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                    fastcgi_intercept_errors on;
      #fastcgi_pass 127.0.0.1:9000;  #pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
                    fastcgi_pass unix:/tmp/php-fpm.sock;
            }

            # Fighting with ImageCache? This little gem is amazing.
            location ~ ^/sites/.*/files/imagecache/ {
                    try_files $uri @rewrite;
            }
            # Catch image styles for D7 too.
            location ~ ^/sites/.*/files/styles/ {
                    try_files $uri @rewrite;
            }

            location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
                    expires max;
                    log_not_found off;
            }

            # nginx status
            location /NginxStatus {
              stub_status on;
              access_log on;
              auth_basic NginxStatus;
              auth_basic_user_file conf/htpasswd;
            }
    }
&lt;/pre&gt;
&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# /usr/local/etc/rc.d/nginx start&lt;/span&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;b style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;Change this line for nginx:&lt;/b&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# vim /usr/local/etc/php.ini&lt;/span&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;cgi.fix_pathinfo = 0&lt;/span&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;b style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;Install php and php-fpm:&lt;/b&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;// For PHP5.3&lt;/span&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# cd /usr/ports/lang/php5 ; make install&lt;/span&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;// For PHP5.2&lt;/span&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# cd /usr/ports/lang/php52 ; make install&lt;/span&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;===&amp;lt; The following configuration options are available for php5-5.3.8:&lt;/span&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;CLI=on &quot;Build CLI version&quot;&lt;/span&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;CGI=on &quot;Build CGI version&quot;&lt;/span&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;FPM=on &quot;Build FPM version (experimental)&quot;&lt;/span&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;APACHE=off &quot;Build Apache module&quot;&lt;/span&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;AP2FILTER=off &quot; Use Apache 2.x filter interface (experimental)&quot;&lt;/span&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;DEBUG=off &quot;Enable debug&quot;&lt;/span&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;SUHOSIN=on &quot;Enable Suhosin protection system&quot;&lt;/span&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;MULTIBYTE=on &quot;Enable zend multibyte support&quot;&lt;/span&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;IPV6=off &quot;Enable ipv6 support&quot;&lt;/span&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;MAILHEAD=on &quot;Enable mail header patch&quot;&lt;/span&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;LINKTHR=on &quot;Link thread lib (for threaded extensions)&quot;&lt;/span&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;===&amp;lt; Use &#39;make config&#39; to modify these settings&lt;/span&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;// For PHP5.3&lt;/span&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# cp /usr/local/etc/php.ini-production /usr/local/etc/php.ini&lt;/span&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;// For PHP5.2&lt;/span&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# cp /usr/local/etc/php.ini-recommended /usr/local/etc/php.ini&lt;/span&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;b style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;Install PHP Extensions&lt;/b&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;// For PHP5.3&lt;/span&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# cd /usr/ports/lang/php5-extensions ; make install&lt;/span&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;// For PHP5.2&lt;/span&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# cd /usr/ports/lang/php52-extensions ; make install&lt;/span&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;b style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;Edit php-fpm.conf:&lt;/b&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# vim /usr/local/etc/php-fpm.conf&lt;/span&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;; comment out following line and add the line below.&lt;/span&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;;listen = 127.0.0.1:9000&lt;/span&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;listen = /tmp/php-fpm.sock&lt;/span&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;request_terminate_timeout=30s&lt;/span&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;b style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;Edit rc.conf&lt;/b&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# vim /etc/rc.conf&lt;/span&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;### php-fpm&lt;/span&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;php_fpm_enable=&quot;YES&quot;&lt;/span&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;Change this line for nginx&lt;/span&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# vim /usr/local/etc/php.ini&lt;/span&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;cgi.fix_pathinfo = 0&lt;/span&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# /usr/local/etc/rc.d/php-fpm start&lt;/span&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# tail /var/log/nginx-error.log&lt;/span&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# tail /var/log/php-fpm.log&lt;/span&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# tail /var/log/messages&lt;/span&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;b style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;Install Varnish&lt;/b&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# cd /usr/ports/www/varnish ; make install clean&lt;/span&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;Reconfigure your web server to listen on localhost:8080&lt;/span&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# echo &#39;varnishd_enable=&quot;YES&quot;&#39; &amp;lt;&amp;lt; /etc/rc.conf&lt;/span&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# echo &#39;varnishd_flags=&quot;-s malloc,1G -a 127.0.0.1:80 -b 127.0.0.1:8080&quot;&#39; &amp;lt;&amp;lt; /etc/rc.conf&lt;/span&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# echo &#39;varnishlog_enable=&quot;YES&quot;&#39; &amp;lt;&amp;lt; /etc/rc.conf&lt;/span&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# /usr/local/etc/rc.d/varnishd start&lt;/span&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# /usr/local/etc/rc.d/varnishncsa onestart&lt;/span&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# tail /var/log/varnishncsa.log&lt;/span&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# /usr/local/bin/varnishtest&lt;/span&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# /usr/local/bin/varnishstat&lt;/span&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# ls -lh /usr/local/varnish/`hostname`&lt;/span&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;b style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;Install webbench&lt;/b&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# cd /usr/ports/benchmarks/webbench ; make install clean&lt;/span&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;br style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot; /&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;# webbench -c 3000 -t 60 http://test.local/index.php&lt;/span&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px; text-align: -webkit-auto; text-indent: 10px;&quot;&gt;Refernce To:&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;http://gala4th.blogspot.com/2012/01/install-nginx-php-fpm-and-varnish-on.html&quot;&gt;http://gala4th.blogspot.com/2012/01/install-nginx-php-fpm-and-varnish-on.html&lt;/a&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hyderest.blogspot.com/feeds/6830864549708780683/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://hyderest.blogspot.com/2012/01/install-nginx-php-fpm-and-varnish-on.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1293315848732557676/posts/default/6830864549708780683'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1293315848732557676/posts/default/6830864549708780683'/><link rel='alternate' type='text/html' href='http://hyderest.blogspot.com/2012/01/install-nginx-php-fpm-and-varnish-on.html' title='Install Nginx, PHP-FPM and Varnish on FreeBSD 8.2'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/11626174194942519396</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1293315848732557676.post-831856499015746908</id><published>2011-12-21T21:19:00.000-08:00</published><updated>2011-12-21T21:19:41.276-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Windows Phone"/><category scheme="http://www.blogger.com/atom/ns#" term="Windows Phone 7"/><title type='text'>Finding the Unique Device ID in Windows Phone 7 (And Device Manufacturer And Anonymous Windows Live ID)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #323232; font-family: Calibri, Verdana, &#39;Lucida Sans&#39;, &#39;Myriad Pro&#39;, Helvetica, Arial; font-size: 15px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;line-height: 19px; margin-bottom: 10px;&quot;&gt;
Here’s&amp;nbsp;&lt;a href=&quot;http://www.nickharris.net/2010/09/windows-phone-7-how-to-find-the-device-unique-id-windows-live-anonymous-id-and-manufacturer/&quot; style=&quot;border-bottom-color: rgb(83, 83, 83); border-bottom-style: dotted; border-bottom-width: 1px; color: #535353; text-decoration: none;&quot;&gt;Nick Harris with a handy set of static methods for getting the following unique IDs&lt;/a&gt;:&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;Device Manufacturer ID&lt;ul&gt;
&lt;li&gt;DeviceExtendedProperties.TryGetValue(“DeviceManufacturer”, out someObject);&lt;/li&gt;
&lt;li&gt;example: “HTC”&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Device ID&lt;ul&gt;
&lt;li&gt;DeviceExtendedProperties.TryGetValue(“DeviceUniqueId”, out someObject);&lt;/li&gt;
&lt;li&gt;requires ID_CAP_IDENTITY_DEVICE in the app manifest which will trigger a warning to users when they install the app&lt;/li&gt;
&lt;li&gt;a byte[], converter to a string will looks like&lt;br /&gt;“12345678901234567890123456789012345678901234567890123”&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Anonymous Windows Live ID&lt;ul&gt;
&lt;li&gt;A 32 character subset at offset 2&amp;nbsp; of the results of&lt;br /&gt;“UserExtendedProperties.TryGetValue(“ANID”, out someObject)&lt;/li&gt;
&lt;li&gt;requires ID_CAP_IDENTITY_USER in the app manifest which will trigger a warning to users when they install the app&lt;/li&gt;
&lt;li&gt;looks like “00FF00FF00FF00FF00FF00FF00FF00FF”&lt;/li&gt;
&lt;li&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;line-height: 19px; margin-bottom: 10px;&quot;&gt;
However, if you just need any unique identifier (not necessarily a device ID), you can always set and store a new global unique identifier using:&lt;/div&gt;
&lt;div style=&quot;line-height: 19px; margin-bottom: 10px;&quot;&gt;
Guid.NewGuid();&lt;/div&gt;
&lt;div style=&quot;line-height: 19px; margin-bottom: 10px;&quot;&gt;
which will return a 128-bit integer that will look something like this:&lt;/div&gt;
&lt;div style=&quot;line-height: 19px; margin-bottom: 10px;&quot;&gt;
“e81644f1-46b6-4994-2903-1d1f1440c130″&lt;/div&gt;
&lt;div style=&quot;line-height: 19px; margin-bottom: 10px;&quot;&gt;
This will not cause warnings to appear when the app is downloaded because it isn’t a constant identifier to that specific device.&lt;/div&gt;
&lt;div&gt;
Reference To:&lt;/div&gt;
&lt;div&gt;
&lt;a href=&quot;http://www.designersilverlight.com/2011/12/20/finding-the-unique-device-id-in-windows-phone-7-and-device-manufacturer-and-anonymous-windows-live-id/&quot;&gt;http://www.designersilverlight.com/2011/12/20/finding-the-unique-device-id-in-windows-phone-7-and-device-manufacturer-and-anonymous-windows-live-id/&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hyderest.blogspot.com/feeds/831856499015746908/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://hyderest.blogspot.com/2011/12/finding-unique-device-id-in-windows.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1293315848732557676/posts/default/831856499015746908'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1293315848732557676/posts/default/831856499015746908'/><link rel='alternate' type='text/html' href='http://hyderest.blogspot.com/2011/12/finding-unique-device-id-in-windows.html' title='Finding the Unique Device ID in Windows Phone 7 (And Device Manufacturer And Anonymous Windows Live ID)'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/11626174194942519396</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1293315848732557676.post-2319118586323448651</id><published>2011-12-21T21:17:00.000-08:00</published><updated>2011-12-21T21:20:20.588-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Database"/><category scheme="http://www.blogger.com/atom/ns#" term="SQLite"/><category scheme="http://www.blogger.com/atom/ns#" term="Windows Phone"/><category scheme="http://www.blogger.com/atom/ns#" term="Windows Phone 7"/><title type='text'>SQLite on WP7</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; font-family: Verdana, Arial, sans-serif; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;font-family: Verdana, Arial, sans-serif; font-size: 10pt;&quot;&gt;
“C# Sqlite Port for Windows phone 7 and possibly Silverlight 3, 4. The core engine was slightly modified to be used with IsolatedStorage and SqliteClient were ported by using missing codes from Mono project in order to maximize usability and portability from desktop.”&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana, Arial, sans-serif; font-size: 10pt;&quot;&gt;
Although sterling works great, it is essentially an object-based database (NoSql-like)… If you truly need a relational database or if your application currently uses SQLite and you want to port it to Windows Phone 7, this might just be the answer!&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana, Arial, sans-serif; font-size: 10pt;&quot;&gt;
Let’s get started… As with traditional ADO.NET, we first need to create a connection:&lt;/div&gt;
&lt;div class=&quot;pre-action-link&quot; id=&quot;premain0&quot; style=&quot;border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-bottom-width: 1px; color: #004cd5; display: block; font-size: 0.8em; text-align: right;&quot; width=&quot;100%&quot;&gt;
&lt;img height=&quot;9&quot; id=&quot;preimg0&quot; preid=&quot;0&quot; src=&quot;http://www.codeproject.com/images/minus.gif&quot; style=&quot;cursor: pointer; overflow-x: auto; overflow-y: auto;&quot; width=&quot;9&quot; /&gt;&lt;span id=&quot;precollapse0&quot; preid=&quot;0&quot; style=&quot;cursor: pointer; margin-bottom: 0px;&quot;&gt;&amp;nbsp;Collapse&lt;/span&gt;&amp;nbsp;|&amp;nbsp;&lt;a href=&quot;http://www.codeproject.com/Articles/151179/SQLite-on-WP7#&quot; preid=&quot;0&quot; style=&quot;color: #004cd5; text-decoration: none;&quot;&gt;Copy Code&lt;/a&gt;&lt;/div&gt;
&lt;pre id=&quot;pre0&quot; lang=&quot;cs&quot; style=&quot;background-color: #fbedbb; border-bottom-color: rgb(251, 237, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(251, 237, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(251, 237, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(251, 237, 187); border-top-style: solid; border-top-width: 1px; font: normal normal normal 9pt/normal &#39;Courier New&#39;, Courier, mono; overflow-x: auto; overflow-y: auto; padding-bottom: 6px; padding-left: 6px; padding-right: 6px; padding-top: 6px; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;code-keyword&quot; style=&quot;color: blue;&quot;&gt;using&lt;/span&gt; (SqliteConnection conn = 
 &lt;span class=&quot;code-keyword&quot; style=&quot;color: blue;&quot;&gt;new&lt;/span&gt; SqliteConnection(&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;Version=3,uri=file:Super14Database.db&quot;&lt;/span&gt;))
{
    conn.Open();
    &lt;span class=&quot;code-comment&quot; style=&quot;color: green; font-style: italic;&quot;&gt;//&lt;/span&gt;&lt;span class=&quot;code-comment&quot; style=&quot;color: green; font-style: italic;&quot;&gt; Use the connection here...
&lt;/span&gt;}&lt;/pre&gt;
&lt;div style=&quot;font-family: Verdana, Arial, sans-serif; font-size: 10pt;&quot;&gt;
And now we can start using the database with “normal” SQL statements… Let’s create a table.&lt;/div&gt;
&lt;div class=&quot;pre-action-link&quot; id=&quot;premain1&quot; style=&quot;border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-bottom-width: 1px; color: #004cd5; display: block; font-size: 0.8em; text-align: right;&quot; width=&quot;100%&quot;&gt;
&lt;img height=&quot;9&quot; id=&quot;preimg1&quot; preid=&quot;1&quot; src=&quot;http://www.codeproject.com/images/minus.gif&quot; style=&quot;cursor: pointer; overflow-x: auto; overflow-y: auto;&quot; width=&quot;9&quot; /&gt;&lt;span id=&quot;precollapse1&quot; preid=&quot;1&quot; style=&quot;cursor: pointer; margin-bottom: 0px;&quot;&gt;&amp;nbsp;Collapse&lt;/span&gt;&amp;nbsp;|&amp;nbsp;&lt;a href=&quot;http://www.codeproject.com/Articles/151179/SQLite-on-WP7#&quot; preid=&quot;1&quot; style=&quot;color: #004cd5; text-decoration: none;&quot;&gt;Copy Code&lt;/a&gt;&lt;/div&gt;
&lt;pre id=&quot;pre1&quot; lang=&quot;cs&quot; style=&quot;background-color: #fbedbb; border-bottom-color: rgb(251, 237, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(251, 237, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(251, 237, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(251, 237, 187); border-top-style: solid; border-top-width: 1px; font: normal normal normal 9pt/normal &#39;Courier New&#39;, Courier, mono; overflow-x: auto; overflow-y: auto; padding-bottom: 6px; padding-left: 6px; padding-right: 6px; padding-top: 6px; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;span class=&quot;code-keyword&quot; style=&quot;color: blue;&quot;&gt;using&lt;/span&gt; (SqliteCommand cmd = conn.CreateCommand())
{
    cmd.CommandText = &lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;CREATE TABLE matches ( [id] INTEGER PRIMARY KEY, _
 [team1] TEXT, [score1] INTEGER, [team2] TEXT, [score2] TEXT, [date] TEXT)&quot;&lt;/span&gt;;
    cmd.ExecuteNonQuery();
}&lt;/pre&gt;
&lt;div style=&quot;font-family: Verdana, Arial, sans-serif; font-size: 10pt;&quot;&gt;
And to insert data:&lt;/div&gt;
&lt;div class=&quot;pre-action-link&quot; id=&quot;premain2&quot; style=&quot;border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-bottom-width: 1px; color: #004cd5; display: block; font-size: 0.8em; text-align: right;&quot; width=&quot;100%&quot;&gt;
&lt;img height=&quot;9&quot; id=&quot;preimg2&quot; preid=&quot;2&quot; src=&quot;http://www.codeproject.com/images/minus.gif&quot; style=&quot;cursor: pointer; overflow-x: auto; overflow-y: auto;&quot; width=&quot;9&quot; /&gt;&lt;span id=&quot;precollapse2&quot; preid=&quot;2&quot; style=&quot;cursor: pointer; margin-bottom: 0px;&quot;&gt;&amp;nbsp;Collapse&lt;/span&gt;&amp;nbsp;|&amp;nbsp;&lt;a href=&quot;http://www.codeproject.com/Articles/151179/SQLite-on-WP7#&quot; preid=&quot;2&quot; style=&quot;color: #004cd5; text-decoration: none;&quot;&gt;Copy Code&lt;/a&gt;&lt;/div&gt;
&lt;pre id=&quot;pre2&quot; lang=&quot;cs&quot; style=&quot;background-color: #fbedbb; border-bottom-color: rgb(251, 237, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(251, 237, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(251, 237, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(251, 237, 187); border-top-style: solid; border-top-width: 1px; font: normal normal normal 9pt/normal &#39;Courier New&#39;, Courier, mono; overflow-x: auto; overflow-y: auto; padding-bottom: 6px; padding-left: 6px; padding-right: 6px; padding-top: 6px; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;cmd.Transaction = conn.BeginTransaction();
cmd.CommandText = &lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;INSERT INTO matches(score1, team1, 
 score2, team2, date) VALUES(@score1, @team1, @score2, @team2, @date);&quot;&lt;/span&gt;;

cmd.Parameters.Add(&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;@score1&quot;&lt;/span&gt;,  &lt;span class=&quot;code-keyword&quot; style=&quot;color: blue;&quot;&gt;null&lt;/span&gt;);
cmd.Parameters.Add(&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;@team1&quot;&lt;/span&gt;, &lt;span class=&quot;code-keyword&quot; style=&quot;color: blue;&quot;&gt;null&lt;/span&gt;);
cmd.Parameters.Add(&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;@score2&quot;&lt;/span&gt;,  &lt;span class=&quot;code-keyword&quot; style=&quot;color: blue;&quot;&gt;null&lt;/span&gt;);
cmd.Parameters.Add(&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;@team2&quot;&lt;/span&gt;,  &lt;span class=&quot;code-keyword&quot; style=&quot;color: blue;&quot;&gt;null&lt;/span&gt;);
cmd.Parameters.Add(&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;@date&quot;&lt;/span&gt;,  &lt;span class=&quot;code-keyword&quot; style=&quot;color: blue;&quot;&gt;null&lt;/span&gt;);

cmd.Parameters[&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;@score1&quot;&lt;/span&gt;].Value = &lt;span class=&quot;code-digit&quot; style=&quot;color: navy;&quot;&gt;20&lt;/span&gt;;
cmd.Parameters[&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;@team1&quot;&lt;/span&gt;].Value =  &lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;Blues&quot;&lt;/span&gt;;
cmd.Parameters[&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;@score2&quot;&lt;/span&gt;].Value =  &lt;span class=&quot;code-digit&quot; style=&quot;color: navy;&quot;&gt;34&lt;/span&gt;;
cmd.Parameters[&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;@team2&quot;&lt;/span&gt;].Value =  &lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;Hurricanes&quot;&lt;/span&gt;;
cmd.Parameters[&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;@date&quot;&lt;/span&gt;].Value =  &lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;12/02/10&quot;&lt;/span&gt;;
cmd.ExecuteNonQuery();


cmd.Parameters[&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;@score1&quot;&lt;/span&gt;].Value =  &lt;span class=&quot;code-digit&quot; style=&quot;color: navy;&quot;&gt;15&lt;/span&gt;;
cmd.Parameters[&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;@team1&quot;&lt;/span&gt;].Value =  &lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;W Force&quot;&lt;/span&gt;;
cmd.Parameters[&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;@score2&quot;&lt;/span&gt;].Value =  &lt;span class=&quot;code-digit&quot; style=&quot;color: navy;&quot;&gt;24&lt;/span&gt;;
cmd.Parameters[&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;@team2&quot;&lt;/span&gt;].Value =  &lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;Brumbies&quot;&lt;/span&gt;;
cmd.Parameters[&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;@date&quot;&lt;/span&gt;].Value =  &lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;12/02/10&quot;&lt;/span&gt;;
cmd.ExecuteNonQuery();

cmd.Parameters[&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;@score1&quot;&lt;/span&gt;].Value =  &lt;span class=&quot;code-digit&quot; style=&quot;color: navy;&quot;&gt;34&lt;/span&gt;;
cmd.Parameters[&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;@team1&quot;&lt;/span&gt;].Value =  &lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;Cheetahs&quot;&lt;/span&gt;;
cmd.Parameters[&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;@score2&quot;&lt;/span&gt;].Value =  &lt;span class=&quot;code-digit&quot; style=&quot;color: navy;&quot;&gt;51&lt;/span&gt;;
cmd.Parameters[&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;@team2&quot;&lt;/span&gt;].Value =  &lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;Bulls&quot;&lt;/span&gt;;
cmd.Parameters[&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;@date&quot;&lt;/span&gt;].Value =  &lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;12/02/10&quot;&lt;/span&gt;;
cmd.ExecuteNonQuery();

cmd.Parameters[&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;@score1&quot;&lt;/span&gt;].Value =  &lt;span class=&quot;code-digit&quot; style=&quot;color: navy;&quot;&gt;32&lt;/span&gt;;
cmd.Parameters[&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;@team1&quot;&lt;/span&gt;].Value =  &lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;Crusaders&quot;&lt;/span&gt;;
cmd.Parameters[&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;@score2&quot;&lt;/span&gt;].Value =  &lt;span class=&quot;code-digit&quot; style=&quot;color: navy;&quot;&gt;17&lt;/span&gt;;
cmd.Parameters[&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;@team2&quot;&lt;/span&gt;].Value =  &lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;highlanders&quot;&lt;/span&gt;;
cmd.Parameters[&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;@date&quot;&lt;/span&gt;].Value =  &lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;12/02/10&quot;&lt;/span&gt;;
cmd.ExecuteNonQuery();

cmd.Parameters[&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;@score1&quot;&lt;/span&gt;].Value =  &lt;span class=&quot;code-digit&quot; style=&quot;color: navy;&quot;&gt;28&lt;/span&gt;;
cmd.Parameters[&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;@team1&quot;&lt;/span&gt;].Value =  &lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;Reds&quot;&lt;/span&gt;;
cmd.Parameters[&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;@score2&quot;&lt;/span&gt;].Value =  &lt;span class=&quot;code-digit&quot; style=&quot;color: navy;&quot;&gt;30&lt;/span&gt;;
cmd.Parameters[&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;@team2&quot;&lt;/span&gt;].Value =  &lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;Waratahs&quot;&lt;/span&gt;;
cmd.Parameters[&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;@date&quot;&lt;/span&gt;].Value =  &lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;12/02/10&quot;&lt;/span&gt;;
cmd.ExecuteNonQuery();

cmd.Parameters[&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;@score1&quot;&lt;/span&gt;].Value =  &lt;span class=&quot;code-digit&quot; style=&quot;color: navy;&quot;&gt;13&lt;/span&gt;;
cmd.Parameters[&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;@team1&quot;&lt;/span&gt;].Value =  &lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;Lions&quot;&lt;/span&gt;;
cmd.Parameters[&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;@score1&quot;&lt;/span&gt;].Value =  &lt;span class=&quot;code-digit&quot; style=&quot;color: navy;&quot;&gt;26&lt;/span&gt;;
cmd.Parameters[&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;@team2&quot;&lt;/span&gt;].Value =  &lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;Stomers&quot;&lt;/span&gt;;
cmd.Parameters[&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;@date&quot;&lt;/span&gt;].Value =  &lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;12/02/10&quot;&lt;/span&gt;;
cmd.ExecuteNonQuery();

cmd.Parameters[&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;@score1&quot;&lt;/span&gt;].Value =  &lt;span class=&quot;code-digit&quot; style=&quot;color: navy;&quot;&gt;18&lt;/span&gt;;
cmd.Parameters[&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;@team1&quot;&lt;/span&gt;].Value =  &lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;Sharks&quot;&lt;/span&gt;;
cmd.Parameters[&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;@score2&quot;&lt;/span&gt;].Value =  &lt;span class=&quot;code-digit&quot; style=&quot;color: navy;&quot;&gt;19&lt;/span&gt;;
cmd.Parameters[&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;@team2&quot;&lt;/span&gt;].Value =  &lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;Chiefs&quot;&lt;/span&gt;;
cmd.Parameters[&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;@date&quot;&lt;/span&gt;].Value =  &lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;12/02/10&quot;&lt;/span&gt;;
cmd.ExecuteNonQuery();
                    
cmd.Transaction.Commit();&lt;/pre&gt;
&lt;div style=&quot;font-family: Verdana, Arial, sans-serif; font-size: 10pt;&quot;&gt;
&lt;strong&gt;NOTE&lt;/strong&gt;: Notice the transaction support build in!&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana, Arial, sans-serif; font-size: 10pt;&quot;&gt;
To fetch data from the database:&lt;/div&gt;
&lt;div class=&quot;pre-action-link&quot; id=&quot;premain3&quot; style=&quot;border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-bottom-width: 1px; color: #004cd5; display: block; font-size: 0.8em; text-align: right;&quot; width=&quot;100%&quot;&gt;
&lt;img height=&quot;9&quot; id=&quot;preimg3&quot; preid=&quot;3&quot; src=&quot;http://www.codeproject.com/images/minus.gif&quot; style=&quot;cursor: pointer; overflow-x: auto; overflow-y: auto;&quot; width=&quot;9&quot; /&gt;&lt;span id=&quot;precollapse3&quot; preid=&quot;3&quot; style=&quot;cursor: pointer; margin-bottom: 0px;&quot;&gt;&amp;nbsp;Collapse&lt;/span&gt;&amp;nbsp;|&amp;nbsp;&lt;a href=&quot;http://www.codeproject.com/Articles/151179/SQLite-on-WP7#&quot; preid=&quot;3&quot; style=&quot;color: #004cd5; text-decoration: none;&quot;&gt;Copy Code&lt;/a&gt;&lt;/div&gt;
&lt;pre id=&quot;pre3&quot; lang=&quot;cs&quot; style=&quot;background-color: #fbedbb; border-bottom-color: rgb(251, 237, 187); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(251, 237, 187); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(251, 237, 187); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(251, 237, 187); border-top-style: solid; border-top-width: 1px; font: normal normal normal 9pt/normal &#39;Courier New&#39;, Courier, mono; overflow-x: auto; overflow-y: auto; padding-bottom: 6px; padding-left: 6px; padding-right: 6px; padding-top: 6px; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;cmd.CommandText = &lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;code-string&quot; style=&quot;color: purple;&quot;&gt;SELECT * FROM matches&quot;&lt;/span&gt;;
&lt;span class=&quot;code-keyword&quot; style=&quot;color: blue;&quot;&gt;using&lt;/span&gt; (SqliteDataReader reader = cmd.ExecuteReader())
{
    &lt;span class=&quot;code-keyword&quot; style=&quot;color: blue;&quot;&gt;while&lt;/span&gt; (reader.Read())
    {
        &lt;span class=&quot;code-keyword&quot; style=&quot;color: blue;&quot;&gt;var&lt;/span&gt; team1 = reader.GetValue(&lt;span class=&quot;code-digit&quot; style=&quot;color: navy;&quot;&gt;1&lt;/span&gt;);
        &lt;span class=&quot;code-keyword&quot; style=&quot;color: blue;&quot;&gt;var&lt;/span&gt; score1 = reader.GetValue(&lt;span class=&quot;code-digit&quot; style=&quot;color: navy;&quot;&gt;2&lt;/span&gt;);
        &lt;span class=&quot;code-keyword&quot; style=&quot;color: blue;&quot;&gt;var&lt;/span&gt; team2 = reader.GetValue(&lt;span class=&quot;code-digit&quot; style=&quot;color: navy;&quot;&gt;3&lt;/span&gt;);
        &lt;span class=&quot;code-keyword&quot; style=&quot;color: blue;&quot;&gt;var&lt;/span&gt; score2 = reader.GetValue(&lt;span class=&quot;code-digit&quot; style=&quot;color: navy;&quot;&gt;4&lt;/span&gt;);
        &lt;span class=&quot;code-keyword&quot; style=&quot;color: blue;&quot;&gt;var&lt;/span&gt; date = reader.GetValue(&lt;span class=&quot;code-digit&quot; style=&quot;color: navy;&quot;&gt;5&lt;/span&gt;);
    }
}&lt;/pre&gt;
&lt;div style=&quot;font-family: Verdana, Arial, sans-serif; font-size: 10pt;&quot;&gt;
And that’s it! It is more verbose but it does work great and the translation from a normal desktop application that used SQLite should be simple!&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana, Arial, sans-serif; font-size: 10pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; font-family: Verdana, Arial, sans-serif; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;font-family: Verdana, Arial, sans-serif; font-size: 10pt;&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; font-family: Verdana, Arial, sans-serif; font-size: 13px;&quot;&gt;Reference To:&lt;/span&gt;&lt;/div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; font-family: Verdana, Arial, sans-serif; font-size: 13px;&quot;&gt;
&lt;a href=&quot;http://www.codeproject.com/Articles/151179/SQLite-on-WP7&quot;&gt;http://www.codeproject.com/Articles/151179/SQLite-on-WP7&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hyderest.blogspot.com/feeds/2319118586323448651/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://hyderest.blogspot.com/2011/12/sqlite-on-wp7.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1293315848732557676/posts/default/2319118586323448651'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1293315848732557676/posts/default/2319118586323448651'/><link rel='alternate' type='text/html' href='http://hyderest.blogspot.com/2011/12/sqlite-on-wp7.html' title='SQLite on WP7'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/11626174194942519396</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1293315848732557676.post-3935261713035659374</id><published>2011-12-21T21:15:00.000-08:00</published><updated>2011-12-21T21:20:36.657-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Windows Phone"/><category scheme="http://www.blogger.com/atom/ns#" term="Windows Phone 7"/><title type='text'>Windows Phone 7 Emulator Skin Switcher 1.0 Beta</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: #0f0f0f; color: #bbbbbb; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; font-weight: 300; line-height: 24px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 15px; font-style: inherit; margin-bottom: 1.625em; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
In the last few weeks several people started creating their own skins for the Windows Phone 7 Emulator. Switching between different skins was a lot of work by copying files manually to the emulator directory every time you wanted to switch. From now on this is not needed anymore because you can use the Windows Phone 7 Emulator Skin Switcher application I’ve created.&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 15px; font-style: inherit; margin-bottom: 1.625em; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;img alt=&quot;wp7EmulatorSkinSwitcher&quot; border=&quot;0&quot; height=&quot;360&quot; src=&quot;http://vdcruijsen.net/wp-content/uploads/2011/12/wp7EmulatorSkinSwitcher.png&quot; style=&quot;background-image: none; border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline; margin-top: 0.4em; max-width: 97.5%; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; title=&quot;wp7EmulatorSkinSwitcher&quot; width=&quot;520&quot; /&gt;&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 15px; font-style: inherit; margin-bottom: 1.625em; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
You can download the application here:&amp;nbsp;&lt;a href=&quot;https://skydrive.live.com/redir.aspx?cid=ef12210979e9f6b0&amp;amp;resid=EF12210979E9F6B0!1458&amp;amp;parid=EF12210979E9F6B0!124&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #de9300; font-family: inherit; font-size: 15px; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot; target=&quot;_blank&quot;&gt;Download&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 15px; font-style: inherit; margin-bottom: 1.625em; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
This version is the first&amp;nbsp;&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 15px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;u&gt;beta&lt;/u&gt;&lt;/strong&gt;&amp;nbsp;release with my first set of skins. I added 2 skins from&amp;nbsp;&lt;a href=&quot;http://www.leitning.de/2011/nokia-lumia-800-windows-phone-emulator-skin/&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #de9300; font-family: inherit; font-size: 15px; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot; target=&quot;_blank&quot;&gt;Georg Kalus&lt;/a&gt;: the Blue Nokia Lumia 800 and the White/Pink Nokia Lumia 710. I’ve also included the Black Nokia Lumia 800 skin from&amp;nbsp;&lt;a href=&quot;http://www.pedrolamas.com/windows-phone/nokia-lumia-800-skin/&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #de9300; font-family: inherit; font-size: 15px; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot; target=&quot;_blank&quot;&gt;Pedro Lamas&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 15px; font-style: inherit; margin-bottom: 1.625em; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
The complete list of skins included in the application now are:&lt;/div&gt;
&lt;ul style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 15px; font-style: inherit; list-style-image: initial; list-style-position: initial; list-style-type: square; margin-bottom: 1.625em; margin-left: 2.5em; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 15px; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Default skin – Microsoft&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 15px; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Nokia Lumia 710 Black Blue –&amp;nbsp;&lt;a href=&quot;http://twitter.com/geertvdc&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #de9300; font-family: inherit; font-size: 15px; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot; target=&quot;_blank&quot;&gt;Geert van der Cruijsen&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 15px; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Nokia Lumia 710 Black Yellow –&amp;nbsp;&lt;a href=&quot;http://twitter.com/geertvdc&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #de9300; font-family: inherit; font-size: 15px; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot; target=&quot;_blank&quot;&gt;Geert van der Cruijsen&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 15px; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Nokia Lumia 710 White Black –&amp;nbsp;&lt;a href=&quot;http://twitter.com/geertvdc&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #de9300; font-family: inherit; font-size: 15px; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot; target=&quot;_blank&quot;&gt;Geert van der Cruijsen&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 15px; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Nokia Lumia 710 White Blue –&amp;nbsp;&lt;a href=&quot;http://twitter.com/geertvdc&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #de9300; font-family: inherit; font-size: 15px; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot; target=&quot;_blank&quot;&gt;Geert van der Cruijsen&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 15px; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Nokia Lumia 710 White Pink –&amp;nbsp;&lt;a href=&quot;http://www.leitning.de/2011/nokia-lumia-800-windows-phone-emulator-skin/&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #de9300; font-family: inherit; font-size: 15px; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot; target=&quot;_blank&quot;&gt;Georg Kalus&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 15px; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Nokia Lumia 800 Black –&amp;nbsp;&lt;a href=&quot;http://www.pedrolamas.com/windows-phone/nokia-lumia-800-skin/&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #de9300; font-family: inherit; font-size: 15px; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot; target=&quot;_blank&quot;&gt;Pedro Lamas&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 15px; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Nokia Lumia 800 Blue –&amp;nbsp;&lt;a href=&quot;http://www.leitning.de/2011/nokia-lumia-800-windows-phone-emulator-skin/&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #de9300; font-family: inherit; font-size: 15px; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot; target=&quot;_blank&quot;&gt;Georg Kalus&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 15px; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Nokia Lumia 800 Pink –&amp;nbsp;&lt;a href=&quot;http://twitter.com/geertvdc&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #de9300; font-family: inherit; font-size: 15px; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot; target=&quot;_blank&quot;&gt;Geert van der Cruijsen&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 15px; font-style: inherit; margin-bottom: 1.625em; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
I’m planning on adding more skins in the near future but didn’t have time for it yet. If you have skins I can use please let me know by comment or on&amp;nbsp;&lt;a href=&quot;http://twitter.com/geertvdc&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #de9300; font-family: inherit; font-size: 15px; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot; target=&quot;_blank&quot;&gt;twitter&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 15px; font-style: inherit; margin-bottom: 1.625em; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;img alt=&quot;lumia710white&quot; border=&quot;0&quot; height=&quot;359&quot; src=&quot;http://vdcruijsen.net/wp-content/uploads/2011/12/lumia710white.png&quot; style=&quot;background-image: none; border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline; margin-top: 0.4em; max-width: 97.5%; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; title=&quot;lumia710white&quot; width=&quot;190&quot; /&gt;&lt;img alt=&quot;lumia800pink&quot; border=&quot;0&quot; height=&quot;345&quot; src=&quot;http://vdcruijsen.net/wp-content/uploads/2011/12/lumia800pink.png&quot; style=&quot;background-image: none; border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline; margin-top: 0.4em; max-width: 97.5%; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; title=&quot;lumia800pink&quot; width=&quot;190&quot; /&gt;&lt;img alt=&quot;lumia710black&quot; border=&quot;0&quot; height=&quot;359&quot; src=&quot;http://vdcruijsen.net/wp-content/uploads/2011/12/lumia710black.png&quot; style=&quot;background-image: none; border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: inline; margin-top: 0.4em; max-width: 97.5%; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; title=&quot;lumia710black&quot; width=&quot;190&quot; /&gt;&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 15px; font-style: inherit; margin-bottom: 1.625em; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-size: 15px; font-style: inherit; margin-bottom: 1.625em; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
Hopefully this will make your Windows Phone 7 projects even more fun to test!&lt;/div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: #0f0f0f; color: #bbbbbb; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; font-weight: 300; line-height: 24px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #bbbbbb; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 15px; line-height: 24px;&quot;&gt;Refernce To:&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a href=&quot;http://vdcruijsen.net/2011/12/windows-phone-7-emulator-skin-switcher-1-0-beta/&quot;&gt;http://vdcruijsen.net/2011/12/windows-phone-7-emulator-skin-switcher-1-0-beta/&lt;/a&gt;&lt;/div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: #0f0f0f; color: #bbbbbb; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; font-weight: 300; line-height: 24px;&quot;&gt;
&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hyderest.blogspot.com/feeds/3935261713035659374/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://hyderest.blogspot.com/2011/12/windows-phone-7-emulator-skin-switcher.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1293315848732557676/posts/default/3935261713035659374'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1293315848732557676/posts/default/3935261713035659374'/><link rel='alternate' type='text/html' href='http://hyderest.blogspot.com/2011/12/windows-phone-7-emulator-skin-switcher.html' title='Windows Phone 7 Emulator Skin Switcher 1.0 Beta'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/11626174194942519396</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1293315848732557676.post-7444956485319402108</id><published>2011-12-19T19:14:00.000-08:00</published><updated>2011-12-21T21:20:51.287-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Windows Phone"/><category scheme="http://www.blogger.com/atom/ns#" term="Windows Phone 7"/><title type='text'>How To Change Your Windows Phone Emulator？</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #2c2c29; font-family: Tahoma; font-size: 12px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 1.2em; margin-bottom: 15px; margin-top: 1px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 2px; padding-left: 2px; padding-right: 2px; padding-top: 2px; vertical-align: baseline;&quot;&gt;
Today, I discovered that Pedro Lamas had released a skin for the Windows Phone emulator that allowed it to look like the Nokia Lumia 800.&amp;nbsp; (&lt;a href=&quot;http://www.pedrolamas.com/2011/12/17/nokia-lumia-800-skin/&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #807d7a; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot; target=&quot;_blank&quot;&gt;You can see it here.&lt;/a&gt;)&lt;/div&gt;
&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 1.2em; margin-bottom: 15px; margin-top: 1px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 2px; padding-left: 2px; padding-right: 2px; padding-top: 2px; vertical-align: baseline;&quot;&gt;
This inspired me to create another new skin for my current phone, the HTC Arrive.&amp;nbsp; (&lt;a href=&quot;http://bit.ly/ArriveWPSkin&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #807d7a; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot; target=&quot;_blank&quot;&gt;Click here to download the HTC Arrive Windows Phone Emulator skin&lt;/a&gt;.)&amp;nbsp; To use either of them, you simply need to copy the contents of the zip file to a specific folder on your computer (make sure to save a copy of the original files):&lt;/div&gt;
&lt;h4 style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 1.5em; margin-bottom: 15px; margin-left: 0px; margin-right: 0px; margin-top: 15px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;

C:\Program Files (x86)\Microsoft XDE\1.0\&lt;/h4&gt;
&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 1.2em; margin-bottom: 15px; margin-top: 1px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 2px; padding-left: 2px; padding-right: 2px; padding-top: 2px; vertical-align: baseline;&quot;&gt;
Once you’ve done that, your emulator can look like one of the images below!&lt;/div&gt;
&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 1.2em; margin-bottom: 15px; margin-top: 1px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 2px; padding-left: 2px; padding-right: 2px; padding-top: 2px; vertical-align: baseline;&quot;&gt;
&lt;img alt=&quot;Nokia-Lumia-800-skin-for-Windows-Phone-Emulator[1]&quot; border=&quot;0&quot; height=&quot;377&quot; src=&quot;http://www.jeffblankenburg.com/wp-content/uploads/2011/12/Nokia-Lumia-800-skin-for-Windows-Phone-Emulator1.png&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: initial; border-bottom-style: initial; border-bottom-width: 0px; border-color: initial; border-left-color: initial; border-left-style: initial; border-left-width: 0px; border-right-color: initial; border-right-style: initial; border-right-width: 0px; border-style: initial; border-top-color: initial; border-top-style: initial; border-top-width: 0px; display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot; title=&quot;Nokia-Lumia-800-skin-for-Windows-Phone-Emulator[1]&quot; width=&quot;200&quot; /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;img alt=&quot;image&quot; border=&quot;0&quot; height=&quot;378&quot; src=&quot;http://www.jeffblankenburg.com/wp-content/uploads/2011/12/image.png&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: none; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: initial; border-bottom-style: initial; border-bottom-width: 0px; border-color: initial; border-left-color: initial; border-left-style: initial; border-left-width: 0px; border-right-color: initial; border-right-style: initial; border-right-width: 0px; border-style: initial; border-top-color: initial; border-top-style: initial; border-top-width: 0px; display: inline; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot; title=&quot;image&quot; width=&quot;193&quot; /&gt;&lt;/div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #2c2c29; font-family: Tahoma; font-size: 12px;&quot;&gt;Reference To：&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #2c2c29; font-family: Tahoma; font-size: 12px;&quot;&gt;&lt;a href=&quot;http://www.jeffblankenburg.com/2011/12/17/want-to-change-your-windows-phone-emulator/&quot;&gt;http://www.jeffblankenburg.com/2011/12/17/want-to-change-your-windows-phone-emulator/&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #2c2c29; font-family: Tahoma; font-size: 12px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;background-color: white; color: #2c2c29; font-family: Tahoma; font-size: 12px;&quot;&gt;
&lt;div id=&quot;crp_related&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;/div&gt;
&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hyderest.blogspot.com/feeds/7444956485319402108/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://hyderest.blogspot.com/2011/12/how-to-change-your-windows-phone.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1293315848732557676/posts/default/7444956485319402108'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1293315848732557676/posts/default/7444956485319402108'/><link rel='alternate' type='text/html' href='http://hyderest.blogspot.com/2011/12/how-to-change-your-windows-phone.html' title='How To Change Your Windows Phone Emulator？'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/11626174194942519396</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1293315848732557676.post-1633293877038706298</id><published>2011-11-29T23:15:00.001-08:00</published><updated>2011-11-29T23:15:57.394-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Administrator"/><category scheme="http://www.blogger.com/atom/ns#" term="Password"/><category scheme="http://www.blogger.com/atom/ns#" term="Windows 7"/><category scheme="http://www.blogger.com/atom/ns#" term="Windows Vista"/><title type='text'>HowTo - 在 Windows 7 、Vista 忘記 Administrator 密碼</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;h2 style=&quot;background-color: white; color: #2e2302; font-family: &#39;Lucida Sans Unicode&#39;, lucida, Verdana, sans-serif; font-size: 16px; margin-bottom: 8px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;&quot;&gt;
To reset a forgotten administrator password, follow these steps:&lt;/h2&gt;
&lt;ol style=&quot;background-color: white; color: #2e2302; font-family: &#39;Trebuchet MS&#39;, Verdana; font-size: 14px; text-align: left;&quot;&gt;
&lt;li&gt;Boot from Windows PE or Windows RE and access the command prompt.&lt;/li&gt;
&lt;li&gt;Find the drive letter of the partition where Windows is installed. In Vista and Windows XP, it is usually C:, in Windows 7, it is D: in most cases because the first partition contains Startup Repair. To find the drive letter, type C: (or D:, respectively) and search for the Windows folder. Note that Windows PE (RE) usually resides on X:.&lt;/li&gt;
&lt;li&gt;Type the following command (replace “c:” with the correct drive letter if Windows is not located on C:):&lt;br /&gt;&lt;strong style=&quot;color: #505050;&quot;&gt;copy c:\windows\system32\sethc.exe c:\&lt;/strong&gt;&lt;br /&gt;This creates a copy of sethc.exe to restore later.&lt;/li&gt;
&lt;li&gt;Type this command to replace sethc.exe with cmd.exe:&lt;br /&gt;&lt;strong style=&quot;color: #505050;&quot;&gt;copy /y c:\windows\system32\cmd.exe c:\windows\system32\sethc.exe&lt;/strong&gt;Reboot your computer and start the Windows installation where you forgot the administrator password.&lt;/li&gt;
&lt;li&gt;After you see the logon screen, press the SHIFT key five times.&lt;/li&gt;
&lt;li&gt;You should see a command prompt where you can enter the following command to reset the Windows password (see screenshot above):&lt;br /&gt;&lt;strong style=&quot;color: #505050;&quot;&gt;net user&amp;nbsp;&lt;em&gt;your_user_name new_password&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;If you don’t know your user name, just type&amp;nbsp;&lt;strong style=&quot;color: #505050;&quot;&gt;net user&amp;nbsp;&lt;/strong&gt;to list the available user names.&lt;/li&gt;
&lt;li&gt;You can now log on with the new password.&lt;/li&gt;
&lt;/ol&gt;
&lt;div style=&quot;background-color: white; color: #2e2302; font-family: &#39;Trebuchet MS&#39;, Verdana; font-size: 14px; line-height: 1.5em; margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;&quot;&gt;
I recommend that you replace sethc.exe with the copy you stored in the root folder of your system drive in step 3. For this, you have to boot up again with Windows PE or RE because you can’t replace system files while the Windows installation is online. Then you have to enter this command:&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #2e2302; font-family: &#39;Trebuchet MS&#39;, Verdana; font-size: 14px; line-height: 1.5em; margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;&quot;&gt;
&lt;strong style=&quot;color: #505050;&quot;&gt;copy /y c:\sethc.exe c:\windows\system32\sethc.exe&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-family: &#39;Trebuchet MS&#39;, Verdana; font-size: 14px; line-height: 1.5em; margin-bottom: 1em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: left;&quot;&gt;
Reference To：&lt;a href=&quot;http://4sysops.com/archives/forgot-the-administrator-password-the-sticky-keys-trick/&quot; style=&quot;color: blue; text-decoration: none;&quot;&gt;http://4sysops.com/archives/forgot-the-administrator-password-the-sticky-keys-trick/&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hyderest.blogspot.com/feeds/1633293877038706298/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://hyderest.blogspot.com/2011/11/howto-windows-7-vista-administrator.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1293315848732557676/posts/default/1633293877038706298'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1293315848732557676/posts/default/1633293877038706298'/><link rel='alternate' type='text/html' href='http://hyderest.blogspot.com/2011/11/howto-windows-7-vista-administrator.html' title='HowTo - 在 Windows 7 、Vista 忘記 Administrator 密碼'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/11626174194942519396</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1293315848732557676.post-6124400942529218388</id><published>2011-10-27T23:10:00.001-07:00</published><updated>2011-10-27T23:10:26.649-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript"/><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><title type='text'>把瀏覽器當虛擬平台？</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px;&quot;&gt;每次要跑虛擬機時，都要有一個Hypervisor，不管是原生或寄居架構，但不管是哪一種架構，總要有一個硬體平台吧？總要分配CPU、記憶體或磁碟空間吧？下面這個Linux，卻是真正把VM的層次拉高到最上層：瀏覽器。這是一個用Javascript重寫的Linux核心，而Javascript的執行平台正是瀏覽器！曾經有人懷疑這只是一個模擬Linux的介面而已，但現在已證實是真正的Linux核心了。&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Trebuchet MS&#39;, verdana, sans-serif; font-size: 13px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;post-body entry-content&quot;&gt;
&lt;br /&gt;&lt;br /&gt;Fabrice Bellard是誰應該不用介紹了，是ffmpeg、QEMU的原創人，高中時就開發出LZEXE這個壓縮軟體，不但是有名的電腦工程師，也是有名的數學家，這邊可以看到Fabrice Bellard的維基介紹。&lt;br /&gt;&lt;br /&gt;這個用Javascript寫出來的Linux不但可以執行，更可以用來學習Linux的指令，如vi等。大家就到&lt;br /&gt;&lt;br /&gt;&lt;a href=&quot;http://bellard.org/&quot; style=&quot;color: blue; text-decoration: none;&quot;&gt;http://bellard.org/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;到這邊來玩玩吧！&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Reference:&lt;/b&gt;&lt;br /&gt;&lt;a href=&quot;http://vaemon.com/article/1363.html&quot; style=&quot;color: blue; text-decoration: none;&quot;&gt;http://vaemon.com/article/1363.html&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://www.blogger.com/Fabrice%20Bellard:%20Portrait%20of%20a%20Superproductive%20Programmer&quot; style=&quot;color: blue; text-decoration: none;&quot;&gt;http://www.softwarequalityconnection.com/2011/03/fabrice-bellard-portrait-of-a-superproductive-programmer/&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hyderest.blogspot.com/feeds/6124400942529218388/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://hyderest.blogspot.com/2011/10/blog-post.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1293315848732557676/posts/default/6124400942529218388'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1293315848732557676/posts/default/6124400942529218388'/><link rel='alternate' type='text/html' href='http://hyderest.blogspot.com/2011/10/blog-post.html' title='把瀏覽器當虛擬平台？'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/11626174194942519396</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1293315848732557676.post-2787789560529632697</id><published>2011-10-27T18:51:00.000-07:00</published><updated>2011-10-27T18:59:22.469-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Mango"/><category scheme="http://www.blogger.com/atom/ns#" term="Windows Phone"/><category scheme="http://www.blogger.com/atom/ns#" term="Windows Phone 7"/><title type='text'></title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Lucida Grande&#39;, &#39;Lucida Sans Unicode&#39;, Verdana, sans-serif;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;font: normal normal normal 90%/175% &#39;Lucida Grande&#39;, &#39;Lucida Sans Unicode&#39;, Verdana, sans-serif; letter-spacing: -1px;&quot;&gt;
不得不說，WP7開發的資料真的是太少了，國內有句話叫「天下文章一大抄」，查Application.GetResourceStream的用法，找遍了整個網絡，無非就那一兩篇，而且寫得還不完整，包括微軟官方的例子。在花了近半天的時間後，終於解決問題。&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 90%/175% &#39;Lucida Grande&#39;, &#39;Lucida Sans Unicode&#39;, Verdana, sans-serif; letter-spacing: -1px;&quot;&gt;
我們可以預先把程序中用到的資源，如圖片，音樂等放入項目中，打包進XAP文檔，需要的時候再從中取用。下面就說說具體實現方法。&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 90%/175% &#39;Lucida Grande&#39;, &#39;Lucida Sans Unicode&#39;, Verdana, sans-serif; letter-spacing: -1px;&quot;&gt;
&lt;br /&gt;
第一步，把資料存進項目。&lt;br /&gt;
1、右鍵點擊項目名稱－新增－新建資料夾，這裡文件夾名以 Images 為例，把需要的圖片拖進來，當然你也可以不建，直接把圖片拖到根目錄底下。&lt;br /&gt;
2、選中剛剛拖進去的圖片，看右下角的屬性標籤，如果沒有，右鍵點圖片，選屬性，確認圖片屬性中的&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;建置動作為 Resource&lt;/span&gt;。&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 90%/175% &#39;Lucida Grande&#39;, &#39;Lucida Sans Unicode&#39;, Verdana, sans-serif; letter-spacing: -1px;&quot;&gt;
&lt;br /&gt;
第二步，程式呼叫。&lt;/div&gt;
&lt;div class=&quot;wp_syntax&quot; style=&quot;background-color: #f9f9f9; border-bottom-color: silver; border-bottom-style: solid; border-bottom-width: 1px; border-left-color: silver; border-left-style: solid; border-left-width: 1px; border-right-color: silver; border-right-style: solid; border-right-width: 1px; border-top-color: silver; border-top-style: solid; border-top-width: 1px; color: #110000; margin-bottom: 1.5em; margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-x: auto; overflow-y: hidden; width: 600px;&quot;&gt;
&lt;table style=&quot;border-collapse: collapse;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;line_numbers&quot; style=&quot;background-color: #ddeeff; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: grey; overflow-x: visible; overflow-y: visible; padding-bottom: 2px; padding-left: 4px; padding-right: 4px; padding-top: 2px; text-align: right; vertical-align: top;&quot;&gt;&lt;pre style=&quot;clear: none; float: none; font-size: 12px; line-height: 1.333; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-x: visible; overflow-y: visible; white-space: pre; width: auto;&quot;&gt;1
&lt;/pre&gt;
&lt;/td&gt;&lt;td class=&quot;code&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; padding-bottom: 2px; padding-left: 4px; padding-right: 4px; padding-top: 2px; vertical-align: top; width: 600px;&quot;&gt;&lt;pre class=&quot;csharp&quot; style=&quot;clear: none; float: none; font-family: monospace; font-size: 12px; line-height: 1.333; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-x: visible; overflow-y: visible; white-space: pre; width: auto;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;System.&lt;span style=&quot;color: blue;&quot;&gt;IO&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;Stream&lt;/span&gt; src &lt;span style=&quot;color: green;&quot;&gt;=&lt;/span&gt; Application&lt;span style=&quot;color: green;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;GetResourceStream&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;new&lt;/span&gt; Uri&lt;span style=&quot;color: green;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #666666;&quot;&gt;&quot;/PhoneAppX;component/Images/abc.png&quot;&lt;/span&gt;, UriKind&lt;span style=&quot;color: green;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;Relative&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;Stream&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 90%/175% &#39;Lucida Grande&#39;, &#39;Lucida Sans Unicode&#39;, Verdana, sans-serif; letter-spacing: -1px;&quot;&gt;
關鍵在 Uri 的格式，PhoneAppX 是項目名稱，component 是固定路徑，Images/abc.jpg 才是圖片資源相對路徑，得到的是 Stream，在微軟官方的例子中，使用下面的方法來轉換成圖片：&lt;/div&gt;
&lt;div class=&quot;wp_syntax&quot; style=&quot;background-color: #f9f9f9; border-bottom-color: silver; border-bottom-style: solid; border-bottom-width: 1px; border-left-color: silver; border-left-style: solid; border-left-width: 1px; border-right-color: silver; border-right-style: solid; border-right-width: 1px; border-top-color: silver; border-top-style: solid; border-top-width: 1px; color: #110000; margin-bottom: 1.5em; margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-x: auto; overflow-y: hidden; width: 600px;&quot;&gt;
&lt;table style=&quot;border-collapse: collapse;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td class=&quot;line_numbers&quot; style=&quot;background-color: #ddeeff; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: grey; overflow-x: visible; overflow-y: visible; padding-bottom: 2px; padding-left: 4px; padding-right: 4px; padding-top: 2px; text-align: right; vertical-align: top;&quot;&gt;&lt;pre style=&quot;clear: none; float: none; font-size: 12px; line-height: 1.333; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-x: visible; overflow-y: visible; white-space: pre; width: auto;&quot;&gt;1
2
3
4
&lt;/pre&gt;
&lt;/td&gt;&lt;td class=&quot;code&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; padding-bottom: 2px; padding-left: 4px; padding-right: 4px; padding-top: 2px; vertical-align: top;&quot;&gt;&lt;pre class=&quot;csharp&quot; style=&quot;clear: none; float: none; font-family: monospace; font-size: 12px; line-height: 1.333; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; overflow-x: visible; overflow-y: visible; white-space: pre; width: auto;&quot;&gt;            BitmapImage bi &lt;span style=&quot;color: green;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: green;&quot;&gt;new&lt;/span&gt; BitmapImage&lt;span style=&quot;color: green;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;;&lt;/span&gt;
            bi&lt;span style=&quot;color: green;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;SetSource&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;(&lt;/span&gt;src&lt;span style=&quot;color: green;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;;&lt;/span&gt;
            Image img &lt;span style=&quot;color: green;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: green;&quot;&gt;new&lt;/span&gt; Image&lt;span style=&quot;color: green;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;;&lt;/span&gt;
            img&lt;span style=&quot;color: green;&quot;&gt;.&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;Source&lt;/span&gt; &lt;span style=&quot;color: green;&quot;&gt;=&lt;/span&gt; bi&lt;span style=&quot;color: green;&quot;&gt;;&lt;/span&gt;&lt;/pre&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;div style=&quot;font: normal normal normal 90%/175% &#39;Lucida Grande&#39;, &#39;Lucida Sans Unicode&#39;, Verdana, sans-serif; letter-spacing: -1px;&quot;&gt;
網路上的文章基本上都沒寫第一步，常常就卡在這裡，新增圖片還好，但是屬性的建置動作沒設好或改成其他屬性，導致程式在 Run 的時候常常丟出 Exception！&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Reference To:&amp;nbsp;&lt;a href=&quot;http://www.pocketdigi.com/20110925/498.html&quot;&gt;http://www.pocketdigi.com/20110925/498.html&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hyderest.blogspot.com/feeds/2787789560529632697/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://hyderest.blogspot.com/2011/10/wp7application.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1293315848732557676/posts/default/2787789560529632697'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1293315848732557676/posts/default/2787789560529632697'/><link rel='alternate' type='text/html' href='http://hyderest.blogspot.com/2011/10/wp7application.html' title=''/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/11626174194942519396</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1293315848732557676.post-9108323940414795696</id><published>2011-09-12T22:25:00.000-07:00</published><updated>2011-09-13T00:40:39.475-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Power Shell"/><category scheme="http://www.blogger.com/atom/ns#" term="sudo"/><category scheme="http://www.blogger.com/atom/ns#" term="Windows"/><category scheme="http://www.blogger.com/atom/ns#" term="Windows 7"/><category scheme="http://www.blogger.com/atom/ns#" term="Windows Server"/><category scheme="http://www.blogger.com/atom/ns#" term="Windows Server 2008"/><category scheme="http://www.blogger.com/atom/ns#" term="Windows XP"/><title type='text'>「sudo」 for Windows PowerShell</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
相信有許多 Unix-like 的愛用者，&lt;br /&gt;
對於 sudo 帶來的便利性及安全性，&lt;br /&gt;
都有很高的依賴性及倚靠性，&lt;br /&gt;
在 Windows 的世界，雖然有個「以系統管理員身分執行」的玩意兒，&lt;br /&gt;
但是在習慣使用文字介面如 cmd, vim, PowerShell 的人們來說，&lt;br /&gt;
倘若遇到需要系統管理員權限的設定檔或文字檔，&lt;br /&gt;
往往就是一句「XXX」之後，還要到開始功能表尋找到 cmd 或 PowerShell，&lt;br /&gt;
然後再用滑鼠點右鍵選擇「以系統管理員身分執行」，然後再 cd 到剛剛的資料夾，再用編輯器開啟、編輯、blah blah....&lt;br /&gt;
&lt;br /&gt;
一來一往，往往費神又費時，&lt;br /&gt;
今天介紹在 PowerShell 使用時，&lt;br /&gt;
可以輸入 Unix-like 中的 sudo (或使用者自己取)&lt;br /&gt;
後面再帶 vim 或 notepad 指令，接著被修改的設定檔或文字檔，&lt;br /&gt;
便可以系統管理員權限開啟該設定檔或文字檔，以便進行編修！&lt;br /&gt;
&lt;br /&gt;
一、首先「以系統管理員身分執行」開啟 PowerShell，&lt;br /&gt;
預設沒錯的話，您會在您的家目錄，如：C:\Users\XXXXXXX&lt;br /&gt;
&lt;br /&gt;
二、輸入指令以便新增 scripts 資料夾：&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #110000; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 24px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;powershell&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #f4f4f4; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: none; font-family: monospace; font-size: 12px; font-style: inherit; font-weight: inherit; font: normal normal normal 13px/normal &#39;Courier 10 Pitch&#39;, Courier, monospace; line-height: 1.333; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: visible; overflow-y: visible; padding-bottom: 0.75em; padding-left: 1.625em; padding-right: 1.625em; padding-top: 0.75em; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: teal; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;New-Item&lt;/span&gt; &lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: teal; font-family: inherit; font-size: 12px; font-style: italic; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;-ItemType&lt;/span&gt; directory &lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: purple; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;$HOME&lt;/span&gt;\Documents\Scripts&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
三、使用編輯器如 vim 或 notepad 開啟 PowerShell 之 Profile 檔：&lt;br /&gt;
(預設為 WindowsPowerShell\Microsoft.PowerShell_profile.ps1)&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #110000; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 24px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;powershell&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #f4f4f4; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: none; font-family: monospace; font-size: 12px; font-style: inherit; font-weight: inherit; font: normal normal normal 13px/normal &#39;Courier 10 Pitch&#39;, Courier, monospace; line-height: 1.333; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: visible; overflow-y: visible; padding-bottom: 0.75em; padding-left: 1.625em; padding-right: 1.625em; padding-top: 0.75em; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;notepad.exe $PROFILE&lt;/pre&gt;
&lt;br /&gt;
四、新增如下文字於該檔中：&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #110000; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 24px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;powershell&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #f4f4f4; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: none; font-family: monospace; font-size: 12px; font-style: inherit; font-weight: inherit; font: normal normal normal 13px/normal &#39;Courier 10 Pitch&#39;, Courier, monospace; line-height: 1.333; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: visible; overflow-y: visible; padding-bottom: 0.75em; padding-left: 1.625em; padding-right: 1.625em; padding-top: 0.75em; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: teal; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;New-PSDrive&lt;/span&gt; &lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: teal; font-family: inherit; font-size: 12px; font-style: italic; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;-name&lt;/span&gt; script &lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: teal; font-family: inherit; font-size: 12px; font-style: italic; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;-PSProvider&lt;/span&gt; FileSystem &lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: teal; font-family: inherit; font-size: 12px; font-style: italic; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;-Root&lt;/span&gt; &lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: purple; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;$HOME&lt;/span&gt;\Documents\Scripts&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
五、存檔並離開。&lt;br /&gt;
&lt;br /&gt;
六、重啟你的 PowerShell ，你將發現上面所新增的資料夾被 mount 起來，可以繼續進行：&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #110000; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 24px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;powershell&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #f4f4f4; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: none; font-family: monospace; font-size: 12px; font-style: inherit; font-weight: inherit; font: normal normal normal 13px/normal &#39;Courier 10 Pitch&#39;, Courier, monospace; line-height: 1.333; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: visible; overflow-y: visible; padding-bottom: 0.75em; padding-left: 1.625em; padding-right: 1.625em; padding-top: 0.75em; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: teal; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;cd&lt;/span&gt; script:&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
七、進入 script 槽後，用慣用的編輯器開啟新增 sudo.ps1 script檔：&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #110000; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 24px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;powershell&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #f4f4f4; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: none; font-family: monospace; font-size: 12px; font-style: inherit; font-weight: inherit; font: normal normal normal 13px/normal &#39;Courier 10 Pitch&#39;, Courier, monospace; line-height: 1.333; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: visible; overflow-y: visible; padding-bottom: 0.75em; padding-left: 1.625em; padding-right: 1.625em; padding-top: 0.75em; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;notepad.exe sudo.ps1&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
八、加入 sudo script 如下：&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;
param(&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [switch]$ps, &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;# Switch for running args as powershell script&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [string]$file, &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # Script/Program to run&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [string]$arguments = $args # Arguments to program/script&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;)&lt;br /&gt;
&lt;br /&gt;
# Find our powershell full path&lt;br /&gt;
$powershell = (get-command powershell).definition&lt;br /&gt;
&lt;br /&gt;
# Get current directory&lt;br /&gt;
$dir = get-location&lt;br /&gt;
&lt;br /&gt;
#If we&#39;re running this as a elevated powershell script&lt;br /&gt;
if ($ps){&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # Script verification&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if([System.IO.File]::Exists(&quot;$(get-location)\$file&quot;)) {&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # Set the $script to full path of the ps script&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $script = (get-childitem $file).fullname&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # Create a powershell process&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $psi = new-object System.Diagnostics.ProcessStartInfo $powershell&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $psi.WorkingDirectory = Get-Location&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # Combine the script and its arguments&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $sArgs = $script + &quot; &quot; + $arguments&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # Set the arguments to be the ps script and it&#39;s arguments&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $psi.Arguments = &quot;-noexit -command set-location $dir; $sArgs&quot;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # Magic to run as elevated&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $psi.Verb = &quot;runas&quot;;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
# We&#39;re running something other than a powershells script&lt;br /&gt;
else {&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # File verification&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if([System.IO.File]::Exists(&quot;$(get-location)\$file&quot;)) {&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # Get full path&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $file = (get-childitem $file).fullname&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # Same as above, create proccess/working directory/arguments/runas&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $psi = new-object System.Diagnostics.ProcessStartInfo $file&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $psi.Arguments = $arguments&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $psi.Verb = &quot;runas&quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
# Start the process&lt;br /&gt;
[System.Diagnostics.Process]::Start($psi)&lt;br /&gt;
&lt;/code&gt;
&lt;br /&gt;
&lt;br /&gt;
九、存檔並離開！&lt;br /&gt;
&lt;br /&gt;
十、再次開啟 PowerShell 的 Profile 設定檔：&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #110000; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 24px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;powershell&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #f4f4f4; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: none; font-family: monospace; font-size: 12px; font-style: inherit; font-weight: inherit; font: normal normal normal 13px/normal &#39;Courier 10 Pitch&#39;, Courier, monospace; line-height: 1.333; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: visible; overflow-y: visible; padding-bottom: 0.75em; padding-left: 1.625em; padding-right: 1.625em; padding-top: 0.75em; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;notepad.exe $PROFILE&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
十一、新增關聯指令：&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 24px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;powershell&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #f4f4f4; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: none; font-family: monospace; font-size: 12px; font-style: inherit; font-weight: inherit; font: normal normal normal 13px/normal &#39;Courier 10 Pitch&#39;, Courier, monospace; line-height: 1.333; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: visible; overflow-y: visible; padding-bottom: 0.75em; padding-left: 1.625em; padding-right: 1.625em; padding-top: 0.75em; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: teal; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;New-Alias&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #110000;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: teal; font-family: inherit; font-size: 12px; font-style: italic; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;-Name&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #110000;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: red;&quot;&gt;sudo &lt;/span&gt;&lt;span style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: maroon; font-family: inherit; font-size: 12px; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&#39;script:\sudo.ps1&#39;&lt;/span&gt;&lt;/pre&gt;
&lt;br /&gt;
注意這裡的紅色字 sudo 可以改成任何你想要的字，只要不跟內建指令撞名即可！&lt;br /&gt;
&lt;br /&gt;
十二、重啟 PowerShell，你可以使用：&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #110000; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 24px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;powershell&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #f4f4f4; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: none; font-family: monospace; font-size: 12px; font-style: inherit; font-weight: inherit; font: normal normal normal 13px/normal &#39;Courier 10 Pitch&#39;, Courier, monospace; line-height: 1.333; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: visible; overflow-y: visible; padding-bottom: 0.75em; padding-left: 1.625em; padding-right: 1.625em; padding-top: 0.75em; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;sudo notepad C:\Windows\System32\drivers\etc\hosts&lt;/pre&gt;
&lt;br /&gt;
或&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #110000; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 24px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre class=&quot;powershell&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #f4f4f4; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: none; font-family: monospace; font-size: 12px; font-style: inherit; font-weight: inherit; font: normal normal normal 13px/normal &#39;Courier 10 Pitch&#39;, Courier, monospace; line-height: 1.333; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-x: visible; overflow-y: visible; padding-bottom: 0.75em; padding-left: 1.625em; padding-right: 1.625em; padding-top: 0.75em; vertical-align: baseline; white-space: pre; width: auto;&quot;&gt;sudo vim $PROFILE&lt;/pre&gt;
&lt;br /&gt;
就會以系統管理員權限開啟，當然 Windows 的 UAC 會開啟並問你是或否，此時按「是」，&lt;br /&gt;
便會開啟具有系統管理員權限的視窗了！&lt;br /&gt;
&lt;br /&gt;
Reference To:&amp;nbsp;&lt;a href=&quot;http://techha.us/2010/05/sudo-for-powershell/&quot;&gt;http://techha.us/2010/05/sudo-for-powershell/&lt;/a&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;a href=&quot;http://www.ainotenshi.org/710/%E2%80%98sudo%E2%80%99-for-powershell-sorta&quot;&gt;http://www.ainotenshi.org/710/%E2%80%98sudo%E2%80%99-for-powershell-sorta&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://hyderest.blogspot.com/feeds/9108323940414795696/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://hyderest.blogspot.com/2011/09/sudo-for-windows-powershell.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1293315848732557676/posts/default/9108323940414795696'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1293315848732557676/posts/default/9108323940414795696'/><link rel='alternate' type='text/html' href='http://hyderest.blogspot.com/2011/09/sudo-for-windows-powershell.html' title='「sudo」 for Windows PowerShell'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/11626174194942519396</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1293315848732557676.post-3017310951165185751</id><published>2011-09-06T18:51:00.001-07:00</published><updated>2011-09-06T18:56:22.503-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Visual Studio"/><title type='text'>Visual Studio 2010 授權修改</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, sans-serif, 宋体; font-size: 14px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;line-height: 20px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
參見以下步驟：&lt;/div&gt;
&lt;div style=&quot;line-height: 20px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
32位的系統中，修改以下登錄表鍵值&lt;/div&gt;
&lt;div style=&quot;line-height: 20px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\10.0\Registration\UserName&lt;/div&gt;
&lt;div style=&quot;line-height: 20px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\&lt;br /&gt;RegisteredOrganization&lt;/div&gt;
&lt;div style=&quot;line-height: 20px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
64位系統，修改以下登錄表鍵值&lt;/div&gt;
&lt;div style=&quot;line-height: 20px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\&lt;br /&gt;VisualStudio\10.0\Registration\UserName&lt;/div&gt;
&lt;div style=&quot;line-height: 20px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\&lt;br /&gt;Windows NT\CurrentVersion\RegisteredOrganization&lt;/div&gt;
&lt;div style=&quot;line-height: 20px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
改到此步，在 Visual Studio 的關於窗口中，授權給的信息已經更改，但是 Splash Screen的畫面還是沒有改，還需接下來操作&lt;/div&gt;
&lt;div style=&quot;line-height: 20px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;img alt=&quot;&quot; height=&quot;67&quot; src=&quot;http://pic002.cnblogs.com/img/alahfun/201006/2010061200430192.jpg&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; max-width: 700px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; width=&quot;640&quot; /&gt;&lt;/div&gt;
&lt;div style=&quot;line-height: 20px; margin-bottom: 20px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
執行 devenv.exe /setup&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://hyderest.blogspot.com/feeds/3017310951165185751/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://hyderest.blogspot.com/2011/09/visual-studio-2010.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1293315848732557676/posts/default/3017310951165185751'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1293315848732557676/posts/default/3017310951165185751'/><link rel='alternate' type='text/html' href='http://hyderest.blogspot.com/2011/09/visual-studio-2010.html' title='Visual Studio 2010 授權修改'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/11626174194942519396</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1293315848732557676.post-8808693383379589883</id><published>2011-08-24T19:27:00.001-07:00</published><updated>2011-08-24T19:57:19.263-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PostgreSQL"/><category scheme="http://www.blogger.com/atom/ns#" term="Ubuntu"/><title type='text'>Installing PostgreSQL 9.0 on Ubuntu (11.04) using PPA</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;br /&gt;
The version of default PostgreSQL in the latest Ubuntu (11.04) is still 8.4.8.&lt;br /&gt;
So I decided to install 9.0 version when I found there is a PPA (Personal Package Archives) for it. (I have no previous version of PostgreSQL in this Ubuntu PC.)&lt;br /&gt;
&lt;br /&gt;
1. Resources.&lt;br /&gt;
PostgreSQL PPA: https://launchpad.net/~pitti/+archive/postgresql&lt;br /&gt;
&lt;br /&gt;
2. Add PPA repository to my Ubuntu.&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
$ sudo add-apt-repository ppa:pitti/postgresql&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
3. Install PostgreSQL 9.0&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
$ sudo apt-get update&lt;br /&gt;
$ sudo apt-get install postgresql&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
4. Check the installation [updated 2011-07-24]&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
$ locate postgresql  # check the locations of postgresql files&lt;br /&gt;
...&lt;br /&gt;
/etc/init.d/postgresql                      # server daemon&lt;br /&gt;
/etc/logrotate.d/postgresql-common&lt;br /&gt;
/etc/postgresql/9.0&lt;br /&gt;
/etc/postgresql/9.0/main                    # directory for config files&lt;br /&gt;
/etc/postgresql/9.0/main/environment&lt;br /&gt;
/etc/postgresql/9.0/main/pg_ctl.conf&lt;br /&gt;
/etc/postgresql/9.0/main/pg_hba.conf&lt;br /&gt;
/etc/postgresql/9.0/main/pg_ident.conf&lt;br /&gt;
/etc/postgresql/9.0/main/postgresql.conf&lt;br /&gt;
/etc/postgresql/9.0/main/start.conf&lt;br /&gt;
...&lt;br /&gt;
/usr/lib/postgresql                          # server apps&lt;br /&gt;
/usr/lib/postgresql/9.0&lt;br /&gt;
/usr/lib/postgresql/9.0/bin&lt;br /&gt;
/usr/lib/postgresql/9.0/lib&lt;br /&gt;
...&lt;br /&gt;
/var/lib/postgresql                          # home directory for root user postgres&lt;br /&gt;
/var/lib/postgresql/9.0&lt;br /&gt;
/var/lib/postgresql/9.0/main                 # I will create error log directory (pg_log) here&lt;br /&gt;
/var/lib/update-rc.d/postgresql&lt;br /&gt;
/var/log/postgresql&lt;br /&gt;
/var/log/postgresql/postgresql-9.0-main.log&lt;br /&gt;
/var/log/postgresql/postgresql-9.0-main.log.1&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
$ psql -V             # check psql version&lt;br /&gt;
psql (PostgreSQL) 9.0.4&lt;br /&gt;
&lt;br /&gt;
$ finger postgres     # check if user postgres is created&lt;br /&gt;
Login: postgres          Name: PostgreSQL administrator&lt;br /&gt;
Directory: /var/lib/postgresql       Shell: /bin/bash&lt;br /&gt;
Never logged in.&lt;br /&gt;
No mail.&lt;br /&gt;
No Plan.&lt;br /&gt;
&lt;br /&gt;
$ su postgres          # switch user to postgres&lt;br /&gt;
$ psql                 # launch psql as postgres and check the server version&lt;br /&gt;
psql (9.0.4)&lt;br /&gt;
&lt;br /&gt;
postgres=# select version();&lt;br /&gt;
-----------------------------------------------------------------------------------------------------&lt;br /&gt;
PostgreSQL 9.0.4 on i686-pc-linux-gnu, compiled by GCC gcc-4.5.real (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2, 32-bit&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
5. Setup Root User &#39;posrgres&#39;&lt;br /&gt;
The installer has created a unix user postgres without a password. So first I give a (unix) password to this special user. The user postgress is a root user (database administrator) of PostgreSQL Server but without a (PostgreSQL) password. So I give it one here as well.&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
$ sudo passwd postgres # give the postgres user a (unix) password&lt;br /&gt;
$ su postgres           # switch to the user postgres&lt;br /&gt;
$ psql                   # launch psql to give postgres PostgreSQL passord&lt;br /&gt;
postgres=# alter user postgres with password &#39;secret&#39;;  # new password for postgres &lt;br /&gt;
ALTER ROLE&lt;br /&gt;
postgres=# \q            # quit psql&lt;br /&gt;
$ exit                   # exit from user &#39;postgres&#39;&lt;br /&gt;
exit&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
6.Configure PostgreSQL Server&lt;br /&gt;
I want to make some changes to server config.&lt;br /&gt;
&lt;br /&gt;
Make backup copies of config files.&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
$ su postgres    # switch to the user postgres&lt;br /&gt;
$ cd /etc/postgresql/9.0/main&lt;br /&gt;
$ ls -la&lt;br /&gt;
...&lt;br /&gt;
-rw-r----- 1 postgres postgres  4108 2011-07-02 19:54 pg_hba.conf&lt;br /&gt;
-rw-r--r-- 1 postgres postgres 18064 2011-07-02 19:54 postgresql.conf&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
postgres@ubuntu-pc:/etc/postgresql/9.0/main$ cp pg_hba.conf pg_hba.conf.bak.original&lt;br /&gt;
postgres@ubuntu-pc:/etc/postgresql/9.0/main$ cp postgresql.conf postgresql.conf.bak.original&lt;br /&gt;
&lt;br /&gt;
postgres@ubuntu-pc:/etc/postgresql/9.0/main$ ls -la&lt;br /&gt;
...&lt;br /&gt;
-rw-r----- 1 postgres postgres  4108 2011-07-02 19:54 pg_hba.conf&lt;br /&gt;
-r-r----- 1 postgres postgres  4108 2011-07-03 18:33 pg_hba.conf.bak.original&lt;br /&gt;
-rw-r--r-- 1 postgres postgres 18064 2011-07-02 19:54 postgresql.conf&lt;br /&gt;
-rw-r--r-- 1 postgres postgres 18064 2011-07-03 18:33 postgresql.conf.bak.original&lt;br /&gt;
...&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
Make changes to pg_hba.config (authetification methods).&lt;br /&gt;
host    all         all       127.0.0.1/32       trust          # md5 -&amp;gt; trust&lt;br /&gt;
&lt;br /&gt;
Make changes to postgresql.conf for error log.&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
#------------------------------------------------------------------------------&lt;br /&gt;
# ERROR REPORTING AND LOGGING&lt;br /&gt;
#------------------------------------------------------------------------------&lt;br /&gt;
log_destination = &#39;stderr&#39;  # 2011.07.04 - enabled&lt;br /&gt;
logging_collector = on   # 2011.07.04 - enabled and turned on&lt;br /&gt;
log_directory = &#39;pg_log&#39;  # 2011.07.04 - enabled. I will create this folder (see below).&lt;br /&gt;
log_filename = &#39;postgresql-%Y-%m-%d_%H%M%S.log&#39; # 2011.07.04 - enabled&lt;br /&gt;
log_truncate_on_rotation = off  # 2011.07.04 - enabled and keep it off&lt;br /&gt;
log_rotation_age = 1d   # 2011.07.04 - enabled&lt;br /&gt;
log_rotation_size = 10MB  # 2011.07.04 - enabled&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
Create a log directory as specified in the config above.[updated on 2011-07-24]&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
$ su postgres         # switch to postgres user&lt;br /&gt;
$ cd ~/9.0/main/      # /var/postgresql/9.0/main&lt;br /&gt;
$ mkdir pg_log        # create a new log directory as specified in the config file above&lt;br /&gt;
$ ls -F               # confirm the new directory &#39;pg_log&#39;&lt;br /&gt;
PG_VERSION  pg_log/ ...&lt;br /&gt;
$ exit&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
7. Restart the server [new]&lt;br /&gt;
I have to restart the server to use new configurations.&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
$ sudo /etc/init.d/postgresql restart&lt;br /&gt;
* Restarting PostgreSQL 9.0 database server &lt;br /&gt;
$ sudo /etc/init.d/postgresql status&lt;br /&gt;
Running clusters: 9.0/main&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
8. Check the new log. [new]&lt;br /&gt;
Now I should have a new log generated.&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
$ sudo ls /var/lib/postgresql/9.0/main/pg_log&lt;br /&gt;
postgresql-2011-07-23_135126.log&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
9. Finally Install pgAdmin III (GUI tool for PostgreSQL) [new]&lt;br /&gt;
Since the same PPA repository (ppa:pitti/postgresql) also contains the latest pgAdmin III, I can install it with a simple apt-get command.&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
$ sudo apt-get install pgadmin3   # install the latest pgAdminIII&lt;br /&gt;
$ pgadmin3                        # launch it&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
It is version 1.12.2.&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #222222; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 12px; line-height: 16px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;post-body entry-content&quot; id=&quot;post-body-154464446149624864&quot; style=&quot;font-size: 13px; line-height: 1.4; position: relative; width: 870px;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-gHLacbWNjWY/TisT7ipN7gI/AAAAAAAAAH0/qrC6rT1MFj4/s1600/pgAdminVersion.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; color: #cc6611; float: left; margin-bottom: 1em; margin-right: 1em; text-decoration: none;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;218&quot; src=&quot;http://1.bp.blogspot.com/-gHLacbWNjWY/TisT7ipN7gI/AAAAAAAAAH0/qrC6rT1MFj4/s320/pgAdminVersion.png&quot; style=&quot;-webkit-box-shadow: rgba(0, 0, 0, 0.0976563) 1px 1px 5px; background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-left-color: rgb(238, 238, 238); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(238, 238, 238); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(238, 238, 238); border-top-style: solid; border-top-width: 1px; border-width: initial; box-shadow: rgba(0, 0, 0, 0.0976563) 1px 1px 5px; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; position: relative;&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;clear: both;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;post-footer&quot; style=&quot;background-color: #f9f9f9; border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; color: #666666; font-size: 12px; line-height: 1.6; margin-bottom: 0px; margin-left: -2px; margin-right: -2px; margin-top: 20px; padding-bottom: 5px; padding-left: 10px; padding-right: 10px; padding-top: 5px;&quot;&gt;&lt;/div&gt;&lt;br /&gt;
Reference To:&lt;a href=&quot;http://socrateos.blogspot.com/2011/07/installing-postgresql-90-on-ubuntu-1104.html&quot;&gt;http://socrateos.blogspot.com/2011/07/installing-postgresql-90-on-ubuntu-1104.html&lt;/a&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hyderest.blogspot.com/feeds/8808693383379589883/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://hyderest.blogspot.com/2011/08/installing-postgresql-90-on-ubuntu-1104.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1293315848732557676/posts/default/8808693383379589883'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1293315848732557676/posts/default/8808693383379589883'/><link rel='alternate' type='text/html' href='http://hyderest.blogspot.com/2011/08/installing-postgresql-90-on-ubuntu-1104.html' title='Installing PostgreSQL 9.0 on Ubuntu (11.04) using PPA'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/11626174194942519396</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-gHLacbWNjWY/TisT7ipN7gI/AAAAAAAAAH0/qrC6rT1MFj4/s72-c/pgAdminVersion.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1293315848732557676.post-7987903762779137311</id><published>2011-08-24T19:19:00.000-07:00</published><updated>2011-08-24T19:19:41.853-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Gnome"/><category scheme="http://www.blogger.com/atom/ns#" term="Ubuntu"/><category scheme="http://www.blogger.com/atom/ns#" term="Webmin"/><title type='text'>Install GUI in Ubuntu Server</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Tahoma, Arial, Helvetica; font-size: 12px; line-height: 20px;&quot;&gt;If you are a new user and not familiar with command prompt you can install GUI for your ubuntu LAMP server using the 2 options&lt;br /&gt;
&lt;span id=&quot;more-1369&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 12px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 12px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-indent: 20px; vertical-align: baseline;&quot;&gt;1) Install desktop Environment&lt;/div&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 12px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-indent: 20px; vertical-align: baseline;&quot;&gt;2) Install Webmin&lt;br /&gt;
&lt;strong style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 12px; font-weight: 600; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;br /&gt;
1) Install desktop Environment&lt;/strong&gt;&lt;/div&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 12px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-indent: 20px; vertical-align: baseline;&quot;&gt;First you nee to make sure you have enabled Universe and multiverse repositories in /etc/apt/sources.list file once you have enable you need to use the following command to install GUI&lt;/div&gt;&lt;blockquote style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(102, 102, 102); border-bottom-style: dashed; border-bottom-width: 1px; border-color: initial; border-left-color: rgb(102, 102, 102); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(102, 102, 102); border-right-style: dashed; border-right-width: 1px; border-style: initial; border-top-color: rgb(102, 102, 102); border-top-style: dashed; border-top-width: 1px; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 10px; padding-left: 20px; padding-right: 20px; padding-top: 10px; quotes: none; vertical-align: baseline;&quot;&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 12px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;sudo apt-get update&lt;/div&gt;&lt;/blockquote&gt;&lt;blockquote style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(102, 102, 102); border-bottom-style: dashed; border-bottom-width: 1px; border-color: initial; border-left-color: rgb(102, 102, 102); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(102, 102, 102); border-right-style: dashed; border-right-width: 1px; border-style: initial; border-top-color: rgb(102, 102, 102); border-top-style: dashed; border-top-width: 1px; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 10px; padding-left: 20px; padding-right: 20px; padding-top: 10px; quotes: none; vertical-align: baseline;&quot;&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 12px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;sudo apt-get install ubuntu-desktop&lt;/div&gt;&lt;/blockquote&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 12px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;The above command will install GNOME desktop&lt;/div&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 12px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-indent: 20px; vertical-align: baseline;&quot;&gt;If you wan to install a graphical desktop manager without some of the desktop addons like Evolution and OpenOffice, but continue to use the server flavor kernel use the following command&lt;/div&gt;&lt;blockquote style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(102, 102, 102); border-bottom-style: dashed; border-bottom-width: 1px; border-color: initial; border-left-color: rgb(102, 102, 102); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(102, 102, 102); border-right-style: dashed; border-right-width: 1px; border-style: initial; border-top-color: rgb(102, 102, 102); border-top-style: dashed; border-top-width: 1px; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 10px; padding-left: 20px; padding-right: 20px; padding-top: 10px; quotes: none; vertical-align: baseline;&quot;&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 12px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;sudo aptitude install --without-recommends ubuntu-desktop&lt;/div&gt;&lt;/blockquote&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 12px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;If you want to install light weight desktop install xfce using the following command&lt;/div&gt;&lt;blockquote style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(102, 102, 102); border-bottom-style: dashed; border-bottom-width: 1px; border-color: initial; border-left-color: rgb(102, 102, 102); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(102, 102, 102); border-right-style: dashed; border-right-width: 1px; border-style: initial; border-top-color: rgb(102, 102, 102); border-top-style: dashed; border-top-width: 1px; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 10px; padding-left: 20px; padding-right: 20px; padding-top: 10px; quotes: none; vertical-align: baseline;&quot;&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 12px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;sudo apt-get install xubuntu-desktop&lt;/div&gt;&lt;/blockquote&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 12px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;If you want to install KDE desktop use the following command&lt;/div&gt;&lt;blockquote style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(102, 102, 102); border-bottom-style: dashed; border-bottom-width: 1px; border-color: initial; border-left-color: rgb(102, 102, 102); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(102, 102, 102); border-right-style: dashed; border-right-width: 1px; border-style: initial; border-top-color: rgb(102, 102, 102); border-top-style: dashed; border-top-width: 1px; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 10px; padding-left: 20px; padding-right: 20px; padding-top: 10px; quotes: none; vertical-align: baseline;&quot;&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 12px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;sudo apt-get install kubuntu-desktop&lt;/div&gt;&lt;/blockquote&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 12px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 12px; font-weight: 600; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;2) Install Webmin in Ubuntu&lt;/strong&gt;&lt;/div&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 12px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-indent: 20px; vertical-align: baseline;&quot;&gt;Webmin is a web-based interface for system administration for Unix. Using any modern web browser, you can setup user accounts, Apache, DNS, file sharing and much more. Webmin removes the need to manually edit Unix configuration files like /etc/passwd, and lets you manage a system from the console or remotely.Currently There is no Webmin package in the Ubuntu repositories.This tutorial will explain how to Install Webmin in Ubuntu Jaunty&lt;/div&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 12px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-indent: 20px; vertical-align: baseline;&quot;&gt;You can install webmin for your server web interface to configure apache2,mysql,FTp servers and many more.Now we will see how to install webmin in Ubuntu 9.04&lt;/div&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 12px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-indent: 20px; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 12px; font-weight: 600; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Preparing your system&lt;/strong&gt;&lt;/div&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 12px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-indent: 20px; vertical-align: baseline;&quot;&gt;First you need to install the following packages&lt;/div&gt;&lt;blockquote style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(102, 102, 102); border-bottom-style: dashed; border-bottom-width: 1px; border-color: initial; border-left-color: rgb(102, 102, 102); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(102, 102, 102); border-right-style: dashed; border-right-width: 1px; border-style: initial; border-top-color: rgb(102, 102, 102); border-top-style: dashed; border-top-width: 1px; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 10px; padding-left: 20px; padding-right: 20px; padding-top: 10px; quotes: none; vertical-align: baseline;&quot;&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 12px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;sudo aptitude install perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl libmd5-perl&lt;/div&gt;&lt;/blockquote&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 12px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Now download the latest webmin using the following command or from&amp;nbsp;&lt;a href=&quot;http://www.webmin.com/download.html&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #d90d19; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;&lt;/div&gt;&lt;blockquote style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(102, 102, 102); border-bottom-style: dashed; border-bottom-width: 1px; border-color: initial; border-left-color: rgb(102, 102, 102); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(102, 102, 102); border-right-style: dashed; border-right-width: 1px; border-style: initial; border-top-color: rgb(102, 102, 102); border-top-style: dashed; border-top-width: 1px; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 10px; padding-left: 20px; padding-right: 20px; padding-top: 10px; quotes: none; vertical-align: baseline;&quot;&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 12px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;wget http://prdownloads.sourceforge.net/webadmin/webmin_1.470_all.deb&lt;/div&gt;&lt;/blockquote&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 12px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Now we have webmin_1.470_all.deb package install this package using the following command&lt;/div&gt;&lt;blockquote style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(102, 102, 102); border-bottom-style: dashed; border-bottom-width: 1px; border-color: initial; border-left-color: rgb(102, 102, 102); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(102, 102, 102); border-right-style: dashed; border-right-width: 1px; border-style: initial; border-top-color: rgb(102, 102, 102); border-top-style: dashed; border-top-width: 1px; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 10px; padding-left: 20px; padding-right: 20px; padding-top: 10px; quotes: none; vertical-align: baseline;&quot;&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 12px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;sudo dpkg -i webmin_1.470_all.deb&lt;/div&gt;&lt;/blockquote&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 12px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;This will complete the installation.&lt;/div&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 12px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-indent: 20px; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 12px; font-weight: 600; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Using the Webmin APT repository&lt;/strong&gt;&lt;/div&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 12px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-indent: 20px; vertical-align: baseline;&quot;&gt;If you like to install and update Webmin via APT, edit the /etc/apt/sources.list file on your system&lt;/div&gt;&lt;blockquote style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(102, 102, 102); border-bottom-style: dashed; border-bottom-width: 1px; border-color: initial; border-left-color: rgb(102, 102, 102); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(102, 102, 102); border-right-style: dashed; border-right-width: 1px; border-style: initial; border-top-color: rgb(102, 102, 102); border-top-style: dashed; border-top-width: 1px; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 10px; padding-left: 20px; padding-right: 20px; padding-top: 10px; quotes: none; vertical-align: baseline;&quot;&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 12px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;sudo vi /etc/apt/sources.list&lt;/div&gt;&lt;/blockquote&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 12px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;add the line&lt;/div&gt;&lt;blockquote style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(102, 102, 102); border-bottom-style: dashed; border-bottom-width: 1px; border-color: initial; border-left-color: rgb(102, 102, 102); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(102, 102, 102); border-right-style: dashed; border-right-width: 1px; border-style: initial; border-top-color: rgb(102, 102, 102); border-top-style: dashed; border-top-width: 1px; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 10px; padding-left: 20px; padding-right: 20px; padding-top: 10px; quotes: none; vertical-align: baseline;&quot;&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 12px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;deb http://download.webmin.com/download/repository sarge contrib&lt;/div&gt;&lt;/blockquote&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 12px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Save and exit the file&lt;/div&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 12px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-indent: 20px; vertical-align: baseline;&quot;&gt;You should also fetch and install my GPG key with which the repository is signed, with the commands : cd /root&lt;/div&gt;&lt;blockquote style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(102, 102, 102); border-bottom-style: dashed; border-bottom-width: 1px; border-color: initial; border-left-color: rgb(102, 102, 102); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(102, 102, 102); border-right-style: dashed; border-right-width: 1px; border-style: initial; border-top-color: rgb(102, 102, 102); border-top-style: dashed; border-top-width: 1px; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 10px; padding-left: 20px; padding-right: 20px; padding-top: 10px; quotes: none; vertical-align: baseline;&quot;&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 12px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;wget http://www.webmin.com/jcameron-key.asc&lt;/div&gt;&lt;/blockquote&gt;&lt;blockquote style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(102, 102, 102); border-bottom-style: dashed; border-bottom-width: 1px; border-color: initial; border-left-color: rgb(102, 102, 102); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(102, 102, 102); border-right-style: dashed; border-right-width: 1px; border-style: initial; border-top-color: rgb(102, 102, 102); border-top-style: dashed; border-top-width: 1px; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 10px; padding-left: 20px; padding-right: 20px; padding-top: 10px; quotes: none; vertical-align: baseline;&quot;&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 12px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;sudo apt-key add jcameron-key.asc&lt;/div&gt;&lt;/blockquote&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 12px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;You will now be able to install with the commands&lt;/div&gt;&lt;blockquote style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(102, 102, 102); border-bottom-style: dashed; border-bottom-width: 1px; border-color: initial; border-left-color: rgb(102, 102, 102); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(102, 102, 102); border-right-style: dashed; border-right-width: 1px; border-style: initial; border-top-color: rgb(102, 102, 102); border-top-style: dashed; border-top-width: 1px; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 10px; padding-left: 20px; padding-right: 20px; padding-top: 10px; quotes: none; vertical-align: baseline;&quot;&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 12px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;sudo apt-get update&lt;/div&gt;&lt;/blockquote&gt;&lt;blockquote style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(102, 102, 102); border-bottom-style: dashed; border-bottom-width: 1px; border-color: initial; border-left-color: rgb(102, 102, 102); border-left-style: dashed; border-left-width: 1px; border-right-color: rgb(102, 102, 102); border-right-style: dashed; border-right-width: 1px; border-style: initial; border-top-color: rgb(102, 102, 102); border-top-style: dashed; border-top-width: 1px; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 10px; padding-left: 20px; padding-right: 20px; padding-top: 10px; quotes: none; vertical-align: baseline;&quot;&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 12px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;sudo apt-get install webmin&lt;/div&gt;&lt;/blockquote&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 12px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;All dependencies should be resolved automatically.&lt;/div&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 12px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-indent: 20px; vertical-align: baseline;&quot;&gt;Ubuntu in particular don’t allow logins by the root user by default. However, the user created at system installation time can use sudo to switch to root. Webmin will allow any user who has this sudo capability to login with full root privileges.&lt;/div&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 12px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-indent: 20px; vertical-align: baseline;&quot;&gt;Now you need to open your web browser and enter the following&lt;/div&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 12px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-indent: 20px; vertical-align: baseline;&quot;&gt;https://your-server-ip:10000/&lt;/div&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 12px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-indent: 20px; vertical-align: baseline;&quot;&gt;Now you should see similar to the following Screen&lt;/div&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 12px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-indent: 20px; vertical-align: baseline;&quot;&gt;&lt;img alt=&quot;&quot; class=&quot;alignnone&quot; height=&quot;166&quot; src=&quot;http://www.ubuntugeek.com/images/lamp9/41.png&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-color: rgb(238, 238, 238); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-left-color: rgb(238, 238, 238); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(238, 238, 238); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-color: rgb(238, 238, 238); border-top-style: solid; border-top-width: 1px; font-size: 12px; margin-bottom: 5px; margin-left: 5px; margin-right: 5px; margin-top: 5px; max-width: 90%; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; vertical-align: baseline;&quot; width=&quot;393&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 12px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-indent: 20px; vertical-align: baseline;&quot;&gt;After login if you want to configure Apache,Mysql server you need to click on Servers on your lefthand side you should many servers are ready to configure&lt;/div&gt;&lt;div style=&quot;background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 12px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-indent: 20px; vertical-align: baseline;&quot;&gt;This is very Easy to configure most of the servers and Enjoy your new Ubuntu Jaunty LAMP Server.&lt;/div&gt;Reference To:&lt;a href=&quot;http://www.ubuntugeek.com/install-gui-in-ubuntu-server.html&quot;&gt;http://www.ubuntugeek.com/install-gui-in-ubuntu-server.html&lt;/a&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hyderest.blogspot.com/feeds/7987903762779137311/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://hyderest.blogspot.com/2011/08/install-gui-in-ubuntu-server.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1293315848732557676/posts/default/7987903762779137311'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1293315848732557676/posts/default/7987903762779137311'/><link rel='alternate' type='text/html' href='http://hyderest.blogspot.com/2011/08/install-gui-in-ubuntu-server.html' title='Install GUI in Ubuntu Server'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/11626174194942519396</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1293315848732557676.post-8006970179959275081</id><published>2011-08-24T00:24:00.000-07:00</published><updated>2011-08-24T00:24:46.152-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term=".Net"/><category scheme="http://www.blogger.com/atom/ns#" term="ASP.NET"/><category scheme="http://www.blogger.com/atom/ns#" term="Npgsql"/><category scheme="http://www.blogger.com/atom/ns#" term="PostgreSQL"/><category scheme="http://www.blogger.com/atom/ns#" term="Visual Studio"/><title type='text'>設定 Npgsql .Net Data Provider</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, sans-serif; font-size: x-small; line-height: 19px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;h3 class=&quot;post-title&quot; style=&quot;color: #ff6633; font-family: &#39;Lucida Grande&#39;, &#39;Trebuchet MS&#39;; font-size: 17px; letter-spacing: -1px; margin-top: 0px;&quot;&gt;Npgsql Design time support preview available for download!&lt;/h3&gt;&lt;div class=&quot;post-body&quot;&gt;&lt;br /&gt;
&lt;div style=&quot;clear: both;&quot;&gt;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; line-height: 19px;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black; font-weight: normal; line-height: normal;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; line-height: 19px;&quot;&gt;&lt;b&gt;UPDATE2&lt;/b&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; line-height: 19px;&quot;&gt;: For some reason, Blogger lost the original post. I had to republish it.&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; line-height: 19px;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: black; font-weight: normal; line-height: normal;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; line-height: 19px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; line-height: 19px;&quot;&gt;&lt;b&gt;UPDATE&lt;/b&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; line-height: 19px;&quot;&gt;: Jerónimo told me that you&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; line-height: 19px;&quot;&gt;&lt;b&gt;must&lt;/b&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; line-height: 19px;&quot;&gt;&amp;nbsp;use the Npgsql version which is inside the zip file in order to make it work.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, sans-serif; font-size: xx-small; line-height: 19px;&quot;&gt;&lt;/span&gt;After so much time (more than I wanted it to take) Npgsql finally has a initial design time support for Visual Studio!&lt;br /&gt;
&lt;br /&gt;
This work was done by Jerónimo Milea. Jerónimo let me know he was working on DDEX support on&amp;nbsp;&lt;a href=&quot;http://pgfoundry.org/forum/message.php?msg_id=1014320&quot; style=&quot;color: #6699cc;&quot;&gt;this thread&lt;/a&gt;&amp;nbsp;after I said I was working on DDEX support for Npgsql.&lt;br /&gt;
&lt;br /&gt;
He sent me his working copy and I started to play with it. Note that as a preview version many things may not work ok and we wanted you to provide us feedback so we can fix any bugs.&lt;br /&gt;
&lt;br /&gt;
You can download the project file from our&amp;nbsp;&lt;a href=&quot;http://downloads.npgsql.org/&quot; style=&quot;color: #6699cc;&quot;&gt;downloads page&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
Design time support is provided as a zip file containing support code as well as a copy of Npgsql project file. So, everything you need to start working with design time support is already packaged for you.&lt;br /&gt;
&lt;br /&gt;
When you unzip the file, you will have three folders and a project file. Open up this project file in Visual Studio 2010.&lt;br /&gt;
&lt;br /&gt;
There are three projects. The Npgsql.Provider project is there for historical reasons, Jerónimo told me. We will clean it up in another release. The main project is the Npgsql.Provider2. Set it up as your startup project. Right Click -&amp;gt; Set up as Startup Project.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtX0aRvUxY-8UQ-IatuaVnzMI4lmo6-jWqV-SB1bA375JvVZcFTcATaYCNuKi4bKXcWfCttB2n6F8c7lC2ou2kxI2QbBFET79M3NeaL-HtXmikcUR17yO5PTCDxGfdGAnyL2gStCvjabg/s1600/Screen+shot+2011-05-11+at+20.58.46.png&quot; imageanchor=&quot;1&quot; style=&quot;color: #6699cc; margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtX0aRvUxY-8UQ-IatuaVnzMI4lmo6-jWqV-SB1bA375JvVZcFTcATaYCNuKi4bKXcWfCttB2n6F8c7lC2ou2kxI2QbBFET79M3NeaL-HtXmikcUR17yO5PTCDxGfdGAnyL2gStCvjabg/s320/Screen+shot+2011-05-11+at+20.58.46.png&quot; style=&quot;border-bottom-color: rgb(192, 192, 192); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(192, 192, 192); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; border-width: initial; padding-bottom: 6px; padding-left: 6px; padding-right: 6px; padding-top: 6px;&quot; width=&quot;224&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
After that, tell Visual Studio to build all projects. After everything is compiled ok, there are still some other steps to be done:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;&lt;li style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://www.blogblog.com/tictac/tictac_orange.gif); background-origin: initial; background-position: 0px 6px; background-repeat: no-repeat no-repeat; list-style-image: initial; list-style-position: initial; list-style-type: none; margin-bottom: 3px; padding-left: 14px;&quot;&gt;Install Npgsql.dll and Mono.Security.dll to GAC.&amp;nbsp;&lt;/li&gt;
&lt;li style=&quot;background-attachment: initial; background-clip: initial; background-color: initial; background-image: url(http://www.blogblog.com/tictac/tictac_orange.gif); background-origin: initial; background-position: 0px 6px; background-repeat: no-repeat no-repeat; list-style-image: initial; list-style-position: initial; list-style-type: none; margin-bottom: 3px; padding-left: 14px;&quot;&gt;Add Npgsql as a provider factory in machine.config&lt;/li&gt;
&lt;/ol&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;b&gt;Install Npgsql.dll and Mono.Security.dll to GAC&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; Go to the Npgsql2\bin\debug4\ folder and add Npgsql.dll and Mono.Security.dll to GAC:&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;gacutil -i Npgsql.dll&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;gacutil -i Mono.Security.dll&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;&amp;nbsp; &amp;nbsp; Note that you will need to start a Visual Studio Command Prompt so command line tools are available to you. This shortcut is inside Visual Studio 2010 programs folder in the Visual Studio Tools subfolder.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;b&gt;Add Npgsql as a provider factory in machine.config&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; In the machine.config file, located at&amp;nbsp;C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config you have to add following line:&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, sans-serif; font-size: xx-small; line-height: 19px;&quot;&gt;&lt;add description=&quot;.Net Framework Data Provider for Postgresql Server&quot; invariant=&quot;Npgsql&quot; name=&quot;Npgsql Data Provider&quot; support=&quot;FF&quot; type=&quot;Npgsql.NpgsqlFactory, Npgsql, Version=2.0.11.91, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7&quot;&gt;&lt;/add&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif; line-height: 19px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif; line-height: 19px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333;&quot;&gt;&amp;lt;add name=&quot;Npgsql Data Provider&quot; invariant=&quot;Npgsql&quot; support=&quot;FF&quot; description=&quot;.Net Framework Data Provider for Postgresql Server&quot; type=&quot;Npgsql.NpgsqlFactory, Npgsql, Version=2.0.11.91, Culture=neutral, PublicKeyToken=5d8b90d52f46fda7&quot; /&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Times, &#39;Times New Roman&#39;, serif;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 19px;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 19px;&quot;&gt;&amp;nbsp; &amp;nbsp; This line goes inside the DbProviderFactories section.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Playing with Design Time support project&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 19px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333; font-family: Verdana, sans-serif; font-size: xx-small;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;After config Npgsql in gac and machine.config, it&#39;s time to run the project.&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; As this project will work inside VS.Net, you will need to debug VS.Net itself in order to have the project running inside it. In order to do that, you have to specify VS.net as the debug target. To do that, open Npgsql.Designer2 project properties and in the Debug tab, check the value of &quot;Start external program&quot; edit text. It is set to the path of devenv.exe. Note that it is the path of (x86) Program Files folder. This is ok if you are using a 64-bits windows installation. If you are using a 32-bits install (as I do), you just have to remove the (x86) from the path and you are set.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFaOnXZ960HQkgUsjZlpPFGVYHr_1PSBSA6k3Daqg2PD_VrCXvPMf4lf_CPGcEPGsRqISVjpGP7faZPf1WZ90GLLApsTZUe42f-bcR50ZqQqVGZjVZsgotVQqb0bWBGENJGp89yct_KJ8/s1600/Screen+shot+2011-05-11+at+21.02.13.png&quot; imageanchor=&quot;1&quot; style=&quot;color: #6699cc; margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;157&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFaOnXZ960HQkgUsjZlpPFGVYHr_1PSBSA6k3Daqg2PD_VrCXvPMf4lf_CPGcEPGsRqISVjpGP7faZPf1WZ90GLLApsTZUe42f-bcR50ZqQqVGZjVZsgotVQqb0bWBGENJGp89yct_KJ8/s320/Screen+shot+2011-05-11+at+21.02.13.png&quot; style=&quot;border-bottom-color: rgb(192, 192, 192); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-left-color: rgb(221, 221, 221); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(192, 192, 192); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(221, 221, 221); border-top-style: solid; border-top-width: 1px; border-width: initial; padding-bottom: 6px; padding-left: 6px; padding-right: 6px; padding-top: 6px;&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;line-height: 19px;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: #333333;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;After setting everything up, you can hit F5 to start the project ( you specified Npgsql.Designer2 as your startup project, right?). A new VS.Net will show up and your first VS.Net will be attached to it in debug mode. Now,&amp;nbsp;&lt;b&gt;comes a very important step you have to make:&lt;/b&gt;&amp;nbsp;Inside Npgsql.Designer2 folder, there is a file called NpgsqlProvider.gen.reg.&amp;nbsp;&lt;b&gt;You have to merge this file to your registry every time you start VS.Net to debug the project&lt;/b&gt;. This is needed because VS.Net as it is started by the project, has a command line option which makes it use an alternate registry tree which is cleaned up every time this VS.net is started. This reg file has the settings to register Npgsql.Designer inside VS.Net.&lt;/span&gt;&lt;br /&gt;
&lt;/span&gt;Reference To:&amp;nbsp;&lt;a href=&quot;http://fxjr.blogspot.com/2011/05/npgsql-design-time-support-preview.html&quot;&gt;http://fxjr.blogspot.com/2011/05/npgsql-design-time-support-preview.html&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hyderest.blogspot.com/feeds/8006970179959275081/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://hyderest.blogspot.com/2011/08/npgsql-net-data-provider.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1293315848732557676/posts/default/8006970179959275081'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1293315848732557676/posts/default/8006970179959275081'/><link rel='alternate' type='text/html' href='http://hyderest.blogspot.com/2011/08/npgsql-net-data-provider.html' title='設定 Npgsql .Net Data Provider'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/11626174194942519396</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtX0aRvUxY-8UQ-IatuaVnzMI4lmo6-jWqV-SB1bA375JvVZcFTcATaYCNuKi4bKXcWfCttB2n6F8c7lC2ou2kxI2QbBFET79M3NeaL-HtXmikcUR17yO5PTCDxGfdGAnyL2gStCvjabg/s72-c/Screen+shot+2011-05-11+at+20.58.46.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1293315848732557676.post-8596380604335420422</id><published>2011-08-23T19:50:00.000-07:00</published><updated>2011-08-23T19:51:13.597-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="PostgreSQL"/><title type='text'>PostgreSQL 初始後建立 User</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;登入&lt;br /&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;su – postgres&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
切換至 template1&lt;br /&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;psql template1&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
建立USER&lt;br /&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;create user 帳號 with password &#39;密碼&#39; createdb createuser;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
如此就已新增一個USER並擁有新增DB及USER的權限...&lt;br /&gt;
&lt;br /&gt;
如需修改USER密碼的話：&lt;br /&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;alter user 使用者 with password &#39;密碼&#39;;&lt;/span&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;hr noshade=&quot;noshade&quot; style=&quot;font-size: 12px;&quot; /&gt;&lt;br /&gt;
phpPgAdmin 預設是不允許&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;postgres&lt;/span&gt;&amp;nbsp;Login ...&lt;br /&gt;
所以最好先 create 一個 user 再 Login，方式請參考以上&lt;br /&gt;
&lt;br /&gt;
如想要允許使用&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;postgres&lt;/span&gt;&amp;nbsp;Login，務必先修改&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;postgres&lt;/span&gt;&amp;nbsp;的密碼 (&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;postgres&lt;/span&gt;&amp;nbsp;密碼不得為空 )&lt;br /&gt;
&lt;br /&gt;
再修改&lt;br /&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;vi phpPgAdmin/conf/config.inc.php&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Find...&lt;br /&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;$conf[&#39;extra_login_security&#39;] = true;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Edit...&lt;br /&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;$conf[&#39;extra_login_security&#39;] = false;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
如此便可用&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;postgres&lt;/span&gt;&amp;nbsp;Login !!!&lt;br /&gt;
&lt;br /&gt;
&lt;hr noshade=&quot;noshade&quot; size=&quot;1&quot; /&gt;&lt;br /&gt;
如需匯入資料請用下列指令&lt;br /&gt;
&lt;br /&gt;
登入&lt;br /&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;su – postgres&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
如無DB，請先新增DB以便匯入&lt;br /&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;createdb SOMENEWDB&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
匯入格式&lt;br /&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;psql -h {connected-server} -U {Username} -W -e {DB_Name} &amp;lt; {DB_dump_file}&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
EX：&lt;br /&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;psql –U admin –e SOMENEWDB &amp;lt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
請先將 xxx.sql 複製到 PostgreSQL 所在目錄下 (/usr/local/pgsql)，以便快速讀取&lt;br /&gt;
輸入以上指令後，便可將資料匯入指定的DB中...&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;hr noshade=&quot;noshade&quot; size=&quot;1&quot; /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;br /&gt;
如欲使用&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;pgAdmin III&lt;/span&gt;&amp;nbsp;工具連線，請修改&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;/usr/local/pgsql/postgresql.conf&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
將&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;tcpip_socket=false&lt;/span&gt;&amp;nbsp;設成&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;true&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;blockquote&gt;&lt;/blockquote&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hyderest.blogspot.com/feeds/8596380604335420422/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://hyderest.blogspot.com/2011/08/postgresql-user.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1293315848732557676/posts/default/8596380604335420422'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1293315848732557676/posts/default/8596380604335420422'/><link rel='alternate' type='text/html' href='http://hyderest.blogspot.com/2011/08/postgresql-user.html' title='PostgreSQL 初始後建立 User'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/11626174194942519396</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1293315848732557676.post-1428827452248822337</id><published>2011-08-22T20:03:00.000-07:00</published><updated>2011-08-23T01:50:33.301-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Command"/><category scheme="http://www.blogger.com/atom/ns#" term="Get-Process"/><category scheme="http://www.blogger.com/atom/ns#" term="Power Shell"/><category scheme="http://www.blogger.com/atom/ns#" term="TOP"/><category scheme="http://www.blogger.com/atom/ns#" term="Windows"/><title type='text'>模擬 TOP 在 Windows 的 Powershell</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;Unix-like 系列大家耳熟能詳的 TOP command，&lt;br /&gt;
到了 Windows Powershell 存在嗎？&lt;br /&gt;
&lt;br /&gt;
當然是不存在，不然幹嘛模擬XD&lt;br /&gt;
跟馬蓋先一樣，就 Powershell 現有的相關指令：Get-Process，來作延伸。&lt;br /&gt;
&lt;br /&gt;
Get-Process，顧名思義，就是要 Get 目前的 Processes，&lt;br /&gt;
為了滿足從 Unix-like 過來的捧油們，也可以打 ps 來呼叫之！&lt;br /&gt;
&lt;br /&gt;
直接來一下模擬 TOP Command：&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
while (1) { ps | sort -desc cpu | select -first 30; sleep -seconds 2; cls }&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
首先，while 就不用提了，就是迴圈，&lt;br /&gt;
然後裡頭呼叫了 ps 再透過 sort 指令依照 CPU 用量排序，所以這邊除了 CPU，也可以任君修改成需要的排序；再來透過 select 指令挑選頭 30 個 Processes，好比 Unix-like 的 head 用法；而後就是 sleep 指令，讓其 2 秒更新一次，最後再把螢幕清掉。&lt;br /&gt;
&lt;br /&gt;
收工&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hyderest.blogspot.com/feeds/1428827452248822337/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://hyderest.blogspot.com/2011/08/top-windows-powershell.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1293315848732557676/posts/default/1428827452248822337'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1293315848732557676/posts/default/1428827452248822337'/><link rel='alternate' type='text/html' href='http://hyderest.blogspot.com/2011/08/top-windows-powershell.html' title='模擬 TOP 在 Windows 的 Powershell'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/11626174194942519396</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1293315848732557676.post-7944282722221952983</id><published>2011-08-22T00:47:00.000-07:00</published><updated>2011-08-22T00:52:26.450-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Active Directory"/><category scheme="http://www.blogger.com/atom/ns#" term="AD"/><category scheme="http://www.blogger.com/atom/ns#" term="Windows 7"/><category scheme="http://www.blogger.com/atom/ns#" term="Windows Server 2008"/><category scheme="http://www.blogger.com/atom/ns#" term="網域"/><title type='text'>Windows 7「此電腦上的安全性原則已設定為顯示有關最後一個互動式登入的資訊。Windows 無法抓取此資訊。請連絡您的網路系統管理員，以取得協助。」解決方法</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;通常會發生這種狀況可能是您的 Windows 7 螢幕保護程式啟動後自動鎖定電腦，或使用者自行鎖定電腦( by Win+L 或開始選單→關機→鎖定 )後，欲輸入帳號密碼已解除工作站鎖定時，發生「&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; line-height: 16px;&quot;&gt;此電腦上的安全性原則已設定為顯示有關最後一個互動式登入的資訊。Windows 無法抓取此資訊。請連絡您的網路系統管理員，以取得協助。&lt;/span&gt;」的殘念狀態。&lt;br /&gt;
&lt;br /&gt;
首先，請先確認您的 Windows 7 是否有加入網域(廢話！沒加入網域哪會遇到這種鬼事)，再來請確認貴公司或貴單位之網域是否為 Windows Server 2008 等級，倘若不是，請開啟您的控制台，並於右上方搜尋「原則」，做人不能沒原則，做電腦更是要有原則，進入「編輯群組原則」後，依序進入：&lt;br /&gt;
&lt;br /&gt;
電腦設定→系統管理範本→Windows 元件→Windows 登入選項→&lt;b&gt;於使用者登入期間顯示有關上次登入的資訊&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
不管它是尚未設定還是已啟用，給他關掉！&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQ5J_3XH_h4E9wmAWQ0Y_7ClsLUi3O0fTkWhbSPZ3_7vKXTq3L7hUOuuFBJ4C7Xa94oGe59ZR-fR6upjBRlqYHD53umeF5oeop_RCR4V7kX9rCVokMp7vLfb-UrX_F4GwdbNHsHa1ZohZh/s1600/XD.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;250&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQ5J_3XH_h4E9wmAWQ0Y_7ClsLUi3O0fTkWhbSPZ3_7vKXTq3L7hUOuuFBJ4C7Xa94oGe59ZR-fR6upjBRlqYHD53umeF5oeop_RCR4V7kX9rCVokMp7vLfb-UrX_F4GwdbNHsHa1ZohZh/s400/XD.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
事後再鎖定貴電腦，您應該就可以看得到藍天了XD&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://hyderest.blogspot.com/feeds/7944282722221952983/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://hyderest.blogspot.com/2011/08/windows-7windows.html#comment-form' title='1 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1293315848732557676/posts/default/7944282722221952983'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1293315848732557676/posts/default/7944282722221952983'/><link rel='alternate' type='text/html' href='http://hyderest.blogspot.com/2011/08/windows-7windows.html' title='Windows 7「此電腦上的安全性原則已設定為顯示有關最後一個互動式登入的資訊。Windows 無法抓取此資訊。請連絡您的網路系統管理員，以取得協助。」解決方法'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/11626174194942519396</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQ5J_3XH_h4E9wmAWQ0Y_7ClsLUi3O0fTkWhbSPZ3_7vKXTq3L7hUOuuFBJ4C7Xa94oGe59ZR-fR6upjBRlqYHD53umeF5oeop_RCR4V7kX9rCVokMp7vLfb-UrX_F4GwdbNHsHa1ZohZh/s72-c/XD.png" height="72" width="72"/><thr:total>1</thr:total></entry></feed>