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.Diagnostics; | |
namespace CsTests | |
{ | |
class Program | |
{ | |
public static void Main (string[] args) | |
{ | |
Console.WriteLine ("Hello World!"); |
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'; | |
class Abstract { | |
// A static abstract method. | |
static foo() { | |
if (this === Abstract) { | |
// Error Type 2. Abstract methods can not be called directly. | |
throw new TypeError("Can not call static abstract method foo."); | |
} else if (this.foo === Abstract.foo) { | |
// Error Type 3. The child has not implemented this method. | |
throw new TypeError("Please implement static abstract method 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
// Once bound, apply does nothing. | |
(function () {console.log(this.bar);}).bind({bar: true}).apply({bar: false}); | |
// Output: 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
/** | |
* @license | |
* Copyright 2016 Xingchen Hong | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* |
- Fake a special Wi-Fi access point.
- The goal is to disguise your Wi-Fi access point to trick your 3DS into believing that it's in contact with some special Wi-Fi access points.
- The following steps are assuming using a Mac computer just because that's what I did. If you have some other devices, the overall process should be similar.
- Change the MAC address of your Wi-Fi card.
- Write down the original MAC address of the Wi-Fi card so you can restore it later. You could find the MAC address in your system report.
- Also find the network interface name of your Wi-Fi card. In my case that's "en1".
- Turn on your Wi-Fi so that the Wi-Fi card is powered on.
- Open Terminal, run
sudo ifconfig en1 ether 4E:53:50:4F:4F:4C
to change the MAC address of your Wi-Fi card.
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
// Start from a Promise. | |
var foo = new Promise(function (resolve, reject) { | |
// Has to resolve to run callbacks in `.then()`. | |
resolve(1); | |
}); | |
foo.then(function (result) { | |
// Received final resolve value from the Promise. | |
// result === 1; | |
console.log('result 1', result); |
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 nodePath = process.argv[0], | |
exePath = process.argv[1], | |
inputPath = process.argv[2], | |
fs = require('fs'); | |
if (typeof inputPath === 'undefined') { | |
throw new Error('Need to specify input file path.'); | |
} |
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
# Dockerfile for the TerraRef hyperspectral image conversion extractor | |
# August 17, 2016 | |
FROM ubuntu:14.04 | |
MAINTAINER Yan Y. Liu <[email protected]> | |
# install common libraries and python modules | |
USER root | |
RUN apt-get update | |
RUN apt-get upgrade -y -q | |
RUN apt-get install -y -q build-essential m4 swig antlr libantlr-dev udunits-bin libudunits2-dev unzip cmake wget git libjpeg-dev libpng-dev libtiff-dev |
OlderNewer