I have a web-app that requires two settings:
A JDBC datasource
A string token
I desperately want to be able to deploy one .war to various different containers (jetty,tomcat,gf3 minimum) and configure these settings at application level within the container.
My code does this:
InitialContext ctx = new InitialContext();
Context envCtx =…
Hi, I am working on a project to perform template matching on a video captured via my webcam. I am able to create 2 template from the webcam capture, but I am unable to perform template matching for both. The program can run only with either template matching, but not both. My program sequence is:
Capture from webcam
get template 1
get…
Is there any python library that can keep a client-side SQLite database in sync with a server-side PostgreSQL database?
There are solutions for Java, such as Daffodil or SymmetricDS. Is there something similar for python?
Hi!
I'm looking for a variant of the STL (it's okay if it doesn't have all the functionality) that's optimized for short compile times -- I get bothered by long compile times that delay my compile-debug-edit cycle.
I'm mainly interested in the containers of the STL: vector/map, and not so much the algorithms.
Thanks!
This app I'm working on needs to store some meta data fields about an entity. The problem is that we can already foresee that these fields are going to change a lot in the future. I'm using Hibernate (in ColdFusion) and each entity's properties are translated to one column in the entity table, but altering table columns later down the…
I've created a Google spreadsheet with imported data on one cell, extracting specific string to another cell and pasting the data in a table with a trigger for every 2 hours.
Now everything works perfectly when running the script manually but when logged out and waiting for the cells to fill, sometimes the pasted cell getting "#N/A"…
Let's assume we have two arrays of the same size - A and B.
Now, we need a filter that, for a given mask size, selects elements from A, but removes the central element of the mask, and inserts there corresponding element from B.
So the 3x3 "pseudo mask" will look similar to this:
A A A
A B A
A A A
Doing something like this for…
Im currently uploading data to MS SQL server via SQLBulkCopy and Transactions. I would like to be able to raise an event after each batch has been uploaded (I have already tried SQLRowsCopied event and it doesnt work, see quote below)
MSDN quote:
No action, such as transaction activity, is supported in the connection during the…
In a spring servlet xml file, I'm using org.springframework.scheduling.quartz.SchedulerFactoryBean to regularly fire a set of triggers.
<bean class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
<property name="triggers">
<list>
<ref local="AwesomeTrigger" />
…
Hi,
I'm trying to insert a timestamp (hour:min:sec) into a two-byte array and i'm a little confused on how to accomplish this...any help is greatly appreciated!
int Hour = CTime::GetCurrentTime().GetHour();
int Minute = CTime::GetCurrentTime().GetMinute();
int Second = CTime::GetCurrentTime().GetSecond();
BYTE arry[2];
…
I have some data that isn't properly "partitioned" (for lack of a better word).
All inserts, processing and reporting happen on the same table. The bulk of the processing happens not long after the insert and not long after that it becomes immutable (we're talking days).
I could do all inserts and processing on a new table…
When an user tries to send AJAX requests simultaneously from multiple browser tabs, the earlier requests get completed and the page loads but the other AJAX calls are preempted. AS a result of which the response is empty for the other calls. Only one call survives.
In my application using struts 2.0, JSP and javascript and…
I've got this code to erase an annotations (pins) in my mkmapview without erasing my blue dot (userLocation). The problem is that it erasing the pins I've added in seemingly random numbers. when it's called through an IBAction it removes the first 5 then click again it removes the next 3, then the next 2, then the last one.
…
Is there any way to add it like that?
Thanks.
UDPATE : like this :
http://img220.imageshack.us/img220/4371/35373248.gif
But insted of OnChange, I want on button on click.
Hey all,
I am trying to use the date command in Terminal on multiple Mac OS X machines that are synced via NTP to synchronize some code in a program. Essentially I am running a program...
MyProgram with arguments[date]
I can get date to give me the seconds since the Unix epoch with the %M specifier.
When I try to use %N to…
Hello.
Can i ask a fundamental question. Why when I try to create a new mysqli object in php with invalid database infomation (say an incorrect database name) does it not return an error intstantly? I usually program server stuff in Java and something like this would throw back an error strait away, not after 20 seconds or…
Why is this working:
public int DoesEmailAddressExistsExcludingEmailAddressID(
string emailAddress,
string invitationCode,
int emailAddressID = 0,
int For = (int) Enums.FOR.AC)
whereas this doesn't
public int DoesEmailAddressExistsExcludingEmailAddressID(
string emailAddress,
string…
I'm running this query:
SELECT TOP 1 [DVD Copy].[Stock No]
FROM [DVD Copy]
WHERE [DVD Copy].[Catalogue No] =[Forms]![New Rental]![Catalogue No]
And [Issue Date] = Null;
Which works fine without the null check for Issue Date. I'm trying to select rows without a Date in the Issue Date column. Is Null the wrong…
Hi, if i have a single CSS stylesheet for a website and only want to declare it once, that is, not use the following code on every aspx page..
<link href="stylesheets/general.css" rel="stylesheet" type="text/css" />
Am i forced to use a .master page? or is there another way to do this..
I am trying to save audio using mplayer from a live http stream. saving audio is successful. If there is no live stream playing it does not exit automatically. Is there any way to set timeout if there is no live stream?
code : mplayer -i url -t 00:00:10 -acodec libmp3lame -ab 24 -ar 8000 audio.mp3
Thanks in…
I have a website which has 2 pages , (home_page.php and action_page.php)Action page takes aprx. 2 minutes to completely load (server side takes 2 minutes) . But if user clicks to home page link while action page is loading , browser does not go to home page , until action page is completely loaded . First of…
Hi,
Below is the overriden on complete function for a preloader in Flex.
private function initComplete(e:Event):void
{
//dispatchEvent(new Event(Event.COMPLETE));
cp.status.text="Configuring... Please Wait";
}
What I want to do is when the app has finsihed loading I want to change the…
I have a div that contains a slideshow. ( http://film.robinhoodtax.org/issues/education )
I am using Selenium to test it. So far I have been using the HTML/Selenium script below to validate that the slideshow is actually working. But my assertEval is failing.
How can I correctly detect the…