😱😱
> var s = 'hello [object Object] null undefined'
> s.indexOf([])
0
> s.indexOf({})
6
> s.indexOf(null)
22
| public class Bulbs { | |
| public static void main(String[] args) { | |
| Board challenge = new Board(3); | |
| challenge.set(1, 0, true); | |
| System.out.println("CHALLENGE"); | |
| System.out.println(challenge); | |
| System.out.println("SOLUTION"); |
😱😱
> var s = 'hello [object Object] null undefined'
> s.indexOf([])
0
> s.indexOf({})
6
> s.indexOf(null)
22
| @keyframes fadein { | |
| from { | |
| opacity: 0; | |
| } | |
| to { | |
| opacity: 1; | |
| } | |
| } | |
| .app { |
| // In *both* the main and renderer processes | |
| // For example, in both main/index.js and renderer/index.js | |
| var crashReporter = require('../crash-reporter') | |
| crashReporter.init() | |
| // Separately, create crash-reporter.js, shared by main and renderer: | |
| module.exports = { | |
| init | |
| } |
| // In the main process, check whether the app is starting | |
| // because the user dragged files onto the app icon | |
| process.argv.forEach(onOpen) | |
| // Open handlers should be added on the first tick. | |
| // These fire if the app is already running and the user | |
| // drags files or URLs onto the dock icon, or if they set | |
| // the app as a handler for a file type and then open a file | |
| app.on('open-file', onOpen) | |
| app.on('open-url', onOpen) |
| const win = new electron.BrowserWindow(...) | |
| // When work makes progress, show the progress bar | |
| function onProgress (progess) { | |
| // Use values 0 to 1, or -1 to hide the progress bar | |
| win.setProgressBar(progress || -1) // Progress bar works on all platforms | |
| } | |
| // When work completes while the app is in the background, show a badge | |
| var numDoneInBackground = 0 |
| console.time('init') | |
| // require() calls and early initialization | |
| [...] | |
| var state = State.getInitialState() | |
| // `state.saved` is read from and written to a file. All other state is ephemeral. | |
| // First we load state.saved, once that is done, initialize the app. | |
| loadState(init) |
| console.time('init') | |
| // require() calls and early initialization | |
| [...] | |
| var state = State.getInitialState() | |
| // `state.saved` is read from and written to a file. All other state is ephemeral. | |
| // First we load state.saved, once that is done, initialize the app. | |
| loadState(init) |