Win a copy of Kotlin for Android App Development this week in the Kotlin forum!

tangara goh

Ranch Hand
+ Follow
since Dec 27, 2009
I am a beginner in Java and hope to pick up the trade secrets so that I can move on to Android development
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 tangara goh

I am new in 'data-migration' and I think it is best seek out advice with the experts before I get my hands dirty.

Basically, I have a database which has a few thousands of rows and just a single table.

With the new schema which has a many to many relationship(many tables), I would need to migrate the data to my new schema.

Can I know if there is/are a free tool(s) out there to migrate the data ?

I will be using MYSQL server 8.0.14.

Running on Windows 10 OS.

Any opinions are most welcomed.

3 weeks ago
It is not giving me the key and values. It returned not found
3 weeks ago

Jeanne Boyarsky wrote:Remember that the longer you wait, the higher the chance the internship goes to someone else.  You definitely aren't going to be able to take the test and not have them count the result.

I don't think it will look good if you ask for another delay either. You are worried about taking the test and leaving a bad impression. Someone who keeps asking for delays also creates a bad impression.

I think I am not ready for the test; as I have forgotten most of the stuff.

Is it alright if I just tell them that I will withdraw my application and apply again when I am more ready?
3 weeks ago
Need abit of help to tell me where is wrong with this code below:

The problem and requirements as per the attachment.

3 weeks ago
I am in a dilemma and indecisive in character I hope to have some opinions.

There is an internship job which I have applied and I was told to do a online test.

However, I am unprepared cos it is a long time that I haven't really code cos my own project the code is not really that tough compare to Codility test.

So I told them and they extended the deadline.

What happened was that there was alot of things that happened during this period and I did not have time to revise or practise.

I have looked at hanker rank test but certain way the code is being written I am still trying to get the hang of it and I am really a slow learner, and it also leads me to think that if I am getting something not suitble.

Furthermore, my age may deter me from excel in this industry.

And there are other problems.

What would like to know what will you do if you were in my shoes ?

Cos I know if I were to take the test, the result most likely will turn out not good and I may end up leaving a bad impression.

On the other hand, I am curious how I would be tested.

Furthermore, I can't start from very low salary cos I am in need to bring in lots of money due to my circumstances and I am stuck.

Would it be too much if I were to ask for further delay or ask for the test so that I can still go thru it and then without counting the result ?

4 weeks ago

Recently, I received a direct emailer and when I clicked on the link, it lead to to a website where I keying in my particulars, and then it will the browser will show the change of URL to this below:

I'd like to know if one can tell what are the technologies being used based on this URL.

I would like to know what Java API to use in the below function to be added in a web-based Java EE applications with JSP :

I have a form for user to fill in and I wanted a notification/alert  to admin's email when the user sent the form.

Do I use Java Mail or is there any plug-in for this kind of notification ?

Do I use Gmail for localhost testing ?

1 month ago

Tim Moores wrote:Define "cloud based hoster". There is a wide variety of hosting options - which one might be suitable for you depends on your requirements about which we know nothing.

As to monitoring uptime and accessibility - you should be monitoring those all the time in an automated fashion, so that you will be alerted you when the site is  slow or unreachable. The hoster's responsibility is to keep the machine running and reachable from the outside; yours is to make sure the software runs as intended.

How do I monitor it in an automated fashion?

The support staff told me that they forgot some configuration and thus the site was down.....

1 month ago

I would like to have some feedback regarding cloud based hoster for java web app.

What are the good and cheap ones out there?

Currently, my site is with a hosting company that is not so reliable.

Recently, I just found out my site was down and I was totally in the dark till I received an email from a hacker that claimed that my site was hacked.

All these while, I was wondering why there was NIL sale coming in, even though there was a fair bit of marketing efforts.

And then I was not even compensated, even though I have paid them on time throughout the year.

Therefore, I am thinking of going for cloud based hoster but I am quite apprehended if it is going to be easy.

So far, I have tried heroku but I am not sure if this is the best and cheapest I can go for.

Hope to hear some opinions.

1 month ago

Rob Spoor wrote:Each JEE container like JBoss, GlassFish or WebLogic needs to come with one though. You would only need to find out which one so you can put the correct provider in your persistence.xml file. (JBoss comes with Hibernate, WebLogic with TopLink which is based on EclipseLink, no idea about others.)

I am using Tomcat, which I believe is the cheapest solution when comes to hosting.

Alright, I will research how it can be done.

So, just to confirm, that it is normal to add JPA on top of the normal jdbc ?

Cos I know that JPA handle ORM so I always thought it is choosing either the jdbc way or the JPA way or the Spring Data way or the hibernate cum Spring way.

Tim Holloway wrote:

You told MySQL to initialize a new data directory, but there was already data in it. MySQL did not like that.

If you cannot see schemas that used to be there, then it's likely that one of the following is at fault:

1. Your data directory isn't the directory that your database files are actually stored in (server not configured properly)

2. Your database files cannot be read by the userid that the MySQL daemon is running under (usually userid mysql). Most probably because your file ownership/access rights are incorrect.

3. The MySQL database userid that you connected to the MySQL server with doesn't have GRANT rights to see the schema.

But, I think I have the GRANT rights to root@localhost:

Please see below :

Rob Spoor wrote:

tangara goh wrote:My problem is that I am not using JPA, just pure Java EE.

Can I use that method ?

JPA is part of JEE, so if you're using JEE you can also automatically use JPA.

Hi Rob,

I hope I understand you correctly.

So, what you are saying is that I can add JPA on top of the JDBC with all the queries, is that right ?

Is this what people do in the industry ?

Because from what I know to use JPA, you also need to add annotations such as one to many and many to one, on the attributes concerned etc.

Daniel Demesmaecker wrote:The snippet:

The short answer is yes, but...
The slightly more extended version is, when using jdbc you have to write your queries yourself, so you're also responsible for the validation of the date.
The validation would happen before you use it in a querry, I don't know how you get your data, but if you're using mvc, that would be in your controller.
@id, @GeneratedValue and @NotNull, you don't need if you're db is set up correctly. id is the primaryKey, GeneratedValue is autoIncrement and NotNull is NOT NULL, those you would set up in your table on creation.
Checking if the value matches a certain pattern, you can do in you controller: @Temporal and @Past, I would never use, it simply means that the date is undefined and should be in the past.
You can simply make your column of type date and to check if it's in the past you can use:
which return a boolean

Hi Daniel,

I would like to clarify with you this line which you have written :

Checking if the value matches a certain pattern, you can do in you controller:



Are you saying that we can check the pattern of regex of that string, after we get the particular value ?

Do we just put the regex at the Model class will do ?

How will the Controller be able to tell which pattern belongs to which attributes ?

Or we have to write a helper class for that ?
I found this validation method in the following link and I thought it is really cool.

My problem is that I am not using JPA, just pure Java EE.

Can I use that method ?

Campbell Ritchie wrote:Why are you using System.getEnv(...) rather than System.out?
Why didn't you use try with resources to close your buffered writer?
Why are you using String#split in conjunction with a Scanner?

This doesn't come from me.  It is hanker rank's code which I found it very difficult.
1 month ago