I am always surprised at the added knowledge i can get from others when i give my opinion on a topic.
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
fred rosenberger wrote:How do I turn a screw with paper?
How do I write a novel using water?
"Il y a peu de choses qui me soient impossibles..."
I am always surprised at the added knowledge i can get from others when i give my opinion on a topic.
Paul Ngom wrote:I do not want the warnings when i compile and i want the program to run faster. The present code is too slow when there are many directories.
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
I am always surprised at the added knowledge i can get from others when i give my opinion on a topic.
Paul Ngom wrote:I do not want the warnings when i compile and i want the program to run faster. The present code is too slow when there are many directories.
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
I am always surprised at the added knowledge i can get from others when i give my opinion on a topic.
Paul Clapham wrote:I don't think the slowness has anything at all to do with the minor details of HashMap's implementation. It's just memory usage, after all.
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
I am always surprised at the added knowledge i can get from others when i give my opinion on a topic.
Winston Gutkowski wrote:(many of which might be lengthy string checks)
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
Paul Ngom wrote:Have you tried the code at all? It will write all sub folders under a given directory in a file no matter their level. Even if the folder is 1000 directories deep, it will be listed. Directories that could not be opened are also listed in a different file.
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
I am always surprised at the added knowledge i can get from others when i give my opinion on a topic.
Paul Ngom wrote:Paul, i am not here to re-invent the wheel. If i see better code, i will adopt it. So if you have a better solution, please share it.
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
I am always surprised at the added knowledge i can get from others when i give my opinion on a topic.
Paul Ngom wrote:You must be forgetting that this is a beginner forum.
How do i try the code you posted? I see that it takes 2 arguments. The first is understandable but i don't know how to pass the second.
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
I am always surprised at the added knowledge i can get from others when i give my opinion on a topic.
Paul Ngom wrote:I tried the piece of code that you supplied but it only listed level 1 sub directories.
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
I am always surprised at the added knowledge i can get from others when i give my opinion on a topic.
Paul Ngom wrote:here it is
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
I am always surprised at the added knowledge i can get from others when i give my opinion on a topic.
Please, pinpoint to where i am doing it wrong in the code i supplied.
I am always surprised at the added knowledge i can get from others when i give my opinion on a topic.
The secret of how to be miserable is to constantly expect things are going to happen the way that they are "supposed" to happen.
You can have faith, which carries the understanding that you may be disappointed. Then there's being a willfully-blind idiot, which virtually guarantees it.
I am always surprised at the added knowledge i can get from others when i give my opinion on a topic.
The secret of how to be miserable is to constantly expect things are going to happen the way that they are "supposed" to happen.
You can have faith, which carries the understanding that you may be disappointed. Then there's being a willfully-blind idiot, which virtually guarantees it.
I am always surprised at the added knowledge i can get from others when i give my opinion on a topic.
Paul Ngom wrote:It is about you code. When it finds a directory which access is denied, the program ends with a NullPointerException.
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
I am always surprised at the added knowledge i can get from others when i give my opinion on a topic.
Paul Ngom wrote:Hi, thanks for the posts. I have noticed that the list directories falls short of one item when non accessible folders are found. Can you find where the problem is?
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
I am always surprised at the added knowledge i can get from others when i give my opinion on a topic.
Paul Ngom wrote:I was able to find the solution to the problem when i printed the lists out.
I am using ubuntu 14.04 and jdk8.
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
I am always surprised at the added knowledge i can get from others when i give my opinion on a topic.
Paul Ngom wrote:It is true that links to directories are considered as being folders in the program. Is there a way of excluding them?
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
Did you see how Paul cut 87% off of his electric heat bill with 82 watts of micro heaters? |