Saturday, May 7, 2011

replicate directory structure only

To replicate a directory structure only:

find * -type d -exec mkdir [TARGETDIR]/\{\} \;

Wednesday, May 4, 2011

Air for Android

Missing functions from Air SDK
  • activating phone vibration
  • access android native contact list
  • creating android intents
  • messaging to status bar
  • enable one air app to open another
  • creating widgets
To convert desktop air app to android
  • the WindowedApplication application MXML tag needs to be changed to ViewNavigatorApplication. WindowedApplication assumes there is a NativeWindow, which is not the case on Android.
  • In the Application descriptor, the namespace must be 2.6 or later and the visible tag must be set to true.
The following desktop functionalities are not supported on Android:

ActionScript 2, ContextMenu, DatagramSocket, Dockicon, EncryptedLocalStore, HTMLoader, LocalConnection, NativeMenu, NativeWindow, PrintJob, SecureSocket, ServerSocket, StorageVolumeInfo, SystemTrayIcon, Updater, XMLSignatureValidator


Wednesday, April 27, 2011

LiveUpdate

on my mac, the live update come up every hour. To find out what’s causing it, the following are some useful commands:



  1. check current live update settings
sudo symsched -l

Module Name On UI Freq Day Time Args


--------------


-------- --- --- -------- ----- ------ ----


LiveUpdate DefaultLiveUpdateSchedul 1 0 Hourly 04:33 "All Products"



It is set to hourly update and not in quiet mode.



  1. delete current setting
sudo symsched -d all

  1. add new policy
sudo symsched LiveUpdate "LiveUpdate" 1 0 -daily 09:00 "All Products" -quiet

  1. check new settings
Module Name On UI Freq Day Time Args

--------------


-------- --- --- -------- ----- ------ ----


LiveUpdate LiveUpdate 1 0 Daily 09:00 "All Products" -quiet



Now it is running in quiet mode.

Saturday, February 19, 2011

vsftp server

  1. Start vsftp automatically
If the FTP service shall be operated with inetd we open the configuration file "/etc/inetd.conf" with an editor:

# ftp stream tcp nowait root /usr/sbin/tcpd in.ftpd
ftp stream tcp nowait root /usr/sbin/tcpd vsftpd


xinetd
It is recommended to start the vsftp daemon with xinetd which is more up to date than inetd. Some updates are e.g. logging of requests, access control, binding of the service to a specific network interface and so on. A very good introduction to xinetd can be found under [7]. After the modification restart of xinetd is necessary. The configuration of xinetd could look like this:

# vsftp daemon.
service ftp
{
disable = no
socket_type = stream
wait = no
user = root
server = /usr/sbin/vsftpd
per_source = 5
instances = 200
no_access = 192.168.1.3
banner_fail = /etc/vsftpd.busy_banner
log_on_success += PID HOST DURATION
log_on_failure += HOST
nice = 10
}




Monday, August 30, 2010

Retrieve Unique Values from gisdata

import arcpy
from arcpy import env

env.workspace = "c:/data"

patch_shp = "test.shp"

field = "GRIDCODE"

valueList = []

rows = arcpy.SearchCursor(patch_shp)
for row in rows:
    valueList.append(row.getValue(field))

uniqueSet = set(valueList)
uniqueList = list(uniqueSet)
uniqueList.sort()

del rows
del row

print uniqueList

Thursday, November 27, 2008

Zend Framework with IIS 7.0

Zend Framework uses Fron Controller pattern to redirect incoming request. On Apache web server, mod_rewrite can be used to redirect the request. What I am interested is how to support url rewrite in IIS 7.0.

Google search revealed there is a URL Rewrite module for IIS 7.0.

Wednesday, August 6, 2008

SQL Server 2008 RTM is available at MSDN

 

MSDN subscribers can get the RTM.