'''
程序31】
题目:请输入星期几的第一个字母来判断一下是星期几,如果第一个字母一样,则继续
判断第二个字母。
1.程序分析:用情况语句比较好,如果第一个字母一样,则判断用情况语句或if语句判断第二个字母。
2.程序源代码:
'''
from sys import stdin
letter = stdin.read(1)
stdin.flush()
while letter != 'Y...
分类:
编程语言 时间:
2014-05-16 01:47:37
阅读次数:
272
【题目】
Given an integer, convert it to a roman numeral.
Input is guaranteed to be within the range from 1 to 3999.
【题意】
给定一个整数,将其表示成罗马数字
【思路】
罗马数字中只使用如下七个基值字母:M,D,C,L,X,V,I,分别用来表示1000、500、100、50、10、5、1。
罗马数组数规则:
基本数字Ⅰ、X 、C 中的任何一个,自身连用构成数目,或者放在大数的右边连用...
分类:
其他好文 时间:
2014-05-16 01:46:55
阅读次数:
312
iOS7中加入了后台获取(Background
Fetch)的特性,这个特性使得用户在打开应用之前应用就可以执行部分代码,比如准备数据,刷新UI等等。这个时常一般最大是30秒。以下是设置Background
Fetch的基本步骤,记录一下。1. 点击Target下的Capabilities ->>B...
分类:
移动开发 时间:
2014-05-16 00:44:52
阅读次数:
418
//在Activity应用元素。
ActivityInfo info = this.getPackageManager()
.getActivityInfo(getComponentName(),PackageManager.GET_META_DATA);
info.metaData.getString("meta_name");
//在appli...
分类:
移动开发 时间:
2014-05-15 23:58:55
阅读次数:
798
创建你自己的命令行 地址簿 程序。在这个程序中,你可以添加、修改、删除和搜索你的联系人(朋友、家人和同事等等)以及它们的信息(诸如电子邮件地址和/或电话号码)
#!/usr/bin/python
# Filename : var.py
import cPickle as p
import os
import sys
filename = 'contacts.data'
class memb...
分类:
编程语言 时间:
2014-05-15 23:44:49
阅读次数:
462
String slctpsql="select id ,"+uid+","+ddd+","+score+",'"+mark+"' ,"+markid+" ,"+exam.getId()+" from Test_Paper where testBaseId=(select id from Test_Base where baseTestId="+judgemap.get(i).getId()+" a...
分类:
数据库 时间:
2014-05-15 20:36:45
阅读次数:
434
server{if(!-e$request_filename){rewrite^(.*)$/index.phplast;}}如果if没有放在location时,在做memc缓存时,在错误日志里会提示以下信息2014/05/1210:45:51[error]11520#0:*325726srcache_fetch:cachesenttruncatedresponsebodywhilesendingtoclient,client:192.168.3.124,..
分类:
其他好文 时间:
2014-05-15 19:02:44
阅读次数:
350
http://my.oschina.net/dillan/blog/133877python输出格式化及函数formathttp://my.oschina.net/dillan/blog/133877Python中的字符串格式化1.Python中将两个整数相除,默认结果是为整数的。但我们可以通过下面的方法,使得两个整数相除的结果为小数。from__future__importdivis..
分类:
编程语言 时间:
2014-05-15 18:44:25
阅读次数:
568
1、gem安装出现下面错误
root@ubuntu:/home/git/gitlab# sudo gem install bundler --no-ri --no-rdoc
ERROR: Could not find a valid gem 'bundler' (>= 0), here is why:
Unable to download data from https...
分类:
其他好文 时间:
2014-05-15 18:19:48
阅读次数:
304
send($data)`. The sent data will then* be the
result of the `yield` expression. Thus it can be received using a code like*
`$data = yield;`.*/ /* What...
分类:
其他好文 时间:
2014-05-15 17:46:37
阅读次数:
311