如题
posted @
2008-07-06 02:22 放屁啊狗 阅读(63) |
评论 (1) |
编辑 收藏
如题
posted @
2008-07-06 02:16 放屁啊狗 阅读(30) |
评论 (0) |
编辑 收藏
地方毗邻交大,软件内容也比较丰富
posted @
2008-07-06 02:16 放屁啊狗 阅读(37) |
评论 (0) |
编辑 收藏
地方毗邻交大,软件内容也比较丰富
posted @
2008-07-06 01:59 放屁啊狗 阅读(22) |
评论 (0) |
编辑 收藏
摘要: Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> 1 2 /* 3 name: &n...
阅读全文
posted @
2008-07-04 02:35 放屁啊狗 阅读(19) |
评论 (0) |
编辑 收藏
摘要: solid数据可能听说过的人不多,可是很多unix软件很多都采用此数据库,其儿紧凑,也是不大常见所以也能操持其稳定吧当初为了操作这个东东也是费了好些时候,主要是要申请到solid的sdk包 libsolidsa.a有了当然好办了,当然没有的可以联系我
Code highlighting produced by Actipro CodeHighlighter (freeware)http://ww...
阅读全文
posted @
2008-07-04 01:39 放屁啊狗 阅读(599) |
评论 (0) |
编辑 收藏
如题
posted @
2008-07-04 01:30 放屁啊狗 阅读(618) |
评论 (6) |
编辑 收藏
公司的项目中有访问DB2数据的需求,我以前也只是听说DB2有这么个咚咚,据说也是个恐龙级的数据库。以前也没有用过DB2 在c语言的接口(访问oracle我一直用oci),网上一兜,才发现DB2有JDBC的访问接口,c方面的很少。
项目的工期比较紧,同时我也不想花太多的时间研究数据库访问接口,所以在项目中许多模块都是用python编写,开发周期短,调试,跨平台也是很吸引人,所以就用python拉。在python.org一搜索,便找到了pydb2,OK! 马上下载pydb1.2,一解开压缩包,原来是原代码,只能编译拉。还好有编译脚本:), 运行setup.py install
出现以下异常:
Compiling under Visual Studio .NET v7 recieves the
following error:
_db2_module.c(1855) : error C2036: 'SQLPOINTER' :
unknown size
This can be resolved by casting to (SQLCHAR *) instead
of a (void *):
< SQLPOINTER buf = (SQLPOINTER)((SQLCHAR
*)bs->buf + (bs->bufLen * idx));
发现原来SQLCHAR类型没有找到,没问题,找到_db2_module.c:1855行修改为:
SQLPOINTER buf = (SQLPOINTER)((void *)bs->buf +
(bs->bufLen * idx));
再次 setup.py install
ok,编译成功,db2.py的模块也被拷贝得到 $PYTHONHOME/lib/site_pakages/下去了
然后安装db2 client runtime
这样就完成了pydb2的运行配置。然后就在odbc中配置一个dsn
测试以下代码:
import DB2
conn = DB2.connect(dsn='sample', uid='db2inst1', pwd='secret')
无异常表示成功连接上DB2
之后访问数据库只要遵循python DBI2.0的规范就可以拉!
生活在python世界是很快乐的事情!
*注意: python2.4的话必须用vc7.1编译pydb2的扩展模块,因为python2.4(win32)也是用vc7.1编译的
posted @
2008-07-04 01:28 放屁啊狗 阅读(703) |
评论 (1) |
编辑 收藏
{
TCHAR pText[] = _T("\\Windows\\0\\NandFlashPartition\\MediaLib\0\\Storage Card\\MediaLib\0\0");
CString strText(pText,sizeof(pText));
SaveMultString(HKEY_LOCAL_MACHINE,_T("Loader"),_T("SystemPath"),strText,sizeof(pText));
DeleteKey(HKEY_LOCAL_MACHINE,_T("SOFTWARE\\sample\\PLAY"));
}
posted @
2008-07-04 01:24 放屁啊狗 阅读(17) |
评论 (0) |
编辑 收藏
摘要: wxlocale 初始化字符语言种类 locale.Init(wxLANGUAGE_CHINESE );// locale.Init(wxLANGUAGE_FRENCH ); wxLocale::AddCatalogLookupPathPrefix(wx...
阅读全文
posted @
2008-07-04 01:19 放屁啊狗 阅读(13) |
评论 (0) |
编辑 收藏
摘要: Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->
bh处理
1.三种旧式的bottom half 处理类型
IMMEDIATE_BH: driver注册入tq_immediate队列,等待调度
TQUEUE_BH: &n...
阅读全文
posted @
2008-07-04 01:11 放屁啊狗 阅读(809) |
评论 (1) |
编辑 收藏
1.Qgsrenderer 图层绘制器抽象基类
每个renderer只能绘制某一种适量图形对象, Qgsrenderer ::mVectorType
定义了适量图层类型(QGis::VectorType)
,Qgsrenderer定义了作为一个绘图器的基本功能接口
QgsRasterLayer 通过QgsSingleSymbolRenderer实现矢量对象的绘制
2.
QgsMapLayer 地图图层
图层类型: VECTOR,RASTER
2.1 QgsVectorLayer矢量图层
与QgsVectorLayer对应的就是QgsRasterLayer , QgsMapLayer的子类图层对象仅仅这两种。
2.2 QgsMapCanvasLayer 画板图层
2.3 QgsMapLayerRegistry
存储当前所有地图层对象,提供Layer id查询MapLayer对象的功能mapLayer(layid)
2.4 QgsMapCanvasLayer
QgsMapCanvasLayer是qgis应用层的图层对象,用于村促跟用户交互的信息,它并不是Map核心数据对象
3.QgsFeature
图层特征对象。QgsFeature包含若干Attribute,一个QgsGeometry对象
QgsLine
QgsLine由2个QgsPoint构成的线段
4. QgsMapRender
QgsMapCanvasMap利用此对象实现绘制,无子类实现。当canvas产生事件,诸如大小调整、移动、缩放等等请求时,QgsMapCanvas请求QgsMapCanvasMap进行刷新绘制,后者调用QgsMapRender::render()进行绘制图层。
Render(){
QgsMapRender内部保留图层名称数组,根据图层id到QgsMapLayerRegistry中获取图层对象,绘制图层从最底部开始。
}
5.OgsMapCanvas图层绘制板
N个图层是绘制在QgsMapCanvasMap这个对象之上的,这个对象是Qt的绘制对象
QgsMapCanvasMap其实就是提供OgsMapRender的绘制缓冲,最终还是请求QgsMapRender进行图层绘制。
6. QgsProviderRegistry
Qgis的数据源作为一个provider将被登记在QgsProviderRegistry对象中
创建一个新的矢量图层
QgsProviderRegistry中查找ogr的provider,创建一个ogr的矢量数据空间createEmptyDataSource
QgsOgrProvider作为QgsVectorDataProvider的子类,QgsVectorDataProvider作为接口被其他模块访问
new QgsVectorLayer(ogr){
new
QgsSingleSymbolRenderer()
}
QgsMapToPixel
地图单位到屏幕像素位置的转换,这个操作非常简单,根据设定的每像素地图大小单位来计算地图单位(world)到屏幕像素的转换,反之亦然
QgsProject 、QgsProjectFileTransform、Qgsversion
这些类用于qgis项目信息管理之用,项目文件类型名.qgs,格式是xml。QgsProjectFileTransform用于不同版本的qgis的功能文件的转换
QgsSymbol
这个类一方面是实现绘制图层类型的Icon,Qgis中如果创建新的line矢量层,则这个层的图标显示在层显示树的节点的Icon就是用QgsSymbol绘制产生

另一方面,在编辑矢量图层时,添加的线段都有两端的节点点,QgsSymbol就是绘制这个节点

矢量图层类型:
Point,
Line,
Polygon,
QgsMapTip
图层地标提示。当鼠标在MapCanvas上移动时,MapTip被一个定时器驱动,这时MapTip将当前地图坐标作为中心点,围绕这个点产生一个选择区域( double searchRadius =
mpMapCanvas->extent().width() * (QGis::DEFAULT_IDENTIFY_RADIUS / 100.0 );)
这个区域作为搜寻区域提交给ogr-provider查找地图的Feature对象
再找Featrue的可显示的字段,然后用QToolTip进行显示。 QToolTip最终是要被替换掉的
QgsFieldMap
typedef QMap<int, QgsField>
QgsFieldMap;
矢量图层的对象具有多个属性,可以在添加编辑对象时设置这些属性

attributeFields[CmtAttr] = QgsField(attr[CmtAttr],
QVariant::String, "text");
以上代码就可以添加一种属性类型
地图距离单位:
METERS,
FEET,
DEGREES,
Mbr : 可能全称 Max boundary Rectangle
坐标转换:
1.空间坐标转换: long/lat坐标投影到世界地图坐标 【QgsCoordinateTransform实现】
2.世界坐标转换到屏幕坐标【QgsMapToPixel实现】
//数学宏
#define PI 3.1415926
//角度转弧度
#define DEG_TO_RAD(ang) ((ang)*PI/180.0)
//弧度转角度
#define RAD_TO_DEG(rad) ((rad)*180.0/PI)
//取得x~y之间任意一个值
#define RAND_RANGE(x,y) ((x) + rand() % ((y) - (x) + 1)))
GPX
www.gpsbabel.org
是不同gps日志数据的通用解析和转换工具
gps log数据分类:
l
Waypoints: 我的行径上要路过的点。比如我去北京,顺便到徐州拜访朋友,所以途经的徐州是我要停留的waypoint
l
Routes: 是指所有WayPoint的集合构成的线路
l
Tracks: 我途经的路上所有走过的轨迹点(因该是最多的数据量)
WayPoint和route我理解为是面向应用的,而Track就是基础数据,是物理的记录
看看老外的注释
> a) waypoint
A geopoint with some special tags like name, comment and the like.
Usually used to mark special locations as your home, a hotel or a
geocache. Huge collections of gas stations, post boxes, shops and the
like are called "points of interest" (aka POIs).
> b) track
A collection of geopoints recorded by your GPS device while traveling. A
trackpoint doesn't have a name or comment, but it usually has a
timestamp. This distibguishes a trackpoint from a waypoint.
> c) route
A collection of waypoints defining the route you want to pass while
traveling.
posted @
2008-07-03 23:48 放屁啊狗 阅读(9) |
评论 (0) |
编辑 收藏
1 ;98 z.bin
2 ;两只老虎的音乐程序
3 date segment
4 freq dw 2 dup (262,294,330,262)
5 dw 2 dup (330,350,392)
6 dw 2 dup (392,440,392,349,330,262)
7 dw 2 dup(330,294,262),0ffffh
8 time dw 8 dup(500)
9 dw 2 dup (500,500,1000)
10 dw 2 dup(250,250,250,250,500,500)
11 dw 2 dup (500,500,1000)
12 date ends
13
14 code segment
15 assume cs:code,ds:date
16 begin: push ds
17 mov ax,0
18 push ax
19 mov ax,date
20 mov ds,ax
21 ;**************************
22 lea si,freq
23 lea bp,time
24 n0: mov ah,0bh
25 int 21h
26 cmp al,0ffh
27 je exit
28 mov di,[si]
29 cmp di,0ffffh
30 je n8
31
32 mov bx,ds:[bp]
33 call s_sound
34 add si,2
35 add bp,2
36 jmp n0
37 n8: lea si,freq
38 lea bp,time
39 jmp n0
40 exit:mov ah,4ch
41 int 21h
42 s_sound proc near
43 push bp
44 push si
45
46 mov al,0b6h
47 out 43h,al
48 mov dx,12h
49 mov ax,533h*896
50 div di
51 out 42h,al
52 mov al,ah
53 out 42h,al
54 in al,61h
55 mov ah,al
56 or al,3
57 out 61h,al
58
59 n1: mov cx,2801h
60 n2: loop n2
61
62 dec bx
63 jnz n1
64 mov al,ah
65 out 61h,al
66 pop si
67 pop bp
68 ret
69 s_sound endp
70 code ends
71 end begin
72
73
74
75
76
77
posted @
2008-07-03 23:40 放屁啊狗 阅读(18) |
评论 (0) |
编辑 收藏
在DOS下输入
clock 回车 在屏幕右上角显示时间和作者名,同时颜色变化
clock uninstall 回车 卸载时钟
1 ;98 z.bin
2
3 code segment
4 assume cs:code,ds:code
5 org 100h
6
7 begin:
8 jmp install
9 d1 db 'z'
10 old dd ?
11 c db 0
12 color db 0
13 pag db ?
14 line_23 db 10 dup(20h,0)
15 line db 'Z',0eh,'B',0eh,'.',0eh,20h,0
16 line_24 db 2 dup(20h,0ah,20h,0ah,':',8eh),20h,0ah,20h,0ah
17 start:
18 inc cs:[c]
19 cmp byte ptr cs:[c],8
20 je n1
21 jmp dword ptr cs:[old]
22 n1:
23 mov byte ptr cs:[c],0
24 push ax
25 push bx
26 push cx
27 push dx
28 push ds
29 push es
30 push di
31 push si
32
33 cmp byte ptr cs:[color],15
34 jae n3
35 inc cs:[color]
36 mov bh,cs:[color]
37 mov byte ptr cs:[line+1],bh
38 mov byte ptr cs:[line+3],bh
39 jmp n4
40 n3:
41 mov byte ptr cs:[color],0
42 n4:
43 mov ah,0fh
44 int 10h
45 ; mov ah,3
46 ; int 10h
47 ; push dx
48 mov cs:[pag],bh
49 mov ax,0b800h
50 mov es,ax
51 ; mov ax,4096
52 ; mov bh,pag
53 ; mul bh
54
55 ; mov di,ax
56 ; add di,140
57 mov ax,cs
58 mov ds,ax
59 ; lea si,line_23
60 cld
61 ; mov cx,20
62 ; rep movsb
63 mov ah,2
64 int 1ah
65 push cx
66 mov ah,ch
67 mov cl,4
68 shr ch,cl
69 add ch,30h
70 mov byte ptr cs:[line_24],ch
71 mov ch,ah
72 and ch,0fh
73 add ch,30h
74 mov byte ptr cs:[line_24+2],ch
75 pop bx
76 mov ah,bl
77 shr bl,cl
78 add bl,30h
79 mov byte ptr cs:[line_24+6],bl
80 and ah,0fh
81 add ah,30h
82 mov byte ptr cs:[line_24+8],ah
83 mov ah,dh
84 shr dh,cl
85 add dh,30h
86 mov byte ptr cs:[line_24+12],dh
87 and ah,0fh
88 add ah,30h
89 mov byte ptr cs:[line_24+14],ah
90 mov ax,4096
91 mov bh,pag
92 mul bh
93 mov di,ax
94 add di,134
95 lea si,line
96 mov cx,24
97 rep movsb
98
99 ; pop dx
100 ; mov bh,pag
101 ; mov ah,2
102 ; int 10h
103 pop si
104 pop di
105 pop es
106 pop ds
107 pop dx
108 pop cx
109 pop bx
110 pop ax
111 iret
112 install:
113 mov ax,351ch
114 int 21h
115 mov word ptr old,bx
116 mov word ptr old+2,es
117 mov si,80h
118 cmp byte ptr cs:[si],0
119 je next
120 cmp byte ptr es:[103h],'z'
121 jne error
122 push ds
123 push dx
124 push di
125 cli
126 lea di,old
127 mov ds,word ptr es:[di+2]
128 mov dx,word ptr es:[di]
129 mov ax,251ch
130 int 21h
131 sti
132 pop di
133 pop dx
134 pop ds
135 mov ah,49h
136 int 21h
137 jmp eexit
138 error:
139 lea dx, mess
140 mov ah,9
141 int 21h
142 eexit:
143 mov ah,4ch
144 int 21h
145 next:
146 mov ax,251ch
147 lea dx,start
148 int 21h
149 lea dx,install
150 int 27h
151 mess db ' the TSR program no find!$'
152
153 code ends
154 end begin
155
posted @
2008-07-03 23:39 放屁啊狗 阅读(670) |
评论 (2) |
编辑 收藏
摘要: Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> 硬盘锁 HDD3.EXE 程序: zbin 1997-0...
阅读全文
posted @
2008-07-03 23:32 放屁啊狗 阅读(635) |
评论 (0) |
编辑 收藏
1 ;细胞问题解决方案 1997 zbin
2 date segment
3 sum dw 0
4 s7 dw ?
5 s6 dw ?
6 s5 dw ?
7 s3 dw ?
8 s4 dw ?
9 buf1 db 103 dup (20h)
10 buf2 db 100 dup (310 dup(20h))
11 buf3 db 100 dup (20h)
12 s1 dw ?
13 s2 dw ?
14 flag1 db 100
15 flag2 db 10
16 file db 'input.txt',0
17 handle dw ?
18 leth dw ?
19 date ends
20 code segment
21 assume cs:code,ds:date,es:date
22 main proc far
23 ; *******************
24 push ds
25 mov ax,0
26 push ax
27 mov ax,date
28 mov ds,ax
29 mov es,ax
30 ;*************************
31 mov ah,3dh
32 lea dx,file
33 mov al,0
34 int 21h
35 mov handle,ax
36 mov bx,ax
37 mov ah,42h
38 mov al,2
39 mov cx,0
40 mov dx,0
41 int 21h
42
43 mov leth,ax
44 mov ah,42h
45 mov al,0
46 mov cx,0
47 mov dx,0
48 int 21h
49
50 mov ah,3fh
51 mov cx,leth
52 mov bx,handle
53 lea dx,buf2
54 int 21h
55
56 lea di,buf2
57 a2: cmp byte ptr [di],30h
58 jg a1
59 inc di
60 jmp a2
61 a1: mov s1,di
62 a3: inc di
63 cmp byte ptr [di],20h
64 jne a3
65 mov cx,di
66 sub cx,s1
67 call sec
68 mov dx,s4
69 mov s3,dx
70
71 add di,2
72 mov s1,di
73 a8: inc di
74 cmp byte ptr [di],30h
75 jge a8
76 mov cx,di
77 sub cx,s1
78 call sec
79
80 mov ah,3eh
81 mov bx,handle
82 int 21h
83 ;************
84 mov ax,s3
85 mov bx,s4
86 mul bx
87 mov s5,ax
88 mov si,