Codeigniter – Select Unique Random Row Every Day From MySQL

I am going to show how to select a row from MySQL database as randomly as possible, but not repeating it. So I am going to select unique row from the MySQL database using PHP based Codeigniter framework. The original tutorial could be found as selecting a random row every day from MySQL.

Write random elements to div having class names from array using JavaScript

This is an example where I am going to show you how to write random elements to div having class names from array using JavaScript. Let’s consider we have multiple div tags on a web page and these div tags are created dynamically based on certain condition but you are not sure how many div tags will be created on…

Read last n lines from a file using Java

Introduction Here I will show you how to read last n lines from a file using Java programming language. I am using text file for this example. Last “n” lines means, last 10 lines or 20 lines or 30 lines, etc. So “n” should be replaced by an appropriate non-zero positive integer value. Obviously the tail of the file is…

Generate File With Random Content In Java

File with Random Content This tutorial will show you how to generate file with random content in Java. I will generate random content in a text file using wordnet-random-name API in Java. You can set limit to any number of lines for the text file to hold generated random content in it. This kind of random content is a quick…