码迷,mamicode.com
首页 >  
搜索关键字:null    ( 33914个结果
android开发中怎么通过Log函数输出当前行号和当前函数名
public class Debug { public static int line(Exception e) { StackTraceElement[] trace = e.getStackTrace(); if (trace == null || trace.length == 0) ...
分类:移动开发   时间:2015-01-10 19:40:49    阅读次数:246
完整约束二(学习笔记)
约束分以下几种:非空约束:如果使用了非空约束,则以后些字段的内容不允许设置为NULL (NOT NULL)唯一约束:即此列的内容不允许出重复UK主键约束:表示一个唯一的标识,例如:人员ID不能重复,且不能为空PK检查约束:用户自行编写设置内容的检查条件;CK主外键约束:在2张表上进行的关联的约束,加...
分类:其他好文   时间:2015-01-10 19:39:41    阅读次数:312
遍历DataTable
1 DataTable dt = ds.Table[0]; 2 if (dt != null && dt.Rows.Count > 0)3 {4 foreach (DataRow dr in dt.Rows)5 {6 dr["列名"]="你的值";7 }8 }
分类:其他好文   时间:2015-01-10 19:38:38    阅读次数:158
bfs-dfs-bst
/**  * Definition for binary tree  * struct TreeNode {  *     int val;  *     TreeNode *left;  *     TreeNode *right;  *     TreeNode(int x) : val(x), left(NULL), right(NULL) {}  * }; ...
分类:其他好文   时间:2015-01-10 18:20:29    阅读次数:181
在驱动层直接使用应用层的空间
需求:应用层申请一个空间,然后将地址传递到驱动层,驱动直接将处理后的数据放到应用层指定的空间中,类似于Linux下的copy_from_user。 应用层代码片段: 将申请的地址传递到驱动层 CHAR buf[64] = {0}; int iWriteLen = 0; char *pWaddr = NULL; char *pRaddr = NULL; unsigned...
分类:其他好文   时间:2015-01-10 16:37:52    阅读次数:214
浅谈malloc()与free()
malloc()与free()l 函数原型malloc函数的函数原型为:void* malloc(unsigned int size),它根据参数指定的尺寸来分配内存块,并且返回一个void型指针,指向新分配的内存块的初始位置。如果内存分配失败(内存不足),则函数返回NULL。l 关于返回值mall...
分类:其他好文   时间:2015-01-09 23:34:47    阅读次数:214
mysql查询差集
select A.* from A left join B using(name,addr,age) where B.name is NULL;select A.* from A left join B on A.id=B.Aid where ISNULL(B.name);查询两个表中的差集,用IS...
分类:数据库   时间:2015-01-09 22:07:54    阅读次数:166
[LeetCode]160 Intersection of Two Linked Lists
https://oj.leetcode.com/problemset/algorithms/http://www.cnblogs.com/yuzhangcmu/p/4128794.html/** *Definitionforsingly-linkedlist. *publicclassListNode{ *intval; *ListNodenext; *ListNode(intx){ *val=x; *next=null; *} *} */ publicclassSolution{ //Assumehead..
分类:其他好文   时间:2015-01-09 19:34:00    阅读次数:143
[LeetCode]165 Compare Version Numbers
https://oj.leetcode.com/problems/compare-version-numbers/http://blog.csdn.net/u012243115/article/details/41969181publicclassSolution{ publicintcompareVersion(Stringversion1,Stringversion2){ if(version1==null||version2==null) return0;//Invalidinput. //NOTE!..
分类:其他好文   时间:2015-01-09 19:31:02    阅读次数:164
[LeetCode]169 Majority Element
https://oj.leetcode.com/problems/majority-element/publicclassSolution{ publicintmajorityElement(int[]num){ intlen=num.length; intminhit=(len/2)+1; Map<Integer,Integer>map=newHashMap<>(); for(inti:num) { Integeroccur=map.get(i); if(occur==null) ..
分类:其他好文   时间:2015-01-09 19:29:48    阅读次数:167
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!