Skip to content

Maven child module does not exist

I’m new to Maven. I checked out from SVN a project from a customer with the following structure: the pom.xml right below ‘projectName` (the pom at the top) is building the three modules But when executing mvn clean install from folder projectNameit gives the following error The question is: Should…

How to Change programmatically Edittext Cursor Color in android?

In android we can change the cursor color via: android:textCursorDrawable=”@drawable/black_color_cursor”. How can we do this dynamically? In my case I have set cursor drawable to white, but i need to change black How to do ? Answer Using some reflection did the trick for me Java: XML: Here is a me…

How to compare two string dates in Java?

I have two dates in String format like below – I want to make sure startDate should be less than endDate. startDate should not be greater than endDate. How can I compare these two dates and return boolean accordingly? Answer Convert them to an actual Date object, then call before. Recall that parse will…

How to rotate the LinearGradient in a given Shape?

I try to find the way to rotate the LinearGradient object nested into e.g. Rectangle object, say: Now, I try to rotate this lg object, for example for 45 degrees to the left, but without rotating the whole rect. Is there any way to achieve that? Answer The first parameters that are given to the LinearGradient…

Validate page numbers/ranges for printing

I am writing a regular expression for matching a particular pattern which is as follows. We all are familiar with the pattern that we give while printing selective pages via a word document. i.e. We can use comma and hyphen no other special characters allowed should start and end with a number Comma and hyphe…