Sean Corfield wrote:In general 'map' is appropriate when you want to take a collection of items and produce a new collection with each item transformed in a particular way. The input and output collections will have the same length and each successive element of the output collection corresponds to the successive elements of the input collection.
If you want to produce a result that has a different shape to the input collection, you would use 'reduce' or 'fold' (different languages call them different things).
Does that help?
Henry Wong wrote:
Liutauras Vilda wrote:you may find some useful information here (<-- link to click on).
From that link, read the two links about running a book promotion -- here and here. The first one is mainly for the publisher and the second one is for the author. And of course, the author should read both if the book is self published.
Also, look here for availability. Right now, only January is available. More slots will definitely open after the holidays.
Anyway, once the publisher is ready, then send the requested information to bookpromotion AT javaranch DOT com, and a member of the promo staff will help coordinate/process/schedule the promotion.
Hope this helps,
Henry
Henry Wong wrote:
First, let me move this topic to the ranch office forum, as this has nothing to do with Swing.
As for your original question, I am pretty sure that the November 15 week is no longer available (as that should have already started). Anyway, are you looking to run a promotion?
Henry
Henry Wong wrote:
What book promotion are you referring to? Are you talking about the ones hosted by the ranch?
Henry
Rob Camick wrote:@Gunjan,
You should NOT be hardcoding a directory structure to load files. You can not guarantee the same structure will exist on all computers.
The better way is to use the "getResource()" method.
Read the section from the Swing tutorial on How to Use Icons for more information.
Rob Camick wrote:@Gunjan,
You should NOT be hardcoding a directory structure to load files. You can not guarantee the same structure will exist on all computers.
The better way is to use the "getResource()" method.
Read the section from the Swing tutorial on How to Use Icons for more information.
Tapan Agarwal wrote:
francois lebel wrote:OK it's right, I FOUND THE AWNSER MYSELF
THANK YOU!!!
Hi Francois,
I have been facing the same issue.
Error is
Exception in thread "main" java.lang.NullPointerException
at javax.swing.ImageIcon.<init>(Unknown Source)
at org.taps.cm.View.main(View.java:27)
Any idea whats wrong here.
James Simpson wrote:Alright I took a look at the link and I rewrote the code.
Its still giving me a NullPointerException except this time its at line 22.