I'm using the Apache Commons DBCP library for connection pooling in a desktop application. I've done this before and never had a problem but the latest application has started sometimes locking up on the call to getConnection() on my DataSource. The application just hangs after that call.
I'm closing up my resources when I'm done with them. Is…
I am doing my second Facebook connect site. On my first site, I used the facebook coonect FBML to sign a user in, then I could access other information via the PHP Client. With this site, using the same exact code, it doesn't seem to be working. I'd like someone to be able to sign in using the Facebook button:
<fb:login-button…
Hello everyone, I was hoping someone could answer my quick question as I am going nuts!
I have recently started learning regular expressions in my Java programming however am a little confused how to get certain features to work correctly directly in BASH. For example, the following code is not working as I think it should.
echo…
I'm trying to print a URL (without having a browser involved at all) but the URL is currently throwing the following:
javax.net.ssl.SSLHandshakeException:
sun.security.validator.ValidatorException: PKIX path building failed:
sun.security.provider.certpath.SunCertPathBuilderException:
unable to find valid certification path to…
I have several assemblies my project is dependant upon.
These are stored in the Project's directory under the "Dependencies" folder.
So something like this.
Solution
- Project
- Dependancies
FunkyAssembly.dll
- bin
- Debug
- Release
SomeCode.cs
I've referenced…
In perl, parentheses are used for overriding precedence (as in most programming languages) as well as for creating lists. How can I tell if a particular pair of parens will be treated as a grouping construct or a one-element list?
For example, I'm pretty sure this is a scalar and not a one-element list: (1 + 1)
But…
So, according to this question there are two ways to look at the size of a BitSet.
size(), which is legacy and not really useful. I agree with this. The size is 64 after doing:
BitSet b = new BitSet(8);
length(), which returns the index of the highest set bit. In the above example, length() will return 0.…
I'm using Quartz to schedule some jobs but I have a few scenarios that I'm not sure how to resolve.
1) Lets say I have a job that is scheduled to run every 5 minutes. Generally that works well but periodically the job takes more than 5 minutes and I don't really want multiple instances of the job running…
How do I "turn on" cascading saves using AutoMap Persistence Model with Fluent NHibernate?
As in:
I Save the Person and the Arm should also be saved. Currently I get
"object references an unsaved transient instance - save the transient instance before flushing"
public class Person : DomainEntity
{…
Hi all,
I'm using Delphi 2009 and the MS Access Interop COM API. I'm trying to figure out two things, but one is more important than the other right now.
I need to know how to set the file name when sending the print job to the spooler. Right now it's defaulting to the Access DB's name, which can be…
I'm using quartz to display pdf content, and I need to create a table of contents to navigate through the pdf. From reading Apple's documentation I think I am supposed to use CGPDFDocumentGetCatalog, but I can't find any examples on how to use this anywhere. Any ideas?
At the end of my registration process you get to a payment screen where you can enter a coupon code, and there is an AJAX call which fetches the coupon from the database and returns it to the page so it can be applied to your total before it is submitted to paypal. It works great in Firefox, Chrome,…
I work on a project where we have to create unit tests for all of our simple beans (POJOs). Is there any point to creating a unit test for POJOs if all they consist of is getters and setters? Is it a safe assumption to assume POJOs will work about 100% of the time?
Duplicate of - Should @Entity…
I have an O(n^2) operation that requires me to read line i from a file, and then compare line i to every line in the file. This repeats for all i.
I wrote the following code to do this with 2 file handles, but it does not yield the result I am looking for. I imagine this is a simple error on my…
I'm using a class that extends BytecodeScanningDetector to check for some problematic fields in a class.
After detecting whether the field is problematic, I add it to the bug report like below:
Once I run findbugs, it identifies the bug, lists it in the left pane, but does not highlight the…
Hello,
I was attempting to do a sed replacement in a binary file however I am beginning to believe that is not possible. Essentially what I wanted to do was similar to the following:
sed -bi "s/\(\xFF\xD8[[:xdigit:]]\{1,\}\xFF\xD9\)/\1/" file.jpg
Or more notably... scan through a binary…
I am using phpbb on a site for a client, and the client has requested that each different forum page have a different background color.
Such functionality is not built into phpbb (from what I can tell), so how should I go about doing this? Can I modify the code of phpbb directly?
My other…
I am trying to help my University Student Radio station rethink the setup of the way they stream music, but I have some questions regarding the use of Ubuntu to stream music. Currently, the radio station uses two windows machines: one of which is used to stream the radio station and serve…
Hello,
I have a site that has a jQuery overlay, which contains an iframe, which pulls in another site that has flash in it. One of the buttons in the flash has editable parameters in xml, and I can change where the link points to. I want this button to close the overlay, but I can't…
How can I quickly extract two rows of a scipy.sparse.lil_matrix and apply bitwise operations on them? I've tried:
np.bitwise_and(A[1,:], A[2,:])
but NumPy seems to want an array type according to the documentation.
Hello,
Currently I am trying to place a MapView within a ListView. Has anyone had any success with this? Is it even possible? Here is my code:
ListView myList = (ListView) findViewById(android.R.id.list);
List<Map<String, Object>> groupData = new…
While cross-site scripting is generally regarded as negative, I've run into several situations where it's necessary.
I was recently working within the confines of a very limiting content management system. I needed to include database code within the page, but the hosting server…
Hi guys,
I'm working on trying to implement a JUnit test to check the functionality of a DAO. (The DAO will create/read a basic object/table relationship in HSQLDB).
The trouble I'm having is the persistence of the DAO (for the non-test code) is being completed through an…