Jules Bach

Ranch Hand
+ Follow
since Apr 28, 2008
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 Jules Bach

My java is basic (i'm still a learner), so this probably isn't the best way to do it - but if you know that the course, number and description always start at the same place in the string you could split it with the substring method


This is assuming that the course code and number always have a length of 3
10 years ago

I remember the time I was kidnapped and they sent a piece of my finger to my father. He said he wanted more proof.

12 years ago

The kid was just repeating stuff that the air traffic controller was saying. At first glance it looks like a regular overreaction by the media.

True, but in air traffic control when things go wrong - averting a disaster can require a split second reaction. Air traffic controllers requires many years of training and supervision, it's not something that a child can safely mimic.

There was an incident at Heathrow in 2001, where had a British Airways Boeing 747 on approach had not already begun a go-around manoeuvre about a second before the controller told him to a collision may have occurred.

Take off and landing - statistically are the most risky times to be in an aircraft.

12 years ago
It is true that the virus is not particularly nasty for most people in it's current state.

An interesting feature of the flu virus is that it able to swap pieces of genetic code with other flu strains in the same host. Fortunately, this doesn't seem to happen too often. But, there is a chance if a single individual is infected with both swine flu and another strain of flu, a novel strain will be produced. This novel strain could have the 'advantage' that swine flu has in terms of being relatively unfamiliar to the human immune system.

While the vaccine might not be hugely beneficial to a single individual, the more people that get it, the greater our "herd immunity" is to swine flu (and it's potential variants).

It's a bit of a prisoner's dilemma when you consider there is personal risk in being vaccinated yet the overall expected outcome is much more favorable the more people that get vaccinated. Ideally, you want everyone in the world to be vaccinated except you!
12 years ago
There is a vaccine to prevent Swine Flu - however like many vaccines it cannot be said to provide 100% immunity.

Here in the UK - the government has ordered millions of vaccine doses and is issuing them as per a priority list through the NHS. My wife gets hers today because she is pregnant.

The masks are pretty much useless at filtering out virus particles. However, wearing a mask reduces the frequency touching your mouth/nose with your hands, and thus prevents transmission in an indirect way.

12 years ago
Worked it out in the end...it was the the toString() on the return stream.

this was the offending line:

fixed now with:

using my modified stream test method:

toString() worked fine with the CSV, silly mistake I guess in hindsight to assume it would be the same for PDF.

12 years ago
Hello Ranchers,

I'm completely stuck on this, any advice would be appreciated.

I am using a struts Download action to handle downloading a PDF file to the client machine. The PDF file is generated on the fly.
I used a similar approach for handling CSV files, which worked fine.

I have imported the following packages:

import com.lowagie.text.Document;
import com.lowagie.text.PageSize;
import com.lowagie.text.Paragraph;
import com.lowagie.text.Rectangle;
import com.lowagie.text.pdf.PdfWriter;

The code compiles/runs..however, the PDF file is always empty. No content gets added.

Below is my code with simplified doc contents.

I have tried looking through other threads, google etc. but I can't find a working example of using a struts download action (like mine above) with PDF documents.
Have I missed something obvious why my downloaded PDF document is always empty?



12 years ago
Ah yes...maybe there was too much meaning in all of that.

thanks Maneesh - can it be moved to programming diversions?

12 years ago

I’m not sure if there are any propositional logic buffs out there…but, something that is nagging me…

(1) “P unless Q”

Where P and Q represent propositional variables…

Now, I’m not sure why – but it seems that the above sentence in quotes is considered the same as this sentence.

(2) “P or Q”

(At least this site on logic seems to suggest so)

Maybe P represents “I am working”, and Q represents “I am wasting time on meaningless drivel”..

Sentence (1) suggests that I can’t be doing both, Sentence (2) however suggests to be that I can be doing both…

Are (1) and (2) the same in terms of Propositional Logic?
Can I be working and use meaningless drivel?
12 years ago
Lead into Gold? Why on earth would you want to do that?

Gold into Lead sounds much more exciting!

197Au + n → 198Au (halflife 2.7 days) → 198Hg + n → 199Hg + n → 200Hg + n → 201Hg + n → 202Hg + n → 203Hg (halflife 47 days) → 203Tl + n → 204Tl (halflife 3.8 years) → 204Pb (halflife 1.4x1017 years)

Not a chemist, but a wikipediaholic...Convert gold into lead via neutron capture and beta decay
13 years ago

Frank Silbermann wrote:

Tim McGuire wrote: So saying "only a theory" is misleading here. and saying "not the only one " is misleading as well, because the scientific community supports the theory. This is because all the data lines up solidly behind it and the underlying physics are solid.

I am skeptical of your claim that "all the data lines up solidly behind it and the underlying physics are solid" -- given that our physical understanding of the weather in general normally doesn't allow us to forecast beyond a week or so. What are your qualifications as a physicist, that you could know this (rather than merely having heard some other layman claim it), to distinguish the situation from my description (of the scientists feeling that cutting down on burning of fossil fuels is a good idea even if the theory isn't true so they might as well support it)?

'weather' and 'climate' are very different things. They are also different when it comes to our ability to make predictions. While it is true that climate models vary in terms of exact effect, and it is also true that weather forecasts can be wrong, all climate models predict warming. There is a consensus that warming is occurring outside the 'natural cycle' at that humans are causing it. The alternatives to this consensus, whilst perhaps valid in a historical context are becoming increasingly marginalized.

Even the most conservative climate models ones paint a pretty gloomy picture if we continue with 'business as usual'.

It's dark and gloomy here in Cambridge.
13 years ago


I'm used to Eclipse where there seemed to be a shortcut where I could 'auto-tidy' code..

Netbeans seems to have this feture (ie. tools -> options -> editor -> formatting ... )

I can see a template for layout, however - I can't get my editor to actually use it?

Is there a "apply to code" or a short-cut key I am missing somewhere?



Hello, my code became a little scrambled when I used the code tags - I reproduced my code below..

I am stuck on this line

This is part of an iteration to build up messages for used for a mouse-over hovering message for a list of items on the screen. Sometimes there are no messages, sometimes there is 1 or more...

I have the code working, but what I can't seem to do, is make it use a new line for each message in the hoover message

In the code above i've tried "/n", but the hover over message will literally use /n, rather than put a new line between messages..i've also tried
it just literally chucks the text in literally rather than add a new line..


any tips or ideas appreciated.

13 years ago

herb slocomb wrote:

fred rosenberger wrote:...
Evidence: Fossil Fuel production of C02 has less correlation with current warming than other natural cyclic variation, errors in measuring over the past century, contradictory ice core evidence, warming occurring on other planets such as Mars now, evidence in past of warmer temps than we have now, cyclic evidence of warming cycles prior to use of fossil fuels.

These points are already considered within the conventional view of AGW. For the media to resurrect these ideas as points against man-made climate change based on our current scientific understanding is about as newsworthy as Phlogiston theory.

When it comes to climate change (and many other topics) just because there are "two possible sides" doesn't mean that each side deserves equal media coverage. It's easy to come of with spin to counter many conventional beliefs, the moon landing hoax, the non-relationship between HIV/AIDS, Vaccines causing autism..not too long ago, some scientists claimed no link between tobacco and cancer...there is a serious amount of BS out and about, and I'm actually quite glad our biased media filters out some of this crap.

13 years ago