This file contains 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
════════ Exception caught by widgets library ═══════════════════════════════════ | |
The following assertion was thrown while applying parent data.: | |
Incorrect use of ParentDataWidget. | |
The ParentDataWidget Expanded(flex: 1) wants to apply ParentData of type FlexParentData to a RenderObject, which has been set up to accept ParentData of incompatible type BoxParentData. | |
Usually, this means that the Expanded widget has the wrong ancestor RenderObjectWidget. Typically, Expanded widgets are placed directly inside Flex widgets. | |
The offending Expanded is currently placed inside a Padding widget. | |
The ownership chain for the RenderObject that received the incompatible parent data was: |
This file contains 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
<!doctype html> | |
<meta charset="utf8"> | |
<h1>Mountains</h1> | |
<div id="mountains"></div> | |
<script> | |
const MOUNTAINS = [ |
This file contains 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
class App { | |
constructor(root) { | |
this.interface = new Interface(root); | |
} | |
} | |
class Interface { | |
constructor(root) { | |
root.innerHTML = '<button id="testButton">click me!</button>'; |
This file contains 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 mustache = require("mustache"); | |
var fs = require("fs"); | |
fs.readFile("app/views/index.mustache", function (err, data) { | |
if (err) throw err; | |
var output = mustache.render(data.toString(), {}); | |
fs.writeFile('public/index.html', output, function (err) { | |
if (err) throw err; | |
}); |
This file contains 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
// Copyright (c) 2014 The Chromium Authors. All rights reserved. | |
// Use of this source code is governed by a BSD-style license that can be | |
// found in the LICENSE file. | |
(function() { | |
'use strict'; | |
/** | |
* T-Rex runner. | |
* @param {string} outerContainerId Outer containing element id. | |
* @param {Object} opt_config | |
* @constructor |
This file contains 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 size = 8; | |
var board = ""; | |
for (var y = 0; y < size; y++) { | |
for (var x = 0; x < size; x++) { | |
if ((x + y) % 2 == 0) | |
board += " "; | |
else | |
board += "#"; |
This file contains 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
/* | |
Write a program that uses console.log to print all the numbers from 1 to 100, | |
with two exceptions. For numbers divisible by 3, print "Fizz" instead of the number, | |
and for numbers divisible by 5 (and not 3), print "Buzz" instead.” | |
https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Operators/Arithmetic_Operators | |
*/ | |
for (var n = 1; n <= 100; n++) { | |
var output = ""; | |
if (n % 3 == 0) |
This file contains 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
/* | |
Write a loop that makes seven calls to console.log to output the following triangle: | |
# | |
## | |
### | |
#### | |
##### | |
###### | |
####### | |
*/ |
This file contains 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 json = $( "form" ).serializeArray(); | |
$.each( json, function( index, elem ){ | |
$( "[name='" + elem.name + "']" ).val( elem.value ); | |
}); |
This file contains 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 items = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; | |
var parent = []; | |
var size = []; | |
for (i = 0; i < items.length; ++i){ | |
parent[i] = i; | |
size[i] = 1; | |
} |
NewerOlder