Loading

上一页 1 ··· 21 22 23 24 25 26 27 28 29 ··· 31 下一页
摘要: $.ajax({ url: '带载入页面', type: 'post/get', contentType: 'application/json;charset=utf-8', data: '{key:value}',//请求数据 success: function (data) { //载入成功时回 阅读全文
posted @ 2020-03-16 21:17 Rzk 阅读(115) 评论(0) 推荐(0) 编辑
摘要: <script type="text/javascript"> function judgeLandCode(){ console.log(1) $.ajax({ url: "checkusername.do",//获取地址栏 //传递给后台的参数 : 输入框框的参数 data: {"usercod 阅读全文
posted @ 2020-03-16 20:39 Rzk 阅读(197) 评论(0) 推荐(0) 编辑
摘要: <script type="text/javascript"> function checkUsername(username){ //发送ajax 请求 ,验证用户名是否可用 //发送ajax 请求的代码包括4步 这四步骤是固定的 //比传统请求要麻烦一些 //AJAX发送请求全靠浏览器内置的这个 阅读全文
posted @ 2020-03-16 00:36 Rzk 阅读(204) 评论(0) 推荐(0) 编辑
摘要: .设置主键自增长 sql语法如下: CREATE TABLE 表名( id int identity(1,1) primary key not null, sname char(8) NULL, /*姓名字段*/ sex char(2) NULL, /*性别字段*/ age int NULL, /* 阅读全文
posted @ 2020-03-15 01:31 Rzk 阅读(307) 评论(0) 推荐(0) 编辑
摘要: pom.xml 配置<properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding></properties> 阅读全文
posted @ 2020-03-15 00:37 Rzk 阅读(257) 评论(0) 推荐(0) 编辑
摘要: 🔒Lock是显式锁(手动开启和关闭锁,别忘记关闭锁)synchronized是隐式锁,处理作用域自动释放 🔒Lock只有代码块锁,synchronized有代码块锁和方法锁 🔒使用Lock锁,JVM将花费较少的时间来调度线程,性能更好。并且具有更好的扩展性(提供更多的子类) 🔒优先使用顺序: 阅读全文
posted @ 2020-03-13 19:27 Rzk 阅读(115) 评论(0) 推荐(0) 编辑
摘要: //測試lock鎖 public class TestLock { public static void main(String[] args) { TestLock2 testLock2 = new TestLock2(); new Thread(testLock2).start(); new T 阅读全文
posted @ 2020-03-13 19:21 Rzk 阅读(116) 评论(0) 推荐(0) 编辑
摘要: //死锁:多个线程相互抱着对方需要的资源,然后形成僵局 public class DeadLock { public static void main(String[] args) { Makeup makeup1 = new Makeup(0,"小老虎"); Makeup makeup2 = ne 阅读全文
posted @ 2020-03-13 18:23 Rzk 阅读(159) 评论(0) 推荐(0) 编辑
摘要: 1.下面这一例子会造成线程不安全 会取出负数,会同时一起抢 要是剩最后一张票的时候 会同时取出一,这样就造成线程不安全 //不安全买票 public class UnsafeBuyTicket { public static void main(String[] args) { BuyTicket 阅读全文
posted @ 2020-03-13 16:43 Rzk 阅读(155) 评论(0) 推荐(0) 编辑
摘要: public class UnsafeBuyTicket { public static void main(String[] args) { BuyTicket station = new BuyTicket(); new Thread(station,"苦逼的我").start(); new T 阅读全文
posted @ 2020-03-13 16:39 Rzk 阅读(140) 评论(0) 推荐(0) 编辑
上一页 1 ··· 21 22 23 24 25 26 27 28 29 ··· 31 下一页