码迷,mamicode.com
首页 >  
搜索关键字:dynamic height.    ( 27614个结果
横屏小游戏--萝莉快跑源码分析一
菜单主页面:   主菜单页面背景 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
POJ 2241 The Tower of Babylon
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
codechef - Bytelandian gold coins 题解
本题使用动态规划法, 或者记忆法,加上递归法。 不加上递归法,好像很麻烦,因为我们不知道其初始值,只知道其最终值,所以只能往下递推了,这样使用记忆法就比动态规划要方便了。 使用二维表设计其递归记忆表,防止重复计算。还是十分困难的,动态规划法有时候不一定比记忆法要好。 递归记忆法的学名: top-down with memoization; Introduction to Algorithm的Dynamic programming 这章有介绍...
分类:其他好文   时间:2014-06-02 23:04:24    阅读次数:397
OMP笔记(1)
Difference between static and dynamic schedule in openMP in C...
分类:其他好文   时间:2014-06-01 13:05:15    阅读次数:309
LeetCode: Largest Rectangle in Histogram [084]
【题目】 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
Android应用程序中的多个Activity的显示创建和调用
布局文件: <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
javascript---之自由落体运动实现
实现自由落体运动需要理解的几个简单属性: clientHeight:浏览器客户端整体高度 offsetHeight:对象(比如div)的高度 offsetTop:对象离客户端最顶端的距离 简单demo如下: free_movement #div1{ position: absolute; height: 100px; width: 100...
分类:编程语言   时间:2014-06-01 01:49:24    阅读次数:348
android:修改PagerTabStrip中的背景颜色,标题字体的样式、颜色和图标以及指示条的颜色
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
淘宝分类导航条;纯css实现固定导航栏
效果如下: 页面如下: 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
C++ 转型动作 尽量避免 以及 那些意想不到的威胁
看完EffectiveC++的关于转型的章节,顿时认为周围的代码都处在悬崖边上~~C的旧式转型:inta = 10; double b = (double)a;对于C++的四种转型函数,const_cast去掉对象的常量性(仅仅此一个操作符有此功能!)dynamic_cast一般用于继承体系中某对象...
分类:编程语言   时间:2014-05-31 19:20:35    阅读次数:288
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!