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
// compile with: | |
// gcc -std=c99 -g -Wall -o intermediate -lncurses intermediate.c | |
#include <ncurses.h> | |
#include <unistd.h> | |
#include <time.h> | |
#include <stdlib.h> | |
#define WIDTH 20 | |
#define HEIGHT 20 |
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 ( | |
. "code.google.com/p/goncurses" | |
"fmt" | |
"log" | |
"math" | |
"math/rand" | |
"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
package main | |
import ( | |
"fmt" | |
"bufio" | |
"os" | |
"regexp" | |
"strconv" | |
"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
%#!/usr/bin/env escript | |
-mode(compile). | |
read_stdin() -> | |
case io:get_line("") of | |
eof -> | |
io:format("Error: Recieved eof, expected line~n"); | |
Res -> | |
read_stdin(list_to_integer(string:strip(Res, right, $\n)), []) | |
end. |
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
-module(easy). | |
-export([test/0]). | |
-import(lists, [reverse/1, filter/2, keyfind/3]). | |
-define(MONTHS, [{"Jan", "01"}, {"Feb", "02"}, {"Mar", "03"}, | |
{"Apr", "04"}, {"May", "05"}, {"Jun", "06"}, | |
{"Jul", "07"}, {"Aug", "08"}, {"Sep", "09"}, | |
{"Oct", "10"}, {"Nov", "11"}, {"Dec", "12"}]). |
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
ruby { | |
code => "event['epoch'] = (event['@timestamp'].to_f * 1000).floor" | |
} |
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
Program counter: 0x00007f8a6b7b0988 (gen:do_call/4 + 416) | |
CP: 0x0000000000000000 (invalid) | |
arity = 0 | |
0x00007f8a27097ee0 Return addr 0x00007f8a66b07438 (gen_server:call/3 + 128) | |
y(0) #Ref<0.0.1.13302> | |
y(1) infinity | |
y(2) connect | |
y(3) '$gen_call' | |
y(4) <0.5333.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
import org.apache.hadoop.fs.{FileSystem,Path} | |
import org.apache.hadoop.conf.Configuration | |
val fs = FileSystem.get(new Configuration()) | |
case class TestRecord(a: String, part: Int) | |
val df = Seq(TestRecord("one", 1), TestRecord("two", 2), TestRecord("three", 2)).toDF | |
df.write.partitionBy("part").parquet("/tmp/test_data") | |
sqlContext.sql("create external table foo (a string) partitioned by (part int) stored as parquet location '/tmp/test_data'" ) | |
sqlContext.sql("alter table foo add partition (part=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
package net.pyralis; | |
import org.apache.logging.log4j.LogManager; | |
import org.apache.logging.log4j.Logger; | |
public class TestLogging { | |
public static void main(String[] args) throws InterruptedException { | |
Logger logger = LogManager.getLogger("TestLogger"); | |
for (int i = 0; i < 10; i++) { | |
Thread.sleep(1000); |
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 org.apache.logging.log4j; | |
import org.apache.logging.log4j.core.LoggerContext; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.net.InetSocketAddress; | |
import java.net.ServerSocket; | |
import java.net.Socket; | |
import java.net.URISyntaxException; |
OlderNewer