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 org.apache.nifi.util.StopWatch; | |
import java.util.concurrent.TimeUnit; | |
class Scratch { | |
// https://github.com/apache/nifi/blob/02261311b3b3f765ebb394f8f101b0373a7fb3ab/nifi-commons/nifi-utils/src/main/java/org/apache/nifi/util/StopWatch.java#L77 | |
public static void main(String[] args) { | |
StopWatch stopWatch = new StopWatch(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
package harschware.sandbox.scratch; | |
import org.springframework.beans.factory.FactoryBean; | |
import org.springframework.context.ApplicationContext; | |
import org.springframework.context.support.ClassPathXmlApplicationContext; | |
import java.util.Arrays; | |
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
import org.springframework.aop.target.HotSwappableTargetSource; | |
import org.springframework.context.ApplicationContext; | |
import org.springframework.context.support.GenericXmlApplicationContext; | |
/** | |
* Inspired by: https://stackoverflow.com/a/12808171/154461 | |
*/ | |
public class SwappableBeans { | |
public static void main(String... args) { |
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": "import org.apache.spark.sql._\nvar d = sqlContext.sql(\"SELECT tbl10.`venueid`, tbl10.`venuename`, tbl10.`venuecity`, tbl10.`venuestate`, tbl10.`venueseats`, tbl10.`processing_dttm` AS `venues_processing_dttm` FROM `concerts`.`venues` tbl10\")\nvar e = d.schema\n%json e\n", | |
"id": 7, | |
"output": { | |
"data": { | |
"application/json": [ | |
{ | |
"dataType": {}, | |
"metadata": { | |
"map": {} |
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": "import org.apache.spark.sql._\nvar d = sqlContext.sql(\"SELECT tbl10.`venueid`, tbl10.`venuename`, tbl10.`venuecity`, tbl10.`venuestate`, tbl10.`venueseats`, tbl10.`processing_dttm` AS `venues_processing_dttm` FROM `concerts`.`venues` tbl10\")\nd.schema\n", | |
"id": 5, | |
"output": { | |
"data": { | |
"text/plain": "import org.apache.spark.sql._\nd: org.apache.spark.sql.DataFrame = [venueid: int, venuename: string, venuecity: string, venuestate: string, venueseats: int, venues_processing_dttm: string]\nres2: org.apache.spark.sql.types.StructType = StructType(StructField(venueid,IntegerType,true), StructField(venuename,StringType,true), StructField(venuecity,StringType,true), StructField(venuestate,StringType,true), StructField(venueseats,IntegerType,true), StructField(venues_processing_dttm,StringType,true))\n" | |
}, | |
"execution_count": 5, | |
"status": "ok" | |
}, |
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": "import org.apache.spark.sql._\nvar d = sqlContext.sql(\"SELECT tbl10.`venueid`, tbl10.`venuename`, tbl10.`venuecity`, tbl10.`venuestate`, tbl10.`venueseats`, tbl10.`processing_dttm` AS `venues_processing_dttm` FROM `concerts`.`venues` tbl10\")\nval e = d.take(2)\n%json e\n", | |
"id": 13, | |
"output": { | |
"data": { | |
"application/json": [ | |
{ | |
"schema": [ | |
{ | |
"dataType": {}, |
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
#!/usr/bin/perl | |
# Produces output found at the end of this script / after __END__ | |
use TAP::Parser; | |
my $NO_DESC = <<EOF; | |
1..1 | |
ok 1 # skip for a really good reason | |
EOF |
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 harschware.sandbox; | |
import java.io.IOException; | |
import java.security.Security; | |
import java.util.concurrent.TimeUnit; | |
import net.schmizz.sshj.SSHClient; | |
import net.schmizz.sshj.common.IOUtils; | |
import net.schmizz.sshj.connection.channel.direct.Session; | |
import net.schmizz.sshj.connection.channel.direct.Session.Command; |
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 com.hp.hpl.jena.sparql.path; | |
import static org.junit.Assert.assertEquals; | |
import java.io.File; | |
import org.junit.Test; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; |
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
2013-Oct-04 17:52:34.010 PDT DEBUG [main] [org.apache.jena.riot.stream.JenaIOEnvironment:createLocationMapper] [JenaIOEnvironment.java:181] [] [] [] - Failed to find configuration: location-mapping.ttl;location-mapping.rdf;location-mapping.n3;etc/location-mapping.rdf;etc/location-mapping.n3;etc/location-mapping.ttl | |
=== FILE CONTENTS === | |
_:b0 <http://p> <http://o> . | |
=== MODEL CONTENTS === | |
blank URI URI | |
Exception in thread "main" com.hp.hpl.jena.shared.BadURIException: Only well-formed absolute URIrefs can be included in RDF/XML output: <http://> Code: 57/REQUIRED_COMPONENT_MISSING in HOST: A component that is required by the scheme is missing. | |
at com.hp.hpl.jena.xmloutput.impl.BaseXMLWriter.checkURI(BaseXMLWriter.java:820) | |
at com.hp.hpl.jena.xmloutput.impl.BaseXMLWriter.xmlnsDecl(BaseXMLWriter.java:339) | |
at com.hp.hpl.jena.xmloutput.impl.Basic.writeRDFHeader(Basic.java:64) | |
at com.hp.hpl.jena.xmloutput.impl.Basic.writeBody(Basic.java:47) |
NewerOlder