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
#穷举狂人TD1.5积分代码2 | |
#依山居 11:45 2015/11/1 | |
#经测试在11平台测试生成的积分代码在11平台也可用。 | |
import string | |
az=string.ascii_lowercase | |
for p in range(15,0,-1): | |
for rd in range(10,-1,-1): | |
jf=az[p%10]+az[rd]+az[9+rd]*3 | |
print("游戏名长度","%2d"%p,"积分代码:",jf) |
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
#狂人TD1.5 krtd1.5积分代码破解1 | |
#作者依山居 5:08 2015/11/1 | |
#经过分析狂人TD的程序后,按原程序中的步骤穷举所有999的积分代码 | |
import string | |
az=string.ascii_lowercase | |
score=999 | |
for ln in range(15,0,-1): | |
for rd in range(0,11): |
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
// 参考资料 http://jass.wikia.com/wiki/Function_StringCase | |
StringCase( string source, boolean upper ) | |
returns string | |
//Converts all characters in a string to all uppercase or lowercase. true = uppercase false = lowercase | |
//把字符串所有全部转换为大写或者小写,第一个参数为源字符串,第二参数为ture则全转为大写,false则转为小写。 |
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
**windows 下安装python lxml库** | |
依山居 21:00 2015/11/2 链接: http://my.oschina.net/ysj/blog/525030 | |
似乎是电脑上没有安装VS的话,pip install lxml 最后一步会报: error: Unable to find vcvarsall.bat | |
不想装VS懒得折腾直接下载二进包安装。 | |
http://www.lfd.uci.edu/~gohlke/pythonlibs/#lxml |
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 | |
title 批量删除特定文件名 | |
::by 依山居 9:28 2015/11/3 | |
:: 现在欲删除文本名称中“值”字前面为3位数的文本(比如上列中的 wj3苏州-114值-记录期),也即倒数第9个字符是"_"的文本。这样的代码如何写? | |
:: http://www.bathome.net/thread-37925-1-1.html | |
:: everything 的命令行工具es 搜索文件很好用。 | |
:: http://www.bathome.net/thread-37744-1-1.html |
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
#狂人TD4.3积分代码破解2优化 | |
#依山居 10:05 2015/11/3 | |
#本程序用于生成魔兽争霸3地图狂人TD4.3 所有999的积分代码 | |
#吐槽,用不了多久我自己看不懂这些代码的。 | |
import string | |
az=string.ascii_lowercase | |
jf='' | |
#这里的range本质为游戏名长度取值1-15 |
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
# python版实现文本左右对齐排版 | |
# 题目来源: http://www.bathome.net/thread-1246-1-1.html | |
# 依山居 7:17 2015/11/4 | |
# str.format 字符串格式化参考: | |
# http://www.crifan.com/python_string_format_fill_with_chars_and_set_alignment/ | |
# just()字符串对齐 参考: | |
# http://blog.csdn.net/u012515223/article/details/20463231 | |
''' |
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
#python版一行内容分行输出 | |
#依山居 18:14 2015/11/4 | |
#题目来源 http://www.bathome.net/thread-1454-1-1.html | |
a="aA1一bB2二cC3三dD4四eE5五fF6六gG7七hH8八iI9九" | |
""" | |
分行输出为: | |
abcdefghi | |
ABCDEFGHI | |
123456789 |
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
#python求txt文件中所有Z后面数字的最小值和最大值 | |
#依山居 19:04 2015/11/7 | |
#题目来源: http://www.bathome.net/thread-38027-1-1.html | |
zl=[] | |
with open("a.txt") as f: | |
for l in f: | |
txtline=l.rsplit() | |
for ll in txtline: | |
#print(ll) |
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 | |
::依山居 5:51 2015/11/8 | |
::fr将每行首五位数的该行删除 | |
::http://www.bathome.net/thread-38036-1-1.html | |
::fr是一个完整支持正则表达式查找替换的命令行工具, | |
::作者网站:http://baiy.cn/utils/fr/index.htm | |
::去掉-stdout参数则直接修改原文件 |
OlderNewer