码迷,mamicode.com
首页 >  
搜索关键字:uicolor random    ( 8060个结果
hdu - 4790 - Just Random(容斥 + 组合数学)
题意:在 [a, b] 取一个整数 x,在 [c, d] 取一个整数 y,求满足 (x + y) % p = m 的 (x, y) 的对数(0 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4790 ——>>2013年成都区赛最后一题,当时TLE6次无果。。。。加上 B 的无限WA,铁铁地铁了。。 。。。。。。。 设 f(a, b) 表示...
分类:其他好文   时间:2014-11-05 17:16:49    阅读次数:189
iOS把一个简单的图形变成一个圆
push是定义的一个button push.layer.masksToBounds = YES; push.layer.cornerRadius = 100; push.layer.borderWidth = 10; push.layer.borderColor = [[UIColor b...
分类:移动开发   时间:2014-11-05 14:28:12    阅读次数:157
自定义导航栏字体、颜色
UILabel *titleText = [[UILabel alloc] initWithFrame: CGRectMake(kWidth/2 -60, 0, 120, 50)];     titleText.backgroundColor = [UIColor clearColor];     titleText.textAlignment = NSTextAlignmentCe...
分类:其他好文   时间:2014-11-05 13:10:39    阅读次数:137
UISearchBar 改变背景色
UIView *backView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, _searchBar.size.width, _searchBar.size.height)];     [backView setBackgroundColor:[UIColor colorWithRed:248/255.0 green:248/25...
分类:其他好文   时间:2014-11-05 13:10:04    阅读次数:165
随机产生数组元素
产生0-9之间的10个随机数,并且10个随机数不能重复;var arr = [0,1,2,3,4,5,6,7,8,9];//定个数组;for(j=0;j<=9;j++){ varc = arr[Math.floor(Math.random() * arr.length)];//产生的随机数; arr...
分类:编程语言   时间:2014-11-05 10:47:54    阅读次数:226
IOS 创建一张有颜色的UIImage
#import @interface UIImage (ImageWithColor)+ (UIImage *)imageWithColor:(UIColor *)color;@end#import "UIImage+ImageWithColor.h"@implementation UIImage ...
分类:移动开发   时间:2014-11-04 19:22:43    阅读次数:726
JAVA获取随机数
在Java中我们能够使用java.util.Random类来产生一个随机数发生器。它有两种形式的构造函数,各自是Random()和Random(long seed)。Random...
分类:编程语言   时间:2014-11-04 14:34:32    阅读次数:232
[LeetCode]Copy List with Random Pointer复杂链表的复制
/** * Definition for singly-linked list with a random pointer. * struct RandomListNode { * int label; * RandomListNode *next, *random; * RandomListNode(int x) : label(x), next(NULL), ...
分类:其他好文   时间:2014-11-04 11:11:48    阅读次数:216
UITextView上添加默认文字
1. 实现UITextView的代理方法 text.view.delegate = self; 2. 在UITextView上覆盖UILabel ps:必须实现 label.enabled = NO; label.backgroundColor = [UIColor clearColor]; 3. 在UITextView - Delegate中实现 -(void)textVie...
分类:其他好文   时间:2014-11-04 11:07:23    阅读次数:204
随笔1--2014/11/04
1.随机获取网页16进制颜色值1 color ="#"+("00000"+((Math.random()*16777215+0.5)>>0).toString(16)).slice(-6);2.有待添加
分类:其他好文   时间:2014-11-04 10:52:03    阅读次数:153
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!