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
type Query{ | |
// ... | |
findPaymentRequests( | |
offset: Int | |
limit: Int | |
locationId: String | |
isPaid: Bool | |
isRefunded: Bool | |
isPartiallyRefunded: Bool | |
isRecorded: Bool |
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 ( | |
"bufio" | |
"os" | |
) | |
func main() { | |
scanner := bufio.NewScanner(os.Stdin) | |
for { |
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
// https://www.reddit.com/r/golang/comments/852i6m/about_to_switch_to_python_because_ive_hit_a_brick/?ref=share&ref_source=link | |
package main | |
import "errors" | |
const ( | |
MonsterType = iota | |
CookingRecipeType | |
InventoryItemType | |
) |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Document</title> | |
</head> | |
<body> | |
<a href="video/small.mp4" download="new-filename">click me!</a> |
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
// flatten an array of arbitrarily nested arrays of integers into a flat array of integers. e.g. [[1,2,[3]],4] -> [1,2,3,4] | |
function flatten (arr) { | |
let result = arr | |
// check if arr contains an array | |
while(result.find(item => Array.isArray(item))) { | |
// merge arr w/ top level arr | |
result = [].concat.apply([], result) | |
} | |
// when complete return flattened arr |