一般而言,我们习惯的 C++ 内存配置操作和释放操作是这样的:1 class FOO{};2 FOO
*pf = new FOO; 3 delete pf; 我们看其中第二行和第三行,虽然都是只有一句,但是都完成了两个动作。但你 new
一个对象的时候两个动作是:先调用::operato...
分类:
其他好文 时间:
2014-07-22 23:14:35
阅读次数:
399
android-async-http发送请求时,真正执行请求的地方是在AsyncHttpRequest类中的,有两个方法:
private void makeRequest() throws IOException { if (isCancelled()) { r...
分类:
移动开发 时间:
2014-07-22 23:14:34
阅读次数:
689
private void button1_Click(object sender, EventArgs
e) { var appWord = new Microsoft.Office.Interop.Word.Application(); ...
分类:
其他好文 时间:
2014-07-22 23:14:16
阅读次数:
383
import java.security.MessageDigest;import
java.util.*;public class Hello2{ public static void main(String[] args) throws
Exception{ Random r = new Ran...
分类:
其他好文 时间:
2014-07-22 23:13:33
阅读次数:
354
1,若方法传入的对象参数为空,则在方法中改变参数并不会改变声明的对象public void
setList(List list){ list = new ArrayList() ; } @Test public void t4(){ List ...
分类:
编程语言 时间:
2014-07-22 23:12:56
阅读次数:
323
public class ToLog { public static void
main(String[] args) throws Exception { //准备日志文件 File f = new File("log.txt");
if(!f.ex...
分类:
其他好文 时间:
2014-07-22 23:12:54
阅读次数:
300
Given a sorted linked list, delete all
duplicates such that each element appear onlyonce.For
example,Given1->1->2, return1->2.Given1->1->2->3->3,
retu...
分类:
其他好文 时间:
2014-07-22 23:12:13
阅读次数:
426
public class Mul { public static void
main(String[] args) { // 第一种方法 for (int i = 1; i <= 9; i++) { for (int j = 1;
j <= 9...
分类:
其他好文 时间:
2014-07-22 23:10:55
阅读次数:
270
一、位运算应用:1、判断某一位是否为12、只改变其中某一位,而保持其它位都不变位运算操作:1、&按位与(双目):将某变量中的某些位清0(与0位与)且同时保留其它位不变(与1位与);获取某变量中某一位(与其位与后判断是否为该数)2、|按位或(双目):将某变量中的某些位置1(与1位或)且保留其它位不变3...
分类:
其他好文 时间:
2014-07-22 23:10:13
阅读次数:
279
private void Form1_Load(object sender,
EventArgs e) { textBox1.Text= GenerateTimeStamp(System.DateTime.Now);
textBox2.Text ...
分类:
其他好文 时间:
2014-07-22 23:09:53
阅读次数:
302