Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
Win a flower (🌹) or copy of Real-World Software Development: A Project-Driven Guide to Fundamentals in Java (📚) this week in the Agile and Other Processes forum!

Yuriy Fuksenko

pioneer
+ Follow
since Feb 02, 2001
Apples and Likes
Apples
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
1
Received in last 30 days
0
Total given
1
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Yuriy Fuksenko

It depends on the way you going to create/use those strings.

Look at the following code, for example:


Here is the output:

true
true
false
true
6 years ago
you can try something like this:
http://gafter.blogspot.com/2006/12/super-type-tokens.html

here is the small example

9 years ago
Don't know if this helps you in any way, and it is definitely not the best coding style, but the following would work for any type of primitive array except boolean and char:

>
9 years ago
Bottom line here - you don't want to generate Y unless you know that you need it.
The problem right now - Y is generated in Client class, but class A the one who knows should it be use or not.

so solutions that should work without knowing details of what code does and changing any dependencies are the following, for anything more elegant you have to give more insight.
1. Give class C a knowledge is Y needed or not. For example you can add "isYRequird" method to A and pass null if it is not required.
2. Generate X and Y inside A class. So you will have something like:
9 years ago
Actually, it is possible, but only one of them would be referable by other project as dependency.
The simplest way would be to define multiple executions for plugins in the build section.
It s just not recommended practice.
10 years ago
10 years ago
I tried to use dependency:tree and dependency:analyze targets with maven-dependency-plugin, and it fails to resolve dependency on sibling modules. I find it somewhat strange, since copy-dependencies works fine.
Anyone tried that?
10 years ago
Hi,
I need to add pdf reports to my swing application. It is decided to use Apache FOP for that. Currently all existing images are inside my jar file - all access goes through getResourceAsStream. Is there a way for me to somehow use those images in FO file (may be by adding some handler during parsing - I never used FOP before), without copying them out or creating "mini" http server?
Set headres to allow caching of your pages - this way when user hits "Back", old page is displayed, without trying to resubmit the form.

Also, you may consider generating a uniq id every time page reloads, so if form is submitted, but that id was already used - means back button was used or a link was double clicked.

Another option may be using "Get" request instead of "Post".
<script>
function openwindow(url)
{
MyWindow1=window.open("Comboimage/Comboimage1.html","","toolbar=yes,location=yes,"+
"directories=yes,status=yes,menubar=yes,scrollbar=yes,resizable=yes,width=475,height=475")
}
</script>
<select onchange="openwindow(this.options[this.selectedIndex].value)">
<option value="Comboimage/Comboimage1.html">page1</option>
<option value="Comboimage/Comboimage2.html">page2</option>
<option value="Comboimage/Comboimage3.html">page3</option>
</select>
Try it...
Here is a problem:
parent.notificationFrame.window.location.reload();
This operation is asynchronious for the main documents, so you are likely sometimes get an error here:
str = window.frames['notificationFrame'].document.getElementById('frameData').innerHTML;
, if element "frameData" is not loaded yet.
I would say that chnages you need should be in the document loaded into iframe:
1. add the following inside the head tag - this will cause a page to refresh every 10 seconds:
<meta http-equiv="refresh" content="10">

2. add onload handler to the body, doing something like:
parent.document.getElementById("myStuff").innerHTML=document.getElementById('frameData').innerHTML;
[ August 08, 2006: Message edited by: Yuriy Fuksenko ]
You might want to use refresh meta tag instead of setInterval
1. if you have access to your server configuration, you should be able to define an alias for your "getreport.do" and call it whatever you want.

2. Depending on your server abilities and traffic you expect, you may have an option of creating a temp file on you server, naming it whatever you want, write report into it and provide it to user.