- Variables:
let x = 10; // Block-scoped, mutable const y = 20; // Block-scoped, immutable var z = 30; // Function-scoped, avoid using
Discover gists
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
| # Commands to build an Ubuntu SD card image for the Atum A5, from: | |
| # https://www.terasic.com.tw/wiki/Atum_A5_:_Build_linux_image_from_scratch | |
| # | |
| # Sudo commands require a password. | |
| # And there's some locale setting needed. It seems like the fix is to set some | |
| # environment variables (serverfault.com/questions/949991/how-to-install-tzdata-on-a-ubuntu-docker-image) | |
| # | |
| # TODO: The targets should probably be specific build artifacts, rather than | |
| # directories. Have an initial target to just fetch the repos. | |
| # |
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
| -- Three levels of aggregates | |
| -- group by | |
| -- - puid, date | |
| -- - school_id, date | |
| -- - school_id, puid, date | |
| -------------------------------- |
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
| -- Three levels of aggregates | |
| -- group by | |
| -- - puid, date | |
| -- - school_id, date | |
| -- - school_id, puid, date | |
| -------------------------------- |
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
| private var firstNames:Array<String> = arrayOf( "Aaran", "Aaren", "Aarez", "Aarman", "Aaron", "Aaron-James", "Aarron", "Aaryan", "Aaryn", "Aayan", "Aazaan", "Abaan", "Abbas", "Abdallah", "Abdalroof", "Abdihakim", "Abdirahman", "Abdisalam", "Abdul", "Abdul-Aziz", "Abdulbasir", "Abdulkadir", "Abdulkarem", "Abdulkhader", "Abdullah", "Abdul-Majeed", "Abdulmalik", "Abdul-Rehman", "Abdur", "Abdurraheem", "Abdur-Rahman", "Abdur-Rehmaan", "Abel", "Abhinav", "Abhisumant", "Abid", "Abir", "Abraham", "Abu", "Abubakar", "Ace", "Adain", "Adam", "Adam-James", "Addison", "Addisson", "Adegbola", "Adegbolahan", "Aden", "Adenn", "Adie", "Adil", "Aditya", "Adnan", "Adrian", "Adrien", "Aedan", "Aedin", "Aedyn", "Aeron", "Afonso", "Ahmad", "Ahmed", "Ahmed-Aziz", "Ahoua", "Ahtasham", "Aiadan", "Aidan", "Aiden", "Aiden-Jack", "Aiden-Vee", "Aidian", "Aidy", "Ailin", "Aiman", "Ainsley", "Ainslie", "Airen", "Airidas", "Airlie", "AJ", "Ajay", "A-Jay", "Ajayraj", "Akan", "Akram", "Al", "Ala", "Alan", "Alanas", "Alasdair", "Alastair", "A |
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
| import androidx.lifecycle.ViewModel | |
| class NFLTeamListViewModel: ViewModel() { | |
| val teams = listOf( | |
| NFLTeam ("bears", "Chicago Bears", "bears.png", "NFC", "NFC North", "Soldier Field", 41.8625,-87.616667), | |
| NFLTeam ("bengals", "Cincinnati Bengals", "bengals.png", "AFC", "AFC North", "Paul Brown Stadium", 39.095444,-84.516039), | |
| NFLTeam ("bills", "Buffalo Bills", "bills.png", "AFC", "AFC East", "Bills Stadium", 42.773611,-78.786944), | |
| NFLTeam ("broncos", "Denver Broncos", "broncos.png", "AFC", "AFC West", "Empower Field at Mile High", 39.743889,-105.02), | |
| NFLTeam ("browns", "Cleveland Browns", "browns.png", "AFC", "AFC North", "FirstEnergy Stadium", 41.506111,-81.699444), |
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
| private val responseBank = listOf( | |
| Response("It is certain"), | |
| Response("It is decidedly so"), | |
| Response("Without a doubt"), | |
| Response("Yes, definitely"), | |
| Response("You may rely on it"), | |
| Response("As I see it, yes"), | |
| Response("Most likely"), | |
| Response("Outlook good"), | |
| Response("Yes"), |
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
| # PowerShell Module for uploading files to FileLocker | |
| # Greg McCoy gmccoy@purdue.edu | |
| # 15 May 2020 | |
| function Sign-In { | |
| param( | |
| [Parameter(Mandatory=$true)] [string]$Key, | |
| [Parameter(Mandatory=$true)] [string]$User | |
| ) | |
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 [rowTime, colTime] = rowVersusColumnBenchmark(n, m) | |
| massRatio = 0.012; | |
| rng(10) | |
| states = rand(n, 6); | |
| tic() | |
| for k = 1:m | |
| pp = pseudopotentialRowStates(massRatio, states); | |
| end |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder