码迷,mamicode.com
首页 > 其他好文
【深入了解cocos2d-x 3.x】内置数据结构(1)——Map
其实最没意思的数据结构就是这两个了,完完全全就是std::map和std::vector上面再加了一层引用计数。当然,这也有好处,就是支持std算法以及支持cocos2d-x的内存管理机制。 看源码可以知道(下均只对Map进行分析,Vector同理) template class Map { public: // -----------------------------------...
分类:其他好文   时间:2015-03-30 16:36:16    阅读次数:145
进度条简单demo
布局非常简单。 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="...
分类:其他好文   时间:2015-03-30 16:35:16    阅读次数:172
Installation error: INSTALL_FAILED_MEDIA_UNAVAILABLE
问题描述: 用eclipse编译程序,然后在android手机上运行,报错如下: [2014-06-21 12:56:17 - xmobile17] Installation error: INSTALL_FAILED_MEDIA_UNAVAILABLE [2014-06-21 12:56:17 - xmobile17] Please check logcat output fo...
分类:其他好文   时间:2015-03-30 16:35:34    阅读次数:226
EditText在代码中设置最大输入长度并设置为密码输入框
EditText在代码中设置最大输入长度并设置为密码输入框...
分类:其他好文   时间:2015-03-30 16:36:41    阅读次数:112
POJ3061---Subsequence(尺取法)
Description A sequence of N positive integers (10 < N < 100 000), each of them less than or equal 10000, and a positive integer S (S < 100 000 000) are given. Write a program to find the minimal lengt...
分类:其他好文   时间:2015-03-30 16:36:02    阅读次数:117
接口和抽象类的区别
刚刚结束J2se的学习,在J2se中,提到了java的接口和抽象类,他们的功能类似,那么他们有什么区别呢?如何应用呢?我查询了很多资料,整理知识如下,如有错误,欢迎指正。       在Java语言中, abstract class 和interface 是支持抽象类定义的两种机制。正是由于这两种机制的存在,才赋予了Java强大的面向对象能力。abstract class和interfa...
分类:其他好文   时间:2015-03-30 16:33:02    阅读次数:111
LeetCode Plus One
Given a non-negative number represented as an array of digits, plus one to the number. The digits are stored such that the most significant digit is at the head of the list. 题意:大数加法。 class Soluti...
分类:其他好文   时间:2015-03-30 16:33:20    阅读次数:91
使用Struts2国际化
Struts2国际化是建立在Java国际化的基础之上,一样也是通过提供不同国家/语言环境的消息资源,然后通过ResourceBundle加载指定Locale对应的资源文件,再取得该资源文件中指定key对应的消息——整个过程与Java程序的国家化完全相同,只是Struts2对Java程序国际化进一步封装,从而简化了应用程序的国际化。 Struts2中加载全局资源文件 通过在struts....
分类:其他好文   时间:2015-03-30 16:34:20    阅读次数:123
[最小表示法] HDU 2609 How many
题意: 给n个串,问不断的循环左移之后,有几个不相同的串。 思路: 全部转换的成字符串的最小表示法,统计。 裸题存模板 代码: #include"cstdlib" #include"cstdio" #include"cstring" #include"cmath" #include"queue" #include"algorithm" #include"iostream" #inclu...
分类:其他好文   时间:2015-03-30 16:33:37    阅读次数:145
HBase1.0.0的RPC机制分析与源码解读(一)
HBase的RPC机制,除了使用protocal buf的工具之外都是利用java的原生API进行构造,RPC机制的解读包括客户端和服务器端两个部分,本文主要就服务器端的服务运行机制以及工作流程进行简要分析. 首先我们来分析一下一个典型的RPC服务器短的处理流程,如下图所示: 从图中可以清楚的看到当客户端向服务器端发送一个请求的时候,最开始是被RPCServer中的Listener所监...
分类:其他好文   时间:2015-03-30 16:34:58    阅读次数:114
hdu1851 A Simple Game bash博弈+Nim博弈
Problem Description Agrael likes play a simple game with his friend Animal during the classes. In this Game there are n piles of stones numbered from 1 to n, the 1st pile has M1 stones, the 2nd pile has M2 stones, ... and the n-th pile contain Mn stones. A...
分类:其他好文   时间:2015-03-30 16:33:51    阅读次数:141
如何复制百度文库的内容
完美解决百度文库没有雨财富值,但是又需要使用文章内容的问题...
分类:其他好文   时间:2015-03-30 16:31:29    阅读次数:139
[矩阵快速幂] CodeForces 392C Yet Another Number Sequence
题意: 题目意思很明朗~ 思路: A(n+1)=F(n+1)*(n+1)^k A(n)=F(n)*(n)^k A(n-1)=F(n-1)*(n-1)^k 这里拿k=2来举例 A(n+1)=F(n)*(n+1)^2+F(n-1)*(n+1)^2 对于A(n+1)发现可以由A(n)和A(n-1)得到 实际上就是多了 2*n+1个F(n) 和4*n个F(n-1) 其实就是n^k ->...
分类:其他好文   时间:2015-03-30 16:31:26    阅读次数:159
Log4j日志切割实践篇
1:需要的jar log4j-1.2.14.jar tomcat-juli-adapters.jar tomcat-juli.jar 2:src下添加log4j.properties log4j.rootLogger=debug, stdout, log, errorlog #log4j.addivity.org.apache=true ###Con...
分类:其他好文   时间:2015-03-30 16:32:13    阅读次数:221
Eggs Dropping puzzle(2 eggs, 100 floors)
题目如下:You are given two eggs, and access to a 100-storey building. Both eggs are identical. The aim is to find out the highest floor from which an egg will not break when dropped out of a window from th...
分类:其他好文   时间:2015-03-30 16:31:05    阅读次数:160
leetcode || 46、Permutations
problem: Given a collection of numbers, return all possible permutations. For example, [1,2,3] have the following permutations: [1,2,3], [1,3,2], [2,1,3], [2,3,1], [3,1,2], and [3,2,...
分类:其他好文   时间:2015-03-30 16:30:01    阅读次数:135
阿里巴巴笔试题求最小三元组距离
已知三个升序整数数组a[l], b[m]和c[n]。请在三个数组中各找一个元素,是的组成的三元组距离最小。三元组的距离定义是:假设a[i]、b[j]和c[k]是一个三元组,那么距离为: Distance = max(|a[ I ] – b[ j ]|, |a[ I ] – c[ k ]|, |b[ j ] – c[ k ]|) 请设计一个求最小三元组距离的最优算法,并分析时间复杂度。...
分类:其他好文   时间:2015-03-30 16:28:33    阅读次数:142
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!