07 2021 档案

摘要:认识事务 事务必须要满足四个条件: 原子性:即事务的执行要么全不做,要么全做,一旦出现错误,就会回滚到最初的状态; 一致性:事务执行要和数据库的规则一样,这样不会破坏数据库的完整性; 隔离性:数据库可以允许多个事务并行,而隔离性可以保护数据不会因为事务的交叉执行而被破坏; 持久性:事务处理结束后,对 阅读全文
posted @ 2021-07-30 10:11 月长生 阅读(38) 评论(0) 推荐(0) 编辑
摘要:Alter的使用: 列的增加和删减 alter table users add user_name VARCHAR(100);#添加一列在末尾 SELECT * from users; alter table users drop user_name;#删除一列 SELECT * from user 阅读全文
posted @ 2021-07-30 10:11 月长生 阅读(25) 评论(0) 推荐(0) 编辑
摘要:创建表格 先判断users表是否存在,然后设置user_id为无符号(UNSIGNED)自动增长(AUTO_INCREMENT)的整型 并通过PRIMARY KEY设置user_id为主键 ENGINE是指存储引擎为INNODB CHARSET是指编码格式为utf-8 CREATE TABLE IF 阅读全文
posted @ 2021-07-29 17:23 月长生 阅读(56) 评论(0) 推荐(0) 编辑
摘要:多表连接 左连接:返回第一张表的所有数据项然后拼接第二张表(左表全有,右表对应左表才有) 右连接:返回第二张表的所有数据项然后拼接第一张表(右表全有,左表对应右表才有) 内连接:返回两张表数据相等的数据项(左表和右表都有的数据) SELECT * from classes LEFT JOIN use 阅读全文
posted @ 2021-07-29 15:55 月长生 阅读(59) 评论(0) 推荐(0) 编辑
摘要:using System; using System.Collections; namespace 预处理指令 { class Program { static void Main(string[] args) { GetArrayList(); GetStack(); Console.ReadKe 阅读全文
posted @ 2021-07-28 16:36 月长生 阅读(21) 评论(0) 推荐(0) 编辑
摘要:using System; namespace AbstractAndVirtual { class Program { static void Main(string[] args) { GetSharp getSharp= new GetSharp(); GetNewSharp getNewSh 阅读全文
posted @ 2021-07-28 16:06 月长生 阅读(13) 评论(0) 推荐(0) 编辑
摘要:多线程 using System; using System.Threading; namespace ThreadTest { class Program { static void Main(string[] args) { Thread th = Thread.CurrentThread; t 阅读全文
posted @ 2021-07-28 14:39 月长生 阅读(15) 评论(0) 推荐(0) 编辑
摘要:事件和委托的关系相当于属性和字段的关系,事件可以说是特殊的委托,下面是事件的简单练习1 using System; namespace EventTest { class Program { static void Main(string[] args) { Test t = new Test(); 阅读全文
posted @ 2021-07-28 10:19 月长生 阅读(26) 评论(0) 推荐(0) 编辑
摘要:委托顾名思义,即使将方法交给它,然后它去执行,定义的时候要注意委托返回值要和方法的返回值一致,参数类型和个数也要一致,现在直接上代码 using System; delegate void getNum(int a,int b);//定义委托返回值为空,两个参数类型int namespace del 阅读全文
posted @ 2021-07-28 09:53 月长生 阅读(31) 评论(0) 推荐(0) 编辑
摘要:using System; using System.Collections.Generic; namespace 泛型的基本使用练习 { class Program { static void Main(string[] args) { //泛型练习1 var a = "aa";var b = " 阅读全文
posted @ 2021-07-27 18:03 月长生 阅读(14) 评论(0) 推荐(0) 编辑
摘要:using System; using System.Reflection; namespace _1_反射 { class Program { static void Main(string[] args) { Type t = typeof(Ss); foreach (object item i 阅读全文
posted @ 2021-07-27 17:50 月长生 阅读(19) 评论(0) 推荐(0) 编辑
摘要:VUE组件简单实例 <!DOCTYPE html> <html> <head> <title> </title> </head> <body> <div id="app"> <div> <bt></bt> <bt></bt> </div> </div> <script src="https://cd 阅读全文
posted @ 2021-07-12 17:06 月长生 阅读(32) 评论(0) 推荐(0) 编辑
摘要:Vue增删改查简易实例 <!DOCTYPE html> <html> <head> <title> </title> <style type="text/css"> .ulStyle{ list-style-type: none; margin: 10px 30px; } .divStyle{ wi 阅读全文
posted @ 2021-07-12 15:20 月长生 阅读(77) 评论(0) 推荐(0) 编辑
摘要:挂载: beforeCreate created beforeMount mounted:el挂载到实例上时运行 更新: beforeUpdate updated 销毁: beforeDestory destoryed 各自出现的时机如下列代码所示:在log中查看 <!DOCTYPE html> < 阅读全文
posted @ 2021-07-12 10:21 月长生 阅读(40) 评论(0) 推荐(0) 编辑
摘要:过滤器实例:转换首字母大写 <!DOCTYPE html> <html> <head> <title> </title> </head> <body> <div id="app"> <input type="text" name="" v-model="uname"> <div>{{uname | 阅读全文
posted @ 2021-07-12 09:47 月长生 阅读(37) 评论(0) 推荐(0) 编辑
摘要:计算属性是为了让页面显示更加简洁,基于data数据进行处理的方法,以下为实例 <!DOCTYPE html> <html> <head> <title> </title> </head> <body> <div id="app"> <input type="text" name="" v-model 阅读全文
posted @ 2021-07-11 21:30 月长生 阅读(32) 评论(0) 推荐(0) 编辑
摘要:获取焦点简单实例,用Vue.directive(ps:指令)定义,命名不要是关键字,用v-加自定义指令名称调用,而内部用钩子函数inserted来实现 <!DOCTYPE html> <html> <head> <title> </title> </head> <body> <div id="app 阅读全文
posted @ 2021-07-11 21:02 月长生 阅读(70) 评论(0) 推荐(0) 编辑
摘要:Vue的v-model.number顾名思义,即是将绑定的参数中的字符串强制转换为int类型 而v-model.trim是将参数的前后空格删除 v-model.lazy:v-model的绑定是实时响应,lazy则是在输入完成后,焦点离开v-model绑定的控件后响应,相当于change事件 以下是实 阅读全文
posted @ 2021-07-09 09:51 月长生 阅读(85) 评论(0) 推荐(0) 编辑
摘要:<!DOCTYPE html> <html> <head> <title> </title> <style type="text/css"> div{ margin: 30px; } .mulitStyle{ height:auto; } </style> </head> <body> <div i 阅读全文
posted @ 2021-07-08 14:48 月长生 阅读(31) 评论(0) 推荐(0) 编辑
摘要:<!DOCTYPE html> <html> <head> <title> </title> </head> <body> <div id="app"> <ol> <li v-for="(item,key,index) in obj"><input type="button" :value="key 阅读全文
posted @ 2021-07-07 23:02 月长生 阅读(86) 评论(0) 推荐(0) 编辑
摘要:<!DOCTYPE html> <html> <head> <title> </title> </head> <body> <div id="app"> <ol> <li v-for="item in fruit">{{item}}</li> <li v-for="(item,index) in m 阅读全文
posted @ 2021-07-07 21:49 月长生 阅读(23) 评论(0) 推荐(0) 编辑
摘要:if实例 <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script> </head> <body> <div id= 阅读全文
posted @ 2021-07-07 17:01 月长生 阅读(15) 评论(0) 推荐(0) 编辑
摘要:Vue的动态样式实例1 <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <style type="text/css"> .active{ border: 2px solid darkred; width: 100px; height: 100 阅读全文
posted @ 2021-07-07 15:03 月长生 阅读(95) 评论(0) 推荐(0) 编辑
摘要:v-cloak:使用的display:none; 直到编译完成后开始显示; v-text和插值表达式,非必要响应式用v-text会比较好,使用插值表达式要加上v-cloak; v-html:不推荐使用,动态渲染网页容易导致xss攻击; 本网站内部使用,不应该在来自使用外部数据或者跨域使用; v-pr 阅读全文
posted @ 2021-07-05 10:34 月长生 阅读(41) 评论(0) 推荐(0) 编辑
摘要:<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <script src="https://unpkg.com/vue/dist/vue.js"></script> <script src="https://unpkg.com/axios/di 阅读全文
posted @ 2021-07-02 09:59 月长生 阅读(34) 评论(0) 推荐(0) 编辑
摘要:<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <script src="https://unpkg.com/vue/dist/vue.js"></script> <script src="https://unpkg.com/axios/di 阅读全文
posted @ 2021-07-02 09:27 月长生 阅读(117) 评论(0) 推荐(0) 编辑
摘要:<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <script src="https://unpkg.com/vue/dist/vue.js"></script> </head> <body> <div id="app"> <input ty 阅读全文
posted @ 2021-07-01 11:18 月长生 阅读(81) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示