__index的应用Window_Prototype = {x=0, y=0, width=100, height=100, m ={i=50}}Window_Prototype2 = {p=50, s=70}MyWin = {title="Hello"}setmetatable(MyWin, {_...
分类:
其他好文 时间:
2014-11-25 20:18:31
阅读次数:
206
我们希望flex web能够充分利用客户浏览器的内容显示空间,也希望当用户的浏览器内容空间太小的情况下不至于将我们的flex web压缩的难看,因此,我们希望flex web有个minHeight和minwidth。而width和height能够充分适应屏幕。花了几个小时解决,记载下:1、在swfo...
分类:
其他好文 时间:
2014-11-25 18:01:14
阅读次数:
228
第一种:css方法有时候当我们需要把一个元素固定在页面的某个部位,一般都是用css中的“position:fixed;”方法来解决,但是IE6不支持fixed,所以今天分享一个兼容IE6的页面底部固定层CSS代码。如下:.bottom{bottom:0;position:fixed;height:2...
分类:
其他好文 时间:
2014-11-25 14:04:31
阅读次数:
213
//创建UILabel
UILabel *label = [[UILabel alloc]initWithFrame:CGRectMake(7, 5, TABLEVIEW_WIDTH - HEADIMGVIEW_HEIGHT - 20 - 24 - 20, 0)];
//自动换行
label.numberOfLines = 0;
//设置label内容宽度
...
分类:
移动开发 时间:
2014-11-25 12:50:09
阅读次数:
162
一种linux图片格式,可用ACDSEE批量转变。它是一种简单的图像格式,仅包含格式、图像宽高、bit数等信息和图像数据。
图像数据的保存格式可以用ASCII码,也可用二进制,下面列举ppm格式中比较简单的一种:24位彩色、二进制保存的图像。
文件头+rgb数据:
P6\n
width height\n
255\n
rgbrgb...
其中P6表示ppm的这种格式;\n...
分类:
其他好文 时间:
2014-11-25 12:46:51
阅读次数:
179
int main(int argc, char *argv[]){#define WINDOW_BG FL_BLACK#define WINDOW_WIDTH 640#define WINDOW_HEIGHT 480#define BOX_WIDTH 100#define BOX_HEIGHT 40...
分类:
其他好文 时间:
2014-11-25 12:35:49
阅读次数:
225
use LOL gocreate table zuoye(code int primary key identity(1,1),name varchar(20),class char(3),sex char(2),teacher varchar(20),birth datetime ,height ...
分类:
其他好文 时间:
2014-11-25 10:40:48
阅读次数:
291
在用别人的组件的时候,总是感觉东西太大,用起来还得查看,别人是怎么写的,如何用,所以自己也开始学习一下封装一个组件:在这里封装了一个自定义的单选框:html代码 : 性别: 男 女 css 部分:.my_radio_off{width:18px; height:18px; display:inl.....
分类:
其他好文 时间:
2014-11-25 09:11:51
阅读次数:
191
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...
分类:
其他好文 时间:
2014-11-25 00:02:20
阅读次数:
428
【题目】
Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST.
【解析】
分治:用快慢指针找到链表的中点,作为树的root,然后二分——中点之前的链表和中点之后的链表分别再构造二叉平衡树。
/**
* Defin...
分类:
其他好文 时间:
2014-11-24 22:39:00
阅读次数:
218