package com.company;
public class Main {
public static void main(String[] args) {
SoftwareEngineer a = new SoftwareEngineer();
((Employee)a).foo();
}
}
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
var RESPONSIVE_BREAKPOINT_WIDTH = 770; | |
var mileStone, home, master, productListing, productListDropdown; | |
var isResponsive = false; | |
var pagePos = 0; | |
var storeLocator; | |
var featuredPhotoArr = []; | |
var isMobile = checkMobile(); | |
if (!Object.keys) { | |
Object.keys = (function() { |
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
defmodule MyModule do | |
def doSomething(num) do | |
if num != 1 do | |
{:ok, num + 1} | |
else | |
{:error, "some reason"} | |
end | |
end | |
end |
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
defmodule PongServer do | |
use GenServer | |
def handle_call(:ping, _from, state) do | |
:timer.sleep(1000) | |
{:reply, { :ok, "pong #{state}" }, state} | |
end | |
end |
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'; | |
//data type | |
class Option { } | |
Option.None = class { toString() { return "None" } }; | |
Option.Some = class { constructor(value) { this.some = value } toString() { return `Some:${this.some}` } }; | |
//computation builder | |
let maybe = function (genFunc) { | |
let gen = new genFunc(); |
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 util = require("util"); | |
let foo = {}; | |
let bar = {}; | |
foo.ref = bar; | |
bar.ref = foo; | |
console.log(JSON.stringify(foo)); |
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 co = require("./co.js"); | |
const co_nothrow = require("./co-nothrow"); | |
var boom = ()=> { | |
return new Promise((resolve, reject)=>{ | |
setTimeout(()=>{ | |
reject("boom"); | |
}, 1000); |
Top 10 javascript developer in HK rated by activities
SELECT actor_attributes_email, count(*) as cnt
FROM [githubarchive:github.timeline]
where actor_attributes_location like "%Hong%" and repository_language = "JavaScript"
group by actor_attributes_email
order by cnt desc
LIMIT 10;