I forgot to post the work I did. Apologies for that.
a)Create a HashMap<String,Integer> which would store each word and its occurrences across all files.
b) Fill this map with the occurrences per word in first file.
c) Initiate threads (1 per file) which will read all the contents of the file first to another map and then loop over the HashMap to identify which word is not present. Whichever is not present, we remove from the HashMap thereby ensuring that only the ones that exist in all files are retained.
The problem I am facing is to get the final map after all the threads are executed. Assume I have to print the output to the cmd prompt. Then I have to get the final map and print them. As of now I have put the print stmt in the run method itself. So its printing the content everytime a thread executes. But I want final map and print only once. So how to get the final map after all the threads are executed?
I know to achieve this my traditional method like load each file,count occurrence of each word, check for the word and do necessary operations. But this isn't efficient right? So thought of multithreading.
Please let me know if any better approach can be used to achieve the solution for the problem.
Ah, OK, that's important information we will need in order to give an answer; however, this forum is specific to the C++ language, not FORTRAN, which would be discussed in the 'Legacy Languages' forum. Hopefully, one of the moderators will move this over to that message board sometime soon.
If you look at the recent trend around mobile app development a lot of revenue is generated around ad's. Even the most recent game apps like Flappy Bird was said to generate around $50,000 a day from in-app advertisements.
You can even look at the Market Research to know about the specifics about the ad's being targeted and the turnover.
So, yes if you develop an app and run whatever ad-service, I think you would be able to get similar or more gains, if not less, from the visits.
You are using Scanner class to accept an input (nextLine()), so you could simply test what the input would be. So what you may do is to convert the input String to bytes. If I remember correctly, the esc key gives you a byte array length of 1 with value of 27 inside. So you could check if the input value (after converted to byte array using getBytes() has size of 1 and the value inside is 27. Though, the user still has to press Enter key so the program will accept the value (for nextLine()). However, Ctrl+<any key> does not seem to be working for Java in the console...
'PLATO' itself a compiler.Espeacialy for 'FORTRAN' programing.'FORTRAN' is mathematical problem-oriented language.it was all fine,recently my 'PLATO' compiler started compiling my program showing 'no error' and after then,when i run the program it do nothing only showing black DOS box with 'prees 'return' to continue' written on it.here is a link of plato http://www.silverfrost.com/32/ftn95/ftn95_personal_edition.aspx here's one program of mine Program primei
8 Write(,)'please enter an integer greater than 1'
go to 8
Celary yuo aer a gineus who not olny cna qukcily slove teh hmorweok of ohters threbey hdaning tehm a sulotoin on a palte, but yuo cna aslo raed tihs gabrbled meassge in nomral tmie. Jsut in csae yuo hdan't geussed I dwon repeepd yuo as yuo dno't apaeppr to hvae laernt why tihs is worng.
s = "test01-15.dat"
q = s.split('.')
numeric = "".join(n for n in s.split('.') if n in '0123456789-')
''' result ...
I am trying to do a search for sub-folders in a directory that conaint numbers. The format could be a date range for example: 1-1, 01-1, 1-01, 01-01. The first number will only go up to 12 and the second one will go as high as 31 and im trying to figure out how to read the date of files that are in there then once it finds the correctly formated file name it kicks off the code to go into that file and do what else my code is set to do . If there is a simple way to do this please let me knwo cause this has me running in circles and if my code is needed i will post it.