Khusbu Sinha

Ranch Hand
+ Follow
since Jan 21, 2017
Cows and Likes
Cows
Total received
1
In last 30 days
0
Total given
0
Likes
Total received
2
Received in last 30 days
0
Total given
35
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Khusbu Sinha

Alright. I would love to have a read of your new edition of 'Effective Java'.
4 months ago
@Josh Sir,
Thanks for your insight. Although I love Java and agree with Stephan van Hulst that its API is indeed, very well documented, I would try learning more tools of different varieties as you recommend in order to be a better developer.
One last question, does this new edition of Effective Java cover Java 8 and Java 9 new features?
4 months ago
Hello Josh Sir,
It's a pleasure to be able to interact with you in this forum. I would like to know from your end, what makes Java better in comparison to other languages like C++ and Python. I want to feel motivated and confident in building my career as a Java Developer
and would, therefore, like to know why a programmer should prefer Java over other languages.
4 months ago
Nothing is printed on the console when I do

The predict method prints nothing when I call it by:

Even when I make the return type void, the predict method prints nothing when called by
although the above System.out.println() statements are present in the method.
1 year ago
I corrected the code and the exception is now gone but the program gives the output as null instead of printing the category name. I need the program to output the news category of the input text.
I figured out that there is a problem in the predict method of the NaiveBayes class which should return the category name but instead returns null.

Here is a list of all the files in the various packages:

NaiveBayes.java





Document.java




FeatureStats.java




NaiveBayesKnowledgeBase.java




NaiveBayesExample.java




FeatureExtraction.java




TextTokenizer.java




I need help in correcting the predict method of NaivesBayes.java so that it returns the category name as output instead of returning null.

As of now, I am getting the following output:

File1.txt : null
File2.txt : null
File3.txt : null

1 year ago
I need to implement a program in java that classifies text files into various language categories such as english, french, german etc. Naive Bayes Classifier algorithm is used for this problem. I have got this code from Github and it throws Null pointer exception for lines 19 and 40 of NaiveBayesExample.java program .  I need help in debugging this code. I have created and imported all the required custom packages.

1 year ago
Thanks Scott. Based on your recommendation, I am first going to learn Java 8  and then proceed to the certification path. I hope this would turn out to be an interesting learning experience.
Hello Scott and Jeanne,
My level in Java is that of a beginner. I am familiar with the key concepts of OOPS such as Classes, Interfaces, Inheritance, Polymorphism, Collections etc. I have done some competitive programming in sites such as HackerRank, HackerEarth, Techgig etc.  I know Java 7 but would like to make a transition to Java 8 soon. As I am not aware of the new features in Java 8 that makes it superior to Java7, I would like to know how much time on an average it would take to switch to Java 8 for someone already coding in Java 7.  My goal is to get certified in OCP8 in the nearest future. So, a recommendation on how to get OCP8 certified would be highly appreciated.
Thanks Mainak. I was eagerly waiting for your book. Your e-mail made my day. I now have the e-book and I am too happy and excited to read it.
Thanks David.
I have been curious enough to learn about the Java 8 unique features since the time I came across certain problem statements which were drastically simplified using Streams(Java 8 feature) and the resulting solutions offered a very good time complexity. However, I did not make a move to Java 8 then, thinking it would be too time consuming for me but your simulator prompted me to go ahead without futher delay and explore the Java 8 concepts that make it more powerful than Java 7. As a result, I have enrolled myself for Java 8 course by an Udemy instructor. I must say, that a test simulator like the one offered by you, keeps the learner curious, motivated and sharp in mastering the Java concepts thoroughly.
I haven't taken any Java certification so far but hope to give it as soon as I master the Java 8 concepts thoroughly.

Regards,
Khusbu Sinha
Hello David!
I am currently learning and practicing Java7. Will your software help me in preparing for the certification exam of Java7? Also,please mention the key features of your product such as the performance analysis, detailed solutions, hints, suggested practice/ recommendations for the weak areas after one is done with the mock exam.
Thanks Norm. I simplified the if statement as per your suggestion.

1 year ago
This is an ugly Brute Force approach I used to solve this problem but since the maximum  value of  'row' input by the user was  only 20 according to this problem, I hope this solution is not that bad.

1 year ago
Sorry, I mean row and not column here. Is there any command to bring the cursor back to the previous line?
1 year ago
I am writing a program to print a pattern that represents a single flower such that each such flower is printed in 'n' rows and 'c' columns, one in each grid.
The single flower pattern is as follows:
..O..
O.o.O
..O..

where:
O = Uppercase 'O'
o = Lowercase'o'
. = period

Sample test case:
For 2 rows and 5 columns:
the pattern should be this:

..O....O....O....O....O..
O.o.OO.o.OO.o.OO.o.OO.o.O
..O....O....O....O....O..
..O....O....O....O....O..
O.o.OO.o.OO.o.OO.o.OO.o.O
..O....O....O....O....O..

i.e a single flower per grid.
I am having problem in printing this pattern for each column, since I don't know how to bring the cursor back to the start position for each column.


1 year ago