This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin for Android App Development and have Peter Sommerhoff on-line!
See this thread for details.
Win a copy of Kotlin for Android App Development this week in the Kotlin forum!

Ron McLeod

Saloon Keeper
+ Follow
since Feb 12, 2013
Ron likes ...
Android Angular Framework Eclipse IDE Java Linux MySQL Database Redhat TypeScript
Richmond, BC, Canada
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 Rancher Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Ron McLeod

Ben Hutchenson wrote:Consistent naming convention: lowercase filename matches lowercase class's name

Class names (and associated file names) should use CamelCase and start with a capital letter ... rather than
6 hours ago
Assuming that CountDownTimer is an anonymous class inside MainActivity, MainActivity.this would provide a reference to the application's context
6 hours ago
What class are you calling the method from?

What you have posted is a method in the CountDownTimer class.  Is CountDownTimer an anonymous class inside MainActivity, or is it in its own class?
7 hours ago

Ron McLeod wrote:... post the code for the class that you are calling it from.

8 hours ago

Daniel Andersson wrote:Thanks but that did not work. I want to check if the phone is locked within a startTimer class

I understood you were calling this code from the MainActivity class.  If that is not the case, then post the code for the class that you are calling it from.
8 hours ago

Daniel Andersson wrote:What should i write within the () ?

MainActivity extends Activity which eventually extends Context so you should be able to use this
== true is not needed
8 hours ago

Daniel Andersson wrote:... I tried  this without success

Can you provide details on the what was unsuccessful?

Did you include a reference to the context?
8 hours ago

Cl Castillo wrote:... the Javabean naming rules said "The method name must have a prefix of set/get/is, followed by the first letter of the property in uppercase, followed by the rest of the property name."

Property name is numberWings, so method name getNumWings should be wrong? Please clarify if I'm wrong.

According to The Java™ Tutorials: Glossary of Terms:
    property: Characteristics of an object that users can set, such as the color of a window.
    field: A data member of a class. Unless specified otherwise, a field is not static.

In this case:numWings is a property, and numberWings is a field.
In addition to Carey's comment, I would also suggest that you extract the validator code in to a separate method (maybe a separate class) which you can test and debug independently of the main application.

1 day ago
It says that the position is in Florida, USA.  I would assume that you need to be able to legally work in the USA to be considered.

Since his email address is included in the post, probably best to contact Sam White directly.
1 day ago
It would be this:
It would have been faster though just to try it yourself and see which one worked.
1 day ago
Your welcome.   And thanks for replying back with your solution.

D Cuff wrote:So I just figured out that having an xsd:any within an xsd:all is not allowed in XSD 1.0 but will be allowed in 1.1.

You could have a sequence of xsd:any inside the extras container/wrapper.  Since you want to avoid describing the elements for the extra information in the schema, you would need to specify processContents="lax" (or processContents="skip").

Also, why port 8081?  Are you running multiple instances of Tomcat?
3 days ago
Anything interesting in the various Tomcat logs?
3 days ago