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
(()=>{ | |
const myFriends = [ | |
{ name: "Bob", age: 20}, | |
{ name: "Jane", age: 18}, | |
{ name: "Mary", age: 16}, | |
]; | |
const checkAges = (friends, ages) => { | |
ages.forEach((age, i) => { | |
const friendsAge = friends[i].age; |
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
"use strict"; | |
const G = { | |
vertices: [{ | |
edges: [1, 4] | |
}, { | |
edges: [0, 2, 3, 4] | |
}, { | |
edges: [1, 3] | |
}, { | |
edges: [1, 2, 4] |
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
1. List employees (names) who have a bigger salary than their boss | |
SELECT | |
e.`name` | |
FROM | |
employees AS e | |
INNER JOIN employees AS b ON e.bossid = b.employeeid | |
WHERE | |
e.salary > b.salary |
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 main | |
import "fmt" | |
import "runtime" | |
func main() { | |
fmt.Printf("Google Go version : %s", runtime.Version() ) | |
} |
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
/** | |
* Combines all the elements into a string seperated the `delimiter`. | |
* Same as `Array.prototype.join()` in Javascript. | |
* @example | |
ArrayList<String> x = new ArrayList<String>(); | |
x.add("1"); | |
x.add("2"); | |
joinArrayListString(x, ",").equals("1,2") == 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
<html> | |
<head> | |
<meta charset="utf-8"/> | |
<link rel="stylesheet" | |
href="http://code.jquery.com/qunit/git/qunit.css" type="text/css" | |
media="screen" /> | |
</head> | |
<body> | |
<p> | |
<input type="text" class="date"/> |