Discover gists

View ReverseArrayWithUserInput.java

package com.company;
import java.util.Scanner;
public class ReverseArrayWithUserInput {
public static void reverseArray(int[] array){
int temp, startIndex, endIndex;
startIndex= 0;
endIndex=array.length-1;
temp = array[startIndex];

View ReverseAnArray.java

package com.company;
public class ReverseAnArray {
public static void reverseArray(int[] array){
int temp, startIndex, endIndex;
startIndex = 0;
endIndex = array.length-1;
while(startIndex<endIndex){
temp = array[startIndex];
array[startIndex] = array[endIndex];

View adding_new_columns.py

'''
In this case, 'Date' and 'Time' are two new columns needs to be added based on converting existing column 'datetime'
which is in unix millseconds format.
epoch_converter is a files contians functions to help with the convertion.
'''
stock['Date'] = stock.apply(lambda row: epoch_converter.get_date_from_mill_epoch(row['datetime']), axis=1)
stock['Time'] = stock.apply(lambda row: epoch_converter.get_time_from_mill_epoch(row['datetime']), axis=1)