qwop
qwop · 共 10 篇文章
LODS LODSB LODSW LODSD 例子【载入串指令】
http://qwop.iteye.com/blog/1958761 // lodsb.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <string.h> /************************************************************************/ /* 载入串指令 /* LODS LODSB LODSW LODSD 例子 /* 运行结果: /* bcdef /* g1 /* 2345 /*******…
2013-10-16 11:15 · asm · 评论(0)
Java_BInary_Search
public static int binarySearch( int array[], int value ) { if ( null == array ) return -1; int low = 0, high = array.length - 1, middle = -1; while ( low <= high ) { middle = ( low + high ) / 2; if ( value == array[ low ] ) { return low ; } if ( value == array[ high ] ) { return high; } if ( value …
2012-09-25 14:09 · java · 评论(0)
sql cheat sheet
CREATE DATABASE DATA_NAME drop database database_name create table person ( lastname varchar, firstname varchar, address varchar, age int ) alter tale table_name add column_name data_type alter table table_name ddrop column_name datatype drop table table_name create index person_index on person ( l…
2012-09-25 13:56 · sql · 评论(0)
每周有特色的项目:6月11日 【sf.net】
每周有特色的项目:6月11日 本周再次我们沉重的游戏,有三个特色游戏。 一如既往,我们非常自豪我们的项目,并鼓励你看看他们。 • amsn的 MSN兼容的Messenger应用程序非常不错,amsn的使者,是一个多MSN信使克隆的。 很像其Windows基于对口。 适合那些尚未见过光的朋友保持联系。 工程在Linux • 过程黑客 过程中的黑客是一个自由和开放源码的浏览器和内存编辑器具有独特的功能,如强大的进程终止。 它可以显示服务,进程和线程,模块,手柄和记忆体区域。 • 钻机棒 棒钻机是一个3D游戏模拟器,在那里你可以驾驶,飞行和航行使用准确和独特的软体物理引擎的各种车辆。 • 亮度的H…
2012-06-14 19:27 · sf.net · 评论(0)
精选项目,6月4日的一周 【sf.net】
精选项目,6月4日的一周 这个星期,我们具有更多的技术人员为重点的项目,包括几个安全应用程序和开发工具。 并一如既往,还有几个组合中的游戏。 非常感谢所有这些项目在SourceForge社区的一部分。 • Endian的防火墙社区 Endian的防火墙是一个“交钥匙”的Linux安全,变成一个全功能的安全设备,每个系统的分布。 它具有状态包过滤,代理服务器,防病毒/反垃圾邮件,内容过滤和VPN模块。 • 记事本+ +比较插件 记事本+ +编辑器比较插件。 • 天哪,生命模拟器游戏 探索康威的生命游戏和其他元胞自动机的一个跨平台的应用。 功能包括界和无限的宇宙,快速生成算法,Perl / Py…
2012-06-14 19:25 · sf.net · 评论(0)
CPP详解关键字 explicit
// Explicit.cpp : Defines the entry point for the console application. // 详解explicit关键字 #include "stdafx.h" #include <iostream> #include <string> using namespace std; int obj_cnt = 0; class Person { public: int id; char name[ 10 ]; public: Person() {} /*explicit // 表示初始化类的时候是显示的如 Person p(1),没有加的话可…
2012-06-03 21:42 · cpp · 评论(0)
cpp静态成员和普通成员
// object_static_002.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <iostream> using namespace std; class C1 { public: C1() { cout << "c1构造" << endl; } C1( char* name ) { cout << name << "构造" << endl;} ~C1() { cout << "C1析构" << endl;} void fuck() { cout <…
2012-06-03 16:07 · cpp · 评论(0)
变量的生命周期【CPP】
// var_cycle_001.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <iostream> using namespace std; class Obj { char name[ 10 ]; public : Obj( const char* name ) { cout << name << "构造" << endl; strcpy( Obj::name, name ); cin.get(); } ~Obj() { cout << name << …
2012-05-31 13:55 · cpp · 评论(0)
插入排序【c语言】
#include <stdio.h> void insertSort( int arr[] , int size ) { int i , j , k , f /*First element*/; // 0 1 2 3 4 // 4 3,2,1 // 3 4 2,1 // 2 3 4 1 // 1. 遍历无序区域 for ( i = 1; i < size; i++ ) { f = arr[i] ; // 无序区的第一个元素,与有序区比较 // 2. 遍历有序区域, 找到第一个比无序区大的元素 for ( j = 0; j < i; j++ ) { if ( f < arr[j] ) { //…
2012-05-22 13:49 · c · 评论(0)
二分查找【c语言】
#include <stdio.h> int halfSearch( int arr[], int num, int size ) { int min = 0, max = ( size - 1), mid; if ( size == 0 ) { return -1; } while ( 1 ) { // 1. when the boundary is "min" or "max" if ( num == arr[ min ] ) { return min ; } if ( num == arr[ max ] ) { return max ; } // 2. check the not fo…
2012-05-21 09:19 · c · 评论(0)