Admin
May 19, 2016
16 comments
837
Answer 1 In Ruby, nil in an object (a single instance of the class NilClass) so methods can be called on it. nil? is a standard method in Ruby that can be called on all objects and returns true for the nil object and false for anything else. emp...
Snippet
Difference between .nil?, .blank? and .empty in Ruby?
Admin
May 09, 2016
23 comments
434
JavaScript can be a nightmare to debug: Some errors it gives can be very difficult to understand at first, and the line numbers given aren’t always helpful either. Wouldn’t it be useful to have a list where you could look to find out what they m...
Snippet
Common JavaScript Errors and How to Fix Them
In your application controller file app/controllers/application_controller.rb include the following private method: class ApplicationController < ActionController::Base private # Overwriting the sign_out redirect path method de...
Snippet
Change the redirect path after signing out: Rails us...
Admin
Apr 29, 2016
9 comments
599
Intro Machine learning is a type of artificial intelligence (AI) that provides computers with the ability to learn without being explicitly programmed. Machine learning focuses on the development of computer programs that can teach themselves t...
Article
What is Machine Learning and Why is it so important?
The map method takes an enumerable object and a block, and runs the block for each element, outputting each returned value from the block (the original object is unchanged unless you use map!): [1, 2, 3].map { |n| n * n } #=> [1, 4, 9] Array ...
Snippet
What does the "map" method do in Ruby? How is it dif...
Setting up PHP extensions php_curl and php_apc on windows 7 If you're using windows 64-bit OS, download the 64-bit TS VC9 compiled DLL files i.e. php_apc.dlland php_curl.dll, and store them in the PHP extensions directory. Enable these extensi...
Snippet
Installing php_apc and php_curl on windows 64-bit sy...
Admin
Apr 21, 2016
18 comments
951
Install PHP-FPM To install PHP-FPM, open terminal and type in these commands. We will configure the details of nginx and php details in the next step: sudo apt-get install php5-fpm Configure php We need to make one small change in the php conf...
Snippet
Installing PHP5-FPM on Ubuntu
Admin
Apr 16, 2016
6 comments
607
Big data is a term that describes the large volume of data – both structured and unstructured – that inundates a business on a day-to-day basis. But it’s not the amount of data that’s important. It’s what organizations do with the data that matter...
Article
What exactly is Big Data?
Admin
Apr 16, 2016
25 comments
579
UPDATE HTML You can make them with a single div. It's nice to have classes for each direction possibility. <div class="arrow-up"></div> <div class="arrow-down"></div> <div class="arrow-left"></div> <div...
Snippet
Create a triangular shape
Admin
Apr 16, 2016
22 comments
270
A scaffold in Rails is a full set of model, database migration for that model, controller to manipulate it, views to view and manipulate the data, and a test suite for each of the above. To generate a scaffold for a blog use the rails gener...
Snippet
Scaffolding in Rails
Admin
Apr 06, 2016
8 comments
1.12K
Generate a controller rails generate controller "controller name" "action1 action2 action3" Delete a controller rails destroy controller "controller name" Create Model and Migration rails generate model "model name" This g...
Snippet
Ruby on Rails console commands
Admin
Apr 05, 2016
17 comments
626
Connecting for the first time sudo -u postgres psql Set the password \password postgres Logging in psql -h localhost -p <port no> -U <username> <database name> Commands list \h help on SQL commands \? help on psql com...
Snippet
PostgreSQL psql console commands