摘要:
[miscellany]enable-auto-props = yes[auto-props]*.pl = svn:eol-style=native; svn:mime-type=text/x-perl; svn:executable*.PL = svn:eol-style=native; svn:mime-type=text/x-perl*.pm = svn:eol-style=native; svn:mime-type=text/x-perl*.psgi = svn:eol-style=native; svn:mime-type=text/x-perl*.perl = svn:eol-st 阅读全文
摘要:
阅读全文
摘要:
Just add one file to /etc/init with contents like this:description "Your Server"start on (net-device-up and local-filesystems and runlevel [2345])stop on runlevel [016]respawnexec your-server-path-name >> /var/log/your-server.logReference:http://upstart.ubuntu.com/wiki/ 阅读全文
摘要:
Thanks Devin Watson.#include <wx/app.h>class testwxdApp : public wxAppConsole{public: virtual bool OnInit();private: void MakeDaemon();};IMPLEMENT_APP(testwxdApp);bool testwxdApp::OnInit(){ // Make a daemon at very first MakeDaemon(); // Daemon-specific initialization goes here return true;}vo 阅读全文
摘要:
<!doctype><html><head><script src='https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js'></script><script src='http://omnipotent.net/jquery.sparkline/1.6/jquery.sparkline.min.js'></script><script type="text/javascript" 阅读全文
摘要:
Thanks /etc/init.d/cherokee.1, cd /etc/init.d/, add a script file named your-custom-server with contents as follows:#! /bin/sh## start/stop your-custom-server### replace all your-custom-servers and delete this line### BEGIN INIT INFO# Provides: your-custom-server# Required-Start: $remote_fs $network 阅读全文
摘要:
自定义事件的头文件#ifndef _WE_EVENT_H_#define _WE_EVENT_H_#include <wx/event.h>class WeEvent;wxDECLARE_EVENT(wxEVT_WE, WeEvent);typedef void (wxEvtHandler::*WeEventFunction)(WeEvent&);#define WeEventHandler(func) wxEVENT_HANDLER_CAST(WeEventFunction, func)#define EVT_WE(id, func) wx__DECLARE_EVT1(w 阅读全文
摘要:
Related Javascript language features:* Object.this* Function.prototype* Function.apply(func,[args])A Class Template:1, Class Factoryvar Factory = function(C) { var F = typeof C.c === "function" ? C.c : function() {}; F.prototype = C; return F;};2, Class Constructorvar Class = Factory({ a: 阅读全文
摘要:
OpenLayers不仅仅是一个地图引擎,如果愿意,你甚至可以把jQuery封装进去。使用中可能要写作自己的控件,下面是一个模板:OpenLayers.Control.YourControl = OpenLayers.Class(OpenLayers.Control, { // may private properties here ... initialize: function(options) { OpenLayers.Control.prototype.initialize.apply(this, arguments); // initialize private settings h 阅读全文
摘要:
getTileURL = function(x,y,z,t) { return "http://emap"+((x+y)%4)+".mapabc.com/mapabc/maptile?v=w2.99&x="+x+"&y="+y+"&zoom="+(17-z);}; 阅读全文