Skip to content

Instantly share code, notes, and snippets.

View xingfuqiu's full-sized avatar
👋
不写代码了!

David Qiu xingfuqiu

👋
不写代码了!
View GitHub Profile
@xingfuqiu
xingfuqiu / uThreadPool.pas
Created August 15, 2012 03:27
Delphi:线程池
unit uThreadPool;
{ aPool.AddRequest(TMyRequest.Create(RequestParam1, RequestParam2, ...)); }
interface
uses
Windows,
Classes;
// 是否记录日志
@xingfuqiu
xingfuqiu / gist:3368123
Created August 16, 2012 07:38
Delphi:在已有的表中添加字段
//MMWIN:MEMBERSCOPY
unit _MM_Copy_Buffer_;
interface
type
TCodeTemplate = class(TDataModule)
private
//---------------------------------增加字段-------------------------------------
function AppendField(Fields: TStringList; TableName, FieldName, FieldType, FieldSize: String): Boolean;
@xingfuqiu
xingfuqiu / .gitignore
Created June 26, 2013 09:24
gitignore in delphi
*.dcu
*.~*~
*.local
*.identcache
__history
*.drc
*.map
*.exe
*.dll
bin/*
@xingfuqiu
xingfuqiu / sublime_hotkey
Created August 7, 2013 07:16
Sublime Text常用快捷键
Ctrl+Shift+P:打开命令面板
Ctrl+P:搜索项目中的文件
Ctrl+G:跳转到第几行
Ctrl+W:关闭当前打开文件
Ctrl+Shift+W:关闭所有打开文件
Ctrl+Shift+V:粘贴并格式化
Ctrl+D:选择单词,重复可增加选择下一个相同的单词
Ctrl+L:选择行,重复可依次增加选择下一行
Ctrl+Shift+L:选择多行
Ctrl+Shift+Enter:在当前行前插入新行
@xingfuqiu
xingfuqiu / GetFiles.cpp
Created August 7, 2013 07:18
遍历文件夹
#include <windows.h>
#include <tchar.h>
#include <stdio.h>
BOOL IsRoot(LPCTSTR lpszPath)
{
TCHAR szRoot[4];
wsprintf(szRoot, "%c:\\", lpszPath[0]);
return (lstrcmp(szRoot, lpszPath) == 0);
}
@xingfuqiu
xingfuqiu / SX_Lesson2.cpp
Created August 7, 2013 09:37
C++:孙鑫教程Lesson2
#include <iostream>
using namespace std;
class Point
{
public:
int x;
int y;
/**
@xingfuqiu
xingfuqiu / Logger.pas
Created October 11, 2013 01:56
Delphi 日志类
unit Logger;
//=======================================================================
// 日志类(TLoger) ver.1.0
// PFeng (http://www.pfeng.org / xxmc01#gmail.com)
// 2012/11/08
// 日志级别约定:
// 0 - Information
// 1 - Notice
// 2 - Warning
// 3 - Error