码迷,mamicode.com
首页 >  
搜索关键字:while read line for ifs    ( 74720个结果
Python重写C语言程序100例--Part5
''' 程序31】 题目:请输入星期几的第一个字母来判断一下是星期几,如果第一个字母一样,则继续    判断第二个字母。 1.程序分析:用情况语句比较好,如果第一个字母一样,则判断用情况语句或if语句判断第二个字母。 2.程序源代码: ''' from sys import stdin letter = stdin.read(1) stdin.flush() while letter != 'Y...
分类:编程语言   时间:2014-05-16 01:47:37    阅读次数:272
LeetCode 011 Container With Most Water
【题目】 Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i, ai) and (i, 0). Find two lines, which together with x-axis forms a contain...
分类:其他好文   时间:2014-05-16 01:32:47    阅读次数:406
write()和prinln()的区别?
输出数字不同: write()输出数字转换为字符,println原样输出。输出null不同: write()输出引用类型的时候调用的toString转换为String数据,因此如果对象为null那么直接抛出空指针异常。Println直接输出null。
分类:其他好文   时间:2014-05-15 22:28:14    阅读次数:287
页面加载完成后执行的JS
$(document).ready(function() { alert("!@221212121212");}); window.onload = function(){ alert("!@22245624562621212");} function init(){alert("!@5446...
分类:Web程序   时间:2014-05-15 21:21:10    阅读次数:390
Pipe 简单的例子
如下是Pipe的一个简单的例子。管道的通信是单项的。只能一端写,一端读。管道通信只能在有共同祖先的两个进程之间。在两个进程中,进行数据传送。pipe(fd)创建管道,fd【0】作为read端,fd【1】作为写入端。当fd[1]不存在的时候,认为已经读到结尾,read返回0.如果fd[1]存在,写入数据后,将写入端关闭,但是数据一直存在,直到读出。数据总是写在管道的尾部,而读的时候,则是从头部开始读...
分类:其他好文   时间:2014-05-15 20:06:03    阅读次数:264
hust 1039 Telephone Lines
题目描述Farmer John wants to set up a telephone line at his farm. Unfortunately, the phone company is uncooperative, so he needs to pay for some of the ca...
分类:其他好文   时间:2014-05-15 18:03:37    阅读次数:292
html 12 行 快 转换 段落 文字
display: block;inline;none;inline-block;段落缩进 text-indent:20pxfont: font-style font-weight font-size line-height font-familyfamily: "xxx","xxxx","xxxxx...
分类:Web程序   时间:2014-05-15 17:52:29    阅读次数:380
信息写入记事本方法
/// /// 信息写入记事本 /// /// /// public static void Write(string text, string path) { try { DateTime newDat...
分类:其他好文   时间:2014-05-15 17:51:53    阅读次数:262
马哥学习笔记十六——MySQL进阶之事务和隔离级别
连接管理器: 接受请求 创建线程 认证用户 建立安全连接并发控制: mbox:MDA C/S: 100 10分钟: 多版本并发控制: MVCC锁: 读锁:共享锁 写锁:独占锁 LOCK TABLES tb_name {READ|WRITE}; UNLOCK TABLES...
分类:数据库   时间:2014-05-15 17:29:22    阅读次数:423
sqlite 数据库打开失败
今天在做Android电子词典的时候,数据库打不开,报错为:Could not open the database in read/write mode。后来才发现犯了一个低级错误,没有设置权限。添加权限即可:希望大家不要犯这种白痴错误。
分类:数据库   时间:2014-05-15 17:22:42    阅读次数:386
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!