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
from pyspark import SparkConf, SparkContext | |
import sys | |
assert sys.version_info >= (3, 5) # make sure we have Python 3.5+ | |
# add more functions as necessary | |
def toTupples(line): | |
frags = line.split(" ") | |
return (frags[0], (frags[1], frags[2], frags[3], frags[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
{"code":200,"uwp":1} |
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 the_package.MyObject; | |
import the_package.OtherObject; | |
import the_package.SubMyObject; | |
import java.lang.reflect.Field; | |
import java.lang.reflect.InvocationTargetException; | |
import java.lang.reflect.Method; | |
import java.lang.reflect.Modifier; | |
import java.util.Objects; |
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
Classfile /home/kxu/Documents/github.com/tabjy/java-snippets/target/classes/com/tabjy/snippets/asm/path_syntax_evaluation/Pojo.class | |
Last modified Nov 20, 2019; size 800 bytes | |
MD5 checksum ce2027f5c28d4f1634e8c67ef84efd97 | |
Compiled from "Pojo.java" | |
public class com.tabjy.snippets.asm.path_syntax_evaluation.Pojo | |
minor version: 0 | |
major version: 55 | |
flags: (0x0021) ACC_PUBLIC, ACC_SUPER | |
this_class: #9 // com/tabjy/snippets/asm/path_syntax_evaluation/Pojo | |
super_class: #10 // java/lang/Object |
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 org.openjdk.jmc.agent.util; | |
import java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.List; | |
// polyfill for pre-11 nest-based access control | |
public class NestBasedAccess { | |
private static int bar = 42; | |
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 org.openjdk.jmc.agent.util; | |
import java.lang.reflect.Field; | |
import java.lang.reflect.InvocationTargetException; | |
import java.lang.reflect.Method; | |
import java.lang.reflect.Modifier; | |
import java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.LinkedList; | |
import java.util.List; |
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 svg = document.querySelectorAll('#chart svg')[0] | |
const width = svg.getAttribute("width") | |
const height = svg.getAttribute("height") | |
const image = new Image() | |
image.setAttribute("width", width) | |
image.setAttribute("height", height) | |
const clone = svg.cloneNode(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
const svg = document.querySelectorAll('#chart svg')[0] | |
const width = svg.getAttribute("width") | |
const height = svg.getAttribute("height") | |
const image = new Image() | |
image.setAttribute("width", width) | |
image.setAttribute("height", height) | |
const clone = svg.cloneNode(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
"use strict"; | |
function _instanceof(left, right) { if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) { return !!right[Symbol.hasInstance](left); } else { return left instanceof right; } } | |
(function () { | |
var write = function write(content) { | |
output.value += content; | |
output.scrollTop = output.scrollHeight; | |
}; |
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 http = require('http') | |
const crypto = require('crypto') | |
const server = http.createServer((req, res) => { | |
console.log('got request', req.url) | |
res.writeHead(200, { 'Content-Type': 'text/plain' }) | |
res.end('okay') | |
}) | |
server.on('upgrade', function (req, socket) { |