- 博客(128)
- 资源 (15)
- 收藏
- 关注
转载 Go 1.6 release party
What's happening?To celebrate the release of Go 1.6 we're organising a world wide release party on February the 17th, 2016.
2016-02-02 23:08:12
848
1
原创 perl 6 批量处理文件
Perl 6 Language目前perl6对GB2312的文件支持的不好,请转换为UTF-8的输入文件。简单尝试了一下将之前用perl5写的这个脚本改成了perl 6(未使用额外的包),与perl 5有些区别。比如?: 换成了?? !! 等,更多的请参考Synopsis 。 use v6;my $dir = '.';my \TABLEN = 4;find(&undersc
2015-02-08 19:31:17
1686
原创 sublime text 3 编辑器 perl支持
1. 下载sublime text 3的最新版本,安装,注册。2. 下载包Package Control和ConvertToUTF8,然后解压放到Preferences->Browse Package所在的目录即完成了插件的安装(通常网络方式安装可能失败)。对于perl,中文希望构建GBK的生态系统。修改ConvertToUTF8.sublime-settings中的 // Encod
2015-01-16 22:10:03
6816
原创 perl批量处理文件
################################################################################ fileGs# 功能: 将指定目录下所有.c和.h文件的tab转成空格、删除行尾空字符# 说明: 此脚本提供了批量处理文件的方法,修改单行线之间的内容可以完成不同的功能# -------------------------
2014-06-15 19:21:18
2842
原创 Get a hash value using XS
#include #define PERL_NO_GET_CONTEXT#include "EXTERN.h"#include "perl.h"#include "XSUB.h"#include "get-hash-value.h"#include "ppport.h"void get_hash_value (pTHX_ HV * hash){ c
2014-06-02 22:10:17
1431
原创 Perl and XS: Example 3: Set::Bit
#define PERL_NO_GET_CONTEXT#include "EXTERN.h"#include "perl.h"#include "XSUB.h"#include "ppport.h"typedef struct{ /* The range of the set is 0..n_bits - 1 */ int n_bits;
2014-05-29 21:41:14
1407
原创 windows cpan 编译安装DBD::mysql
C:\Perl\bin\perl.exe myld link -out:blib\arch\auto\DBD\mysql\mysql.dll -dll -nologo -nodefaultlib -debug -opt:ref,icf -libpath:"c:\perl\lib\CORE" -machine:x86 dbdimp.obj mysql.obj C:\perl\lib\COR
2014-05-01 11:55:56
2447
原创 Perl + mysql
#!/usr/bin/perluse strict;use DBI;# 连接到数据库,创建数据库my $dbh = DBI->connect("DBI:mysql:test:localhost","root","c12c1212",{ RaiseError => 1, AutoCommit => 0 }); $dbh->do("CREATE SCHEMA IF NO
2014-04-09 22:25:34
823
原创 Perl DBI 自动选择更新部分字段的值
通常,有一个表有多个字段,有时候会只修改其中的某些字段,定义为NULL的字段不更新,如下updatefield函数。#!/usr/bin/perluse strict;use DBI;use constant { NULL => '', null => ''};# 连接到数据库my $dbh = DBI->connect("dbi:SQLite:
2014-04-02 21:48:09
1281
原创 Perl + XS 用c/c++方便的编写perl扩展
整理一下网上的资料1. h2xs -A wldemo 生成模板 Writing Wldemo/ppport.hWriting Wldemo/lib/Wldemo.pmWriting Wldemo/Wldemo.xsWriting Wldemo/Makefile.PLWriting Wldemo/READMEWriting Wldemo/t/Wldemo.tWrit
2014-04-01 21:53:56
5624
原创 bochs smp 支持
~/bochs-2.6.2mingw pthread(增加多线程库)$ ./configure -enable-smp --enable-cpu-level=6 --enable-all-optimizations --enable-x86-64 --enable-vmx --enable-avx --enable-sb16 --enable-cdrommakemake in
2013-12-09 23:37:24
2815
原创 MmGetPhysicalAddress x86 pae or no pae
; no paent!MmGetPhysicalAddress:8083a918 55 push ebp8083a919 8bec mov ebp,esp8083a91b 8b4d08 mov ecx,dword ptr [ebp+8] ;BaseAddress8083a91e 8bc1
2013-09-28 19:38:39
1961
原创 UNICODE_STRING
struct UNICODE_STRING Length UINT16 MaximumLength UINT16 PADDING 4 Buffer PVOIDendsstruc defUNICODE_STRING [udata]{ common local s
2013-09-28 13:28:20
1403
原创 fasm Ke386SetIoAccessMap
nt!Ke386SetIoAccessMap:804f8160 8bff mov edi,edi804f8162 55 push ebp804f8163 8bec mov ebp,esp804f8165 57 push edi804f8166 8b7d08
2013-09-21 22:41:53
1621
原创 fasm giveio
format PE DLL native 4.0 at 10000hentry DriverEntryinclude 'win32.inc'IOPM_SIZE = 2000h ; sizeof I/O permission map;=================================================================
2013-09-12 21:33:19
1095
原创 fasm driver 驱动编程
1. 支持x86,x64的结构定义的统一(指针用PVOID),由此只需要维护一套结构体(对齐用PADDING),如下演示:struct DRIVER_OBJECT Type INT16 Size INT16 PADDING 4 DeviceObject
2013-09-09 22:40:56
1252
原创 关于一些透明窗体所需的的函数
效果图: 1.DIB32位, 预乘alphaproc AlphaPreMul uses ebx edi, pBitDst,pDstRect,dwDstWight local dwWight:DWORD,dwHight:DWORD ;--------------------------------------- mov edi,[pBitD
2013-08-11 15:47:40
1339
原创 How to use UpdateLayeredWindow with UI Controls like buttons etc?:)
Marc Gregoire said,Wrote on June 17, 2009 @ 12:21 pm In my example I have this device context called hDC which will be used in the call to UpdateLayeredWindow. This is just a 32bit device co
2013-08-08 22:32:07
1166
原创 opengl 中透视投影到屏幕的对应关系
#include #include #include #include #define PI 3.14159265358979323846264338327950288 // piLRESULT CALLBACK WndProc(HWND,UINT,WPARAM,LPARAM);int WINAPI WinMain(HINSTANCE hInstance,HIN
2013-08-04 23:33:21
2159
原创 大数copy相关的函数
<!--.S1 {color:#007F00; font-size:10pt}.S2 {color:#ff0000; font-size:10pt}.S4 {color:#000000; font-size:10pt}.S6 {color:#00007F; font-size:10pt}.S8 {color:#46aa03; font-s
2013-06-05 18:38:22
925
原创 大数左右移运算
; MP_BIT = 30; MP_NAIL = 32 - MP_BIT; MP_MASK = 3FFFFFFFh ;base 30bit 28~30; mp_limb_t; mpn_rshift (mp_ptr rp, mp_srcptr up, mp_size_t n, unsigned int cnt) ; assert (n >=
2013-06-05 18:34:25
1090
原创 Windows下OpenGL扩展版本的使用
API and Extension Header Files Because extensions vary from platform to platform and driver to driver, OpenGL developers can't expect interfaces for all extensions to be defined in the standard gl.h
2013-04-13 18:16:49
4012
1
原创 fasm DirectDraw test
接前三节的头文件,写一个简单的测试:;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>;*--==--* fasm directdraw test.;*--==--* By G-Spider;*--==--* fasm ddraw.asm ddraw.exe;>>>>>>>>>>>>>>>>>>>>>>>>
2013-04-05 21:47:05
1110
原创 适于fasm的DirectDraw头文件定义
接上两节,可以将ddraw.h定义为ddraw.inc,如下:;==========================================================================; *; * Copyright (C) Microsoft Corporation. All Rights Reserved.; *; * File:
2013-04-05 21:41:41
2367
原创 fasm 定制win32头文件
有了上一节写的typedef宏,觉得相当完美,为什么这么说呢?1. 可读性增强了。如HANDLE2. 32或64的结构只需要一份,因为PVOID可以很好的呈现指针,与c一致。开关:_WIN64 equ FALSE (或者TRUE)3. 结构体定义不再需要多见的?字符如:struct POINT x dd ? y dd ?ends变为struct PO
2013-04-05 21:27:17
1609
原创 fasm C-compatible syntax typedef macro
汇编在做c头文件移植的时候,总觉得db dw dd dq的类型有些生硬,不具可读性,并且对于win32,win64的结构需要维护两份。于是写了个fasm的typedef宏(与c的写法相同),可用于结构体定义,数据定义,函数的局部变量local 定义中。 ;---===---;---===---fasm typedef macro by G-Spider @2013;---===--
2013-03-13 21:23:37
1418
原创 [收集]相对路径和绝对路径
为文件命名尽管每个文件系统对各自的文件夹或文件的命名格式都有具体的规定,但是所有的系统都遵循着一个通用的约定:一个基本文件名(base file name)和一个可选的扩展名,它们之间被一个点号分开。 例如,MS-DOS FAT 文件系统支持8字符长得基本文件名和3字符长的扩展名。这被称为8.3文件名。FAT文件系统和NTFS文件系统没有8.3文件名的限制,因为它们支持长文件名(l
2012-09-02 13:02:07
4108
原创 Proteus 7.10 支持ARM Cortex-M3/LM3S*
最新特性:Proteus VSM for ARM Cortex-M3/LM3S* - Simulation support for this popular microcontroller familyARM Cortex-M3/LM3S*库模块:LIBRARY: STELLARIS.LIBMODELS: cm3.dll ,cm3_lm.dll ,STELLARIS.LML在p
2012-03-01 21:19:55
7525
原创 纯净版fasm 浮点矩阵乘SSE
<!--.S0 {font-family:'DejaVu Sans Mono'; color:#0; font-size:11pt}.S1 {font-family:'DejaVu Sans Mono'; color:#007F00; font-size:11pt}.S2 {color:#ff0000}.S4 {color:#000000}.S6
2011-12-10 21:33:13
1961
原创 大数库最新进展
<!--.S0 {font-family:'DejaVu Sans Mono'; color:#0; font-size:11pt}.S1 {font-family:'DejaVu Sans Mono'; color:#007F00; font-size:11pt}.S2 {color:#ff0000}.S4 {color:#000000}.S9
2011-12-06 19:57:46
978
原创 flat assembler fasm 支持OD源码调试
The flat assembleris a fast and efficient self-assembling x86 assembler for DOS, Windows and Linux operating systems. Currently it supports x86 and x86-64 instructions sets with MMX, 3DNow!, SSE up
2011-11-28 15:07:00
1310
原创 优化的两款串Hash函数
对以下两种hash函数(FNV BKDR)做了点优化,方便用于以0结尾的短字符串进行hash,得到32位的hash值----------------- By G-Spider FNV hash Fnv32_t__stdcall fnv_32a_str_c(char *str){ unsigned char *s = (unsigned char *)str; /* u
2011-11-12 23:26:27
1323
原创 Foorbar2000 DUI测试
弄的比较简单,勿喷,呵呵。图1:图2: 来个Kameleon CUI的界面: 最后,个人还是喜欢简约的风格:
2011-11-09 15:54:44
1297
原创 GCC 内联汇编测试
-masm=dialectOutput asm instructions using selected dialect. Supported choices are ‘intel’or ‘att’ (the default one). Darwin does not support ‘intel’. intel_syntax风格语法,AT&T实在看的不顺眼,呵呵。compiled
2011-11-07 16:49:46
1283
最新gmp 6.0.0 编译好的dll windows下使用 x64版本
2014-07-01
最新大数库 gmp 6.0.0 编译好的dll windows下使用 x86版本
2014-07-01
gotoblas2 高效矩阵库
2011-08-28
最新大数库 gmp-5.0.2 dll 动态链接库 mingw编译 windows下使用
2011-07-07
gotoblas2 blas 高效矩阵库
2011-06-20
mpg123 1.13.1,集成测试版本 (win32窗体)
2011-01-09
最新gmp 5.1.0 编译好的dll windows下使用
2011-01-08
lzma 7z 压缩解压调用源码
2010-12-06
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人