数组要么在静态存储区被创建(如全局数组),要么在栈上被创建。指针可以随时指向任意类型的内存块。 (1)修改内容上的差别 char a[] = “hello”; //它们有各自的内存空间;a[0] = ‘X’;char *p = “world”; // 注意p 指向常量字符串p[0] = ‘X’; /...
分类:
编程语言 时间:
2014-11-19 23:59:40
阅读次数:
374
这道题目就是一个排序题目,但是如果简单的排序会超时,需要剪掉一部分数据。最多输出100名数据,排序后,那么相同年龄的后面的数据就不会输出了,所以也不需记录在查找序列里面。因此这部分数据可以忽略掉。bool cmp return true means right position.make_heap(...
分类:
其他好文 时间:
2014-11-19 23:32:48
阅读次数:
227
Console.WriteLine("Hello World"); FileStream fs1 = new FileStream("Test.txt", FileMode.Create); // First, save the standard output. TextWriter tmp ...
分类:
其他好文 时间:
2014-11-19 20:17:39
阅读次数:
151
NSEnumerator用法小结 NSLog(@"Hello, World!"); NSDictionary *myDic=[[NSDictionary alloc]initWithObjectsAndKeys:@"张三",@"name",@"李四",@"name", nil]; ...
分类:
编程语言 时间:
2014-11-19 20:16:52
阅读次数:
259
界面文件activity_main.xml<Button
android:id="@+id/createButton"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@id/hello_world"
android:text="createdatabase"/>
<Button
android:id="@+id/updateButton"
a..
分类:
移动开发 时间:
2014-11-19 18:54:14
阅读次数:
303
前言:公司开始转型java,作为javaer,负责其他同事转型,期间以为工作需要,需要简单学习c#语法,顾有此文,及其后续的一系列文章(c#里头的一些优点,可以为提升java的思想带来帮助)1. 安装Visual Studio(略,自己是一直next,安装的版本是2012)2.创建第一个hello ...
----下载JDK(Java Dev Kit)
官方下载:http://www.oracle.com/technetwork/java/javase/downloads/index.html
JDK安装 首先直接解压JDK到c盘即可;然后就是配置环境(右击“计算机”,“属性”,“高级系统设置”,“环境变量”,请在环境变量的最上面的'XXX的用户变量'中配...
分类:
移动开发 时间:
2014-11-19 11:12:30
阅读次数:
261
红色字很重要
Dinner
时间限制:100 ms | 内存限制:65535 KB
难度:1
描述Little A is one member of ACM team. He had just won the gold in World Final. To celebrate, he decided to invite all to have o...
分类:
其他好文 时间:
2014-11-19 11:07:54
阅读次数:
162
开发软件最基础的工作莫过于搭载好开发环境,然后做一个最简单的程序让其运行起来了。win8开发环境的搭建比较简单,去下载免费的VS Express然后安装就好了。Hello,World也很容易。打开VS Express,点击开始下的新建项目。在模板下选择自己使用的语言,输入项目名称,选择保存路径后点击...
照猫画虎,附上原文:https://docs.docker.com/userguide/dockerizing/?便于理解。 ? ?1. 一个Hello world 后台服务 $?sudo?docker?run?-d?ubuntu:14.04?/bin/sh?-c?"while?true;?do?echo?hel...
分类:
其他好文 时间:
2014-11-19 02:27:16
阅读次数:
268