This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class DataSource { | |
private Connection connection = null; | |
private static DataSource datasource = null; | |
// private constructor | |
private DataSource(){ | |
connection = getConnection(); | |
} | |
// method to get an instance. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Search{ | |
private int binarySearch(int arr[], int key){ | |
if(arr == null) | |
throw new RuntimeException("Null array found"); | |
int l = 0; // lower limit | |
int h = arr.length - 1; // upper limit | |
int m; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public int largestSum(int[] A){ | |
if(A.length == 0) return 0; | |
if(A.length == 1) return A[0]; | |
int max = Integer.MIN_VALUE; | |
int curr = 0; | |
for(int i = 0; i < A.length; i++){ | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
[ | |
{ | |
"time": "0", | |
"y": 0 | |
}, | |
{ | |
"time": "1", | |
"y": 0 | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#coding:utf-8 | |
# Author: Anup Sawant | |
# Purpose: Doc2vec vectors of Science Direct Articles | |
# Created: 9/21/2015 | |
import sys | |
import os | |
import pandas as pd | |
from pandas import Series, DataFrame |
OlderNewer