insert.sql
\set id random(1, 100000 * :scale)
\set uuid gen_random_uuid()
insert into my_table (id, uuid)
values| cargo-features = ["rename-dependency"] | |
| [package] | |
| name = "actix-async" | |
| version = "0.1.0" | |
| [dependencies] | |
| actix-web = "0.7.4" | |
| futures-preview = { version = "0.3.0-alpha.3", features = ["tokio-compat"] } | |
| futures1 = { version = "0.1", package = "futures" } |
| # | |
| # Himawari-8 Downloader | |
| # | |
| # | |
| # | |
| # This script will scrape the latest image from the Himawari-8 satellite, recombining the tiled image, | |
| # converting it to a JPG which is saved in My Pictures\Himawari\ and then set as the desktop background. | |
| # | |
| # http://himawari8.nict.go.jp/himawari8-image.htm | |
| # |
Edit 11 years later: I did not write this. Not sure the original source, but thanks to the original author.
While working on a utility project today, I stumbled upon wanting to embed an executable inside another executable. Sounds fun doesn’t it? And what is even more fun is to be able to launch the embedded exe!
Basically, here’s how it works. You embed Foo.exe inside Bar.exe. And by embed I mean, add Foo.exe as a resource in Bar.exe and then, from Bar.exe’s code, you can launch Foo.exe using CreateProcess().
So before answering the "Why?" lets answer the "How?"
| """ | |
| This script was written to illustrate libraries that could be used to improve upon | |
| the efficiency of a script posted to /r/learnprogramming: | |
| Original script: | |
| https://github.com/aesptux/download-reddit-saved-images/blob/master/script.py | |
| Reddit post | |
| http://www.reddit.com/r/learnprogramming/comments/14dojd | |
| /pythoncode_review_script_to_download_saved_images/ | |
| """ | |
| from urllib2 import Request, urlopen |
| Large Object Motions: | |
| ( | |
| ) | |
| { | |
| } | |
| [[ | |
| [] | |
| ][ | |
| ]] | |
| [m |
L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns
Compress 1K bytes with Zippy ............. 3,000 ns = 3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns = 20 µs
SSD random read ........................ 150,000 ns = 150 µs
Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs