- 博客(16)
- 资源 (1)
- 收藏
- 关注
转载 通过PNG 和相应的PLIST文件得到小文件
下面的脚本 是可以把一个大的PNG图片里面相应的小文件得到,需要安装PYTHON IMAGE模块,这个脚本是从stackoverflow得到 http://stackoverflow.com/questions/6086615/how-can-i-extract-png-images-from-plist-files/17838628#17838628#! /usr/lical/bin/py
2013-12-24 17:35:46 1832
转载 cocos2d-iphone Notes
never call CCDirector's replaceScene in a node's init method,it crashes, The Director cannot cope with replacing a scene from a node that is currently being initializednotes should never retail
2013-03-18 21:47:51 500
原创 下载jandan无聊图
import urllib2import urllibimport reimport osimport multiprocessingimport timeopener=urllib2.build_opener(urllib2.ProxyHandler({"http":"proxy"}),urllib2.HTTPHandler(debuglevel=1))urll
2013-03-11 18:52:39 1001
原创 perl s///中使用变量
$a="d:\\aa\\aa";$b="d:\\bb\\bb" ;$c="d:\\aa\\aa\\a.txt";$c=~s/\Q$a\E/$b/e;
2012-11-20 18:28:55 756
原创 得到最新的N个perforce Labels
@echo offfor /f "tokens=2,3" %%i in ('p4 labels') do echo %%j %%i >>tmp.txtset /a n=10set /a m=0sort /r tmp1.txtecho [Labels]>Labels.txtfor /f "tokens=1,3 delims=: "
2012-05-21 10:12:20 595
转载 Unable to chmod sdcard: Read-only file system
sdcard shelladb rootroot/sdcardrwmountadb shell mount -o remount rw / mountrw# mountmountrootfs / rootfs rw 0 0tmpfs /dev tmpfs rw,mode=755 0 0devpts /dev/pts devpts
2011-11-07 17:20:47 3194
原创 stocks
import urllib link="http://finance.yahoo.com/q/cp?s=^STI"html=urllib.urlopen(link).read()from sgmllib import SGMLParserimport timec
2011-09-28 00:37:39 713
原创 perforce :ArrayFields
P4RecordSet rs = P4.Run("describe", cl); string[] files = rs.Records[0].ArrayFields["depotFile"];
2011-06-27 20:11:00 367
转载 限制鼠标在窗口区域
void ClipC(HWND hwnd){ RECT rt; POINT lt, rb; GetClientRect(hwnd,&rt); lt.x=rt.left; lt.y=rt.top; rb.x=rt.right; rb.y=rt.bottom; ClientToScreen(hwnd,
2011-03-14 19:44:00 1321
原创 ListBox删除多行
<br /> private void delectToolStripMenuItem_Click(object sender, EventArgs e) { ListBox.SelectedIndexCollection selectedindexs = new ListBox.SelectedIndexCollection(lb_config); selectedindexs = lb_config.SelectedIndices;
2011-01-06 16:01:00 801
原创 自定义UserControl
想写一个类似于VS option那样的配置界面 但是一直没有找到类似于qt 中stackwigt之类的空间 看来还需要好好学习啊 如果有同学知道 麻烦告诉我一声 谢谢了 先所以就找了两个折中的办法:1: 用一个tabconrol 代替 每次根据左边checklistbox的选择 显示一个tab页 2: 自定义userconrol, 然后动态加到 splitcontainer的panel里面 总体来说 两个方法都要自定义checklistbox 和 页面的对应关系 如果页面很多的话 会有点麻烦
2010-12-27 20:42:00 437
原创 VS2005 AND GtkMM
<br />GtkMM在VS2008里面的配置:<br /> <br />下载Gtkmm的windows安装版本<br /> <br />假设安装在D:/gtkmm<br /> <br />导出所有包含include的路径:<br /> <br />chdir("D://gtkmm");system("dir /s /b >log.txt");open FH,"log.txt";$ou="";while (<FH>){ if (///include/&&!//.h$/) {
2010-12-09 14:28:00 374
原创 更新perforce user group
<br />system(" title updating the group: specail every 5 mins");while(1){ print "Input the name:/n"; $nm=""; while(defined($nm=<STDIN>)) { chomp($nm); if ($nm=~m//w+.*/) { last; } print "Input the name:/n"; } system("ec
2010-11-24 18:09:00 505
原创 【Perforce】重新sync本地删除的文件
<br />这条语句是用来sync本地已经删除 而perforce上面仍然存在的文件 以作备忘 <br />p4 diff -sd //depot/...|p4 -x- sync -f<br /> <br /> <br />
2010-11-03 14:04:00 3739 1
原创 [PYTHON] 将perforce的 changelist放到 sqlite 数据库里面
<br />from P4 import P4import sqlite3import time def InsertChanges(): #insert change to db p4=P4() p4.connect() #exittable=cursor.execute("select count(*) from sqlite_master where type='table' and name='changes'") test whether the t
2010-11-02 17:10:00 812
原创 [C#] 获取实时输出
在写一个小的GUI工具,因为里面调用了一个外部的程序,而这个程序需要执行很久,所以就决定把这个Console程序的输出实时地显示到一个TextBox里面。刚开始直接用控件Process创建了一个,一切就绪之后,发现第一次运行的时候,一切都如同所想象那样,但是把进程杀掉,然后再启动进程,却发现进程是起来了,不过却捕获不了输出,看来MSDN和GOOGLE了N久之后,终于发现每次启动的时候,是需要New一个Process Instante的,实例代码如下参考:http://www.netframeworkdev
2010-09-29 17:47:00 2086
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人