Wednesday, November 27, 2013

Android: Stop or quit the search UI

To quit the search UI in android:

((SearchManager)this.getSystemService(Context.SEARCH_SERVICE)).stopSearch();

Saturday, November 9, 2013

Android app: Find your phone via SMS

Beep My Phone is a useful Android app where you can send a SMS message to your phone, and the phone will play the notification sound no matter you had muted your phone or not.





Check it out via:

https://play.google.com/store/apps/details?id=com.mk2.beepmyphone

Monday, November 4, 2013

Customize the 404 page for ArcGIS Server Map Services

ArcGIS Server 10 internal Tomcat web root:
       \ArcGIS\Server10.0\java\manager\web_output

ArcGIS Server 10 internal Tomcat conf:
       \ArcGIS\Server10.0\java\manager\service\managerappserver\conf

You may modify the web.xml by adding the error page definition:

        ...

        <welcome-file-list>
            <welcome-file>index.html</welcome-file>
            <welcome-file>index.htm</welcome-file>
            <welcome-file>index.jsp</welcome-file>
        </welcome-file-list>

        <error-page>
            <error-code>404</error-code>
            <location>/404.htm</location>
        </error-page>

    </web-app>

And the 404 error file can put in the root (/web_output)


Sync multiple git repo at once

Use the following command in Linux will do the job:  ls -d RepoNames* | xargs -I{} git -C {} pull