上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 25 下一页
摘要: 1.使用mysql数据库首先需要安装驱动程序 pip install PyMySQL 2.django 不能直接操控pymysql,只能操控mysqldb,因此需要做一定的转换 在Django的工程同名子目录的__init__.py文件中添加如下语句 from pymysql import inst 阅读全文
posted @ 2019-08-11 15:30 李艳艳665 阅读(150) 评论(0) 推荐(0) 编辑
摘要: JS中的键盘事件经常用到,收集了键盘事件对应的键码来分享下: keyCode 对应按键8 BackSpace BackSpace9 Tab Tab12 Clear13 Enter16 Shift_L17 Control_L18 Alt_L19 Pause20 Caps_Lock27 Escape E 阅读全文
posted @ 2019-08-10 19:18 李艳艳665 阅读(549) 评论(0) 推荐(0) 编辑
摘要: RectTransform tr = this.GetComponent<RectTransform>(); RectTransform rect = (this.transform as RectTransform); //直接获得对象身上的其它组件(类) Button bb = this.Get 阅读全文
posted @ 2019-08-10 19:17 李艳艳665 阅读(489) 评论(0) 推荐(0) 编辑
摘要: """图书管理系统"""import random # books={书名:剩余数量, 书名:剩余数量}import time books = {"防脱发指南": 5, "颈椎康复指南": 3, "从删库到跑路": 0}# students_books=[name,{书}]students_book 阅读全文
posted @ 2019-08-10 19:15 李艳艳665 阅读(1929) 评论(0) 推荐(0) 编辑
摘要: 在Java的线程执行中,不管是直接继承Thread的方式,还是实现Runnable接口的方式,都不会获取到线程执行的返回结果。这样如果线程在执行过程中出现了错误,那么主线程也不会感知到。即使打印了日志,也不能立即抛出异常。事后查看日志才能发现出现了bug。而且到那时发生问题的代码点距离真正的问题点可 阅读全文
posted @ 2019-08-10 19:15 李艳艳665 阅读(521) 评论(0) 推荐(0) 编辑
摘要: public class TimeUtils { public static final int YEAR = 0; public static final int MONTH = 1; public static final int DAY = 2; public static final int 阅读全文
posted @ 2019-08-10 19:15 李艳艳665 阅读(176) 评论(0) 推荐(0) 编辑
摘要: import time # 最大停车数max_car = 100# 当前停车数,初始为0cur_car = 0# 当前停车列表,初始设置为空car_list = []time.asctime() class car(object): """定义一个车类包括 车主人名 车牌 开始停放时间""" def 阅读全文
posted @ 2019-08-10 19:12 李艳艳665 阅读(2278) 评论(0) 推荐(0) 编辑
摘要: public class DrawableUtils { private DrawableUtils() { /* cannot be instantiated */ throw new UnsupportedOperationException("cannot be instantiated"); 阅读全文
posted @ 2019-08-09 19:25 李艳艳665 阅读(218) 评论(0) 推荐(0) 编辑
摘要: public class NtpTimeUtils { // NTP服务器地址,同步获取网络时间(网络获取的时间已处理夏令时) private static String[] ntpServerHost = new String[]{ "cn.pool.ntp.org", "ntp1.aliyun. 阅读全文
posted @ 2019-08-09 19:25 李艳艳665 阅读(234) 评论(0) 推荐(0) 编辑
摘要: ublic class JSONUtils { public static String getString(JSONObject response, String key) { String value = response.optString(key, ""); return value.equ 阅读全文
posted @ 2019-08-09 19:25 李艳艳665 阅读(197) 评论(0) 推荐(0) 编辑
上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 25 下一页