Hello fellows!
I have some code in C++ for Windows and I intend to port it to Java. But unfortunately it is not so easy as I thought. Could someone help me, please?
Please, take a look at algorithm:
HANDLE hExitEvent;
HANDLE hDataAvailabeEvent;
while(true)
{
WaitForMultipleObjects();
if (hExitEvent is set)
break;
if (hDataA...
Imagine that I have a Debtor class. With Hibernate, I will define the class like that:
@Entity
@Table(name = "T_DEBTOR")
public class Debtor {
@Id
@Column(name = "ID_DEBTOR")
private String idDebtor;
...
My DAO will then looks like:
public class DebtorDaoImpl implements DebtorDao {
@PersistenceContext
privat...
I have an automated integration test harness and would like to streamline the logging (which is implemented using log4j)
I have a number of high-level tests, each with an id and require a separate log file per test. As the tests are created randomly the ids are not known until runtime.
Therefore I would like to ensure that logging wit...
I need to find out local machine time zone name from Ruby (from the TZInfo::Timezone.all_identifiers list of values). I need it so that I could set correctly Oracle database session time zone so that I could handle correctly timestamp with time zone values in the database.
I would like to get the same value that in Java you could get wi...
Hi!
I want to send a command to linux shell and get it's response with java.How can i do this?
...
I'm extending the JFreeChart ChartComposite class.
When I try to create the instance of extended class I'm getting java.lang.VerifyError : .... incompatible object argument for function call error.
...
hi,
how can i make a cell read only in excel using java
Thanks in advance
...
I use hibernate for persistence. when i call the method :
Session s = getCurrentSession();
s.flush();
i geth the following message :
[toString() unavailable - no suspended threads]
and it just stops running after the s.flush() method.
I'm using JBoss IDE 1.6 and the message is shown within the Variables window when debugging.
do y...
Hi,
I've got a large set of Fitnesse (For Java - v20090513) tests which are executed against a SLIM Query table.
To help with the testing (explain why we're getting certain results) I've added a new column to the end of the table. The idea is that the cells for that column would be empty (||) as they're not required to be tested agains...
I am writing an application using JSP & Jdbc, Where i have a table name "COMMENT_DATA", In which user can post their comments on that. So now If more than one user is writing comments and posting it at the same time, I am going for threads. So I will be Synchronizing the method which inserts the data onto the Database. Then how to handle...
We have a number of web service client applications which interface between our main customer facing application and backend web services. These web service application generate their own JAXWS stub code to directly interface with the web services and implementation code to provide a clean interface between the JAXWS code and any applica...
Very tired this morning so if this is obvious then thats my excuse !!!
i am using a buffered reader to read through a csv file - but i dont want to add any empty spaces, as in
" "
the problem is - when i read the line i am checking if the string length is > 0, if so then add, however the string " " is of length 4 - even tho its empty ...
What's the difference between Association and Dependency? Aren't they both the same thing? as if class A is associated with B then Class A is dependent on B ie. there's a dependency between A and B.
...
I want to restrict input to match the statement change = where word and value are both arbitrary words (sequences of characters that don't include spaces) and only one space exists (between the word "change" and a) in the input.
For example, "change variable=value" is valid but "change variable= value" and "change this" are not.
My att...
Hi.
I have a package with "logic" classes(like CheckAuthenticationDataLogic.java, GetVocabulariesLogic.java). And another class - ApiService.java is used to generate wsdl.
ApiService.java is full of methods like this:
/**
* Check authentication data.
* @param contractNumber - number of contract.
* @param msisdn - msisdn.
* @...
If a String is longer than the TextView's width it automatically wraps onto the next line. I can avoid this by using android:singleLine (deprecated) or by setting android:inputType="text". What I now need is something that replaces the last 3 characters of my String with "...". Since I'm not using a monospace font this will always be dif...
Hey,
Is there any way to "replay" transaction?
I mean, sometimes I get RollbackException and rollback the transaction. Can I then "clone" the transaction and try again, or once rollback is called, transaction is lost?
I really need the changes, and really don't want to trace every change for rerunning later...
thanks,
udi
...
I'm writing a bit of JNI code where a DLL running in the process space of various processes on the system needs to talk back to a java process. I've decided to use named pipes to do this (for various reasons) after weighing up shared mem/sockets/rpc etc. My question is, is there a nice way of handling named pipes in Java or should I wr...
what is Controller in MVC. Is it struts.xml or Servlet (Action Class)
Can we have more than one Controller in our application. is it good practice to have more than one controller.
...
I'm looking at a SSO (Single Sign On) solution to fit our relatively simple use case.
Website1 - currently authenticates with database user table.
Website 2 [new] - wants to use the same authentication information and when user clicks link to website1 they shouldn't have to re-login.
Website1 is J2EE based running on Websphere.
Web...