This is a tool for finding the differences between two text files and in particular finding what parts have been edited, deleted or added. It implements one of the algorithms for finding the Longest Common Subsequence between to data sources.

You can see a demo at: http://www.bodurov.com/JavaScriptDiff/

The main idea of this algorithm is to build a matrix with rows – future state, and columns – previous state. This matrix will consist of squares incorporated one into the other as steps in a stairway. The path of following those steps from the top left corner to the right bottom corner determines the actual graph. Moves to the right are deletes, to the bottom – inserts. Inserts followed by deletes are changes.

Continued...

Here I would like to present a tool for formatting and coloring raw JSON code. Very often if you use JSON generated by server side code it will be in a nice compact format but at the same time it will be quite hard to read it and possibly alter it. So the tool allows you to make your JSON more readable. For example if you have code like this:

[[{anArray:[2,3,4,["string1","string2",{aa:[]}], {"type":"simpleObject"},null],abotherProperty:"",anObject:{justANumber:2,func:function(){if(1>0)return false; else return true;}}}],true]

it is a real challenge to find something you need inside the graph. In this case the JSON formatter is the right tool for you.

You can see it at: http://bodurov.com/JsonFormatter/

Continued...

Here I would like to describe a solution for the common need to use mouse wheel in DHTML programs. It is based on Sam Stephenson’s Prototype JavaScript framework.

First you have to start listening for the scroll mouse wheel event and unfortunately it is different for the different browsers.

Continued...

This is an example of a simple client side web grid with an interface similar to excel office application.

The code is based on Microsoft AJAX Extensions Framework 1.0 (ex Atlas).

An example of the object definition:

Continued...

Here you can see the first beta version of the new menu that I called LucidMenu. It is based on Sam Stephenson’s Prototype 1.5.

Demo: http://www.bodurov.com/lucidmenu/

Source: http://www.bodurov.com/lucidmenu/lucidmenu.zip

Some or the features like right to left text or having selected nodes are not yet completed, but other new features are already available.

What you can see here is:

  • Loading the content as JSON from an external file with AJAX
  • Isolated reneding – you can implement your function of what should be rendered. Here it is implemented in LucidMenuGenerator function. You can pass your CustomRenderingFunction function with the Menu constructor like this:
var menu = new LucidMenu("LucidMenu1", CustomRenderingFunction);
menu.load("MenuContent.txt");