Easter79 Easter79
3年前
synchronized底层原理
前言一、synchronized的特性1.1原子性1.2可见性1.3有序性1.4可重入性二、synchronized的用法三、synchronized锁的实现3.1同步方法3.2同步代码块四、
浪人 浪人
4年前
利用“哨兵”“实现双链表
下面的代码用一个”哨兵“实现双链表,感觉很简洁,中间也有点绕,暂时实现,供学习之用staticNodelist_handle{&list_handle,&list_handle,};booladdNode(Nodenode){if(nodeNULL){returnf
Stella981 Stella981
3年前
MyBatis where标签语句
当 where 中的条件使用的 if 标签较多时,这样的组合可能会导致错误。当 java 代码按如下方法调用时:@Testpublicvoidselect_test_where(){UserusernewUser();user.setUsername(null);
Stella981 Stella981
3年前
Python 连接mysql数据库
python连接数据库的代码:importMySQLdb该模块需要安装,目前(20161217)只支持到python3.4,我用的是python2.7deffetch\_batch\_data():  LinkDB  globalk  connMySQLdb.connect(    
Stella981 Stella981
3年前
Git 在同一台机器上配置多个Git帐号
在同一台机器上配置多个Git帐号By:授客QQ:1033553122实践环境win10Git2.21.064bit.exeTortoiseGit2.8.0.064bit.msi代码托管Gitee.com1.  打开GitBash
Stella981 Stella981
3年前
C++11新特性之final override标识符
final:  final修饰符可用于修饰类,放在类名后面,被final修饰符修饰的类不能被继承。示例代码://正确的示范include<iostreamclassA{public:voidshow_a_info(){s
Stella981 Stella981
3年前
Go的defer和方法修饰符的一个小坑
先看代码:!(https://static.oschina.net/uploads/space/2018/0308/114424_6HKf_97951.png)!(https://static.oschina.net/uploads/space/2018/0308/113236_C504_97951.png)https://play.g
Stella981 Stella981
3年前
Electron开发实战之记账软件20——主进程调试
代码仓库:https://github.com/hilanmiao/LanMiaoDesktop(https://www.oschina.net/action/GoToLink?urlhttps%3A%2F%2Fgithub.com%2Fhilanmiao%2FLanMiaoDesktop"https://github.com/hilanmia
Stella981 Stella981
3年前
Electron开发实战之记账软件18——备份、恢复、导入、导出
代码仓库:https://github.com/hilanmiao/LanMiaoDesktop(https://www.oschina.net/action/GoToLink?urlhttps%3A%2F%2Fgithub.com%2Fhilanmiao%2FLanMiaoDesktop"https://github.com/hilanmia
Stella981 Stella981
3年前
BSD的sh和csh的重定向操作符全解
预先的知识一:    noclobber禁止覆盖变量,设定$noclobber预设变量改变输出重定向特性  1.变量设定语法setnoclobber2.  取消变量设定语法unsetnoclobber复制代码  这个nocl