码迷,mamicode.com
首页 >  
搜索关键字:raw    ( 4642个结果
Exercise 35: Branches and Functions
from sys import exitdef gold_room(): print "This room is full of gold. How much do you take?" next = raw_input("> ") if "0" in next or "1" in...
分类:其他好文   时间:2014-10-25 15:45:58    阅读次数:169
Exercise 31: Making Decisions
print "You enter a dark room with two doors. Do you go through door #1 or door #2?"door = raw_input("> ")if door == "1": print "There's a giant bear ....
分类:其他好文   时间:2014-10-24 18:34:08    阅读次数:242
《TCP/IP详解卷2:实现》笔记--选路插口
一个进程使用选路域(routing domain)中的一个插口来发送和接收选路报文,socket系统调用需要制定一个PF_ROUTE 的族类型和一个SOCK_RAW的插口类型。该进程可以向内核发送以下五种选路报文: 1.RTM_ADD:增加一条新路由。 2.RTM_DELETE:删除一条已经存在的路由。 3.RTM_GET:取得有关一条路由的所有信息。 4.RTM_CHANGE:改变一条...
分类:其他好文   时间:2014-10-24 00:26:42    阅读次数:321
Android L 向下兼容包效果展示
实在在网上没找到 demo,所以就自己写了一个。 ![](https://github.com/ufo22940268/AppcompatV21Demo/raw/master/screenshot.png) 代码:https://github.com/ufo22940268/AppcompatV21Demo 在编译之前要更新 bu...
分类:移动开发   时间:2014-10-23 12:52:39    阅读次数:189
Exercise 12: Prompting People
age = raw_input("How old are you? ")height = raw_input("How tall are you? ")weight = raw_input("How much do you weigh? ")print "So, you're %r old, %r ...
分类:其他好文   时间:2014-10-23 12:21:22    阅读次数:227
Glance - 通过libguestfs挂载虚拟机image
libguestfs简介libguestfsisasetoftoolsforaccessingandmodifyingvirtualmachine(VM)diskp_w_picpaths.libguestfs官网介绍:http://libguestfs.org/libguestfs使用一、命令行工具yuminstall-ylibguestfslibguestfs-tools#安装命令行工具包,命令是guestfish,raw和qcow2格式的..
分类:Web程序   时间:2014-10-23 06:57:19    阅读次数:307
Python 字符串前面加'r'
python中r的用法,r'str'表示raw string,既忽略转义字符。因为和windows不一样,python中认为\就是转义字符escape sequences的标志。在python2.x中,unicode字符串需要在字符串前加u来表示,比如 str=u'汉字'而在python3.x中,u...
分类:编程语言   时间:2014-10-22 23:27:18    阅读次数:270
通过pc 浏览器输入文字到 Android App
先上个图: ![](https://raw.githubusercontent.com/ufo22940268/Android-WebEditTextView/master/slide2.gif) 大概原理就是在应用端开启一个 http server,然后让 pc 访问这个 server。获取到输入界面。然后在网...
分类:移动开发   时间:2014-10-22 14:48:06    阅读次数:176
坑爹的黑店
坑爹的黑店maxm=10000v=[150,200,350]t=int(raw_input())for ii in range(0,t): m=int(raw_input()) f=[] for j in range(0,m+1): f.append(m) fo...
分类:其他好文   时间:2014-10-22 10:51:27    阅读次数:140
A+B 输入输出练习I
while True: try: s=raw_input() a,b=s.split(' ') a,b=int(a),int(b) print a+b except EOFError: break
分类:其他好文   时间:2014-10-22 08:44:07    阅读次数:162
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!