水曜日, 1月 26, 2011

日曜日, 1月 23, 2011

Advanced IO and Tomcat:Comet support

Advanced IO and Tomcat
Comet学习笔记(一)Tomcat与Comet

Extract the official vmware tools for Mac Os X

Extract the official vmware tools for Mac Os X
  1. install VMware fusion 2.0 and copy these files
  2. extract the 2 files from the archive and rename them with the name of guest OS : if choose "freebsd 32 bits" in the VMware server, rename them freebsd.iso and freebsd.iso.sig (same thing if put in the configuration file "darwin", rename them darwin.iso and darwin.iso.sig".

木曜日, 1月 20, 2011

iPhone load map offline tiles

From:iPhone load map offline tiles
downloaded the tiles from OpenStreetMap with the Global Map Download Tool.

map2sqlite tool 1.0 from route-me inside groups.google.com

About RMDBTileSource:
Assuming that the database is called "mymap.db" ,change the
tile source init code as follows:

- (void)viewDidLoad {
[super viewDidLoad];

...

RMDBMapSource* dbTilesource = [[[RMDBMapSource alloc]
initWithPath:@"mymap.db"] autorelease];
[[[RMMapContents alloc] initWithView:mapView
tilesource:dbTilesource] autorelease];

...

}


DB tile source for offline maps
:
storing the map tiles in an sqlite database and index the tiles using the RMTileKey() function. For best performance it makes sense to disable the internal route-me
database cache as all tiles are already stored in a database. I have
accomplished this using a routeme.plist file.

The code consists of a custom tile source (RMDBTileSource) and a new
tile image (RMDBTileImage). The RMDBTileSource.m file contains the
documentation of the database layout and the name/value pairs for the
meta data.

To get started , need to create an sqlite db with the two tables
(preferences and tiles) and store the tile images as blobs in the
tiles table and index them with the RMTileKey() function. Then add the
minimun and maximum zoom level as well as the tile size to the
preference table and you're done.

火曜日, 1月 18, 2011

git

git cookbook of recipes

See also: jeff garzik's linux pages and gkernel(This project is a random collection of Linux kernel-related projects and source code.)

Understanding memory sections and the OEMAddressTable in Windows CE 5.0 and 6.0

Understanding Memory Sections in config.bib, boot.bib, and OEMAddressTable in Windows CE 5.0 and 6.0
http://blogs.msdn.com/b/ce_base/archive/2006/09/01/understanding-memory-sections-in-config.bib_2c00_-boot.bib_2c00_-and-oemaddresstable-in-windows-ce-5.0-and-6.0.aspx

Understanding memory sections and the OEMAddressTable in Windows CE 5.0 and 6.0
http://www.windowsfordevices.com/c/a/Windows-For-Devices-Articles/Understanding-memory-sections-and-the-OEMAddressTable-in-Windows-CE-50-and-60/

月曜日, 1月 17, 2011

Run UAC restricted programs without the UAC prompt

●By Programming
Launch your application in Vista under the local system account without the UAC popup
http://www.codeproject.com/KB/vista-security/VistaSessions.aspx

Subverting Vista UAC in Both 32 and 64 bit Architectures
http://www.codeproject.com/KB/vista-security/SubvertingVistaUAC.aspx


如何在Vista中不弹出UAC以本地系统账户启动程序
http://dev.firnow.com/course/3_program/c++/cppjs/2008917/143206.html


Teach Your Apps To Play Nicely With Windows Vista User Account Control
http://msdn.microsoft.com/en-us/magazine/cc163486.aspx

●By Tools
Run UAC restricted programs without the UAC prompt



Aaron Margosis' "Non-Admin" and App-Compat WebLog

月曜日, 1月 10, 2011

How to REINSTALL GRUB with LiveCD

How to REINSTALL GRUB with LiveCD F10


When the busted system is in a single ext3 root partition (say, /dev/sda5)...
mkdir /mnt/temp
mount /dev/sda5 /mnt/temp
grub-install --root-directory=/mnt/temp /dev/sda
When the busted system has separate ext3 boot and root partitions (say, /dev/sda5 and /dev/sda6)...
mkdir -p /mnt/temp/boot
mount /dev/sda5 /mnt/temp/boot
mount /dev/sda6 /mnt/temp
grub-install --root-directory=/mnt/temp /dev/sda
When the busted system has a separate ext3 boot partition (say, /dev/sda5), and the root partition is a logical volume (say, /dev/VolGroup00/LogVol00 according to lvdisplay)...
mkdir -p /mnt/temp/boot
vgchange -a y
lvdisplay
mount /dev/sda5 /mnt/temp/boot
mount /dev/VolGroup00/LogVol00 /mnt/temp
grub-install --root-directory=/mnt/temp /dev/sda
If grub-install fails with a read error or the boot loader still doesn't work, always try the GRUB shell (and vice versa). They both accomplish the same thing, but different things occur in the background. It's not necessary to mount partitions when using the GRUB shell commands in the LiveCD. Change x & y in the example to the busted system's boot partition...
/sbin/grub
grub> root (hdx,y)
grub> setup (hd0)

日曜日, 1月 09, 2011

Install Mac OS X Snow Leopard on a PC using VMware

Install Mac OS X Snow Leopard on a PC using VMware

install VMware tools:
As a noob the best solution I found was to power up the Snow Leopard installation then use Safari to re-download the Snowy_Vmware_files.tbz2 file mentioned in the installation instructions. Open (click click)the file in Finder which then unarchives it into a Snowy_VM folder. Inside that, the darwin_snow.iso can be deftly mounted with a right click >>open>>disc image mounter (i’m new to hacks)which then prompts to install VMware tools. The SL screen res is fully adjustable after that. Back to the snowy_vm folder where one can unarchive EnsoniqAudioPCI.mpkg.tar.gz with another swift clickclick and then rclick>> open with >> installer which prompts the sound driver installation. And presto! Perfect sound via my soundblaster audigy, and 1680×1050 res. A convoluted but effective method.

crash on power off:
edit vmx from “smc.present = true” to “smc.present = false”

Change Graphics Mode:
  • How to Increase Mac OS X Snow Leopard Virtual Machine Screen Resolution on VirtualBox and VMware
  • Increase Screen Resolution with Wide Screen support for Mac OS X Virtual Machine in VMware Player and Workstation
  • change the screen size by pressing F8 on boot and entering “Graphics Mode”=”WidthxHeightxDepth” (Including “).
    For example:
    “Graphics Mode”=”1280x1024x32″

    And for screen refresh rate you can add @Rate so you get:
    “Graphics Mode”=”1280x1024x32@75″
    32 (Depth) as in 32-bit colors.
  •