input

Spring MVC上传和下载

爷,独闯天下 提交于 2020-03-17 09:03:01
某厂面试归来,发现自己落伍了!>>> 一、简介: Spring MVC属于SpringFrameWork的后续产品,已经融合在Spring Web Flow里面。Spring 框架提供了构建 Web 应用程序的全功能 MVC 模块。使用 Spring 可插入的 MVC 架构,从而在使用Spring进行WEB开发时,可以选择使用Spring的SpringMVC框架或集成其他MVC开发框架,如Struts1,Struts2等 优点:它是一个典型的教科书式的mvc构架,而不像struts等都是变种或者不是完全基于mvc系统的框架,对于初学者或者想了解mvc的人来说我觉得 spring是最好的,它的实现就是教科书!第二它和tapestry一样是一个纯正的servlet系统,这也是它和tapestry相比 struts所没有的优势。而且框架本身有代码,看起来容易理解。 二、SpringMVC几个核心类: 控制器核心类:org.springframework.web.servlet.DispatcherServlet - 配置web.xml 加载配置文件核心类:org.springframework.web.context.ContextLoaderListener – spring的配置文件 处理url影射核心类:org.springframework.web.servlet.handler

设置easyui input默认值

旧巷老猫 提交于 2020-03-17 07:42:18
/*设置input 焦点*/ $(function () { //集体调用 $(".formTextBoxes input").each(function () { $(this).setDefauleValue(); }); //单个调用 $(".textkey").setDefauleValue(); }) //设置input,textarea默认值 .之前写法$.fn.seDefauleValue = function(){ $.fn.setDefauleValue = function () { var defauleValue = $(this).val(); $(this).val(defauleValue).css("color", "#999"); return this.each(function () { $(this).focus(function () { if ($(this).val() == defauleValue) { $(this).val("").css("color", "#000"); //输入值的颜色 } }).blur(function () { if ($(this).val() == "") { $(this).val(defauleValue).css("color", "#999"); //默认值的颜色 } }); }); }

A+B for Input-Output Practice (VII)

微笑、不失礼 提交于 2020-03-17 06:28:28
Problem DescriptionYour task is to Calculate a + b. Input The input will consist of a series of pairs of integers a and b, separated by a space, one pair of integers per line. Output For each pair of input integers a and b you should output the sum of a and b, and followed by a blank line. Sample Input 1 5 10 20 Sample Output 6 30 代码; # include <stdio.h> int main ( ) { int a , b ; while ( scanf ( "%d %d" , & a , & b ) != EOF ) { printf ( "%d\n" , a + b ) ; printf ( "\n" ) ; } return 0 ; } 来源: CSDN 作者: 兔子和乌龟 链接: https://blog.csdn.net/Guolle/article/details/104821653

Python学习---Python数据类型1206

冷暖自知 提交于 2020-03-17 06:08:13
1.1. 字符串格式化 字符格式化输出 占位符 %s s = string %d d = digit 整数 %f f = float 浮点数,约等于小数 #version: python3.2.5 #author: ‘FTL1012‘ #time: 2017/12/6 17:20 #name=hhh 这个是错误的,因为没有用单引号/双引号括起来,当做一个变量赋值给 name = input("please input the name:") age = input("please input the age:") tel = input("please input the tel:") if age.isdigit(): if tel.isdigit(): age = int(age) #age必须是数字 tel = int(tel) #tel必须是数字 else: exit ("something wrong...") msg = ''' ---------info of %s --------- name: %s age : %d tel : %d ---------end of %s --------- ''' %(name, name, age, tel, name) print(msg) 1.2. Python的 数据 类型 来源: https://www.cnblogs

What is the best way to read input from keyboard using SDL?

邮差的信 提交于 2020-03-17 05:57:07
问题 I'm running an update() method n times per second to "update" the keyboard input from the user so I can read it later in the logic part of the program. So I find two ways of implementing this in the SDL Docs and I'm not sure which one should I use. 1; Loop for all events using SDL_PollEvent searching for key down/up events and saving the key states in a map so I can check for each key state in the logic of the program. Note: Alternatively, I can also use SDL_PeepEvents instead of SDL

Python基础-1

非 Y 不嫁゛ 提交于 2020-03-17 05:50:22
一、注释的写法 二、if else的用法 score = int(input(">>:")) if score > 90: print("A") elif score > 80: print("B") elif score > 70: print("C") elif score > 50: print("D") else: print("不及格") **缩进级别必须保持一致 三、运算符 2**10:表示2的十次方 5/2:结果为2.5 5//2:结果为2 + 、-、 *、 /、 //取整、% 四、while循环 continue break n=1 while n<=100: if n%2==0: print(n) n +=1 if n==10: break 打印99乘法表: 1*1=1 1*2=2 2*2=4 1*3=3 2*3=6 3*3=9 1*4=4 2*4=8 3*4=12 4*4=16 1*5=5 2*5=10 3*5=15 4*5=20 5*5=25 1*6=6 2*6=12 3*6=18 4*6=24 5*6=30 6*6=36 1*7=7 2*7=14 3*7=21 4*7=28 5*7=35 6*7=42 7*7=49 1*8=8 2*8=16 3*8=24 4*8=32 5*8=40 6*8=48 7*8=56 8*8=64 1*9=9 2*9=18 3*9

python 基础之格式化输出

烈酒焚心 提交于 2020-03-17 05:46:42
字符占位符%s #_cvvh:"chenxi" #date: 2019/6/24 print ('chhjg') # 格式化输出 name = input("Name:") age = input("age:") job = input("job:") salary = input("salary:") mag = ''' -------------info of ---- Name: %s Age: %s Job: %s Salary: %s -----------------end--------- ''' % (name, age , job ,salary ) 一一对应注意顺序 print(mag)   测试 D:\python\python.exe D:/untitled/dir/ghg.py chhjg Name:chenxi age:34 job:765 salary:678 -------------info of ---- Name: chenxi Age: 34 Job: 765 Salary: 678 -----------------end--------- Process finished with exit code 0   字符串转换数字 #_cvvh:"chenxi" #date: 2019/6/24 print ('chhjg') # 格式化输出

JQuery常用操作

旧城冷巷雨未停 提交于 2020-03-17 04:45:47
//遍历option和添加、移除option function changeShipMethod(shipping){   var len = $("select[@name=ISHIPTYPE] option").length    if(shipping.value != "CA"){      $("select[@name=ISHIPTYPE] option").each(function(){         if($(this).val() == 111){          $(this).remove();         }    });    } else   {     $("<option value='111'>UPS Ground</option>").appendTo($("select[@name=ISHIPTYPE]"));   } } //取得下拉选单的选取值 $(#testSelect option:selected').text(); 或$("#testSelect").find('option:selected').text(); 或$("#testSelect").val(); ////////////////////////////////////////////////////////////////// 记性不好的可以收藏下: 1

Web前端JQuery面试题(一)

孤街浪徒 提交于 2020-03-17 04:44:04
Web前端JQuery面试题(一) 一:选择器 基本选择器 什么是 #id , element , .class , * , selector1, selector2, selectorN ? 答: 根据给定的 id 匹配一个元素,用于搜索,通过 id 的属性给定值。 案例:查找 id 为 da3 的元素 html代码: <div id="da1"></div> <div id="da2"></div> <div id="da3"></div> jquery代码: $("#da3"); 结果: [ <div id="da3"></div> ] html代码: <div id="da:q"></div> jquery代码: $("#da\\:q"); 根据给定的元素名匹配所有元素 案例,查找 div 元素: html代码: <div> da1 </div> <div> da2 </div> <p>da3</p> jquery代码: $("div"); 结果: [ <div> da1 </div> , <div> da2 </div> ] 根据给定的类匹配元素 html代码: <div class="dashu"> dashu </div> <div class="da"> da </div> jquery代码: $(".da"); 结果: [ <div class="da"> da

Web前端基础——jQuery(二)

一个人想着一个人 提交于 2020-03-17 04:41:50
一、jQuery 中的常用函数 1) $.map(Array,fn); 对数组中的每个元素,都用fn进行处理,fn将处理后的结果返回,最后得到一个数组 //因为这些操作,没有与dom元素相关的,所以可以不用写在 $(function(){...}); 中 var arr=[1,3,5,7,9]; arr=$.map(arr,function(item){ return item*10; }); alert(arr); [10,30,50,70,90]; //上例是将数组中的每个元素乘10,然后返回新的数组 2) $.each(Array,fn); 对数组中的每个元素,调用fn这个函数进行处理,但是,没有返回值,比上例更常用 //例一 var nameList=["哈利波特","伏地魔","小恶魔","本田","尼桑"]; $.each(nameList,function(key,value){ //对于上面的数组来说,key就是索引,value就是元素值 alert(key+":"+value); }); //例二 var nameList={"aa":"哈利波特","bb":"伏地魔","cc":"小恶魔","dd":"本田","ee":"尼桑"}; $.each(nameList,function(key,value){ alert(key+":"+value); }); /