技术标签: java vue json JavaWeb ajax
ajax(异步,js,xml)
局部更新
异步请求
XMLHttpRequest
$.get(url, 请求参数, function(data){}, "响应类型")
$.post(url, 请求参数, function(data){}, "响应类型")
$.ajax({
url:请求地址
data: 请求参数
type: 请求类型 get,post...
dataType: 响应类型
success:function(data) {
},
error:function() {
}
});
json 转换
vue view
基本组成
let vm = new Vue({
el:"选择器:视图是那个标签",
data:{
数据名1: 值1,
数据名2: 值2,
数据名3: 值3,
...
},
methods:{
方法名1(参数列表) {
this.数据名1
},
方法名2(参数列表) {
}
...
}
});
vm.数据名1;
vm.方法名1(参数)
{ { 数据名1 }} 只适合绑定标签的文本内容
v-bind:属性名="data中数据名"
:属性名="data中数据名"
v-if="条件"
v-show="条件"
v-for="临时变量名 in 数组或对象"
v-on:事件名="方法名(参数)"
@事件名="方法名(参数)"
对于 img src 属性,a href 属性,使用单向绑定就可以了(v-bind)
对于表单的属性,建议使用 v-model 双向绑定
InnoDB - 行锁,表锁
MyISAM - 表锁
表锁(锁的是整个表)
行锁(锁住表中的行)
需要用事务控制,事务结束时,才会释放锁
select * from student where sid=16 for update; --锁住student表中sid=16的这一行,其它事务就不能再向这一行上加锁了(for update, update, insert, delete)
select * from student where sid=16 lock in share mode; --锁住student表中sid=16的这一行, 其它事务不能加(for update, update, insert, delete)等互斥锁了,但可以加 share mode 这种共享锁
互斥是防止其它人该,也防止其它人加读锁 lock in share mode
共享是防止其它人该,但允许其他人加读锁 lock in share mode
共享锁与排他锁
丢失更新问题演示
事务1
select sid,name,age into @sid,@name,@age from student where sid=16;
select @sid;
select @name;
select @age;
update student set name=‘张三’, [email protected] where [email protected];
事务2
select sid,name,age into @sid,@name,@age from student where sid=16;
select @sid;
select @name;
select @age;
update student set [email protected], age=20 where [email protected];
用乐观锁解决丢失更新,更新时要加上版本列条件,并且让版本列在原来基础上加1
事务1
select sid,name,age,version into @sid,@name,@age,@version from student where sid=16; – 1
select @sid;
select @name;
select @age;
select @version;
update student set name=‘张小三’, [email protected], ver[email protected]+1 where [email protected] and [email protected]; – version=1
事务2
select sid,name,age,version into @sid,@name,@age,@version from student where sid=16; – 1
select @sid;
select @name;
select @age;
select @version;
update student set [email protected], age=30, [email protected]+1 where [email protected] and [email protected];
安装好,启动 ./xampp start,正常是这样的Starting XAMPP for Linux 7.2.5-0…XAMPP: Starting Apache…ok.XAMPP: Starting MySQL…already running.XAMPP: Starting ProFTPD…already running.但我的有报错:[[email protected] lampp]# ./xampp startStarting XAMPP for Linux 7.2.5-0…XAMPP:
一.禅道安装及运行禅道是一款开源项目管理软件。它集产品管理、项目管理、质量管理、文档管理、组织管理和事务管理于一体,是一款专业的研发项目管理软件,完整覆盖了研发项目管理的核心流程。禅道将产品、项目、测试这三者的概念明确分开,产品人员、开发团队、测试人员,这三者分立,互相配合,又互相制约,通过需求、任务、bug来进行交相互动,最终通过项目拿到合格的产品。 1.禅道下载:Linux中可...
os环境:CentOS release 5.10oracle版本:
Freebsd6.1+Apache2.2.3+Mysql5.0.26+PHP5.1.6+phpMyAdmin2.9.0.2手工整合指南经过一晚上的操作,终于成功整合.写一篇文章和大家交流一下经验,什么问题可以联系我. 我使用的操作系统是FreeBSD最新版本6.1,如果是别的操作系统安装方法有少许不一样,请作适当处理.说明:本文档系alone原创,经过辛勤实验,努力编辑而成,转载无妨,
完整报错:Traceback (most recent call last):File “train.py”, line 73, in feature = model(seq)File “/home/liang/miniconda3/envs/pytorch/lib/python3.7/site-packages/torch/nn/modules/module.py”, line 541,...
临时设置export PATH=/opt/android-studio/bin:$PATH当前用户的全局设置vim ~/.profile,添加行: export PATH=/opt/android-studio/bin:$PATH 使生效 source .profile所有用户的全局设置vim /etc/profile 在里面加入: export PATH=/opt/android-stu
官方API文档:transpose( a, # 输入张量 perm=None, # 转置规则,后面详细介绍 name='transpose')Args:a: A Tensor.perm: A permutation of the dimensions of a.name: A name for the operation (optional).Returns:A transposed Tensor
1、IAR。由于keil不支持STM8,所以改用IAR。IAR For STM8 3.10或以上版本才支持STM8S001,可以直接在官网免费下载,如下图所示。破解工具用IAR Offline License Generator v1.4 by unis。如下图所示。注意:v1.3是无法破解IAR For STM8 3.10及以上版本。v1.4的破解工具可以在CSDN上找到...
一、概述1、介绍2、编写步骤二、获取数据库连接要素1、Driver接口实现类要素2、URL要素3、用户名和密码代码实现连接示例:方式一:方式二:三、PreparedStatement实现CRUD操作...
又有学生问我:程序员真的是吃青春饭的吗?我是不是做到三十岁就该考虑转型了? 我告诉他们: 这是中国的记者们用统计数字造下的一个弥天大谎,当我们看到微软集团内的许多白发程序员在兢兢业业地工作的时候,我们又用"观念"来说明中国的程序员吃青春饭的原因。实际上,不仅美国的微软,甲骨文,Adobe,暴雪,在中国的金山,寰宇,腾讯,盛大,都有或者将要有年龄很大的程序员,关键是他们做的东西和...
源码API:http://api.jquery.com/jQuery.Callbacks/jQuery.Callbacks()是在版本1.7中新加入的。它是一个多用途的回调函数列表对象,提供了一种强大的方法来管理回调函数队列。那么jQuery.Callbacks使用场景在哪里?在很多时候需要控制一系列的函数顺序执行。那么一般就需要一个队列函数来...