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
[[source]] | |
url = "https://pypi.python.org/simple" | |
verify_ssl = true | |
name = "pypi" | |
[dev-packages] | |
[requires] | |
python_version = "3.6" |
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
class Katakana2Hiragana { | |
public static void main(String args[]) { | |
System.out.println((char)("ガ".charAt(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
tell application "Google Chrome" | |
set myURL to get URL of active tab of first window | |
set myTitle to get title of active tab of first window | |
end tell | |
tell application "Safari" to add reading list item myURL with title myTitle |
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
#include <stdio.h> | |
#include <ctype.h> | |
#include <stdarg.h> | |
#include <stdlib.h> | |
#include <string.h> | |
static char *p; | |
static char func[26][100]; | |
__attribute__((noreturn)) static void error(char *fmt, ...) { |
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
#include <sys/types.h> | |
#include <sys/stat.h> | |
#include <stdio.h> | |
#include <unistd.h> | |
#include <fcntl.h> | |
int main() { | |
int fd; | |
char buf[2]; | |
fd = open("filename.txt", 2); |
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 java.io.File | |
object TrainSampleWithScala extends App { | |
def train() { | |
val parameter: Parameter = new Parameter(SolverType.AVERAGE, 10) | |
val model: PerceptronModel = PerceptronModel.train(docs, parameter) | |
return model | |
} |
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 socketio = require('socket.io-client') | |
const socket = socketio('http://localhost:8888'); | |
socket.on('update', d => console.log(d)); | |
socket.on('dynamo', d => console.log(d)); | |
// socket.on('connect', function(){}); | |
// socket.on('event', d => console.log(d)); | |
// socket.on('disconnect', function(){}); |
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
document.body.querySelectorAll('h1, h2, h3, h4, h5, h6').forEach((e) => { | |
e.innerHTML = `<a href="#${e.getAttribute("id")}">${e.innerHTML}<a>`; | |
}); |
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 tunes = document.querySelectorAll('audio'); | |
tunes.forEach((e, i) => e.onended = () => tunes[i + 1].play()); |
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
package sax; | |
import org.xml.sax.Attributes; | |
import org.xml.sax.ErrorHandler; | |
import org.xml.sax.SAXException; | |
import org.xml.sax.SAXParseException; | |
import org.xml.sax.XMLReader; | |
import org.xml.sax.helpers.DefaultHandler; | |
import java.io.File; |