Find some folders (say all .svn folders) and remove them all, in one command:
find -iwholename './*.svn' -exec rm -Rf '{}' \;
Wednesday, July 27, 2011
Sunday, July 24, 2011
The Interconnected World of Tech Companies
Very interesting. See how new companies emerge as the result of being established by employees from earlier companies: The Interconnected World of Tech Companies.
Friday, July 8, 2011
iPhone/iPad/android touch event
I have been looking for ways of detecting touch screen events on iPhone comparable to mouse events on a regular computer. I found this today and think it's wonderful. My game now can interact with user on iPhone.
On iPhone/iPad/android, can use the follow replacements for mouse events:
mousedown -> touchstart
mousemove -> touchmove
mouseup -> touchend
In mouse/touch events, obtain page location by:
To detect browser agent type (regular browser or smart phone) and reset window size:
And here's information on How to get iPad/iPhone screen dimensions in javascript.
On iPhone/iPad/android, can use the follow replacements for mouse events:
mousedown -> touchstart
mousemove -> touchmove
mouseup -> touchend
In mouse/touch events, obtain page location by:
me.vSelectCanvas.addEventListener('mousedown', function(e) {
if (e.which == 3) { return; } // do nothing for right mouse button.
var mouse_x = e.pageX - this.offsetLeft,
mouse_y = e.pageY - this.offsetTop;
// ...
}, false);
me.vSelectCanvas.addEventListener('touchstart', function(e) {
if (e.touches.length == 1) {
var mouse_x = e.touches[0].pageX - this.offsetLeft,
mouse_y = e.touches[0].pageY - this.offsetTop;
// ...
}
}, false);
To detect browser agent type (regular browser or smart phone) and reset window size:
var D=navigator.userAgent.toLowerCase();(See code here)
var x=(D.indexOf("android")!=-1)||(D.indexOf("iphone")!=-1)||(D.indexOf("ipad")!=-1);
var d=x?window.innerWidth:900;
var B=x?window.innerHeight:550;
And here's information on How to get iPad/iPhone screen dimensions in javascript.
Wednesday, July 6, 2011
Tuesday, July 5, 2011
IT new trend
Seems it includes social/mobile/cloud computing, and mining on large data.
Quora - a question-answer addition/search web site (About).
浅析Quora的技术架构
Quora使用到的技术
What's interesting to me is long polling (comet) - a server push technology.
今年科技公司IPO表现点评.
Interesting ones to me include LinkedIn, Zillow, Zygna (简介), Facebook.
如何科学的建立自己的个人网站
The Myth of Architecture Corruption
Baidu Web App Contest
Quora - a question-answer addition/search web site (About).
浅析Quora的技术架构
Quora使用到的技术
What's interesting to me is long polling (comet) - a server push technology.
今年科技公司IPO表现点评.
Interesting ones to me include LinkedIn, Zillow, Zygna (简介), Facebook.
如何科学的建立自己的个人网站
The Myth of Architecture Corruption
Baidu Web App Contest
Saturday, July 2, 2011
Call a C program from php and read output
Use shell_exec() command:
$output = shell_exec('/path/to/your/program'); // $output contains whatever program prints.
This is great. It makes possible writing C code for computation intensive part and pass result back to php.
$output = shell_exec('/path/to/your/program'); // $output contains whatever program prints.
This is great. It makes possible writing C code for computation intensive part and pass result back to php.
Subscribe to:
Posts (Atom)
Blog Archive
-
▼
2026
(36)
-
▼
June
(19)
- C10K to C10M: from thread-per-connection model to ...
- Benchmark server performance
- Application server for php, python, java, node.js,...
- Application server for C++, Go and Rust
- Nginx as reverse proxy and load balancer
- Infrastructure running: nginx, apache, php, python...
- Flow chart of nginx+apache+uvcorn infrastructure
- Flow chart of apache+uvcorn infrastructure
- Uvicorn and Gunicorn
- What's deadsnakes PPA
- What's the optional lsb-core package
- Codex known logging bug
- Daemonsize a service
- Train text to image model, to generate images of c...
- Train a model based on OpenAI API
- Open port 8080 for WebSocket
- Add websocket support on Bluehost Ubuntu VPS for D...
- Install Claude Code on ubuntu VPS of Bluehost
- Install PostgreSQL on Mac
-
▼
June
(19)