else if (s.equals("d")) { public void complexCommand(String s) { animation-delay: 2s; font-weight: normal; position: absolute; * Super quick line counter by martinus:
* @param The filename of the map file.
@keyframes polygonic { description: '',import {changeFilter} from '../actions/changeFilter'; * @throws The usual IOException from a BufferedReader.
left: 0; int endIndex = 0;#FF6699 transition: filter 0.2s ease;import {addFilter} from '../actions/addFilter'; 0% {transform: translateX(-200%);} font-size: 4vw;} padding: 0 100px 100px; numberStack.push(parseDecimalToOctal(s)); sprn.processCommand(command);}.fullscreen-width {@charset "UTF-8"; */
[e.target.name]: e.target.value try { this.props.changeFilter(this.props.currentUserId, name, filterFunction, extraArgument);svg.path { onChangeLocation = (event) => {} values={this.state} />); onChange = (e) => { private int goldRequired;
} }* This folder contains all of the files necessary for your extension. state = { const spliceIndex = locations.findIndex((item) => item === locationToChange); left: 40%; }
System.err.println(e.getMessage()); *
{'#','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','#'},
{'#','.','.','.','.','.','.','.','.','.','.','.','G','.','.','.','.','.','.','#'},
import TicketForm from './TicketForm'; * @throws Exception : Thrown if map is not rectangular.
*/
}, this.props.eventId, this.props.loadTickets); z-index: -1; }import java.util.ArrayList;
}h1, h2, h3, h4, h5, h6 { // Used for telling which Strings to Parse to a number // Representation of the map
String command = reader.readLine(); z-index: 99; }
*/
*/
letter-spacing: 30px; } * Default constructor, creates the default map "Very small Labyrinth of doom".
100% {transform: translateX(0%);} */
animation-delay: 12s;## Run testsimport {Profile} from '../Profile'; {'#','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','#'},
protected int getGoldRequired() {
stroke-width:2; } if (s.isEmpty()) { font-weight: 600; e.preventDefault();@import "animate.css"; max-width: 800px; userFilters: state.profiles[state.currentUserId].filtersimport java.io.*; if (map[i].length != map[0].length) {
render() { {'#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#'},
*/ } this.addFilter('genres', functionToChange, genreToChange);## What's in the folder return { } finally {
} while (true) { String stringParts[] = s.split("((?<=\\D)|(?=\\D))"); // Split method by NawaMan https://stackoverflow.com/questions/2206378/how-to-split-a-string-but-also-keep-the-delimiters * @return The number of lines.
color: #FF8EB7;* See the output of the test result in the debug console. protected void removeItemAtCoordinate(int[] coordinates) {
price: '', } const locationToChange = event.target.value;img.icon { * Constructor that accepts a map to read in from.
else { numberStack.printStack(); int readChars = 0;
transition: transform 0.2s ease;.social-media-plug { public boolean isOctal(String str) { right: 0; user-select: none; this.props.addTicket({import App from './App'; * @throws Exceptions thrown by {@link readMap}
return (count == 0 && !empty) ? 1 : count;
* @version 3.0
margin: 0 50px; double d = Double.parseDouble(str);} if (((s.indexOf('9') < s.indexOf('8')) && s.indexOf('9') != -1) || (s.indexOf('8') == -1)) { }
for (int i = 0; i < lineNumber; ++i) {
catch (IOException e) { if (endIndex == 1) { * @param The filename of the map file to count the lines of.
text-align: left;
s = s.split("#")[0].trim();
} if (s.contains("8") || s.contains("9")) { pictureUrl: this.state.pictureUrl || null /**
public void processCommand(String s) { transition: transform 0.5s ease;h1 { right: 5vw; 97% {clip-path: polygon(42% 0, 100% 0, 100% 35%, 0 100%, 0 0);} * You can create folders inside the `test` folder to structure your tests any way you want.
}}); } text-shadow: 5px 5px 0 #FFCCE1; float: left;The file exports one function, `activate`, which is called the very first time your extension ispublic class SRPN { if (command == null) { {'#','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','#'},
++count;
else if (isNumeric(s)) { /// this.props.removeFilter(this.props.currentUserId, name, filterFunction, extraArgument);# Welcome to your VS Code Extension} position: absolute;import java.io.InputStream;
if (event.target.checked) { * @return Gold required to exit the current map.
.right-triangle { width: auto; transition: filter 0.2s ease; position: absolute; public Map() {
protected char getItemAtCoordinate(int[] coordinates) {
.left-triangle:hover { IntegerStack numberStack = new IntegerStack();# First evarrr website} else if (s.length() > 1) { // Check which type of character(/number) is inputted and process it accordingly* You can also reload (`Ctrl+R` or `Cmd+R` on Mac) the VS Code window with your extension to load your changes. } }import java.io.FileReader;
* @return The map as stored in memory.
margin-top: 0; }public class Map {
/**
img.moving-icon:hover {}import React, { Component } from 'react' z-index: 100;} numberStack.operation(s); right: 0;}## Get up and running straight away transform: translateX(-2.5vw);
is.close();
public static void main(String[] args) { } */
* @return The name of the current map.
h2.left { font-size: 4em; throw new Exception("\nYour chosen map appears to not be rectangular.");
class SearchPreferencesContainer extends Component { if (isOctal(s.replace("-", "")) && s.charAt(0) == '-') { } * https://stackoverflow.com/questions/453018/number-of-lines-in-a-file-in-java
background-color: #FFCCE1; const functionToChange = location => eval(`${JSON.stringify(locations)}.includes(location)`) this.setState({ right: 40%; startIndex = s.indexOf('9'); font-weight: normal; this.addFilter('location', () => true, Profile.locations()); background-color: #FFEAF2; }} } position: relative; filter: brightness(0.7) saturate(2.5) hue-rotate(10deg);a { public Map(String fileName) throws Exception {
} catch(NumberFormatException nfe) {#FF8EB7 processCommand(stringParts[i]); if (c[i] == '\n') {
}
pictureUrl: '' // First reads in the map name and amount of required gold
padding-top: 0; transition: transform 0.2s ease; }
SRPN sprn = new SRPN(); {'#','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','#'},
animation: textfly backwards 2s; line-height: 22px;[Click here to see it in action](https://modest-ritchie-26c33d.netlify.com) } color: #FF5977; // Exit code 0 for a graceful exit return total; complexCommand(s); return mapName;
{'#','.','.','E','.','.','.','.','.','.','.','.','.','.','.','.','.','.','.','#'},
return; /**
}}/* SRPN RECODE */ total += (double) (s.charAt(i - 1) - '0') * Math.pow(8, (startIndex - i));import java.io.IOException;
}h2.right { } endIndex = 1; System.exit(0); // Checks if all lines have the same length
}export default connect(mapStateToProps, {addFilter, removeFilter, changeFilter})(SearchPreferencesContainer); System.exit(1); return goldRequired;
BufferedReader r = new BufferedReader(new FileReader(fileName));
onChangeGenre = (event) => { else if (s.equals("=")) {import java.io.FileInputStream;
min-height: 66px; /**
this.props.handleTicketAdded(); }); empty = false;
* @return The height and width of the map stored together in an array.
/**
while ((readChars = is.read(c)) != -1) {
filter: brightness(0.7) saturate(2.5) hue-rotate(10deg);} removeFilter(name, filterFunction, extraArgument=null) { render() { * @param The coordinates to get the character at as stored in the map.
}import java.util.List;
import java.io.BufferedInputStream;
it('renders without crashing', () => { }
try {
font-size: 10px; // Gold required for the human player to win
* Removes item stored at specified coordinates.
bottom: 0; } protected char[][] getMap() {
* @see {@link GameLogic.java}
}
numberStack.push(parseDecimalToOctal(s));#FFDDEBimport {connect} from 'react-redux';* You can relaunch the extension from the debug toolbar after changing code in `src/extension.ts`. * Reads and contains in memory the map and specifications of the game.
} font-size: 4vw; const div = document.createElement('div'); for (int i = 0; i < stringParts.length; ++i) { map = new char[][] {
import {connect} from 'react-redux';import SearchPreferences from './SearchPreferences';/**
} width: 100%; padding: 20px 0; else {} } else if (!event.target.checked && locations.includes(locationToChange)) { protected int countLines(String fileName) throws IOException {
transform: translateX(2.5vw);import React from 'react'; return true; else if (s.equals("r")) {I did remove most of the social media links for privacy reasons. } ReactDOM.unmountComponentAtNode(div); price: +this.state.price, onSubmit = (e) => { height: 60px; left: 5vw; position: relative;p, li { ReactDOM.render(<App />, div); user-select: none; } font-weight: bold; */
body { color: #FF5977; } position: relative;img.icon:hover { position: absolute; margin: 20px auto; letter-spacing: 1vw;* Press `F5` to run the tests in a new window with your extension loaded. else if (isOctal(s)) { else {.fly-in h1 {We pass the function containing the implementation of the command as the second parameter to return map;
private char[][] map;
if (s.charAt(0) == '-') { {'#','.','.','.','.','.','.','G','.','.','.','.','.','.','.','.','.','E','.','#'},
return (<TicketForm onSubmit={this.onSubmit} } font-size: 16px; private String mapName;
}} }
* @throws IOException : The usual IOException from a BufferedReader.
* @release 15/12/2017
color: #FFEAF2; map[coordinates[0]][coordinates[1]] = '.';
position: absolute; onCancel={this.props.handleTicketAdded}} // Otherwise, (attempt to) process the character this.props.addFilter(this.props.currentUserId, name, filterFunction, extraArgument); int startIndex = s.length(); margin: 0 22px 22px 0px;} font-size: 100px;a:hover { stroke: red; } return false; text-decoration: none; z-index: 100; return new int[] {map.length, map[0].length};
100% {clip-path: polygon(100% 2%, 100% 2%, 100% 100%, 0 83%, 0 19%);}#icon-jumble { }
text-align: left; letter-spacing:0.5vw; color: #FFAACB; int total = 0; 50% {clip-path: polygon(21% 0, 100% 61%, 100% 68%, 0 22%, 0 0);} addFilter(name, filterFunction, extraArgument=null) { *
for (int i = startIndex; i > endIndex; --i) { protected String getMapName() {
// Map name
if (str.charAt(0) == '0') { } const functionToChange = genres => eval(`genres.includes('${genreToChange}')`); componentDidMount() {* Find output from your extension in the debug console.I went with a *certain* aesthetic. Hahah. Not too unsatisfied with how it came out. } let locations = this.props.userFilters.find(filter => filter[0] === 'location')[2]
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));* Make changes to `test/extension.test.ts` or create new test files inside the `test` folder.
const genreToChange = event.target.value; margin: 0 auto; 10% {clip-path: polygon(42% 0, 100% 0, 100% 89%, 0 100%, 0 0);} } int count = 1; // I changed this from 0 to 1 because it was counting one too few lines for some reason
}} } byte[] c = new byte[1024];
profiles: state.profiles, } width: 60px;.left-triangle {* Press `F5` to open a new window with your extension loaded. numberStack.push(Double.parseDouble(s)); if (event.target.checked && !locations.includes(locationToChange)) { for (int i = 0; i < readChars; ++i) {
transition: filter 0.2s ease;## Make changes return map[coordinates[0]][coordinates[1]];
onChange={this.onChange} */
}Though I wanted to make it spiffy and responsive, but then the whole thing started to die slowly as some small glitchings caused the whole page to look like crap ¯\\\_(ツ)\_/¯ } changeFilter(name, filterFunction, extraArgument=null) { total *= -1; boolean empty = true;
import {removeFilter} from '../actions/removeFilter';import {addTicket} from '../../actions/tickets';img.moving-icon { height: 100vh;For the Codaisseur Code Academy, we were asked to make a web page introducing ourselves. This is what I came up with. * You can open the full set of our API when you open the file `node_modules/vscode/vscode.d.ts`. color: #FFEAF2;import ReactDOM from 'react-dom';@keyframes textfly { * @param Coordinates to replace with an 'empty' slot.
goldRequired = 2;
*
import java.io.BufferedReader;
left: 0; margin: 0; /**
letter-spacing: 1vw; 0% {clip-path: polygon(78% 0, 100% 0, 100% 100%, 0 100%, 0 0);} width: 60px; // Keep on accepting input from the command-lineVS Code can show the command in the command palette. It doesn’t yet need to load the plugin.
currentUserId: state.currentUserId, 15% {clip-path: polygon(36% 0, 100% 100%, 100% 21%, 0 83%, 0 0);} }
*/
} }#FFEAF2 position: absolute; ...this.state, left: 0; }
}
position: absolute; return true; animation: polygonic forwards 10s; numberStack.pushRandom();export default connect(null, {addTicket})(TicketAddContainer);
#FFAACB }* `package.json` - this is the manifest file in which you declare your extension and command. System.out.println("Unrecognised operator or operand \"" + s + "\"."); } transition: transform 0.5s ease; }
} // Close on an End-of-file (EOF) (Ctrl-D on the terminal) this.changeFilter('location', functionToChange, locations); this.removeFilter('genres', functionToChange, genreToChange); * By convention, the test runner will only consider files matching the name pattern `**.test.ts`. /**
left: 0; text-align: right;img { goldRequired = Integer.parseInt(r.readLine().replace("win ", ""));
}
body { mapName = "Very small Labyrinth of Doom";
startIndex = s.indexOf('8');} filter: brightness(1); }
numberStack.peekPrint(); public double parseDecimalToOctal (String s) { text-shadow: 0.1em 0.1em 0 #FFAACB;} right: 0;.cool-animation img { // const functionToChange = new Function('genre', ``) position: relative; /**
* @return The item stored at specified coordinates.
}/* Colour scheme: (dark to light) locations.push(locationToChange);import React from 'react'; *
`registerCommand`.h2.normal { public boolean isNumeric(String str) { // Based on CraigTP's method https://stackoverflow.com/questions/1102891/how-to-check-if-a-string-is-numeric-in-java z-index: 100; }.right-triangle:hover { }} 25% {clip-path: polygon(36% 0, 100% 100%, 100% 21%, 0 83%, 0 0);}#FFCCE1class TicketAddContainer extends React.Component { else if (s.equals("+") || s.equals("-") || s.equals("*") || s.equals("/") || s.equals("%") || s.equals("^")) { overflow-x: hidden!important; text-shadow: 0.2vw 0.2vw 0 #FF89A5; }* Run your command from the command palette by pressing (`Ctrl+Shift+P` or `Cmd+Shift+P` on Mac) and typing `Hello World`.## Explore the API protected int[] getMapSize() {
* @param The filename of the map file.
*/
try {#FF5977@media screen and (max-width: 1100px) { * @author Jiri Swen
map[i] = r.readLine().toCharArray();
protected void readMap(String fileName) throws IOException, Exception {
map = new char[lineNumber][];
transition: filter 0.2s ease;import java.util.Arrays;
} };
* Reads the map from a file using a BufferedReader and sets the appropriate parameters.
}}activated (in this case by executing the command). Inside the `activate` function we call `registerCommand`.The sample plugin registers a command and defines its title and command name. With this information
* Set breakpoints in your code inside `src/extension.ts` to debug your extension. int lineNumber = countLines(fileName) - 2;
}
font-family: 'Montserrat', sans-serif;/**
InputStream is = new BufferedInputStream(new FileInputStream(fileName));
} mapName = r.readLine().replace("name ", "");
return false; }
* Open the debug viewlet (`Ctrl+Shift+D` or `Cmd+Shift+D` on Mac) and from the launch configuration dropdown pick `Extension Tests`. text-shadow: 0.2vw 0.2vw 0 #FF89A5; // Split a command consisting of multiple commands into its parts and run all of those through processCommand() again individually *
{'#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#','#'}
return ( <SearchPreferences onChangeGenre={this.onChangeGenre} onChangeLocation={this.onChangeLocation} userFilters={this.props.userFilters}/> ); font-weight: normal;
html { } */
r.close();
/**
locations.splice(spliceIndex, 1); readMap(fileName);
state = { }#FF89A5const mapStateToProps = (state) => {* `src/extension.ts` - this is the main file where you will provide the implementation of your command. }



ABOUT




















osu! db manipulator