My question is: How is arg[0] pointing to the text file? Code Snippet would be appreciated
S
shekarchee
@shekarchee
Posts
-
redirecting and piping -
redirecting and pipingHow is the text file below (% java BinarySearch largeW.txt < largeT.txt) read as "args[0]". Code snippet would be apprecated
public static void main(String[] args)
{
int[] whitelist = In.readInts(args[0]);
Arrays.sort(whitelist);
while (!StdIn.isEmpty())
{
int key = StdIn.readInt();
if (rank(key, whitelist) == -1)
StdOut.println(key);
}
}% java BinarySearch largeW.txt < largeT.txt 499569 984875 ...
-
binning at zero-filling dataHello, I would like to bin and zero-fill excel or text data using C#. For example; Raw data: 1 34 2 3 43 4 3 5 converted to: 1 34 2 0 3 45 4 3 5 0 Does anyone have code for this? Thanks