This file contains hidden or 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 ( | |
| "context" | |
| "fmt" | |
| "log" | |
| "net/http" | |
| "sync" | |
| "time" |
This file contains hidden or 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 ( | |
| "context" | |
| "fmt" | |
| "strings" | |
| "github.com/andersfylling/disgord" | |
| ) |
This file contains hidden or 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
| { | |
| "@id" : "https://en.wikipedia.org/wiki/Frozen_(2013_film)", | |
| "@type" : [ "http://schema.org/Movie" ], | |
| "http://schema.org/releasedEvent" : [ { | |
| "@value" : "2013-11-27" | |
| }], | |
| "http://schema.org/copyrightYear" : [ { | |
| "@type" : "http://www.w3.org/2001/XMLSchema#integer", | |
| "@value" : "2013" | |
| }], |
This file contains hidden or 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
| (defn mergeListPairs [xs] | |
| (loop [xss xs] | |
| (cond | |
| (= (count xss) 1) (first xss) | |
| :else (let [[xs1 xs2 & xssRest] xss] | |
| (recur (conj xssRest (myMerge xs1 xs2))))))) |
This file contains hidden or 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" | |
| type Person struct { | |
| Name string | |
| } | |
| func (p *Person) Intro() string { | |
| return p.Name |
This file contains hidden or 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
| (if window-system | |
| (tool-bar-mode -1)) | |
| (load-theme 'deeper-blue t) | |
| (set-face-attribute 'default nil :height 140) | |
| (require 'package) | |
| (package-initialize) | |
| (add-to-list 'package-archives | |
| '("marmalade" . "http://marmalade-repo.org/packages/")) |
This file contains hidden or 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
| # let's count words | |
| a = ['the quick brown fox jumped over the log', 'the slow brown fox ran fast', 'the blue fast cat jumped'] | |
| a.reduce({}) { |m, o| | |
| o.split(' ').each{ |w| | |
| m.key?(w) ? m[w] = m[w]+ 1 : m[w] = 1 | |
| } | |
| m | |
| }.sort { |a,b| b[1] <=> a[1] } |
This file contains hidden or 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
| root = exports ? this | |
| root.PerformanceStats = {} | |
| root.PerformanceStats.piePlot = (el, data) -> | |
| tmp_data = [ | |
| { label: "Series1", data: 10}, | |
| { label: "Series2", data: 30}, | |
| { label: "Series3", data: 90}, | |
| { label: "Series4", data: 70}, | |
| { label: "Series5", data: 80}, | |
| { label: "Series6", data: 110} |
This file contains hidden or 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 character_schema() { | |
| $schema['character'] = array ( | |
| 'description' => 'The main store for our entity', | |
| 'fields' => array( | |
| 'pid' => array( | |
| 'description' => 'Primary key for our table of characters', | |
| 'type' => 'serial', | |
| 'unsigned' => TRUE, | |
| 'not null' => TRUE, | |
| ), |
This file contains hidden or 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
| ∴ head post_preferences.csv | |
| 4,1 | |
| 7,2 | |
| 4,4 | |
| 1,4 | |
| 4,3 | |
| 8,1 | |
| 8,3 | |
| 4,5 | |
| 4,6 |
NewerOlder