Data structures complexity calculator

On this page, you can quickly calculate asymptotic complexity growing based on operations balance with the data structure.

Please note, this is a just basic rough calculation based on asymptotic time complexity. This calculator ignores many factors
which affect performance in the real application.

Also, in some cases (for example for the Dynamic array) amortized cost is used.

Continue reading

Capturing web page video with PhantomJS and Selenium

At first glance, it may seem that web page video capturing is the trivial task and you can just google and get set of solutions.

However, I found only two ways on the Internet. The first way it uses some browsers extensions and certainly requires a GUI.

The second approach it uses PhatomJS in pair with FFmpeg, you should capture page screenshots with overlay (for example 25 screenshots for 1-second video with 25 FPS) and then join all these screenshots into video with FFmpeg.

This simple solution works, but only for small videos.
When you need to capture 5 minutes video with 60 FPS it requires around 5 min * 60 sec * 60 frames/sec = 18000 frames (screenshots). As you understand, this works very slowly because it requires a lot I\O operations.

More information about this solution you can read here.

In this article, I would like to describe a faster approach for record web page video with:

  • PhatomJS
  • Java
  • Selenium
  • Humble Video
Continue reading

Hello world!

Welcome to YASE Blog. This is my first post.

Prints “Hello, World”. By tradition, this is everyone’s first post.

/******************************************************************************
 *  Compilation:  javac HelloWorld.java
 *  Execution:    java HelloWorld
 *
 *  Prints "Hello, World". By tradition, this is everyone's first post.
 *
 *  % java HelloWorld
 *  Hello, World
 *
 *  These 17 lines of text are comments. They are not part of the program;
 *  they serve to remind us about its properties. The first two lines tell
 *  us what to type to compile and test the program. The next line describes
 *  the purpose of the program. The next few lines give a sample execution
 *  of the program and the resulting output. We will always include such 
 *  lines in our programs and encourage you to do the same.
 *
 ******************************************************************************/

public class HelloWorld {

    public static void main(String[] args) {
        // Prints "Hello, World" to the terminal window.
        System.out.println("Hello, World");
    }

}