Given an array of integers, find two numbers such that they add up to a specific target number.
The function twoSum should return indices of the two numbers such that they add up to the target, whe...
分类:
其他好文 时间:
2015-06-14 09:37:20
阅读次数:
103
ARM核以其高性能、低功耗、低成本广泛应用在各个领域,包括ARM7、ARM9、ARM11、Cortex-M、Cortex-A等这几个系列。众多的半导体商如NXP、Freescale、Atmel、Samsung、TI等都设计了基于ARM核的自家通用处理器,ARM核从低成本控制处理器到高性能应用处理器,已经深入到我们生活的方方面面。笔者此处就Samsung的Cortex-A8处理器S5PV210作一个简单的介绍。...
分类:
其他好文 时间:
2015-06-14 09:35:27
阅读次数:
219
Find the kth largest element in an unsorted array. Note that it is the kth largest element in the sorted order, not the kth distinct element.For example,
Given[3,2,1,5,6,4]and k = 2, return 5.Note:...
分类:
其他好文 时间:
2015-06-14 09:34:25
阅读次数:
120
EXP/IMP是oracle中比较传统的数据库逻辑备份工具实现全库或者表空间的逻辑备份,但是不支持用户的交互模式,即在备份过程中无法控制或者切换进程。
下面介绍如何使用exp/imp:
SQL> select * from v$version where rownum=1;
BANNER
---------------------------------------------------...
分类:
其他好文 时间:
2015-06-14 09:35:21
阅读次数:
152
使用InetSocketAddress获取系统空闲端口...
分类:
其他好文 时间:
2015-06-14 09:35:35
阅读次数:
188
Memphis loves xor very musch.Now he gets an array A.The length of A is n.Now he wants to know the sum of all (lowbit(Ai xor Aj)) (i,j∈[1,n])
We define that lowbit(x)=2k,k
is the smallest integer sa...
分类:
其他好文 时间:
2015-06-14 09:34:19
阅读次数:
150
问题内容: error: while loading shared libraries : countlib.so : cannnot open shared object file : No such file or directory
我们找不到文件 或目录
解决方法: sudo cp countlib.so /usrr/lib/...
分类:
其他好文 时间:
2015-06-14 09:33:30
阅读次数:
94
这个小的游戏代码可以使我们理解常见的cocos的概念,从场景,精灵,图层,到导演,回调函数,更新函数,再到设置物理世界,设置精灵刚体。不得不说cocos博大精深,不过有个大家一直在意的问题,就是cocos版本更新太快,有些东西不能使用或者使用错误。个人建议去看cocos官网的版本更新信息和去官网论坛提问或者加群讨论,这样更利于大家提高! 上代码!代码大部分都有注释,如有问题可以提问!
游戏由三个...
分类:
其他好文 时间:
2015-06-14 09:33:48
阅读次数:
140
Given a linked list, swap every two adjacent nodes and return its head.
For example,
Given 1->2->3->4, you should return the list as 2->1->4->3.
Your algorithm should use only constant space. Y...
分类:
其他好文 时间:
2015-06-14 09:32:09
阅读次数:
144
比别人多一点执着,你就会创造奇迹。
本讲内容:模板方法模式
一、模板方法模式 Template 介绍
模板方法模式定义了一个操作中的算法骨架,而将一些步骤延迟到子类中实现,使得子类可以在不改变一个算法结构的同时,就重新定义该算法的某些特定步骤。
二、用抽象基类定义框架
1.创建抽象类
---public abstract class Beverage
2...
分类:
其他好文 时间:
2015-06-14 09:32:37
阅读次数:
107
centos7.0 && jdk1.8.0_451、将下载好的jdk包通过ssh上传到centos操作系统
这里是jdk-8u45-linux-x64.tar.gz 下载链接:http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html2、进行解压
tar -vxzf jdk-8u45-...
分类:
其他好文 时间:
2015-06-14 09:33:05
阅读次数:
162
...
分类:
其他好文 时间:
2015-06-14 09:33:55
阅读次数:
107
Problem Description
通过悬崖的yifenfei,又面临着幽谷的考验——
幽谷周围瘴气弥漫,静的可怕,隐约可见地上堆满了骷髅。由于此处长年不见天日,导致空气中布满了毒素,一旦吸入体内,便会全身溃烂而死。
幸好yifenfei早有防备,提前备好了解药材料(各种浓度的万能药水)。现在只需按照配置成不同比例的浓度。
现已知yifenfei随身携带有n种浓度的万能药水,体积V都相...
分类:
其他好文 时间:
2015-06-14 09:32:33
阅读次数:
137
这个架构已经有不少文章介绍了,今天打算自己实践下。MVP概念不多说了 相关介绍已经很多了 Dagger2用来解决依赖 除了基本依赖 mvp的V–>P–>M的之间依赖也轻松解决 方便不少 Retrofit用来解决M的数据获取 Rest Api 天然支持Rxjava 不过这里我没用到Rxjava 其自带的Callback已经足够用了估计这个架构的难点在于Dagger2 理解它的工作方式需要方式需要点...
分类:
其他好文 时间:
2015-06-14 09:33:08
阅读次数:
151
今晚best code第二题
好好学了下字典树,确实自己会的东西实在太少了
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#define inf 1<<30
#define Inf -1<<30
#define maxn 50000+5
#de...
分类:
其他好文 时间:
2015-06-14 09:31:51
阅读次数:
152
centos7 && hadoop-2.7.0.tar.gzHadoop基于java环境,所以需要配置jdk。
1、配置jdk:
http://blog.csdn.net/fantasydreams/article/details/46486275
2、下载hadoop-2.7.0.tar.gz包,通过ssh上传至centos操作系统
最新hadoop下载地址:
http://hado...
分类:
其他好文 时间:
2015-06-14 09:31:30
阅读次数:
219
这种方法也是万万没想到的~
#include
#define maxn 1000000+5
using namespace std;
int f[maxn];
int n,m;
int main()
{
cin.sync_with_stdio(false);
while(cin>>n>>m)
{
fill(f,f+maxn,0);
for(int i=0;i<n;i++)
{
...
分类:
其他好文 时间:
2015-06-14 09:31:37
阅读次数:
111