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
SELECT software_id | |
FROM sortware | |
WHERE author_id = 1 | |
AND software_id NOT IN ( | |
SELECT company_software.software_id | |
FROM company_software | |
WHERE company_software.author_id = 1 | |
AND company_software.country IN ('china', 'korea', 'england') | |
) | |
LIMIT 0, 100 |
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
tell application "System Events" | |
set visibleProcesses to application processes whose visible is true | |
repeat with aProcess in visibleProcesses | |
set visibleWindows to windows of aProcess | |
repeat with aWindow in visibleWindows | |
if exists attribute "AXMinimized" of aWindow then | |
if value of attribute "AXMinimized" of aWindow is true then | |
set value of attribute "AXMinimized" of aWindow to false | |
end if | |
end if |
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
package main | |
import ( | |
"fmt" | |
"reflect" | |
"unsafe" | |
) | |
func main() { | |
s := make([]int, 3, 5) |
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
package main | |
import ( | |
"fmt" | |
"reflect" | |
"unsafe" | |
) | |
func main() { | |
s := []int{0, 0, 0, 0, 0} |
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
package main | |
// go test -test.bench '.*' | |
// goos: darwin | |
// goarch: arm64 | |
// BenchmarkRandRead4KB-8 356580 3335 ns/op | |
// BenchmarkCryptoRead4KB-8 158610 7540 ns/op | |
import ( |
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
db.Exec(`INSERT INTO t(data) VALUES(?)`, `binary`) |
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
SELECT userid,pointid FROM point WHERE pointid>${上一批结果中最大的pointid} AND now()>= expired ORDER BY pointid ASC LIMIT 100 |
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
sql = 'SELECT * FROM f65 WHERE 1=1' | |
param = list() | |
if code != '': | |
sql = sql + ' AND code LIKE ?' | |
list.append(code) | |
if engine != '': | |
sql = sql + ' AND engine LIKE ?' | |
list.append(engine) |
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
package main | |
import ( | |
"context" | |
"fmt" | |
"os" | |
"os/signal" | |
"syscall" | |
"time" | |
) |
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
while true ; do nc -l -p 1500 -c 'echo -e "HTTP/1.1 200 OK\n\n $(date)"'; done | |
# Ref: constantin-berhard @ https://stackoverflow.com/a/19139134 |
NewerOlder