Change Photo
Stanton Donnelly

Questions by Stanton Donnelly

Split Java String by New Line?

I'm trying to split text in a JTextArea using a regex to split the String by \n However, this does not work and I al...

Why is my Android emulator keyboard in Chinese character mode??

I'm debugging my Android application using the AVD (Android Virtual Device). When I try to enter text in a text fie...

How can I generate random numbers for demo charts that roughly trend up and to the right??

I need to generate random numbers for several charts that go up and to the right. I'm using a JavaScript charting e...

Why is using a wild card with a Java import statement bad??

It is much more convenient and cleaner to use a single statement like import java.awt.*; than to import a bunch o...

c++ deque vs queue vs stack?

Queue and Stack are a structures widely mentioned. However, in C++, for queue you can do it in two ways: #include &...

Get path of executable?

I know this question has been asked before but I still haven't seen a satisfactory answer, or a definitive "no, this...

Grep only the first match and stop?

I'm searching a directory recursively using grep with the following arguments hoping to only return the first match....

How to get complete month name from DateTime?

What is the proper way to get the complete name of month of a DateTime object? e.g. January, December. I am curren...

Line width in other angle?

I draw line like this: - (void)drawRect:(CGRect)rect { _lineColor = [UIColor blackColor]; [_lineColor set...

Invalid viewstate error in asp.net page?

The webpage is a simple registration type page. Each user has to fill around 200 fields. There is 1 parent table and...

How to increase the font size of ggtitle in ggplot2?

I would like to increase the font size of ggtitle and also the font should be bold. My code is as follows. ggplot(d...

how to emulate “insert ignore” and “on duplicate key update” (sql merge) with postgresql??

Some SQL servers have a feature where INSERT is skipped if it would violate a primary/unique key constraint. For ins...

why there is a LoadStore instruction??

I'm learning the JSR-133 cookbook from the page JSR-133, in the section 'Categories', the author gave an example abo...