A team member has run into an issue with an old in-house system where a user double-clicking on a link on a web page can cause two requests to be sent from the browser resulting in two database inserts of the same record in a race condition; the last one to run fails with a primary key violation. Several solutions and hacks have been pr...
I have the following JUnit test:
@Test
public void testRunLocalhost() throws IOException, InterruptedException {
// Start an AnnouncerThread
final AnnouncerThread announcer = new AnnouncerThread();
announcer.start();
// Create the socket and listen on the right port.
final DatagramSocket socket = new DatagramSocket(...
I have been contracted to modifying software released under the GPL. The small research company that I am consulting for will be submitting analysis of the output of the modified software as part of a response to a RFP by the US Department of Defense. But there's a catch.
The source directory contains a file called "COPYRIGHT" (along w...
I have a SqlServer 2008 table which has a Primary Key (IsIdentity=Yes) and three other fields that make up a Unique Key constraint.
In addition I have a store procedure that inserts a record into the table and I call the sproc via C# using a SqlConnection object.
The C# sproc call works fine, however I have noticed interesting results ...
Hi,
I have build my entire website with flash and embedded several swf objects (slideshows) into it. everything always worked fine when I published it as swf movie.
but now that I want to upload my website an error message occurs saying:
Error #2044: Unhandled SecurityErrorEvent:. text=Error #2140: Security sandbox violation: file:///m...
We are using SQL Server 2005 Merge Replication with SQL CE 3.5 clients.
We are using partitions with filtering for the separate subscriptions, and nHibernate for the ORM mapping. There is automatic ID range management from SQL Server for the subscriptions.
We have a table, Item, and a table with a foreign key to Item - ItemHistory. Bot...
I have a Java software that was recently integrated into another Java software (which I will call "external" software). We use listeners and call back mechanisms for "communication" between two softwares.
Creators of the "external" software say that they get a NullPointerException because of some EDT violations in my code. Can it be the...
I started to use CheckThreadViolationRepaintManager to detect EDT violations.
It complains about:
partner = getParameter("partner",generatePartnerSelectionPanel(),Design.partnerSelectionDuration);
Because it does not like generatePartnerSelectionPanel() because it does not like JPanel panel = new JPanel(); in this method. But I cann...
I've been learning how to NOP functions in C++ or even C but there are very few tutorials online about it. I've been googling for the past few hours now and I'm just stuck. Here is my code.
#include <iostream>
#include <windows.h>
#include <tlhelp32.h>
using namespace std;
//#define NOP 0x90
byte NOP[] = {0x90};
void enableDebugPrivil...
I was writing a c++/cli wrapper for a native c++ application, and when I finished writing code, it builds so well.
The native c++ is built to a static library (.lib) file, and I referenced it in my c++/cli wrapper, then I wrote a c# console application to test the wrapper. However, the debugger can be launched.If I commented the lines w...
Hi All,
Below is the use case:
I have a unique index defined on 3 columns say A,B,C. Assume the values in them are A1,B1,C1.
My java code is adding a new record say A1,B1,C1 but before this record is added, i update the previous value from C1 to C2. While trying to add the new record (after the update), hibernate is throwing an unique c...
Hi,
right function declaration is:
[DllImport("user32.dll")]
static extern int SetScrollInfo (IntPtr hwnd, int n, ref SCROLLINFO lpcScrollInfo, bool b);
I declared it like:
[DllImport("user32.dll", CharSet = CharSet.Auto, ExactSpelling = true)]
static extern int SetScrollInfo (IntPtr hwnd, int n, SCROLLINFO lpcScrollInfo, bool b);
c...
HI
I am calling a web service in my C# Code. The webservice is bulit in PHP. I am calling its
loadunload method. The webservice returns me the
"The server committed a protocol violation. Section=ResponseStatusLine"
error if I call the service with in 5 to 10 second delay.
Here is the code I am using to call the service.
private MyServ...
i've just started using the Google Maps API for Flash (map_1_20.swc) for an AIR 2.5 application i'm building with Flash CS5. everything loads and display fine in the ADL except that i'm receiving security sandbox violations:
*** Security Sandbox Violation ***
SecurityDomain 'http://maps.googleapis.com/mapsapi/publicapi?
file=flashapi&u...