When we all search on the web using Google, Yahoo or Bing, we are curious about how it works and how it gets all the information on the web. When us programmers started coding, we all wanted to create a search engine. I too attempted to create a search engine and I ultimately failed (3 years back). But now, I improved my coding skills, improved my knowledge and ideas. So, I decided to create a new search engine with automatic crawling, indexing and stuff.
... [READ MORE]Posts marked with "Posts" in posts
MySQL NOW() in JavaScript (UTC & Local)
If you know MySQL, you will certainly know the NOW() function that outputs the current date and time with the timezone of the MySQL server. For easy use and compatibility, we use UTC time zone for storing time in database. If you are running a web app that comply with MySQL, then you need the date function as same as the NOW().
So, I will give you a small function that return the same value as MySQL’s NOW() function in both UTC and local time. There are 2 versions of this function, one little big and the other very short (1 line of code). The shorter one is supported by modern browsers and the other is supported by all browsers.
... [READ MORE]In My Name is Linux
As you know already, my full name is Subin Siby. What’s special about my name is that it’s connected to Linux. As you may have seen, executable files on a Linux system is in the directory /usr/bin, /usr/sbin and /sbin. If you look at it closely, you can see that sbin only misses the character u from my name. If you add “u” to the name, it’ll become /usr/subin.
Creepy & Fun, right ? I can assure you one thing. I wasn’t named after the directory /sbin. It was a totally random decision to make my name Subin and there are a number of people in Kerala who has the name Subin. So I’m not alone.
... [READ MORE]Group Chat In PHP With Users’ Typing Status
I wrote a post on creating Group Chat in PHP. A comment was posted by Ravi asking if it was possible to include user’s typing status. It was a fascinating and a good idea to add user’s typing status. So, I worked on the code and knew it was possible. I’m going to tell you how to implement the display of users’ typing status on the Group Chat I created earlier.
... [READ MORE]Native JavaScript Equivalents of jQuery
If you want to do some little task on your website, you don’t need jQuery. But if you only did work with jQuery, you won’t know the JavaScript functions that do the same thing. I have ran in to this problem and found the real JavaScript functions in replacement of jQuery functions. I’m going to share it with you. This post will continue to expand when jQuery adds new functions.
... [READ MORE]New Theme : Light, Simple & Fast
As you can see, I changed the theme of this blog with a new theme. If you have visited css-tricks.com, you can see there are similarities to it’s theme and mine. I really liked Chris Coyer’s theme and I contacted him to lend me the theme. But, no response. So, I decided that I should create my own theme.
By WordPress Support forum, I found _s site. Underscores provide a starter theme for WordPress. It can be downloaded, make changes as we like. I downloaded it and made it in to this awesome theme. I’m calling this theme Subin’s Blog V1.
‘return false’ vs ‘e.preventDefault()’ In jQuery
I decided to add some improvements to Open and fix some bugs. While I was adding two submit listeners on a form, it didn’t work. I have tried everything but still the problem came up. So, I removed return false; and used e.preventDefault();. It worked !
So, why didn’t the submit listener called on the element ? The problem was return false will do **e.stopPropagation() **and e.preventDefault(). If e.stopPropagation() is ran, then any other submit event handlers of the element won’t call. Here’s the 2 submit calls :
... [READ MORE]GOD Is Open Source
This is just my opinion. Say what you think about this using the comments.
There are many many religions in the world and we are all part of a religion (or not). But, whatever the religion we are in, we all have a single GOD. A GOD who created atoms to the biggest mammal in Earth. All religions are just a path to GOD. Every religion points to GOD and whatever religion we choose, we all reach a single place. So, if GOD created all the things in universe, then he / she may have created the religions.
... [READ MORE]Download Zip Files Dynamically in PHP
Zip file downloading is used by websites. The most important and popular of them is WordPress. They use Zip files for downloading plugins, themes and even their versions. They do it ofcourse, dynamically. You just provide the location of the file and PHP will download it to the user for you. Actually HTTP headers have the main role in the downloading.
We make the headers using header function in PHP and the browser will take care of the rest. The file path that you provide must be the absolute path. These are the two variables where you provide information about the Zip file :
... [READ MORE]Google Hangouts Is Down
Again, one of Google’s service is down. This time it’s Google Hangouts also known before ad Google Talk. Google Sheets are down too.
The downtime of these services started from 17 March 9:45 PM IST. I noticed the Internal Server Errors when connecting to Google server by Pidgin messenger. I retried again and again, but the problem still poped up. I went to Twitter and found out, I wasn’t the only one that experienced this problem.
... [READ MORE]