刚看到代码中有大量的xx.backgroundColor = [UIColor clearColor];(1)很好奇,默认的背景色是什么值?官方给出的:默认为nil,此时背景是透明的。然后clearColor的备注也写明了:“0.0 white, 0.0 alpha”(白色,但alpha为0),所以...
分类:
其他好文 时间:
2015-08-17 11:26:18
阅读次数:
121
Flip and ShiftTime Limit: 2 Seconds Memory Limit: 65536 KBThis puzzle consists of a random sequence of m black disks and n white disks on an oval-s...
分类:
其他好文 时间:
2015-08-16 15:13:15
阅读次数:
126
?Engineer in the White SpacesMichael NygardA SySTEM ConSiSTS oF inTERdEpEndEnT pRogRAMS. We call the arrangement of these programs and their relationships architecture. When we diagram these systems, w...
分类:
其他好文 时间:
2015-08-16 10:47:44
阅读次数:
97
1.调用方法:fromfabricimportcolors2.方法:printcolors.blue(string)#蓝printcolors.red(string)#红printcolors.cyan(string)#浅蓝printcolors.green(string)#绿printcolors.magenta(string)#紫printcolors.white(string)#白printcolors.yellow(string)#黄3.练习:#!/bin/env..
分类:
其他好文 时间:
2015-08-16 00:49:50
阅读次数:
136
溢出文本显示省略号的效果:
white-space:nowrap; 强制文本在一行显示
overflow:hidden; 溢出内容为隐藏
text-overflow:ellipsis; 当对象内文本溢出时显示省略标记(...)...
分类:
Web程序 时间:
2015-08-15 11:58:31
阅读次数:
149
题目链接:点击打开链接
题意描述:给一个n*m的棋盘,现在有k种颜色的涂料,每种涂料可以使用ai次。求能否找出一种方案,给所有的格子染色,保证相邻的格子之间颜色不同。如果存在给出任意一种解决方案;否则输出NO
解题思路:dfs+剪枝
由于题目中棋盘最大为5×5所以可以考虑使用dfs,染色问题有一个结论貌似是:(剩余的格子的数量+1)>= 任意一种涂料的个数,否则染色必然失败。因此我们...
分类:
其他好文 时间:
2015-08-14 13:55:10
阅读次数:
110
原题如下面,这意味着无序排列(由0,1,2组成)。一号通。组织成若干阵列0-几个1-几个2这样的序列。Given an array with n objects colored red, white or blue, sort them so that objects of the same col...
分类:
编程语言 时间:
2015-08-13 19:38:50
阅读次数:
124
Description
Flip game is played on a rectangular 4x4 field with two-sided pieces placed on each of its 16 squares. One side of each piece is white and the other one is black and each piece is lying e...
分类:
其他好文 时间:
2015-08-13 18:03:24
阅读次数:
129
poj 2488 A Knight's JourneyDescriptionBackground The knight is getting bored of seeing the same black and white squares again and again and has decide...
分类:
其他好文 时间:
2015-08-13 17:24:10
阅读次数:
89
DescriptionFlip game is played on a rectangular 4x4 field with two-sided pieces placed on each of its 16 squares. One side of each piece is white and ...
分类:
其他好文 时间:
2015-08-13 08:49:56
阅读次数:
129