setTimeout is not the answer when it comes to delay in loops in Javascript. Using setTimeout will cause the first cycle to have the delay and then it will run to the end of the loop from the second time. for (var i = 1; i < 100; i++) setTimeout(function () { console.log(‘hello’); }, 2000 …
Category Archives: Technology
upgrading to php 5.6 in vesta cp
Yesterday I was told to set up a new php server in company for some small project. I did not really want to set everything up manually as the person who will be using this server is not geeky. So by looking around I came to find Vesta Control Panel aka VestaCP. it sounds lightweight …
a Week with Arrow Launcher
It’s been a week that I received my new Moto X Pure edition. One of the first things that I was planning to do when I got the phone was trying out Arrow launcher. The Android launcher from Microsoft. Before anything I really admire how Microsoft does dedicate time to develop softwares for other platforms …
Laravel 5 Select Random Row
To select a random row from MySQL using php is not a real hard process. you always can use the rand() function within your queries. but if you are using Laravel and Eloquent Model to work with your database you really should check the random() method out. Doing a select with your model and using …
Fix: Laravel scheduled tasks exception
So I just added a little scheduled tasks to one of my applications which was hosted on a shared environment and I realized that the task was not being executed at all. running the php command from the shell was working and it was not giving me any clue on what the problem could be. …