Code Monkey home page Code Monkey logo

r0n22's Projects

automatic-updater icon automatic-updater

Simple automatic updater control for .NET (c#, vb.net, etc.) Open source and free. (Windows Forms, WPF, Windows Services, and console apps for .NET 2.0, .NET 3.0, .NET 3.5, .NET 4.0, and .NET 4.5)

bootstrap-modal icon bootstrap-modal

Extends the default Bootstrap Modal class. Responsive, stackable, ajax and more.

daux.io icon daux.io

Daux.io is an documentation generator that uses a simple folder structure and Markdown files to create custom documentation on the fly. It helps you create great looking documentation in a developer friendly way.

docker icon docker

Docker - the open-source application container engine

gitbucket icon gitbucket

The easily installable Github clone powered by Scala

jlibmodbus icon jlibmodbus

JLibModbus is an implementation of the Modbus protocol v1.1b in java language.

jphant_java_based_phant_library icon jphant_java_based_phant_library

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.

jquery-pageslide icon jquery-pageslide

jQuery Javascript plugin which slides a webpage over to reveal an additional interaction pane.

lime icon lime

Experimental Sublime Text clone

logsandra icon logsandra

A Cassandra demo application, log management

marlin icon marlin

Reprap FW with look ahead. SDcard and LCD support. It works on Gen6, Ultimaker, RAMPS and Sanguinololu

raspberry-stats icon raspberry-stats

A Raspberry Pi stats page made using NodeJS, Socket.io and Highcharts.

remoteqth-n1mm icon remoteqth-n1mm

Receives UDP packets from N1MM logging program and translates them to ser2net for RemoteQTH.

smashing icon smashing

The exceptionally handsome dashboard framework in Ruby and Coffeescript.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.