上一页 1 ··· 18 19 20 21 22 23 24 25 26 ··· 29 下一页
摘要: 1.支持中文 阅读全文
posted @ 2018-04-15 18:42 fight139 阅读(129) 评论(0) 推荐(0)
摘要: 1.字符串常用操作方法 1.str.find('xx',startIndex,endIndex) 没找到,返回-1 str.rfind() 2.str.index('xxx') 没找到,抛出异常 str.rindex() 3.str.count('xxx') 计算出现几次。 4.str.replac 阅读全文
posted @ 2018-04-15 17:44 fight139 阅读(199) 评论(0) 推荐(0)
摘要: 不可变类型 1.数字类型 a=100 2.字符串类型 a='hello' 不可修改字符 =》a[0]='A' ,a只是指向字符串'hello' 3.元组 可变类型 1.列表 a=[12,23,4,5] a.append(123) 2.字典 可变类型可以做为key 实质都是不可变类型 阅读全文
posted @ 2018-04-15 16:35 fight139 阅读(162) 评论(0) 推荐(0)
摘要: 1.所有的变量都是引用类型,值池 a=100 b=a b=200 阅读全文
posted @ 2018-04-15 16:22 fight139 阅读(155) 评论(0) 推荐(0)
摘要: 1.定义 def fun(): pass fun() 2.参数 默认值: 不定长参数: 拆包 A =(1,23,4) B= {'age':100, 'name':'join'} fun(10,20, *A, **B) -->等价于 fun(10,20,1,23,4, age=100, name='j 阅读全文
posted @ 2018-04-15 15:27 fight139 阅读(256) 评论(0) 推荐(0)
摘要: 1.定义 num=(3,5,6,7,98) a,b,c=num (python3) 2.特点 不可修改,不发生变化 3.支持下标,截取 注意:如果只有一个元素时:(12,) 如果为空:() 阅读全文
posted @ 2018-04-15 14:47 fight139 阅读(143) 评论(0) 推荐(0)
摘要: 1.字典的定义 d = {key:value,key2:value2} d["key"] 2.字典的增删改查 增加:如果key不存在,就添加,否则就是修改 删除:del dic[key] :如果不存在key,则抛异常 查询: dic[key],如果不存在,抛异常 dic.get("age"),如果不 阅读全文
posted @ 2018-04-15 14:38 fight139 阅读(165) 评论(0) 推荐(0)
摘要: 1.列表定义 arr=["laowang",123,"zhangsan"] 2.增删该查 arr.append("lisi") arr.insert(0,"lisi") 插入到指定位置 合并: 删除: arr.pop(); #删除最后一个 栈 arr.remove("laowang") #根据内容删 阅读全文
posted @ 2018-04-15 14:03 fight139 阅读(120) 评论(0) 推荐(0)
摘要: 1.存储 num=100; 一般占用4个字节 str="100"; 依赖字符串的长度 2.类型转换 int('100') 3. 下标和切片(substring) 正向递增,逆向递减 可以逆向取值 print(s2[3:]) # 从第四个开始到最后一个 ->s2[3:len(s2)] print(s2 阅读全文
posted @ 2018-04-15 13:38 fight139 阅读(119) 评论(0) 推荐(0)
摘要: 1. 运算符 比较运算符 ==, !=,>, <, >=, <= +=, -=, *= , /= , %= , **= , //= 逻辑运算符 or , and 类型转换:int(input('请输入')) print('hello ',end='') python3 2. 条件 age = 20 阅读全文
posted @ 2018-04-15 12:46 fight139 阅读(139) 评论(0) 推荐(0)
摘要: ln -s 源文件 newfile -软连接 ln 源文件 newfile 硬链接 源文件删除之后仍然可以使用 阅读全文
posted @ 2018-04-15 11:31 fight139 阅读(272) 评论(0) 推荐(0)
摘要: 一、方法中可以出现的参数类 1.HttpServletRequest 2.HttpServletResponse 3.HttpSession 4.Model 二、返回接收json数据 1. 接收,返回JSON数据 依赖jar包: 2.表单提交 阅读全文
posted @ 2018-04-13 17:55 fight139 阅读(228) 评论(0) 推荐(0)
摘要: @RunWith(SpringJUnit4ClassRunner.class)@ContextConfiguration(locations = "classpath:applicationContext.xml") public void test1(){ } 阅读全文
posted @ 2018-04-13 17:12 fight139 阅读(132) 评论(0) 推荐(0)
摘要: 1.使用document.cookie保存信息 document.cookie = "Test=cooo";alert(document.cookie); 注意:必须运行在在线网站上 2.jQuery方式 引入jQuery.cookie.js文件 设置:$.cookie("key","value") 阅读全文
posted @ 2018-04-13 14:32 fight139 阅读(221) 评论(0) 推荐(0)
摘要: Ctrl+shift+ space:列出参数 阅读全文
posted @ 2018-04-12 09:39 fight139 阅读(122) 评论(0) 推荐(0)
上一页 1 ··· 18 19 20 21 22 23 24 25 26 ··· 29 下一页