摘要:
文件使用方式 意 义“rt” 只读打开一个文本文件,只允许读数据“wt” 只写打开或建立一个文本文件,只允许写数据“at” 追加打开一个文本文件,并在文件末尾写数据“rb” 只读打开一个二进制文件,只允许读数据“wb” 只写打开或建立一个二进制文件,只允许写数据“ab” 追加打开一个二进制文件,并在文件末尾写数据“rt+” 读写打开一个文本文件,允许读和写“wt+” 读写打开或建立一个文本文件,允许读写“at+” ... 阅读全文
摘要:
大家说torsion工具中文输入很麻烦,这段时间不忙,刚好静下心来,研究了下,只要把字符串转化从GB2312为UTF-8就可以了。主要修改static int Sc_ScanString(int ret)这个函数就ok了static int Sc_ScanString(int ret){ CMDtext[CMDleng - 1] = 0; if(!collapseEscape(CMDtext+1)) return -1; /* CMDlval.str = (char *) consoleAlloc(dStrlen(CMDtext)); dStrcpy(CMDlval... 阅读全文
摘要:
安装ActivePerl 编写以下BAT;perl Configure VC-WIN32call "e:\Program Files\Microsoft Visual Studio 9.0\VC\bin\vcvars32.bat"call ms\do_msnmake -f ms\ntdll.makpauseBAT文件位置D:\openssl-1.0.1c运行BAT就可以正常编译了 阅读全文
摘要:
PreprocessorThe following two symbols need to be fed to the preprocessor to enable SSL for libcurl:USE_SSLEAYUSE_OPENSSL(libcurl uses OpenSSL for SSL support)Alternatively the symbols can be added directly to a file called setup.h in libcurl, but I'm not too happy about modifying code in 3rd par 阅读全文
摘要:
用命令行进入VirtualBox的安装目录,使用下面的命令:VBoxManage internalcommands sethduuid E:\os\win2003\ios.vdi 阅读全文
摘要:
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Net;using System.IO;using System.Security.Cryptography;namespace ConsoleApp{ class Program { static void Main(string[] args) { Dictionary<string, string> parameters = new Dic... 阅读全文
摘要:
#include <iostream> #include <string> #include <Windows.h> using namespace std; void unicodeToUTF8(const wstring &src, string& result) { int n = WideCharToMultiByte( CP_UTF8, 0, src.c_str(), -1, 0, 0, 0, 0 ); result.resize(n); ::WideCharT... 阅读全文
摘要:
#include <Windows.h>#include <OCIdl.h>#include <OleCtl.h>BOOL DrawPicture(char* pszFilePath,HWND hWnd,int nDrawWidth,int nDrawHeight){ HDC hDC = GetDC(hWnd); if(hDC == NULL) { return GetLastError(); } IPicture* pPic = NULL; IStream* pStream = NULL; int ret = 0; HAN... 阅读全文
摘要:
char *cha = new char[_http_result.length()+1];memcpy(cha,_http_result.c_str(),_http_result.length() + 1); 阅读全文
摘要:
int hexCharToInt(char c) { if (c >= '0' && c <= '9') return (c - '0'); if (c >= 'A' && c <= 'F') return (c - 'A' + 10); if (c >= 'a' && c <= 'f') return (c - 'a' + 10); return 0; } char* 阅读全文