This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. | |
; #Warn ; Enable warnings to assist with detecting common errors. | |
SendMode Input ; Recommended for new scripts due to its superior speed and reliability. | |
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. | |
StringCaseSense, On | |
AnyKeyPressedOtherThanSpace(mode = "P") { | |
keys = 1234567890-=qwertyuiop[]\asdfghjkl;'zxcvbnm,./ | |
Loop, Parse, keys | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(global-set-key (kbd "C-<tab>") '(lambda () | |
(interactive) | |
(switch-to-buffer nil))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bool PathPlanner::isPointOnSeg(Vector2D pos, unsigned int start, unsigned int end) | |
{ | |
Vector2D p1=mPath[start]; | |
Vector2D p2=mPath[end]; | |
// 矩形 | |
bool flag1=false; | |
if (p1.x <= pos.x && pos.x <=p2.x && | |
p1.y <= pos.y && pos.y <= p2.y) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local ActivityPage = CommonContentPage:new() | |
package.loaded[...] = ActivityPage | |
require('MessageBox.DrawGamblePage') | |
require('MessageBox.DivineGamblePage') | |
require('MessageBox.RechargeActivityPage') | |
require('MessageBox.DailySignInPage') | |
local allActivity={[1]="mLuckDivine",[2]="mLuckDraw",[3]="mSignIn", | |
[4]="mSingle",[5]="mRecharge",[6]="mAwait"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; | |
(eval-when-compile (require 'cl)) | |
(defun set-font (english chinese english-size chinese-size) | |
(set-face-attribute 'default nil :font | |
(format "%s:pixelsize=%d" english english-size)) | |
(dolist (charset '(kana han symbol cjk-misc bopomofo)) | |
(set-fontset-font (frame-parameter nil 'font) charset | |
(font-spec :family chinese :size chinese-size)))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getDayLeftTime() | |
-- body | |
local curTime = getServerTime() | |
local dayAfterTime = curTime+24*60*60 | |
local dayAfterDate = os.date("*t", dayAfterTime) | |
local dayAfterZeroTime = os.time({year=dayAfterDate.year,month=dayAfterDate.month,day=dayAfterDate.day}) | |
return dayAfterZeroTime-curTime | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local ClientSocket = {} | |
local socket = require("socket.core") | |
local sockInst = nil | |
-- ------------------------------------------------ | |
local connStatus = nil | |
local SOCK_STATUS={INIT=1, CONNECTING=2, CONNECTED=3,DISCONNECT=4,FORCEDISCONNECT=5} | |
local connTime = nil | |
local tryConnTimes = 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var MongoClient = require('mongodb').MongoClient, | |
db; | |
// Initialize connection once | |
MongoClient.connect("mongodb://localhost:27017/location", function(err, database) { | |
if (err) throw err; | |
db = database; | |
var places = db.collection('places'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/********************************************************************** | |
Filename : xxx | |
**********************************************************************/ | |
替换类似这样的字符串 | |
1. 先写正则表达式找到他们 | |
\/\*+([^\*]|\r|\n)+\*+\/ | |
2. 然后用自己喜欢的文字替换,或者直接删除也行 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data:text/html, <html contenteditable> | |
data:text/html, <html><body style="" contenteditable spellcheck="false"> |