码迷,mamicode.com
首页 >  
搜索关键字:return null    ( 92144个结果
C++ Daily 《4》----一个简单的 int to string 的方法
经常会在项目中用到 int to string #include #include #include using namespace std; int main(void) { ostringstream num; num << 123; string str = num.str(); cout << str << endl; return 0; }...
分类:编程语言   时间:2014-07-22 23:04:54    阅读次数:283
如果AlertView输入框为空,则禁止点击确定按钮
//UIAlertView的代理方法(创建UIAlertView之后,copy此代理方法即可)- (BOOL)alertViewShouldEnableFirstOtherButton:(UIAlertView *)alertView{ //1.取出输入框中的文字 NSString *text .....
分类:其他好文   时间:2014-07-22 23:00:34    阅读次数:330
Rhythmk 学习 Hibernate 03 - Hibernate 之 延时加载 以及 ID 生成策略
Hibernate 加载数据 有get,跟Load 1、懒加载: 使用session.load(type,id)获取对象,并不读取数据库,只有在使用返回对象值才正真去查询数据库。@Test public void test1() { Session session = null;...
分类:系统相关   时间:2014-05-01 22:40:35    阅读次数:614
案例------递归调用
1 什么是递归:实现某些功能不用递归可能要几十行代码,用递归可能几行就搞定了,而且代码清晰简洁。一直以为递归也就是自己调用自己,有一个出口条件,让他停止递归,退出函数,其实的特点并非就这些。递归还有一个非常重要的特点:先进后出,跟栈类似,先递进去的后递出来。由于递归一直在自己调用自己,有时候我们很难...
分类:其他好文   时间:2014-05-01 22:32:03    阅读次数:570
MariaDB 10 基于OpenSSL的主从复制
需求架构准备工作主从服务器时间同步# 主从服务器同时配置crontab任务,与NTP服务器同步时间即可*/5 * * * * ntpdate 172.16.0.1 &>/dev/null部署配置主库配置vi /etc/my.cnf server-id = 1 # 在复制架构中,需保持全局唯一 ...
分类:数据库   时间:2014-05-01 22:27:40    阅读次数:699
byte[] bytes和string转换
publicstaticstringToHexString(byte[]bytes)//0xae00cf=>"AE00CF"{stringhexString=string.Empty;if(bytes!=null){StringBuilderstrB=newStringBuilder();for(i...
分类:其他好文   时间:2014-05-01 19:08:41    阅读次数:334
hdu1221
求矩形和圆是否相交或相切。 #include #include #define judge(x,y) x<y||fabs(x-y)<0.00000001 double dis(int x,int y,int a,int b) { return (x-a)*(x-a)+(y-b)*(y-b); } int main() { int T; scanf(...
分类:其他好文   时间:2014-04-30 22:45:38    阅读次数:365
js:深入函数(函数是对象)
//由于函数是对象,所以可以直接把函数通过参数传递进来;也可以把函数作为返回值。 function calFun(fun,arg){   //第一个参数就是函数对象   return fun(arg); } function sum(num){   return num+100; } function say(str){   alert("hello "+str); } //...
分类:Web程序   时间:2014-04-30 22:41:38    阅读次数:324
【梦幻连连连】源码分析(一)
进入游戏连连第一个场景,如下:   初始化该场景精灵所需的信息、背景/音效及图层UI bool HelloWorld::init() {     //////////////////////////////     // 1. super initfirst     if (!CCLayer::init() )     {         return false;...
分类:其他好文   时间:2014-04-30 22:34:40    阅读次数:226
查询、创建、设置注册表键值的示例代码
示例代码将在注册表位置:HKEY_CURRENT_USER\Software\  读写键值 bool LicenseManage::OpenRegKey(HKEY& hRetKey) { if (ERROR_SUCCESS == RegOpenKey(HKEY_CURRENT_USER,"Software", &hRetKey)) { return true; ...
分类:其他好文   时间:2014-04-30 22:12:40    阅读次数:195
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!