1:懒汉式,不保证线程安全package com.yan.singleton;public class LazySingleton { private static final LazySingleton instance = null; private LazySingleto...
分类:
编程语言 时间:
2015-04-12 22:34:39
阅读次数:
179
#include#include#includeint i=0,j=0;void jia(){ int a,b,m; srand(time(NULL)); a=1+rand()%100; b=1+rand()%100; printf("%d\n",a); printf("%d...
分类:
其他好文 时间:
2015-04-12 20:52:09
阅读次数:
126
C语言 指针简单使用如下: int *p;//定义 int a = 10; p = &a;//赋值 int * b = &a;//定义并赋值定义格式:类型 *指针变量名;注意事项:1、一定要先定义后赋值,2、%p输出指针里面存储的地址值。3、清空指针可以用 p = 0;或p = NULL;代...
分类:
移动开发 时间:
2015-04-12 19:19:39
阅读次数:
141
准备: 定义一个教师表、一个学生表;在学生表中引用教师表IDcreate table teachers(teacherID int not null auto_increment primary key,teacherName varchar(8));create table students(s....
分类:
数据库 时间:
2015-04-12 19:11:27
阅读次数:
165
1.JSON(JS对象记法)数据格式1)数组字面量:var aNames=["hello", 12, true , null];2)对象字面量:var oCar = {"color": "red","doors" : 4,"paidFor" : true};3)混合字面量:var waha = {c...
分类:
Web程序 时间:
2015-04-12 17:41:59
阅读次数:
152
java.lang.UnsatisfiedLinkError: Couldn't load audio_preprocessing from loader dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.channel.economic-2.apk"],nativeLibraryDirectories=[/dat...
分类:
编程语言 时间:
2015-04-12 16:17:27
阅读次数:
180
启动一个桌面程序后,发现一个窗体cfdata=null, 执行时发生错误, 但是在初始化的时候,我明明是cfdata=new Cfdata();为什么会出现这个错误呢.我开始跟踪,发现当执行cfdata=new Cfdata()时, 执行被中断, 后面的代码没有执行, 但是VS2010没有报错, 也...
分类:
Web程序 时间:
2015-04-12 14:44:30
阅读次数:
196
#include
using namespace std;
int main()
{
int *a(nullptr), *b(NULL), *c(0);
if(!a) cout<<" 'a' does not point to anything. \n";
if(!b) cout<<" 'b' does not point to anything. \n";
if(!c) cout<<" ...
分类:
其他好文 时间:
2015-04-12 09:21:16
阅读次数:
118
题目:Reverse a linked list from positionmton. Do it in-place and in one-pass.For example:Given1->2->3->4->5->NULL,m= 2 andn= 4,return1->4->3->2->5->NULL...
分类:
其他好文 时间:
2015-04-12 06:32:42
阅读次数:
189
输入代码1:
/*
* Copyright (c) 2015, 烟台大学计算机学院
* All rights reserved.
* 文件名称:sum123.cpp
* 作 者:林海云
* 完成日期:2015年4月11日
* 版 本 号:v2.0
*
* 问题描述:指针的复制
* 输入描述:NULL;
...
分类:
其他好文 时间:
2015-04-12 00:07:19
阅读次数:
137