Hi,
During startup of my WinForms application I'm noting that there are a couple of points (before the MainForm renders) that do a "MyDataSet.GetInstance()". For the first one the MyLog.Debug line comes through in the VS2008 output window, but for a later one it does work and come through.
What could explain this? What settings could I check at…
Have an app that is looking for application windows being created on the desktop using
class Unresponsive {
private StructureChangedEventHandler m_UIAeventHandler = new StructureChangedEventHandler(OnStructureChanged);
public Unresponsive() {
Automation.AddStructureChangedEventHandler(AutomationElement.RootElement, TreeScope.Children,…
How would I do this in a stored procedure (SQL 2005):
count = select count(*) from table1 where line like '%success%'
if count > 0:
delete from table1 where not line like '%success%'
Thanks for any help. My google skills are really failing me today :-(
I'm capturing a screenshot image of a JFrame via a "double buffering" approach, per below:
public BufferedImage getScreenshot() {
java.awt.Dimension dim = this.getPreferredSize();
BufferedImage image = new BufferedImage(dim.width, dim.height, BufferedImage.TYPE_INT_RGB);
this.paint(image.getGraphics());
…
Hi,
Is there a rule for knowing when one has to pass the generic type parameters in the client code when calling an extension method?
So for example in the Program class why can I (a) not pass type parameters for top.AddNode(node), but where as later for the (b) top.AddRelationship line I have to pass them?
class Program
{
static void…
It is very common in Rails for an objects_controller controller to have RESTful edit and destroy actions like so:
def edit
@object = Object.find(params[:id])
end
def destroy
@object = Object.find(params[:id])
@object.destroy
redirect_to :back
end
With an associated view that provides edit and destroy links like so:
<%= link_to…
I have a SSIS 2008 package that calls about 10 other SSIS packages (legacy issues, don't ask).
Each of those child packages loads a specific file into a table. But sometimes one or more of these input files will be missing.
How can I let a child package fail (because a file is missing) but let the rest of the parent package keep on running?…
My WndProc isn't seeing mouse-up notifications when I click with a modifier key (shift or control) pressed. I see them without the modifier key, and I see mouse-down notifications with the modifier keys.
I'm trying to track user actions in a component I didn't write, so I'm using the Windows Forms NativeWindow wrapper (wrapping the…
When debugging stepping over each line does work.
Stepping into a function located in another file debugger displays: Source not found.
Also displays option for Edit Source Lookup Path... but the correct package is listed there.
(Also tried pointing with the directory path.)
No other breakpoints set, as is a common solution.
…
OK, I know, Int32.MaxValue * Int32.MaxValue will yield a number larger than Int32 BUT, shouldn't this statement raise some kind of an exception?
I ran across this when doing something like IF (X * Y Z) where all are Int32. in X and Y are sufficiently large enough, you get a bogus value from X*Y
Why is this so and how to get…
Hi,
Is it possible to apply an extension method to an interface? (C# question)
That is for example to achieve the following:
create an ITopology interface
create an extension method for this interface (e.g. public static int CountNodes(this ITopology topologyIf) )
then when creating a class (e.g. MyGraph) which implements…
I have an "add" button that's represented by a UIBarButtonItem. Hitting the "add" button adds an object into a list that represents a moment in time. By default, that time is "now"...but I'd like to be able to use dragging behavior to let the user specify earlier times for the object. Here's the behavior I want to implement:
…
When using TRY-CATCH in JavaScript, how to get the line number of the line that caused the error?
On many browsers, the below code will work great and I will get the stack trace that points to the actual line that throw the exception.
However, some browsers do not have "e.stack". Iphone's safari is one example.
Is there…
Hi,
In Entity Framework (VS2010) how do I create an association to/from the same table? (a many-to-many is what I want)
Background - I was expecting under the bonnet a NODE and RELATIONSHIP table, where the latter has a parent_node_id and a child_node_id (i.e. pointing back to the NODE id column). I can't seem to get the…
I have some table cells containing dates formatted like this: 2009-01-01. I.E 7 seems to be breaking these into two lines at the hyphen. Is there any way to turn this off?
Let's say I'm modeling phone numbers. I have one entity for PhoneNumber, and one for Person. There's a link table that expresses the link (if any) between the PhoneNumber and Person. The link table also has a field for DisplayOrder.
When accessing my domain model, I have several Use Cases for viewing a Person.
I can look…
For some unknown reason I'm running into a problem when passing a variable to a full text search stored procedure performs many times slower than executing the same statement with a constant value. Any idea why and how can that be avoided?
This executes very fast:
SELECT * FROM table
WHERE CONTAINS (comments, '123')
This…
Moved to Super User:
Windows Question: RunOnce/Second Boot Issues
I am attempting to create a Windows XP SP3 image that will run my application on Second Boot. Here is the intended workflow.
1) Run Image Prep Utility (I wrote) on windows to add my runonce entries and clean a few things up.
2) Reboot to ghost, make…
I have a problem with SonarQube.
I use web API to inject manual metrics values for a project like this :
curl -u nom:password -d "resource=<projet>&metric=<key de la metric>&val=<valeur>" http://localhost:8081/sonar/api/manual_measures
One of these metrics is a percentage and this metric is…
Hi,
Would QuickGraph be able to help me out with my requirements below?
(a) want to model a graph of nodes and directional relationships between nodes - for example to model web pages/files linked under a URL, or modeling IT infrastructure and dependencies between hardware/software. The library would include…
Hi,
Can I use .net 3.5 binaries for a library with a .net 4.0 application / what are the negatives if any? In other words is there any reason I should take more time out to download source for the library and build it under .net 4.0 (assuming it builds without any problems I guess) as opposed to downloading…
I'm getting the following error:
2010-05-11 17:46:28.475
MyApp[54112:5e1b] bool
_WebTryThreadLock(bool), 0x140faa0: Tried to obtain the web lock from a
thread other than the main thread or
the web thread. This may be a result
of calling to UIKit from a secondary
thread. Crashing now...
Is…