datamaskin Goto Github PK
Name: David Brown
Type: User
Company: davidwbrown.name
Location: Kemah, TX
Blog: https://davidwbrown.name
Name: David Brown
Type: User
Company: davidwbrown.name
Location: Kemah, TX
Blog: https://davidwbrown.name
JPhant: Java Library for PHant Access https://github.com/JPhant/JPhant_Java_Based_Phant_Library *** Features *** Fully Configurable (Public/Private/Delete Keys, Fieldnames, BaseURL, ProxyHost & Port, use GET or POST.) Can Handle multiple simultaneous Phant Data Streams in same program. Can use GET or POST (Using POST will encrypt your PrivateKey and Data in transit.) Can Send/Receive any Character 0 through 127 Support for Paging (Data > 50K.) * Add Data using Get or Post Methods (Configurable.) * Get Data in efficient Format: String[][] aaExample = { {"Field1", "Field2"}, {"Value1", "Value2"}... } * (Or Get Data in Raw Formats - Csv, Json, Jsonp.) * Clear all Data * Get Status in efficient Format (a Stats class encapsulating Cap, PageCount, Remaining, and Used.) * (Or Get Status in Raw Formats - Csv, Json, Jsonp.) * Get Rate Limits (Limit, Remaining, Reset - only valid after addData().) * Convert to/from supported Data Structures (String[][] and ArrayList<ArrayList<String>>.) * Smart CSV Extraction (handles embedded Quotes, Commas, Carriage Returns, and Line Feeds.) * Automatic Retries on HTTPConnection Errors (up to 5 retries.) * Can optionally use a ProxyHost and Port (if you're behind a company Firewall/Proxy Server.) ------------------------------------------------------------------------- I'm going to be very busy for the next few months, and can't develop this further. I hereby put this "as is" in the Public Domain, I hope someone will pick it up and run with it. Here is a quick overview... ------------------------------------------------------------------------- To use: 1) --- Initialize --- 1a) Create a class that implements JPhantConfig and enter the appropriate Keys and Fieldnames. (see JPhant_Config_0.java for an example.) 2) --- Configure --- 2a) Instantiate a JPhant instance, for example... JPhant jPhant0 = new JPhant(new JPhant_Config_0()); 3) --- High Level Commands --- 3a) To Clear All data... jPhant0.clear(); 3b) To Add Data (Fieldnames must exactly match Fields Phant Stream was created with... String[][] aasAddData = new String[][] { {"Field1", "Field2"}, {"Value1", "Value2"} }; jPhant0.addData(aasAddData); 3c) To Get Data... String[][] aasGetData = jPhant0.getData(); for(String[] asRow : aasGetData) { for(String sField : asRow) { System.out.print(sField+", "); } System.out.println(); } 3d) To Get Status... jPhant.Stats jpsStats0 = jPhant0.getStatus(); System.out.println("jpsStats0="+jpsStats0.toString()); 3e) To Get Rate Limits... System.out.println("getXRateLimitLimit()="+jPhant0.getXRateLimitLimit()); System.out.println("getXRateLimitRemaining()="+jPhant0.getXRateLimitRemainin()); System.out.println("getXRateLimitReset()="+jPhant0.getXRateLimitReset()); 4) --- Low Level Raw Data Commands --- 4a) To get Data in Raw Format... System.out.println("getData.CSV="+jPhant0.getData(JPhant.Format.csv).replace("\r", "\\r").replace("\n", "\\n")); System.out.println("getData.JSON="+jPhant0.getData(JPhant.Format.json).replace("\r", "\\r").replace("\n", "\\n")); System.out.println("getData.JSONP="+jPhant0.getData(JPhant.Format.jsonp).replace("\r", "\\r").replace("\n", "\\n")); 4b) To get Status in Raw Format... System.out.println("getStatus.CSV="+jPhant0.getStatus(JPhant.Format.csv).replace("\r", "\\r").replace("\n", "\\n")); System.out.println("getStatus.JSON="+jPhant0.getStatus(JPhant.Format.json).replace("\r", "\\r").replace("\n", "\\n")); System.out.println("getStatus.JSONP="+jPhant0.getStatus(JPhant.Format.jsonp).replace("\r", "\\r").replace("\n", "\\n")); ------------------------------------------------------------------------- Phant returns data in CSV Format like... Field1, Field2 Value1, Value2 ... , ... So the most obvious data structure to use is something like... String[][] aaExample = { {"Field1", "Field2"}, {"Value1", "Value2"}... } And the Collection equivalent... ArrayList<ArrayList<String>> alalData = new ArrayList<ArrayList<String>>(); There are functions to support converting to/from String[][] and ArrayList<ArrayList<String>>. toStringArrayListOfStringArrayLists(String[][]) toStringArrayOfStringArrays(ArrayList<ArrayList<String>>) As a convenience, if these two functions are passed null, they return the first element filled in with Fieldnames. You can handle multiple Phant Streams in one program with separate Phant variables and Configurations, like... JPhant jPhant0 = new JPhant(new JPhant_Config_0()); JPhant jPhant1 = new JPhant(new JPhant_Config_1()); ------------------------------------------------------------------------- What isn't working yet... * It should support the entire UTF-8 Character set, but appears to only work for characters 0 through 127. * Has support for Paging when Data > 50K, but doesn't appear to be working as I expected. * I was going to add support for the Timestamp Field that Phant automatically returns. * AddData() only adds the first row of data passed to it, I was going to add Bulk Updates when multiple rows of data are passed in. ------------------------------------------------------------------------- I hope that when this other project that is pulling me away is over, I can get back to this. In the mean time, feel free to develop it as you see fit.
Fake JSON server
Like Underscore, but lazier
Grails 2.2.1 from SRs power point file.
thoughtworks java test for interview
The initial commit for the Codility/learning objects task.
MrHaki Grails 3.0.1 example
MrHaki Grails3.1 example
Android Studio Intellij
Micronaut neo4j app
Micronaut neo4j app
Explore Node.js streams with an interactive playground.
This is a coding exercise issued to me from the boundary.com engineers in response to my job application.
Automatically exported from code.google.com/p/onejar-maven-plugin
The hands-on Grails programming test that did not pass.
Recipes with Angular.js
the JumpArena.java RFID module to sex-cess project
Equinox project repository (rt.equinox.binaries)
starsdraught formerly victiv.com formerly ruckusgaming.com no longer maintained or active mostly models and controllers that required changes and understanding to develop the remainder of the app in Java
This repo is for demonstration purposes only.
Repo for the Currency Fair Engineering test.
Spring cloud repo for the sccs
SCCS with configuations in separate repo
Project available for story242
A single project using Spring initializer and React.js CRUD
Simple Grails application with Spring Security Core and UI enabled.
This is yet another Codility code challenge that did not go well. The solution works but according to Codility it does not claiming there was an error formatted Actual vs Expected.
Demo test of the Beckwith db-reverse-engineer plugin
Ursurping SA's dropmenu code et. al.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.