Subscribe to DSC Newsletter

All Blog Posts Tagged 'java' (12)

esProc Helps Process Structured Texts in Java – Handle Big Files in Groups

There is a type of text files that they are too big to be entirely loaded into the memory, yet as the data have been sorted by a certain column and if they are imported in groups according to this column, they can be all put into the memory for computing. These text files include the call detail record of a telecom company, statistics of visitors on a website, information of members of a shopping mall, etc.

 

A great deal of complicated code, which is difficult to maintain, is…

Continue

Added by Lynn Guo on December 15, 2014 at 6:24pm — No Comments

esProc Helps Process Structured Texts in Java –Expression Computing

As Java doesn’t directly support dynamically parsing expressions in the text files, the computation can only be realized by splitting strings manually and then writing a recursive program. The whole process requires writing a great amount of code, is complicated and the code is difficult to maintain. With the assistance of esProc, we can develop program for the computation in Java without writing code manually. Let’s look at how esProc works through an example.

 

Here is a text…

Continue

Added by Lynn Guo on December 10, 2014 at 6:30pm — No Comments

Processing Structured Text in Java–Conditional Filtering

Following problems will arise if you perform conditional filtering on text files in Java alone: 

1. The text file is not a database,so it cannot be accessed by SQL. The code needs to be modified if filtering conditions are changed. Besides, if you want a flexible conditional filtering as that in SQL, you have to self-program the dynamic expression parsing and evaluating, resulting in a great amount of programming work.

2. Stepwise loading is required for the big files that…

Continue

Added by Lynn Guo on November 23, 2014 at 6:00pm — No Comments

esProc Helps Process Structured Texts in Java – Set Operations

Java doesn’t support set operations directly, so nested loops have to be used to realize the operations of intersection, union, complement and etc. between text files. If there are many text files, or the file to be computed is too big to be loaded into the memory, or it is required to perform set operations according to multiple fields, the code will become even more complicated. However, with the assistance of esProc, which supports set operations…

Continue

Added by Lynn Guo on November 13, 2014 at 6:00pm — No Comments

esProc Helps Process Structured Texts in Java – Set Operations

Java doesn’t support set operations directly, so nested loops have to be used to realize the operations of intersection, union, complement and etc. between text files. If there are many text files, or the file to be computed is too big to be loaded into the memory, or it is required to perform set operations according to multiple fields, the code will become even more complicated. However, with the assistance of esProc, which supports set operations directly, Java can realize these…

Continue

Added by Lynn Guo on November 11, 2014 at 12:00am — No Comments

Another way to Process structured text in java - Non-Single row records

esProc can help Java deal with various computations in processing structured texts. But in the case of non-single row records, it is necessary to preprocess the data before esProc can perform computations on it. 

Let’s look at this through an example. The text file Social.txt is the access records of a website, in which every three rows corresponds to a record. The records should be rearranged first before other computations can be performed. They should be imported in the form…

Continue

Added by Lynn Guo on November 4, 2014 at 8:30pm — No Comments

Code Examples of cross database relational computing in Java

Program development for data process often involves cross-database relational operations. The following example will illustrate Java’s method of handling these operations. sales table is in db2 database, employee table is in mysql database. The task is to join sales with employee through sellerid of sales table and eid of employee table, and filter out the data insales and employeethat…

Continue

Added by Jessica May on September 9, 2014 at 1:03am — No Comments

comparative study note of Python and Java 4 --Function and Polymorphism

Function and Polymorphism

The Hovering Question

When I started learning these two languages, as mentioned before, I always keep in mind that the difference between dynamic data type and static data type. Then the question came out: why they need to be like that? What is the advantage of being dynamic data type or being static data type? To make the question more concrete, let’s see how to define a function in both languages.

In Java, everything is very…

Continue

Added by Yuecai Zhu on December 16, 2013 at 1:30pm — No Comments

comparative study note of Python and Java 3 - Sequence type

3. Sequence Type

 

This time, we compare the sequence types of the two languages. By the terminology sequence type, we mean the data structure that is kind of a sequence of data.

In Java, we have: String, array, list(arraylist and linkedlist), set;

In Python, we have: Str, tuple, list, set;

Yes, String is one of the sequence type, because it is a sequence  of char, isn’t it? About the Sting type, we only need to…

Continue

Added by Yuecai Zhu on November 10, 2013 at 12:00pm — 2 Comments

Comparative study note of Java and Python (II)

2.The control flow statements

Now we try to use the two languages to do a practice. The following, one in Java one in Python, are two programs with the same algorithm.

/*

 * program author: Yue Cai Zhu.…

Continue

Added by Yuecai Zhu on October 30, 2013 at 5:32pm — No Comments

Comparative study note of Java and Python (I)

One usually asked question is:  with which programming language to start when someone just begins studying computer science? Then a lot of suggestions will come up.

1      1.       You should start with one static typed language say C/C++, java etc. and then move easily to dynamic typed language like Perl, Python etc. Because it is harder to move from dynamic typed language to static typed language.

     But…

Continue

Added by Yuecai Zhu on October 30, 2013 at 5:29pm — No Comments

Giving Big Data Publishing the Royal Treatment

A NoSQL database from MarkLogic provides the Royal Society of Chemistry (RSC) with the ability to unlock a treasure trove of assets.  Now the RSC can publish three times as many journals and four times as many articles. It also gave the Society the ability to develop new educational applications to make chemistry accessible to a wider audience.

Modern approaches to information products replete with full text search have the power to…

Continue

Added by Tony Agresta on January 18, 2013 at 7:58am — No Comments

Monthly Archives

2019

2018

2017

2016

2015

2014

2013

2012

2011

2010

2009

2008

On Data Science Central

© 2019   AnalyticBridge.com is a subsidiary and dedicated channel of Data Science Central LLC   Powered by

Badges  |  Report an Issue  |  Privacy Policy  |  Terms of Service