菜单主页面:
主菜单页面背景
CCSprite* bg = CCSprite::create("MainMenu.png");
bg->setScale(0.5);
bg->setPosition( ccp(size.width/2, size.height/2) );
this->addChild(bg, 0,0);
菜单按钮及其效果,单击事件...
分类:
其他好文 时间:
2014-06-05 00:55:52
阅读次数:
437
DP求解。对Blocks的先按照X降级,再按照Y降级排序,可以转化为最长公共子序列问题,即求子序列权值之和最大。
#include
#include
#include
using namespace std;
#define MAX_SIZE 300
struct Block{
int x;
int y;
int height;
};
int nums...
分类:
其他好文 时间:
2014-06-03 04:39:44
阅读次数:
223
本题使用动态规划法, 或者记忆法,加上递归法。
不加上递归法,好像很麻烦,因为我们不知道其初始值,只知道其最终值,所以只能往下递推了,这样使用记忆法就比动态规划要方便了。
使用二维表设计其递归记忆表,防止重复计算。还是十分困难的,动态规划法有时候不一定比记忆法要好。
递归记忆法的学名: top-down with memoization; Introduction to Algorithm的Dynamic programming 这章有介绍...
分类:
其他好文 时间:
2014-06-02 23:04:24
阅读次数:
397
Difference
between static and dynamic schedule in openMP in C...
分类:
其他好文 时间:
2014-06-01 13:05:15
阅读次数:
309
【题目】
Given n non-negative integers representing the histogram's bar height where the width of each bar is 1, find the area of largest rectangle in the histogram.
Above is a histogram where width of each bar is 1, given height = [2,1,5,6,2,3].
The...
分类:
其他好文 时间:
2014-06-01 10:46:29
阅读次数:
242
布局文件:
<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="...
分类:
移动开发 时间:
2014-06-01 04:04:04
阅读次数:
490
实现自由落体运动需要理解的几个简单属性:
clientHeight:浏览器客户端整体高度
offsetHeight:对象(比如div)的高度
offsetTop:对象离客户端最顶端的距离
简单demo如下:
free_movement
#div1{
position: absolute;
height: 100px;
width: 100...
分类:
编程语言 时间:
2014-06-01 01:49:24
阅读次数:
348
1.修改PagerTabStrip中的背景颜色我们在布局中直接设置background属性即可: <android.support.v4.view.ViewPager
android:id="@+id/pager"
android:layout_width="fill_parent"
android:layout_height="fill_paren...
分类:
移动开发 时间:
2014-05-31 23:42:11
阅读次数:
624
效果如下:
页面如下:
ul, ol {
list-style: none outside none;
}
.nav-wrap {
width:100%;
height: 50px;
}
.float-navbar {
border-bottom: 1px solid #F3F3F3;
margin: 0;
padding: 0...
分类:
Web程序 时间:
2014-05-31 23:14:24
阅读次数:
619
看完EffectiveC++的关于转型的章节,顿时认为周围的代码都处在悬崖边上~~C的旧式转型:inta = 10; double b =
(double)a;对于C++的四种转型函数,const_cast去掉对象的常量性(仅仅此一个操作符有此功能!)dynamic_cast一般用于继承体系中某对象...
分类:
编程语言 时间:
2014-05-31 19:20:35
阅读次数:
288