class Solution: # @param a, a string # @param b, a string # @return a string def addBinary(self, a, b): #长度不等,补齐 len_a=len(a...
分类:
其他好文 时间:
2014-10-14 17:19:39
阅读次数:
145
$_SERVER['REMOTE_PORT'] //端口。 $_SERVER['SERVER_NAME'] //服务器主机的名称。 $_SERVER['PHP_SELF']//正在执行脚本的文件名 $_SERVER['argv'] //传递给该脚本的参数。 $_SERVER['argc'] //传递...
分类:
Web程序 时间:
2014-10-14 15:27:58
阅读次数:
190
一个队列至少满足2个方法,put和get.
借助最小堆来实现.
#coding=utf-8
from heapq import heappush, heappop
class PriorityQueue:
def __init__(self):
self._queue = []
def put(self, item, priority):
he...
分类:
编程语言 时间:
2014-10-14 15:05:08
阅读次数:
193
对输入的UITextField 控件设置完代理,然后粘上两种方法,即可。#pragma mark- 键盘收回-(void)textFieldDidEndEditing:(UITextField *)textField{ [self.recordView.phoneTextField resi...
分类:
移动开发 时间:
2014-10-14 12:09:08
阅读次数:
173
1、设置标题:self.navigationItem.title=@"系统标题";运行:2、自定义标题,设置titleView:如果我们想改变标题的颜色和字体,就需要自己定义一个UILabel,自己设置好这个Label的内容,可以设置自己想要的字体、大小和颜色等。然后执行self.navigationItem.titleView=myLabel;..
分类:
其他好文 时间:
2014-10-14 05:21:58
阅读次数:
207
空间复杂度为(1-n),时间复杂度为应该也是最低的,lua方便之处还是很值得利用的
local Random = {}; function Random:Awake()
self.m_min = 1;
self.m_max = 1;
self.m_end = 1;
self.m_rangeMap =...
分类:
其他好文 时间:
2014-10-13 20:22:47
阅读次数:
452
一:添加searchBar的两种方式:////////////添加搜索栏方式一:直接画一个,画不好的话会覆盖别的东西/////self.tableView.backgroundView=[[UIViewalloc]init];[self.tableViewsetBackgroundColor:[UIColorclearColor]];UISearchBar*mySearchBar=[[UISearchBaralloc]initWithF..
分类:
其他好文 时间:
2014-10-13 20:02:27
阅读次数:
228
PHP中的超全局变量PHP中的超全局变量 从PHP 4.2.0 开始,register_globals 的默认值为 off,这样一来,以前的很多可以直接使用的变量,如 $PHP_SELF 或者你设定的SESSION变量都不能用 “$变量名”的形式访问了,这可能会给你带来很多不变,但却有助于安全性的提...
分类:
Web程序 时间:
2014-10-13 18:52:21
阅读次数:
184
问题:使用 UITextView 显示多行文本创建一个简单的TextView:- (void)viewDidLoad{[super viewDidLoad];self.view.backgroundColor = [UIColor whiteColor];self.myTextView = [[UI...
分类:
其他好文 时间:
2014-10-13 18:42:37
阅读次数:
168
#!/usr/bin/env python#-*- coding:utf-8 -*-#File:mail_send.pyclass Mail_Logger(): mailLogger = None def __init__(self,conf_file,name): imp...
分类:
编程语言 时间:
2014-10-13 18:27:31
阅读次数:
167