###方法1:同步代码块 synchronized ( 对象){ // 需要被同步的代码; } class Window extends Thread{ // private int ticket=100;//这样会有300张票 private static int ticket=100;//只有1 ...
分类:
编程语言 时间:
2021-04-19 14:44:35
阅读次数:
0
public class MyInfo { public string Name { get; set; } public double Diff { get; set; } public string File { get; set; } } static void Main(string[] a ...
前端:"/xx?user="+JSON.stringify(rows) es5 后端 @RequestParam String user user = new String(user.getBytes("8859_1"),"utf8"); // 防止中文乱码 List<Map<String,Obje ...
分类:
其他好文 时间:
2021-04-19 14:33:34
阅读次数:
0
匿名函数 ::操作符 A static method (ClassName::methName) An instance method of a particular object (instanceRef::methName) A super method of a particular obje ...
分类:
编程语言 时间:
2021-04-16 12:22:24
阅读次数:
0
win10打开fifa13闪退怎么处理?下面一起来解决方法。 1、在控制面板内找到 程序并进入。 2、再找到打开或关闭windows功能。 3、然后在弹出的窗口中的列表里找到 媒体功能标签打开 并将 其中的 media player的钩去掉。 4、重启结束后,再重新把这个钩钩打上、然后就可进入游戏了 ...
问题 let badge = [{id: 323, badge: 10},{id: 323, badge: 10},{id: 311, badge: 1},{id: 311, badge: 1},{id: 311, badge: 1},{id: 311, badge: 1},{id: 352, ba ...
分类:
编程语言 时间:
2021-04-16 11:50:48
阅读次数:
0
效果 代码 1 <Window x:Class="WpfApp12.MainWindow" 2 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 3 xmlns:x="http://schemas.microsoft. ...
1:对synchronized的理解: 1.1 :假设t1和t2并发,开始执行时肯定有先有后 1.2:假设t1先执行,看到synchronized这个时候自动找“后面的共享对象”的对象锁,找到后并占有锁,然后执行后面同步代码块,在程序执行过程一直都是占有这把锁,直到同步代码块结束,锁才释放。 1.3 ...
分类:
其他好文 时间:
2021-04-15 12:38:55
阅读次数:
0
属性名表达式 用途:允许表达式作为属性名、方法名,表达式需要写在方括号里 说明: 注意:属性名表达式时一个对象时,会自动将对象转为字符串 例子: let obj = { [propKey]: true, ['a' + 'bc']: 123 }; let obj = { ['h' + 'ello']( ...
分类:
其他好文 时间:
2021-04-15 12:18:28
阅读次数:
0
一.排序: 1.slice切片( ::-1) 2.reversed( ) 3.sorted( ,reverse=True)) 字母数字不可同时存在。默认为False升序,True降序。 4.filter(function,iterable) 二.常用 1.sum() 2.max() 3.min() ...
分类:
编程语言 时间:
2021-04-15 11:57:56
阅读次数:
0