Skip to content

Instantly share code, notes, and snippets.

View kommradHomer's full-sized avatar

kommrad homer kommradHomer

View GitHub Profile
package main
import "fmt"
import "strconv"
func main() {
var cities = [4][4]int {
{0, 2, 5, 7} , // a b c d
{2, 0, 8, 3} , // b
@kommradHomer
kommradHomer / pom.xml
Last active September 18, 2019 12:15
additions necessary for using the plugin in your own project
...
<dependencies>
<!-- https://mvnrepository.com/artifact/com.sun.xml.rpc/jaxrpc-impl -->
<dependency>
<groupId>com.sun.xml.rpc</groupId>
<artifactId>jaxrpc-impl</artifactId>
<version>1.1.5</version>
</dependency>
</dependencies>
@kommradHomer
kommradHomer / example.json
Last active August 26, 2019 11:56
example json
{
"name":"Muhammad Li",
"message":"Hello World",
"age":45,
"weight_kg":82,
"height_cm":188
}
"aa",<SCORE OF aa>
"bb",<SCORE OF bb>
"cc",<SCORE OF cc>
"dd",<SCORE OF dd>
@kommradHomer
kommradHomer / sorted-set-fifo.java
Last active May 31, 2019 23:08
sorted set FIFO
...
Jedis j;
j.connect();
/*
*using NX parameter on ZADD command -> ADD IF NOT EXISTS -> UNIQUE
*using Timestamp as score -> always increasing -> always MAX score -> Like RPUSH on a list