/*-----函数指针+出参-----*/
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
char*GetString(char**p)
{
*p=(char*)malloc(11);
strcpy(*p,"helloworld");
return*p;
}
intmain()
{
char*pStr=NULL;
char*pStr2=GetString(&pStr);
printf("-..
分类:
其他好文 时间:
2015-05-19 16:51:24
阅读次数:
116
MySQL支持外键的存储引擎只有InnoDB,在创建外键的时候,要求父表必须有对应的索引,子表在创建外键的时候也会自动创建对应的索引。在创建索引的时候,可以指定在删除、更新父表时,对子表进行的相应操作,包括RESTRICT、NOACTION、SET NULL和CASCADE。其中RESTRICT和NO ACTION相同,是指在子表有关联记录的情况下父表不能更新;CASCADE表示父表在更新或者删除...
分类:
数据库 时间:
2015-05-19 16:36:59
阅读次数:
222
public void Stop() { if (_serialPort != null) { if (_serialPort.IsOpen) { ...
分类:
其他好文 时间:
2015-05-19 16:15:07
阅读次数:
309
[intrinsic column flags] (基本字段类型标识)
- PK: primary key (column is part of a pk) 主键
- NN: not null (column is nullable) 非空
- UQ: unique (column is part of a unique key) 唯一
- AI: auto i...
分类:
数据库 时间:
2015-05-19 13:10:29
阅读次数:
268
内容:简单的UDP通讯例子。
Receiver:
public class Receiver {
public static void main(String[] args) {
DatagramSocket ds = null;
try {
//UDP接收端
ds = new DatagramSocket(8080);
//定义将UDP的数据包接收到什么地...
分类:
编程语言 时间:
2015-05-19 13:07:15
阅读次数:
141
一、网络上的一般说法1、ViewState 对象为Null。2、DateSet 空。3、sql语句或Datebase的原因导致DataReader空。4、声明字符串变量时未赋空值就应用变量。5、未用new初始化对象。6、Session对象为空。7、对控件赋文本值时,值不存在。8、使用Request....
分类:
其他好文 时间:
2015-05-19 12:52:40
阅读次数:
119
public class Solution { public int findPeakElement(int[] nums) { if (nums == null || nums.length == 0 || nums.length == 1) { retu...
分类:
其他好文 时间:
2015-05-19 12:39:23
阅读次数:
80
public class Solution { public void setZeroes(int[][] matrix) { if (matrix == null || matrix.length == 0 || matrix[0].length == 0) { ...
分类:
其他好文 时间:
2015-05-19 12:33:50
阅读次数:
134
public class Solution { public int findMin(int[] nums) { if (nums == null || nums.length == 0) { return 0; } int re...
分类:
其他好文 时间:
2015-05-19 12:31:53
阅读次数:
139
安卓的背景色设置需要根据SDK的版本来分情况考虑:if (Build.VERSION.SDK_INT >= 16) {textView.setBackground(null);} else {textView.setBackgroundDrawable(null);}
分类:
移动开发 时间:
2015-05-19 12:14:54
阅读次数:
236