This file contains hidden or 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
#!/usr/bin/python | |
# -*- coding:utf-8 -*- | |
import mechanize | |
def check_new_posts(username, password): | |
b = mechanize.Browser() | |
b._factory.encoding = "utf8" | |
b.set_handle_robots(False) | |
b.addheaders = [('User-Agent','Mozilla/4.0(compatible; MSIE 6.0; Windows 98;)')] |
This file contains hidden or 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
// Origin discussion: http://forums.adobe.com/message/4613051 | |
#target "estoolkit" | |
rasterizeFolder(); | |
/********************************************************************************************/ | |
function rasterizeFolder() { | |
//Get the source and destination folders. | |
//If either window is cancelled, end the script. |
This file contains hidden or 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
if (!Array.prototype.indexOf) { | |
Array.prototype.indexOf = function (item, i) { | |
i || (i = 0); | |
var length = this.length; | |
if (i < 0) i = length + i; | |
for (; i < length; i++) | |
if (this[i] === item) return i; | |
return -1; | |
} | |
} |
This file contains hidden or 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
/*************************************************** | |
* 确保单元格文本对齐方式为左对齐,通过以下方式选择需要对其的单元格: | |
* 1. 仅选中首行数据列(也即非表头及文字列)单元格运行,将自动对齐直至末行的所有数据 | |
* 2. 直接选中所有单元格(如2行2列至100行5列)运行,对齐所有选中的单元格 | |
* 可自动判别对齐小数点或分号(不含空格) | |
***************************************************/ | |
(function() { | |
var oColumns = app.selection[0].columns, | |
i = 0, | |
rCount = app.selection[0].rows.length, |
This file contains hidden or 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
#include 'doEx.jsx' | |
#targetengine 'MetroUIDemo' | |
(function () { | |
var metro = { | |
'Magenta': [255, 0, 151], | |
'Purple': [162, 0, 255], | |
'Teal': [0, 171, 169], | |
'Lime': [140, 191, 38], | |
'Brown': [160, 80, 0], | |
'Pink': [230, 113, 184], |
This file contains hidden or 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
# -*- coding: utf-8 -*- | |
# http://stackoverflow.com/questions/3710263/how-do-i-create-a-csv-file-from-database-in-python | |
# 如遇编码错误,可使用python3 | |
import csv | |
import sqlite3 | |
conn = sqlite3.connect("pcd.db") | |
cursor = conn.cursor() | |
cursor.execute("select * from domain_data;") |
This file contains hidden or 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
menuCommandString,UI MenuString zh_CN | |
------------------------------------- | |
new,新建 | |
newFromTemplate,从模板新建 | |
open,打开 | |
saveacopy,存储副本 | |
Adobe AI Save For Web,存储为 Web 所用格式(W) | |
Adobe AI Save Selected Slices,存储选中的切片 | |
revert,恢复 | |
AI Place,置入(L) |
This file contains hidden or 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
''' | |
此脚本为 python3 版。 | |
''' | |
import re | |
def selectFile(): | |
'''利用win32ui选择文件对话框 | |
如果未安装此模块则弹窗输入路径''' | |
This file contains hidden or 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
function hex2Ascii (str) { | |
return str.replace(/../g, function (a) {return String.fromCharCode('0x' + a)}) | |
} | |
function ascii2Hex (hex) { | |
return hex.replace(/./g, function (a) {return a.charCodeAt(0).toString(16)}) | |
} | |
function GBK2Hex (str/*中文字符*/) { | |
var f = File('hex.txt'), hex; |