a list of slides from nodeconf
you may want to take a look at the jsconf-gist too!
local _class={} | |
function class(super) | |
local class_type={} | |
class_type.ctor=false | |
class_type.super=super | |
class_type.new=function(...) | |
local obj={} | |
do | |
local create |
# -*- coding: utf-8 -*- | |
import base | |
class Host( base.BaseHost ): | |
short_key = 'ba' | |
long_key = 'bayimg' | |
host='bayimg.com' | |
action = 'http://upload.%s/upload'%host | |
form = { | |
'code':'666', | |
'tags':'guimge', |
<?php | |
/* | |
VTY - Database Manager For Mysql | |
............................................................................ | |
: Version : 1.6 (18.04.2007) : | |
: Language : English, Turkce, Italian, Spanish : | |
: URL : http://www.kutukutu.com/vty/ : | |
: Mail : [email protected] : |
a list of slides from nodeconf
you may want to take a look at the jsconf-gist too!
public static class CodeTimer | |
{ | |
public static void Initialize() | |
{ | |
Process.GetCurrentProcess().PriorityClass = ProcessPriorityClass.High; | |
Thread.CurrentThread.Priority = ThreadPriority.Highest; | |
Time("", 1, () => { }); | |
} | |
public static void Time(string name, int iteration, Action action) |
[Serializable] | |
private class SimpleMonitor : IDisposable | |
{ | |
private int _busyCount; | |
public bool Busy | |
{ | |
get | |
{ | |
return this._busyCount > 0; | |
} |
local print = print | |
function permgen (a, n) | |
print ("-- permgen begin, n: " .. n) | |
if n == 0 then | |
printResult(a) | |
else | |
for i=1,n do | |
目前网上有不少的实现QQ机器人的方法,都不太稳定甚至都已经失效了,而且我们还要冒着QQ号被盗用的风险。其实我们可以自己实现一个QQ自动应答的机器人,思路非常简单:通过模拟登录3G版QQ,来实现相关的操作: | |
一、首先我们得看看3GQQ的相关协议 | |
为此,我们需要一个支持WAP的浏览器,可以使用Firefox的wmlbrowser插件,打开FF后,访问地址:https://addons.mozilla.org/zh-CN/firefox/search/?q=wmlbrowser&cat=all&x=17&y=11 | |
二、进入3GQQ的进行协议分析 | |
3GQQ的地址是:http://pt.3g.qq.com/s?aid=nLogin3gqq 用安装了wmlbrowser插件的FF打开页面后,启用firebug,即可监视提交的数据。 | |
三、源代码 |
1) 是否有语法错误,编译错误,编译警告。 | |
做法:下载最新代码,将编译警告级别提升到最高,检查output信息。 | |
2)是否符合需求,完成requirement文档要求的内容,不能多,也不能少。 | |
注意:即使发现有问题代码,如果与需求关联不大,不要涉及。 | |
应该让每次enhancement和bug fix最简洁,牵涉范围最小,影响到组件最少。 | |
3)是否符合编码规范: | |
a) 注意等号前后,操作符前后的空格和tab,行尾不要有多余空白字符 |
#!/usr/bin/env lua | |
-- | |
-- lua2c.lua: Embedder of Lua scripts into C programs. | |
-- | |
-- Copyright (C)2010 Valeriu PaloÅŸ. All rights reserved! | |
-- | |
-- This program is an adapted version of the bin2c.lua script written | |
-- by Mark Edgar. It is licensed the same as Lua, i.e. MIT license. A | |
-- worthy mention to Leg (http://leg.luaforge.net) which provided the | |
-- better heredoc string parsing grammar. |