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
// Last changes: | |
// - tokens for Essex County Express | |
// - updated remote instance | |
const tokens = [ | |
"+1", 0, 0, -1, -1, -1, | |
-2, -2, -3, -4, | |
"💀", "💀", "🧙", "🦑", "🌟", | |
"🫀", -3 // added after Miskatonic Museum | |
]; |
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
// This code is displays a counter above. | |
// The code is transpiled with Babel and run with eval(). | |
const { useState } = React; // imports don't work here | |
function Counter() { | |
const [count, setCount] = useState(0); | |
return ( | |
<div style={{margin: 20}}> |
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
fade("#title", "Привет!") | |
fade("#text1", "Вот " + link("песня", "https://disk.yandex.ru") + " я написал для тебя") | |
fade("#text2", "Пожалуйста скажи как тебе)") | |
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 version = "v0.5.12 token color"; | |
$("#main").css({padding: "0.5em"}); | |
//$('#main-button').click(); | |
let tokens = [ | |
'+1', | |
0, 0, -1, -1, -1, -2, -2, | |
-3, -4, | |
"Skull", "Skull", "Cape", |
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
$('#main-button').click(); // click the "MAIN" button (scrolls up) | |
setTimeout(changeTexts, 1000); // run after 1 second (to give time to scrolling) | |
function changeTexts() { | |
fade("#title", "Practice coding") | |
const action = random(["try", "run", "execute", "modify"]) | |
const js = link("JavaScript", "https://developer.mozilla.org/docs/Web/JavaScript") | |
fade("#text1", "You can " + action + " the " + js + " code below") | |
const functions = join(["fade", "join", "link", "random"]); |
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
/** | |
* This is an example of a basic node.js script that performs | |
* the Client Credentials oAuth2 flow to authenticate against | |
* the Spotify Accounts. | |
* | |
* For more information, read | |
* https://developer.spotify.com/web-api/authorization-guide/#client_credentials_flow | |
*/ | |
var request = require('request'); // "Request" library |
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 java.util.*; // This is necessary to use collections like List, Set, Map | |
public class Collections { | |
public static void main(String... args) { | |
// Wrapper classes ( use them between angle brackets < > ) | |
// Integer, Double, Boolean | |
// Long, Character, Float |
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 java.util.*; | |
public class Example { | |
// TODO: Exercise: | |
// Write a function that given a list of words and a number n, returns list of the words longer than n. | |
public static void main(String[] args) { | |
List<String> words; |
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 tech.bts.javaexamples; | |
/** | |
* Basic exercises to practice variable declarations and assignments. | |
*/ | |
public class BasicsExercises { | |
public static void main(String[] args) { | |
/* |
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 sample; | |
import java.util.*; // Allow us to use classes from java.util package (List, Map, etc.) without their full name | |
/** | |
* Summary of the building blocks of a programming language. | |
* (Note: this is a class comment) | |
*/ | |
public class ProgrammingBuildingBlocks { |
NewerOlder