Skip to content

Instantly share code, notes, and snippets.

View tanchao90's full-sized avatar
🏀

TanChao tanchao90

🏀
View GitHub Profile
# -*- coding:utf-8 -*-
print 'Hello World'
@tanchao90
tanchao90 / expand-filesystem-by-add-new-partition-on-Ubuntu
Created December 25, 2016 11:20
扩展VirtualBox中Ubuntu虚拟机的分区大小,通过增加新分区的方式
## 参考:
[VirtualBox如何扩展虚拟机Ubuntu的硬盘容量?](http://blog.csdn.net/ouyang_peng/article/details/53261599)
下面是按上述教程的实践总结;
## 我的环境:
- Windows 10
- VirtualBox 5.1.6 r110634 (Qt5.5.1)
- Ubuntu 16.04 LTS
## 通过增加新分区扩展
@tanchao90
tanchao90 / gc.get_count().py
Created February 9, 2017 08:31
python gc回收测试,gc.get_count() 函数实验
import gc
gc.set_threshold(500, 10, 10)
class ClassA(object):
pass
print gc.get_count()
gc.collect()
@tanchao90
tanchao90 / ThreadPool.py
Created February 13, 2017 01:59
Python 实现的一个线程池
# -*- encoding:utf-8 -*-
###### 线程池 - by 汪蔚 soulww@163.com
import threading
import traceback
def default_fail_handle():
pass
@tanchao90
tanchao90 / regular_example.py
Created March 14, 2017 06:30
Python Regular Example
# -*- coding:utf-8 -*-
import re
def testReChinese():
"""测试匹配中文信息"""
source = "狗b狗B骂你祖宗"
temp = source.decode('utf8')
print "同时匹配中文英文"
@tanchao90
tanchao90 / my.cnf
Last active September 15, 2017 04:23
mysql-5.7.19 default config file
# The MySQL database server configuration file.
#
# You can copy this to one of:
# - "/etc/mysql/my.cnf" to set global options,
# - "~/.my.cnf" to set user-specific options.
#
# One can use all long options that the program supports.
# Run program with --help to get a list of available options and with
# --print-defaults to see which it would actually understand and use.
#
@tanchao90
tanchao90 / mybatis-ongl-NoSuchPropertyException
Created April 23, 2019 06:26
MyBatis org.apache.ibatis.ognl.NoSuchPropertyException
MyBatis Version: 3.3.0
Exception Info:
exception: org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.builder.BuilderException: Error evaluating expression 'record.version != null'. Cause: org.apache.ibatis.ognl.NoSuchPropertyException: com.test.domain.domain.Po.version, dubbo version: 2.10.0.3, current host: 127.0.0.1 org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.builder.BuilderException: Error evaluating expression 'record.version != null'. Cause: org.apache.ibatis.ognl.NoSuchPropertyException: com.test.domain.domain.Po.version
at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:79)
at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:447)
at com.sun.proxy.$Proxy100.update(Unknown Source)
at org.mybatis.spring.SqlSessionTemplate.update(SqlSessionTemplate.java:295)
at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:55)
at org.apac
@tanchao90
tanchao90 / my.cnf
Last active November 30, 2019 21:36
mysql-5.7.19 customized config file
# The MySQL database server configuration file.
#
# You can copy this to one of:
# - "/etc/mysql/my.cnf" to set global options,
# - "~/.my.cnf" to set user-specific options.
#
# One can use all long options that the program supports.
# Run program with --help to get a list of available options and with
# --print-defaults to see which it would actually understand and use.
#