- 博客(28)
- 资源 (38)
- 收藏
- 关注
原创 cocos2d 中使用jni Java 调用 C++ 方法
1.首先是LoadLibrarycocos2d中的C++代码会编译成一个.so文件,放在安卓目录下的libs/armeabi 下,然后java会load进来,这步我们不用做了,因为cocos2d已经帮我们做好了。package cb.CbCCBLE;public class CbCCBLECentralManager { public static final String TA
2015-03-18 16:36:29 1872
原创 cocos2d 中使用jni C++ 调用 Java 方法
1.简单例子假设我们Java中有这么一个open的静态方法,它没有参数,有一个int的返回值。怎么在C++中调用它呢?package cb.CbCCBLE;public class CbCCBLECentralManager { public static final String TAG = "CbCCBLECentralManager Android"; public sta
2015-03-18 16:33:56 1986 1
原创 LeetCode Length of Last Word
1. 题目Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return the length of last word in the string.If the last word does not exist, return 0.Note: A word is defi
2015-03-17 15:20:30 1303
原创 LeetCode Number of 1 Bits
1.题目Write a function that takes an unsigned integer and returns the number of ’1' bits it has (also known as the Hamming weight).For example, the 32-bit integer ’11' has binary representation 00000000
2015-03-15 19:19:24 4208
原创 LeetCode Best Time to Buy and Sell Stock
1.题目Say you have an array for which the ith element is the price of a given stock on day i.If you were only permitted to complete at most one transaction (ie, buy one and sell one share of the stock),
2015-03-15 15:18:29 1200
原创 LeetCode Find Peak Element
1.题目A peak element is an element that is greater than its neighbors.Given an input array where num[i] ≠ num[i+1], find a peak element and return its index.The array may contain multiple peaks, in that
2015-03-15 15:04:26 1284
原创 LeetCode Sort Colors
1.题目Given an array with n objects colored red, white or blue, sort them so that objects of the same color are adjacent, with the colors in the order red, white and blue.Here, we will use the integers
2015-03-14 21:56:47 1236
原创 LeetCode Remove Element
1.题目Given an array and a value, remove all instances of that value in place and return the new length.The order of elements can be changed. It doesn't matter what you leave beyond the new length.2.解决方
2015-03-13 21:25:18 1277
原创 LeetCode Find Minimum in Rotated Sorted Array
1.题目Suppose a sorted array is rotated at some pivot unknown to you beforehand.(i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2).Find the minimum element.You may assume no duplicate exists in the array.
2015-03-13 20:40:59 1011
原创 LeetCode Majority Element
1.题目Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋ times.You may assume that the array is non-empty and the majority element al
2015-03-12 20:42:36 1204
原创 LeetCode Maximum Subarray
1.题目Find the contiguous subarray within an array (containing at least one number) which has the largest sum.For example, given the array [−2,1,−3,4,−1,2,1,−5,4],the contiguous subarray [4,−1,2,1] has
2015-03-12 10:20:03 1469 2
原创 LeetCode Binary Tree Inorder Traversal
1.题目Given a binary tree, return the inorder traversal of its nodes' values.For example:Given binary tree {1,#,2,3}, 1 \ 2 / 3return [1,3,2].Note: Recursive solution is trivial, coul
2015-03-09 10:48:31 1104
原创 LeetCode Unique Binary Search Trees
1.题目Given n, how many structurally unique BST's (binary search trees) that store values 1...n?For example,Given n = 3, there are a total of 5 unique BST's. 1 3 3 2 1 \
2015-03-08 20:07:54 1297
原创 LeetCode Excel Sheet Column Number
1.题目Given a column title as appear in an Excel sheet, return its corresponding column number.For example: A -> 1 B -> 2 C -> 3 ... Z -> 26 AA -> 27 AB -> 28 2.解决方案class Solu
2015-03-08 17:41:18 1259
原创 LeetCode Excel Sheet Column Title
1.题目Given a positive integer, return its corresponding column title as appear in an Excel sheet.For example: 1 -> A 2 -> B 3 -> C ... 26 -> Z 27 -> AA 28 -> AB 2.解决方案1class
2015-03-08 17:36:23 1352
原创 LeetCode Binary Tree Postorder Traversal
1.题目Given a binary tree, return the postorder traversal of its nodes' values.For example:Given binary tree {1,#,2,3}, 1 \ 2 / 3return [3,2,1].Note: Recursive solution is trivial, co
2015-03-08 11:09:43 1196
原创 LeetCode Convert Sorted Array to Binary Search Tree
1.题目Given an array where elements are sorted in ascending order, convert it to a height balanced BST.2.解决方案1 struct Node{ TreeNode* t; int l; int r; Node(vector &num, int l, int r)
2015-03-08 10:19:12 1174
原创 LeetCode Climbing Stairs
1.题目You are climbing a stair case. It takes n steps to reach to the top.Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top?2.解决方案class Solution {public:
2015-03-06 17:42:00 1153
原创 LeetCode Remove Duplicates from Sorted List
1.题目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.2.解决方案class Solution {public:
2015-03-06 17:24:06 1094
原创 LeetCode Search Insert Position
1.题目Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order.You may assume no duplicates in the array.
2015-03-06 16:47:48 1154
原创 LeetCode Binary Tree Preorder Traversal
1.题目Given a binary tree, return the preorder traversal of its nodes' values.For example:Given binary tree {1,#,2,3}, 1 \ 2 / 3return [1,2,3].Note: Recursive solution is trivial, cou
2015-03-06 16:14:26 1305
原创 LeetCode Linked List Cycle
1. 题目 Given a linked list, determine if it has a cycle in it.Follow up:Can you solve it without using extra space?2.解决方案class Solution {public: bool hasCycle(ListNode *head) { if(!head){
2015-03-06 15:40:37 1042
原创 Leetcode Same Tree
1.题目Given two binary trees, write a function to check if they are equal or not.Two binary trees are considered equal if they are structurally identical and the nodes have the same value.2.解决方案1class S
2015-03-06 14:34:33 1173
原创 LeetCode Maximum Depth of Binary Tree
1.题目描述Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node.2.解决方案1class Solution {public:
2015-03-06 10:46:33 1238
原创 LeetCode Swap Nodes in Pairs
1.题目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. You may
2015-03-06 09:55:34 1128
原创 leetcode Rotate List
1. 题目描述Given a list, rotate the list to the right by k places, where k is non-negative.For example: Given 1->2->3->4->5->NULL and k = 2, return 4->5->1->2->3->NULL.2.解决方案1class Solution {public: Li
2015-03-06 09:42:35 1041
原创 LeetCode Two Sum
1.题目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-03-06 09:39:37 1543 2
原创 cocos2d 制作fnt 批量缩放png ios 批量制作图标 gamedevkit 支持windows, mac
0.制作了一个简单软件这个软件有4个功能:批量缩放png图片根据美术给的数字小图等,制作fnt字体文件供cocos2d使用批量制作ios 图标和android 图标(只需传入一张图片)截图制作,传入5张IPhone6+的截图,生成IPhone5,IPhone6的截图(这个功能没什么用,不过当你个人开发制作20+个游戏的时候,就能省点力)下面是具体功能介绍。。。当然这个软件暂定为收费。1. coco
2015-03-05 09:48:18 2167
native-audio.rar
2012-04-20
三星Calendar
2013-08-26
Air Hockey.7z
2013-08-10
boost xpressive
2013-07-24
MFC 多线程
2013-07-22
MFC 数据库操作
2013-07-22
Android Opengles 例子
2013-06-22
号码归属地.rar
2013-05-28
CursorLoadSample.rar
2013-05-17
HLSL Pixel Shader
2012-12-18
YawPitchRoll.rar
2012-12-07
RotationArbitrary.rar
2012-12-04
3ds max 2009 导出x文件插件(panda)
2012-10-15
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人