- We are committed to providing a friendly, safe and welcoming environment for all, regardless of level of experience, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, religion, nationality, or other similar characteristic.
- Please avoid using overtly sexual aliases or other nicknames that might detract from a friendly, safe and welcoming environment for all.
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 Expectation = { | |
to: Expectation, | |
be: Expectation, | |
been: Expectation, | |
have: Expectation, | |
was: Expectation, | |
at: Expectation, | |
never: Expectation, | |
a: (typeName: string) -> Expectation, |
A CI Workflow for testing in roblox. It includes style checking, testing in Roblox and Lemur, and coverage reporting of Lemur tests.
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
name: CI | |
on: | |
pull_request: | |
push: | |
branches: | |
- master | |
jobs: | |
lemur: |
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
# Allows the user to scan through a string one character at a time. | |
# The scanner automatically gets a new line if it needs one and returns | |
# the new line character to notify the user that a line break has occurred. | |
class Scanner | |
# Initializes the scanner with a new line. | |
def initialize | |
@cur_line = gets | |
end | |
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
def A(): | |
def B(): | |
global g | |
g = 5 | |
return B | |
def C(): | |
f = A() | |
f() | |
print g |
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
def A(x): | |
def B(): | |
return x | |
return B | |
def C(y): | |
f = A(y) | |
print f() | |
C(2) # -> 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
function shuffle(message) | |
local shuffle = {} | |
for i=1, string.len(message) do | |
shuffle[i] = string.sub(message, i, i) | |
end | |
local k = 0 | |
local temp = nil | |
for n = #shuffle, 1, -1 do | |
k = math.random(1, n) | |
temp = shuffle[k] |