Even when working alone or on simple projects, I like to have the benefits of source control – history, branching, and backup.
(more…)Category: Tutorials
-

Convert XML to JSON using XSLT
With increasing use of separate services on the same data, the need for portable data formats aroused. XML was one of the first widely used, but lately JSON is blooming.
I don’t have a particular bias here, both serve well in appropriate environment, although JSON carrying the same data could result in about 20% size reduction.
So can they be interchangeable? Just recently, I needed to convert XML data into a JSON format for easier consumption on the client.
The fastest and (sometimes) easiest way to process XML to another format is XSLT.
(more…) -

Evolution Of The JavaScript Loop
Doing a bit of testing last week, I have found out that the source code for the Game Of Life JavaScript Implementation is not working with Internet Explorer 7 (IE7).
It turns out that IE7 doesn’t support the
(more…)forEachconstruct, and in while rewriting it, I noticed how the code becomes so much uglier and less readable, which led me to think about the programming language evolution. -

Game Of Life JavaScript Implementation
Recently I have come across my old implementation of Conway’s Game Of Life in JavaScript I have played with a few years ago, had a long look and I didn’t like it.
(more…)
At all. -

Converting Word Document to HTML
Microsoft Word happens to be the text editing application of choice for many of my clients. And they would like to post the content to web, so I still find myself in a situation where I need to export a Word document to HTML.
There is an option to “Save document as Html” in Word that results in big, convoluted, HTML file full of errors. Also, there is a bit of inline formatting where I would like the format to concur to the website formatting instead.
So, a good result would have no or very little formatting, and as simple as possible markup.
-
LINQ to XML
Seems that LINQ to XML does not get near as much attention as LINQ to SQL, but that’s a shame since there is a lot going on here too. The big improvements are in the XML document navigation, working with namespaces and document construction.
(more…) -
Searching from browser – Firefox quick searches and Chrome search engines
Search engine web site can be skipped
Some new browsers have a Search field (Firefox, Internet Explorer, Opera, f.ex.), it’s located at the top right part of the browser window, next to the address bar. This is a nice little feature, you can select a search engine, type the search terms and submit. Then search engines site is opened with results. Usually suggestions are shown as you type.
-
Regular expressions are a tool, not a problem
What are regular expressions?
Regular expressions are a way to describe a pattern to match a piece of text.
So if you want to find another “similar” word in a text, badly formatted phone numbers, or replace “same kind” of a (X)HTML element regardless of attributes, regular expressions are the way to go. Regular expression can be also referred to as a “regex” or “regexp”.
