function getURL(){ var args = {}; var query = location.search.substring(1); //获得了当前链接的中?号后的参数 var pairs = query.split("&"); for(var i = 0; i < pairs.....
分类:
Web程序 时间:
2014-09-10 12:12:30
阅读次数:
202
1 public class Solution { 2 public boolean search(int[] A, int target) { 3 int low=0, high=A.length-1; 4 while (low=target) low=m...
分类:
其他好文 时间:
2014-09-09 23:02:39
阅读次数:
217
1 public class Solution { 2 public int search(int[] A, int target) { 3 int low=0, high=A.length-1; 4 5 while (lowA[mid] ...
分类:
其他好文 时间:
2014-09-09 21:30:09
阅读次数:
178
因为Search Bar的游标颜色和Tint颜色是统一的,如果要想将游标的颜色设置为其他颜色,则需要到textfiled内部去修改,对于字体也是同样。
实现代码:
- (void)setSearchBarTextfiled:(UISearchBar *)searchBar{
for (UIView *view in searchBar.subviews){
for (i...
分类:
移动开发 时间:
2014-09-09 18:20:09
阅读次数:
354
从一个大神那看到的,拷贝过来跟大家分享下!html*{margin:0;padding:0;}body{background:#222;} canvas{ position:absolute; border:5px solid rgba(255,255,255,0.1); box-shadow...
分类:
Web程序 时间:
2014-09-09 15:08:38
阅读次数:
256
我觉着写得比看到的答案更清晰~
class Solution {
public:
TreeNode *ltob(ListNode *head, ListNode *end) {
if(head == end) {
TreeNode * node = new TreeNode(head->val);
return node;...
分类:
其他好文 时间:
2014-09-09 12:56:58
阅读次数:
166
Given n, generate all structurally unique BST's (binary search trees) that store values 1...n.
For example,
Given n = 3, your program should return all 5 unique BST's shown below.
1 3...
分类:
其他好文 时间:
2014-09-09 12:31:39
阅读次数:
143
php的数组函数是一个重点,因为在PHP中是一个主要的复合数据类型,首先是,寻找一个值是否存在一个数组中的函数:array_search — 在数组中搜索给定的值,如果成功则返回相应的键名 mixed array_search ( mixed $needle , array $haystack [,...
分类:
Web程序 时间:
2014-09-09 12:17:58
阅读次数:
176
voidsetup(){size(200,200,P3D);noFill();smooth();}voiddraw(){background(0);translate(width/2,height/2,-(width/2));rotateY(map(mouseX,0,width,-PI,PI));stroke(100);box(150);rotateX(map(mouseY,0,height,-PI,PI));stroke(150);box(75);}
分类:
其他好文 时间:
2014-09-09 09:10:49
阅读次数:
348
最近有类似需求,在csdn上刚好发现,粘贴过来,以防止忘记喽前言:我们在android手机上面有时候会遇到监听手机软键盘按键的时候,例如:我们在浏览器输入url完毕后可以点击软键盘右下角的“GO”按键加载url页面;在点击搜索框的时候,点击右下角的search符号键可以进行搜索;或者在全部数据输入完...
分类:
移动开发 时间:
2014-09-08 09:35:46
阅读次数:
458