Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Kaushal Shah Kaushal28

🎯
Focusing
  • Crest Data Systems
  • Ahmedabad
View GitHub Profile
View app.js
/**
* Created by Zeeshan on 3/26/2016.
* Last updated by Zeeshan on 02/25/2018.
*/
//------------------------------------------------------
//direct upload to GridFS without saving on local disk
//Stack: node.js express mongoDB GridFS
//Run : node app.js
//Web Link=> http://stackoverflow.com/questions/20860005/storing-data-stream-from-post-request-in-gridfs-express-mongodb-node-js
View GFG.java
import java.util.*;
import java.math.*;
class GFG {
public static BigInteger binomial(int n, int k){
if(n < k){
return new BigInteger("0");
}
BigInteger dp[][] = new BigInteger[n+1][n+1];
for(int i=0;i<=n;i++){
View GfG.java
class GfG{
boolean isLeaf(Node node){
return node.left==null && node.right==null;
}
boolean isComplete(Node node){
return node.left!=null && node.right!=null;
}
boolean isEmptyLeftButFullRight(Node node){
return node.left==null && node.right!=null;
}
View GFG.java
import java.util.Scanner;
class GFG {
public static void main (String[] args) {
Scanner in = new Scanner(System.in);
int t = in.nextInt();
while(t-->0){
int d = in.nextInt();
int m = in.nextInt();
int y = in.nextInt();
View GFG.java
import java.util.Scanner;
import java.util.LinkedList;
class GFG {
public static int counter;
public static void BFS(int num, int x, int[] a){
LinkedList<Integer> q = new LinkedList<>();
q.add(num);
while(q.size()!=0){
int current = q.poll();
View noConsicutiveOnes.java
public class noConsicutiveOnes{
public static int find(String s, int n){
if(s.length() == n){
return 1;
}
if(s.length() == 0 || s.charAt(s.length()-1) == '0'){
return find(s+"0", n) + find(s+"1",n);
}
return find(s+"0", n);
}
View largestRegion.java
import java.util.*;
import java.lang.*;
import java.io.*;
class GFG {
static boolean isSafe(int[][] mat, int i, int j, boolean[][] visited){
return (i>=0) && (i<mat.length) &&
(j >= 0) && (j<mat[0].length)&&
View waitForTime.java
package purvil12c.musicplayer;
import android.app.AlarmManager;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.os.AsyncTask;
import android.os.Handler;
import android.util.Log;
import android.widget.Toast;
@Kaushal28
Kaushal28 / Main2Activity.java
Last active Aug 30, 2016
This is my activity from where the place picker activity is called on button click. (Main2Activity)
View Main2Activity.java
package com.example.kaushal28.locationbasedreminder;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.Intent;
import android.graphics.Bitmap;
import android.os.Bundle;
import android.support.v4.app.NavUtils;
import android.support.v7.app.AppCompatActivity;