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
| git for-each-ref --sort=committerdate refs/heads/ --format='%(committerdate:short) %(refname:short)' |
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
| using System; | |
| using System.Collections; | |
| public class City | |
| { | |
| public int x, y; | |
| public City(int p1, int p2) | |
| { | |
| x = p1; |
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
| -- delete a customer | |
| -- bcos of constraint | |
| -- first turn off foreign_key_checks | |
| SET foreign_key_checks = 0; | |
| -- dorp customer(s) | |
| SET foreign_key_checks = 1; | |
| -- INNER JOIN | |
| -- fetch details of customers and orders they made | |
| -- wont show details of orders of customer 11 |
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 * as express from 'express'; | |
| import {Application} from "express"; | |
| const webpush = require('web-push'); | |
| const bodyParser = require('body-parser'); | |
| const cors = require('cors'); | |
| const vapidKeys = { | |
| "publicKey":..., | |
| "privateKey":... | |
| } |
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
| function isMultiple(number, baseNumber) { return !(number % baseNumber); } | |
| for (var i = 1; i < 101; i++) { | |
| if (isMultiple(i,3)){ | |
| if (isMultiple(i,5)) { | |
| console.log("FizzBuzz") | |
| } else { | |
| console.log("Fizz") | |
| } | |
| }else if(isMultiple(i,5)) { |
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
| function hookupevents(){ | |
| for(var i = 0; i < 3; i++){functon(index){ | |
| document.getElementsById("button" + index).addEventListener('click', function() {alert (index)}) | |
| } | |
| } | |
| } |
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
| function handler(index) { | |
| alert(index) | |
| } | |
| function hookupevents() { | |
| for (var i = 0; i < 3; i++) { | |
| document.getElementById("button" + i).addEventListener("click", handler.bind(this,i)); | |
| } | |
| } |
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 getData = limit => { | |
| const data = []; | |
| let index = 0; | |
| while(index < limit){ | |
| data.push(`Item ${index}`); | |
| index++; | |
| } | |
| return data; | |
| } |
NewerOlder