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
set theApp to "App Name" | |
(* | |
tell application theApp to get the bounds of the window 1 | |
*) | |
tell application theApp | |
set bounds of front window to {753, 275, 1807, 1165} | |
end tell |
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
(* | |
From http://www.labnol.org/software/resize-mac-windows-to-specific-size/28345/ | |
This Apple script will resize any program window to an exact size and the | |
window is then moved to the center of your screen. Specify the program name, | |
height and width below and run the script. | |
Written by Amit Agarwal on December 10, 2013 | |
*) |
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 java.util.concurrent.Callable; | |
import java.util.concurrent.ExecutionException; | |
import java.util.concurrent.ExecutorService; | |
import java.util.concurrent.Executors; | |
import java.util.concurrent.Future; | |
//通过Callable接口模拟一个龟兔赛跑的例子 | |
public class CallableTest { | |
public static void main(String[] args) { | |
ExecutorService es = Executors.newFixedThreadPool(2); //开启两个线程 |
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
var rows = document.getElementById('grid-table').rows | |
for (var i = 0; i < rows.length; i++) { | |
var row = rows[i]; | |
var tds = row.children; | |
for (var j = 0; j < tds.length; j++) { | |
var td = tds[j]; | |
//console.log(td.getAttribute("title")) | |
if (td.getAttribute("title") == '0'){ | |
td.click(); |
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
-server | |
-Xms2048m | |
-Xmx2048m | |
-XX:NewSize=512m | |
-XX:MaxNewSize=512m | |
-XX:PermSize=512m | |
-XX:MaxPermSize=512m | |
-XX:+UseParNewGC | |
-XX:ParallelGCThreads=4 | |
-XX:MaxTenuringThreshold=1 |
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
sudo find /private/var/folders/ -name com.apple.dock.iconcache -exec rm {} \; |
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, sys, time, subprocess | |
from datetime import datetime | |
from tkinter import messagebox | |
if len(sys.argv) == 1: | |
msg = input('请输入提示要做的事情\n') | |
t = input('请输入到期时间, 格式:时:分:秒\n') | |
hms = t.split(':') if ':' in t else t.split(':') | |
h, m, s = hms |
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 | |
set folder=xxx-folder | |
set source=yyy-folder | |
for /f "tokens=*" %%A in (C:\Users\Administrator\Desktop\zzz.txt) do ( | |
rem echo %source%%%A %folder%\%%A | |
rem copy %source%%%A %folder%\%%A | |
echo f | xcopy %source%%%A %folder%\%%A /s /e /y | |
) |
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 sun.reflect.generics.reflectiveObjects.TypeVariableImpl; | |
import java.lang.reflect.Field; | |
import java.lang.reflect.Modifier; | |
import java.lang.reflect.ParameterizedType; | |
import java.lang.reflect.Type; | |
import java.util.Arrays; | |
import java.util.List; | |
import java.util.Map; |
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 java.io.IOException; | |
import java.io.ObjectInputStream; | |
import java.util.concurrent.TimeUnit; | |
import java.util.concurrent.locks.AbstractQueuedSynchronizer; | |
import java.util.concurrent.locks.Condition; | |
import java.util.concurrent.locks.Lock; | |
/** | |
* Here is a non-reentrant mutual exclusion lock class that uses the value zero to represent the unlocked state, |