Posts

PostgreSQL locks in Rails Migrations

When we need to update huge data by adding a rails Migrations or a rake/Thor task. We should worry about the PostgreSQL locks. Every time when we work with the production data for updating, there is always an risk of locking the database. By locking the database, I mean, the data do not get updated, or simply it would delay the process. So let's see the case of locking the PostgreSQL: So, In this example if we need to update the default value of available from nil to false, and let's say we have 1 million of data, this migration will only add the new values and won't affect the old values.

Dynamic Tic Tac Toe Game in Jquery

Image
In this story, I will be building an evergreen Tic Tac Toe game in Javascript(Jquery). It looks really simple in implementation but for finding the winner it’s quite complex. Tic Tac Toe Game The rules of the game are as follows. In Tic Tac Toe, 2 players take turns adding their token (an X or an O) to a N X N, for the more ambitious) grid until one player matches (N) in a row in any direction. The source code of this game is shown below respectively. You can also look at medium.com, I have Link below :-  https://medium.com/@subashkhatri165/dynamic-tic-tac-toe-game-82ec5992e014 https://github.com/subashkhatri/tictactoe/tree/tictactoe_v.02 Code from index file:- <div id ="container" class ="play-board"> <header class ="play-board-title"> <h3>Tic Tac Toe </header> <div class ="player"> <div style ="font-size:30pt;" id ="player1" class ="selected">. </div> </div> <tabl

An Example for writing SOP

STATEMENT OF PURPOSE TO STUDY IN NEW ZEALAND I am Your Name , a permanent resident of Address . I was born on the Your  Date Of Birth . My passport number is Passport Number . Gaining knowledge and achieving goals has always been the prime motto of my life. In this process, failure and success are the two parts which have provided me enough strength to combat many difficulties as I am a hard worker, self- motivated and independent. So, with positive intention, I am intending to pursue a Graduate Diploma in Applied Information Technology specializing in Software Engineering offered at Wintec, Hamilton, New Zealand. I belong to a nuclear family consisting of   A SMALL DETAILS ABOUT YOUR FAMILY AND YOUR MOTIVATION FROM FAMILY MEMBERS . I expressed my desire for higher studies to my brother & he is glad to provide me the necessary support needed for my higher studies. I did my School Leave Certificate from SCHOOL NAME , in 2012 securing YOUR SCORE ? I then co

URL Shorter Application

This project I am building a url shortner service which is an application that helps to convert a long url into short that will actually work . I am not focusing on the userinterface now but in upcoming days, I might come with the new blog of web shortner application with all login and signup functionality. For this I am using mangoDB cloud for storing all the get and post request on the database. I am new to mangoDB so, first I created a cluster in mangodb to start a new application which has a databse. We need to create a user and set a password to work out with mango db. I am starting from a scratch and need to install all the dependencies required for this project. First I need a package.json which will work out with all the dependencies and packages, then we need express forweb framework, config for global varaibles, mongoose for abstraction of data from database and lastly, valid-url and short-id. The complete source code of this app is in the link below: https://gith