Skip to content

Instantly share code, notes, and snippets.

View pramod-sharma's full-sized avatar

Pramod Sharma pramod-sharma

  • Microsoft
  • Bengaluru, India
View GitHub Profile
@pramod-sharma
pramod-sharma / array.rb
Created June 4, 2016 02:20
Custom Flatten Method
class Array
#Usage :- [[1,2],8,[3],6,7,[4,[6,7]]].custom_flatten
def custom_flatten
flattened_array = []
self.each do |element|
if element.is_a? Array
flattened_array += element.custom_flatten
else
flattened_array << element

0. Overview

This article aims to be a portal to installation and configuration of Cassandra. It is self-contained in the first place. It also provides links to the original articles.

Warning: This article is still under written.

Prerequisites

Install Oracle Java Development Kit (JDK)

@pramod-sharma
pramod-sharma / insert ignore
Created March 16, 2015 09:03
Replicate Functionality of Insert Ignore of MYSQL in PostgreSQL. Give Special reference to typecasting as Select statement always output field in text format, hence needed to be recast before insertion
INSERT INTO hris_employeeattendance
(
employee_code,
for_date,
for_day,
in_time,
out_time,
hours_clocked,
create_time,
initial_status,
@pramod-sharma
pramod-sharma / 0_reuse_code.js
Last active August 29, 2015 14:17
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console