把 wordpress blog 立即變成 mobile friendly 的套件
阿毛介紹的: http://mobilepress.co.za/
裝好後它會偵測 user 的 user agent 若是 mobile 就會把頁面換成 ‘手機’ 版.
阿毛介紹的: http://mobilepress.co.za/
裝好後它會偵測 user 的 user agent 若是 mobile 就會把頁面換成 ‘手機’ 版.
http://amos-lee.blogspot.com/2010/05/10.html
http://www.balsamiq.com/builds/mockups-web-demo/?q=demos/mockups/Mockups.html
這隻程式會展現一個地圖, 並以目前定位的座標為中心點, 及一個按鈕,按下按鈕會把座標及UDID傳送到 server , 由 server 端的程式記錄下來, 並且 server 端亂數送出一個水果名回傳給 iPhone client 端, iPhone client 端再把這水果名 show 在 iPhone screen上.
底下是片斷程式碼:
FirstViewController.h :
#import#import #import @interface FirstViewController : UIViewController { IBOutlet MKMapView *mapView; CLLocationManager *locationManager; CLLocation *currentLocation; } - (IBAction) updateLocation; @end
FirstViewController.m :
- (void)viewDidLoad {
[super viewDidLoad];
if (locationManager==nil) {
locationManager = [[CLLocationManager alloc] init];
locationManager.delegate = self;
}
[locationManager startUpdatingLocation];
[mapView setMapType:MKMapTypeStandard];
}
- (void)locationManager:(CLLocationManager *)manager
didUpdateToLocation:(CLLocation *)newLocation
fromLocation:(CLLocation *)oldLocation {
NSLog(@"Location : %.6f , %.6f", newLocation.coordinate.latitude , newLocation.coordinate.longitude );
MKCoordinateRegion region = [mapView region];
region.center = newLocation.coordinate;
MKCoordinateSpan span;
span.latitudeDelta = 0.01;
span.longitudeDelta = 0.01;
region.span = span;
[mapView setRegion:region animated:TRUE];
//
if ( currentLocation != nil) {
[currentLocation release];
currentLocation = nil;
}
currentLocation = [newLocation copy];
}
- (IBAction) updateLocation {
if(currentLocation==nil)
return;
UIDevice *device=[[UIDevice alloc] init];
NSString *URLString=[[NSString alloc] initWithFormat:@"http://z.monster.tw/save_location.php?lat=%.6f&lng=%.6f&id=%@"
,currentLocation.coordinate.latitude
,currentLocation.coordinate.longitude
,device.uniqueIdentifier];
[device release];
NSLog(@"%@",URLString);
// Send Request
NSURLRequest *request=[NSURLRequest requestWithURL:[NSURL URLWithString:[URLString stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]
cachePolicy:NSURLRequestReloadIgnoringCacheData
timeoutInterval:20.0];
NSData *returnData = [NSURLConnection sendSynchronousRequest:request returningResponse:nil error:nil];
NSString *returnString = [[NSString alloc] initWithData:returnData encoding:NSUTF8StringEncoding];
NSLog(@"%@",returnString);
// Display AlertView
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:returnString message:@"Thanks!"
delegate:self cancelButtonTitle:@"Close" otherButtonTitles: nil];
[alert show];
[alert release];
[returnString release];
}
Oracle doc PDF URL : http://dn.monster.tw/my/docs/oracle/MAA_10gR2_Streams_Configuration.pdf
Oracle® Streams Advanced Queuing User’s Guide and Reference
10g Release 2 (10.2) – http://download.oracle.com/docs/cd/B19306_01/server.102/b14257/toc.htm
sample memo: http://www.monster.com.tw/archives/2565
Oracle Maximum Availability Architecture – Overview – http://www.oracle.com/technology/deploy/availability/htdocs/maaoverview.html
From URL : http://anyall.org/blog/2009/04/performance-comparison-keyvalue-stores-for-language-model-counts/
| architecture | name | speed (tweets/sec) |
| in-memory, within-process | python dictionary | 2700 |
| on-disk, within-process | tokyo cabinet hashtable | 1400 |
| on-disk, within-process | berkeleydb hashtable | 340 |
| on-disk, over socket | tokyo tyrant, binary protocol | 225 |
| in-memory, over socket | memcached | 120 |
| in-memory, over socket | tokyo tyrant, memcached protocol | 85 |
| on-disk, over socket | tokyo tyrant, memcached protocol | 85 |
| on-disk, over socket | memcachedb | 0.5 |
memcache 的測試值跟我測得的數據接近(我用 100K 的 data測)
為了避免該資料不見, 搜藏/節錄一下重點:
More details on the options:
I can’t say this evaluation tells us too much about the server systems, since it’s all for a single process, which really isn’t their use case. It is interesting, however, to see that memcached’s plaintext protocol causing a big performance hit compared to a binary one. There’s a lot of talk and perhaps code for a binary memcached protocol, but I couldn’t find any docs suggesting whether it currently works. Tyrant seems to work great.
The biggest takeaway is that Tokyo Cabinet is awesome. It has very complete English language documentation — something sadly lacking in many otherwise fine Japanese open-source projects — and appears to be highly performant and very flexible. This presentation by its author (Mikio Hirabayashi) shows a pretty impressive array of different things the suite of packages can do. At the very least, I’ll probably abandon BerkeleyDB if Cabinet keeps working so well; and hopefully, distribution and remote access will be easy to add via Tyrant.
Final note: it’s interesting how many of these new low-latency datastore systems come out of open-sourced projects from social network companies. Tokyo Cabinet/Tyrant is from Mixi, a large Japanese social networking site; Cassandra is from Facebook; and Voldemort is from LinkedIn. (Hadoop HDFS, approximately from Yahoo, is another open-source non-rdbms distributed datastore, though it’s not really low-latency enough to be comparable.) Then there are lots of commercial low-latency and distributed systems for data warehousing (oracle greenplum vertica aster…) but all these large web companies seem happy open-sourcing their infrastructure. This is great for me, but sucks to be a database company.
www.monster.com.tw , © Copyright 2008