码迷,mamicode.com
首页 >  
搜索关键字:null    ( 33914个结果
获取topbar的高度
public static int getStatusBarHeight(Activity activity) { Class c = null; Object obj = null; Field field = null; int x = 0, sbar = 38; try { c ...
分类:其他好文   时间:2015-02-05 13:15:52    阅读次数:124
??操作符
?? 操作符叫做 null-coalescing operator.这个操作符给可为null的类型定义一个默认值。 (page ?? 1)表示如果page为null返回1,否则返回page的值。大家直接看下面例子:
分类:其他好文   时间:2015-02-05 13:14:01    阅读次数:112
JS 数组获取最大值
一、一维数组var a=[1,2,3,5];alert(Math.max.apply(null, a));//最大值alert(Math.min.apply(null, a));//最小值二、二维数组var a=[1,2,3,[5,6],[1,4,8]];var ta=a.join(",").spl...
分类:编程语言   时间:2015-02-05 13:07:22    阅读次数:224
Nginx 中 upstream 机制的实现
在Nginx中调用 ngx_http_upstream_init 方法启动 upstream 机制,但是在使用 upstream 机制之前必须调用ngx_http_upstream_create 方法创建 ngx_http_upstream_t 结构体,因为默认情况下 ngx_http_request_t 结构体中的 upstream 成员是指向 NULL,该结构体的具体初始化工作还需由 HTTP 模块完成。...
分类:其他好文   时间:2015-02-05 11:26:48    阅读次数:914
T-SQL中jion操作
--创建学生表create table Students( sno nvarchar(10) not null primary key, name nvarchar(30) not null, gender nchar(1) ch...
分类:数据库   时间:2015-02-05 11:13:15    阅读次数:189
Oracle创建主键自增表
Oracle创建主键自增表1、创建表create table Test_Increase( userid number(10) NOT NULL primary key, /*主键,自动增加*/ username varchar2(20) );2、创建自动增长序列CREATE...
分类:数据库   时间:2015-02-05 11:06:26    阅读次数:148
Redis Set后取不到值(两台服务器时间不一致导致)
在本地开发时使用的redis是部署在本机,用的好好的。当部署到测试环境(两台虚拟机-web/redis)后偶然间发现有时候Set后取出来是null,刚部署上去的时候倒没发现,经过几次测试后发现web服务器时间和redis服务器时间不一致导致,将时间修改或同步一致即可。 之所以出现时间不一致的原...
分类:其他好文   时间:2015-02-05 10:50:22    阅读次数:167
popuWindow对话框
今天学了popuWindow,获益匪浅,所以来分享一下。//加载布局ViewcontentView=View.inflate(getApplicationContext(),R.layout.popu_dialog,null);//找到相应的控件进行操作1,拨打电话,2,发送短信LinearLayoutll_call=(LinearLayout)contentView.findViewById(R.id.ll_call);Lin..
分类:Windows程序   时间:2015-02-05 07:07:21    阅读次数:219
单向链表遍历反转 Javascript实现
<script?type="text/javascript"> <!--?one-way?linkedlist?reverse?in?javascript?--> function?Node(value)?{ this.value?=?value; this.next?=?null; } Node.prototype.setNext?=?fun...
分类:编程语言   时间:2015-02-04 21:58:39    阅读次数:288
my_atoi
//1、找到数字字符或者加减号//2、计算值时需要保证不溢出,将要溢出时返回最大或最小值int myatoi(const char *str){ if ( NULL == str ) { printf("error, param is NULL\n"); re...
分类:其他好文   时间:2015-02-04 21:44:50    阅读次数:275
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!