This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
SETLOCAL ENABLEDELAYEDEXPANSION | |
FOR /F "tokens=* USEBACKQ" %%F IN (`dir /b /ad`) DO ( | |
echo "C:\Program Files\WinRAR\Rar.exe" u -r -hpPASSWORD -m5 -- %%F %%F | |
) | |
ENDLOCAL | |
echo. | |
pause |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[push] | |
default = simple | |
[alias] | |
aa = add --all | |
b = branch --verbose --all | |
bnm = branch --no-merged | |
ch = checkout | |
chd = checkout develop | |
chm = checkout master | |
chr = checkout release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MYSQL_HOST=10.17.1.153 | |
git checkout develop | |
git pull --verbose --all | |
SQL_DIFF=`git diff --name-only develop..release/latest | grep \.sql$` | |
if [[ $(echo $SQL_DIFF | grep -c ".sql") -ne 0 ]]; then | |
echo "Executing:" | |
echo $SQL_DIFF | |
echo | |
echo $SQL_DIFF | while read a; do mysql -h$MYSQL_HOST -uroot -p1 $(echo $a | cut -d'_' -f 1) < "$(echo $a)" ; done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
def main(): | |
try: | |
sql_file = sys.argv[1] | |
with open(sql_file, 'r') as f: | |
lines = f.readlines() | |
filtered_lines = filter(lambda l: | |
not l.startswith('/*') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Scanner: | |
def __init__(self): | |
self.__line_split = None | |
self.__pointer = None | |
def next_int(self): | |
try: | |
next_str = self._next_str() | |
ret = int(next_str) | |
return ret |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os.path | |
import subprocess as sp | |
import sys | |
import time | |
def main(): | |
new_notepad = 'C:\\Program Files\\Sublime Text 3\\sublime_text.exe' | |
args = sys.argv[2:] # ignore the first arg (this script itself) and the second arg (original notepad.exe) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- content_for :header do | |
%h1{style: "background: #c40834; color: #FFF; font: normal 20px Helvetica, Arial, sans-serif; margin: 0; padding: 5px 10px; line-height: 32px; font-size: 16px;"} | |
GitLab (build failed) | |
%h3 | |
Project: | |
= link_to namespace_project_url(@project.namespace, @project) do | |
= @project.name | |
%p |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TRANSACTION(事务隔离级别) | |
1. ISOLATION_DEFAULT:这是一个PlatfromTransactionManager默认的隔离级别,使用数据库默认的事务隔离级别。 | |
每种数据库的默认隔离级别是不同的,例如SQL Server、Oracle默认Read Commited,MySQL默认Repeatable Read。 | |
另外四个与JDBC的隔离级别相对应,不同的隔离级别采用不同的锁类型来实现,在四种隔离级别中,Serializable的 | |
隔离级别最高,Read Uncommited的隔离级别最低。 | |
2. ISOLATION_READ_UNCOMMITTED:读未提交数据,这是事务最低的隔离级别,在并发的事务中,它充许一个事务可以 | |
读到另一个事务未提交的更新数据。(会出现脏读,不可重复读和幻读) | |
3. ISOLATION_READ_COMMITTED:读已提交数据,保证在并发的事务中,一个事务修改的数据提交后才能被另外一个事 |