input

jQuery验证控件jquery.validate.js+jquery.validate.unobtrusive.js的用法

巧了我就是萌 提交于 2020-03-24 05:22:42
3 月,跳不动了?>>> jquery.validate.unobtrusive.js的用法: jquery.validate.unobtrusive.js使用上很简洁,只要对Tag下几个属性即可以使用! 引用JavaScript<script src="http://code.jquery.com/jquery-1.6.2.min.js"></script> <script src="http://ajax.aspnetcdn.com/ajax/jquery.validate/1.8.1/jquery.validate.min.js"></script> <script src="http://ajax.aspnetcdn.com/ajax/mvc/3.0/jquery.validate.unobtrusive.min.js"></script> 最新的CDN JS引用可以查看,http://www.asp.net/ajaxLibrary/CDN.ashx <label for="tId">Domain Account:<label data-valmsg-for="tId"></label></label> <input type="text" id="tId" runat="server" data-val="true" data-val-required="请输入帐号"/>

单向链表实例:终端交互简易通讯录

狂风中的少年 提交于 2020-03-24 01:21:05
1 #include <stdio.h> 2 #include <stdlib.h> 3 #include <string.h> 4 5 6 typedef struct Contacts_infomation{ 7 char name[13]; 8 char work_unit[61]; 9 char phone_number[12]; 10 char E_mail[61]; 11 struct Contacts_infomation *next; 12 }con_info; 13 14 15 con_info * Creat_node(void) 16 { 17 con_info *new; 18 19 new = (con_info *)malloc(sizeof(con_info)); 20 if(!new){ 21 printf("Malloc Error!\n"); 22 exit(-1); 23 } 24 new->next = NULL; 25 26 return new; 27 } 28 29 int insert_node(con_info ** phead) 30 { 31 con_info *new, *cur; 32 33 cur = *phead; 34 new = Creat_node(); 35 if(!new){ 36 return -1; 37

python下几个简单实例代码

寵の児 提交于 2020-03-23 18:28:46
注意:我用的python2.7,大家如果用Python3.0以上的版本,请记得在print()函数哦!如果因为版本问题评论的,不做回复哦!!! 1.题目:有1、2、3、4个数字,能组成多少个互不相同且无重复数字的三位数?都是多少? 程序分析:可填在百位、十位、个位的数字都是1、2、3、4。组成所有的排列后再去 掉不满足条件的排列。 程序源代码: ​ - - coding: UTF-8 - - for i in range(1,5): for j in range(1,5): for k in range(1,5): if (i != j) and (i != k) and (j != k): print i,j,k 1 2 3 4 5 6 2.题目:企业发放的奖金根据利润提成。利润(I)低于或等于10万元时,奖金可提10%;利润高于10万元,低于20万元时,低于10万元的部分按10%提成,高于10万元的部分,可可提成7.5%;20万到40万之间时,高于20万元的部分,可提成5%;40万到60万之间时高于40万元的部分,可提成3%;60万到100万之间时,高于60万元的部分,可提成1.5%,高于100万元时,超过100万元的部分按1%提成,从键盘输入当月利润I,求应发放奖金总数? 程序分析:请利用数轴来分界,定位。注意定义时需把奖金定义成长整型。 方法一:

纯css写单选框和复选框的样式和功能

£可爱£侵袭症+ 提交于 2020-03-23 18:25:27
只用纯css写的单选框和复选框的样式和功能该怎么写?看这里,复制下面的代码运行一遍就知道了,快试试吧! 效果截图: <!doctype html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/> <title>移动单选按钮</title> <link rel="stylesheet" type="text/css" href="http://dn.yun******.com/css/reset-min.css"> <style> /*纯CSS写法*/ .checkbox-group input{display:none;opacity:0;} .checkbox-group input[type=checkbox]+label, .checkbox-group input[type=radio]+label { line-height: 1; position: relative; display: -webkit-box; display: -webkit-flex; display: -ms-flexbox;

12异常

旧时模样 提交于 2020-03-23 16:51:24
1 """ 2 异常 3 """ 4 """ 5 1.异常基类:Exception 6 2.常见的异常有:NameError 名称 SyntaxError 语法错误 IndexError 索引 7 KeyError 键 FileNotFoundError 文件未找到 AttributeError 对象属性异常 8 TypeError 类型 9 """ 10 # print(a) # NameError: name 'a' is not defined 11 # print(2/0) # ZeroDivisionError: division by zero 12 # for i in range(5) # SyntaxError: invalid syntax 13 # list_1 = [1,2,3] 14 # print(list_1[3]) # IndexError: list index out of range 15 # dict_1 = {1:"a",2:"b"} 16 # print(dict_1[3]) # KeyError: 3 17 # fire = open("1111.txt","r") # FileNotFoundError: [Errno 2] No such file or directory: '1111.txt' 18 # class Car

Django之ORM

你离开我真会死。 提交于 2020-03-23 13:14:11
一:文件配置 【1】 (1-1)产生背景:   (1)在传统的web访问需要加上路由后缀 通过后缀进行相应的视图函数处理   (2)如果有大量的后缀就需要在路由表里添加大量的后缀 显然不合理 (1-2)解决办法:   (1)将文件进行配置暴露给外界能够访问服务器静态文件夹下面所有的资源 例如: STATIC_URL = '/static/' # 接口前缀# 暴露给外部的能够访问服务器内部所有资源STATICFILES_DIRS = [ os.path.join(BASE_DIR,'static')] PS:外部会依次查找文件路径下所有资源 如果访问到则结束 访问失败则返回404 【2】动态解析接口前缀 (1)作用:接口前缀变化 属于该接口下的所有配置文件都会自动变化接口前缀 例如: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> <script src="https://cdn.bootcss.com/jquery/3.4.1/jquery.min.js"></script> {# 动态解析配置 #} {% load static %} <link rel="stylesheet" href="{% static 'bootstrap/css/bootstrap

How to read two characters from an input string?

这一生的挚爱 提交于 2020-03-23 12:06:27
问题 I want my program to read one character from an input of random string, but when there is a space in the string, I want it to read the next two characters. For example, if I type H He , I want it to return the value for H , then detect a space then return He . How do I do this? This code is a small part in school assignment (calculating the molecular mass of random compounds). string=input('enter:') pos=0 start=None for a in string: if a == 'H': print(string[start:1]) elif a == ' ': pos=int

Razor模板引擎

安稳与你 提交于 2020-03-23 07:39:55
1  Razor模板引擎的使用:     (1)常用三种模板引擎:       Razor 解释执行,微软内置、有提示,与JavaScript存在兼容性;       Nvelocity / Vtemplate 运行时动态执行,(比Razor更好)。     (2)Razor引擎的使用:        <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <title></title> </head> <body> <h1>胡安定</h1> <div> <h2>@Model.Name</h2> <h2>@Model.Age</h2> </div> <div> <ul> @for (var i = 0; i < 10;i++ ) { <li>@i</li> } </ul> </div> </body> </html> razor1.cshtml using RazorEngine; using System; using System.Collections.Generic; using System.IO; using System.Linq; using

Bootstrap框架和inconfont、font-awesome使用

吃可爱长大的小学妹 提交于 2020-03-23 06:17:58
Bootstrap框架和inconfont、font-awesome使用 iconfont的使用: https://www.cnblogs.com/clschao/articles/10387580.html Bootstrap介绍   Bootstrap是Twitter开源的基于HTML、CSS、JavaScript的前端框架。   它是为实现快速开发Web应用程序而设计的一套前端工具包。   它支持响应式布局,并且在V3版本之后坚持移动设备优先。 就是复制黏贴一把梭,html\css\js代码的封装组合 为什么要使用Bootstrap?   在Bootstrap出现之前:   命名:重复、复杂、无意义(想个名字费劲)   样式:重复、冗余、不规范、不和谐   页面:错乱、不规范、不和谐   在使用Bootstrap之后: 各种命名都统一并且规范化。 页面风格统一,画面和谐。 Bootstrap下载   官方地址:https://getbootstrap.com   中文地址:http://www.bootcss.com/   我们使用V3版本的Bootstrap,我们下载的是用于生产环境的Bootstrap。 Bootstrap环境搭建   目录结构: bootstrap-3.3.7-dist/ ├── css // CSS文件 │ ├── bootstrap-theme

java正则表达式

我们两清 提交于 2020-03-22 17:11:56
这是一个检测时间格式是否正确的方法,例如2020-03-22 1 public static boolean isValidateRunningDate(String input) { 2 //正则匹配 3 Matcher matcher = null; 4 boolean result = false; 5 String regex = "[0-9]{4}-[0-9]{2}-[0-9]{2}"; 6 if (input != null && !input.isEmpty()) { 7 Pattern pattern = Pattern.compile(regex); 8 matcher = pattern.matcher(input); 9 } 10 if (matcher != null) { 11 result = matcher.matches(); 12 } 13 return result; 14 } 来源: https://www.cnblogs.com/fxw-learning/p/12546803.html