Cannot see files present on server when connecting via SFTP?
208
Open the FileZilla FTP tool. Navigate through View > Filename filters >Directory listing filters and uncheck all the checked options in remote filters and click on apply button.
Related videos on Youtube
Author by
Lylio
Updated on September 18, 2022Comments
-
Lylio over 1 year
I've written a Java program which reads a series of real numbers from a text file into an array. I would like to use -1.0 as a sentinel so that scanner stops reading from the file when it reaches -1.0.
I'm struggling to insert the sentinel in the correct position, and also unsure if this should be done with an if or while statement. Any help much appreciated:
import java.util.Scanner; import java.io.File; import java.io.FileNotFoundException; public class CalculatingWeights { public static void main(String[] args) throws FileNotFoundException { //Create file and scanner objects File inputFile = new File("in.txt"); Scanner in = new Scanner(inputFile); //declare variables double [] myArray = new double [100]; int i = 0; double min = myArray[0]; double max = myArray[0]; //Read numbers from file, add to array and determine min/max values while(in.hasNextDouble()) { myArray[i] = in.nextDouble(); if(myArray[i] < min) { min = myArray[i]; } if(myArray[i] > max) { max = myArray[i]; } i++; } //Calculate and print weighting for(int index = 0; index < myArray.length; index++) { double num = myArray[index]; double weighting = (num - min) / (max - min); System.out.printf("%8.4f %4.2f\n", num, weighting); } } }
-
Eugene Mayevski 'Callback about 12 yearsNon-programming questions are offtopic here.
-
veer712 about 12 years@EugeneMayevski'EldoSCorp: How should I move this question to other site. I do not have permissions. Thought it was something related.
-
veer712 about 12 years@EugeneMayevski'EldoSCorp : Thankyou.
-
user 99572 is fine over 10 years@veer712 Hi, please don't use the Server tag anymore. It clearly says: DO NOT USE. So please follow that. Thanks!
-
-
veer712 almost 12 yearsWOW, it worked. Thanks a ton @kevin6bailley