1. import导入的是一个标准模块,而标准模块的概念是一个文件夹里面必须包含__init__.py文件。它的作用更像是一种声明,且import模块进来之后,万一原本的模块有什么变化,可以通过reload()进行重新加载。 __import__()作为一个函数,只能接受字符串参数,返回值可以直接用 ...
分类:
其他好文 时间:
2020-02-05 23:05:44
阅读次数:
84
引言 在流行的用法中,“Linux”通常是指围绕Linux内核的一组操作系统发行版。但从严格意义上讲,Linux仅指内核本身的存在。为了构建一个完整的操作系统,Linux发行版通常包括来自GNU项目和其它源的工具和库。最近,越来越多的开发人员使用Linux来构建和运行移动应用程序;它还在开发价格合理 ...
分类:
系统相关 时间:
2020-02-05 16:31:44
阅读次数:
87
addTouchListWrapper 支持垂直、水平滑动、tab、轮播图等 function addTouchListWrapper( option ) { //事件注册给哪个对象?默认document var d = option.target == undefined ? document : ...
分类:
编程语言 时间:
2020-02-05 09:45:29
阅读次数:
90
1、在项目中存在一些情况,需要为action加一些viewbag属性增强可维护性。 [TitleFooterAttribute] // GET: yewulingyu public ActionResult Index() { int toal = 0; List<GongSiYeWu> list ...
分类:
Web程序 时间:
2020-02-05 09:35:30
阅读次数:
105
在GNU C中,宏可以接受可变数目的参数,就象函数一样,例如: 1 2 #define pr_debug(fmt,arg...) \ printk(KERN_DEBUG fmt, ##arg) 用可变参数宏(variadic macros)传递可变参数表 你可能很熟悉在函数中使用可变参数表,如: 1 ...
分类:
编程语言 时间:
2020-02-04 21:55:50
阅读次数:
67
实现servlet的三种方式:-Servlet -GenericServlet -HttpServlet 【servlet】 servlet里边的所有方法: init(ServletConfig config):servlet对象之后调用一次。 getServletConfig():可以获取serv ...
分类:
其他好文 时间:
2020-02-04 18:42:41
阅读次数:
73
起因:新安装的idea第一次运行springboot项目报url错误(Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.) ...
分类:
移动开发 时间:
2020-02-04 14:14:29
阅读次数:
274
from django.utils.module_loading import import_string def import_string(dotted_path): """ Import a dotted module path and return the attribute/class d ...
分类:
其他好文 时间:
2020-02-02 16:09:24
阅读次数:
108
导入tkinter import Tkinter from Tinter import * import tkinter from tinter import * 实例化Tk类 root=tkinter.Tk() 窗口标题 root.title('My Window') 设定窗口的大小(长 * 宽) ...
分类:
其他好文 时间:
2020-02-02 15:55:01
阅读次数:
80
\_\_getattribute\_\_ 一、\_\_getattr\_\_ 不存在的属性访问,触发__getattr__ 10 执行的是我 二、\_\_getattribute\_\_ 查找属性无论是否存在,都会执行 不管是否存在,我都会执行 不管是否存在,我都会执行 三、\_\_getattr\ ...
分类:
其他好文 时间:
2020-02-02 14:15:10
阅读次数:
58