http://blog.csdn.net/macmini/article/details/10503799当我们使用gettimeofday(&time,NULL);时,会出现这样一个WARNINGImplicit declaration of function 'gettimeofday' is ...
分类:
其他好文 时间:
2015-03-15 22:44:44
阅读次数:
215
问题1.效率问题:如果不需要用到单例类的对象,如何保证单例类对象不会被创建;问题2.线程安全:如何保证获取到的对象是单例的。1. 一般单例类的写法有:class Singleton{ private static Singleton instance = null; private Sin...
分类:
编程语言 时间:
2015-03-15 19:34:52
阅读次数:
161
Given a list, rotate the list to the right bykplaces, wherekis non-negative.For example:Given1->2->3->4->5->NULLandk=2,return4->5->1->2->3->NULL.[Solu...
分类:
其他好文 时间:
2015-03-15 18:21:30
阅读次数:
114
用CreateWindow 函数创建的控件,如果想使用tap键切换,最简单的做法是:主窗口有WS_EX_CONTROLPARENT扩展属性,控件有WS_TAPSTOP属性。然后最重要的是,在处理消息循环时要做一个判断:1 while (GetMessage(&msg, NULL, 0, 0)...
一、新闻的数据库的构建脚本代码如下:(使用的mysql5.0 数据库)SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";-- Database: `newsdemo`
-- 表的结构 `news`CREATE TABLE IF NOT EXISTS `news` (
`id` int(10) NOT NULL AUT...
分类:
移动开发 时间:
2015-03-15 16:55:05
阅读次数:
223
转自:http://blog.sina.com.cn/s/blog_5e58565701012q2d.html错误:findViewById返回Null,报nullpointer错误网上搜了下,拾人牙慧,总结原因,一般为3种:1.在另一个view的元素应该用baseView.findViewById...
分类:
其他好文 时间:
2015-03-15 16:30:48
阅读次数:
139
#include #include #include #include int main(){ printf("Locale is %s\n",setlocale(LC_ALL,NULL)); setlocale(LC_ALL,""); printf("Locale is %s\n...
分类:
其他好文 时间:
2015-03-15 13:50:54
阅读次数:
99
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; *...
分类:
其他好文 时间:
2015-03-15 13:50:26
阅读次数:
102
10.1管理登录账号创建登录账号语法格式:sp_addlogin 登录账号的登录名,登录密码,默认数据库,默认语言,安全码,是否加密在是否加密选项中,NULL表示对密码加密。SKIPENCRYPTION表示对密码不加密。SKIPENCRYPTIONOLD,只对SQL Server升级时使用,表示旧版...
分类:
数据库 时间:
2015-03-15 13:49:47
阅读次数:
142
package com.java1234.chap03.sec04;public class People { //string类的默认值是null private String name; //int类属性默认值是0; private int age; ...
分类:
其他好文 时间:
2015-03-15 13:35:44
阅读次数:
110