MCPcopy Create free account

hub / github.com/code-golf/code-golf / functions

Functions650 in github.com/code-golf/code-golf

↓ 281 callersFunctionappend
(lineString: string)
assets/js/admin/solutions.tsx:40
↓ 229 callersFunctioncardRune
(number T, suit int)
hole/poker.go:27
↓ 119 callersFunction$
(selector: string)
assets/js/_util.ts:70
↓ 117 callersMethodGet
(any, string, ...any)
db/db.go:35
↓ 80 callersFunctionshuffle
Returning the slice is a convenience, the shuffle is still in-place.
hole/0hole.go:150
↓ 75 callersFunctionDatabase
Database gets the database handle from the request context.
session/session.go:29
↓ 72 callersFunctionanswerFunc
Set the answer func on the Hole by ID, return any to allow top-level call.
hole/0hole.go:96
↓ 65 callersFunctionrandInt
Return a random integer between min and max inclusive.
hole/0hole.go:144
↓ 64 callersFunctionparam
(r *http.Request, key string)
routes/util.go:16
↓ 56 callersMethodString
()
hole/intersection.go:13
↓ 56 callersFunctionoutputTests
(tests ...[]test)
hole/0hole.go:107
↓ 44 callersMethodSelect
(any, string, ...any)
db/db.go:48
↓ 38 callersFunctionGolfer
Golfer gets the golfer from the request context.
session/session.go:34
↓ 38 callersFunctionrender
(w http.ResponseWriter, r *http.Request, name string, data ...any)
routes/render.go:25
↓ 23 callersMethodString
()
uuid/uuid.go:23
↓ 22 callersMethodMustExec
(string, ...any)
db/db.go:37
↓ 21 callersMethodEarn
Earn the given cheevo, no-op if already earned.
golfer/golfer.go:104
↓ 21 callersFunctiongetSolutionCode
(lang: string, solution: 0 | 1)
assets/js/_hole-common.tsx:176
↓ 20 callersMethodWrite
(ConsoleColor foregroundColor, ConsoleColor backgroundColor, string value)
langs/powershell/powershell.cs:171
↓ 19 callersFunctionComma
Comma returns a string of an integer with thousand separators.
pretty/pretty.go:32
↓ 18 callersMethodScan
(src any)
routes/golfer_settings_sessions.go:13
↓ 16 callersMethodQueryRow
(string, ...any)
db/db.go:46
↓ 16 callersFunctionrandWord
Return a random word from words.txt.
hole/0hole.go:147
↓ 16 callersMethodtoString
(trimRight bool)
hole/qr.go:85
↓ 15 callersFunction$$
(selector: string)
assets/js/_util.ts:74
↓ 15 callersFunctioncomma
(i: number | undefined)
assets/js/_util.ts:77
↓ 15 callersFunctionfixedTests
Return a copy so holes are free to append, shuffle, etc.
hole/0hole.go:91
↓ 15 callersFunctionredir
(templateURL string)
routes/util.go:21
↓ 13 callersFunctiongetAutoSaveKey
(lang: string, solution: 0 | 1)
assets/js/_hole-common.tsx:164
↓ 12 callersFunctionencodeJSON
(w http.ResponseWriter, v any)
routes/api.go:359
↓ 12 callersFunctiongroup
(name, slug string, linkNames ...string)
config/nav.go:176
↓ 12 callersFunctionlevenshteinTest
(a, b string)
hole/levenshtein-distance.go:10
↓ 10 callersFunctionNullIfZero
(value T)
null/null.go:22
↓ 10 callersFunctionbenchHole
(b *testing.B, id string)
hole/play_test.go:20
↓ 9 callersFunctionGet
(r *http.Request)
session/session.go:24
↓ 9 callersMethodWriteLine
(string value)
langs/powershell/powershell.cs:191
↓ 9 callersFunctionblcNum
(n int)
hole/binary-lambda-calculus.go:8
↓ 9 callersMethodget
(i, j int)
hole/game-of-life.go:60
↓ 9 callersFunctionplainComponent
(componentType: string)
assets/js/hole/tabs.tsx:378
↓ 9 callersFunctionrandChoice
Return a random element from the given slice. Panics on empty slice.
hole/0hole.go:141
↓ 9 callersFunctionrandomOdd
(max int)
hole/jacobi-symbol.go:20
↓ 8 callersMethodget8
(i, j, dir int)
hole/qr.go:36
↓ 8 callersFunctionletterVal
(note string)
hole/musical-chords.go:42
↓ 8 callersFunctionrandBool
Return a random bool.
hole/0hole.go:138
↓ 8 callersFunctionrandomNatural
(max int)
hole/jacobi-symbol.go:9
↓ 7 callersFunctionGolferInfo
GolferInfo gets the GolferInfo object from the request context.
session/session.go:39
↓ 7 callersFunctionID
ID is a lowercase simplified version of the name used in URLs and the DB. Some characters (like "#") are changed to be safe in URLs.
config/config.go:31
↓ 7 callersFunctionafterDOM
()
assets/js/hole/tabs.tsx:324
↓ 7 callersFunctionamount
(n: number, singular: string, plural?: string)
assets/js/_util.ts:79
↓ 7 callersFunctiongetTitle
(name: string)
assets/js/hole/tabs.tsx:374
↓ 7 callersFunctionlines
(s: string)
assets/js/_diff.tsx:402
↓ 7 callersFunctionmedalTallyTest
(size, g, s, b, tie int)
hole/medal-tally.go:44
↓ 7 callersFunctionoutputTestsWithSep
(sep string, testRuns ...[]test)
hole/0hole.go:109
↓ 6 callersMethodScan
(src any)
uuid/uuid.go:19
↓ 6 callersFunctionautoFocus
(container: ComponentContainer)
assets/js/hole/tabs.tsx:210
↓ 6 callersFunctionrefreshScores
(editor: any)
assets/js/_hole-common.tsx:286
↓ 6 callersFunctionscanID
(thing *T, src any, lookup map[string]*T)
config/sql.go:40
↓ 5 callersMethodLen
()
hole/huffman.go:37
↓ 5 callersFunctionNew
(r *http.Request)
pager/pager.go:17
↓ 5 callersFunctionRender
(w io.Writer, name string, data any)
views/views.go:142
↓ 5 callersFunctionSettings
Settings gets the page settings map from the request context.
session/session.go:44
↓ 5 callersMethodescape
(text: string)
assets/js/_unprintable.ts:98
↓ 5 callersFunctiongenExpr
(init int, expander func(*Node, int), expandCount int)
hole/reverse-polish-notation.go:99
↓ 5 callersMethodget
(i, j int)
hole/qr.go:21
↓ 5 callersFunctiongetLang
()
assets/js/_hole-common.tsx:129
↓ 5 callersFunctiongetPrevNextHole
Get prev/next hole with order based on homepage settings.
routes/home_cards.go:31
↓ 5 callersFunctionintToBFString
(n int)
hole/brainfuck.go:27
↓ 5 callersFunctionmakeLookup
(chars: string)
assets/js/lang-allowed-strokes.tsx:1
↓ 5 callersMethodtest
(day int, hour int)
hole/zodiac-signs.go:53
↓ 5 callersFunctiontoLowerConditionally
(text string, caseFold bool)
hole/judges.go:89
↓ 5 callersFunctionunmarshal
(file string, value any)
config/config.go:33
↓ 5 callersFunctionupdateResults
(results: SearchNavResult[])
assets/js/base.tsx:117
↓ 4 callersMethodCalculate
()
pager/pager.go:24
↓ 4 callersMethodFollowLimit
FollowLimit returns the max number of golfers this golfer can follow.
golfer/golfer.go:128
↓ 4 callersMethodLocation
()
golfer/golfer.go:149
↓ 4 callersFunctionNew
(value T, valid bool)
null/null.go:18
↓ 4 callersFunctionPage
Page returns which page a given row will appear on.
pager/pager.go:59
↓ 4 callersFunctionThisWeek
ThisWeek returns the start of the current week (Monday, NOT Sunday).
config/hole_of_the_week.go:85
↓ 4 callersFunctionTime
Time returns a fuzzy HTML <time> tag of a time.Time. a min ago 2 mins ago ... 59 mins ago 119 mins ago 2 hours ago ..
pretty/pretty.go:126
↓ 4 callersFunctionbyteLen
(str: string)
assets/js/_util.ts:5
↓ 4 callersFunctionchangePage
(u *url.URL, page int)
pager/pager.go:61
↓ 4 callersFunctioncharLen
(str: string)
assets/js/_util.ts:6
↓ 4 callersFunctioncheckDigit
(digits [9]int)
hole/isbn.go:8
↓ 4 callersFunctioncountHandTiles
(hand string)
hole/mahjong.go:17
↓ 4 callersFunctiongroupHoles
(includeExperimental bool)
config/nav.go:212
↓ 4 callersFunctiongroupLangs
(includeExperimental bool)
config/nav.go:239
↓ 4 callersFunctionjudge
Set the judge on the Hole by ID, return any to allow top-level call.
hole/0hole.go:102
↓ 4 callersFunctionoutputMultirunTests
(tests []test)
hole/0hole.go:131
↓ 4 callersFunctionparseInt
(k string)
hole/css-grid.go:35
↓ 4 callersFunctionpushToDiff
(diff: Diff.Change[], entry: Diff.Change, join: string)
assets/js/_diff.tsx:69
↓ 4 callersFunctionrandomInClass
(max, mod, class int)
hole/jacobi-symbol.go:16
↓ 4 callersFunctionrecAnnounceToEmbed
recAnnounceToEmbed parses a recAnnouncement object and turns it into a Discord embed
discord/bot.go:121
↓ 4 callersFunctionsetSolution
(value: 0 | 1)
assets/js/_hole-common.tsx:187
↓ 4 callersFunctionstringsEqual
(a: string, b: string, ignoreCase: boolean)
assets/js/_diff.tsx:236
↓ 4 callersFunctionsubmit
( editor: any, // eslint-disable-next-line no-unused-vars updateReadonlyPanels: (d: ReadonlyPanels
assets/js/_hole-common.tsx:549
↓ 3 callersFunctionExists
(name string)
assets/assets.go:47
↓ 3 callersFunctionGetConnections
(db db.Queryable, golferID int, onlyPublic bool)
oauth/oauth.go:109
↓ 3 callersFunctionGetInfo
(db *sqlx.DB, name string)
golfer/get.go:96
↓ 3 callersFunctionHoleOfTheWeek
()
config/hole_of_the_week.go:26
↓ 3 callersMethodPop
()
hole/huffman.go:47
next →1–100 of 650, ranked by callers