I have the following JavaScript code to pop up a window in Internet Explorer. The code is executed from a page within a Microsoft CRM modal dialog box. (RequestID is a string that is always the same in the test system - at the moment it contains "abcdefg" - without the quotes).
var cancelUrl = "CancelRequest.aspx?RequestID=" + RequestID...
Hello,
I have faced a quite strange thing related to stdext hashmap. I have to work with a lot of objects and it is a priority to access the elements in a fast way.
My program read the object values from a file and if it's a new element, then insert this value in a hashmap, if it is an already processed object, then changes the stored ...
I've got a chunk of C# code that is supposed to set VerticalScroll.Value within a class that inherits from UserControl. It gets called when any child object of the class changes sizes. The class has its AutoScroll property set to true.
public void ScrollTo(int top)
{
if (top >= this.VerticalScroll.Minimum && top <= thi...
I have an ASP.NET site (VB.NET) that I'm trying to clean up. When it was originally created it was written with no error handling, and I'm trying to add it in to improve the User Experience.
Try
If Not String.IsNullOrEmpty(strMfgName) And Not String.IsNullOrEmpty(strSortType) Then
If Integer.TryParse(Request.QueryString("Catego...
Hi,
I am writing a test web service, and noticed a strange corner case. If you include two slashes after the port, the method will be called anyway for localhost, localhost:80, 127.0.0.1, and 127.0.0.1:80. But if I try it on the web server I'm developing on (port 55731), it fails.
localhost.Service1 s = new localhost.Service1();
st...
I have a weird problem where after setting nocheck on a foreign constraint and re-enabling it,
I am getting a same out-dated execution plan that was used with nocheck on.
Why would SQL server generate an execution plan as if foreign constraint FKBtoA is disabled even after adding the check again with following statement?
alter table ...
I'm getting the slope of a line bounded by two points
float slopeXY(CGPoint p1, CGPoint p2)
{
return ((p2.y - p1.y) / (p2.x - p1.x));
}
If I give it a zero-sized line,
CGPoint p1 = CGPointMake(0, 10);
CGPoint p2 = CGPointMake(0, 10);
float sxy = slopeXY(p1, p2);
I don't get a divide by zero error.
...
For some reason, a variety of actions in Visual Studio 2005, actions that have nothing to do with SQL Server, are opening the "Connect to SQL Server" dialog. And it takes four (4) clicks on the CANCEL button to kill the dialog.
For example, if I right click on a class method in the Editor, hoping to find the Go To Definition option, the...
I wrote this little function for writing out HTML tags:
def html_tag(tag, content=None, close=True, attrs={}):
lst = ['<',tag]
for key, val in attrs.iteritems():
lst.append(' %s="%s"' % (key, escape_html(val)))
if close:
if content is None: lst.append(' />')
else: lst.extend(['>', content, '</', tag, ...
I have a function that checks multiple form items and returns either boolean(true) if the check passed or the name of the check that was run if it didn't pass. I built the function to run multiple checks at once, so it will return an array of these results (one result for each check that was run). When I run the function, I get this arra...
I'm having a look at the date_sunset function in PHP and have met an issue that I find a bit strange. I have this piece of code:
$sunset = date_sunset(mktime(0, 0, 0, 5, 14, 2010),
$format, // Format
55.596041, // Latitude
12.992495, // Longitude
90, // Zenith
...
On my site I use output buffering to grab all the output and then run it through a process function before sending it out to the browser (I don't replace anything, just break it into more manageable pieces). In this particular case, there is a massive amount of output because it is listing out a label for every country in the database (a...
OpenGL is acting very strangely for some reason. In my subclass of NSOpenGLView, I have the following code in the -prepareOpenGL method:
- (void)prepareOpenGL {
GLfloat lightAmbient[] = { 0.5f, 0.5f, 0.5f, 1.0f };
GLfloat lightDiffuse[] = { 1.0f, 1.0f, 1.0f, 1.0f };
GLfloat lightPosition[] = { 0.0f, 0.0f, 2.0f };
quality = 0;
zCoo...
Do you know which is the option to display the left grey bar on code page on VB6 Ide?
It's the bar used to toggle breakpoints for debugging (same effect of f9 but using mouse click)?
It disappeared on my IDE and i can't find the option to take it back.
...
This has always bugged the hell out of me. Why are lists like this? If you set margin and padding to 0, you would expect it to align normally at the left where the text around it would be, but no. That's where the text within the list item tags begins, then it renders the bullets and/or numbers to the left of that, overlapping borders et...
I'm currently developing an iPhone app for a mall.
One of the features is the ability to phone a mall tenant from within the app. I'm using
NSURL *url = [[NSURL alloc] initWithString:@"tel:1(480)555-5555"];
[[UIApplication sharedApplication] openURL:url];
It works as I expect it to, no confirmation dialog and remains in the phone a...
I am facing a issue of 'weirdness' in relation to using .NET's run-time to inject a DLL into WordPad.
The objective is simple, to be able to obtain the EM_STREAMOUT, pass the data back to the .NET C# code via way of WM_COPYDATASTRUCT message in which the .NET form intercepts and spits out the message into the console. For DLL injection ...