Skip to main content

Posts

Showing posts from 2010

The UDF Repository for MySQL

The UDF repository for MySQL is a community project that aims to offer an organized collection of open source MySQL user defined functions . MySQL UDFs offer a powerful way to extend the functionality of your MySQL database. The UDFs on this site are all free: free to use, free to distribute, free to modify and free of charge, even for commercial projects.

Mysql cumulated sum

Sometimes we need to obtain a cumulative sum of a columns in a query. How we can do it? Suppose you have this simple table id|in|out ---------- 1  5  0 2  0  6 3  2  0 4  3  0 5  0  4 and you want obtain the cumulative sum  of the column (in+out) like this id|in|out|sum ------------- 1  5  0   5 2  0  6   11 3  2  0   13 4  3  0   16 5  0  4   20 This following query to do this SELECT a.id, a.in, a.out, -- this is the new column called sum ( SELECT SUM( in + out )   FROM mytable b   WHERE b.id <= a.id ) AS sum FROM mytable a ORDER BY id

Best chart libraries

Charts are an indispensable part of any data visualization work. People can grok visual representation of data easily than a textual variety. Today there are a huge number of free chart libraries available to display visualizations on websites. Below is a small list of  some of the libraries available for displaying charts using php. pChart - a PHP class to build charts pChart is a PHP class oriented framework designed to create aliased charts. Most of todays chart libraries have a cost, our project is intended to be free. Data can be retrieved from SQL queries, CSV files, or manually provided. This project is still under development and new features or fix are made every week. Focus has been put on rendering quality introducing an aliasing algorithm to draw eye candy graphics. Rendering speed has been dramatically enhanced since the first version, we'll still continue optimising the code!  JpGraph   JpGraph is an Object-Oriented Graph creating library for PHP >= 5.1

Lucid desktop

Lucid desktop , A web operating system (WebOS) software that allow you setup own web desktop OS online. This open source WebOS is built with PHP and uses a SQL database for storing data. Plus more, Lucid Desktop WebOS is a multi-user application , which is very modular with the support for installable applications. With Lucid desktop WebOS, you can access your media, office documents, and other files anywhere. Meanwhile, user can stay up to date with Twitter, RSS feeds, and what’s happening on the web. Plus more, Lucid Desktop already comes with lots of applications like text editor, calculator, image viewer, simple games, web browser, feed reader, music player and more. With the help of a file manager, you can add-edit-delete files and folders (a context menu makes these steps easier), change the appearance of the desktop with theme support and auto-update the OS to the latest version. Lucid Desktop Main Features: Extremely customizable: Lucid allows you to pick you

sqldf: SQL select on R data frames

sqldf is an R package for runing SQL statements on R data frames, optimized for convenience. The user simply specifies an SQL statement in R using data frame names in place of table names and a database with appropriate table layouts/schema is automatically created, the data frames are automatically loaded into the database, the specified SQL statement is performed, the result is read back into R and the database is deleted all automatically behind the scenes making the database's existence transparent to the user who only specifies the SQL statement. Surprisingly this can at times be faster than the corresponding pure R calculation (although the purpose of the project is convenience and not speed). sqldf is free software published under the GNU General Public License that can be downloaded from CRAN .

JDBC Tutorial

The JDBC API is a Java API that can access any kind of tabular data, especially data stored in a Relational Database. JDBC stands for Java Database Connectivity. JDBC works with Java on a variety of platforms, such as Windows, Mac OS, and the various versions of UNIX. This tutorial gives a complete understanding on JDBC.

Export CSV directly from MySQL

How ofter were you asked by a client for a CSV (or excel) file with data from their app? I get asked that question quite often, so I wanted make the process as easy as possible. And guess what? You can create CSV files directly from MySQL with just one query! Let’s say you want to export the id, name and email fields from your users table to a CSV file. Here is your code: SELECT id, name, email INTO OUTFILE '/tmp/result.csv' FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' ESCAPED BY ‘\\’ LINES TERMINATED BY '\n' FROM users WHERE 1   Well, if you know MySQL, you’ll know how to customize this query to spit out the the right data. Your csv file can be found in /tmp/result.csv Make sure your MySQL server has write permissions to the location where you want to store your results file.

Load CSV file into Mysql table

LOAD DATA INFILE can be used to read files obtained from external sources. For example, many programs can export data in comma-separated values (CSV) format, such that lines have fields separated by commas and enclosed within double quotation marks, with an initial line of column names. If the lines in such a file are terminated by carriage return/newline pairs, the statement shown here illustrates the field- and line-handling options you would use to load the file: LOAD DATA INFILE 'data.txt' INTO TABLE tbl_name FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\r\n' IGNORE 1 LINES;

MySQL Visual Explain – Hierarchical View of Query Execution Plan

EXPLAIN statement is used to obtain information about how MySQL executes a SELECT statement to check whether indexes are being used properly, and what kind of join is being performed. EXPLAIN output can sometimes be very hard to understand when it comes to long and complex queries. Here comes MySQL Visual Explain , a command-line tool that transforms EXPLAIN output into a hierarchical view of the query execution plan. MySQL Visual Explain collects the output of EXPLAIN in MySQL and visualize it in treeview to make the reading more understandable. It is very useful when you have large and complex queries. How It Works: MySQL Visual Explain tries to reverse-engineer MySQL’s EXPLAIN output into a query execution plan, which it then formats as a left-deep tree — the same way the plan is represented inside MySQL. Example query: SELECT actor_id, (SELECT COUNT(film_id) FROM sakila.film JOIN sakila.film_actor USING(film_id)) FROM sakila.actor;

Esper - Event Stream and Complex Event Processing for Java

Analyzing and reacting to information in real-time oftentimes requires the development of custom applications. Typically these applications must obtain the data to analyze, filter data, derive information and then indicate this information through some form of presentation or communication. Data may arrive with high frequency requiring high throughput processing. And applications may need to be flexible and react to changes in requirements while the data is processed. Esper is an event stream processor that aims to enable a short development cycle from inception to production for these types of applications. See web page at: http://esper.codehaus.org/

Excelsior Automated Trading Platform

Excelsior is a next generation automated trading platform designed to support the rapid development of 'black box', quantitative trading systems. A sample Long-Short Equity strategy is featured to demonstrate the platform's capabilities.

FIX Analyzer

ValidFIX is a website for anybody who works with the FIX Protocol ValidFix comes with  two services: FIX Analyzer - to inspect one single fix message FIX Log Analyzer - to inspect sections of logs produced by any FIX Application There is nothing to download. Just copy and paste your data in our services and see the results.

Fix client server program

Mini-FIX is a C++ Windows FIX client/server GUI application. The Financial Information eXchange (FIX) protocol is an electronic communications protocol initiated in 1992 for international real-time exchange of information related to the securities transactions and markets. Mini-FIX is a client/server able to communicate using this protocol with a high degree of freedom and transparency, well suited for developing and testing other FIX applications. You can download it from here

Define new data provider for Marketcetera

In this post I would like to explain how create new provider for Marketcetera. I started from the CSV Market Data Adapter example , see instructions for install or compile via code. After that if you want change provider name read the following instructions. Refactor package name from org.marketcetera.marketdata.csv; to org.marketcetera.marketdata.YOUR_PREFERITE_PROVIDER; Edit file org.marketcetera.module.ModuleFactory  and insert this line org.marketcetera.marketdata. YOUR_PREFERITE_PROVIDER .MarketceteraFeedModuleFactory Edit file CSVFeedModuleFactory.java  and overwrite this line   public static final String IDENTIFIER = " YOUR_PREFERITE_PROVIDER " ; Edit file  CSV FeedFactory.java public String getProviderName()    { return " YOUR_PREFERITE_PROVIDER " ;  } Edit file Message.java   static final I18NMessageProvider PROVIDER = new I18NMessageProvider( " YOUR_PREFERITE_PROVIDER " , Messages. class .getClassLoader())

Open source libraries and trading systems review

In this post I reviewed some of the most important trading systems and financial librarys on the net. SFL Java Trading System Enviroment http://sourceforge.net/projects/sfljtse http://www.sflweb.org/index.php?blog=sfljtse The SFL Java Trading System Enviroment is a java application built on KISS principle (Keep It Simple,Stupid) and its aim is to provide a fast and platform indipendent infrastructure to develop and execute trading Systems. EclipseTrade http://sourceforge.net/projects/eclipsetrader/ http://eclipsetrader.sourceforge.net/ Stock exchange analysis system, featuring shares pricing watch, intraday and history charts with technical analysis indicators, level II/market depth view, news watching, automated trading systems, integrated trading. Based on Eclipse RCP framework. JsystemTrader http://code.google.com/p/jsystemtrader/ JSystemTrader is a fully automated trading system (ATS) that can trade various types of market securities during the trading day without user mo

Valutazione del grado di maturità di soluzioni software Open Source

Per chi come me si fosse trovato a valutare delle soluzioni open source, suggerisco un modello che permette di definire dei rank di vari parametri fondamentali atti alla comparazione di più software. FASE 0: Analisi del Contesto Si raccolgono informazioni relative alla struttura ed al funzionamento dell'impresa. Da queste si stabiliscono una o più categorie software da valutare mediante il modello. Successivamente viene redatta la lista dei prodotti candidati per l'inserimento e si definiscono i criteri sui quali effettuare la stima. FASE 1: Selezione Preliminare Tra i criteri definiti nella fase precedente si evidenzia l'insieme di quelli più critici. Per tali criteri viene fissato un insieme di valori di soglia minimi che il software deve possedere per accedere alla fase successiva. Il filtraggio sarà tanto più selettivo quanto maggiore sarà il numero di criteri che devono essere soddisfatti. FASE 2 : Filtraggio Decisionale Le applicazioni selezionate precedentemente

Create new Market data feed

In this post I would like to explain how build (from scratch) a new marked data feed adapter. My goal is build a module that can retrives price from market and use into Marketcetera strategy. In this case I will connect to Currenex server. ...cooming soon...

Strategy Agent

In this post I would like explain you how create your custom strategy and runs it in debug mode from your preferite IDE. public static void main(String[] args) { String cmds = "MarketData.txt"; StrategyAgent.main(new String[]{cmds}); } catch (Exception e) { e.printStackTrace(); } MarketData.java import org.marketcetera.strategy.java.Strategy; import org.marketcetera.event.AskEvent; import org.marketcetera.event.BidEvent; import org.marketcetera.event.TradeEvent; import org.marketcetera.marketdata.MarketDataRequest; import static org.marketcetera.marketdata.MarketDataRequest.*; /* $License$ */ /**  * Strategy that receives market data  *  * @author anshul@marketcetera.com  * @version $Id$  * @since $Release$  */ public class MarketData extends Strategy {     private static final String SYMBOLS = "AMZN,JAVA"; //Depends on MD - can be other symbols     private static final String MARKET_DATA_PROVIDER = "bogus"; // Can be activ, b

Marketcetera

Marketcetera LLC is building a new software platform committed to providing fast, flexible and reliable securities trading tools to financial services professionals. Our mission is to make world-class order management and risk-management software available and affordable to individuals and to institutions of all sizes. Marketcetera focuses on building the key trading functions that are common to all organizations, thus freeing our clients to concentrate on proprietary trading algorithms and other specialized software that provide a competitive advantage.