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
// Prim’s MST algorithm: priority queue version | |
void Prim(Graph* G, int* D, int s) { | |
int i, v, w; // "v" is current vertex | |
int V[G->n()]; // V[I] stores I’s closest neighbor | |
DijkElem temp; | |
DijkElem E[G->e()]; // Heap array with lots of space | |
temp.distance = 0; temp.vertex = s; | |
E[0] = temp; // Initialize heap array | |
heap<DijkElem, DDComp> H(E, 1, G->e()); // Create heap | |
for (int i=0; i<G->n(); i++) // Initialize |
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
# warning-ignore-all:void_assignment | |
# warning-ignore-all:return_value_discarded | |
extends Control | |
class_name Sequence | |
# todo - impelement prize screen | |
signal dialogue_shown() | |
signal option_pressed(id) | |
enum Commands { |
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(guessing-game.main) | |
import(std.prelude) | |
import(std.world) | |
import(std.maybe) | |
import(std.buffer) | |
external(libc-rand -> rand [+World -- +World CInt]) | |
external(random-seed -> random_seed [+World -- +World], | |
"#include <stdlib.h>" | |
"#include <time.h>" |
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
extends Node | |
var _routing = {} | |
func listen_for(listener: String, message: String, callback: FuncRef, once = false) -> void: | |
if message in _routing: | |
_routing[message][listener] = { callback = callback, once = once } | |
else: | |
_routing[message] = {listener: { callback = callback, once = once }} |
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
extends Node | |
signal send_ready | |
signal read_ready | |
enum ReadMode { Consuming, Preserving } | |
enum BlockingMode { NonBlocking, Blocking } | |
class RWComutex: | |
signal unlocked |
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
fyne: context { | |
app: ?fyne-app | |
label: ?fyne-label | |
entry: ?fyne-entry | |
button: ?fyne-button | |
container: ?fyne-container | |
} | |
; If we create Fyne constructor function inside a fyne context |
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 | |
// An attempt to figure out the minimum boilplate needed for implementing a | |
// widget in Ebitenui | |
import ( | |
"image" | |
"image/color" | |
"github.com/ebitenui/ebitenui/widget" |
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
{"gameLink":"Tiger Jerkin'","canvasses":[[9,"b",2,"4",9,"b",10,"5",3,"4",6,"b",13,"5",42,"d",4,"5",10,"b",1,"5",1,"4",8,"b",5,"5",2,"4",8,"5",3,"b",10,"5",6,"b",8,"5",10,"b",1,"5",9,"b",7,"5",13,"b",12,"5",42,"d",3,"5",12,"b",1,"5",1,"4",7,"b",5,"5",1,"4",8,"5",5,"b",8,"5",7,"b",8,"5",10,"b",1,"5",13,"b",2,"5",17,"b",10,"5",40,"d",1,"5",16,"b",1,"5",2,"4",1,"5",3,"b",2,"5",3,"b",1,"5",1,"4",8,"5",5,"b",7,"5",8,"b",8,"5",10,"b",1,"5",14,"b",1,"5",18,"b",10,"5",33,"d",6,"5",17,"b",1,"5",2,"4",5,"5",5,"b",5,"5",3,"b",1,"5",5,"b",6,"5",8,"b",4,"5",4,"b",1,"5",10,"b",2,"5",32,"b",10,"5",31,"d",3,"b",4,"5",21,"b",1,"4",4,"5",14,"b",1,"5",3,"b",6,"5",9,"b",3,"5",16,"b",2,"5",14,"b",1,"5",6,"b",1,"5",10,"b",10,"5",30,"d",5,"b",3,"5",22,"b",1,"4",3,"5",14,"b",9,"5",10,"b",3,"5",15,"b",2,"5",15,"b",3,"5",10,"b",1,"5",3,"b",11,"5",30,"d",5,"b",3,"5",22,"b",4,"5",14,"b",7,"5",12,"b",3,"5",14,"b",3,"5",16,"b",1,"5",6,"b",1,"5",3,"b",16,"5",29,"d",1,"5",5,"b",3,"5",22,"b",5,"5",14,"b",1,"4",16,"b",3,"5",6,"b",1,"5",9,"b",2 |
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
{"gameLink":"www.flickgame.org","canvasses":[[9,"b",2,"4",9,"b",10,"5",3,"4",6,"b",13,"5",42,"d",4,"5",10,"b",1,"5",1,"4",8,"b",5,"5",2,"4",8,"5",3,"b",10,"5",6,"b",8,"5",10,"b",1,"5",9,"b",7,"5",13,"b",12,"5",42,"d",3,"5",12,"b",1,"5",1,"4",7,"b",5,"5",1,"4",8,"5",5,"b",8,"5",7,"b",8,"5",10,"b",1,"5",13,"b",2,"5",17,"b",10,"5",40,"d",1,"5",16,"b",1,"5",2,"4",1,"5",3,"b",2,"5",3,"b",1,"5",1,"4",8,"5",5,"b",7,"5",8,"b",8,"5",10,"b",1,"5",14,"b",1,"5",18,"b",10,"5",33,"d",6,"5",17,"b",1,"5",2,"4",5,"5",5,"b",5,"5",3,"b",1,"5",5,"b",6,"5",8,"b",4,"5",4,"b",1,"5",10,"b",2,"5",32,"b",10,"5",31,"d",3,"b",4,"5",21,"b",1,"4",4,"5",14,"b",1,"5",3,"b",6,"5",9,"b",3,"5",16,"b",2,"5",14,"b",1,"5",6,"b",1,"5",10,"b",10,"5",30,"d",5,"b",3,"5",22,"b",1,"4",3,"5",14,"b",9,"5",10,"b",3,"5",15,"b",2,"5",15,"b",3,"5",10,"b",1,"5",3,"b",11,"5",30,"d",5,"b",3,"5",22,"b",4,"5",14,"b",7,"5",12,"b",3,"5",14,"b",3,"5",16,"b",1,"5",6,"b",1,"5",3,"b",16,"5",29,"d",1,"5",5,"b",3,"5",22,"b",5,"5",14,"b",1,"4",16,"b",3,"5",6,"b",1,"5",9," |
NewerOlder