Once upon a browser is a bookmarklet you can use to randomly rotate elements on the page.
(more…)Category: Coding
-

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. -

Multiple Values For The Same GET or POST Parameter in ASP.NET MVC
There are situations where you need to pass multiple values for the same parameter to the server, here are some patterns.
- Multiple checkboxes to pick the values for the same purpose.
- Select columns to show in the table
- Select post categories
- User can add as much values as he/she likes.
- Add new tag
- Add language
- User can remove multiple items from a list.
- Remove items from shopping cart
This can be handled by passing many values in one parameter with a common delimiter, or by passing multiple values as the same parameter. Here are examples with the GET method, for the POST it works the same.
(more…) - Multiple checkboxes to pick the values for the same purpose.
-
Formatting date, time, currency in various cultures
In today’s interconnected world, it’s important that online applications support different cultures.
Even if most of us that spend a lot of time online are accustomed to the USA date and number formats, people always prefer to see numbers and dates formatted in a familiar way. People don’t like to think about if the date’s first digit is day or month, or if it’s decimal delimiter or digit grouping mark.
The date 03/02/2010 means completely different thing in Australia and USA – it’s February the 3rd in the former and March the 2nd in latter! (dd/mm/yyyy vs mm/dd/yyyy)
Even if we assume that the common internet user can read the shown format based on the website’s supposed location, localization and internationalization (i18n) could greatly improve readability and usability.
(more…) -
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…) -
AutoHotkey Scripts
As I have already stated, one of my favourite tools that I install right away on a fresh machine is the AutoHotkey. It makes life a bit easier shortening the way to perform common tasks. Among other features, it provides a way to associate keyboard shortcuts with a scripted outcome.
-
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”.

