Skip to content

Instantly share code, notes, and snippets.

View laxman954's full-sized avatar

L∈κshmαηα ρεγυmαl M laxman954

View GitHub Profile
@bchetty
bchetty / EulersNumber.java
Last active July 1, 2016 13:17
Google Billboard Puzzle
import java.math.BigDecimal;
import java.math.MathContext;
public class EulersNumber {
public static void main(String[] args) {
BigDecimal e = BigDecimal.ONE;
BigDecimal bigDecimal = BigDecimal.ONE;
for(int i=1;i<100;i++) {
bigDecimal = bigDecimal.multiply(new BigDecimal(i * 1.0 + ""));
@bchetty
bchetty / Inception.java
Created April 24, 2014 20:48
Java - Recursion Depth
**
* Inception
*
* @author Babji, Chetty
*/
public class Inception {
public static void main(String[] args) {
Inception inception = new Inception();
inception.dream(0);
}
@myusuf3
myusuf3 / delete_git_submodule.md
Created November 3, 2014 17:36
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule
@laxman954
laxman954 / jdk_download.sh
Created September 22, 2017 10:17 — forked from P7h/jdk_download.sh
Script to download JDK / JRE / Java binaries from Oracle website from terminal / shell / command line / command prompt
##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### #####
### Shell script to download Oracle JDK / JRE / Java binaries from Oracle website using terminal / command / shell prompt using wget.
### You can download all the binaries one-shot by just giving the BASE_URL.
### Script might be useful if you need Oracle JDK on Amazon EC2 env.
### Script is updated for every JDK release.
### Features:-
# 1. Resumes a broken / interrupted [previous] download, if any.
# 2. Renames the file to a proper name with including platform info.