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
fmtsdk =: ((;/"3)&(3 3 3 3&$)) | |
bare =: (,/,/ (i. 3) |."1"0 _ ((3 * i. 3) |."0 _ (1 + i.9))) | |
fmtsdk bare | |
┌─────┬─────┬─────┐ | |
│1 2 3│4 5 6│7 8 9│ | |
│4 5 6│7 8 9│1 2 3│ | |
│7 8 9│1 2 3│4 5 6│ | |
├─────┼─────┼─────┤ | |
│2 3 4│5 6 7│8 9 1│ | |
│5 6 7│8 9 1│2 3 4│ |
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 ./state.cpp ../state.cpp | |
42,43c42,43 | |
< unordered_map<string, string::size_type>& visitedWords, | |
< priority_queue<state>& states) { | |
--- | |
> unordered_map<string, string::size_type>* visitedWords, | |
> priority_queue<state>* states) { | |
53,54c53,54 | |
< && (visitedWords.count(s) == 0 | |
< || visitedWords[s] == 1 + this->visited.size()) |
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 ruby | |
# coding: utf-8 | |
## | |
# In HQ9+ Hello world programs were unnecessarily long which caused a | |
# dramatic waste in space. It is estimated that a massive 4 PB of | |
# storage space worldwide is used to store "Hello, World!" programs a | |
# further 2 PB of space is used to store "Hello, World" programs. Q9+ | |
# attempts to solve this problem this problem by making the empty file a | |
# "Hello World" program. As a result of this a standard 2 TB harddrive |
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 ExerciseSeven where | |
data ℕ : Set where | |
zero : ℕ | |
succ : ℕ → ℕ | |
_+_ : ℕ → ℕ → ℕ | |
zero + n = n | |
(succ m) + n = succ (m + n) |
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
function synchronized update() { | |
display_update(); | |
if ($("#num_tickets")[0].value != tickets.length) { | |
// number of tickets is off | |
while ($("#num_tickets")[0].value > tickets.length) { | |
data = $.ajax({ url: '#{dashboard_order_tickets_path(@order)}', | |
type: 'POST', | |
dataType: 'json', | |
data: {ticket: {event_id: #{@event.id}}}}); | |
console.log("new ticket"); |
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
#include <stdio.h> | |
int *p; | |
void foo(int *n) { | |
p = ((void **)n)[0]; | |
((int (*)(void))((void**)n)[1])(); | |
} | |
void bar() { |
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
#include <stdio.h> | |
int *p; | |
void foo(int *n) { | |
p = ((void **)n)[0]; | |
((int (*)(void))((void**)n)[1])(); | |
} | |
void bar() { |
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.*; | |
import java.io.*; | |
import java.lang.*; | |
public class test1 | |
{ | |
public static void main(String[] args) | |
{ | |
Scanner numbersRead=new Scanner(System.in).useDelimiter(" "); | |