Article of the week

Longest Collatz sequence in PHP

Longest Collatz sequence in PHP

08 Feb 2020 23:30:22


The longest Collatz sequence for input less than N in PHP programming language.


Read full article »

Recent articles

Finding whether a UTF-8 encoded string is palindrome

27 Jul 2017 13:49:31

Finding whether a UTF-8 encoded string is palindrome

When recently entertaining myself with recursion in PHP I have come across a problem which asked to find whether a given word was a character-unit palindrome or not. I guess, a word of explanation on character-unit palindromes is needed in this place now. Basically, they are ...

Read more »

Converting tree to correct HTML list in PHP

07 Jul 2017 22:48:43

Converting tree to correct HTML list in PHP

From time to time, when doing coding for the web or otherwise, you might come across a tree of data to be turned into a correct HTML list (what "correct" means in this context will be explained in a minute). In order to meet the requirement, you have to be able to ...

Read more »

Traversing trees in pre-order recursively in PHP

03 Jul 2017 13:58:12

Traversing trees in pre-order recursively in PHP

Like in the real world, trees are ubiquitous in computer programming today. Frequently tree data structure turns out to be a perfect choice for modelling a naturally occurring phenomena and not only them these days. The bad news is, unlike one-dimensional arrays or other data ...

Read more »

 Manipulating HTML based on viewport position with jQuery

29 Jun 2017 15:16:14

Manipulating HTML based on viewport position with jQuery

At times, it is desirable to be able to manipulate a HTML element styling and/or behavior on the basis of its current proximity, presence or absence in the viewport . The viewport is user's visible area of a web page on the screen. However, that is just the tip of the ...

Read more »