输出用print加上字符串,就可以向屏幕上输出指定的文字。比如输出'hello, world',用代码实现如下:>>> print 'hello, world'print语句也可以跟上多个字符串,用逗号“,”隔开,就可以连成一串输出:>>> print 'The quick brown fox', ...
分类:
其他好文 时间:
2014-09-27 02:35:59
阅读次数:
245
公司的权限管的比较严格,在数据库备机上只能用select,mysqldump操作修改数据导出来很麻烦,可以通过下面方法提高效率。
登陆对应IDC机器: X.198.18.212 webadmin
1)执行下面语句。
mysql -uuser -ppwd -hhost -Pport dbname -A -e "set names gbk;select * from t_wg_voucher_...
分类:
数据库 时间:
2014-09-25 22:02:37
阅读次数:
304
# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Eacha
# entry sh...
分类:
其他好文 时间:
2014-09-24 19:46:27
阅读次数:
308
题目链接
题意:给出n座大楼的位置以及高度,再给出m个人的位置,查询给出的人的位置所能看到的最大的仰角是多少。
思路:维护每两座的楼之间的斜率,使之成为一个凸面,用栈来维护,听了GG小伙伴的思路,可以将人当作高度为0的大楼来带入计算。
代码:
#include
#include
#include
#include
#include
using names...
分类:
其他好文 时间:
2014-09-23 17:37:24
阅读次数:
200
// boost.lambda表达式用法
// made by davidsu33
// 2014-9-22
#include "stdafx.h"
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
using names...
分类:
其他好文 时间:
2014-09-23 02:51:33
阅读次数:
244
题目链接
题意:用给出的公式求出每个格子蘑菇的数值,求出现频率最多的数值,如果存在出现频率一样的话并且还存在其他频率,输出频率最多且一样的数值,按升序,但要注意有且出现只有一种数值时,输出这种数值。
思路:简单模拟
代码:
#include
#include
#include
#include
#include
#include
using names...
分类:
其他好文 时间:
2014-09-21 23:53:01
阅读次数:
240
修改文件为/etc/mysql/my.cnf[client]default-character-set = utf8 (ps:client的设置没变)[mysqld]lower_case_table_names = 1 (不区分大小写)character_set_server = utf8 (ps:...
分类:
数据库 时间:
2014-09-20 18:54:49
阅读次数:
288
class Program { static void Main(string[] args) { #region 数组内容反转 string[] names = { "马云", "李彦宏", "马化腾", "乔布斯", ...
分类:
其他好文 时间:
2014-09-20 17:36:19
阅读次数:
213
读王纯业前辈的笔记遇到个很坑的例子A namespace is a mapping from names to objects>>> class a: def __cmp__(self,other): if other > 0 : print 'other > 0' ;return -1 eli.....
分类:
编程语言 时间:
2014-09-19 18:59:45
阅读次数:
188
第04章:字典 当索引不好用时
Python唯一的内建的映射类型,无序,但都存储在一个特定的键中,键可以使字符,数字,或者是元祖.
------
字典使用:
表征游戏棋盘的状态,每个键都是由坐标值组成的元祖
存储文件修改的次数,文件名作为键
数字电话/地址薄
函数传递值def func(x,*args,**args):
如果要建公司员工与座机号的列表,如果要获得Alice的座机只能这么找
>>> names = ['Alice','Bob','Tom']
>>> numbers = ['1234','7...
分类:
编程语言 时间:
2014-09-17 23:26:13
阅读次数:
589