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 com.datastax.driver.core.*; | |
import java.util.Arrays; | |
import java.util.UUID; | |
// create keyspace test with replication = {'class': 'SimpleStrategy', 'replication_factor': 1}; | |
// create table t2 (id uuid primary key, value list<text>); | |
public class CassandraTest { | |
public static void main(String[] args) |
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
#!/bin/bash | |
for i in `ls -d */`; do | |
echo "updating $i" | |
cd $i | |
if [ -d ".git" ]; then | |
git pull origin | |
fi | |
cd - | |
done |
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
gource -s .06 -1280x720 --auto-skip-seconds .1 --multi-sampling --stop-at-end --key --highlight-users --hide mouse,progress,files,filenames,dirnames --file-idle-time 0 --max-files 0 --background-colour 000000 --font-size 22 --title "Lucene/Solr" --output-ppm-stream - --output-framerate 30 | avconv -y -r 30 -f image2pipe -vcodec ppm -i - -b 65536K movie.mp4 | |
&& ffmpeg -i movie.mp4 -b:v 3048780 -vcodec libx264 -crf 24 output.mp4 |
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
public class DeadlockTest | |
{ | |
public static void main(String[] args) | |
{ | |
final Foo a = new Foo(); | |
final Foo b = new Foo(); | |
new Thread(new 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
Full thread dump Java HotSpot(TM) 64-Bit Server VM (25.51-b03 mixed mode): | |
"Attach Listener" #13 daemon prio=9 os_prio=31 tid=0x00007f943c05e000 nid=0x3507 waiting on condition [0x0000000000000000] | |
java.lang.Thread.State: RUNNABLE | |
"DestroyJavaVM" #12 prio=5 os_prio=31 tid=0x00007f943a817000 nid=0x1003 waiting on condition [0x0000000000000000] | |
java.lang.Thread.State: RUNNABLE | |
"Thread-1" #11 prio=5 os_prio=31 tid=0x00007f943a816000 nid=0x5003 waiting for monitor entry [0x00007000012cc000] | |
java.lang.Thread.State: BLOCKED (on object monitor) |
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.HashSet; | |
import java.util.Set; | |
import java.util.concurrent.*; | |
public class MapComputeTest | |
{ | |
public static void main(String[] args) | |
{ |
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
#!/usr/bin/python | |
def ham(x,y): | |
cont = 0 | |
if len(x) == len(y): | |
for i in zip(x,y): | |
if i[0] != i[1]: | |
cont += 1 | |
else: | |
cont = -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
19 | |
paralelogramos | |
contextualizar | |
companheirismo | |
gradativamente | |
especificidade | |
idiossincrasia | |
disponibilizar | |
corporativismo | |
locupletamento |
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 org.apache.zookeeper.common.PathUtils; | |
import java.util.Arrays; | |
import java.util.Iterator; | |
import java.util.List; | |
import java.util.NoSuchElementException; | |
public final class PathIterator implements Iterator<String>, Iterable<String> { | |
public static final String SEP = "/"; |
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 com.company; | |
import java.math.BigInteger; | |
import java.security.MessageDigest; | |
import java.security.NoSuchAlgorithmException; | |
import java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.List; | |
import java.util.Objects; | |
import java.util.stream.Collectors; |