Hi,
I am using a buffered writer and my code, closes the writer in the finally block. My code is like this.
...........
BufferedWriter theBufferedWriter = null;
try{
theBufferedWriter =.....
....
......
.....
} catch (IOException anException) {
....
} finally {
try {
theBufferedW...
We use Spring + iBatis in all of our DAO's to fetch data from Stored Procedures.
There are two main JNDI connections. one going to the datawarehouse and another going to livedb.
recently lot of SPs have been moved from the livedb to the datawarehouse and vice versa.
This is creating issues on the java side because:
Now, each DAO d...
Hello,
I am currently designing a low level network serialization protocol (in fact, a refinement of an existing protocol).
As the work progress, pen and paper documents start to show their limits: i have tons of papers, new and outdated merged together, etc... And i can't show anything to anyone since i describe the protocol using my ...
What's the best way to handle modules that use each other?
Let's say I have a module which has functions for hashes:
# Really::Useful::Functions::On::Hash.pm
use base qw<Exporter>;
use strict;
use warnings;
use Really::Useful::Functions::On::List qw<transform_list>;
our @EXPORT_OK = qw<transform_hash transform_hash_as_list ...>;
#...
I know the elements versus attributes debate has come up many times here and elsewhere (e.g. here, here, here, here, and here) but I haven't seen much discussion of elements versus attributes for simple property values.
So which of the following approaches do you think is better for storing a simple value?
A: Value in Element Content:
...
I'm tasked with writing an application that acts as a central storage point for files (usually document formats) as provided by other applications. It also needs to take commands like "file 395 needs a copy in X format", at which point some work is offloaded to a 3rd party application. I'm having trouble coming up with a strategy for t...
Hi folks!
I'm currently developing an app in android that is accessing wifi values, that is, the application needs to scan for all access point and their specific signal strengths.
I know that I have to extend the class BroadcastReceiver overwriting the method BroadcastReceiver.onReceive(Context context, Intent intent) which is called wh...
The majority of my questions I've asked here so far on StackOverflow have been how to implement individual concepts and techniques towards developing a software-based NES clone via the XNA environment.
The small samples that I've thrown together on my PC work relatively great and everything. Except I hit a brick wall. How do I merge a...
I'm considering if it is a good idea to use an ASP.Net TabContainer-Control in the way that every TabPanel contains content of a different page. For example: Next i want to implement in my application is the masterdata management. Normally i would create one aspx page for every masterdata-table (f.e. Customer -> MD_Customer.aspx). Then i...
In Bruce Tognazzini's quiz on Fitt's Law, the question discussing the bottleneck in the hierarchical menu (as used in almost every modern desktop UI), talks about his design for the original Mac:
The bottleneck is the passage between
the first-level menu and the
second-level menu. Users first slide
the mouse pointer down to the...
I am working at an movie recommendations engine and i'm facing a DB design issue.
My actual database looks like this:
MOVIES [ID,TITLE]
KEYWORDS_TABLE [ID,KEY_ID]
where ID is Foreign Key for MOVIES.id and KEY_ID is a key for a text keywords table
This is not the entire DB, but i showed here what's important for my problem.
I have...
I'm writing a class that has two objects as private members, one of which is conceptually referenced by the class, and the other is conceptually owned by the class. However, the code itself gives no clue that this is the case.
public class WorklistSearchResults
{
//This is "owned" and will be disposed
private RecordSet ...
Hello,
Suppose I have 3 classes as follows (as this is an example, it will not compile!):
class Base
{
public:
Base(){}
virtual ~Base(){}
virtual void DoSomething() = 0;
virtual void DoSomethingElse() = 0;
};
class Derived1
{
public:
Derived1(){}
virtual ~Derived1(){}
virtual void DoSomething(){ ... }
virtual v...
I have a factory class that serves out a bunch of properties.
Now, the properties might come either from a database or from a properties file.
This is what I've come up with.
public class Factory {
private static final INSTANCE = new Factory(source);
private Factory(DbSource source) {
// read from db, save properties...
We seem to have a lot of clients asking us to change the login screen in this manner:
Display a list of all available users (thumbnail picture + name)
User selects a username from the list
A password prompt appears near the username
User enters password then presses enter
This sounds remarcably similar to the Windows XP login, which ...
I am working on an ASP.Net web application in which several WCF services are being used. At client level, I am creating channel factory mechanism to invoke service operations. Right now, I have created an assembly having classes used for channel factory creation code for every service. As per my assumption this is some sort of
facade pat...
Basically I want to put a transparent image in the bottom-right corner. I read the questions about top-right, right, and so on. However, I can only apply margin-top: 100%; which will put it where I want BUT it shows the scroll bar then and the picture will be really at the bottom, I can't even see it.
Any ideas are welcome.
To se...
If I have several mutable properties in an object that will be acted upon by several threads, I understand they should be synchronized.
class Doggie {
private String name;
private int age;
public void setName(String name) { this.name = name; }
public String getName() { return this.name; }
public void setAge(int a...
I was just curious where i should place the main function in a Java Swing program. It seems as If it's just way too short too create a brand new class for.
...
It seems like there is an increasingly popular trend to style hyperlinks in a color that's barely distinguishable from body text. I noticed this just the other day on an SFGate blog page. Also notice that link just a few words ago. Are my eyes getting worse, or is that hard to spot?
I certainly understand styling hyperlinks to look bett...