Win a copy of Modern frontends with htmx this week in the Spring forum!

Manuel Petermann

Ranch Hand
+ Follow
since Jul 19, 2011
Manuel likes ...
Hibernate Python Linux
Merit badge: grant badges
For More
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Manuel Petermann

Yeah I know that but they are expensive and my department thinks that it is a good idea to program it from scratch...
I plan to use OpenNlp mainly to extract the sentences and to analyze them for style.
I than plan to send those sentences/phrases to Lucene for indexing.
The problem isn't that we suspect the students to copy from the internet but that they copy from each other so comparing it with web content isn't the issue.
It also would be a legal issue to transfer those documents to servers outside of our control.

If you have any general advice I would be very grateful.
8 years ago
I got the assignment to check submissions of students for plagiarism and to to advice the students in their writing style.
Plagiarism should only be checked for in documents of the same assignment.
In summary I need to check if they have described every abbreviation, have good to understand sentences and used easy to understand language.
I know about the libraries OpenNlp and UIMA but i am unsure if they really are what i need to get the job done.
To check for plagiarism i am using Lucene and the target language is mostly german.
8 years ago
I think the definition for a cloud is that you cannot define it. ;)
In my opinion you need some kind of load-balancing/ sharding to be a cloud.
You can do that on one physical server or many of them.
I think its the most fuzzy word in computer science.
10 years ago
The Questions you might want to answer are:
Why do you want to underline it?
Is it always underlined? What constrains?
Who/What reads the file?
10 years ago

Shiv Swaminathan wrote:
But it will be good to have both single catch and multiple catch exception argument to be treated in a consistent way...

Problem being if you would allow that, you would make assignment of objects inconsistent, which I think is far more important.
10 years ago
Same reason as stated by Steve.
You are basically just printing the "last" iteration already printed by your Thread.
I think the Collections.synchronized... should be avoided in most cases because it implicates a kind of security which is simply not there.
Please edit your post to make use of codetags. e.g select your code and click on the code button.
I would split it up in something more abstract but your solution would work too.
For starters yes.
Anyway, You wouldn't solve your initial problem that way.
If your databaseLog would simply extend SwingWorker you would end up creating exactly as many new workers as there are files.
That is a bad idea for your problem because as far as i know most filesystems cannot read more than one file at a single point in time anyways.
The fact that a SwingWorker is limited to 10 distinct threads is just a sidenote to that.
Think about what you also might want to do in a separate thread.
Oh You just need 1 thread/SwingWorker for that.
What does Gui mean? Swing, JavaFx, SWT or something else?

Secondly you databaseLog class violates the java naming convention. You should use an uppercase letter up front.

You might want to delegate the whole thing to a SwingWorker (Swing), Task/Service (JavaFx) or something similar for your Framework.

This is because right now you highly depend on the files being on a fast filesystem and that there are not that many files. If that is not the case, maybe because of a network filesystem or simply a very slow/ already busy filesystem, you are stuck with an unresponsive gui.
I think dead code might refer to code which is executed but just a subset of its computed values is actually needed to solve your problem.
I think the main reason for that to happen is if you don't define your interfaces properly or but too much responsibility in one method/class.

The other reason I come to think of, you write an algorithm which is incredibly slow. You want to tell the user if it takes more than 2 seconds that he can go make a coffee.
Now someone else improves your code and it will never ever take that long. The code to tell the user to wait is still there but will never actually execute.
The same thing will happen if the average computational power available increases above a threshold.

Edit: The second one isn't dead code per your definition, as it never executes I still think its near enough to mention.
10 years ago
Serious game? Sounds like funny Excel in reverse.
I am not a big fan of .exe.
It takes away the platform independency with little to no benefit.
java exe Might be a good place to start.
11 years ago
I think he ment the fact that you need the right display to get the right thread.
If the display is not the default one you may have a problem if you are not in the correct thread.
Then again I am not that firm with SWT and there might be a solution to that.
Anyway you should explain a bit better what you want to do.
11 years ago
May I ask what gui Framework you are using?
If you are using Swing/JavaFx/Swt you won't see anything at all (well at least not what you want to see) even if you fix that one bug!
11 years ago
In case you are working on a rich client you might want to have in mind to not run long tasks inside the ui thread in addition to seperation of concerns.
11 years ago