question_id int64 4 6.31M | answer_id int64 7 6.31M | title stringlengths 9 150 | question_body stringlengths 0 28.8k | answer_body stringlengths 60 27.2k | question_text stringlengths 40 28.9k | combined_text stringlengths 124 39.6k | tags listlengths 1 6 | question_score int64 0 26.3k | answer_score int64 0 28.8k | view_count int64 15 14M | answer_count int64 0 182 | favorite_count int64 0 32 | question_creation_date stringdate 2008-07-31 21:42:52 2011-06-10 18:12:18 | answer_creation_date stringdate 2008-07-31 22:17:57 2011-06-10 18:14:17 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
101,664 | 101,789 | Can ReSharper be set to warn if IDisposable not handled correctly? | Is there a setting in ReSharper 4 (or even Visual Studio itself...) that forces a warning if I forget to wrap code in a using block, or omit the proper Dispose call in a finally block? | Correct automatic Dispose analysis requires DFA (Data Flow Analysis) in a global way. It is unlikely that you create an IDisposable object and doesn't call any method on it and do not pass it around as an argument. If disposable object is passed to other methods (including calling its members, when "this" is implicitly... | Can ReSharper be set to warn if IDisposable not handled correctly? Is there a setting in ReSharper 4 (or even Visual Studio itself...) that forces a warning if I forget to wrap code in a using block, or omit the proper Dispose call in a finally block? | TITLE:
Can ReSharper be set to warn if IDisposable not handled correctly?
QUESTION:
Is there a setting in ReSharper 4 (or even Visual Studio itself...) that forces a warning if I forget to wrap code in a using block, or omit the proper Dispose call in a finally block?
ANSWER:
Correct automatic Dispose analysis requir... | [
"c#",
".net",
"resharper",
"static-analysis"
] | 37 | 30 | 7,592 | 5 | 0 | 2008-09-19T13:04:09.150000 | 2008-09-19T13:27:00.500000 |
101,689 | 102,644 | Problem consuming ActiveMQ messages from Flex client | I am unable to consume messages sent via ActiveMQ from my Flex client. Sending messages via the Producer seems to work, I can also see that the Flex client is connected and subscribed via the properties on the Consumer object, however the "message" event on the Consumer is never fired so it seems like the messages are ... | After rebuilding my app from scratch with a fresh install of Tomcat, everything seems to work. Maybe this was caused by the fact that I was using the BlazeDS Turnkey version that contains a preconfigured instance of Tomcat. BTW: This is a great tutorial: http://mmartinsoftware.blogspot.com/2008/05/simplified-blazeds-an... | Problem consuming ActiveMQ messages from Flex client I am unable to consume messages sent via ActiveMQ from my Flex client. Sending messages via the Producer seems to work, I can also see that the Flex client is connected and subscribed via the properties on the Consumer object, however the "message" event on the Consu... | TITLE:
Problem consuming ActiveMQ messages from Flex client
QUESTION:
I am unable to consume messages sent via ActiveMQ from my Flex client. Sending messages via the Producer seems to work, I can also see that the Flex client is connected and subscribed via the properties on the Consumer object, however the "message" ... | [
"apache-flex",
"activemq-classic"
] | 1 | 1 | 1,427 | 1 | 0 | 2008-09-19T13:07:39.547000 | 2008-09-19T15:10:32.527000 |
101,693 | 352,626 | CustomErrors mode="Off" | I get an error everytime I upload my webapp to the provider. Because of the customErrors mode, all I see is the default "Runtime error" message, instructing me to turn off customErrors to view more about the error. Exasperated, I've set my web.config to look like this: And still, all I get is the stupid remote errors p... | This has been driving me insane for the past few days and couldn't get around it but have finally figured it out: In my machine.config file I had an entry under: This seems to override any other customError settings that you have specified in a web.config file, so setting the above entry to: now means that I can once a... | CustomErrors mode="Off" I get an error everytime I upload my webapp to the provider. Because of the customErrors mode, all I see is the default "Runtime error" message, instructing me to turn off customErrors to view more about the error. Exasperated, I've set my web.config to look like this: And still, all I get is th... | TITLE:
CustomErrors mode="Off"
QUESTION:
I get an error everytime I upload my webapp to the provider. Because of the customErrors mode, all I see is the default "Runtime error" message, instructing me to turn off customErrors to view more about the error. Exasperated, I've set my web.config to look like this: And stil... | [
"asp.net"
] | 283 | 182 | 630,955 | 31 | 0 | 2008-09-19T13:08:10.420000 | 2008-12-09T12:55:07.953000 |
101,704 | 103,400 | Setting the 'audience' in a SharePoint-NavigationNode? | Hallo, i am using WSS 3.0 and i need to display certain entries of a website's navigation ("Quicklaunch") to specified groups only. According to this blogpost this can be done using properties of the SPNavigationNode - but it seems the solution to the problem is 'MOSS only'. Is there a way to do this in WSS? | The QuickLaunch (QL) will do security trimming for the default items on the menu. In other words, if a user doesn't have access to what the QL nav item points to, it won't be displayed to her. However, the QL unfortunately does not do security trimming on nav items you add manually through the GUI. If you add items via... | Setting the 'audience' in a SharePoint-NavigationNode? Hallo, i am using WSS 3.0 and i need to display certain entries of a website's navigation ("Quicklaunch") to specified groups only. According to this blogpost this can be done using properties of the SPNavigationNode - but it seems the solution to the problem is 'M... | TITLE:
Setting the 'audience' in a SharePoint-NavigationNode?
QUESTION:
Hallo, i am using WSS 3.0 and i need to display certain entries of a website's navigation ("Quicklaunch") to specified groups only. According to this blogpost this can be done using properties of the SPNavigationNode - but it seems the solution to... | [
"sharepoint"
] | 1 | 1 | 1,423 | 1 | 0 | 2008-09-19T13:11:18.773000 | 2008-09-19T16:20:39.240000 |
101,708 | 102,581 | TcpClient.Connected returns true yet client is not connected, what can I use instead? | In VB.net I'm using the TcpClient to retrieve a string of data. I'm constantly checking the.Connected property to verify if the client is connected but even if the client disconnects this still returns true. What can I use as a workaround for this? This is a stripped down version of my current code: Dim client as TcpCl... | When NetworkStream.Read returns 0, then the connection has been closed. Reference: If no data is available for reading, the NetworkStream.Read method will block until data is available. To avoid blocking, you can use the DataAvailable property to determine if data is queued in the incoming network buffer for reading. I... | TcpClient.Connected returns true yet client is not connected, what can I use instead? In VB.net I'm using the TcpClient to retrieve a string of data. I'm constantly checking the.Connected property to verify if the client is connected but even if the client disconnects this still returns true. What can I use as a workar... | TITLE:
TcpClient.Connected returns true yet client is not connected, what can I use instead?
QUESTION:
In VB.net I'm using the TcpClient to retrieve a string of data. I'm constantly checking the.Connected property to verify if the client is connected but even if the client disconnects this still returns true. What can... | [
"c#",
".net",
"vb.net",
"sockets"
] | 5 | 6 | 11,886 | 4 | 0 | 2008-09-19T13:12:00.347000 | 2008-09-19T15:04:15.163000 |
101,709 | 101,721 | Best Way To Format An HTML Email? | I am implementing a comment control that allows a person to select comments and have them sent to specified departments. The email needs to be formatted in a specific way, and I was wondering what the best way to do this would be. Should I just hard code all of the style information into one massive method, or should I... | Find and use some kind of template library, if possible. This will make each email a template which will then be much easier to maintain than the hardcoded form. | Best Way To Format An HTML Email? I am implementing a comment control that allows a person to select comments and have them sent to specified departments. The email needs to be formatted in a specific way, and I was wondering what the best way to do this would be. Should I just hard code all of the style information in... | TITLE:
Best Way To Format An HTML Email?
QUESTION:
I am implementing a comment control that allows a person to select comments and have them sent to specified departments. The email needs to be formatted in a specific way, and I was wondering what the best way to do this would be. Should I just hard code all of the st... | [
"html",
"email",
"format"
] | 5 | 6 | 13,232 | 6 | 0 | 2008-09-19T13:12:07.757000 | 2008-09-19T13:14:02.947000 |
101,718 | 104,955 | Drawing a variable width line in openGL (No glLineWidth) | What is the best way to draw a variable width line without using glLineWidth? Just draw a rectangle? Various parallel lines? None of the above? | Assume your original points are (x1,y1) -> (x2,y2). Use the following points (x1-width/2, y1), (x1+width/2,y1), (x2-width/2, y2), (x2+width/2,y2) to construct a rectangle and then use quads/tris to draw it. This the simple naive way. Note that for large line widths you'll get weird endpoint behavior. What you really wa... | Drawing a variable width line in openGL (No glLineWidth) What is the best way to draw a variable width line without using glLineWidth? Just draw a rectangle? Various parallel lines? None of the above? | TITLE:
Drawing a variable width line in openGL (No glLineWidth)
QUESTION:
What is the best way to draw a variable width line without using glLineWidth? Just draw a rectangle? Various parallel lines? None of the above?
ANSWER:
Assume your original points are (x1,y1) -> (x2,y2). Use the following points (x1-width/2, y1... | [
"opengl"
] | 9 | 1 | 20,107 | 7 | 0 | 2008-09-19T13:13:31.857000 | 2008-09-19T19:49:04.980000 |
101,735 | 101,768 | How to generate one texture from N textures? | Let's say I have N pictures of an object, taken from N know positions. I also have the 3D geometry of the object, and I know all the characteristics of both the camera and the lens. I want to generate a unique giant picture from the N pictures I have, so that it can be mapped/projected onto the object surface. Does any... | Google up "shadow mapping", as the same problem is solved during that process (images of the scene as seen from some known points are projected onto the 3D geometry in the scene). The problem is well-understood and there is plenty of code. | How to generate one texture from N textures? Let's say I have N pictures of an object, taken from N know positions. I also have the 3D geometry of the object, and I know all the characteristics of both the camera and the lens. I want to generate a unique giant picture from the N pictures I have, so that it can be mappe... | TITLE:
How to generate one texture from N textures?
QUESTION:
Let's say I have N pictures of an object, taken from N know positions. I also have the 3D geometry of the object, and I know all the characteristics of both the camera and the lens. I want to generate a unique giant picture from the N pictures I have, so th... | [
"algorithm",
"3d",
"textures"
] | 0 | 0 | 300 | 5 | 0 | 2008-09-19T13:17:45.153000 | 2008-09-19T13:23:35.687000 |
101,742 | 102,509 | How do you access an authenticated Google App Engine service from a (non-web) python client? | I have a Google App Engine app - http://mylovelyapp.appspot.com/ It has a page - mylovelypage For the moment, the page just does self.response.out.write('OK') If I run the following Python at my computer: import urllib2 f = urllib2.urlopen("http://mylovelyapp.appspot.com/mylovelypage") s = f.read() print s f.close() it... | appcfg.py, the tool that uploads data to App Engine has to do exactly this to authenticate itself with the App Engine server. The relevant functionality is abstracted into appengine_rpc.py. In a nutshell, the solution is: Use the Google ClientLogin API to obtain an authentication token. appengine_rpc.py does this in _G... | How do you access an authenticated Google App Engine service from a (non-web) python client? I have a Google App Engine app - http://mylovelyapp.appspot.com/ It has a page - mylovelypage For the moment, the page just does self.response.out.write('OK') If I run the following Python at my computer: import urllib2 f = url... | TITLE:
How do you access an authenticated Google App Engine service from a (non-web) python client?
QUESTION:
I have a Google App Engine app - http://mylovelyapp.appspot.com/ It has a page - mylovelypage For the moment, the page just does self.response.out.write('OK') If I run the following Python at my computer: impo... | [
"python",
"web-services",
"google-app-engine",
"authentication"
] | 53 | 39 | 20,000 | 5 | 0 | 2008-09-19T13:19:09.333000 | 2008-09-19T14:55:24.780000 |
101,745 | 101,753 | Multiple Monitors with Visual Studio 2008 | I've got 2 monitors, and most of the time I've got some reference material open on one screen, and Visual Studio on the other. To really get in the zone, though, I need my code to be the only thing I see. Does anyone know if it's possible to have multiple code windows in Visual Studio? So far the best I can do is put d... | If you right click on the file tabs, there's an option for "New Vertical Tab group" Just maximize across both monitors and put the divider on the monitor divide and I think that's what you're after. | Multiple Monitors with Visual Studio 2008 I've got 2 monitors, and most of the time I've got some reference material open on one screen, and Visual Studio on the other. To really get in the zone, though, I need my code to be the only thing I see. Does anyone know if it's possible to have multiple code windows in Visual... | TITLE:
Multiple Monitors with Visual Studio 2008
QUESTION:
I've got 2 monitors, and most of the time I've got some reference material open on one screen, and Visual Studio on the other. To really get in the zone, though, I need my code to be the only thing I see. Does anyone know if it's possible to have multiple code... | [
"visual-studio",
"multiple-monitors"
] | 23 | 38 | 13,307 | 4 | 0 | 2008-09-19T13:19:17.337000 | 2008-09-19T13:21:08.407000 |
101,767 | 106,420 | Using `pkg-config` as command line argument under cygwin/msys bash | I'm trying to use cygwin as a build environment under Windows. I have some dependencies on 3rd party packages, for example, GTK+. Normally when I build under Linux, in my Makefile I can add a call to pkg-config as an argument to gcc, so it comes out like so: gcc example.c `pkg-config --libs --cflags gtk+-2.0` This work... | That said, is there, say, some way I could have the Makefile store the result of pkg-config into a variable, and then use that variable, rather than using the back-tick operator? GTK_LIBS = $(shell pkg-config --libs gtk+-2.0) | Using `pkg-config` as command line argument under cygwin/msys bash I'm trying to use cygwin as a build environment under Windows. I have some dependencies on 3rd party packages, for example, GTK+. Normally when I build under Linux, in my Makefile I can add a call to pkg-config as an argument to gcc, so it comes out lik... | TITLE:
Using `pkg-config` as command line argument under cygwin/msys bash
QUESTION:
I'm trying to use cygwin as a build environment under Windows. I have some dependencies on 3rd party packages, for example, GTK+. Normally when I build under Linux, in my Makefile I can add a call to pkg-config as an argument to gcc, s... | [
"windows",
"bash",
"cygwin",
"makefile",
"pkg-config"
] | 4 | 6 | 8,026 | 6 | 0 | 2008-09-19T13:23:24.813000 | 2008-09-19T23:38:58.717000 |
101,777 | 101,805 | PHP: return a part of an if () { } | Let's say I have this code: if (md5($_POST[$foo['bar']]) == $somemd5) { doSomethingWith(md5($_POST[$foo['bar']]); } I could shorten that down by doing: $value = md5($_POST[$foo['bar']]; if ($value == $somemd5) { doSomethingWith($value); } But is there any pre-set variable that contains the first or second condition of ... | No, but since the assignment itself is an expression, you can use the assignment as the conditional expression for the if statement. if (($value = md5(..)) == $somemd5) {... } In general, though, you'll want to avoid embedding assignments into conditional expressions: The code is denser and therefore harder to read, wi... | PHP: return a part of an if () { } Let's say I have this code: if (md5($_POST[$foo['bar']]) == $somemd5) { doSomethingWith(md5($_POST[$foo['bar']]); } I could shorten that down by doing: $value = md5($_POST[$foo['bar']]; if ($value == $somemd5) { doSomethingWith($value); } But is there any pre-set variable that contain... | TITLE:
PHP: return a part of an if () { }
QUESTION:
Let's say I have this code: if (md5($_POST[$foo['bar']]) == $somemd5) { doSomethingWith(md5($_POST[$foo['bar']]); } I could shorten that down by doing: $value = md5($_POST[$foo['bar']]; if ($value == $somemd5) { doSomethingWith($value); } But is there any pre-set var... | [
"php"
] | 0 | 7 | 902 | 3 | 0 | 2008-09-19T13:25:41.283000 | 2008-09-19T13:28:58.280000 |
101,779 | 101,837 | The action or event has been blocked by Disabled Mode | I am using Microsoft Access 2007 to move and massage some data between two SQL Servers. Yesterday everything was working correctly, I was able to run queries, update data, and delete data. Today I opened up the Access database to finish my data migration and am now receiving the following message when I try to run some... | Try and see if this works: Click on 'External Data' tab There should be a Security Warning that states "Certain content in the database has been disabled" Click the 'Options' button Select 'Enable this content' and click the OK button | The action or event has been blocked by Disabled Mode I am using Microsoft Access 2007 to move and massage some data between two SQL Servers. Yesterday everything was working correctly, I was able to run queries, update data, and delete data. Today I opened up the Access database to finish my data migration and am now ... | TITLE:
The action or event has been blocked by Disabled Mode
QUESTION:
I am using Microsoft Access 2007 to move and massage some data between two SQL Servers. Yesterday everything was working correctly, I was able to run queries, update data, and delete data. Today I opened up the Access database to finish my data mig... | [
"ms-access",
"ms-access-2007"
] | 15 | 14 | 120,058 | 7 | 0 | 2008-09-19T13:25:58.817000 | 2008-09-19T13:32:57.507000 |
101,783 | 151,396 | Recursing the file system with Powershell | Anyone happen to have a sample script for recursing a given directory in a filesystem with Powershell? Ultimately what I'm wanting to do is create a script that will generate NSIS file lists for me given a directory. Something very similar to what was done here with a BASH script. | As halr9000 demonstrated, you can use the -recurse switch parameter of the Get-ChildItem cmdlet to retrieve all files and directories under a specified path. It looks like the bash script you linked to in your question saves out the directories as well, so here is a simple function to return both the files and director... | Recursing the file system with Powershell Anyone happen to have a sample script for recursing a given directory in a filesystem with Powershell? Ultimately what I'm wanting to do is create a script that will generate NSIS file lists for me given a directory. Something very similar to what was done here with a BASH scri... | TITLE:
Recursing the file system with Powershell
QUESTION:
Anyone happen to have a sample script for recursing a given directory in a filesystem with Powershell? Ultimately what I'm wanting to do is create a script that will generate NSIS file lists for me given a directory. Something very similar to what was done her... | [
"powershell",
"nsis"
] | 2 | 3 | 1,222 | 2 | 0 | 2008-09-19T13:26:31.420000 | 2008-09-30T01:15:41.433000 |
101,786 | 101,839 | Which continuous integration framework for Perl? | What are the best continuous integration frameworks/projects for Perl and why? | The only one I've seen in action is Smolder (it is used for parrot ). It is TAP based and therefore integrates well with standard perl testing structures. See also this presentation. | Which continuous integration framework for Perl? What are the best continuous integration frameworks/projects for Perl and why? | TITLE:
Which continuous integration framework for Perl?
QUESTION:
What are the best continuous integration frameworks/projects for Perl and why?
ANSWER:
The only one I've seen in action is Smolder (it is used for parrot ). It is TAP based and therefore integrates well with standard perl testing structures. See also t... | [
"perl",
"testing",
"continuous-integration"
] | 21 | 11 | 3,598 | 7 | 0 | 2008-09-19T13:26:51.607000 | 2008-09-19T13:33:27.147000 |
101,797 | 4,901,822 | Visual Studio 2008, Multiple Monitors, "find" window placement problem | (another post here reminded me of this annoyance! this is not a dup!) I use VS2008 with multiple monitors. I have VS open on one and the app I'm debugging, reference pages, etc.. on the other. The problem is when I open a find window (Ctrl-F or click on the "Find in Files" icon) the window opens smack-dab in the middle... | For Visual Studio 2010, there is now a patch that takes care of this and other problems with the find window's size and placement: VS10-KB2268081-x86 http://code.msdn.microsoft.com/KB2268081/Release/ProjectReleases.aspx?ReleaseId=4766 The patch says it will fix the size issue, but it seems to take care of the placement... | Visual Studio 2008, Multiple Monitors, "find" window placement problem (another post here reminded me of this annoyance! this is not a dup!) I use VS2008 with multiple monitors. I have VS open on one and the app I'm debugging, reference pages, etc.. on the other. The problem is when I open a find window (Ctrl-F or clic... | TITLE:
Visual Studio 2008, Multiple Monitors, "find" window placement problem
QUESTION:
(another post here reminded me of this annoyance! this is not a dup!) I use VS2008 with multiple monitors. I have VS open on one and the app I'm debugging, reference pages, etc.. on the other. The problem is when I open a find wind... | [
"visual-studio-2008",
"multiple-monitors"
] | 4 | 3 | 2,158 | 5 | 0 | 2008-09-19T13:27:42.977000 | 2011-02-04T18:52:48.183000 |
101,822 | 102,191 | Is XHTML compliance pointless? | I'm building a site right now, so far I've painfully forced everything to be compliant and it looks pretty much the same across browsers. However, I'm starting to implement some third party/free javascripts which do things like add attributes (eg. order=2). I could work around this but it's a pain, and I'm starting to ... | I have yet to experience an instance where the addition of a non-standard attribute has caused a rendering issue in any browser. Don't try to work around those non-standard attributes. Validators are handy as tools to double check your code for unintentional mistakes, but as we all know, even fully valid xhtml will not... | Is XHTML compliance pointless? I'm building a site right now, so far I've painfully forced everything to be compliant and it looks pretty much the same across browsers. However, I'm starting to implement some third party/free javascripts which do things like add attributes (eg. order=2). I could work around this but it... | TITLE:
Is XHTML compliance pointless?
QUESTION:
I'm building a site right now, so far I've painfully forced everything to be compliant and it looks pretty much the same across browsers. However, I'm starting to implement some third party/free javascripts which do things like add attributes (eg. order=2). I could work ... | [
"html",
"xhtml",
"standards-compliance"
] | 20 | 2 | 1,581 | 11 | 0 | 2008-09-19T13:30:43.890000 | 2008-09-19T14:19:27.800000 |
101,825 | 101,882 | What's the best way of using a pair (triple, etc) of values as one value in C#? | That is, I'd like to have a tuple of values. The use case on my mind: Dictionary, object> or Dictionary, object> Are there built-in types like Pair or Triple? Or what's the best way of implementing it? Update There are some general-purpose tuples implementations described in the answers, but for tuples used as keys in ... | I have implemented a tuple library in C#. Visit http://www.adventuresinsoftware.com/generics/ and click on the "tuples" link. | What's the best way of using a pair (triple, etc) of values as one value in C#? That is, I'd like to have a tuple of values. The use case on my mind: Dictionary, object> or Dictionary, object> Are there built-in types like Pair or Triple? Or what's the best way of implementing it? Update There are some general-purpose ... | TITLE:
What's the best way of using a pair (triple, etc) of values as one value in C#?
QUESTION:
That is, I'd like to have a tuple of values. The use case on my mind: Dictionary, object> or Dictionary, object> Are there built-in types like Pair or Triple? Or what's the best way of implementing it? Update There are som... | [
"c#",
"generics",
"data-structures",
"tuples"
] | 20 | 6 | 14,701 | 16 | 0 | 2008-09-19T13:31:14.343000 | 2008-09-19T13:38:26.557000 |
101,834 | 101,923 | Is Oracle RDBMS more stable, secure, robust, etc. than MySQL RDBMS? | I've worked on a variety of systems as a programmer, some with Oracle, some with MySQL. I keep hearing people say that Oracle is more stable, more robust, and more secure. Is this the case? If so in what ways and why? For the purposes of this question, consider a small-medium sized production DB, perhaps 500,000 record... | Yes. Oracle is enterprise grade software. I'm not sure if its really any more stable that mysql, I haven't used mysql that much, but I dont ever remember having mysql crash on me. I've had oracle crash, but when it does, it gives me more information about why it crashed than I could possibly want, and Oracle support is... | Is Oracle RDBMS more stable, secure, robust, etc. than MySQL RDBMS? I've worked on a variety of systems as a programmer, some with Oracle, some with MySQL. I keep hearing people say that Oracle is more stable, more robust, and more secure. Is this the case? If so in what ways and why? For the purposes of this question,... | TITLE:
Is Oracle RDBMS more stable, secure, robust, etc. than MySQL RDBMS?
QUESTION:
I've worked on a variety of systems as a programmer, some with Oracle, some with MySQL. I keep hearing people say that Oracle is more stable, more robust, and more secure. Is this the case? If so in what ways and why? For the purposes... | [
"mysql",
"database",
"oracle",
"comparison",
"rdbms"
] | 8 | 21 | 5,414 | 11 | 0 | 2008-09-19T13:32:30.937000 | 2008-09-19T13:43:58.180000 |
101,849 | 101,909 | In eclipse, how to display inherited members in Outline view? | Typing Ctrl+O twice in editor when a java type is selected pops-up an outline context dialog that displays the members && inherited members. How can I have this in the main outline view? | Looks like you can't do it. Maybe you should file it as an improvement request. | In eclipse, how to display inherited members in Outline view? Typing Ctrl+O twice in editor when a java type is selected pops-up an outline context dialog that displays the members && inherited members. How can I have this in the main outline view? | TITLE:
In eclipse, how to display inherited members in Outline view?
QUESTION:
Typing Ctrl+O twice in editor when a java type is selected pops-up an outline context dialog that displays the members && inherited members. How can I have this in the main outline view?
ANSWER:
Looks like you can't do it. Maybe you should... | [
"java",
"eclipse",
"ide"
] | 31 | 8 | 10,979 | 5 | 0 | 2008-09-19T13:34:52.227000 | 2008-09-19T13:42:39.167000 |
101,850 | 101,879 | PHP: GET-data automatically being declared as variables | Take this code: And then access the file with?action=test Is there any way of preventing $action from automatically being declared by the GET? Other than of course adding &&!isset($_GET['action']) Why would I want the variable to be declared for me? | Check your php.ini for the register_globals setting. It is probably on, you want it off. Why would I want the variable to be declared for me? You don't. It's a horrible security risk. It makes the Environment, GET, POST, Cookie and Server variables global (PHP manual). These are a handful of reserved variables in PHP. | PHP: GET-data automatically being declared as variables Take this code: And then access the file with?action=test Is there any way of preventing $action from automatically being declared by the GET? Other than of course adding &&!isset($_GET['action']) Why would I want the variable to be declared for me? | TITLE:
PHP: GET-data automatically being declared as variables
QUESTION:
Take this code: And then access the file with?action=test Is there any way of preventing $action from automatically being declared by the GET? Other than of course adding &&!isset($_GET['action']) Why would I want the variable to be declared for ... | [
"php",
"url",
"get"
] | 9 | 26 | 3,992 | 6 | 0 | 2008-09-19T13:34:53.757000 | 2008-09-19T13:38:08.460000 |
101,868 | 104,903 | Rails-like Database Migrations? | Is there any easy to install/use (on unix) database migration tools like Rails Migrations? I really like the idea, but installing ruby/rails purely to manage my database migrations seems overkill. | Just use ActiveRecord and a simple Rakefile. For example, if you put your migrations in a db/migrate directory and have a database.yml file that has your db config, this simple Rakefile should work: Rakefile: require 'active_record' require 'yaml'
desc "Migrate the database through scripts in db/migrate. Target specif... | Rails-like Database Migrations? Is there any easy to install/use (on unix) database migration tools like Rails Migrations? I really like the idea, but installing ruby/rails purely to manage my database migrations seems overkill. | TITLE:
Rails-like Database Migrations?
QUESTION:
Is there any easy to install/use (on unix) database migration tools like Rails Migrations? I really like the idea, but installing ruby/rails purely to manage my database migrations seems overkill.
ANSWER:
Just use ActiveRecord and a simple Rakefile. For example, if you... | [
"ruby-on-rails",
"ruby",
"database",
"refactoring",
"migration"
] | 18 | 23 | 3,614 | 6 | 0 | 2008-09-19T13:36:28.807000 | 2008-09-19T19:41:57.757000 |
101,877 | 101,961 | Page transitions effects in Safari? | How can I add Page transitions effects like IE in Safari for web pages? | You could check out this example: http://sachiniscool.blogspot.com/2006/01/implementing-page-transitions-in.html. It describes how to emulate page transitions in Firefox using AJAX and CSS. The same method works for Safari as well. The code below is taken from that page and slightly formatted: var xmlhttp; var timerId ... | Page transitions effects in Safari? How can I add Page transitions effects like IE in Safari for web pages? | TITLE:
Page transitions effects in Safari?
QUESTION:
How can I add Page transitions effects like IE in Safari for web pages?
ANSWER:
You could check out this example: http://sachiniscool.blogspot.com/2006/01/implementing-page-transitions-in.html. It describes how to emulate page transitions in Firefox using AJAX and ... | [
"safari"
] | 5 | 2 | 6,131 | 2 | 0 | 2008-09-19T13:37:34.280000 | 2008-09-19T13:50:22.317000 |
101,893 | 101,941 | How to combine requests for multiple javascript files into one http request? | This concept is a new one for me -- I first came across it at the YUI dependency configurator. Basically, instead of having multiple requests for many files, the files are chained into one http request to cut down on page load time. Anyone know how to implement this on a LAMP stack? (I saw a similar question was asked ... | There are various ways, the two most obvious would be: Build a tool like YUI which builds a bespoke, unique version based on the components you ticked as required so that you can still serve the file as static. MooTools and jQuery UI all provide package-builders like this when you download their package to give you the... | How to combine requests for multiple javascript files into one http request? This concept is a new one for me -- I first came across it at the YUI dependency configurator. Basically, instead of having multiple requests for many files, the files are chained into one http request to cut down on page load time. Anyone kno... | TITLE:
How to combine requests for multiple javascript files into one http request?
QUESTION:
This concept is a new one for me -- I first came across it at the YUI dependency configurator. Basically, instead of having multiple requests for many files, the files are chained into one http request to cut down on page loa... | [
"php",
"javascript",
"apache",
"http"
] | 8 | 8 | 9,937 | 4 | 0 | 2008-09-19T13:39:55.413000 | 2008-09-19T13:46:40.297000 |
101,903 | 101,975 | ASP.NET MVC Preview 5 & Resharper weirdness | I've just created my first Preview 5 error and it doesn't seem to place nice with Resharper. All the C# in the Views are coming up with errors, things like <%= Html.Password("currentPassword") %> has the "currentPassword" highlighted with the following error: Argument type "System.String" is not assignable parameter ty... | Did you try latest nightly build of ReSharper 4.1? In some cases the bug in 4.1 manifests itself with numerous ambiguity errors, and it has been fixed within the follow up build. | ASP.NET MVC Preview 5 & Resharper weirdness I've just created my first Preview 5 error and it doesn't seem to place nice with Resharper. All the C# in the Views are coming up with errors, things like <%= Html.Password("currentPassword") %> has the "currentPassword" highlighted with the following error: Argument type "S... | TITLE:
ASP.NET MVC Preview 5 & Resharper weirdness
QUESTION:
I've just created my first Preview 5 error and it doesn't seem to place nice with Resharper. All the C# in the Views are coming up with errors, things like <%= Html.Password("currentPassword") %> has the "currentPassword" highlighted with the following error... | [
"asp.net-mvc",
"resharper"
] | 1 | 2 | 1,078 | 3 | 0 | 2008-09-19T13:41:41.180000 | 2008-09-19T13:52:09.957000 |
101,914 | 165,957 | Building effective external DSLs | What tools are there for me to build a real, honest to goodness external DSL. And no, I'm not talking about abusing Ruby, Boo, XML or another existing language or syntax, I mean a REAL external DSL -- my own language for my own purposes. I know that there are a few language workbenches being developed and I've heard ab... | I've written DSLs in Boo, Irony.NET and a toolkit called Grammatica. You say that a parser-generator is too complicated, but you may be being too hasty in your judgment, in fact they are quite simple to use once you get over a small learning curve, and open up a vast world of possibility that easily overrides the effor... | Building effective external DSLs What tools are there for me to build a real, honest to goodness external DSL. And no, I'm not talking about abusing Ruby, Boo, XML or another existing language or syntax, I mean a REAL external DSL -- my own language for my own purposes. I know that there are a few language workbenches ... | TITLE:
Building effective external DSLs
QUESTION:
What tools are there for me to build a real, honest to goodness external DSL. And no, I'm not talking about abusing Ruby, Boo, XML or another existing language or syntax, I mean a REAL external DSL -- my own language for my own purposes. I know that there are a few lan... | [
"compiler-construction",
"dsl"
] | 11 | 9 | 1,808 | 7 | 0 | 2008-09-19T13:43:11.397000 | 2008-10-03T06:59:40.707000 |
101,918 | 101,936 | How is the user id image generated on SO? | I am a little curious about the cute little kaleidoscopic images associated with each user on this site. How are those generated? Possibilities are: A list of images is already there in some folder and it is chosen randomly. The image is generated whenever a user registers. In any case, I am more interested in what kin... | It's called an Identicon. If you entered and e-mail, it's a based on a hash of your e-mail address. If you didn't enter an e-mail, it's based on your IP address. Jeff posted some.NET code to generate IP based Identicons. | How is the user id image generated on SO? I am a little curious about the cute little kaleidoscopic images associated with each user on this site. How are those generated? Possibilities are: A list of images is already there in some folder and it is chosen randomly. The image is generated whenever a user registers. In ... | TITLE:
How is the user id image generated on SO?
QUESTION:
I am a little curious about the cute little kaleidoscopic images associated with each user on this site. How are those generated? Possibilities are: A list of images is already there in some folder and it is chosen randomly. The image is generated whenever a u... | [
"image-processing",
"image-manipulation",
"identicon"
] | 11 | 13 | 1,146 | 6 | 0 | 2008-09-19T13:43:31.800000 | 2008-09-19T13:46:08.347000 |
101,935 | 101,962 | Validate XML using a custom DTD in PHP | Is there a way (without installing any libraries) of validating XML using a custom DTD in PHP? | Take a look at PHP's DOM, especially DOMDocument::schemaValidate and DOMDocument::validate. The example for DOMDocument::validate is fairly simple: Load('book.xml'); if ($dom->validate()) { echo "This document is valid!\n"; }?> | Validate XML using a custom DTD in PHP Is there a way (without installing any libraries) of validating XML using a custom DTD in PHP? | TITLE:
Validate XML using a custom DTD in PHP
QUESTION:
Is there a way (without installing any libraries) of validating XML using a custom DTD in PHP?
ANSWER:
Take a look at PHP's DOM, especially DOMDocument::schemaValidate and DOMDocument::validate. The example for DOMDocument::validate is fairly simple: Load('book.... | [
"php",
"xml",
"validation",
"dtd"
] | 11 | 4 | 22,311 | 4 | 0 | 2008-09-19T13:46:04.727000 | 2008-09-19T13:50:23.767000 |
101,938 | 197,331 | VS vstest debugging error | I've recently installed VS2008. The project I'm working on uses vstest and I have a maddening issue. When I choose to run/debug my tests/a test I frequently get the following error (accompanied by an exclamation mark against the test - test error): Warning: Test Run deployment issue: The assembly or module 'Cassini' di... | btw - I found the answer. Or an answer. using Process Explorer, I traced coloader80.dll. This was used by VS (undetandable enough as it's used by debugging) but also SSMS. So... it seems SqlServerManagementStudio had a hook to the VS debuggging dll, thus creating the lock. For now I'm just opening one at a time, but I'... | VS vstest debugging error I've recently installed VS2008. The project I'm working on uses vstest and I have a maddening issue. When I choose to run/debug my tests/a test I frequently get the following error (accompanied by an exclamation mark against the test - test error): Warning: Test Run deployment issue: The assem... | TITLE:
VS vstest debugging error
QUESTION:
I've recently installed VS2008. The project I'm working on uses vstest and I have a maddening issue. When I choose to run/debug my tests/a test I frequently get the following error (accompanied by an exclamation mark against the test - test error): Warning: Test Run deploymen... | [
"visual-studio-2008",
"mstest"
] | 3 | 3 | 4,788 | 1 | 0 | 2008-09-19T13:46:20.640000 | 2008-10-13T11:51:49.997000 |
101,974 | 101,996 | Resolving incompatibilities between the Spring.NET and NHibernate assemblies | I am trying to develop a.NET Web Project using NHibernate and Spring.NET, but I'm stuck. Spring.NET seems to depend on different versions of the NHibernate assemblies (maybe it needs 1.2.1.4000 and my NHibernate version is 1.2.0.4000). I had originally solved similar problems using the "bindingRedirect" tag, but now ev... | I too ran into this, frustrated I just grabbed the Spring source and compiled it against the latest NHibernate to make it go away forever. Not sure if that's an option for you but the 10 minutes that took seems to have saved me a lot of time overall. Here's the SourceForge link for the Spring Source for all versions: S... | Resolving incompatibilities between the Spring.NET and NHibernate assemblies I am trying to develop a.NET Web Project using NHibernate and Spring.NET, but I'm stuck. Spring.NET seems to depend on different versions of the NHibernate assemblies (maybe it needs 1.2.1.4000 and my NHibernate version is 1.2.0.4000). I had o... | TITLE:
Resolving incompatibilities between the Spring.NET and NHibernate assemblies
QUESTION:
I am trying to develop a.NET Web Project using NHibernate and Spring.NET, but I'm stuck. Spring.NET seems to depend on different versions of the NHibernate assemblies (maybe it needs 1.2.1.4000 and my NHibernate version is 1.... | [
".net",
"nhibernate",
"assemblies",
"spring.net"
] | 1 | 10 | 600 | 2 | 0 | 2008-09-19T13:52:02.437000 | 2008-09-19T13:55:16.703000 |
101,986 | 102,022 | What are the other uses of the "make" command? | A sysadmin teacher told me one day that I should learn to use "make" because I could use it for a lot of other things that just triggering complilations. I never got the chance to talk longer about it. Do you have any good example? As a bonus, isn't it this tool deprecated, and what are modern alternatives (for the com... | Make can be used to execute any commands you want to execute. It is best used for activities that require dependency checking, but there is no reason you couldn't use make to check your e-mail, reboot your servers, make backups, or anything else. Ant, NAnt, and msbuild are supposedly the modern alternatives, but plain-... | What are the other uses of the "make" command? A sysadmin teacher told me one day that I should learn to use "make" because I could use it for a lot of other things that just triggering complilations. I never got the chance to talk longer about it. Do you have any good example? As a bonus, isn't it this tool deprecated... | TITLE:
What are the other uses of the "make" command?
QUESTION:
A sysadmin teacher told me one day that I should learn to use "make" because I could use it for a lot of other things that just triggering complilations. I never got the chance to talk longer about it. Do you have any good example? As a bonus, isn't it th... | [
"makefile",
"compilation"
] | 2 | 1 | 415 | 8 | 0 | 2008-09-19T13:53:13.760000 | 2008-09-19T13:58:30.547000 |
101,989 | 102,935 | Intefacing EJB - XML using JAXB interface | I was trying to add the XML schema to an existing EJB project. JAXB is used to bind the XML-Schema to a Java class. As we are going to use the search engine to crawl through DTO when EJB is in session. I could not find any direct approach as to map entity class file to XML-Schema. The only way we could achieve so far i... | Tightly coupling your data model (entity beans) to your XML interface might not be the best idea in the world; it prevents you from changing one without changing the other. I'm not 100% sure I understand what you are trying to do, but I think there is a way to instruct JAXB to extend classes rather than create new ones... | Intefacing EJB - XML using JAXB interface I was trying to add the XML schema to an existing EJB project. JAXB is used to bind the XML-Schema to a Java class. As we are going to use the search engine to crawl through DTO when EJB is in session. I could not find any direct approach as to map entity class file to XML-Sche... | TITLE:
Intefacing EJB - XML using JAXB interface
QUESTION:
I was trying to add the XML schema to an existing EJB project. JAXB is used to bind the XML-Schema to a Java class. As we are going to use the search engine to crawl through DTO when EJB is in session. I could not find any direct approach as to map entity clas... | [
"xml",
"jaxb",
"ejb"
] | 5 | 2 | 3,679 | 2 | 0 | 2008-09-19T13:53:44.117000 | 2008-09-19T15:33:16.827000 |
102,003 | 102,511 | How can I start an Java applet with more memory? | The default 64 MB max heap memory can be small for a large Java application. Are there any applet parameter to increment this for a signed applet? For a Java program this is a simple command line parameter but how this work for an applet in the browser. | The new plugin architecture in JDK6u10 supports this. Prior to that, the only way to do it was in the Java control panel. | How can I start an Java applet with more memory? The default 64 MB max heap memory can be small for a large Java application. Are there any applet parameter to increment this for a signed applet? For a Java program this is a simple command line parameter but how this work for an applet in the browser. | TITLE:
How can I start an Java applet with more memory?
QUESTION:
The default 64 MB max heap memory can be small for a large Java application. Are there any applet parameter to increment this for a signed applet? For a Java program this is a simple command line parameter but how this work for an applet in the browser.... | [
"java",
"memory",
"applet",
"next-generation-plugin"
] | 13 | 10 | 23,620 | 7 | 0 | 2008-09-19T13:55:54.547000 | 2008-09-19T14:55:39.287000 |
102,005 | 102,116 | Missing label on Drupal 5 CCK single on/off checkbox | I'm creating a form using the Content Construction Kit (CCK) in Drupal5. I've added several singe on/off checkboxes but their associated labels are not being displayed. Help text is displayed underneath the checkboxes but this is not the desired behavior. To me the expected behavior is that the label would appear besid... | Found the answer: It turns out to be functionality provided by the CCK, but it's counterintuitive. For single on/off checkboxes, drupal will use the on label specified in the allowed values field: 0 1|This is my label | Missing label on Drupal 5 CCK single on/off checkbox I'm creating a form using the Content Construction Kit (CCK) in Drupal5. I've added several singe on/off checkboxes but their associated labels are not being displayed. Help text is displayed underneath the checkboxes but this is not the desired behavior. To me the e... | TITLE:
Missing label on Drupal 5 CCK single on/off checkbox
QUESTION:
I'm creating a form using the Content Construction Kit (CCK) in Drupal5. I've added several singe on/off checkboxes but their associated labels are not being displayed. Help text is displayed underneath the checkboxes but this is not the desired beh... | [
"drupal",
"cck"
] | 2 | 5 | 1,491 | 1 | 0 | 2008-09-19T13:56:11.117000 | 2008-09-19T14:11:26.257000 |
102,009 | 102,044 | When is it best to use the stack instead of the heap and vice versa? | In C++, when is it best to use the stack? When is it best to use the heap? | Use the stack when your variable will not be used after the current function returns. Use the heap when the data in the variable is needed beyond the lifetime of the current function. | When is it best to use the stack instead of the heap and vice versa? In C++, when is it best to use the stack? When is it best to use the heap? | TITLE:
When is it best to use the stack instead of the heap and vice versa?
QUESTION:
In C++, when is it best to use the stack? When is it best to use the heap?
ANSWER:
Use the stack when your variable will not be used after the current function returns. Use the heap when the data in the variable is needed beyond the... | [
"c++"
] | 89 | 85 | 43,909 | 7 | 0 | 2008-09-19T13:57:08.743000 | 2008-09-19T14:01:17.640000 |
102,027 | 108,402 | Rails state of the art for spam prevention | What is the current state of the art in rails for preventing spam accounts? Captcha? Any good plugins, tutorials or suggestions? | Edit: It appears BranBuster is dead (this was years ago). But I really like: https://github.com/matthutchinson/acts_as_textcaptcha I'm a big fan of the rails plugin called "BrainBuster". It's a logic-based CAPTCHA which I find preferable over the "type these words" things, because it is annoying to decipher the words s... | Rails state of the art for spam prevention What is the current state of the art in rails for preventing spam accounts? Captcha? Any good plugins, tutorials or suggestions? | TITLE:
Rails state of the art for spam prevention
QUESTION:
What is the current state of the art in rails for preventing spam accounts? Captcha? Any good plugins, tutorials or suggestions?
ANSWER:
Edit: It appears BranBuster is dead (this was years ago). But I really like: https://github.com/matthutchinson/acts_as_te... | [
"ruby-on-rails",
"captcha"
] | 4 | 1 | 2,279 | 6 | 0 | 2008-09-19T13:59:06.523000 | 2008-09-20T15:00:13.200000 |
102,029 | 103,436 | Reuse of StaticResource in Silverlight 2.0 | I am currently testing with Silverlight 2.0 Beta 2, and my goal is to define a resource element once and then reuse it many times in my rendering. This simple example defines a rectangle (myRect) as a resource and then I attempt to reuse it twice -- which fails with the error: Attribute {StaticResource myRect} value is... | I have also encountered the same problem when trying to reuse components defined as static resources. The workaround I have found is not declaring the controls as resources, but defining styles setting all the properties you need, and instantiating a new control with that style every time you need. EDIT: The out of ran... | Reuse of StaticResource in Silverlight 2.0 I am currently testing with Silverlight 2.0 Beta 2, and my goal is to define a resource element once and then reuse it many times in my rendering. This simple example defines a rectangle (myRect) as a resource and then I attempt to reuse it twice -- which fails with the error:... | TITLE:
Reuse of StaticResource in Silverlight 2.0
QUESTION:
I am currently testing with Silverlight 2.0 Beta 2, and my goal is to define a resource element once and then reuse it many times in my rendering. This simple example defines a rectangle (myRect) as a resource and then I attempt to reuse it twice -- which fai... | [
"silverlight",
"static-resource"
] | 0 | 2 | 2,542 | 1 | 0 | 2008-09-19T13:59:31.187000 | 2008-09-19T16:25:06.950000 |
102,040 | 809,530 | Why would VS2005 keep checking out a project for editing without any changes being made? | I have a VS2005 solution which contains a variety of projects (C++ DLLs, C++ static libraries, C# assemblies, C++ windows executables) that are combined in various ways to produce several executables. For some reason, every time I open the solution, VS2005 wants to check out one of the projects for editing. The project... | There are two reasons I've encountered that cause this behavior. The first is old source control bindings. If you have a project that used to be managed by another source control tool, it might have leftover bindings in the project file. Open the project file, and change the following settings from something like this:... | Why would VS2005 keep checking out a project for editing without any changes being made? I have a VS2005 solution which contains a variety of projects (C++ DLLs, C++ static libraries, C# assemblies, C++ windows executables) that are combined in various ways to produce several executables. For some reason, every time I ... | TITLE:
Why would VS2005 keep checking out a project for editing without any changes being made?
QUESTION:
I have a VS2005 solution which contains a variety of projects (C++ DLLs, C++ static libraries, C# assemblies, C++ windows executables) that are combined in various ways to produce several executables. For some rea... | [
"visual-studio-2005"
] | 3 | 0 | 1,744 | 8 | 0 | 2008-09-19T14:00:35.520000 | 2009-04-30T23:10:56.207000 |
102,049 | 102,075 | How do I escape the wildcard/asterisk character in bash? | For example: me$ FOO="BAR * BAR" me$ echo $FOO BAR file1 file2 file3 file4 BAR and using the \ escape character: me$ FOO="BAR \* BAR" me$ echo $FOO BAR \* BAR I'm obviously doing something stupid. How do I get the output BAR * BAR? | Quoting when setting $FOO is not enough. You need to quote the variable reference as well: me$ FOO="BAR * BAR" me$ echo "$FOO" BAR * BAR | How do I escape the wildcard/asterisk character in bash? For example: me$ FOO="BAR * BAR" me$ echo $FOO BAR file1 file2 file3 file4 BAR and using the \ escape character: me$ FOO="BAR \* BAR" me$ echo $FOO BAR \* BAR I'm obviously doing something stupid. How do I get the output BAR * BAR? | TITLE:
How do I escape the wildcard/asterisk character in bash?
QUESTION:
For example: me$ FOO="BAR * BAR" me$ echo $FOO BAR file1 file2 file3 file4 BAR and using the \ escape character: me$ FOO="BAR \* BAR" me$ echo $FOO BAR \* BAR I'm obviously doing something stupid. How do I get the output BAR * BAR?
ANSWER:
Quot... | [
"bash",
"shell",
"escaping"
] | 170 | 176 | 154,479 | 7 | 0 | 2008-09-19T14:01:59.697000 | 2008-09-19T14:06:06.723000 |
102,052 | 103,978 | What is the preferred practice for event arguments provided by custom events? | In regards to custom events in.NET, what is the preferred design pattern for passing event arguments? Should you have a separate EventArgs derived class for each event that can be raised, or it is acceptable to have a single class for the events if they are all raised by events from the same class? | You don't need to have a separate EventArgs derived class for each event. It's perfectly acceptable and even desirable to use existing EventArgs-derived classes rather than reinventing the wheel. These could be existing framework classes (e.g. System.Component.CancelEventArgs if all you want to do is give the event han... | What is the preferred practice for event arguments provided by custom events? In regards to custom events in.NET, what is the preferred design pattern for passing event arguments? Should you have a separate EventArgs derived class for each event that can be raised, or it is acceptable to have a single class for the eve... | TITLE:
What is the preferred practice for event arguments provided by custom events?
QUESTION:
In regards to custom events in.NET, what is the preferred design pattern for passing event arguments? Should you have a separate EventArgs derived class for each event that can be raised, or it is acceptable to have a single... | [
".net",
"design-patterns"
] | 1 | 1 | 224 | 4 | 0 | 2008-09-19T14:02:54.470000 | 2008-09-19T17:40:42.387000 |
102,055 | 102,152 | Adding an input field to the dom and focusing it in IE | I am trying to make a div, that when you click it turns into an input box, and focuses it. I am using prototype to achieve this. This works in both Chrome and Firefox, but not in IE. IE refuses to focus the newly added input field, even if I set a 1 second timeout. Basically the code works like this: var viewElement = ... | My guess is that IE hasn't updated the DOM yet when you make the call to focus(). Sometimes browsers will wait until a script has finished executing before updating the DOM. I would try doing the update, then doing setTimeout("setFocus", 0);
function setFocus() { editElement.focus(); } Your other option would be to ha... | Adding an input field to the dom and focusing it in IE I am trying to make a div, that when you click it turns into an input box, and focuses it. I am using prototype to achieve this. This works in both Chrome and Firefox, but not in IE. IE refuses to focus the newly added input field, even if I set a 1 second timeout.... | TITLE:
Adding an input field to the dom and focusing it in IE
QUESTION:
I am trying to make a div, that when you click it turns into an input box, and focuses it. I am using prototype to achieve this. This works in both Chrome and Firefox, but not in IE. IE refuses to focus the newly added input field, even if I set a... | [
"javascript",
"internet-explorer",
"focus",
"prototypejs"
] | 0 | 4 | 1,670 | 3 | 0 | 2008-09-19T14:03:25.107000 | 2008-09-19T14:15:47.403000 |
102,057 | 105,997 | Formatting data in a Fitnesse RowFixture | I've got a Fitnesse RowFixture that returns a list of business objects. The object has a field which is a float representing a percentage between 0 and 1. The consumer of the business object will be a web page or report that comes from a designer, so the formatting of the percentage will be up to the designer rather th... | You certainly don't want to modify your Business Logic just to make your tests look better. Good news however, there is a way to accomplish this that is not difficult, but not as easy as passing in a format specifier. Try to think of your Fit Fixture as a service boundary between FitNesse and your application code. You... | Formatting data in a Fitnesse RowFixture I've got a Fitnesse RowFixture that returns a list of business objects. The object has a field which is a float representing a percentage between 0 and 1. The consumer of the business object will be a web page or report that comes from a designer, so the formatting of the percen... | TITLE:
Formatting data in a Fitnesse RowFixture
QUESTION:
I've got a Fitnesse RowFixture that returns a list of business objects. The object has a field which is a float representing a percentage between 0 and 1. The consumer of the business object will be a web page or report that comes from a designer, so the format... | [
"fitnesse"
] | 7 | 4 | 2,084 | 2 | 0 | 2008-09-19T14:03:39.210000 | 2008-09-19T21:58:48.023000 |
102,058 | 102,403 | How does debug level (0-99) in the Tomcat server.xml affect speed? | The server.xml which controls the startup of Apache Tomcat's servlet container contains a debug attribute for nearly every major component. The debug attribute is more or less verbose depending upon the number you give it, zero being least and 99 being most verbose. How does the debug level affect Tomcat's speed when s... | Extensive logging takes a significant amount of time. This is why it is so important to put if (log.isDebugEnabled()) log.debug(bla_bla_bla); so I would say that seting your production server to being verbose would seriously affect performance. I assume it's a production server you're talking about since you say it mus... | How does debug level (0-99) in the Tomcat server.xml affect speed? The server.xml which controls the startup of Apache Tomcat's servlet container contains a debug attribute for nearly every major component. The debug attribute is more or less verbose depending upon the number you give it, zero being least and 99 being ... | TITLE:
How does debug level (0-99) in the Tomcat server.xml affect speed?
QUESTION:
The server.xml which controls the startup of Apache Tomcat's servlet container contains a debug attribute for nearly every major component. The debug attribute is more or less verbose depending upon the number you give it, zero being l... | [
"java",
"apache",
"tomcat",
"servlets"
] | 4 | 2 | 6,206 | 2 | 0 | 2008-09-19T14:03:46.167000 | 2008-09-19T14:44:30.610000 |
102,059 | 113,828 | Can I get the old full screen scaling with FLVPlayback and flash 9.0.115+? | With previous versions of flash, entering the full screen mode increased the height and width of the stage to the dimensions of the screen. Now that hardware scaling has arrived, the height and width are set to the dimensions of the video (plus borders if the aspect ratio is different). That's fine, unless you have con... | I've eventually found the answer to this. The problem is that the FLVPlayback component is now using the stage.fullScreenSourceRect property to enter a hardware-scaled full screen mode. When it does that, it stretches the rendered area given by stage.fullScreenSourceRect to fill the screen, rather than increasing the s... | Can I get the old full screen scaling with FLVPlayback and flash 9.0.115+? With previous versions of flash, entering the full screen mode increased the height and width of the stage to the dimensions of the screen. Now that hardware scaling has arrived, the height and width are set to the dimensions of the video (plus ... | TITLE:
Can I get the old full screen scaling with FLVPlayback and flash 9.0.115+?
QUESTION:
With previous versions of flash, entering the full screen mode increased the height and width of the stage to the dimensions of the screen. Now that hardware scaling has arrived, the height and width are set to the dimensions o... | [
"flash",
"video",
"flv",
"fullscreen",
"scaling"
] | 4 | 1 | 4,633 | 3 | 0 | 2008-09-19T14:04:21.987000 | 2008-09-22T08:41:03.220000 |
102,070 | 102,893 | Farseer Physics Tutorials, Help files | Is there a tutotial or help file, suitable for a beginner c# programmer to use. | The primary documentation for the Farseer Physics engine is on the homepage. http://www.codeplex.com/FarseerPhysics/Wiki/View.aspx?title=Documentation&referringTitle=Home You can also check out the source code, they have a demos folder in there, though it's only got one example, but it can show you how to implement the... | Farseer Physics Tutorials, Help files Is there a tutotial or help file, suitable for a beginner c# programmer to use. | TITLE:
Farseer Physics Tutorials, Help files
QUESTION:
Is there a tutotial or help file, suitable for a beginner c# programmer to use.
ANSWER:
The primary documentation for the Farseer Physics engine is on the homepage. http://www.codeplex.com/FarseerPhysics/Wiki/View.aspx?title=Documentation&referringTitle=Home You ... | [
"c#",
"silverlight",
".net-3.5",
"farseer"
] | 11 | 8 | 14,574 | 4 | 0 | 2008-09-19T14:05:43.620000 | 2008-09-19T15:30:31.263000 |
102,083 | 102,141 | What's the best tool to find and replace regular expressions over multiple files? | Preferably free tools if possible. Also, the option of searching for multiple regular expressions and each replacing with different strings would be a bonus. | Perl. Seriously, it makes sysadmin stuff so much easier. Here's an example: perl -pi -e 's/something/somethingelse/g' *.log | What's the best tool to find and replace regular expressions over multiple files? Preferably free tools if possible. Also, the option of searching for multiple regular expressions and each replacing with different strings would be a bonus. | TITLE:
What's the best tool to find and replace regular expressions over multiple files?
QUESTION:
Preferably free tools if possible. Also, the option of searching for multiple regular expressions and each replacing with different strings would be a bonus.
ANSWER:
Perl. Seriously, it makes sysadmin stuff so much easi... | [
"regex",
"search",
"replace"
] | 34 | 47 | 26,268 | 21 | 0 | 2008-09-19T14:06:45.257000 | 2008-09-19T14:13:46.190000 |
102,093 | 123,182 | WordPress XMLRPC: Expat reports error code 5 | I wrote a small PHP application several months ago that uses the WordPress XMLRPC library to synchronize two separate WordPress blogs. I have a general "RPCRequest" function that packages the request, sends it, and returns the server response, and I have several more specific functions that customize the type of reques... | @Novak: Thanks for your suggestion. The problem turned out to be a memory issue; by retrieving all the posts from the remote location, the response exceeded the amount of memory PHP was allowed to utilize, hence the unclosed token error. The problem with the cryptic and incomplete error message was due to an outdated v... | WordPress XMLRPC: Expat reports error code 5 I wrote a small PHP application several months ago that uses the WordPress XMLRPC library to synchronize two separate WordPress blogs. I have a general "RPCRequest" function that packages the request, sends it, and returns the server response, and I have several more specifi... | TITLE:
WordPress XMLRPC: Expat reports error code 5
QUESTION:
I wrote a small PHP application several months ago that uses the WordPress XMLRPC library to synchronize two separate WordPress blogs. I have a general "RPCRequest" function that packages the request, sends it, and returns the server response, and I have se... | [
"php",
"blogs",
"xml-rpc"
] | 1 | 1 | 2,452 | 3 | 0 | 2008-09-19T14:08:11.023000 | 2008-09-23T19:20:34.267000 |
102,128 | 102,134 | SVN mark major version | Sorry, I'm new to SVN and I looked around a little for this. How do you mark a major version in SVN, kind of like set up a restore point. Right now I just setup my server and added all my files- I've been intermittently committing different changes. When I have something in a stable state is there a way to mark this so... | Sounds like you're looking for tags. Tags in the Subversion book "A tag is just a “snapshot” of a project in time" | SVN mark major version Sorry, I'm new to SVN and I looked around a little for this. How do you mark a major version in SVN, kind of like set up a restore point. Right now I just setup my server and added all my files- I've been intermittently committing different changes. When I have something in a stable state is ther... | TITLE:
SVN mark major version
QUESTION:
Sorry, I'm new to SVN and I looked around a little for this. How do you mark a major version in SVN, kind of like set up a restore point. Right now I just setup my server and added all my files- I've been intermittently committing different changes. When I have something in a st... | [
"svn",
"version-control"
] | 6 | 16 | 3,630 | 8 | 0 | 2008-09-19T14:12:28.237000 | 2008-09-19T14:13:03.273000 |
102,165 | 102,218 | Understanding the behaviour of inject used with a lambda in Ruby | I often plug pre-configured lambdas into enumerable methods like 'map', 'select' etc. but the behavior of 'inject' seems to be different. e.g. with mult4 = lambda {|item| item * 4 } then (5..10).map &mult4 gives me [20, 24, 28, 32, 36, 40] However, if I make a 2-parameter lambda for use with an inject like so, multL = ... | So the reason that (5..10).map &mult4 works and (5..10).inject(2) &multL doesn't is that ruby parens are implicit in the first case, so it really means (5..10).map(&mult4) if you wanted, for the second case you could use (5..10).inject 2, &multL The outside the parens trick only works for passing blocks to a method, no... | Understanding the behaviour of inject used with a lambda in Ruby I often plug pre-configured lambdas into enumerable methods like 'map', 'select' etc. but the behavior of 'inject' seems to be different. e.g. with mult4 = lambda {|item| item * 4 } then (5..10).map &mult4 gives me [20, 24, 28, 32, 36, 40] However, if I m... | TITLE:
Understanding the behaviour of inject used with a lambda in Ruby
QUESTION:
I often plug pre-configured lambdas into enumerable methods like 'map', 'select' etc. but the behavior of 'inject' seems to be different. e.g. with mult4 = lambda {|item| item * 4 } then (5..10).map &mult4 gives me [20, 24, 28, 32, 36, 4... | [
"ruby",
"lambda",
"inject"
] | 5 | 11 | 2,021 | 1 | 0 | 2008-09-19T14:16:41.097000 | 2008-09-19T14:22:38.290000 |
102,171 | 102,737 | Method that returns the line number for a given JTextPane position? | I'm looking for a method that computes the line number of a given text position in a JTextPane with wrapping enabled. Example: This a very very very very very very very very very very very very very very very very very very very very very very long line. This is another very very very very very very very very very very... | Try this /** * Return an int containing the wrapped line index at the given position * @param component JTextPane * @param int pos * @return int */ public int getLineNumber(JTextPane component, int pos) { int posLine; int y = 0;
try { Rectangle caretCoords = component.modelToView(pos); y = (int) caretCoords.getY(); } ... | Method that returns the line number for a given JTextPane position? I'm looking for a method that computes the line number of a given text position in a JTextPane with wrapping enabled. Example: This a very very very very very very very very very very very very very very very very very very very very very very long lin... | TITLE:
Method that returns the line number for a given JTextPane position?
QUESTION:
I'm looking for a method that computes the line number of a given text position in a JTextPane with wrapping enabled. Example: This a very very very very very very very very very very very very very very very very very very very very ... | [
"java",
"user-interface",
"swing",
"jtextpane"
] | 4 | 6 | 3,764 | 3 | 0 | 2008-09-19T14:17:22.813000 | 2008-09-19T15:20:11.180000 |
102,213 | 103,668 | Repository Pattern Implementation Experience | I am getting ready to start a new asp.net web project, and I am going to LINQ-to-SQL. I have done a little bit of work getting my data layer setup using some info I found by Mike Hadlow that uses an Interface and generics to create a Repository for each table in the database. I thought this was an interesting approach ... | I'd be tempted to suggest that whether you use concrete types or not shouldn't matter, as if your using dependency injection (castle?) to create the repositories (so you can wrap them with different caches etc) then your codebase will be none the wiser whichever way you've done it. Then just ask your DI for a repositor... | Repository Pattern Implementation Experience I am getting ready to start a new asp.net web project, and I am going to LINQ-to-SQL. I have done a little bit of work getting my data layer setup using some info I found by Mike Hadlow that uses an Interface and generics to create a Repository for each table in the database... | TITLE:
Repository Pattern Implementation Experience
QUESTION:
I am getting ready to start a new asp.net web project, and I am going to LINQ-to-SQL. I have done a little bit of work getting my data layer setup using some info I found by Mike Hadlow that uses an Interface and generics to create a Repository for each tab... | [
"c#",
"design-patterns",
"linq-to-sql",
"repository-pattern"
] | 0 | 1 | 2,701 | 2 | 0 | 2008-09-19T14:22:06.780000 | 2008-09-19T16:55:01.437000 |
102,215 | 104,073 | "Expires" in http header for static content? how-to | What is the best way to add "Expires" in http header for static content? eg. images, css, js The web server is IIS 6.0; the language is classical ASP | You could try something like this: @ECHO OFF REM --------------------------------------------------------------------------- REM Caching - sets the caching on static files in a web site REM syntax REM Caching.CMD 1 d:\sites\MySite\WWWRoot\*.CSS REM REM %1 is the WebSite ID REM %2 is the path & Wildcard - for example, d... | "Expires" in http header for static content? how-to What is the best way to add "Expires" in http header for static content? eg. images, css, js The web server is IIS 6.0; the language is classical ASP | TITLE:
"Expires" in http header for static content? how-to
QUESTION:
What is the best way to add "Expires" in http header for static content? eg. images, css, js The web server is IIS 6.0; the language is classical ASP
ANSWER:
You could try something like this: @ECHO OFF REM ------------------------------------------... | [
"http",
"iis",
"asp-classic"
] | 4 | 6 | 4,518 | 6 | 0 | 2008-09-19T14:22:16.683000 | 2008-09-19T17:52:21.267000 |
102,230 | 369,728 | Synchronize SourceSafe with SVN | Our company has a policy imposing the requirement of keeping source code in a SourceSafe repository. I've tried hard to persuade the management to migrate to SVN with no success (whcih is an another issue, anyway). As I and few of my colleagues use SVN repository placed on my computer (via Apache), I made a PowerShell ... | I'm not sure there is a good way, but one way would be to use SVN Server Hooks to perform similar actions in Source Safe using the VSS command-line tools. I think this has been discussed before on the svn-user's mailing list. You could try searching the archives here. | Synchronize SourceSafe with SVN Our company has a policy imposing the requirement of keeping source code in a SourceSafe repository. I've tried hard to persuade the management to migrate to SVN with no success (whcih is an another issue, anyway). As I and few of my colleagues use SVN repository placed on my computer (v... | TITLE:
Synchronize SourceSafe with SVN
QUESTION:
Our company has a policy imposing the requirement of keeping source code in a SourceSafe repository. I've tried hard to persuade the management to migrate to SVN with no success (whcih is an another issue, anyway). As I and few of my colleagues use SVN repository placed... | [
"svn",
"version-control",
"synchronization",
"visual-sourcesafe"
] | 4 | 2 | 936 | 4 | 0 | 2008-09-19T14:24:00.957000 | 2008-12-15T21:10:38.267000 |
102,240 | 102,277 | What's the best way to create a drop-down list in a Windows application using Visual Basic? | I'd like to add a drop-down list to a Windows application. It will have two choices, neither of which are editable. What's the best control to use? Is it a combo box with the editing property set to No? I'm using Visual Studio 2008. | I'd suggest taking a look at the Windows Vista User Experience Guide. It sounds like you might be better off with radio buttons, or, if it's an explicit on/off type of situation, using a check box. I think we'd really need more info, though. | What's the best way to create a drop-down list in a Windows application using Visual Basic? I'd like to add a drop-down list to a Windows application. It will have two choices, neither of which are editable. What's the best control to use? Is it a combo box with the editing property set to No? I'm using Visual Studio 2... | TITLE:
What's the best way to create a drop-down list in a Windows application using Visual Basic?
QUESTION:
I'd like to add a drop-down list to a Windows application. It will have two choices, neither of which are editable. What's the best control to use? Is it a combo box with the editing property set to No? I'm usi... | [
"vb.net",
"visual-studio"
] | 1 | 3 | 8,793 | 5 | 0 | 2008-09-19T14:25:53.477000 | 2008-09-19T14:29:55.153000 |
102,261 | 102,561 | IE Javascript Clicking Issue | First off, I'm working on an app that's written such that some of your typical debugging tools can't be used (or at least I can't figure out how:). JavaScript, html, etc are all "cooked" and encoded (I think; I'm a little fuzzy on how the process works) before being deployed, so I can't attach VS 2005 to ie, and firebu... | setAttribute is unreliable in IE. It treats attribute access and object property access as the same thing, so because the DOM property for the 'class' attribute is called 'className', you would have to use that instead on IE. This bug is fixed in the new IE8 beta, but it is easier simply to use the DOM Level 1 HTML pro... | IE Javascript Clicking Issue First off, I'm working on an app that's written such that some of your typical debugging tools can't be used (or at least I can't figure out how:). JavaScript, html, etc are all "cooked" and encoded (I think; I'm a little fuzzy on how the process works) before being deployed, so I can't att... | TITLE:
IE Javascript Clicking Issue
QUESTION:
First off, I'm working on an app that's written such that some of your typical debugging tools can't be used (or at least I can't figure out how:). JavaScript, html, etc are all "cooked" and encoded (I think; I'm a little fuzzy on how the process works) before being deploy... | [
"javascript",
"internet-explorer",
"click"
] | 1 | 2 | 1,008 | 6 | 0 | 2008-09-19T14:28:15.627000 | 2008-09-19T15:01:20.927000 |
102,271 | 117,746 | What uses can you think of for Perl 6's junctions? | More information from the Perl 6 Wikipedia entry Junctions Perl 6 introduces the concept of junctions: values that are composites of other values.[24] In the earliest days of Perl 6's design, these were called "superpositions", by analogy to the concept in quantum physics of quantum superpositions — waveforms that can ... | How many days are in a given month? given( $month ){ when any(qw'1 3 5 7 8 10 12') { $day = 31 } when any(qw'4 6 9 11') { $day = 30 } when 2 { $day = 29 } } | What uses can you think of for Perl 6's junctions? More information from the Perl 6 Wikipedia entry Junctions Perl 6 introduces the concept of junctions: values that are composites of other values.[24] In the earliest days of Perl 6's design, these were called "superpositions", by analogy to the concept in quantum phys... | TITLE:
What uses can you think of for Perl 6's junctions?
QUESTION:
More information from the Perl 6 Wikipedia entry Junctions Perl 6 introduces the concept of junctions: values that are composites of other values.[24] In the earliest days of Perl 6's design, these were called "superpositions", by analogy to the conce... | [
"perl"
] | 15 | 11 | 1,063 | 3 | 0 | 2008-09-19T14:29:26.403000 | 2008-09-22T21:26:42.210000 |
102,278 | 102,333 | `active' flag or not? | OK, so practically every database based application has to deal with "non-active" records. Either, soft-deletions or marking something as "to be ignored". I'm curious as to whether there are any radical alternatives thoughts on an `active' column (or a status column). For example, if I had a list of people CREATE TABLE... | You partition the table on the active flag, so that active records are in one partition, and inactive records are in the other partition. Then you create an active view for each table which automatically has the active filter on it. The database query engine automatically restricts the query to the partition that has t... | `active' flag or not? OK, so practically every database based application has to deal with "non-active" records. Either, soft-deletions or marking something as "to be ignored". I'm curious as to whether there are any radical alternatives thoughts on an `active' column (or a status column). For example, if I had a list ... | TITLE:
`active' flag or not?
QUESTION:
OK, so practically every database based application has to deal with "non-active" records. Either, soft-deletions or marking something as "to be ignored". I'm curious as to whether there are any radical alternatives thoughts on an `active' column (or a status column). For example... | [
"sql",
"mysql",
"postgresql"
] | 25 | 23 | 36,776 | 18 | 0 | 2008-09-19T14:30:22.470000 | 2008-09-19T14:36:08.290000 |
102,283 | 102,341 | What WPF C# Control is similar to a CWnd in C++? | What would be the best WPF control in C# (VS 2008) that you can place on a form that would allow you to do drawing similar to the "Paint" function for the CWnd class in C++? Also, that could display bitmaps, have a scroll bar, and the ability to accept user inputs (ie. MouseMove, Button Clicks, etc...). Basically all t... | The UIElement is the lowest level element that supports input and drawing. Although, using WPF, you really have to do a lot less manual drawing. Are you sure that you need to do this? Also, the scroll bar will never be inherit in your element. If you need scrolling behavior, just wrap your element in a ScrollViewer. | What WPF C# Control is similar to a CWnd in C++? What would be the best WPF control in C# (VS 2008) that you can place on a form that would allow you to do drawing similar to the "Paint" function for the CWnd class in C++? Also, that could display bitmaps, have a scroll bar, and the ability to accept user inputs (ie. M... | TITLE:
What WPF C# Control is similar to a CWnd in C++?
QUESTION:
What would be the best WPF control in C# (VS 2008) that you can place on a form that would allow you to do drawing similar to the "Paint" function for the CWnd class in C++? Also, that could display bitmaps, have a scroll bar, and the ability to accept ... | [
"c#",
"c++",
"wpf"
] | 1 | 2 | 871 | 2 | 0 | 2008-09-19T14:30:35.527000 | 2008-09-19T14:37:19.487000 |
102,343 | 102,373 | Including eval / bind values in OnClientClick code | I have a need to open a popup detail window from a gridview (VS 2005 / 2008). What I am trying to do is in the markup for my TemplateColumn have an asp:Button control, sort of like this: ', '','scrollbars=yes,resizable=yes, width=350, height=550');" Of course, what isn't working is the appending of the <%# Eval...%> se... | I believe the way to do it is onClientClick=<%# string.Format("window.open('PubsOrderDetails.aspx?OrderId={0}',scrollbars=yes,resizable=yes, width=350, height=550);", Eval("order_id")) %> | Including eval / bind values in OnClientClick code I have a need to open a popup detail window from a gridview (VS 2005 / 2008). What I am trying to do is in the markup for my TemplateColumn have an asp:Button control, sort of like this: ', '','scrollbars=yes,resizable=yes, width=350, height=550');" Of course, what isn... | TITLE:
Including eval / bind values in OnClientClick code
QUESTION:
I have a need to open a popup detail window from a gridview (VS 2005 / 2008). What I am trying to do is in the markup for my TemplateColumn have an asp:Button control, sort of like this: ', '','scrollbars=yes,resizable=yes, width=350, height=550');" O... | [
"asp.net",
"javascript",
"visual-studio"
] | 7 | 13 | 22,524 | 3 | 0 | 2008-09-19T14:37:22.157000 | 2008-09-19T14:41:00.133000 |
102,374 | 106,151 | How to add a version number to an Access file in a .msi | I'm building an install using VS 2003. The install has an Excel workbook and two Access databases. I need to force the Access files to load regardless of the create/mod date of the existing databases on the user's computer. I currently use ORCA to force in a Version number on the two files, but would like to find a sim... | @LanceSc I don't think MsiFileHash table will help here. See this excellent post by Aaron Stebner. Most likely last modified date of Access database on client computer will be different from its creation date. Windows Installer will correctly assume that the file has changed since installation and will not replace it. ... | How to add a version number to an Access file in a .msi I'm building an install using VS 2003. The install has an Excel workbook and two Access databases. I need to force the Access files to load regardless of the create/mod date of the existing databases on the user's computer. I currently use ORCA to force in a Versi... | TITLE:
How to add a version number to an Access file in a .msi
QUESTION:
I'm building an install using VS 2003. The install has an Excel workbook and two Access databases. I need to force the Access files to load regardless of the create/mod date of the existing databases on the user's computer. I currently use ORCA t... | [
"ms-access",
"windows-installer",
"version"
] | 1 | 2 | 1,003 | 4 | 0 | 2008-09-19T14:41:02.613000 | 2008-09-19T22:32:34.103000 |
102,377 | 103,391 | How to optimize compiling a 32 bit application in Visual C++ 2005 on a 64 bit windows sever 2008 | I have just installed a build server with a 64 bit windows server 2008 for continuous integration. The reason I choose a 64 bit server was to have more than ~3Gb of RAM. I had hopes that this machine would provide blazing fast builds. Unfortunately, the result are lacking greatly to say the least. My desktop provides f... | We use Visual C++ 2005 to compile our 32 bit application with Cygwin. I think that's the problem. I like Cygwin a lot, but it is really slow when it comes to file I/O. It helps a bit to deactivate the NTFS filesystem feature to keep track of the last file-access. To get a better speed boost port your build-script / mak... | How to optimize compiling a 32 bit application in Visual C++ 2005 on a 64 bit windows sever 2008 I have just installed a build server with a 64 bit windows server 2008 for continuous integration. The reason I choose a 64 bit server was to have more than ~3Gb of RAM. I had hopes that this machine would provide blazing f... | TITLE:
How to optimize compiling a 32 bit application in Visual C++ 2005 on a 64 bit windows sever 2008
QUESTION:
I have just installed a build server with a 64 bit windows server 2008 for continuous integration. The reason I choose a 64 bit server was to have more than ~3Gb of RAM. I had hopes that this machine would... | [
"visual-c++",
"visual-studio-2005",
"windows-server-2008",
"cygwin",
"wow64"
] | 0 | 1 | 564 | 2 | 0 | 2008-09-19T14:41:14.377000 | 2008-09-19T16:19:55.077000 |
102,382 | 102,432 | ssh-agent with passwords without spawning too many processes | I use ssh-agent with password-protected keys on Linux. Every time I log into a certain machine, I do this: eval `ssh-agent` && ssh-add This works well enough, but every time I log in and do this, I create another ssh-agent. Once in a while, I will do a killall ssh-agent to reap them. Is there a simple way to reuse the ... | have a look at Keychain. It was written b people in a similar situation to yourself. Keychain | ssh-agent with passwords without spawning too many processes I use ssh-agent with password-protected keys on Linux. Every time I log into a certain machine, I do this: eval `ssh-agent` && ssh-add This works well enough, but every time I log in and do this, I create another ssh-agent. Once in a while, I will do a killal... | TITLE:
ssh-agent with passwords without spawning too many processes
QUESTION:
I use ssh-agent with password-protected keys on Linux. Every time I log into a certain machine, I do this: eval `ssh-agent` && ssh-add This works well enough, but every time I log in and do this, I create another ssh-agent. Once in a while, ... | [
"linux",
"ssh"
] | 6 | 5 | 5,589 | 4 | 0 | 2008-09-19T14:41:39.913000 | 2008-09-19T14:47:18.153000 |
102,384 | 103,590 | Using Vim's tabs like buffers | I have looked at the ability to use tabs in Vim (with:tabe,:tabnew, etc.) as a replacement for my current practice of having many files open in the same window in hidden buffers. I would like every distinct file that I have open to always be in its own tab. However, there are some things that get in the way of this. Ho... | Stop, stop, stop. This is not how Vim's tabs are designed to be used. In fact, they're misnamed. A better name would be "viewport" or "layout", because that's what a tab is—it's a different layout of windows of all of your existing buffers. Trying to beat Vim into 1 tab == 1 buffer is an exercise in futility. Vim doesn... | Using Vim's tabs like buffers I have looked at the ability to use tabs in Vim (with:tabe,:tabnew, etc.) as a replacement for my current practice of having many files open in the same window in hidden buffers. I would like every distinct file that I have open to always be in its own tab. However, there are some things t... | TITLE:
Using Vim's tabs like buffers
QUESTION:
I have looked at the ability to use tabs in Vim (with:tabe,:tabnew, etc.) as a replacement for my current practice of having many files open in the same window in hidden buffers. I would like every distinct file that I have open to always be in its own tab. However, there... | [
"vim",
"editor",
"tabs"
] | 390 | 694 | 169,144 | 11 | 0 | 2008-09-19T14:42:04.827000 | 2008-09-19T16:44:57.077000 |
102,394 | 102,443 | Sorting a dict on __iter__ | I am trying to sort a dict based on its key and return an iterator to the values from within an overridden iter method in a class. Is there a nicer and more efficient way of doing this than creating a new list, inserting into the list as I sort through the keys? | How about something like this: def itersorted(d): for key in sorted(d): yield d[key] | Sorting a dict on __iter__ I am trying to sort a dict based on its key and return an iterator to the values from within an overridden iter method in a class. Is there a nicer and more efficient way of doing this than creating a new list, inserting into the list as I sort through the keys? | TITLE:
Sorting a dict on __iter__
QUESTION:
I am trying to sort a dict based on its key and return an iterator to the values from within an overridden iter method in a class. Is there a nicer and more efficient way of doing this than creating a new list, inserting into the list as I sort through the keys?
ANSWER:
How... | [
"python",
"optimization",
"refactoring"
] | 5 | 9 | 854 | 4 | 0 | 2008-09-19T14:43:24.777000 | 2008-09-19T14:49:06.933000 |
102,396 | 1,037,621 | What are some good usability addins for Visual Studio 2008? | I've been using Visual Studio for a long time and the constant shuffling of the code tabs at the top drives me bonkers. I was wondering if there were any add-ins that might change this or other UI behavior. Things that might be cool: Sticky Tabs that won't go away. Multi-code file collapsible tabs (maybe each tab being... | Rick, Tabs Studio add-in for Visual Studio is a replacement for built-in tabs. Multiple rows of tabs make them always visible. Tabs can be grouped, it is probably close to what you call "multi-code file tabs". See Tabs Studio home page for more information. | What are some good usability addins for Visual Studio 2008? I've been using Visual Studio for a long time and the constant shuffling of the code tabs at the top drives me bonkers. I was wondering if there were any add-ins that might change this or other UI behavior. Things that might be cool: Sticky Tabs that won't go ... | TITLE:
What are some good usability addins for Visual Studio 2008?
QUESTION:
I've been using Visual Studio for a long time and the constant shuffling of the code tabs at the top drives me bonkers. I was wondering if there were any add-ins that might change this or other UI behavior. Things that might be cool: Sticky T... | [
"visual-studio",
"visual-studio-2008",
"user-interface",
"tabs"
] | 0 | 1 | 359 | 2 | 0 | 2008-09-19T14:43:42.903000 | 2009-06-24T10:46:30.370000 |
102,398 | 102,434 | Priority queue in .Net | I am looking for a.NET implementation of a priority queue or heap data structure Priority queues are data structures that provide more flexibility than simple sorting, because they allow new elements to enter a system at arbitrary intervals. It is much more cost-effective to insert a new job into a priority queue than ... | I like using the OrderedBag and OrderedSet classes in PowerCollections as priority queues. | Priority queue in .Net I am looking for a.NET implementation of a priority queue or heap data structure Priority queues are data structures that provide more flexibility than simple sorting, because they allow new elements to enter a system at arbitrary intervals. It is much more cost-effective to insert a new job into... | TITLE:
Priority queue in .Net
QUESTION:
I am looking for a.NET implementation of a priority queue or heap data structure Priority queues are data structures that provide more flexibility than simple sorting, because they allow new elements to enter a system at arbitrary intervals. It is much more cost-effective to ins... | [
"c#",
".net",
"data-structures",
"heap",
"priority-queue"
] | 244 | 47 | 246,973 | 12 | 0 | 2008-09-19T14:43:54.277000 | 2008-09-19T14:48:02.973000 |
102,425 | 102,545 | Protect embedded password | I have a properties file in java, in which I store all information of my app, like logo image filename, database name, database user and database password. I can store the password encrypted on the properties file. But, the key or passphrase can be read out of the jar using a decompiler. Is there a way to store the db ... | There are multiple ways to manage this. If you can figure out a way to have a user provide a password for a keystore when the application starts up the most appropriate way would be to encrypt all the values using a key, and store this key in the keystore. The command line interface to the keystore is by using keytool.... | Protect embedded password I have a properties file in java, in which I store all information of my app, like logo image filename, database name, database user and database password. I can store the password encrypted on the properties file. But, the key or passphrase can be read out of the jar using a decompiler. Is th... | TITLE:
Protect embedded password
QUESTION:
I have a properties file in java, in which I store all information of my app, like logo image filename, database name, database user and database password. I can store the password encrypted on the properties file. But, the key or passphrase can be read out of the jar using a... | [
"java",
"security",
"passwords",
"embedded-resource",
"copy-protection"
] | 8 | 4 | 1,814 | 6 | 0 | 2008-09-19T14:46:28.513000 | 2008-09-19T14:59:39.373000 |
102,427 | 102,556 | Viewing, pausing and killing threads in a running .Net application | I'm working on a.Net applications with multiple threads doing all sorts of things. When something goes wrong in production I want to be able to see which threads are running (by their managed name) and also be able to pause / kill them. Anyway to achieve this? VS isn't always available (although a good option when is),... | There's nothing built in to.net that will do this. If you want to programmatically iterate through your active threads, you have to register them somewhere on launch and either unregister them on completion or filter them before you act on them. We did a version of this and it requires a non-trivial amount of work. | Viewing, pausing and killing threads in a running .Net application I'm working on a.Net applications with multiple threads doing all sorts of things. When something goes wrong in production I want to be able to see which threads are running (by their managed name) and also be able to pause / kill them. Anyway to achiev... | TITLE:
Viewing, pausing and killing threads in a running .Net application
QUESTION:
I'm working on a.Net applications with multiple threads doing all sorts of things. When something goes wrong in production I want to be able to see which threads are running (by their managed name) and also be able to pause / kill them... | [
".net",
"multithreading"
] | 4 | 2 | 1,994 | 5 | 0 | 2008-09-19T14:46:46.640000 | 2008-09-19T15:00:54.657000 |
102,457 | 105,636 | How to create an SVG "tooltip"-like box? | Given an existing valid SVG document, what's the best way to create "informational popups", so that when you hover or click on certain elements (let's say ) you popup a box with an arbitrary amount (i.e. not just a single line tooltip) of extra information? This should display correctly at least in Firefox and be invis... | Mouse over me! Change me Further explanation can be found here. | How to create an SVG "tooltip"-like box? Given an existing valid SVG document, what's the best way to create "informational popups", so that when you hover or click on certain elements (let's say ) you popup a box with an arbitrary amount (i.e. not just a single line tooltip) of extra information? This should display c... | TITLE:
How to create an SVG "tooltip"-like box?
QUESTION:
Given an existing valid SVG document, what's the best way to create "informational popups", so that when you hover or click on certain elements (let's say ) you popup a box with an arbitrary amount (i.e. not just a single line tooltip) of extra information? Thi... | [
"popup",
"svg",
"tooltip"
] | 44 | 26 | 69,292 | 4 | 0 | 2008-09-19T14:50:13.967000 | 2008-09-19T21:07:58.083000 |
102,459 | 102,529 | Why does std::stack use std::deque by default? | Since the only operations required for a container to be used in a stack are: back() push_back() pop_back() Why is the default container for it a deque instead of a vector? Don't deque reallocations give a buffer of elements before front() so that push_front() is an efficient operation? Aren't these elements wasted sin... | As the container grows, a reallocation for a vector requires copying all the elements into the new block of memory. Growing a deque allocates a new block and links it to the list of blocks - no copies are required. Of course you can specify that a different backing container be used if you like. So if you have a stack ... | Why does std::stack use std::deque by default? Since the only operations required for a container to be used in a stack are: back() push_back() pop_back() Why is the default container for it a deque instead of a vector? Don't deque reallocations give a buffer of elements before front() so that push_front() is an effici... | TITLE:
Why does std::stack use std::deque by default?
QUESTION:
Since the only operations required for a container to be used in a stack are: back() push_back() pop_back() Why is the default container for it a deque instead of a vector? Don't deque reallocations give a buffer of elements before front() so that push_fr... | [
"c++",
"stl",
"containers"
] | 115 | 90 | 18,371 | 2 | 0 | 2008-09-19T14:50:23.840000 | 2008-09-19T14:58:03.760000 |
102,464 | 102,528 | Web Access to Virtual Machine | Is their a way to access a web server such as windows server 2003 installed on a virtual box such as vmware from the host machine? | If VMware is set to use bridged networking, then each guest OS effectively has its own IP address, like brien said, you just point your browser to that address. | Web Access to Virtual Machine Is their a way to access a web server such as windows server 2003 installed on a virtual box such as vmware from the host machine? | TITLE:
Web Access to Virtual Machine
QUESTION:
Is their a way to access a web server such as windows server 2003 installed on a virtual box such as vmware from the host machine?
ANSWER:
If VMware is set to use bridged networking, then each guest OS effectively has its own IP address, like brien said, you just point y... | [
"windows-server-2003",
"vmware",
"virtualization",
"vmware-server"
] | 2 | 5 | 2,347 | 7 | 0 | 2008-09-19T14:50:51.453000 | 2008-09-19T14:57:24.027000 |
102,468 | 102,676 | Algorithm Issue: letter combinations | I'm trying to write a piece of code that will do the following: Take the numbers 0 to 9 and assign one or more letters to this number. For example: 0 = N, 1 = L, 2 = T, 3 = D, 4 = R, 5 = V or F, 6 = B or P, 7 = Z, 8 = H or CH or J, 9 = G When I have a code like 0123, it's an easy job to encode it. It will obviously mak... | The general structure you want to hold your number -> letter assignments is an array or arrays, similar to: // 0 = N, 1 = L, 2 = T, 3 = D, 4 = R, 5 = V or F, 6 = B or P, 7 = Z, // 8 = H or CH or J, 9 = G $numberMap = new Array ( 0 => new Array("N"), 1 => new Array("L"), 2 => new Array("T"), 3 => new Array("D"), 4 => ne... | Algorithm Issue: letter combinations I'm trying to write a piece of code that will do the following: Take the numbers 0 to 9 and assign one or more letters to this number. For example: 0 = N, 1 = L, 2 = T, 3 = D, 4 = R, 5 = V or F, 6 = B or P, 7 = Z, 8 = H or CH or J, 9 = G When I have a code like 0123, it's an easy jo... | TITLE:
Algorithm Issue: letter combinations
QUESTION:
I'm trying to write a piece of code that will do the following: Take the numbers 0 to 9 and assign one or more letters to this number. For example: 0 = N, 1 = L, 2 = T, 3 = D, 4 = R, 5 = V or F, 6 = B or P, 7 = Z, 8 = H or CH or J, 9 = G When I have a code like 012... | [
"algorithm",
"unique",
"combinations"
] | 6 | 2 | 6,049 | 9 | 0 | 2008-09-19T14:51:37.317000 | 2008-09-19T15:14:28.697000 |
102,470 | 102,691 | Linq to SQL Association combo box order | This is kind of a weird question and more of an annoyance than technical brick wall. When I'm adding tables and such using the Linq-to-SQL designer and I want to create an association using the dialogs. I right click on one of the target tables and choose Add > Association as normal and I am presented with the Associat... | I went poking around some and found an answer. The dbml file is an XML file that hold all of the basic information about the SQL tables, connections, etc. needed for Linq-to-SQL. By reordering the Table elements, you affect the order of the combo boxes used in the Association editor. | Linq to SQL Association combo box order This is kind of a weird question and more of an annoyance than technical brick wall. When I'm adding tables and such using the Linq-to-SQL designer and I want to create an association using the dialogs. I right click on one of the target tables and choose Add > Association as nor... | TITLE:
Linq to SQL Association combo box order
QUESTION:
This is kind of a weird question and more of an annoyance than technical brick wall. When I'm adding tables and such using the Linq-to-SQL designer and I want to create an association using the dialogs. I right click on one of the target tables and choose Add > ... | [
"visual-studio-2008",
"linq-to-sql",
"ide"
] | 0 | 1 | 741 | 1 | 0 | 2008-09-19T14:51:40.623000 | 2008-09-19T15:16:35.073000 |
102,472 | 119,683 | Subversion branch reintegration | When a branch is reintegrated to the trunk, is that branch effectively dead? Can you make modifications to the branch after the reintegration and merge those back into the trunk at a later date? | You can do it technically, you branch is not dead nor disabled, but it is not recommended to merge from branch to trunk after reintegration. You can find a full discussion about the reason for that, here: Subversion merge reintegrate Basically, it says, that it is possible to merge your changes again to the trunk, but ... | Subversion branch reintegration When a branch is reintegrated to the trunk, is that branch effectively dead? Can you make modifications to the branch after the reintegration and merge those back into the trunk at a later date? | TITLE:
Subversion branch reintegration
QUESTION:
When a branch is reintegrated to the trunk, is that branch effectively dead? Can you make modifications to the branch after the reintegration and merge those back into the trunk at a later date?
ANSWER:
You can do it technically, you branch is not dead nor disabled, bu... | [
"svn",
"merge",
"branch"
] | 69 | 80 | 55,484 | 10 | 0 | 2008-09-19T14:51:49.033000 | 2008-09-23T07:53:28.240000 |
102,474 | 102,530 | Is there a means to produce a changelog in SVN | When commiting to SVN I can add a top level commit message to detail what is being committed, but I would ideally like a means to comment on the individual files and what has changed within them. I have seen something similar in previous employment, but this was using CVS (and I can't recall whether this was achieved w... | I would just do this in the individual commit message. TortoiseSVN has filename autocompletion so that greatly aids in this. Another thing you could do is svn st before you commit and copy/paste the filenames into your commit message. Oh, and be sure to strongly question the value of this. I know some OSS projects (lin... | Is there a means to produce a changelog in SVN When commiting to SVN I can add a top level commit message to detail what is being committed, but I would ideally like a means to comment on the individual files and what has changed within them. I have seen something similar in previous employment, but this was using CVS ... | TITLE:
Is there a means to produce a changelog in SVN
QUESTION:
When commiting to SVN I can add a top level commit message to detail what is being committed, but I would ideally like a means to comment on the individual files and what has changed within them. I have seen something similar in previous employment, but t... | [
"svn",
"cvs",
"changelog"
] | 3 | 2 | 891 | 5 | 0 | 2008-09-19T14:52:16.037000 | 2008-09-19T14:58:34.180000 |
102,477 | 102,787 | Explain Plan Cost vs Execution Time | Before, I have found the "Cost" in the execution plan to be a good indicator of relative execution time. Why is this case different? Am I a fool for thinking the execution plan has relevance? What specifically can I try to improve v_test performance? Thank you. Using Oracle 10g I have a simple query view defined below ... | As the Oracle documentation says, the cost is the estimated cost relative to a particular execution plan. When you tweak the query, the particular execution plan that costs are calculated relative to can change. Sometimes dramatically. The problem with v_test's performance is that Oracle can think of no way to execute ... | Explain Plan Cost vs Execution Time Before, I have found the "Cost" in the execution plan to be a good indicator of relative execution time. Why is this case different? Am I a fool for thinking the execution plan has relevance? What specifically can I try to improve v_test performance? Thank you. Using Oracle 10g I hav... | TITLE:
Explain Plan Cost vs Execution Time
QUESTION:
Before, I have found the "Cost" in the execution plan to be a good indicator of relative execution time. Why is this case different? Am I a fool for thinking the execution plan has relevance? What specifically can I try to improve v_test performance? Thank you. Usin... | [
"oracle",
"optimization"
] | 4 | 3 | 24,918 | 6 | 0 | 2008-09-19T14:52:35.847000 | 2008-09-19T15:23:35.663000 |
102,483 | 102,613 | ASP.Net: User controls added to placeholder dynamically cannot retrieve values | I am adding some user controls dynamically to a PlaceHolder server control. My user control consists of some labels and some textbox controls. When I submit the form and try to view the contents of the textboxes (within each user control) on the server, they are empty. When the postback completes, the textboxes have th... | This is based on.NET v1 event sequence, but it should give you the idea: Initialize (Init event) Begin Tracking View State (checks if postback) Load View State (if postback) Load Postback Data (if postback) Load (Load event) Raise Changed Events (if postback) Raise Postback Events (if postback) PreRender (PreRender eve... | ASP.Net: User controls added to placeholder dynamically cannot retrieve values I am adding some user controls dynamically to a PlaceHolder server control. My user control consists of some labels and some textbox controls. When I submit the form and try to view the contents of the textboxes (within each user control) on... | TITLE:
ASP.Net: User controls added to placeholder dynamically cannot retrieve values
QUESTION:
I am adding some user controls dynamically to a PlaceHolder server control. My user control consists of some labels and some textbox controls. When I submit the form and try to view the contents of the textboxes (within eac... | [
"asp.net",
"postback",
"user-controls"
] | 8 | 9 | 17,793 | 8 | 0 | 2008-09-19T14:53:15.660000 | 2008-09-19T15:07:26.357000 |
102,496 | 103,117 | Compatible encryption between C# and PHP, ColdFusion, Ruby, Python | We're developing a service that will accept a POST request. Some of the POST data will need to be encrypted before the POST as it will be stored in hidden fields on a form. The application is written in C#, but we want third party clients to be able to easily integrate with it. We find that most clients use PHP, Classi... | Assuming that you have a safe way of sharing a key (whether RSA encryption of it, retrieval over an SSH or HTTPS link, or callling the other developer on a secured phone line), any of the major modern encryptions (like AES, as mentioned by @Ed Haber) would be suitable. I would second his suggestion of AES. There should... | Compatible encryption between C# and PHP, ColdFusion, Ruby, Python We're developing a service that will accept a POST request. Some of the POST data will need to be encrypted before the POST as it will be stored in hidden fields on a form. The application is written in C#, but we want third party clients to be able to ... | TITLE:
Compatible encryption between C# and PHP, ColdFusion, Ruby, Python
QUESTION:
We're developing a service that will accept a POST request. Some of the POST data will need to be encrypted before the POST as it will be stored in hidden fields on a form. The application is written in C#, but we want third party clie... | [
"scala",
"c#",
"php",
"ruby",
"encryption"
] | 7 | 4 | 7,159 | 8 | 0 | 2008-09-19T14:54:19.010000 | 2008-09-19T15:48:43.670000 |
102,514 | 103,283 | Creating IDL for MAPI-MIME conversion | I'm trying to create the IDL for the IConverterSession interface and I'm confused by the definition of the MIMETOMAPI method. It specifies the LPMESSAGE pmsg parameter as [out] yet the comments state its the pointer to the MAPI message to be loaded. Its unclear to me whether the functions allocates the MAPI message obj... | I think in this case the documentation is misleading when it marks the parameter as [out]. You have to pass a valid LPMESSAGE to the method, and that's why is not a double pointer. So i would go with [in] on your idl definition. | Creating IDL for MAPI-MIME conversion I'm trying to create the IDL for the IConverterSession interface and I'm confused by the definition of the MIMETOMAPI method. It specifies the LPMESSAGE pmsg parameter as [out] yet the comments state its the pointer to the MAPI message to be loaded. Its unclear to me whether the fu... | TITLE:
Creating IDL for MAPI-MIME conversion
QUESTION:
I'm trying to create the IDL for the IConverterSession interface and I'm confused by the definition of the MIMETOMAPI method. It specifies the LPMESSAGE pmsg parameter as [out] yet the comments state its the pointer to the MAPI message to be loaded. Its unclear to... | [
"vb6",
"outlook",
"mime",
"mapi",
"idl"
] | 3 | 2 | 585 | 3 | 0 | 2008-09-19T14:56:11.267000 | 2008-09-19T16:06:03.877000 |
102,521 | 102,834 | How do I work with quarters (quarterly dates) in ASP.Net using VB.Net 2.0? | I know that Sql Server has some handy built-in quarterly stuff, but what about the.Net native DateTime object? What is the best way to add, subtract, and traverse quarters? Is it a bad thing ™ to use the VB-specific DateAdd() function? e.g.: Dim nextQuarter As DateTime = DateAdd(DateInterval.Quarter, 1, DateTime.Now) E... | I know you can calculate the quarter of a date by: Dim quarter As Integer = (someDate.Month - 1) \ 3 + 1 If you're using Visual Studio 2008, you could try bolting additional functionality on to the DateTime class by taking a look at Extension Methods. | How do I work with quarters (quarterly dates) in ASP.Net using VB.Net 2.0? I know that Sql Server has some handy built-in quarterly stuff, but what about the.Net native DateTime object? What is the best way to add, subtract, and traverse quarters? Is it a bad thing ™ to use the VB-specific DateAdd() function? e.g.: Dim... | TITLE:
How do I work with quarters (quarterly dates) in ASP.Net using VB.Net 2.0?
QUESTION:
I know that Sql Server has some handy built-in quarterly stuff, but what about the.Net native DateTime object? What is the best way to add, subtract, and traverse quarters? Is it a bad thing ™ to use the VB-specific DateAdd() f... | [
"vb.net",
"datetime",
".net-2.0",
"date"
] | 4 | 10 | 14,265 | 5 | 0 | 2008-09-19T14:56:36.320000 | 2008-09-19T15:26:34.487000 |
102,531 | 104,760 | Multiple file inputs? | Within an XSLT document, is it possible to loop over a set of files in the current directory? I have a situation where I have a directory full of xml files that need some analysis done to generate a report. I have my stylesheet operating on a single document fine, but I'd like to extend that without going to another to... | In XSLT 2.0, and with Saxon, you can do this with the collection() function: See http://www.saxonica.com/documentation/sourcedocs/collections.html for more details. In XSLT 1.0, you have to create an index that lists the documents you want to process with a separate tool. Your environment may provide such a tool; for e... | Multiple file inputs? Within an XSLT document, is it possible to loop over a set of files in the current directory? I have a situation where I have a directory full of xml files that need some analysis done to generate a report. I have my stylesheet operating on a single document fine, but I'd like to extend that witho... | TITLE:
Multiple file inputs?
QUESTION:
Within an XSLT document, is it possible to loop over a set of files in the current directory? I have a situation where I have a directory full of xml files that need some analysis done to generate a report. I have my stylesheet operating on a single document fine, but I'd like to... | [
"xml",
"xslt",
"io"
] | 6 | 8 | 9,786 | 6 | 0 | 2008-09-19T14:58:35.957000 | 2008-09-19T19:22:52.797000 |
102,535 | 102,632 | What can you use generator functions for? | I'm starting to learn Python and I've come across generator functions, those that have a yield statement in them. I want to know what types of problems that these functions are really good at solving. | Generators give you lazy evaluation. You use them by iterating over them, either explicitly with 'for' or implicitly by passing it to any function or construct that iterates. You can think of generators as returning multiple items, as if they return a list, but instead of returning them all at once they return them one... | What can you use generator functions for? I'm starting to learn Python and I've come across generator functions, those that have a yield statement in them. I want to know what types of problems that these functions are really good at solving. | TITLE:
What can you use generator functions for?
QUESTION:
I'm starting to learn Python and I've come across generator functions, those that have a yield statement in them. I want to know what types of problems that these functions are really good at solving.
ANSWER:
Generators give you lazy evaluation. You use them ... | [
"python",
"generator"
] | 240 | 270 | 104,291 | 16 | 0 | 2008-09-19T14:58:49.343000 | 2008-09-19T15:09:25.340000 |
102,558 | 114,186 | Biggest advantage to using ASP.Net MVC vs web forms | What are some of the advantages of using one over the other? | The main advantages of ASP.net MVC are: Enables the full control over the rendered HTML. Provides clean separation of concerns(SoC). Enables Test Driven Development (TDD). Easy integration with JavaScript frameworks. Following the design of stateless nature of the web. RESTful urls that enables SEO. No ViewState and Po... | Biggest advantage to using ASP.Net MVC vs web forms What are some of the advantages of using one over the other? | TITLE:
Biggest advantage to using ASP.Net MVC vs web forms
QUESTION:
What are some of the advantages of using one over the other?
ANSWER:
The main advantages of ASP.net MVC are: Enables the full control over the rendered HTML. Provides clean separation of concerns(SoC). Enables Test Driven Development (TDD). Easy int... | [
"asp.net",
"asp.net-mvc"
] | 164 | 165 | 284,013 | 19 | 0 | 2008-09-19T15:01:12.973000 | 2008-09-22T10:39:29.613000 |
102,567 | 102,583 | How to shut down the computer from C# | What's the best way to shut down the computer from a C# program? I've found a few methods that work - I'll post them below - but none of them are very elegant. I'm looking for something that's simpler and natively.net. | Taken from: a Geekpedia post This method uses WMI to shutdown windows. You'll need to add a reference to System.Management to your project to use this. using System.Management;
void Shutdown() { ManagementBaseObject mboShutdown = null; ManagementClass mcWin32 = new ManagementClass("Win32_OperatingSystem"); mcWin32.Get... | How to shut down the computer from C# What's the best way to shut down the computer from a C# program? I've found a few methods that work - I'll post them below - but none of them are very elegant. I'm looking for something that's simpler and natively.net. | TITLE:
How to shut down the computer from C#
QUESTION:
What's the best way to shut down the computer from a C# program? I've found a few methods that work - I'll post them below - but none of them are very elegant. I'm looking for something that's simpler and natively.net.
ANSWER:
Taken from: a Geekpedia post This me... | [
"c#",
".net",
"windows",
"shutdown"
] | 159 | 86 | 270,692 | 17 | 0 | 2008-09-19T15:02:26.650000 | 2008-09-19T15:04:18.580000 |
102,568 | 102,636 | What is a double underscore in Perl? | I'm trying to understand someone else's Perl code without knowing much Perl myself. I would appreciate your help. I've encountered a Perl function along these lines: MyFunction($arg1,$arg2__size,$arg3) Is there a meaning to the double-underscore syntax in $arg2, or is it just part of the name of the second argument? | There is no specific meaning to the use of a __ inside of a perl variable name. It's likely programmer preference, especially in the case that you've cited in your question. You can see more information about perl variable naming here. | What is a double underscore in Perl? I'm trying to understand someone else's Perl code without knowing much Perl myself. I would appreciate your help. I've encountered a Perl function along these lines: MyFunction($arg1,$arg2__size,$arg3) Is there a meaning to the double-underscore syntax in $arg2, or is it just part o... | TITLE:
What is a double underscore in Perl?
QUESTION:
I'm trying to understand someone else's Perl code without knowing much Perl myself. I would appreciate your help. I've encountered a Perl function along these lines: MyFunction($arg1,$arg2__size,$arg3) Is there a meaning to the double-underscore syntax in $arg2, or... | [
"perl",
"syntax"
] | 5 | 11 | 3,195 | 7 | 0 | 2008-09-19T15:02:28.727000 | 2008-09-19T15:09:46.150000 |
102,587 | 102,723 | ASP.NET Control/Page Library Question | I'm working on a drop in assembly that has predefined pages and usable controls. I am having no difficulties with creating server controls, but I'm wondering what the "best practices" are with dealing with pages in an assembly. Can you compile a page into an assembly and release it as just a dll? How would this be acce... | Your best bet if you want to be able to code it and treat it like a real page is to implement a VirtualPathProvider. Using a virtualpathprovider would allow you to embed the actual aspx as a resource (or put it in a database, whatever) and serve it from there, and still use the asp.net page compilation engine. This wou... | ASP.NET Control/Page Library Question I'm working on a drop in assembly that has predefined pages and usable controls. I am having no difficulties with creating server controls, but I'm wondering what the "best practices" are with dealing with pages in an assembly. Can you compile a page into an assembly and release it... | TITLE:
ASP.NET Control/Page Library Question
QUESTION:
I'm working on a drop in assembly that has predefined pages and usable controls. I am having no difficulties with creating server controls, but I'm wondering what the "best practices" are with dealing with pages in an assembly. Can you compile a page into an assem... | [
"asp.net"
] | 1 | 2 | 167 | 2 | 0 | 2008-09-19T15:04:44.477000 | 2008-09-19T15:19:42.087000 |
102,591 | 102,706 | SQL strip text and convert to integer | In my database (SQL 2005) I have a field which holds a comment but in the comment I have an id and I would like to strip out just the id, and IF possible convert it to an int: activation successful of id 1010101 The line above is the exact structure of the data in the db field. And no I don't want to do this in the cod... | This should do the trick: SELECT SUBSTRING(column, PATINDEX('%[0-9]%', column), 999) FROM table Based on your sample data, this that there is only one occurence of an integer in the string and that it is at the end. | SQL strip text and convert to integer In my database (SQL 2005) I have a field which holds a comment but in the comment I have an id and I would like to strip out just the id, and IF possible convert it to an int: activation successful of id 1010101 The line above is the exact structure of the data in the db field. And... | TITLE:
SQL strip text and convert to integer
QUESTION:
In my database (SQL 2005) I have a field which holds a comment but in the comment I have an id and I would like to strip out just the id, and IF possible convert it to an int: activation successful of id 1010101 The line above is the exact structure of the data in... | [
"sql",
"text",
"strip"
] | 2 | 1 | 6,008 | 7 | 0 | 2008-09-19T15:04:51.997000 | 2008-09-19T15:18:04.693000 |
102,600 | 117,903 | Learning Anaysis Services | Can anyone recommend a good resource -- book, website, article, etc -- to help me learn SQL Server Analysis services. I have no knowledge of this technology right now but I do constantly work with SQL server in the traditional sense. I want to learn about Cubes and Using Reporting Services with it. I want to start from... | Take a look Here for a list of AS resources I compiled in answer to a similar question. | Learning Anaysis Services Can anyone recommend a good resource -- book, website, article, etc -- to help me learn SQL Server Analysis services. I have no knowledge of this technology right now but I do constantly work with SQL server in the traditional sense. I want to learn about Cubes and Using Reporting Services wit... | TITLE:
Learning Anaysis Services
QUESTION:
Can anyone recommend a good resource -- book, website, article, etc -- to help me learn SQL Server Analysis services. I have no knowledge of this technology right now but I do constantly work with SQL server in the traditional sense. I want to learn about Cubes and Using Repo... | [
"sql-server",
"reporting-services",
"ssas",
"cubes"
] | 3 | 4 | 365 | 4 | 0 | 2008-09-19T15:05:25.193000 | 2008-09-22T21:59:23.457000 |
102,605 | 102,670 | Can I perform a DNS lookup (hostname to IP address) using client-side Javascript? | I would like to use client-side Javascript to perform a DNS lookup (hostname to IP address) as seen from the client's computer. Is that possible? | There's no notion of hosts or ip-addresses in the javascript standard library. So you'll have to access some external service to look up hostnames for you. I recommend hosting a cgi-bin which looks up the ip-address of a hostname and access that via javascript. | Can I perform a DNS lookup (hostname to IP address) using client-side Javascript? I would like to use client-side Javascript to perform a DNS lookup (hostname to IP address) as seen from the client's computer. Is that possible? | TITLE:
Can I perform a DNS lookup (hostname to IP address) using client-side Javascript?
QUESTION:
I would like to use client-side Javascript to perform a DNS lookup (hostname to IP address) as seen from the client's computer. Is that possible?
ANSWER:
There's no notion of hosts or ip-addresses in the javascript stan... | [
"javascript",
"dns"
] | 115 | 40 | 174,335 | 16 | 0 | 2008-09-19T15:06:16.250000 | 2008-09-19T15:13:49.867000 |
102,614 | 102,622 | Shape of a Winforms MessageBox | I am looking for a way to have some control over the shape of a simple MessageBox in Winforms. I would like to control where the passed in text wraps so that the dialog rect is narrower. Windows seems to want to make the dialog as wide as possible before wrapping the text. Is there an easy way to control the maximum wi... | You can embed newlines in the text to force it to wrap at a certain point. e.g. "message text...\nmore text..." update: I posted that thinking it was a win32 API question, but I think the principle should still apply. I assume WinForms eventually calls MessageBox(). | Shape of a Winforms MessageBox I am looking for a way to have some control over the shape of a simple MessageBox in Winforms. I would like to control where the passed in text wraps so that the dialog rect is narrower. Windows seems to want to make the dialog as wide as possible before wrapping the text. Is there an eas... | TITLE:
Shape of a Winforms MessageBox
QUESTION:
I am looking for a way to have some control over the shape of a simple MessageBox in Winforms. I would like to control where the passed in text wraps so that the dialog rect is narrower. Windows seems to want to make the dialog as wide as possible before wrapping the tex... | [
"c#",
"winforms"
] | 1 | 2 | 1,357 | 5 | 0 | 2008-09-19T15:07:32.723000 | 2008-09-19T15:08:44.483000 |
102,623 | 102,752 | How would you get the Sql Command objects for a Given TableAdaptor and SqlDataAdaptor in C# (.NET 2.0) | I am creating a generic error handling / logging class for our applications. The goal is to log the exception info, info about the class and function (as well as parameters) and if relevant, the information about the System.Data.SqlClient.SqlCommand object. I would like to be able to handle passing in SqlCommands, Tabl... | Is this what you're talking about? SqlDataAdapter da = new SqlDataAdapter(); var cmd1 = ((IDbDataAdapter)da).DeleteCommand; var cmd2 = ((IDbDataAdapter)da).UpdateCommand; var cmd3 = ((IDbDataAdapter)da).SelectCommand; var cmd4 = ((IDbDataAdapter)da).InsertCommand; The SqlDataAdapter implements IDbDataAdapter, which has... | How would you get the Sql Command objects for a Given TableAdaptor and SqlDataAdaptor in C# (.NET 2.0) I am creating a generic error handling / logging class for our applications. The goal is to log the exception info, info about the class and function (as well as parameters) and if relevant, the information about the ... | TITLE:
How would you get the Sql Command objects for a Given TableAdaptor and SqlDataAdaptor in C# (.NET 2.0)
QUESTION:
I am creating a generic error handling / logging class for our applications. The goal is to log the exception info, info about the class and function (as well as parameters) and if relevant, the info... | [
"c#",
"sql",
"exception",
"reflection",
"error-handling"
] | 0 | 0 | 306 | 1 | 0 | 2008-09-19T15:08:58.350000 | 2008-09-19T15:21:34.623000 |
102,640 | 102,755 | CSS Margin Collapsing | So essentially does margin collapsing occur when you don't set any margin or padding or border to a given div element? | No. When you have two adjacent vertical margins, the greater of the two is used and the other is ignored. So, for instance, if you have two block-display elements, A, followed by B beneath it, and A has a bottom-margin of 3em, while B has a top-margin of 2em, then the distance between them will be 3em. If you set a bor... | CSS Margin Collapsing So essentially does margin collapsing occur when you don't set any margin or padding or border to a given div element? | TITLE:
CSS Margin Collapsing
QUESTION:
So essentially does margin collapsing occur when you don't set any margin or padding or border to a given div element?
ANSWER:
No. When you have two adjacent vertical margins, the greater of the two is used and the other is ignored. So, for instance, if you have two block-displa... | [
"css",
"margin"
] | 26 | 76 | 18,610 | 2 | 0 | 2008-09-19T15:10:09.020000 | 2008-09-19T15:21:41.940000 |
102,647 | 102,710 | How should I move queued messages from IIS to Exchange on different servers? | We currently have a company email server with Exchange, and a bulk email processing server that is using IIS SMTP. We are upgrading to a 3rd party MTA (zrinity xms) for bulk sending. I need to be able to keep sending the messages already queued for IIS when we switch to the 3rd party sofware. Can I simply move the IIS ... | You should be able to move the *.eml files to the Exchange server's pickup directory. Or set the IIS SMTP service to smart host to the new MTA, assuming they (the 3rd party) allow SMTP relay from your IP address. | How should I move queued messages from IIS to Exchange on different servers? We currently have a company email server with Exchange, and a bulk email processing server that is using IIS SMTP. We are upgrading to a 3rd party MTA (zrinity xms) for bulk sending. I need to be able to keep sending the messages already queue... | TITLE:
How should I move queued messages from IIS to Exchange on different servers?
QUESTION:
We currently have a company email server with Exchange, and a bulk email processing server that is using IIS SMTP. We are upgrading to a 3rd party MTA (zrinity xms) for bulk sending. I need to be able to keep sending the mess... | [
"iis",
"email",
"smtp",
"exchange-server"
] | 2 | 3 | 1,753 | 2 | 0 | 2008-09-19T15:11:27.223000 | 2008-09-19T15:18:39.450000 |
102,652 | 103,230 | Are there any resources about the PHP XMLWriter functionality? | The PHP documentation can be found here, but I think it's rather lacking. There are no examples of how to use these functions, and few (if any) of the pages have user comments. So where might I be able to find an explanation (and example code) on how to use these functions to write an XML document? | I don't know any other resources, but I found the examples in the comments on this page quite helpful. | Are there any resources about the PHP XMLWriter functionality? The PHP documentation can be found here, but I think it's rather lacking. There are no examples of how to use these functions, and few (if any) of the pages have user comments. So where might I be able to find an explanation (and example code) on how to use... | TITLE:
Are there any resources about the PHP XMLWriter functionality?
QUESTION:
The PHP documentation can be found here, but I think it's rather lacking. There are no examples of how to use these functions, and few (if any) of the pages have user comments. So where might I be able to find an explanation (and example c... | [
"php",
"xml",
"xmlwriter"
] | 3 | 1 | 2,139 | 2 | 0 | 2008-09-19T15:11:38.377000 | 2008-09-19T15:58:38.450000 |
102,657 | 102,678 | Prevent a PostBack from showing up in the History | I have a page where I submit some data, and return to the original form with a "Save Successful" message. However, the user would like the ability to return to the previous page they were at (which contains search results) by clicking the browser's "Back" button. However, due to the postback, when they click the "Back"... | If you put your "Save" button in an UpdatePanel, the postback will not show in the users history. | Prevent a PostBack from showing up in the History I have a page where I submit some data, and return to the original form with a "Save Successful" message. However, the user would like the ability to return to the previous page they were at (which contains search results) by clicking the browser's "Back" button. Howeve... | TITLE:
Prevent a PostBack from showing up in the History
QUESTION:
I have a page where I submit some data, and return to the original form with a "Save Successful" message. However, the user would like the ability to return to the previous page they were at (which contains search results) by clicking the browser's "Ba... | [
"asp.net",
"vb.net",
".net-2.0"
] | 6 | 4 | 3,269 | 2 | 0 | 2008-09-19T15:12:19.357000 | 2008-09-19T15:14:32.457000 |
102,690 | 103,587 | How does c# figure out the hash code for an object? | This question comes out of the discussion on tuples. I started thinking about the hash code that a tuple should have. What if we will accept KeyValuePair class as a tuple? It doesn't override the GetHashCode() method, so probably it won't be aware of the hash codes of it's "children"... So, run-time will call Object.Ge... | It seems that I have a clue now. I thought KeyValuePair is a reference type, but it is not, it is a struct. And so it uses ValueType.GetHashCode() method. MSDN for it says: "One or more fields of the derived type is used to calculate the return value". If you will take a real reference type as a "tuple-provider" you'll... | How does c# figure out the hash code for an object? This question comes out of the discussion on tuples. I started thinking about the hash code that a tuple should have. What if we will accept KeyValuePair class as a tuple? It doesn't override the GetHashCode() method, so probably it won't be aware of the hash codes of... | TITLE:
How does c# figure out the hash code for an object?
QUESTION:
This question comes out of the discussion on tuples. I started thinking about the hash code that a tuple should have. What if we will accept KeyValuePair class as a tuple? It doesn't override the GetHashCode() method, so probably it won't be aware of... | [
"c#",
"hash",
"internals"
] | 12 | 1 | 19,019 | 6 | 0 | 2008-09-19T15:16:04.277000 | 2008-09-19T16:44:28.497000 |
102,704 | 102,767 | What is the best option for running a Jabber/XMPP on Windows 2003? | I'm looking to run a Jabber server on a Windows 2003 server(web farm) and like some practical advice from anyone who has run a live environment with ~500 concurrent users. Criteria for comment: Performance Capacity (ie ~number of concurrent users) Stability | I think you're going to need to be a bit more explicit - you looking for server configurations, or software e.g. Jabber Server? If you're thinking Jabber server, EJabberD is probably the most stable, flexible, capable of being clustered etc. Really useful comparison of Open Source servers here... http://www.saint-andre... | What is the best option for running a Jabber/XMPP on Windows 2003? I'm looking to run a Jabber server on a Windows 2003 server(web farm) and like some practical advice from anyone who has run a live environment with ~500 concurrent users. Criteria for comment: Performance Capacity (ie ~number of concurrent users) Stabi... | TITLE:
What is the best option for running a Jabber/XMPP on Windows 2003?
QUESTION:
I'm looking to run a Jabber server on a Windows 2003 server(web farm) and like some practical advice from anyone who has run a live environment with ~500 concurrent users. Criteria for comment: Performance Capacity (ie ~number of concu... | [
"xmpp",
"instant-messaging"
] | 1 | 1 | 8,823 | 2 | 0 | 2008-09-19T15:17:56.550000 | 2008-09-19T15:22:14.967000 |
102,720 | 102,838 | CSS (Stylesheet) organization and colors | I just finished a medium sized web site and one thing I noticed about my css organization was that I have a lot of hard coded colour values throughout. This obviously isn't great for maintainability. Generally, when I design a site I pick 3-5 main colours for a theme. I end up setting some default values for paragraphs... | That's exactly what you should do. The more centralized you can make your css, the easier it will be to make changes in the future. And let's be serious, you will want to change colors in the future. You should almost never hard-code any css into your html, it should all be in the css. Also, something I have started do... | CSS (Stylesheet) organization and colors I just finished a medium sized web site and one thing I noticed about my css organization was that I have a lot of hard coded colour values throughout. This obviously isn't great for maintainability. Generally, when I design a site I pick 3-5 main colours for a theme. I end up s... | TITLE:
CSS (Stylesheet) organization and colors
QUESTION:
I just finished a medium sized web site and one thing I noticed about my css organization was that I have a lot of hard coded colour values throughout. This obviously isn't great for maintainability. Generally, when I design a site I pick 3-5 main colours for a... | [
"css"
] | 5 | 2 | 1,790 | 13 | 0 | 2008-09-19T15:19:25.690000 | 2008-09-19T15:26:51.913000 |
102,742 | 102,878 | Why is '397' used for ReSharper GetHashCode override? | Like many of you, I use ReSharper to speed up the development process. When you use it to override the equality members of a class, the code-gen it produces for GetHashCode() looks like: public override int GetHashCode() { unchecked { int result = (Key!= null? Key.GetHashCode(): 0); result = (result * 397) ^ (EditableP... | Probably because 397 is a prime of sufficient size to cause the result variable to overflow and mix the bits of the hash somewhat, providing a better distribution of hash codes. There's nothing particularly special about 397 that distinguishes it from other primes of the same magnitude. | Why is '397' used for ReSharper GetHashCode override? Like many of you, I use ReSharper to speed up the development process. When you use it to override the equality members of a class, the code-gen it produces for GetHashCode() looks like: public override int GetHashCode() { unchecked { int result = (Key!= null? Key.G... | TITLE:
Why is '397' used for ReSharper GetHashCode override?
QUESTION:
Like many of you, I use ReSharper to speed up the development process. When you use it to override the equality members of a class, the code-gen it produces for GetHashCode() looks like: public override int GetHashCode() { unchecked { int result = ... | [
"hash",
"resharper",
"hash-code-uniqueness"
] | 169 | 182 | 27,409 | 2 | 0 | 2008-09-19T15:20:45.513000 | 2008-09-19T15:29:24.073000 |
102,759 | 102,826 | Database safety: Intermediary "to_be_deleted" column/table? | Everyone has accidentally forgotten the WHERE clause on a DELETE query and blasted some un-backed up data once or twice. I was pondering that problem, and I was wondering if the solution I came up with is practical. What if, in place of actual DELETE queries, the application and maintenance scripts did something like: ... | That is fine if you want to do that, but it seems like a lot of work. How many people are manually changing the database? It should be very few, especially if your users have an app to work with. When I work on the production db I put EVERYTHING I do in a transaction so if I mess up I can rollback. Just having a standa... | Database safety: Intermediary "to_be_deleted" column/table? Everyone has accidentally forgotten the WHERE clause on a DELETE query and blasted some un-backed up data once or twice. I was pondering that problem, and I was wondering if the solution I came up with is practical. What if, in place of actual DELETE queries, ... | TITLE:
Database safety: Intermediary "to_be_deleted" column/table?
QUESTION:
Everyone has accidentally forgotten the WHERE clause on a DELETE query and blasted some un-backed up data once or twice. I was pondering that problem, and I was wondering if the solution I came up with is practical. What if, in place of actua... | [
"sql",
"database"
] | 0 | 4 | 281 | 14 | 0 | 2008-09-19T15:21:56.120000 | 2008-09-19T15:26:03.083000 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.