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
-- Try the sample using this URL | |
-- http://elm-lang.org/try | |
import Html exposing (beginnerProgram, div, button, text, p, Html, span) | |
import Html.Events exposing (onClick) | |
import Array | |
main = | |
beginnerProgram { model = [0,7], view = view, update = update } | |
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
import Html exposing (..) | |
import Html.Attributes exposing (..) | |
import Html.Events exposing (..) | |
import Http | |
import Json.Decode as Decode | |
import Json.Encode as Encode | |
main = |
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
const http = require('http') | |
const url = require("url"); | |
const fs = require('fs'); | |
const port = 3000 | |
const requestHandler = (request, response) => { | |
var pathname = url.parse(request.url).pathname; | |
console.log("Request for " + pathname + " received. "+(pathname === '/persons')); | |
var json = JSON.parse(fs.readFileSync('./persons.json', 'utf8')); |
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> | |
<html> | |
<body> | |
<canvas id="canvas" width="900" height="300" style="border:1px solid #000000; background: #F4F6F6"> | |
Your browser does not support the HTML5 canvas tag.</canvas> | |
<script> | |
function Vector(x,y) { | |
this.x = x; |
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> | |
<html> | |
<body> | |
<canvas id="canvas" width="400" height="600"> | |
Your browser does not support the HTML5 canvas tag.</canvas> | |
<script> | |
function Vector(x,y) { | |
this.x = x; |
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 childrens = [{name: 'ql-0', childrens : [ { name: 'ql-0-0' }] },{name: 'ql-1'}, {name: 'ql-2', childrens : [ { name: 'ql-2-0' }, { name: 'ql-2-1' }] }] | |
function recursive(children, i){ | |
return children.map((child, index) => { | |
if(child.childrens) return Object.assign({},child,{index: `${i}-${index}`, childrens: recursive(child.childrens, `${i}-${index}`)}); | |
else return Object.assign({},child,{index: `${i}-${index}`}); | |
}) | |
} | |
var a = recursive(childrens,'ql'); |
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> | |
<html> | |
<body> | |
<canvas id="myCanvas" width="200" height="100" style="border:1px solid #d3d3d3;"> | |
Your browser does not support the HTML5 canvas tag.</canvas> | |
<script> | |
var c = document.getElementById("myCanvas"); | |
var ctx = c.getContext("2d"); |
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> | |
<html> | |
<body> | |
<canvas id="myCanvas" width="300" height="150" style="border:1px solid #d3d3d3;"> | |
Your browser does not support the HTML5 canvas tag.</canvas> | |
<script> | |
var mouseX = 0; | |
var mouseY = 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
<!DOCTYPE html> | |
<html> | |
<body> | |
<canvas id="myCanvas" width="640" height="640" style="border:1px solid #d3d3d3; background: black;"> | |
Your browser does not support the HTML5 canvas tag.</canvas> | |
<script> | |
var c = document.getElementById("myCanvas"); |
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> | |
<html> | |
<head> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> | |
<script> | |
$(document).ready(() => { | |
$("#grid").click(() => { | |
}); | |
}); |
OlderNewer