一、 二 、三元运算 三元运算就是if else的变种 If xxx: Pass Else: Pass 案例: Name = ‘alex’ If 1==1: Name = ‘sb’ Else: Name = ‘2b’ 运用三元运算如下: Name = 值 Name = 1 if 条件 else 2 ...
分类:
其他好文 时间:
2017-02-27 01:15:46
阅读次数:
253
Description Igor found out discounts in a shop and decided to buy n items. Discounts at the store will last for a week and Igor knows about each item ...
分类:
其他好文 时间:
2017-02-27 00:47:53
阅读次数:
241
题意: Igor found out discounts in a shop and decided to buy n items. Discounts at the store will last for a week and Igor knows about each item that its ...
分类:
其他好文 时间:
2017-02-26 20:30:06
阅读次数:
179
先来看一段常见的数据库操作代码: ``` protected User getDataFromDatabase(long id){ String sql = "select firstname from user where id=?";//1 Connection conn = DBConnect ...
分类:
其他好文 时间:
2017-02-26 19:22:31
阅读次数:
192
实现了简单的购物商城功能1.展现商品及价格2.商品加入购物车3.购物车商品显示及最终价格结算。 fruit = {'Apple': 3, 'Pear': 2, 'Banana': 3, 'Lemon': 5, 'Watermelon': 4} books = {'语文': 4, '英语': 3, '... ...
分类:
其他好文 时间:
2017-02-26 18:51:26
阅读次数:
183
我们知道,在Android中,只有UI线程能够更新UI,而子线程是不能更新UI。但是如果某个应用需要进行某种耗时的操作,如果在UI线程进行此操作的话,那会显得应用程序非常的卡顿,这个是不能允许存在的。于是,我们想到了使用子线程来进行这些耗时的操作,但是由于子线程不能更新UI,所以我们并不知道什么时候 ...
分类:
移动开发 时间:
2017-02-26 15:37:43
阅读次数:
337
第一个页面DBDA.class.php 第二个页面main.php ...
分类:
Web程序 时间:
2017-02-26 12:17:28
阅读次数:
230
昨天我们学习了Servlet的运行过程和生命周期,那么今天我们学习下Servlet中非常重要的两个类:ServletConfig ServletContext 我们可以看到,与顶层Servlet主动关联的是ServletConfig ServletRequest ServletResponse ,它 ...
分类:
Web程序 时间:
2017-02-25 22:45:57
阅读次数:
252
算法提高 大数加法 时间限制:1.0s 内存限制:256.0MB 时间限制:1.0s 内存限制:256.0MB 问题描述 输入两个正整数a,b,输出a+b的值。 输入格式 两行,第一行a,第二行b。a和b的长度均小于1000位。 输出格式 一行,a+b的值。 样例输入 42 样例输出 6 1 #in ...
分类:
编程语言 时间:
2017-02-25 21:11:36
阅读次数:
208
#!/usr/bin/python# -*- coding:utf-8 -*-import getpassusername = input('请输入用户名:') #输入密码可见#python3.x新版本取消了raw_input() #pwd= input('请输入密码:') #输入密码不可见pwd ...
分类:
编程语言 时间:
2017-02-25 18:45:10
阅读次数:
141