上篇讲的是JNI的入门,http://blog.csdn.net/chaoyue0071/article/details/45098009
例子讲了一个.java文件到.h .cpp文件的映射。那当多个.java文件或是自己一个.java对应多个.h .cpp文件??那么就要用到Ant啦
在我们的HelloNDK工程中添加GetInt类和方法。
public class GetInt {
...
分类:
移动开发 时间:
2015-04-17 18:17:21
阅读次数:
164
题目链接:Binary Tree Level Order Traversal
II
Given a binary tree, return the bottom-up level order traversal of its nodes' values. (ie, from left to right, level by level from leaf to root).
For exam...
分类:
其他好文 时间:
2015-04-17 18:16:21
阅读次数:
176
题目链接:Convert Sorted Array
to Binary Search Tree
Given an array where elements are sorted in ascending order, convert it to a height balanced BST.
这道题的要求是将有序数组转化成高度平衡的二叉搜索树(BST)。
由于数组有序,因此相当于二叉搜索树...
分类:
其他好文 时间:
2015-04-17 18:15:21
阅读次数:
187
题目链接:Balanced Binary Tree
Given a binary tree, determine if it is height-balanced.
For this problem, a height-balanced binary tree is defined as a binary tree in which the depth of the two subtrees ...
分类:
其他好文 时间:
2015-04-17 18:17:21
阅读次数:
140
题目链接:Convert Sorted List to
Binary Search Tree
Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST.
这道题的要求是将有序链表转化成高度平衡的二叉搜索树(BST)。
1. 利...
分类:
其他好文 时间:
2015-04-17 18:16:32
阅读次数:
165
导入:我们想要实现这样的效果:当我们点击标题的时候展示下面的内容,再点击则收回去。
一、首先回顾一下有哪些绑定策略?
看这个实在是有点抽象了,我们来看具体的实例分析吧!
二、简单的Demo实例
@绑定:传递一个字符串作为属性的值。比如 str : ‘@string’
控制器中代码部分示例: myDirec.con...
分类:
Web程序 时间:
2015-04-17 18:14:42
阅读次数:
129
ios开发证书共用...
分类:
移动开发 时间:
2015-04-17 18:16:28
阅读次数:
163
上一章:php +ajax +sql 实现数据交互
上一章,讲解了php +ajax +sql实现数据异步加载,现在我们来了解下讲的的分页,这里我们用ajax来实现分页效果
注意:这里的代码大部分和上一章相似,不同的地方我会用这样的来显示
1.首先新建个sql表,表内容如上所示:
2.新建个公用文件conn.php来链接数据库:
header("Content-...
分类:
数据库 时间:
2015-04-17 18:16:56
阅读次数:
175
点击打开杭电1263
Problem Description
夏天来了~~好开心啊,呵呵,好多好多水果~~
Joe经营着一个不大的水果店.他认为生存之道就是经营最受顾客欢迎的水果.现在他想要一份水果销售情况的明细表,这样Joe就可以很容易掌握所有水果的销售情况了.
Input
第一行正整数N(0
每组测试数据的第一行是一个整数M(0
Output
对...
分类:
其他好文 时间:
2015-04-17 18:14:25
阅读次数:
129
problem:
Two elements of a binary search tree (BST) are swapped by mistake.
Recover the tree without changing its structure.
Note:
A solution using O(n) space is pretty straight forwar...
分类:
其他好文 时间:
2015-04-17 18:14:49
阅读次数:
148
最强DE 战斗力
时间限制:1000 ms | 内存限制:65535 KB
描述
春秋战国时期,赵国地大物博,资源非常丰富,人民安居乐业。但许多国家对它虎视眈眈,准备联合起来对赵国发起一场战争。
显然,面对多个国家的部队去作战,赵国的兵力明显处于劣势。战斗力是决定战争成败的关键因素,一般来说,一支部队的战斗力与部队的兵力成正比。但当把一支部队分成若干个作战队伍时,这个部队的战斗力就...
分类:
其他好文 时间:
2015-04-17 18:15:07
阅读次数:
159
敏捷与Scrum-初步记录...
分类:
其他好文 时间:
2015-04-17 18:16:07
阅读次数:
102
举个例子>>> s = u'\u6ce8\u91ca'
>>> s
u'\u6ce8\u91ca'
>>> print s
注释
>>> print type(s)
>>> print s.encode('gbk')
注释字符串前加u表示为unicode编码,而当前文本的unicode编码 可以设定,
比如utf-8编码就是第一行加上:# -*- coding:...
分类:
编程语言 时间:
2015-04-17 18:15:46
阅读次数:
148
表达式定义:[ capture-list ] ( params ) mutable(optional) exception attribute -> ret { body } (1)
[ capture-list ] ( params ) -> ret { body } (2)
[ capture-list ] ( params ) { body } (3)...
分类:
其他好文 时间:
2015-04-17 18:14:13
阅读次数:
157
let file = "file.txt"
if let dirs : [String] = NSSearchPathForDirectoriesInDomains(NSSearchPathDirectory.DocumentDirectory, NSSearchPathDomainMask.AllDomainsMask, true) as? [String] {
let dir = d...
分类:
编程语言 时间:
2015-04-17 18:13:46
阅读次数:
109
识别字符串中的整数并转换为数字形式
接口函数:
void take_num(const char *strIn, int *n, unsigned int *outArray)
【输入】 strIn: 输入的字符串
【输出】 n: 统计识别出来的整数个数outArray...
分类:
其他好文 时间:
2015-04-17 18:15:25
阅读次数:
170
主要安装步骤分为如下5步,看完这些后,回过头去看安装包里的INSTALL文件,收获会更多。
下载、解压openmpi到官网下载最新版本后、解压tar -xvf openmpi-xxx
cd openmpi-xxx配置,- -prefix选项表示安装目录./configure --prefix="/opt/openmpi"Build 安装, -j 选项表示编译使用的核心数make -j 4 all
有...
分类:
其他好文 时间:
2015-04-17 18:15:25
阅读次数:
201