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 com.google.challenges; | |
public class Answer { | |
public static int answer(int[] l) { | |
// Your code goes here. | |
} | |
} |
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 com.google.challenges; | |
public class Answer { | |
public static int locate(int head, int target, int under) { | |
under /= 2; | |
int right = head - 1; // right = head - 1 | |
int left = head - 1 - under--; // left = head - 1 - under/2 | |
if (right == target || left == target) |
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
{ | |
"name": "javascript-development-environment", | |
"version": "1.0.0", | |
"description": "JavaScript Development Environment by Dani Vijay", | |
"scripts": { | |
"prestart": "node buildScripts/startMessage.js", | |
"start": "npm-run-all --parallel security-check open:src", | |
"open:src": "node buildScripts/srcServer.js", | |
"security-check": "nsp check", | |
"localtunnel": "lt --port 3000", |
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
#editorconfig.org | |
root=true | |
[*] | |
indent_style = space | |
indent_size = 2 | |
end_of_line = If | |
charset = utf-8 | |
trim_trailing_whitespace = true | |
insert_final_newline = true |
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
var express = require('express'); | |
var path = require('path'); | |
var open = require('open'); | |
var port = 3000; //choose different, if this port not available | |
var app = express(); | |
app.get('/',function(req, res) { | |
res.sendFile(path.join(__dirname, '../src/index.html')); | |
}); |
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 webpack from 'webpack'; | |
import path from 'path'; | |
export default { | |
devtool: 'inline-source-map', | |
entry: [ | |
path.resolve(__dirname, 'src/index') | |
], | |
target: 'web', | |
output: { |
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 express from 'express'; | |
import path from 'path'; | |
import open from 'open'; | |
const port = 3000; //choose different, if this port not available | |
const app = express(); | |
app.get('/',function(req, res) { | |
res.sendFile(path.join(__dirname, '../src/index.html')); | |
}); |
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 chalk from 'chalk'; | |
console.log(chalk.green('Starting app in dev mode...')); |
- Forgot the
npm install
command. - Clone again.
- Change the current working directory to wittr.
- Correct: npm run serve Incorrect: npm run server.
- Delete the current folder and try installing from scratch.
OlderNewer