newmerce的个人博客分享 http://blog.sciencenet.cn/u/newmerce

博文

按标题搜索
不能将参数 1 从“const char *”转换为“LPCWSTR“的解决办法
2012-11-18 05:35
Configuration: Change the character set: form useUnicode character setto use multibyte character set.
个人分类: C/C++|7132 次阅读|没有评论
generate mutiple vc++ static library pdb files
2012-11-17 21:30
1.c/c++$\dashrightarrow$output file$\dashrightarrow$program database filename $\dashrightarrow$:\$(ProjectName).pdb. this configuration can generates pdb file with same filename as lib file. 2.usage: just copy \$(ProjectName).pdb and \$(ProjectName).lib to lib file. 3:Caution: The lib project an ...
个人分类: C/C++|2829 次阅读|没有评论
program slice for CPU byte order judgement
2012-11-17 12:34
struct { char low:4; char high:4; }val; char vbyte; val.low = 0x1; val.high =0x2; vbyte = *(char *)val; if(vbyte ==0x12) cout "big endian" endl; if(vbyte ==0x21) cout "small endian" endl;
个人分类: C/C++|2104 次阅读|没有评论
vc++ version wait(int nsecond)
2012-11-17 12:19
#include time.h void wait(int nsecond) { clock_t endwait; endwait = clock () +nsecond* CLOCKS_PER_SEC ; while (clock() endwait) {} }
个人分类: C/C++|2103 次阅读|没有评论
A template converting number type to string in C++
2012-10-25 22:43
// usage: // string str = toStringdouble (10.0); templatetypename T std::string toString(const T inType) { std::stringstream retStr; retStr inType; return retStr.str(); }
个人分类: C/C++|2089 次阅读|没有评论
read matlab binary file example
2012-10-25 22:06
% write binary features and targets % usage: = readbin('training_pca.bin',5); function = readbin(FileName, nDim) fid = fopen(FileName, 'r'); %file flag flags = fread(fid,1,'int'); %get features size nFeatures =fread(fid,1,'int'); for i = 1: nDim Targets(i)=fread(fid,1,'int' ...
个人分类: matlab|2754 次阅读|没有评论
write matlab binary file example
2012-10-25 22:04
% write binary features and targets % usage: writebin('training_pac.bin', Features, Targets) function = writebin(FileName, Features, Targets) = size(Features); %get features size nFeatures = col; %file flag flags = hex2dec('00010000'); fid = fopen(FileName, 'w'); fwrite(fi ...
个人分类: matlab|2178 次阅读|没有评论

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-4-28 13:21

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部