jQuery: Identifying selectors, that represent the same DOM node.

If you have two jQuery selectors, that each represent a single DOM node, and you need to know whether it is the same DOM node, you can easily do this with: var selector1 = $(‘#some_item’); var selector2 = $(‘#some_item’); if (selector1[0] == selector2[0]) { // Do stuff if the selectors represent the same DOM node […]

A fact about JavaScript parseInt() that i wasn’t aware of, or why web projects sometimes break on August

JavaScript, is a really, REALLY cool and powerful language (especially if used correctly), and i intend to write about it a lot in the future. Bur right now, i want to mention a fact about JavaScript parseInt(), that i wasn’t aware of.

Getting gettext to work in Apache on windows

Gnu gettext is a widely used translation system, used to translate software projects and make them available in different languages. Many big web projects use it, like WordPress for example. It works well and is rather easy to use, for both programmers and translators (except for the fact that you need to restart your http […]

The danger of: foreach ($array as &$v)

This will be a short post, concerning one problem that can easily arise from the incorrect usage of PHP’s foreach cycle’s ability to pass each array item by reference instead of by value. I ran into this problem a little while ago and it caused me roughly about an hour of general wondering of why […]

Wamp: installing both PHP 4 and 5 and how to switch them back and forth

Wamp: installing both PHP 4 and 5 and how to switch them back and forth

This post will be for Wamp server users. I will explain, how to have both PHP 4 and 5 installed, and switch them at any time. Wamp server is a brilliant tool for web developers (sadly it is Windows-only). It takes care of installing the big 3 (so you don’t have to do it manually): […]

MySQL: best practices

This post will contain several tips, for working with MySQL: how to import data to an empty MySQL database faster and also how to fetch data from queries in ways, that are likely to produce less errors.

Asynchronous http GET requests with PHP

I’ve stumbled upon a problem recently – how do you execute slow blocks of code, without locking your script? The simple answer is – you can’t. At least, not with PHP. In languages like Java or C, where you can use threads (multiple program code blocks, running asynchronously (at the same time)), this is possible […]

WordPress for now

I’ve discovered the internet :) I’m Kipras Mancevičius, a programmer (currently web developer) from Lithuania. Fancy intro. From now on this blog should be the place, where i will post random (or not so random) thoughts about common programming problems, and (hopefully) ways to solve them. I will also post stuff lying around the internet […]