- 博客(34)
- 资源 (119)
- 收藏
- 关注
原创 vc++多线程随机单元测试实例之测试vld库
//////////////////////////////////////////////////////////////////////////////////// Visual Leak Detector - Test Suite// Copyright (c) 2009 Dan Moulding//// This library is free software; you
2016-08-29 11:34:14 1001
原创 c++ 宏展开
window上的宏展开:宏在我们的代码中能经常给我们带来很大的便利,但是有些宏会造成意向不到的错误,能够查看宏展开就能够查看宏错误的根源。VS2008对编译是不保存预处理的文件信息的,而宏展开的信息就是在预编译阶段。如下图: 工程属性--》配置属性--》c/c++--》预处理器--》生成预处理文件,默认“否”是不生成预编译文件的。生成的预编译文件是
2016-08-28 20:55:29 4159
原创 c++ RTTI例子
#include #include #include #include using namespace std;class Base{public: Base(){ strcpy(name,"Base"); } virtual void display() { cout<<"Display Base."<<endl;
2016-08-28 20:17:17 652
原创 C++ RTTI使用
RTTI.h#ifndef _RTTI_H_#define _RTTI_H_#include templateclass RTTIInfo{public: RTTIInfo() { typeName = typeid(T).name(); hashTypeName = typeid(T).hash_code(); } const char* toString()
2016-08-28 19:48:23 859
原创 c语言之ls目录的简单实现和window版本dirent.h
#include #if _WIN32#include #include #include "dirent.h"#else#include #include #endif//window 下载http://www.softagalleria.net/download/dirent/dirent-1.21.zipint main(int argc, char *argv[]
2016-08-25 22:04:03 2031
原创 python getopt的使用
#!/usr/bin/python# -*- coding: UTF-8 -*-import sysimport getoptdef usage(): print("usage");def main(): try: opts, args = getopt.getopt(sys.argv[1:], "ho:v", ["help", "output="])
2016-08-22 20:28:16 964
原创 xmake的使用
简介XMake是一个基于Lua的轻量级跨平台自动构建工具,支持在各种主流平台上构建项目xmake的目标是开发者更加关注于项目本身开发,简化项目的描述和构建,并且提供平台无关性,使得一次编写,随处构建它跟cmake、automake、premake有点类似,但是机制不同,它默认不会去生成IDE相关的工程文件,采用直接编译,并且更加的方便易用 采用lua的工程描述语法更简洁直观,支持在大部分常用平台上
2016-08-18 10:40:34 8593
原创 git命令使用
git clone http://xxxxgit checkout xxxxgit pull origin mastergit commit add xxx.txtgit commit git push
2016-08-17 16:34:40 405
原创 c++之window filesearch和LoadLibraryA的实现
#include #include #include using namespace std;bool FileSearch(string sSearch, string sFolder){ // This recursive function will search for a filename or part of it, // inside the specifi
2016-08-11 18:57:33 1802
原创 EasyLogger 使用例子
EasyLogger 是一款超轻量级(ROM<1.6K, RAMhttp://www.oschina.net/p/easylogger/* * This file is part of the EasyLogger Library. * * Copyright (c) 2015, Armink, * * Permission is hereby granted, fre
2016-08-09 12:02:40 9074 1
原创 linux c之syscall示例原型和运行时入口_start
参考:https://github.com/lpsantil/rt0/* Copyright (c) 2015, Louis P. Santillan * All rights reserved. * See LICENSE for licensing details. */#ifndef __RT0_SYSCALL__#define __RT0_SYSCALL__#incl
2016-08-09 10:57:52 1898
原创 linux c之syscall使用例子
#include extern char **__environ; /* pointer to array of char * strings that define the current environment variables */extern int errno;extern char _end, _edata, _etext, __executable_start;in
2016-08-09 10:47:28 8626
转载 Linux中configure/makefile的用法实例(附代码)
转自:http://blog.chinaunix.net/uid-24704319-id-2594460.html本文教你如何使用autoconf、automake等来制作一个以源代码形式(.tar.gz)发布的软件、并可在执行configure时使用自定义参数。一、概述和基础知识 在Linux下得到一个以源代码形式发布的包(一般为.tar.gz或.tar.bz2格式),我们
2016-08-08 17:15:23 6966 2
原创 c语言正则表达式库pcre使用例子
#include #include #include #include #include #include #include #include #define OVECCOUNT 30 /* should be a multiple of 3 */#define EBUFLEN 128#define BUFLEN 1024int main_adfs(){ pc
2016-08-08 15:51:08 3806
原创 开源项目移植到Qt工程技巧for_qt
如pcre项目。在github上面搜索不到pcre for qt的项目,自己直接下载pcre源码导入qt工程各种错误!最后直接去E:\Qt\Qt5.5.0\5.5\Src\qtbase\src\3rdparty查找到基于QT的pcre工程。即可。像其他的libpng、zlib、sqlite、libjpeg等基于c语言的跨平台的项目移植到qt工程都是如此。Qt源码下有很多
2016-08-06 16:07:15 1255
原创 c++之vector
#include #include #include #include using namespace std;void printList(vector list){ for(int i=0;i<list.size();i++) { cout<<list.at(i)<<" "; } cout<<endl;}void change
2016-08-05 11:49:28 437
原创 c++ 正则表达式
/* write by xingming * time:2012年10月19日15:51:53 * for: test regex * */#include #include #include #include using namespace std;void test_cmatch(string reg,string line){ using name
2016-08-03 19:48:06 536
原创 objective-c之文件处理
//// main.m// 文件处理//// Created by wu jianhua on 16-8-3.// Copyright (c) 2016年 wujianhua. All rights reserved.//#import //http://www.yiibai.com/objective_c/objective_c_file_handling.html
2016-08-03 17:19:53 567
原创 objective-c之日期时间和异常处理
//// main.m// 日期时间和异常处理//// Created by wu jianhua on 16-8-3.// Copyright (c) 2016年 wujianhua. All rights reserved.//#import void testDate(){ NSAutoreleasePool * pool = [[NSAutorelea
2016-08-03 16:59:13 549
原创 objective-c之存储集合
//// main.m// 存储集合//// Created by wu jianhua on 16-8-3.// Copyright (c) 2016年 wujianhua. All rights reserved.//#import void testNSSet(){ NSAutoreleasePool * pool = [[NSAutoreleasePo
2016-08-03 16:51:29 456
原创 objective-c之内存管理
#import @interface SampleClass:NSObject- (void)sampleMethod;@end@implementation SampleClass- (void)sampleMethod{ NSLog(@"Hello, World!");}- (void)dealloc{ NSLog(@"Object deallocat
2016-08-03 16:40:25 427
原创 objective-c之复合对象
#import //自定义验证表数组ValidatingArray@interface ValidatingArray : NSMutableArray{ NSMutableArray *embeddedArray;}+ validatingArray;- init;- (unsigned)count;- objectAtIndex:(unsigned)index;-
2016-08-03 16:20:40 752
原创 objective-c之动态绑定
#import @interface Square:NSObject{ float area;}- (void)calculateAreaOfSide:(CGFloat)side;- (void)printArea;@end@implementation Square- (void)calculateAreaOfSide:(CGFloat)side{ are
2016-08-03 16:15:23 537
原创 objective-c之委托
#import @protocol PrintProtocolDelegate- (void)processCompleted;@end@interface PrintClass :NSObject{ id delegate;}- (void) printDetails;- (void) setDelegate:(id)newDelegate;@end@im
2016-08-03 16:06:01 455
原创 objective-c之类别与扩展
#import //类别@interface NSString(MyAdditions)+(NSString *)getCopyRightString;@end@implementation NSString(MyAdditions)+(NSString *)getCopyRightString{ return @"Copyright TutorialsYiibai
2016-08-03 15:57:07 484
原创 objective-c之多态
#import @interface Shape : NSObject{ CGFloat area;}- (void)printArea;@end@implementation Shape- (void)printArea{ NSLog(@"The area is %f", area);}@end@interface Square : Shap
2016-08-03 15:43:45 367
原创 objective-c之继承
#import @interface Person : NSObject{ NSString *personName; NSInteger personAge;}- (id)initWithName:(NSString *)name andAge:(NSInteger)age;- (void)print;@end@implementation Person
2016-08-03 15:36:56 448
原创 objective-c之类与对象
//// main.m// 类与对象// Created by wu jianhua on 16-8-3.// Copyright (c) 2016年 wujianhua. All rights reserved.//#import @interface Box:NSObject{ double length; // Length of a box
2016-08-03 15:11:03 413
原创 objective-c之错误处理
//// main.m// 错误处理//// Created by wu jianhua on 16-8-3.// Copyright (c) 2016年 wujianhua. All rights reserved.//#import @interface SampleClass : NSObject- (NSString*) getEmployeeNameFor
2016-08-03 11:49:36 589
原创 objective-c之预定义
//// main.m// 预定义//// Created by wu jianhua on 16-8-3.// Copyright (c) 2016年 wujianhua. All rights reserved.//#import #define message_for(a, b) NSLog(@#a " and " #b ": We love you!")#
2016-08-03 11:37:34 364
原创 objective-c之struct
//// main.m// struct//// Created by wu jianhua on 16-8-3.// Copyright (c) 2016年 wujianhua. All rights reserved.//#import struct Books{ NSString *title; NSString *author; NSS
2016-08-03 11:21:49 1636
原创 objective-c之数组
//// main.m// 数组//// Created by wu jianhua on 16-8-3.// Copyright (c) 2016年 wujianhua. All rights reserved.//#import @interface SampleClass:NSObject{}- (double) getAverage:(int[]) arr
2016-08-03 10:53:20 665
原创 objective-c之回调函数和NSNumber
//// main.m// 块//// Created by wu jianhua on 16-8-3.// Copyright (c) 2016年 wujianhua. All rights reserved.//#import //回调函数指针typedef void (^CompletionBlock)();@interface SampleClass:NS
2016-08-03 10:30:19 977
原创 objective-c简单例子
//// main.m// oc002//// Created by wu on 16-8-3.// Copyright (c) 2016年 . All rights reserved.//#import @interface SampleClass:NSObject{ @private int _age;}@property (assign,no
2016-08-03 10:01:07 1838
sqlite3.36集成加密版_vs2008
2014-04-10
Xtreme ToolkitPro+MFC使用小例子
2014-03-19
ormlite-jdbc demo使用例子。
2015-04-06
基于netbeans+javafx+fxml的基本控件的使用
2014-10-29
java 连接各种数据库大全和实例
2014-07-14
hadoop1.1.2操作例子 包括hbase hive mapreduce相应的jar包
2014-06-06
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人