以前知道使用cout
测试代码:
/**
吉林大学
Jilin U
Author: sinianluoye (JLU_LiChuang)
Date: 2015-3
Usage:
**/
#include
#include
#include
#include
#include
#define ll long long
#define eps 1e-8
#...
分类:
其他好文 时间:
2015-03-31 10:58:04
阅读次数:
163
利用objc_getClassList输出项目所有类...
分类:
其他好文 时间:
2015-03-31 10:55:36
阅读次数:
213
正则表达式,又称正规表示法、常规表示法(英语:Regular Expression,在代码中常简写为regex、regexp或RE),计算机科学的一个概念。正则表达式使用单个字符串来描述、匹配一系列符合某个句法规则的字符串。在很多文本编辑器里,正则表达式通常被用来检索、替换那些符合某个模式的文本。本文将介绍正则表达式的语法,用法并提供详细示例······...
分类:
其他好文 时间:
2015-03-31 10:55:36
阅读次数:
200
Given two binary strings, return their sum (also a binary string).
For example,
a = "11"
b = "1"
Return "100".
#include
#include
#include
using namespace std;
string addBinary(string a, s...
分类:
其他好文 时间:
2015-03-31 10:56:04
阅读次数:
105
代码中到处都需要命名。作为程序员,我们得给类命名,给变量命名,给函数命名,给参数命名,给命名空间命名,等等等等。下面有20条小贴士能帮助你提高你的命名能力。
1.使用能够表达意图的名字
名字得能告诉我们它要做什么,为什么存在,以及是如何工作的。选择能够表达意图的名字,将更有利于我们理解代码。
int d; // elapsed time in days
int elapsedT...
分类:
其他好文 时间:
2015-03-31 10:56:00
阅读次数:
181
Go to Application Loader java folder : /Applications/Xcode.app/Contents/Applications/Application Loader.app/Contents/MacOS/itms/java/lib
Open net.properties file with “sublime text” or “text mate”
Chan...
分类:
其他好文 时间:
2015-03-31 10:54:50
阅读次数:
145
题目:
Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length.
Do not allocate extra space for another array, you must do this in p...
分类:
其他好文 时间:
2015-03-31 10:54:28
阅读次数:
130
LilyPad Arduino可穿戴技术和电子织物控制器板简介...
分类:
其他好文 时间:
2015-03-31 10:55:24
阅读次数:
96
Follow up for "Remove Duplicates":
What if duplicates are allowed at most twice?
For example,
Given sorted array A = [1,1,1,2,2,3],
Your function should return length = 5,
and A is now [1,1,...
分类:
其他好文 时间:
2015-03-31 10:55:22
阅读次数:
98
SD卡操作相关的工具
package com.flyou.utils;
import java.io.File;
import android.os.Environment;
import android.os.StatFs;
/**
* SD卡相关的辅助类
*
*
*
*/
public class SDCardUtils
{
private SDCardUtils()...
分类:
其他好文 时间:
2015-03-31 10:55:10
阅读次数:
149
UITableView SDK委托方法详解
今天跟大家分享一下UITableView的各个代理方法的用法,主要是根据SDK里面的介绍,再加上自己的分析与测试,总结成此文。如果有疑问的话,希望大家留言告诉我~
本文主要讲解对于UITableView最重要的两个协议
UITableViewDataSource
UITableViewDelegate
UITable...
分类:
其他好文 时间:
2015-03-31 10:51:46
阅读次数:
132
查看地址:http://objccn.io/issue-6-3/ 只截取了其中一部分
Hello World 和编译器
时下 Xcode 中编译器默认选择使用 clang(读作 /klæ?/)。关于编译器,Chris 写了更详细的文章。
简单的说,编译器处理过程中,将 helloworld.c 当做输入文件,并生成一个可执行文件 a.out。这个过程有多个步骤/阶段。...
分类:
其他好文 时间:
2015-03-31 10:54:16
阅读次数:
161
对于多并发实时数据的服务器,需要考虑的一些策略,使负载能在不同的服务器进程中异步处理,含有当机恢复服务器进程数据,动态维护服务器进程,提高数据读写的速度。 其中的一些策略如下:...
分类:
其他好文 时间:
2015-03-31 10:51:21
阅读次数:
93
最近开研究kafka,下面分享一下kafka的设计原理。kafka的设计初衷是希望作为一个统一的信息收集平台,能够实时的收集反馈信息,并需要能够支撑较大的数据量,且具备良好的容错能力.
1、持久性
kafka使用文件存储消息,这就直接决定kafka在性能上严重依赖文件系统的本身特性.且无论任何OS下,对文件系统本身的优化几乎没有可能.文件缓存/直接内存映射等是常用的手段.因为k...
分类:
其他好文 时间:
2015-03-31 10:53:37
阅读次数:
133
题目:
Given a sorted linked list, delete all duplicates such that each element appear only once.
For example,
Given 1->1->2,
return 1->2.
Given 1->1->2->3->3,
return 1->2->3.
思路:和数组删除很相...
分类:
其他好文 时间:
2015-03-31 10:53:11
阅读次数:
127
先是一个最最简单的例子,在浏览器中请求一个action,然后返回一个字符串到jsp页面上显示出来。
第一:创建web项目,引入struts2要的jar包,目录如下:
第二:web.xml中配置struts2的核心拦截器
<web-app version="2.5"
xmlns="http://java.sun.com/xml/n...
分类:
其他好文 时间:
2015-03-31 10:53:28
阅读次数:
135
Compare two version numbers version1 and version2.
If version1 > version2 return 1, if version1 version2 return -1, otherwise return
0.
You may assume that the version strings are non-empty and c...
分类:
其他好文 时间:
2015-03-31 10:51:17
阅读次数:
104