Skip to content

Instantly share code, notes, and snippets.

View ravikumar-n's full-sized avatar

ravikumar-n ravikumar-n

View GitHub Profile

Privacy Policy Ravikumar N built the Changelog Monitor app as a Free app. This SERVICE is provided by Ravikumar N at no cost and is intended for use as is.

This page is used to inform website visitors regarding my policies with the collection, use, and disclosure of Personal Information if anyone decided to use my Service.

If you choose to use my Service, then you agree to the collection and use of information in relation to this policy. The Personal Information that I collect is used for providing and improving the Service. I will not use or share your information with anyone except as described in this Privacy Policy.

The terms used in this Privacy Policy have the same meanings as in our Terms and Conditions, which is accessible at Changelog Monitor unless otherwise defined in this Privacy Policy.

Information Collection and Use

Step 1:
File -> New -> Activity -> EmptyActivity
Step 2:
Set activity Name as "HelloWorldActivity" and click Finish
(Don't alter any option)
Step 3:
Goto newly generated "HelloWorldActivity" and define a public onClick
method like below:
@ravikumar-n
ravikumar-n / .gitignore
Created September 11, 2015 17:49
Android .gitignore
# Built application files
*.apk
*.ap_
# Files for the Dalvik VM
*.dex
# Java class files
*.class
@ravikumar-n
ravikumar-n / .bashrc
Last active February 23, 2018 09:31
A simple .bashrc file.
#default editor
export EDITOR=/usr/bin/atom
# common aliases
alias cp='cp -iv' # Preferred 'cp' implementation
alias mv='mv -iv' # Preferred 'mv' implementation
alias mkdir='mkdir -pv' # Preferred 'mkdir' implementation
alias ll='ls -FGlAhp' # Preferred 'ls' implementation
alias less='less -FSRXc' # Preferred 'less' implementation
@ravikumar-n
ravikumar-n / sort.java
Created July 23, 2015 22:17
Sort numbers from 1..n in time complexity::o(n) and space complexity o(1).
int []arr = new int[]{2,1,4,1,4};
for(int i=0;i<arr.length; i++) {
if(arr[i] > 0) {
int elementIndex = arr[i] - 1;
if (arr[elementIndex] > 0) {
arr[i] = arr[elementIndex];
arr[elementIndex] = -1;
i--;
} else {
arr[elementIndex]--;
@ravikumar-n
ravikumar-n / gist:50782f51b49304f7540a
Created April 4, 2014 08:29
Create 300 Copies of image starting with pic0001 to pic0300 # Bash Expression
for n in {0001..0300}; do cp pic.jpg pic$n.jpg; done
class Polynomial
def initialize(coefficients)
raise ArgumentError, "Need at least 2 coefficients" if coefficients.size < 2
@co = coefficients
@powers = Array.new(@co.size - 2) { |i| "x^#{i+2}"}.reverse << 'x' << nil
end
def to_s
return "0" if @co.all? { |c| c.zero? } # not much to do in this case
@co.zip(@powers).map do |el|