码迷,mamicode.com
首页 > 其他好文
栈和递归之Hanoi塔
hanoi塔 代码#include void move(char x,int n,char y) { static int k=1; printf("Step %d : %d from %c >>->> to %c \n",k++,n,x,y); } void hanoi(int n,char A,char B,char C) { if(n==1) { move(A, 1, C)...
分类:其他好文   时间:2014-09-11 22:25:02    阅读次数:277
私服搭建Nexus
一:代理仓库central 指向maven 的中央仓库Apache Snapshots 指向apache 的代理maven 仓库具体代理仓库的设置参数如下:二:第三方仓库:用户自己上传的jar (宿主仓库)上传第三方jar 包:如果上传的jar 包需要依赖其他的jar 包,可以用pom 的方式上传第...
分类:其他好文   时间:2014-09-11 22:24:22    阅读次数:234
为什么使用do{}while(0)来进行宏定义
最近发现很多代码在进行宏定义的时候使用喜欢使用#define MACRO_NAME(para) do{macro content}while(0)的格式,总结了以下几个原因:1,空的宏定义避免warning:#define foo() do{}while(0)2,存在一个独立的block,可以用来进...
分类:其他好文   时间:2014-09-11 22:24:02    阅读次数:191
学习百度地图出现的问题
出现错误如下:09-11 13:54:14.222: E/Trace(1321): error opening trace file: No such file or directory (2)09-11 13:54:15.422: E/AndroidRuntime(1321): FATAL EXC...
分类:其他好文   时间:2014-09-11 22:23:52    阅读次数:313
每天一记--2014.9.11
今天仅有一个小程序:求幂运算 这只是比较优化的一个算法,能有效减少乘法次数,但是不是最优的 这个只是分解得到2的幂次的乘幂 1 package shishi; 2 3 public class QiuMi { 4 5 public static void main(String[] ar...
分类:其他好文   时间:2014-09-11 22:23:42    阅读次数:219
关于结构体的大小
TRecord2 = record a: Integer; b: Integer; c: Integer; end; TRecord1 = record a: Byte; case Integer of 0: (a1: TRecord2); 1: (a2: Int64); end; 第一步是要知道结...
分类:其他好文   时间:2014-09-11 22:23:32    阅读次数:261
The Aggregate Magic Algorithms
http://aggregate.org/MAGIC/The Aggregate Magic AlgorithmsThere are lots of people and places that create and collect algorithms of all types (hereare ...
分类:其他好文   时间:2014-09-11 22:22:52    阅读次数:400
简单I/O
OutputStream,InputStream,FileOutputStream,FileInputStream.fis = new FileInputStream("C:/Desktop/from.txt"); fos = new FileOutputStream("C:/Desktop/t.....
分类:其他好文   时间:2014-09-11 22:22:42    阅读次数:246
设计模式系列之生成器模式
builder模式主要用于创建复杂对象,着重于复杂对象的内部构建。通过将构建过程与表示分离,同一个构建过程可以生产不同的外部表示。builder模式由导向器和生成器构成,导向器负责构建过程,生成器负责生产对象的外部表示。导向器包含有一个生成器,当需要更换对象表示时,只需要换一个生成器即可。上篇文章设...
分类:其他好文   时间:2014-09-11 22:22:32    阅读次数:282
UVA 12563 Jin Ge Jin Qu hao DP
背包可行性 有点SB,wa了好几发#include #include #include #include #include #include #include #include #include #include #include #include #include #include #includ...
分类:其他好文   时间:2014-09-11 22:22:22    阅读次数:174
写一个函数,能获取文件后缀
1.substrsubstr(start,length)表示从start位置开始,截取length长度的字符串。varsrc="images/off_1.png";alert(src.substr(7,3));弹出值为:off2.substringsubstring(start,end)表示从sta...
分类:其他好文   时间:2014-09-11 22:22:12    阅读次数:223
AsyncTask(异步任务)
一、为了解决新线程不能更新UI组件的问题,Android提供了如下几种解决方案。 1)使用Handler实现线程之间的通信; 2)Activity.runOnUiThread(Runnable); 3)View.post(Runnable); 4)View.postDelayed(Runna...
分类:其他好文   时间:2014-09-11 22:21:42    阅读次数:340
lcx
一个反向连接的内网端口映射工具。
分类:其他好文   时间:2014-09-11 22:21:32    阅读次数:236
Centos修改静态IP
vim /etc/sysconfig/network-scripts/ifcfg-eth0代开配置文件写入DEVICE=eth0 #描述网卡对应的设备别名,例如ifcfg-eth0的文件中它为eth0 BOOTPROTO=static #设置网卡获得ip地址的方式,可能的选项为static,dhcp...
分类:其他好文   时间:2014-09-11 22:21:22    阅读次数:223
涂鸦-简洁实现方法
//// MJPaintView.m// 01-涂鸦//// Created by apple on 14-4-20.// Copyright (c) 2014年 itcast. All rights reserved.//#import "MJPaintView.h"@interface MJPa...
分类:其他好文   时间:2014-09-11 22:21:03    阅读次数:220
MATLAB 软件学习
what 列出当前目录或指定目录下的M\MAT 和 MAX 文件… 在语句行尾端表示该行未完! 调用操作系统的命令isvarname 判断变量名是否有效声明全局变量 变量名前加 globalwhos 查看数据的类型函数句柄类型:fhandle=@functionname; fhandle 指针名 f...
分类:其他好文   时间:2014-09-11 22:20:42    阅读次数:202
HDU 1541 Stars (线段树||树状数组)
StarsTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 4897Accepted Submission(s): 1934Problem Descr...
分类:其他好文   时间:2014-09-11 22:20:22    阅读次数:203
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!