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
.UploadFiles { | |
border: 1px solid grey; | |
box-shadow: 0px 0px 6px 6px #ccc; | |
border-radius: 16px; | |
width: 600px; | |
position: absolute; | |
left: calc(50% - 300px); | |
top: 200px; | |
} |
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 sx; | |
import java.io.IOException; | |
import java.nio.file.Files; | |
import java.nio.file.Path; | |
import java.nio.file.Paths; | |
import java.util.Arrays; | |
import java.util.Comparator; | |
import java.util.Map; | |
import java.util.stream.Collectors; |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>com.ykrkn.screencapture</string> | |
<key>UserName</key> | |
<string>sx</string> | |
<key>WorkingDirectory</key> | |
<string>/Users/yurykrikun/Documents/screencapture</string> |
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
class API { | |
constructor(url){ | |
this.BASE_URL = url; | |
} | |
async post(url, data) { | |
const response = await fetch(this.BASE_URL + url, { | |
method: "POST", | |
headers: {'Content-Type': 'application/json'}, | |
body: JSON.stringify(data) |
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
\copy (select '<location title="'||locations.title||'" lat="'||latitude||'" lng="'||longitude||'" />' from locations left join spatial on spatial.loc_id=locations.loc_id where latitude is not null and wkt is null union all select '<location title="'||locations.title||'" lat="'||latitude||'" lng="'||longitude||'" wkt="'||spatial.wkt||'" />' from locations left join spatial on spatial.loc_id=locations.loc_id where latitude is not null and wkt is not null) TO 'spatial.xml' |
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.*; | |
import java.util.concurrent.CompletableFuture; | |
import java.util.concurrent.CompletionException; | |
import java.util.concurrent.CountDownLatch; | |
import java.util.stream.Collectors; | |
import java.util.stream.Stream; | |
import static java.util.concurrent.CompletableFuture.completedFuture; | |
/** |
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.*; | |
import java.util.concurrent.CompletableFuture; | |
import java.util.concurrent.CountDownLatch; | |
import java.util.concurrent.ExecutorService; | |
import java.util.concurrent.Executors; | |
import java.util.concurrent.atomic.AtomicInteger; | |
import java.util.concurrent.atomic.AtomicLong; | |
import java.util.stream.Stream; | |
import static java.util.concurrent.CompletableFuture.supplyAsync; |
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.CompletableFuture; | |
import java.util.concurrent.atomic.AtomicLong; | |
import java.util.function.Consumer; | |
import java.util.function.Supplier; | |
/** | |
* Created by sx on 26.02.16. | |
*/ | |
public class Main implements Supplier<Double>, Consumer, Runnable{ |
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
ab -s 120 -k -p post.json -T application/json -c 1 -n 1000 -g out.dat http://localhost:8080/api/datas/ZZZ | |
gnuplot plot.p | |
plot.p | |
# Output to a jpeg file | |
set terminal jpeg size 1280,720 |
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.ExecutorService; | |
import java.util.concurrent.Executors; | |
import java.util.concurrent.atomic.AtomicLong; | |
/** | |
* InfiniteStream.java | |
* https://gist.github.com/bassemZohdy/e5fdd56de44cea3cd8ff | |
* Created by sx on 26.02.16. | |
*/ | |
public class Main { |
NewerOlder