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.{Callable, Executors, ExecutorService} | |
implicit def callable[T](f: () => T): Callable[T] = new Callable[T]() { def call() = f() } | |
implicit def runnable(f: () => Unit): Runnable = new Runnable() { def run() = f() } | |
val data = (1.toLong until 1000.toLong toArray) | |
object Something { | |
def insert(batch: Int, data: Array[Long], fn: (Array[Long] => Unit)) { |
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.spark.graphx._ | |
import org.apache.spark.rdd.RDD | |
case class Peep(name: String, age: Int) | |
val vertexArray = Array( | |
(1L, Peep("Kim", 23)), | |
(2L, Peep("Pat", 31)), | |
(3L, Peep("Chris", 52)), | |
(4L, Peep("Kelly", 39)), |
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
(require 'package) | |
(setq package-archives '(("gnu" . "http://elpa.gnu.org/packages/") | |
("marmalade" . "http://marmalade-repo.org/packages/") | |
("melpa" . "http://melpa.milkbox.net/packages/"))) | |
(package-initialize) | |
(setenv "PATH" (concat (getenv "PATH") ":/opt/go/site/bin")) | |
(setq exec-path (append exec-path '("/opt/go/site/bin"))) | |
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 Debug.Trace | |
debug = flip trace | |
permute :: Show a => [a] -> [a] | |
permute xs = | |
permute' xs xs | |
where | |
permute' xy xz = case xy of |
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
order += "cpu_temperature 0" | |
order += "cpu_temperature 1" | |
order += "cpu_temperature 2" | |
order += "cpu_temperature 3" | |
cpu_temperature 0 { | |
format "T: %degrees *C" | |
max_threshold = 65 | |
path = "/sys/class/thermal/thermal_zone0/temp" | |
} |
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
!------------------------------------------------------------------------------- | |
! Xft settings | |
!------------------------------------------------------------------------------- | |
Xft.dpi: 96 | |
Xft.antialias: false | |
Xft.rgba: rgb | |
Xft.hinting: true | |
Xft.hintstyle: hintslight | |
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
diff --git a/src/gdk/events.rs b/src/gdk/events.rs | |
index 5fbd20f..4a0da12 100644 | |
--- a/src/gdk/events.rs | |
+++ b/src/gdk/events.rs | |
@@ -252,7 +252,7 @@ pub struct EventOwnerChange{ | |
send_event : i8, | |
pub owner : *mut gdk::Window, | |
- pub reason : gdk::OwnerChange, | |
+ pub reason : OwnerChangeEvent, |
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
src/gtk/widgets/recentchooserdialog.rs:32:33: 32:53 warning: use of deprecated item: use null_mut, #[warn(deprecated)] on by default | |
src/gtk/widgets/recentchooserdialog.rs:32 None => ::std::ptr::mut_null() | |
^~~~~~~~~~~~~~~~~~~~ | |
src/gtk/widgets/recentchooserdialog.rs:54:33: 54:53 warning: use of deprecated item: use null_mut, #[warn(deprecated)] on by default | |
src/gtk/widgets/recentchooserdialog.rs:54 None => ::std::ptr::mut_null() | |
^~~~~~~~~~~~~~~~~~~~ | |
src/gdk/events.rs:255:16: 255:32 warning: private type in exported type signature, #[warn(visible_private_types)] on by default | |
src/gdk/events.rs:255 pub reason : OwnerChangeEvent, | |
^~~~~~~~~~~~~~~~ | |
src/gdk/events.rs:290:22: 290:38 warning: private type in exported type signature, #[warn(visible_private_types)] on by default |
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 MyCellRenderer : Gtk.CellRenderer { | |
// icon property set by the tree column | |
public Gdk.Pixbuf icon { get; set; } | |
public string text { get; set; } | |
public int progress { get; set; } | |
public int Padding; | |
private Gtk.CellRendererPixbuf icon_renderer; | |
private Gtk.CellRendererText text_renderer; |
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
using GLib; | |
int main(string[] args) { | |
if (!Thread.supported()) { | |
stderr.printf("Cannot run without threads.\n"); | |
return 1; | |
} | |
try { | |
var thread = new Thread<int>("Thread", () => { |
OlderNewer