PostId
int64
4
11.8M
PostCreationDate
stringlengths
19
19
OwnerUserId
int64
1
1.57M
OwnerCreationDate
stringlengths
10
19
ReputationAtPostCreation
int64
-55
461k
OwnerUndeletedAnswerCountAtPostTime
int64
0
21.5k
Title
stringlengths
3
250
BodyMarkdown
stringlengths
5
30k
Tag1
stringlengths
1
25
Tag2
stringlengths
1
25
Tag3
stringlengths
1
25
Tag4
stringlengths
1
25
Tag5
stringlengths
1
25
PostClosedDate
stringlengths
19
19
OpenStatus
stringclasses
5 values
unified_texts
stringlengths
32
30.1k
OpenStatus_id
int64
0
4
42,407
09/03/2008 19:46:54
4,438
09/03/2008 19:40:25
1
0
How do I implement OpenID in my web application?
Does Stackoverflow create a new OpenID when a user registers with an email address (i.e. does not provide an existing OpenID)? How do you do that? Do you have code examples in C#? Java? Python?
c#
java
python
stackoverflow
openid
null
open
How do I implement OpenID in my web application? === Does Stackoverflow create a new OpenID when a user registers with an email address (i.e. does not provide an existing OpenID)? How do you do that? Do you have code examples in C#? Java? Python?
0
42,416
09/03/2008 19:50:11
3,798
08/30/2008 22:09:59
8
3
How can I install libgluezilla on Ubuntu 8.04?
I want to use the Web Browser control within an mono application, but when I do get the error "libgluezilla not found. To have webbrowser support, you need libgluezilla installed." I can't find the package other than a SUSE rpm, how do I install the library?
ubuntu
mono
null
null
null
null
open
How can I install libgluezilla on Ubuntu 8.04? === I want to use the Web Browser control within an mono application, but when I do get the error "libgluezilla not found. To have webbrowser support, you need libgluezilla installed." I can't find the package other than a SUSE rpm, how do I install the library?
0
42,422
09/03/2008 19:51:03
2,357
08/21/2008 20:18:05
1
3
What's wrong with this code? If anything.
Essentially I want to know if in VB.NET 2005 if using a sqlcommand and then reusing it by using the NEW is wrong. Will it cause a memory leak. EG: dim mySQL as new sqlcommand(sSQL, cnInput) // do a sql execute and read the data mySQL = new sqlcommand(sSQLdifferent, cnInput) // do sql execute and read the data finally if mysql isnot nothing then mysql.dispose mysql = nothing end if
vb.net
memory-leaks
null
null
null
null
open
What's wrong with this code? If anything. === Essentially I want to know if in VB.NET 2005 if using a sqlcommand and then reusing it by using the NEW is wrong. Will it cause a memory leak. EG: dim mySQL as new sqlcommand(sSQL, cnInput) // do a sql execute and read the data mySQL = new sqlcommand(sSQLdifferent, cnInput) // do sql execute and read the data finally if mysql isnot nothing then mysql.dispose mysql = nothing end if
0
42,428
09/03/2008 19:52:07
1,476
08/15/2008 19:09:14
266
7
Window managers for Windows and Macs
X Windows has special processes called Window Managers that manage the layout of windows and decorations like their title bar, control buttons etc. Such processes use an X Windows API to detect events related to windows sizes and positions. Are there any consistent ways for writing such processes for Microsoft Windows or Mac OS/X? I know that in general these systems are less flexible but I'm looking for something that will use public APIs and not undocumented hacks.
windows
osx
operating-system
x-windows
null
null
open
Window managers for Windows and Macs === X Windows has special processes called Window Managers that manage the layout of windows and decorations like their title bar, control buttons etc. Such processes use an X Windows API to detect events related to windows sizes and positions. Are there any consistent ways for writing such processes for Microsoft Windows or Mac OS/X? I know that in general these systems are less flexible but I'm looking for something that will use public APIs and not undocumented hacks.
0
42,437
09/03/2008 19:55:05
2,191
08/20/2008 20:39:36
177
6
Best way to handle input from a keyboard "wedge"
I'm writing a C# POS (point of sale) system that takes input from a keyboard wedge magcard reader. This means that any data it reads off of a mag stripe is entered as if it were typed on the keyboard very quickly. Currently I'm handling this by attaching to the KeyPress event and looking for a series of very fast key presses that contain the card swipe sentinel characters. Is there a better way to deal with this sort of input?
c#
null
null
null
null
null
open
Best way to handle input from a keyboard "wedge" === I'm writing a C# POS (point of sale) system that takes input from a keyboard wedge magcard reader. This means that any data it reads off of a mag stripe is entered as if it were typed on the keyboard very quickly. Currently I'm handling this by attaching to the KeyPress event and looking for a series of very fast key presses that contain the card swipe sentinel characters. Is there a better way to deal with this sort of input?
0
42,438
09/03/2008 19:55:13
206
08/03/2008 13:35:14
527
40
What's the best way to detect the presence of SMO?
I have some code that uses SMO to populate a list of available SQL Servers and databases. While we no longer support SQL Server 2000, it's possible that the code could get run on a machine that SQL Server 2000 and not have the SMO library installed. I would perfer to check for SMO first and degrade the functionality gracefully instead of blowing up in the user's face. What is best way to detect whether or not SMO is available on a machine? Every example that I have seen through a quick Google scan was a variation of "look for C:\Program Files\Microsoft SQL Server\90\SDK\Assemblies\Microsoft.SqlServer.Smo.dll". The problem with that approach is that it only works with SQL Server 2005. If SQL Server 2008 is the only SQL Server installed then the path will be different.
sql-server
smo
null
null
null
null
open
What's the best way to detect the presence of SMO? === I have some code that uses SMO to populate a list of available SQL Servers and databases. While we no longer support SQL Server 2000, it's possible that the code could get run on a machine that SQL Server 2000 and not have the SMO library installed. I would perfer to check for SMO first and degrade the functionality gracefully instead of blowing up in the user's face. What is best way to detect whether or not SMO is available on a machine? Every example that I have seen through a quick Google scan was a variation of "look for C:\Program Files\Microsoft SQL Server\90\SDK\Assemblies\Microsoft.SqlServer.Smo.dll". The problem with that approach is that it only works with SQL Server 2005. If SQL Server 2008 is the only SQL Server installed then the path will be different.
0
42,446
09/03/2008 19:59:11
4,066
09/01/2008 16:06:15
71
6
How do I Converting an IntPtr to a Stream
<pre><code> class Foo { static bool Bar(Stream^ stream); }; class FooWrapper { bool Bar(LPCWSTR szUnicodeString) { return Foo::Bar(??); } }; </code></pre> MemoryStream will take a byte[] but I'd *like* to do this without copying the data if possible.
.net
c++
managedc++
null
null
null
open
How do I Converting an IntPtr to a Stream === <pre><code> class Foo { static bool Bar(Stream^ stream); }; class FooWrapper { bool Bar(LPCWSTR szUnicodeString) { return Foo::Bar(??); } }; </code></pre> MemoryStream will take a byte[] but I'd *like* to do this without copying the data if possible.
0
42,452
09/03/2008 20:00:16
292
08/04/2008 13:14:31
440
19
Is BCEL == monkeypatching for java?
a colleague pointed me the other day to [BCEL][1] which , as best I can tell from his explanation and a quick read, a way to modify at run time the byte code. My first thouhg was that it sounded dangerous, and my second thought was that it sounded cool. Then I gave it some more thought and I recalled the [codinghorror post on monkey-patching][2] and realized that this was basically the same thing. Has anyone ever used BCEL for anything practical? Am I right that this is basically run time monkey patching, or am I missing something? [1]: http://jakarta.apache.org/bcel/ [2]: http://www.codinghorror.com/blog/archives/001151.html
monkeypatching
bcel
bytecode
jave
null
null
open
Is BCEL == monkeypatching for java? === a colleague pointed me the other day to [BCEL][1] which , as best I can tell from his explanation and a quick read, a way to modify at run time the byte code. My first thouhg was that it sounded dangerous, and my second thought was that it sounded cool. Then I gave it some more thought and I recalled the [codinghorror post on monkey-patching][2] and realized that this was basically the same thing. Has anyone ever used BCEL for anything practical? Am I right that this is basically run time monkey patching, or am I missing something? [1]: http://jakarta.apache.org/bcel/ [2]: http://www.codinghorror.com/blog/archives/001151.html
0
42,460
09/03/2008 20:04:47
2,547
08/22/2008 19:10:02
499
28
Custom titlebars/chrome in a WinForms app
I'm almost certain I know the answer to this question, but I'm hoping there's something I've overlooked. Certain applications seem to have the Vista Aero look and feel to their caption bars and buttons even when running on Windows XP. (Google Chrome and Windows Live Photo Gallery come to mind as examples.) I know that one way to accomplish this from WinForms would be to create a borderless form and draw the caption bar/buttons yourself, then overriding <code>WndProc</code> to make sure moving, resizing, and button clicks do what they're supposed to do (I'm not clear on the specifics but could probably pull it off given a day to read documentation.) I'm curious if there's a different, easier way that I'm overlooking. Perhaps some API calls or window styles I've overlooked?
.net
winforms
gui
windows-xp
null
null
open
Custom titlebars/chrome in a WinForms app === I'm almost certain I know the answer to this question, but I'm hoping there's something I've overlooked. Certain applications seem to have the Vista Aero look and feel to their caption bars and buttons even when running on Windows XP. (Google Chrome and Windows Live Photo Gallery come to mind as examples.) I know that one way to accomplish this from WinForms would be to create a borderless form and draw the caption bar/buttons yourself, then overriding <code>WndProc</code> to make sure moving, resizing, and button clicks do what they're supposed to do (I'm not clear on the specifics but could probably pull it off given a day to read documentation.) I'm curious if there's a different, easier way that I'm overlooking. Perhaps some API calls or window styles I've overlooked?
0
42,466
09/03/2008 20:11:32
1,583
08/16/2008 20:54:12
77
4
MSDN subscriptions on the cheap?
As a long time MS developer, I find MSDN to be an invaluable resource. However, when tinkering at home I am not able to play with the best latest technologies and the different offerings coming from Redmond as I cannot justify paying such a hefty price for what is essentially a pastime. The Express editions are great, but fall flat when trying to use the more advanced feature I am used to from the versions I use at work. I cannot get the latest betas and play with the new offerings, not legally, anyways. Apart from getting an MVP, how would one go about getting an MSDN subscription for an acceptable price for a non professional environment?
microsoft
msdn
finance
null
null
05/06/2012 16:29:46
not constructive
MSDN subscriptions on the cheap? === As a long time MS developer, I find MSDN to be an invaluable resource. However, when tinkering at home I am not able to play with the best latest technologies and the different offerings coming from Redmond as I cannot justify paying such a hefty price for what is essentially a pastime. The Express editions are great, but fall flat when trying to use the more advanced feature I am used to from the versions I use at work. I cannot get the latest betas and play with the new offerings, not legally, anyways. Apart from getting an MVP, how would one go about getting an MSDN subscription for an acceptable price for a non professional environment?
4
42,468
09/03/2008 20:12:28
3,776
08/30/2008 18:02:35
251
23
How do I measure bytes in/out of an IP port used for .NET remoting?
I am using .NET remoting to retrieve periodic status updates from a Windows service into a 'controller' application which is used to display some live stats about what the service is doing. The resulting network traffic is huge - many times the size of the data for the updates - so clearly I have implemented the remoting code incorrectly in a very inefficient way. As a first step towards fixing it, I need to monitor the traffic on the IP port the service is using to talk to the controller, so that I can establish a baseline and then verify a fix. Can anyone recommend a utility and/or coding technique that I can use to get the traffic stats? A "bytes sent" count for the port would suffice.
.net
windows
networking
remoting
null
null
open
How do I measure bytes in/out of an IP port used for .NET remoting? === I am using .NET remoting to retrieve periodic status updates from a Windows service into a 'controller' application which is used to display some live stats about what the service is doing. The resulting network traffic is huge - many times the size of the data for the updates - so clearly I have implemented the remoting code incorrectly in a very inefficient way. As a first step towards fixing it, I need to monitor the traffic on the IP port the service is using to talk to the controller, so that I can establish a baseline and then verify a fix. Can anyone recommend a utility and/or coding technique that I can use to get the traffic stats? A "bytes sent" count for the port would suffice.
0
42,480
09/03/2008 20:16:37
2,147
08/20/2008 15:14:13
821
61
Classes in VB6
Yeah, I'm stuck maintaining some legacy software. Does anyone know of any good tutorials on creating classes and whatnot in VB6? My Google-fu seems to be failing me. :-/
vb6
classes
null
null
null
null
open
Classes in VB6 === Yeah, I'm stuck maintaining some legacy software. Does anyone know of any good tutorials on creating classes and whatnot in VB6? My Google-fu seems to be failing me. :-/
0
42,482
09/03/2008 20:18:47
2,678
08/24/2008 14:30:46
1
0
Best way to extract text from a Word doc without using COM/automation?
Is there a reasonable way to extract plain text from a Word file that doesn't depend on COM automation? (This is a a feature for a web app deployed on a non-Windows platform - that's non-negotiable in this case.) Antiword seems like it might be a reasonable option, but it seems like it might be abandoned. A Python solution would be ideal, but doesn't appear to be available.
python
word
null
null
null
null
open
Best way to extract text from a Word doc without using COM/automation? === Is there a reasonable way to extract plain text from a Word file that doesn't depend on COM automation? (This is a a feature for a web app deployed on a non-Windows platform - that's non-negotiable in this case.) Antiword seems like it might be a reasonable option, but it seems like it might be abandoned. A Python solution would be ideal, but doesn't appear to be available.
0
42,483
09/03/2008 20:19:30
1,782
08/18/2008 14:30:58
1,171
85
Simulated OLAP
We have a client that has Oracle *Standard*, and a project that would be ten times easier addressed using OLAP. However, Oracle only supports OLAP in the *Enterprise* version. Migration to enterprise is **not** possible I'm thinking of doing some manual simulation of OLAP, creating relational tables to simulate the technology. Do you know of some other way I could do this? Maybe an open-source tool for OLAP? Any ideas?
oracle
olap
cubes
null
null
null
open
Simulated OLAP === We have a client that has Oracle *Standard*, and a project that would be ten times easier addressed using OLAP. However, Oracle only supports OLAP in the *Enterprise* version. Migration to enterprise is **not** possible I'm thinking of doing some manual simulation of OLAP, creating relational tables to simulate the technology. Do you know of some other way I could do this? Maybe an open-source tool for OLAP? Any ideas?
0
42,489
09/03/2008 20:21:04
4,213
09/02/2008 11:02:12
126
19
How to implement a "related" degree measure algorithm?
I was going to Ask a Question earlier today when I was presented to a surprising functionality in Stackoverflow. When I wrote my question title stackoverflow suggested me several related questions and I found out that there was already two similar questions. That was stunning! Then I started thinking how I would implement such function. How I would order questions by relatedness: 1. Question that have higher number of words matchs with the new question 2. If the number of matchs are the same, the order of words is considered 3. Words that appears in the title has higher relevancy That would be a simple workflow or a complex score algortithm? Some stemming to increase the recall, maybe? Is there some library the implements this function? What other aspects would you consider? Maybe Jeff could answer himself! How did you implemented this in Stackoverflow? :)
algorithm
full-text-search
indexing
null
null
null
open
How to implement a "related" degree measure algorithm? === I was going to Ask a Question earlier today when I was presented to a surprising functionality in Stackoverflow. When I wrote my question title stackoverflow suggested me several related questions and I found out that there was already two similar questions. That was stunning! Then I started thinking how I would implement such function. How I would order questions by relatedness: 1. Question that have higher number of words matchs with the new question 2. If the number of matchs are the same, the order of words is considered 3. Words that appears in the title has higher relevancy That would be a simple workflow or a complex score algortithm? Some stemming to increase the recall, maybe? Is there some library the implements this function? What other aspects would you consider? Maybe Jeff could answer himself! How did you implemented this in Stackoverflow? :)
0
42,490
09/03/2008 20:21:14
3,381
08/28/2008 11:39:48
228
28
TFS - Branching for experimental development: Solution fails to load
*Disclaimer: I'm stuck on TFS and I hate it.* My source control structure looks like this: - /dev - /releases - /branches - /experimental-upgrade I branched from dev to experimental-upgrade and didn't touch it. I then did some more work in dev and merged to experimental-upgrade. Somehow TFS complained that I had changes in both source and target and I had to resolve them. I chose to "Copy item from source branch" for all 5 items. I check out the experimental-upgrade to a local folder and try to open the main solution file in there. TFS prompts me: > "Projects have recently been added to this solution. Would you like to get them from source control? If I say yes it does some stuff but ultimately comes back failing to load a handful of the projects. If I say no I get the same result. Comparing my sln in both branches tells me that they are equal. Can anyone let me know what I'm doing wrong? This should be a straightforward branch/merge operation... TIA.
tfs
version-control
null
null
null
null
open
TFS - Branching for experimental development: Solution fails to load === *Disclaimer: I'm stuck on TFS and I hate it.* My source control structure looks like this: - /dev - /releases - /branches - /experimental-upgrade I branched from dev to experimental-upgrade and didn't touch it. I then did some more work in dev and merged to experimental-upgrade. Somehow TFS complained that I had changes in both source and target and I had to resolve them. I chose to "Copy item from source branch" for all 5 items. I check out the experimental-upgrade to a local folder and try to open the main solution file in there. TFS prompts me: > "Projects have recently been added to this solution. Would you like to get them from source control? If I say yes it does some stuff but ultimately comes back failing to load a handful of the projects. If I say no I get the same result. Comparing my sln in both branches tells me that they are equal. Can anyone let me know what I'm doing wrong? This should be a straightforward branch/merge operation... TIA.
0
42,499
09/03/2008 20:25:47
91
08/01/2008 17:55:22
5,470
233
asp:UpdateProgress - surpressing the line-break
I've started working with ASP.net AJAX (finally ☺). and I've got an update panel together with a asp:UpdateProgress. My Problem: The UpdateProgress always forces a line-break, because it renders out as a div-tag. Is there any way to force it being a span instead? I want to display it on the same line as some other controls without having to use a table or even *shudders* absolute positioning in CSS. I'm stuck with ASP.net AJAX 1.0 and .net 3.0 if that makes a difference.
asp.net
ajax
null
null
null
null
open
asp:UpdateProgress - surpressing the line-break === I've started working with ASP.net AJAX (finally ☺). and I've got an update panel together with a asp:UpdateProgress. My Problem: The UpdateProgress always forces a line-break, because it renders out as a div-tag. Is there any way to force it being a span instead? I want to display it on the same line as some other controls without having to use a table or even *shudders* absolute positioning in CSS. I'm stuck with ASP.net AJAX 1.0 and .net 3.0 if that makes a difference.
0
42,505
09/03/2008 20:29:15
3,619
08/29/2008 15:08:14
141
30
Thread safe use of a singleton's members
I have a C# singleton class that multiple classes use. public class MyClass { private static readonly MyClass instance = new MyClass(); public static MyClass Instance { get { return instance; } } private Int32 value = 0; public Int32 Toggle() { if(value == 0) { value = 1; } else if(value == 1) { value = 0; } return value; } } Is access through 'Instance' to the 'Toggle()' class threadsafe? If yes, by what assumptions, rules, etc. If no, why _and_ how can I fix it? For instance, if these were called in order... public class OtherClass1 { Int32 val1 = MyClass.Instance.Toggle(); // needs to be 1 } public class OtherClass1 { Int32 val2 = MyClass.Instance.Toggle(); // needs to be 0 }
c#
.net
multithreading
singleton
null
null
open
Thread safe use of a singleton's members === I have a C# singleton class that multiple classes use. public class MyClass { private static readonly MyClass instance = new MyClass(); public static MyClass Instance { get { return instance; } } private Int32 value = 0; public Int32 Toggle() { if(value == 0) { value = 1; } else if(value == 1) { value = 0; } return value; } } Is access through 'Instance' to the 'Toggle()' class threadsafe? If yes, by what assumptions, rules, etc. If no, why _and_ how can I fix it? For instance, if these were called in order... public class OtherClass1 { Int32 val1 = MyClass.Instance.Toggle(); // needs to be 1 } public class OtherClass1 { Int32 val2 = MyClass.Instance.Toggle(); // needs to be 0 }
0
42,512
09/03/2008 20:32:21
2,148
08/20/2008 15:20:13
302
22
Deleting an Google App Engine application
Is it possible to delete an GAE application after it has been created? I made a mistake while typing the name and now have a dummy application that I haven't been able to remove. Thanks.
google-app-engine
null
null
null
null
null
open
Deleting an Google App Engine application === Is it possible to delete an GAE application after it has been created? I made a mistake while typing the name and now have a dummy application that I haven't been able to remove. Thanks.
0
42,515
09/03/2008 20:32:26
2,653
08/23/2008 23:43:40
1
0
Dealing with Latency in Networked Games
I'm thinking about making a networked game. I'm a little new to this, and have already run into a lot of issues trying to put together a good plan for dead reckoning and network latency, so I'd love to see some good literature on the topic. I'll describe the methods I've considered. Originally, I was just sending the player's input to the server, simulating there, and broadcasting changes in the game state to all players. This makes cheating difficult, but under high latency makes things a little difficult to control, since you wont see the results of your own actions immediately. [This GamaSutra article][1] has a solution that saves bandwidth and makes local input appear smooth by simulating on the client as well, but it seems to throw cheat-proofing out the window. Also, I'm not sure what to do when players start manipulating the environment, pushing rocks and the like. These previously neutral objects would temporarily become objects the client needs to send PDUs about, or perhaps multiple players do at once. Whose PDUs would win? When would the objects stop being doubly tracked by each player (to compare with the dead reckoned version)? Heaven forbid two players engage in a sumo match (e.g. start pushing each other). [This gamedev.net bit][2] shows the gamasutra solution as inadequate, but describes a different method that doesn't really fix my collaborative boulder-pushing example. Most other things I've found are specific to shooters. I'd love to see something more geared toward games that play like SNES Zelda, but with a little more physics / momentum involved. * Note: I'm not asking about physics simulation here -- other libraries have that covered. Just strategies for making games smooth and reactive despite network latency. [1]: http://www.gamasutra.com/features/19970919/aronson_01.htm [2]: http://www.gamedev.net/reference/articles/article1370.asp
networking
latency
deadreckoning
null
null
null
open
Dealing with Latency in Networked Games === I'm thinking about making a networked game. I'm a little new to this, and have already run into a lot of issues trying to put together a good plan for dead reckoning and network latency, so I'd love to see some good literature on the topic. I'll describe the methods I've considered. Originally, I was just sending the player's input to the server, simulating there, and broadcasting changes in the game state to all players. This makes cheating difficult, but under high latency makes things a little difficult to control, since you wont see the results of your own actions immediately. [This GamaSutra article][1] has a solution that saves bandwidth and makes local input appear smooth by simulating on the client as well, but it seems to throw cheat-proofing out the window. Also, I'm not sure what to do when players start manipulating the environment, pushing rocks and the like. These previously neutral objects would temporarily become objects the client needs to send PDUs about, or perhaps multiple players do at once. Whose PDUs would win? When would the objects stop being doubly tracked by each player (to compare with the dead reckoned version)? Heaven forbid two players engage in a sumo match (e.g. start pushing each other). [This gamedev.net bit][2] shows the gamasutra solution as inadequate, but describes a different method that doesn't really fix my collaborative boulder-pushing example. Most other things I've found are specific to shooters. I'd love to see something more geared toward games that play like SNES Zelda, but with a little more physics / momentum involved. * Note: I'm not asking about physics simulation here -- other libraries have that covered. Just strategies for making games smooth and reactive despite network latency. [1]: http://www.gamasutra.com/features/19970919/aronson_01.htm [2]: http://www.gamedev.net/reference/articles/article1370.asp
0
42,519
09/03/2008 20:34:33
736
08/08/2008 13:06:17
136
13
How do you rotate a two dimensional array?
Inspired by [Raymond Chen's post][1], say you have a 4x4 two dimensional array, write a function that rotates it 90 degrees. Raymond links to a solution in pseudo code, but I'd like to see some real world stuff. [1][2][3][4] [5][6][7][8] [9][0][1][2] [3][4][5][6] Becomes: [3][9][5][1] [4][0][6][2] [5][1][7][3] [6][2][8][4] [1]: http://blogs.msdn.com/oldnewthing/archive/2008/09/02/8918130.aspx
interview-questions
matrix
null
null
null
null
open
How do you rotate a two dimensional array? === Inspired by [Raymond Chen's post][1], say you have a 4x4 two dimensional array, write a function that rotates it 90 degrees. Raymond links to a solution in pseudo code, but I'd like to see some real world stuff. [1][2][3][4] [5][6][7][8] [9][0][1][2] [3][4][5][6] Becomes: [3][9][5][1] [4][0][6][2] [5][1][7][3] [6][2][8][4] [1]: http://blogs.msdn.com/oldnewthing/archive/2008/09/02/8918130.aspx
0
42,531
09/03/2008 20:39:21
814
08/09/2008 04:07:15
173
13
How do I call ::CreateProcess in c++ to launch a Windows executable?
Looking for an example that: 1) Launches an EXE 2) Waits for the EXE to finish. 3) Properly closes all the handles when the executable finishes.
windows-api
null
null
null
null
null
open
How do I call ::CreateProcess in c++ to launch a Windows executable? === Looking for an example that: 1) Launches an EXE 2) Waits for the EXE to finish. 3) Properly closes all the handles when the executable finishes.
0
42,546
09/03/2008 20:46:05
2,443
08/22/2008 10:53:30
344
24
How can I draw a curve that varies in thickness along its path?
I'm capturing data from a tablet using Java (JPen library rocks) and would like to be able to paint a penstroke in a more natural way. Currently I'm drawing the pen stroke as straight line segments each with a different Stroke thickness. There has to be something in Java's Graphics Library that lets me to this more efficiently. Right?
java
graphics
null
null
null
null
open
How can I draw a curve that varies in thickness along its path? === I'm capturing data from a tablet using Java (JPen library rocks) and would like to be able to paint a penstroke in a more natural way. Currently I'm drawing the pen stroke as straight line segments each with a different Stroke thickness. There has to be something in Java's Graphics Library that lets me to this more efficiently. Right?
0
42,550
09/03/2008 20:49:26
3,747
08/30/2008 14:33:59
269
22
Extract Address Information from a Web Page
I need to take a web page and extract the address information from the page. Some are easier than others. I'm looking for a firefox plugin, windows app, or VB.NET code that will help me get this done. Ideally I would like to have a web page on our admin (ASP.NET/VB.NET) where you enter a URL and it scraps the page and returns a Dataset that I can put in a Grid.
vb.net
address
null
null
null
null
open
Extract Address Information from a Web Page === I need to take a web page and extract the address information from the page. Some are easier than others. I'm looking for a firefox plugin, windows app, or VB.NET code that will help me get this done. Ideally I would like to have a web page on our admin (ASP.NET/VB.NET) where you enter a URL and it scraps the page and returns a Dataset that I can put in a Grid.
0
42,554
09/03/2008 20:51:49
1,583
08/16/2008 20:54:12
91
4
Can't get my event to fire
When loading a page for the first time (!IsPostback), I am creating a button in code and adding it to my page, then adding an event handler to the click event. However, when clicking the button, after the page reloads, my event handler does not fire. Can anyone explain why?
asp.net
null
null
null
null
null
open
Can't get my event to fire === When loading a page for the first time (!IsPostback), I am creating a button in code and adding it to my page, then adding an event handler to the click event. However, when clicking the button, after the page reloads, my event handler does not fire. Can anyone explain why?
0
42,557
09/03/2008 20:52:54
3,446
08/28/2008 15:47:28
81
7
Best way to incorporate spell checkers with a build process
I try to externalize all strings (and other constants) used in any application I write, for many reasons that are probably second-nature to most stack-overflowers, but one thing I would like to have is the ability to automate spell checking of any user-visible strings. This poses a couple problems: * Not all strings are user-visible, and it's non-trivial to spearate them, and keep that separation in place (but it is *possible*) * Most, if not all, string externalization methods I've used involve significant text that will not pass a spell checker such as aspell/ispell (eg: theStrName="some string." and comments) * Many spellcheckers (once again, aspell/ispell) don't handle many words out of the box (generally technical terms, proper nouns, or just 'new' terminology, like metadata). How do you incorporate something like this into your build procedures/test suites? It is not feasible to have someone manually spell check all the strings in an application each time they are changed -- and there is *no chance* that they will all be spelled correctly the first time ;)
build-process
build-automation
build
spellchecking
null
null
open
Best way to incorporate spell checkers with a build process === I try to externalize all strings (and other constants) used in any application I write, for many reasons that are probably second-nature to most stack-overflowers, but one thing I would like to have is the ability to automate spell checking of any user-visible strings. This poses a couple problems: * Not all strings are user-visible, and it's non-trivial to spearate them, and keep that separation in place (but it is *possible*) * Most, if not all, string externalization methods I've used involve significant text that will not pass a spell checker such as aspell/ispell (eg: theStrName="some string." and comments) * Many spellcheckers (once again, aspell/ispell) don't handle many words out of the box (generally technical terms, proper nouns, or just 'new' terminology, like metadata). How do you incorporate something like this into your build procedures/test suites? It is not feasible to have someone manually spell check all the strings in an application each time they are changed -- and there is *no chance* that they will all be spelled correctly the first time ;)
0
42,566
09/03/2008 20:56:07
422
08/05/2008 15:11:55
817
40
Getting the Hostname or IP in Ruby on Rails
I'm in the process of maintaining a Ruby on Rails app and am looking for an easy way to find the hostname or IP address of the box I'm on (since it's a VM and new instances may have different hostnames or IP addresses). Is there a quick and easy way to do this in Ruby on Rails?
ruby
ruby-on-rails
networking
null
null
null
open
Getting the Hostname or IP in Ruby on Rails === I'm in the process of maintaining a Ruby on Rails app and am looking for an easy way to find the hostname or IP address of the box I'm on (since it's a VM and new instances may have different hostnames or IP addresses). Is there a quick and easy way to do this in Ruby on Rails?
0
42,581
09/03/2008 21:00:33
3,594
08/29/2008 08:46:29
122
9
Python re.MULTILINE caret match
The Python docs say: > re.MULTILINE: When specified, the pattern character '^' matches at the beginning of the string and at the beginning of each line (immediately following each newline)... By default, '^' matches only at the beginning of the string... So what's going on when I get the following unexpected result? >>> import re >>> s = """// The quick brown fox. ... // Jumped over the lazy dog.""" >>> re.sub('^//', '', s, re.MULTILINE) ' The quick brown fox.\n// Jumped over the lazy dog.'
python
regex
null
null
null
null
open
Python re.MULTILINE caret match === The Python docs say: > re.MULTILINE: When specified, the pattern character '^' matches at the beginning of the string and at the beginning of each line (immediately following each newline)... By default, '^' matches only at the beginning of the string... So what's going on when I get the following unexpected result? >>> import re >>> s = """// The quick brown fox. ... // Jumped over the lazy dog.""" >>> re.sub('^//', '', s, re.MULTILINE) ' The quick brown fox.\n// Jumped over the lazy dog.'
0
42,582
09/03/2008 21:00:54
3,880
08/31/2008 15:48:19
149
7
What View Engine are you using with ASP.NET MVC?
I know you can use several different view engines with ASP.NET MVC: - ASPX, obviously - NVelocity - Brail - NHaml - et al... The default ASPX view engine seems to make the most sense to me, coming from an ASP.NET WebForms background. But, I wanted to get an idea of the pros and cons of each and see what most people are using. Which does StackOverflow use?
asp.net-mvc
null
null
null
null
null
open
What View Engine are you using with ASP.NET MVC? === I know you can use several different view engines with ASP.NET MVC: - ASPX, obviously - NVelocity - Brail - NHaml - et al... The default ASPX view engine seems to make the most sense to me, coming from an ASP.NET WebForms background. But, I wanted to get an idea of the pros and cons of each and see what most people are using. Which does StackOverflow use?
0
42,587
09/03/2008 21:03:51
1,583
08/16/2008 20:54:12
94
5
Double dispatch in C#?
I have heard/read the term but don't quite understand what it means. When should I use this technique and how would I use it? Can anyone provide a good code sample?
c#
design-patterns
null
null
null
null
open
Double dispatch in C#? === I have heard/read the term but don't quite understand what it means. When should I use this technique and how would I use it? Can anyone provide a good code sample?
0
42,610
09/03/2008 21:12:43
3,906
08/31/2008 20:11:13
1
3
Metalanaguage to describe the Model from MVC to generate identical client and server side code
I am looking for a powerful meta-language to describa behaviour for an application i intend to use in offline mode (google-gears + javascript) and server side sqlite + (php/ruby/java etc) and looking for a good format to describe the model's behaviour which can be easily converted to the target languages. I am completely off track, and there is a much better way?
javascript
sqlite
model
client-server
metalanguage
null
open
Metalanaguage to describe the Model from MVC to generate identical client and server side code === I am looking for a powerful meta-language to describa behaviour for an application i intend to use in offline mode (google-gears + javascript) and server side sqlite + (php/ruby/java etc) and looking for a good format to describe the model's behaviour which can be easily converted to the target languages. I am completely off track, and there is a much better way?
0
42,620
09/03/2008 21:17:17
4,200
09/02/2008 09:57:33
1
3
SQL Server Views, blessing or curse?
I once worked with an architect who banned the use of SQL views. His main reason was that views made it too easy for a thoughtless coder to needlessly involve joined tables which, if that coder tried harder, could be avoided altogether. Implicitly he was encouraging code reuse via copy-and-paste instead of encapsulation in views. The database had nearly 600 tables and was highly normalised, so most of the useful SQL was necessarily verbose. Several years later I can see at least one bad outcome from the ban - we have many hundreds of dense, lengthy stored procs that verge on unmaintainable. In hindsight I would say it was a bad decision, but what are your experiences with SQL views? Have you found them bad for performance? Any other thoughts on when they are or are not appropriate?
sqlserver
null
null
null
null
null
open
SQL Server Views, blessing or curse? === I once worked with an architect who banned the use of SQL views. His main reason was that views made it too easy for a thoughtless coder to needlessly involve joined tables which, if that coder tried harder, could be avoided altogether. Implicitly he was encouraging code reuse via copy-and-paste instead of encapsulation in views. The database had nearly 600 tables and was highly normalised, so most of the useful SQL was necessarily verbose. Several years later I can see at least one bad outcome from the ban - we have many hundreds of dense, lengthy stored procs that verge on unmaintainable. In hindsight I would say it was a bad decision, but what are your experiences with SQL views? Have you found them bad for performance? Any other thoughts on when they are or are not appropriate?
0
42,627
09/03/2008 21:21:30
1,583
08/16/2008 20:54:12
98
4
Best practices for portable C#
I am looking to write some C# code for linux/windows/mac/any other platform, and am looking for best practices for portable code. Project [mono][1] has some great [porting][2] resources. What are the best practices for portable C#? [1]: http://go-mono.org [2]: http://www.mono-project.com/Category:Porting
c#
crossplatform
mono
null
null
null
open
Best practices for portable C# === I am looking to write some C# code for linux/windows/mac/any other platform, and am looking for best practices for portable code. Project [mono][1] has some great [porting][2] resources. What are the best practices for portable C#? [1]: http://go-mono.org [2]: http://www.mono-project.com/Category:Porting
0
42,633
09/03/2008 21:24:11
3,305
08/27/2008 18:56:35
334
25
When is the most effective time to do code reviews?
In the process of adding a new feature, when should you review the code? If you leave it until the code is complete, arguably a lot of time could already have been wasted going in the wrong direction. Too early and the ideas are only half formed. So where is the sweet spot and how do you decide?
code-review
null
null
null
null
null
open
When is the most effective time to do code reviews? === In the process of adding a new feature, when should you review the code? If you leave it until the code is complete, arguably a lot of time could already have been wasted going in the wrong direction. Too early and the ideas are only half formed. So where is the sweet spot and how do you decide?
0
42,643
09/03/2008 21:30:20
4,301
09/02/2008 18:34:26
11
6
Scripting the Visual Studio IDE
I'd like to create a script that will configure the Visual Studio IDE the way I like it. Nothing vastly complicated, just a few Tools/Options settings, adding some External Tools, that kind of thing. I know that this can be done inside VS with Import/Export Settings, but I'd like to be able to automate it from outside of VS. Is this possible, and if so, how?
visual-studio
ide
scripting
null
null
null
open
Scripting the Visual Studio IDE === I'd like to create a script that will configure the Visual Studio IDE the way I like it. Nothing vastly complicated, just a few Tools/Options settings, adding some External Tools, that kind of thing. I know that this can be done inside VS with Import/Export Settings, but I'd like to be able to automate it from outside of VS. Is this possible, and if so, how?
0
42,648
09/03/2008 21:32:02
1,583
08/16/2008 20:54:12
108
4
Best way to get identity of inserted row?
What is the best way to get identity of inserted row? I know about @@IDENTITY and IDENT_CURRENT and SCOPE_IDENTITY but don't understand the pros and cons attached to each. Can someone please explain the differences and when I should be using each?
sql-server
null
null
null
null
null
open
Best way to get identity of inserted row? === What is the best way to get identity of inserted row? I know about @@IDENTITY and IDENT_CURRENT and SCOPE_IDENTITY but don't understand the pros and cons attached to each. Can someone please explain the differences and when I should be using each?
0
42,649
09/03/2008 21:32:49
3,305
08/27/2008 18:56:35
349
25
Can you recommend a database that scales horizontally?
Generally the database server is the biggest, most expensive box we have to buy as scaling vertically is the only option. Are there any databases that scale well horizontally (i.e. across multiple commodity machines) and what are the limitations in this approach?
database
scalability
null
null
null
null
open
Can you recommend a database that scales horizontally? === Generally the database server is the biggest, most expensive box we have to buy as scaling vertically is the only option. Are there any databases that scale well horizontally (i.e. across multiple commodity machines) and what are the limitations in this approach?
0
42,672
09/03/2008 21:45:37
4,491
09/04/2008 06:44:23
1
0
How do I SCP File programatically with C
What would be the best way to do an scp or sftp copy in a unix environment using C. I'm interested in knowing the best library to use and an example if at all possible. I'm working on a solaris server with the sun tools installed.
scp
unix
c
sftp
null
null
open
How do I SCP File programatically with C === What would be the best way to do an scp or sftp copy in a unix environment using C. I'm interested in knowing the best library to use and an example if at all possible. I'm working on a solaris server with the sun tools installed.
0
42,690
09/03/2008 21:52:50
2,858
08/25/2008 15:42:32
23
0
Which Dynamic .NET language makes more sense to learn, Iron Ruby or Iron Python?
I'd like to take some time to learn more about dynamic languages built on top of the DLR and I'm not sure which language would be better to learn. Having limited time, I really only have time to look learn one of them. Any opinions on which of the two (Iron Ruby or Iron Python) would be more useful in the long run? Thanks! ...Ed
.net
ironpython
dynamic-languages
ironruby
dlr
null
open
Which Dynamic .NET language makes more sense to learn, Iron Ruby or Iron Python? === I'd like to take some time to learn more about dynamic languages built on top of the DLR and I'm not sure which language would be better to learn. Having limited time, I really only have time to look learn one of them. Any opinions on which of the two (Iron Ruby or Iron Python) would be more useful in the long run? Thanks! ...Ed
0
42,693
09/03/2008 21:54:28
3,807
08/30/2008 23:07:08
8
0
best way to get user input for a menu driven CLI in C
What's the best way to get user input in a C program where the choices are of a limited number. Say for example the choices are: A) Print the list. B) Add 99 to the end of the list. C) Delete all duplicates. 5) Reset 5 times. Entering "A" then enter is ok, Or, just a single keystroke would work as well.
c
null
null
null
null
null
open
best way to get user input for a menu driven CLI in C === What's the best way to get user input in a C program where the choices are of a limited number. Say for example the choices are: A) Print the list. B) Add 99 to the end of the list. C) Delete all duplicates. 5) Reset 5 times. Entering "A" then enter is ok, Or, just a single keystroke would work as well.
0
42,706
09/03/2008 22:00:05
758
08/08/2008 15:40:58
312
30
Dependency Injection Addiction?
Is there a down side? I feel almost dependent on it now. Whenever a project gets past a certain size almost feel an allergic reaction to standard patterns and immediately re-wire it with a Dependency Injection framework. The largest issue I've found is it can be confusing for other developers who are just learning it. Also, I'd feel much better if it were a part of the language I was using. Though, for Java at least, there are a couple very lightweight libraries which are quite good. Thoughts? Bad experiences? Or just stop worrying about it?
dependency-injection
null
null
null
null
null
open
Dependency Injection Addiction? === Is there a down side? I feel almost dependent on it now. Whenever a project gets past a certain size almost feel an allergic reaction to standard patterns and immediately re-wire it with a Dependency Injection framework. The largest issue I've found is it can be confusing for other developers who are just learning it. Also, I'd feel much better if it were a part of the language I was using. Though, for Java at least, there are a couple very lightweight libraries which are quite good. Thoughts? Bad experiences? Or just stop worrying about it?
0
42,710
09/03/2008 22:02:50
4,454
09/03/2008 21:37:46
1
1
Efficient synthesis of a 4-to-1 function in Verilog
I need to implement a 4-to-1 function in Veriog. The input is 4 bits, a number from 0-15. The output is a single bit, 0 or 1. Each input gives a different output and the mapping from inputs to outputs is known, but the inputs and outputs themselves are not. I want vcs to successfully optimizing the code and also have it be as short/neat as possible. My solution so far: wire [3:0] a; wire b; wire [15:0] c; assign c = 16'b0100110010111010; //for example but could be any constant assign b = c[a]; Having to declare c is ugly and I don't know if vcs will recognize the K-map there. Will this work as well as a case statement or an assignment in conjunctive normal form?
logic
version-control
verilog
synthesis
null
null
open
Efficient synthesis of a 4-to-1 function in Verilog === I need to implement a 4-to-1 function in Veriog. The input is 4 bits, a number from 0-15. The output is a single bit, 0 or 1. Each input gives a different output and the mapping from inputs to outputs is known, but the inputs and outputs themselves are not. I want vcs to successfully optimizing the code and also have it be as short/neat as possible. My solution so far: wire [3:0] a; wire b; wire [15:0] c; assign c = 16'b0100110010111010; //for example but could be any constant assign b = c[a]; Having to declare c is ugly and I don't know if vcs will recognize the K-map there. Will this work as well as a case statement or an assignment in conjunctive normal form?
0
42,721
09/03/2008 22:08:20
1,965
08/19/2008 15:51:08
2,624
141
Override Working Folder with Starteam/CruiseControl
For some reason, I can't seem to get CruiseControl.net to checkout code to anywhere but the starteam working folder for a specificed view. I've tried both overrideViewWorkingDir and overrideFolderWorkingDir, and neither seem to work. Has anyone been able to do this?
cruisecontrol.net
starteam
null
null
null
null
open
Override Working Folder with Starteam/CruiseControl === For some reason, I can't seem to get CruiseControl.net to checkout code to anywhere but the starteam working folder for a specificed view. I've tried both overrideViewWorkingDir and overrideFolderWorkingDir, and neither seem to work. Has anyone been able to do this?
0
42,732
09/03/2008 22:16:21
2,373
08/21/2008 21:57:58
54
4
How to catch unhandled exceptions when using .NET Remoting
I want to catch all unhandled exceptions thrown in a remote object on *the server* and log them there before I translate them into some custom exception so that specific exceptions do not cross the client/server boundary. I think I have to use a custom channel sync, but can anyone confirm this and/or have any other advice to give?
c#
error-handling
remoting
null
null
null
open
How to catch unhandled exceptions when using .NET Remoting === I want to catch all unhandled exceptions thrown in a remote object on *the server* and log them there before I translate them into some custom exception so that specific exceptions do not cross the client/server boundary. I think I have to use a custom channel sync, but can anyone confirm this and/or have any other advice to give?
0
42,740
09/03/2008 22:20:15
2,831
08/25/2008 12:57:22
11
0
What is WCF?
Can someone please explain in simple terms what WCF is? It's hard to distill the meaning from the Wikipedia page.
.net
wcf
null
null
null
null
open
What is WCF? === Can someone please explain in simple terms what WCF is? It's hard to distill the meaning from the Wikipedia page.
0
42,749
09/03/2008 22:26:55
44,972
09/02/2008 10:00:56
-7
0
Does the Iphone 1/2 have a compass inside?
Can one be simulated by periodicly syncing with GPS and in the meen while working with the accelerometer? I know for example that the N95 accelerometer is invarient to rotation on the Y axis (while beeing face up/down).
iphone
gps
n95
null
null
null
open
Does the Iphone 1/2 have a compass inside? === Can one be simulated by periodicly syncing with GPS and in the meen while working with the accelerometer? I know for example that the N95 accelerometer is invarient to rotation on the Y axis (while beeing face up/down).
0
42,761
09/03/2008 22:36:45
3,717
08/30/2008 09:44:24
427
20
What documentation and training are you pushing out with your app?
The question is pretty self-explainatory, but for those of you pushing out new applications, or having to support legacy systems, how do you effectively get training for new users out there? I think the way of handing over a book is obsolete, and spending an hour or two showing someone around a system is just a waste of time as a developer, so... - Do you rely on other users of the system to show a newbie? - Do you have documentation that you expect them to read? - Hope that the application interface is intuitive enough for someone performing the job? - Use wiki's or collaborative tools, sharepoint, etc? - Have videos? I'm beginning to half think a simple wiki might be helpful in the long run to explain things that aren't self explanitory, but also linking in screencasts of how to do it in the interface - as long as the interface doesn't change too often to make the screencasts obsolete. What's worked for you and what do you think is worth pursuing?
user-interface
documentation
training
null
null
null
open
What documentation and training are you pushing out with your app? === The question is pretty self-explainatory, but for those of you pushing out new applications, or having to support legacy systems, how do you effectively get training for new users out there? I think the way of handing over a book is obsolete, and spending an hour or two showing someone around a system is just a waste of time as a developer, so... - Do you rely on other users of the system to show a newbie? - Do you have documentation that you expect them to read? - Hope that the application interface is intuitive enough for someone performing the job? - Use wiki's or collaborative tools, sharepoint, etc? - Have videos? I'm beginning to half think a simple wiki might be helpful in the long run to explain things that aren't self explanitory, but also linking in screencasts of how to do it in the interface - as long as the interface doesn't change too often to make the screencasts obsolete. What's worked for you and what do you think is worth pursuing?
0
42,762
09/03/2008 22:36:51
3,663
08/29/2008 18:38:42
8
4
How can I get markdown to format this code properly ?
Here is some code I could not get to format properly in markdown, this is straight C code, pasted into the text box with the '4 spaces' format to denote code: \#define PRINT(x, format, ...) \ if ( x ) { \ if ( debug_fd != NULL ) { \ fprintf(debug_fd, format, ##__VA_ARGS__); \ } \ else { \ fprintf(stdout, format, ##__VA_ARGS__); \ } \ } It seems as though the '\' causes the newlines to be ignored. Ok fine, I am used to this in bash, but if I put '\\' the second one doesn't show up. As if the second one is absorbed. Am I missing something ?
markdown
c
formatting
null
null
null
open
How can I get markdown to format this code properly ? === Here is some code I could not get to format properly in markdown, this is straight C code, pasted into the text box with the '4 spaces' format to denote code: \#define PRINT(x, format, ...) \ if ( x ) { \ if ( debug_fd != NULL ) { \ fprintf(debug_fd, format, ##__VA_ARGS__); \ } \ else { \ fprintf(stdout, format, ##__VA_ARGS__); \ } \ } It seems as though the '\' causes the newlines to be ignored. Ok fine, I am used to this in bash, but if I put '\\' the second one doesn't show up. As if the second one is absorbed. Am I missing something ?
0
42,763
09/03/2008 22:37:47
415
08/05/2008 14:37:16
108
8
Is there a max number of options (values) in HTML drop down control?
Does anyone know how many options a drop down list can have? Is it unlimited? How many before performance degrades?
html
null
null
null
null
null
open
Is there a max number of options (values) in HTML drop down control? === Does anyone know how many options a drop down list can have? Is it unlimited? How many before performance degrades?
0
42,770
09/03/2008 22:46:45
3,210
08/27/2008 13:14:20
13
4
Writing/Using C++ Libraries
I am looking for basic examples/tutorials on: <ol> <li>How to write/compile libraries in C++ (.so files for Linux, .dll files for Windows) and...</li> <li>How to import and use those libraries in other code.</li> </ol> Many thanks in advance!
c++
tutorials
example
null
null
null
open
Writing/Using C++ Libraries === I am looking for basic examples/tutorials on: <ol> <li>How to write/compile libraries in C++ (.so files for Linux, .dll files for Windows) and...</li> <li>How to import and use those libraries in other code.</li> </ol> Many thanks in advance!
0
42,774
09/03/2008 22:49:29
394
08/05/2008 12:36:16
343
42
How can I disable a hotkey in GreaseMonkey while editing?
I'm using Ctrl+Left / Ctrl+Right in a GreaseMonkey script as a hotkey to turn back / forward pages. It seems to works fine, but I want to disable this behavior if I'm in a text edit area. I'm trying to use document.activeElement to get the page active element and test if it's an editable area, but it always returns "undefined".
firefox
greasemonkey
null
null
null
null
open
How can I disable a hotkey in GreaseMonkey while editing? === I'm using Ctrl+Left / Ctrl+Right in a GreaseMonkey script as a hotkey to turn back / forward pages. It seems to works fine, but I want to disable this behavior if I'm in a text edit area. I'm trying to use document.activeElement to get the page active element and test if it's an editable area, but it always returns "undefined".
0
42,778
09/03/2008 22:53:42
381
08/05/2008 10:39:26
1,819
30
Choosing a Perl database interface
Is [CPAN DBI](http://cpan.uwinnipeg.ca/dist/DBI) the best database interface to use in Perl for general database use ? Are there some better options ?
beginner
perl
null
null
null
null
open
Choosing a Perl database interface === Is [CPAN DBI](http://cpan.uwinnipeg.ca/dist/DBI) the best database interface to use in Perl for general database use ? Are there some better options ?
0
42,785
09/03/2008 23:01:59
381
08/05/2008 10:39:26
1,819
30
How to retrofit unit tests into a code base ?
Do you have any strategies for retrofitting unit tests onto a code base that currently has no unit tests ?
language-agnostic
unit-testing
null
null
null
null
open
How to retrofit unit tests into a code base ? === Do you have any strategies for retrofitting unit tests onto a code base that currently has no unit tests ?
0
42,788
09/03/2008 23:03:32
683
08/07/2008 17:57:52
11
3
PHP Library Best Practices?
I'm working on a project that I'd eventually like to package as a reusable PHP library. Can anyone suggest some best practices for doing so? Directory structure? File naming conventions? Anything else I might not be thinking of? Or should I just put everything in an appropriately named .php file or two and call it good? Thanks.
php
null
null
null
null
05/29/2012 06:13:08
not constructive
PHP Library Best Practices? === I'm working on a project that I'd eventually like to package as a reusable PHP library. Can anyone suggest some best practices for doing so? Directory structure? File naming conventions? Anything else I might not be thinking of? Or should I just put everything in an appropriately named .php file or two and call it good? Thanks.
4
42,793
09/03/2008 23:06:44
1,196
08/13/2008 12:33:04
1,370
94
GUI design techinques to enhance user experience
What techniques do you know\use to create user-friendly GUI ? I can name following techniques that I find especially useful: - Non-blocking notifications (floating dialogs like in Firefox3 or Vista's pop-up messages in tray area) - Absence of "Save" button (MS OneNote as an example) - Integrated search Search not only through help files but rather make UI elements searchable. Vista made a good step toward such GUI. [Scout][1] addin Microsoft Office was a really great idea. - Context oriented UI (Ribbon bar in MS Office 2007) [1]: http://www.istartedsomething.com/20070124/scout-office-2007/ Do you implement something like listed techniques in your software?
gui
design
usability
null
null
01/17/2012 21:50:55
not constructive
GUI design techinques to enhance user experience === What techniques do you know\use to create user-friendly GUI ? I can name following techniques that I find especially useful: - Non-blocking notifications (floating dialogs like in Firefox3 or Vista's pop-up messages in tray area) - Absence of "Save" button (MS OneNote as an example) - Integrated search Search not only through help files but rather make UI elements searchable. Vista made a good step toward such GUI. [Scout][1] addin Microsoft Office was a really great idea. - Context oriented UI (Ribbon bar in MS Office 2007) [1]: http://www.istartedsomething.com/20070124/scout-office-2007/ Do you implement something like listed techniques in your software?
4
42,797
09/03/2008 23:09:55
729
08/08/2008 12:30:11
120
15
What is a good deployment tool for websites on Windows?
I'm looking for something that can copy (preferably only changed) files from a development machine to a staging machine and finally to a set of production machines. A "what if" mode would be nice as would the capability to "rollback" the last deployment. Database migrations aren't a necessary feature.
iis
deployment
null
null
null
null
open
What is a good deployment tool for websites on Windows? === I'm looking for something that can copy (preferably only changed) files from a development machine to a staging machine and finally to a set of production machines. A "what if" mode would be nice as would the capability to "rollback" the last deployment. Database migrations aren't a necessary feature.
0
42,804
09/03/2008 23:18:01
1,647
08/17/2008 18:32:33
25
6
Chrome tabs and processes
I was reading googlebooks on chrome, where they talk about why they decided to spin up a process to host browser tab, every time you created a new tab.' So 2 tabs = 2 chrome processes 3 tabs = 3 chrome processes and so on .. right?? But i opened up some 20 or so tabs, but in task manager, i could only find 3 chrome processes.. What is going on?? I was taught that creating a process is an expensive proposition in terms of resources needed, and there are other light weight options available (like app domains in .net for ex).. So is chrome taking some hybrid approach?? Create few processes and then start hosting additional tabs inside those limited set of processes??
google-chrome
null
null
null
null
null
open
Chrome tabs and processes === I was reading googlebooks on chrome, where they talk about why they decided to spin up a process to host browser tab, every time you created a new tab.' So 2 tabs = 2 chrome processes 3 tabs = 3 chrome processes and so on .. right?? But i opened up some 20 or so tabs, but in task manager, i could only find 3 chrome processes.. What is going on?? I was taught that creating a process is an expensive proposition in terms of resources needed, and there are other light weight options available (like app domains in .net for ex).. So is chrome taking some hybrid approach?? Create few processes and then start hosting additional tabs inside those limited set of processes??
0
42,814
09/03/2008 23:20:30
4,463
09/03/2008 22:51:36
1
0
MAC address in Compact Framework
How can I get the MAC Address using only the compact framework?
compactframework
mac-address
null
null
null
null
open
MAC address in Compact Framework === How can I get the MAC Address using only the compact framework?
0
42,822
09/03/2008 23:25:47
493
08/06/2008 10:25:05
2,931
185
"Out of Band" Processing Techiniques for asp.net applications
Jeff has previously blogged about [using the cache][1] to perform "out of band" processing on his websites, however I was wondering what other techniques people are using to process these sorts of tasks? [1]: http://blog.stackoverflow.com/2008/07/easy-background-tasks-in-aspnet/
asp.net
background
scheduledtasks
outofband
null
null
open
"Out of Band" Processing Techiniques for asp.net applications === Jeff has previously blogged about [using the cache][1] to perform "out of band" processing on his websites, however I was wondering what other techniques people are using to process these sorts of tasks? [1]: http://blog.stackoverflow.com/2008/07/easy-background-tasks-in-aspnet/
0
42,826
09/03/2008 23:27:07
1,154
08/12/2008 23:39:07
338
37
Where to start with Entity Framework
Anyone know a good book or post about how to start in EF? I have seen the DnrTV any other place?
.net-3.5
entity-framework
null
null
null
null
open
Where to start with Entity Framework === Anyone know a good book or post about how to start in EF? I have seen the DnrTV any other place?
0
42,828
09/03/2008 23:27:56
4,433
09/03/2008 18:23:30
1
0
Mixing jsp and jsf
I will elaborate somewhat. Jsf is kind-of extremely painful for working with from designer's perspective, somewhat in the range of trying to draw a picture while having hands tied at your back, but it is good for chewing up forms and listing lots of data. So sites we are making in my company are jsf admin pages and jsp user pages. Problem occurs when user pages have some complicated forms and stuff and jsf starts kickin' in. Here is the question: I'm on pure jsp page. I need to access some jsf page that uses session bean. How can I initialize that bean? If I was on jsf page, I could have some commandLink which would prepare data. Only thing I can come up with is having dummy jsf page that will do the work and redirect me to needed jsf page, but that's kind of ugly, and I don't want to end up with 50 dummy pages. I would rather find some mechanism to reinitialize bean that is already in session with some wanted parameters.
jsp
jsf
null
null
null
null
open
Mixing jsp and jsf === I will elaborate somewhat. Jsf is kind-of extremely painful for working with from designer's perspective, somewhat in the range of trying to draw a picture while having hands tied at your back, but it is good for chewing up forms and listing lots of data. So sites we are making in my company are jsf admin pages and jsp user pages. Problem occurs when user pages have some complicated forms and stuff and jsf starts kickin' in. Here is the question: I'm on pure jsp page. I need to access some jsf page that uses session bean. How can I initialize that bean? If I was on jsf page, I could have some commandLink which would prepare data. Only thing I can come up with is having dummy jsf page that will do the work and redirect me to needed jsf page, but that's kind of ugly, and I don't want to end up with 50 dummy pages. I would rather find some mechanism to reinitialize bean that is already in session with some wanted parameters.
0
42,830
09/03/2008 23:29:43
2,034
08/19/2008 21:29:30
41
1
Setting Focus with ASP.NET AJAX Control Toolkit
I'm using the <a href="http://www.asp.net/AJAX/AjaxControlToolkit/Samples/AutoComplete/AutoComplete.aspx">AutoComplete</a> control from the ASP.NET AJAX Control Toolkit and I'm experiencing an issue where the AutoComplete does not populate when I set the focus to the assigned textbox. I've tried setting the focus in the Page_Load, Page_PreRender, and Page_Init events and the focus is set properly but the AutoComplete does not work. If I don't set the focus, everything works fine but I'd like to set it so the users don't have that extra click. Is there a special place I need to set the focus or something else I need to do to make this work? Thanks.
asp.net
ajaxtoolkit
null
null
null
null
open
Setting Focus with ASP.NET AJAX Control Toolkit === I'm using the <a href="http://www.asp.net/AJAX/AjaxControlToolkit/Samples/AutoComplete/AutoComplete.aspx">AutoComplete</a> control from the ASP.NET AJAX Control Toolkit and I'm experiencing an issue where the AutoComplete does not populate when I set the focus to the assigned textbox. I've tried setting the focus in the Page_Load, Page_PreRender, and Page_Init events and the focus is set properly but the AutoComplete does not work. If I don't set the focus, everything works fine but I'd like to set it so the users don't have that extra click. Is there a special place I need to set the focus or something else I need to do to make this work? Thanks.
0
42,833
09/03/2008 23:30:48
4,464
09/03/2008 22:59:13
1
0
How do I avoid having the database password stored in plaintext in sourcecode?
In the web-application I'm developing I currently use a naive solution when connecting to the database: Connection c = DriverManager.getConnection("url", "username", "password"); This is pretty unsafe. If an attacker gains access to the sourcecode he also gains access to the database itself. How can my web-application connect to the database without storing the database-password in plaintext in the sourcecode?
language-agnostic
passwords
database-connection
sourcecode
null
null
open
How do I avoid having the database password stored in plaintext in sourcecode? === In the web-application I'm developing I currently use a naive solution when connecting to the database: Connection c = DriverManager.getConnection("url", "username", "password"); This is pretty unsafe. If an attacker gains access to the sourcecode he also gains access to the database itself. How can my web-application connect to the database without storing the database-password in plaintext in the sourcecode?
0
42,852
09/03/2008 23:41:06
2,623
08/23/2008 17:47:05
1
0
How do I figure out what I need to know?
I am a novice programmer who is trying to teach myself to code, specifically in C#. I've taken on a project from a friend of mine and I am not sure what I need to know to get the project done. I suppose the issue is I don't know what I need to know to even get the project started. I do have many of the basics of object oriented programming, classes, methods and what-not, but when I sit down to code-I don't know where to begin looking to accomplish even basic tasks. I don't know syntax or what the language is capable of with the tools provided. I have read some books, but they mostly seem to be about the concepts and theories about OOP within C# with minimal syntax. I guess the question is where do I look to learn the syntax-is there some sort of repository of classes and methods that I am missing with examples of how to use the tools it contains? I am stuck in a place of not knowing where to go/look next. Thanks for any help
c#
syntax
repository
null
null
null
open
How do I figure out what I need to know? === I am a novice programmer who is trying to teach myself to code, specifically in C#. I've taken on a project from a friend of mine and I am not sure what I need to know to get the project done. I suppose the issue is I don't know what I need to know to even get the project started. I do have many of the basics of object oriented programming, classes, methods and what-not, but when I sit down to code-I don't know where to begin looking to accomplish even basic tasks. I don't know syntax or what the language is capable of with the tools provided. I have read some books, but they mostly seem to be about the concepts and theories about OOP within C# with minimal syntax. I guess the question is where do I look to learn the syntax-is there some sort of repository of classes and methods that I am missing with examples of how to use the tools it contains? I am stuck in a place of not knowing where to go/look next. Thanks for any help
0
42,863
09/03/2008 23:50:25
1,196
08/13/2008 12:33:04
1,370
96
What metrics for GUI usability do you know?
Of course the best metric would be a happiness of your users. But what metrics do you know for GUI usability measurements? For example, one of the common metrics is a average click count to perform action. What other metrics do you know?
gui
usability
metrics
null
null
null
open
What metrics for GUI usability do you know? === Of course the best metric would be a happiness of your users. But what metrics do you know for GUI usability measurements? For example, one of the common metrics is a average click count to perform action. What other metrics do you know?
0
42,876
09/04/2008 00:02:21
486
08/06/2008 09:19:11
742
52
PHP, Arrays, and References
Why does the following code not work as I was expecting? <?php $data = array( array('Area1', null, null), array(null, 'Section1', null), array(null, null, 'Location1'), array('Area2', null, null), array(null, 'Section2', null), array(null, null, 'Location2') ); $root = array(); foreach ($data as $row) { if ($row[0]) { $area = array(); $root[$row[0]] =& $area; } elseif ($row[1]) { $section = array(); $area[$row[1]] =& $section; } elseif ($row[2]) { $section[] = $row[2]; } } print_r($root); Expected result: Array( [Area1] => Array( [Section1] => Array( [0] => Location1 ) ) [Area2] => Array( [Section2] => Array( [0] => Location2 ) ) ) Actual result: Array( [Area1] => Array( [Section2] => Array( [0] => Location2 ) ) [Area2] => Array( [Section2] => Array( [0] => Location2 ) ) )
php
arrays
reference
null
null
null
open
PHP, Arrays, and References === Why does the following code not work as I was expecting? <?php $data = array( array('Area1', null, null), array(null, 'Section1', null), array(null, null, 'Location1'), array('Area2', null, null), array(null, 'Section2', null), array(null, null, 'Location2') ); $root = array(); foreach ($data as $row) { if ($row[0]) { $area = array(); $root[$row[0]] =& $area; } elseif ($row[1]) { $section = array(); $area[$row[1]] =& $section; } elseif ($row[2]) { $section[] = $row[2]; } } print_r($root); Expected result: Array( [Area1] => Array( [Section1] => Array( [0] => Location1 ) ) [Area2] => Array( [Section2] => Array( [0] => Location2 ) ) ) Actual result: Array( [Area1] => Array( [Section2] => Array( [0] => Location2 ) ) [Area2] => Array( [Section2] => Array( [0] => Location2 ) ) )
0
42,877
09/04/2008 00:02:38
1,196
08/13/2008 12:33:04
1,370
97
User studies: best practices
What are the best practices for user studies? Did you ever conduct one?
untagged
null
null
null
null
05/30/2012 11:07:49
not constructive
User studies: best practices === What are the best practices for user studies? Did you ever conduct one?
4
42,879
09/04/2008 00:03:55
4,491
09/04/2008 06:44:23
8
0
Suggestions for migrating ASP.net app from 1.1 forward
I am recently in charge of an older app written in C# using asp.net 1.1. 1. Are there any resources to guide me in converting the application to a newer version of of the .NET Framework. _My main pause is that there are ton's of customized DataGrids in the app as it is written now and since so much of the code needs to be rewritten to use GridViews_ ... 2. is it worth trying to convert the grids in the application to use Silverlight in the attempt to move this code into the future.
c#
asp.net
silverlight
null
null
null
open
Suggestions for migrating ASP.net app from 1.1 forward === I am recently in charge of an older app written in C# using asp.net 1.1. 1. Are there any resources to guide me in converting the application to a newer version of of the .NET Framework. _My main pause is that there are ton's of customized DataGrids in the app as it is written now and since so much of the code needs to be rewritten to use GridViews_ ... 2. is it worth trying to convert the grids in the application to use Silverlight in the attempt to move this code into the future.
0
42,894
09/04/2008 00:20:58
438
08/05/2008 18:28:20
23
1
blockquote vs div
Is there any benefit in using a blockquote over a div? I was looking at a website's mark up to learn css and I couldn't figure out why the blockquote was being used.
blockquote
div
css
null
null
null
open
blockquote vs div === Is there any benefit in using a blockquote over a div? I was looking at a website's mark up to learn css and I couldn't figure out why the blockquote was being used.
0
42,899
09/04/2008 00:23:28
130,278
09/02/2008 03:00:54
1
0
RDMS for C language newbie?
what database system should a beginner in c language to use? Can i use MySQL? Thanks
c
sql
rdms
database
null
null
open
RDMS for C language newbie? === what database system should a beginner in c language to use? Can i use MySQL? Thanks
0
42,901
09/04/2008 00:25:25
1,862
08/18/2008 23:53:20
1,303
106
Should programmers start with basic
I was reading [this question][1], and it really made me question using C# as a starting point for programming. I think this is why people should start with Basic, then move up to C, and then move on to stuff like C++, Java, .Net, or other advanced languages afterwards. I'm a .Net developer, and I seriously think that starting out in .Net would have been a mistake, or at least would have made it much more difficult to get started. Firstly, just the sheer number of available classes and functions in the .Net API is too overwhelming for a programmer who is just starting out. Also, I find that especially if you follow the .Net way of programming, that way too much gets abstracted away, to the point where the programmer doesn't understand what's going on behind the scenes. Many programmers of web applications don't even know how things behind the scenes work, and don't understand the difference between client side and server side code, and don't get why you can't write the login code in Javascript. Starting in basic, and other simple languages allows people to just thing about their own code. There aren't any complicated libraries to think about. Nothing is abstracted away. This means you won't be able to get as much functionality as quickly, but you will understand how things actually work. What are the thoughts of everybody else? Can you get a good grasp on programming without touching things like Basic and C? Are .Net and similar environments too much for beginners to grasp? [1]: http://stackoverflow.com/questions/42852/how-do-i-figure-out-what-i-need-to-know
starting-out
null
null
null
null
null
open
Should programmers start with basic === I was reading [this question][1], and it really made me question using C# as a starting point for programming. I think this is why people should start with Basic, then move up to C, and then move on to stuff like C++, Java, .Net, or other advanced languages afterwards. I'm a .Net developer, and I seriously think that starting out in .Net would have been a mistake, or at least would have made it much more difficult to get started. Firstly, just the sheer number of available classes and functions in the .Net API is too overwhelming for a programmer who is just starting out. Also, I find that especially if you follow the .Net way of programming, that way too much gets abstracted away, to the point where the programmer doesn't understand what's going on behind the scenes. Many programmers of web applications don't even know how things behind the scenes work, and don't understand the difference between client side and server side code, and don't get why you can't write the login code in Javascript. Starting in basic, and other simple languages allows people to just thing about their own code. There aren't any complicated libraries to think about. Nothing is abstracted away. This means you won't be able to get as much functionality as quickly, but you will understand how things actually work. What are the thoughts of everybody else? Can you get a good grasp on programming without touching things like Basic and C? Are .Net and similar environments too much for beginners to grasp? [1]: http://stackoverflow.com/questions/42852/how-do-i-figure-out-what-i-need-to-know
0
42,908
09/04/2008 00:26:55
1,647
08/17/2008 18:32:33
32
9
where is the chink in google-chrome??
While browsing with chrome, i noticed that it responds extremely fast ( in comparison with IE and firefox on my laptop) in terms of rendering pages, including javascript heavy sites like gmail. This is what googlebook on chrome has to say 1. tabs are hosted in process rather than thread. 2. compile javascript using V8 engine as opposed to interpreting. 3. Introduce new virtual machine to support javascript heavy apps 4. introduce "hidden class transitions" and apply dynamic optimization to speed up things. 5. Replace inefficient "Conservative garbage colllection" scheme with more precise garbage collection scheme. 6. Introduce their own task scheduler and memory manager to manage the browser environment. All this sounds so familiar, and Microsoft has been doing such things for long time.. Windows os, C++, C# etc compilers, CLR, and so on. So why microsoft or any other browser vendor is not taking chrome's approach??. Is there a flaw in Chrome's approach?? If not, is the rest of browser vendor community caught unaware with google's approach??.. Just wondering..
google-chrome
null
null
null
null
null
open
where is the chink in google-chrome?? === While browsing with chrome, i noticed that it responds extremely fast ( in comparison with IE and firefox on my laptop) in terms of rendering pages, including javascript heavy sites like gmail. This is what googlebook on chrome has to say 1. tabs are hosted in process rather than thread. 2. compile javascript using V8 engine as opposed to interpreting. 3. Introduce new virtual machine to support javascript heavy apps 4. introduce "hidden class transitions" and apply dynamic optimization to speed up things. 5. Replace inefficient "Conservative garbage colllection" scheme with more precise garbage collection scheme. 6. Introduce their own task scheduler and memory manager to manage the browser environment. All this sounds so familiar, and Microsoft has been doing such things for long time.. Windows os, C++, C# etc compilers, CLR, and so on. So why microsoft or any other browser vendor is not taking chrome's approach??. Is there a flaw in Chrome's approach?? If not, is the rest of browser vendor community caught unaware with google's approach??.. Just wondering..
0
42,934
09/04/2008 00:46:36
1,862
08/18/2008 23:53:20
1,314
106
What's with the love of dynamic Languages
It seems that everybody is jumping on the dynamic, non-compiled bandwagon lately. I've mostly only worked in compiled, static typed languages (C, Java, .Net). The experience I have with dynamic languages is stuff like ASP (Vb Script), JavaScript, and PHP. Using these technologies has left a bad taste in my mouth when thinking about dynamic languages. Things that usually would have been caught by the compiler such as misspelled variable names and assigning an value of the wrong type to a variable don't occur until runtime. And even then, you may not notice an error, as it just creates a new variable, and assigns some default value. I've also never seen intellisense work well in a dynamic language, since, well, variables don't have any explicit type. What I want to know is, what people find so appealing about dynamic languages? What are the main advantages in terms of things that dynamic languages allow you to do that can't be done, or are difficult to do in compiled languages. It seems to me that we decided a long time ago, that things like uncompiled asp pages throwing runtime exceptions was a bad idea. Why is there is a resurgence of this type of code? And why does it seem to me at least, that Ruby on Rails doesn't really look like anything you couldn't have done with ASP 10 years ago?
dynamic
ruby
.net
static
null
10/05/2011 02:52:13
not constructive
What's with the love of dynamic Languages === It seems that everybody is jumping on the dynamic, non-compiled bandwagon lately. I've mostly only worked in compiled, static typed languages (C, Java, .Net). The experience I have with dynamic languages is stuff like ASP (Vb Script), JavaScript, and PHP. Using these technologies has left a bad taste in my mouth when thinking about dynamic languages. Things that usually would have been caught by the compiler such as misspelled variable names and assigning an value of the wrong type to a variable don't occur until runtime. And even then, you may not notice an error, as it just creates a new variable, and assigns some default value. I've also never seen intellisense work well in a dynamic language, since, well, variables don't have any explicit type. What I want to know is, what people find so appealing about dynamic languages? What are the main advantages in terms of things that dynamic languages allow you to do that can't be done, or are difficult to do in compiled languages. It seems to me that we decided a long time ago, that things like uncompiled asp pages throwing runtime exceptions was a bad idea. Why is there is a resurgence of this type of code? And why does it seem to me at least, that Ruby on Rails doesn't really look like anything you couldn't have done with ASP 10 years ago?
4
42,936
09/04/2008 00:47:00
493
08/06/2008 10:25:05
2,946
185
Load readonly database tables into memory
In one of my applications I have a 1gb database table that is used for reference data. It has a huge amounts of reads coming off that table but there are no writes ever. I was wondering if there's any way that data could be loaded into RAM so that it doesn't have to be accessed from disk? I'm using SQL Server 2005
sql-server
sql2005
caching
null
null
null
open
Load readonly database tables into memory === In one of my applications I have a 1gb database table that is used for reference data. It has a huge amounts of reads coming off that table but there are no writes ever. I was wondering if there's any way that data could be loaded into RAM so that it doesn't have to be accessed from disk? I'm using SQL Server 2005
0
42,937
09/04/2008 00:47:45
479
08/06/2008 08:37:10
205
20
URL Rewrite Module for IIS 7
Does anyone have experience using the URL Rewrite Module (see [here][1])? Can it be used to do reverse proxy? [1]: http://blogs.iis.net/bills/archive/2008/07/09/new-iis7-releases-url-rewrite-application-routing-and-load-balancing-and-powershell-cmd-lets.aspx
iis7
reverse-proxy
null
null
null
null
open
URL Rewrite Module for IIS 7 === Does anyone have experience using the URL Rewrite Module (see [here][1])? Can it be used to do reverse proxy? [1]: http://blogs.iis.net/bills/archive/2008/07/09/new-iis7-releases-url-rewrite-application-routing-and-load-balancing-and-powershell-cmd-lets.aspx
0
42,950
09/04/2008 00:54:44
680
08/07/2008 17:29:04
487
14
Get Last Day of the Month in Python
Is there a way using Python's standard library to easily determine (i.e. one function call) the last day of a given month? If the standard library doesn't support that, does the dateutil package support this?
python
date
null
null
null
null
open
Get Last Day of the Month in Python === Is there a way using Python's standard library to easily determine (i.e. one function call) the last day of a given month? If the standard library doesn't support that, does the dateutil package support this?
0
42,954
09/04/2008 00:57:42
1,682
08/18/2008 00:10:52
1
1
Backward Converting SQL Databases
Does anyone know of any free tools that can assist in converting an SQL2005 database back to SQL200 format? I know that you can script all the objects and then do a dump of the data, but this is a lot of work to do manually.
sql-server
database
null
null
null
null
open
Backward Converting SQL Databases === Does anyone know of any free tools that can assist in converting an SQL2005 database back to SQL200 format? I know that you can script all the objects and then do a dump of the data, but this is a lot of work to do manually.
0
42,966
09/04/2008 01:06:51
2,066
08/20/2008 03:59:13
120
13
Google Suggestish text box
What would be the easiest way to develop a text box that remembers the last x number of entries that were put into it. This is a standalone app written with C#.
c#
windows-app
null
null
null
null
open
Google Suggestish text box === What would be the easiest way to develop a text box that remembers the last x number of entries that were put into it. This is a standalone app written with C#.
0
42,973
09/04/2008 01:11:18
194
08/03/2008 10:56:49
2,082
145
Debugging DLL Called With CeRapiInvoke
I'm trying to debug into a C dll that is invoked on a Windows Mobile device using CeRapiInvoke() (Technically RAPI.Invoke() from OpenNETCF) from a Windows box. I'm very familiar with attaching to a process that is already running to debug a loaded dll (I've done it many time with Windows Mobile services) but I can't seem to figure out what process is actually running the dll. Even when running the Remote Process Viewer I don't see any new processes pop up, so it must be something that is already running... Any ideas as to which process to attach to in order to debug into the dll when invoked?
windows-mobile
dll
rapi
null
null
null
open
Debugging DLL Called With CeRapiInvoke === I'm trying to debug into a C dll that is invoked on a Windows Mobile device using CeRapiInvoke() (Technically RAPI.Invoke() from OpenNETCF) from a Windows box. I'm very familiar with attaching to a process that is already running to debug a loaded dll (I've done it many time with Windows Mobile services) but I can't seem to figure out what process is actually running the dll. Even when running the Remote Process Viewer I don't see any new processes pop up, so it must be something that is already running... Any ideas as to which process to attach to in order to debug into the dll when invoked?
0
42,980
09/04/2008 01:14:33
3,547
08/29/2008 04:44:20
31
5
How to use p4merge as the merge/diff tool for Mercurial?
Does anyone know how to setup [Mercurial][1] to use [p4merge][2] as the merge/diff tool on OS X 10.5? [1]: http://www.selenic.com/mercurial/wiki/index.cgi/Mercurial [2]: http://www.perforce.com/perforce/products/merge.html
osx
mercurial
perforce
null
null
null
open
How to use p4merge as the merge/diff tool for Mercurial? === Does anyone know how to setup [Mercurial][1] to use [p4merge][2] as the merge/diff tool on OS X 10.5? [1]: http://www.selenic.com/mercurial/wiki/index.cgi/Mercurial [2]: http://www.perforce.com/perforce/products/merge.html
0
42,984
09/04/2008 01:18:50
3,717
08/30/2008 09:44:24
434
20
How do you add a web reference through a proxy/firewall?
I'm behind a firewall at work at the moment and I was testing something that I had deployed to my website, and the work proxy seems to be blocking it somewhat. Basically I am getting a message of: > Operation is not valid due to the current state of the object I've got it down to my proxy interferring, but I can't see any advanced settings or anything I can set up to go through my proxy to get to my service. I did a quick google for it, but no joy. Anyone found a quick way to get around it?
.net
proxy
web-reference
null
null
null
open
How do you add a web reference through a proxy/firewall? === I'm behind a firewall at work at the moment and I was testing something that I had deployed to my website, and the work proxy seems to be blocking it somewhat. Basically I am getting a message of: > Operation is not valid due to the current state of the object I've got it down to my proxy interferring, but I can't see any advanced settings or anything I can set up to go through my proxy to get to my service. I did a quick google for it, but no joy. Anyone found a quick way to get around it?
0
42,987
09/04/2008 01:20:39
645
08/07/2008 12:58:41
141
18
.NET IPC without having a service mediator
I have two unrelated processes that use .NET assemblies as plugins. However, either process can be started/stopped at any time. I can't rely on a particular process being the server. In fact, there may be multiple copies running of one of the processes, but only one of the other. I initially implemented a solution based off of <a href="http://www.developer.com/net/net/article.php/3520891">this article</a>. However, this requires the one implementing the server to be running before the client. Whats the best way to implement some kind of notification to the server when the client(s) were running first?
c#
.net
windows
remoting
ipc
null
open
.NET IPC without having a service mediator === I have two unrelated processes that use .NET assemblies as plugins. However, either process can be started/stopped at any time. I can't rely on a particular process being the server. In fact, there may be multiple copies running of one of the processes, but only one of the other. I initially implemented a solution based off of <a href="http://www.developer.com/net/net/article.php/3520891">this article</a>. However, this requires the one implementing the server to be running before the client. Whats the best way to implement some kind of notification to the server when the client(s) were running first?
0
42,990
09/04/2008 01:22:58
3,535
08/29/2008 02:26:17
113
26
Regex to match against something that is not a specific substring
I am looking for a regex that will match a string that starts with one substring and does not end with a certain substring. Example: foo.*(^bar) Should match anything that starts with "foo" and doesn't end with "bar". I know about the [^...] syntax, but I can't find anything that will do that for a string instead of single characters. I am specifically trying to do this for Java's regex, but I've run into this before so answers for other regex engines would be great too.
regex
java
null
null
null
null
open
Regex to match against something that is not a specific substring === I am looking for a regex that will match a string that starts with one substring and does not end with a certain substring. Example: foo.*(^bar) Should match anything that starts with "foo" and doesn't end with "bar". I know about the [^...] syntax, but I can't find anything that will do that for a string instead of single characters. I am specifically trying to do this for Java's regex, but I've run into this before so answers for other regex engines would be great too.
0
42,996
09/04/2008 01:26:23
1,293
08/14/2008 12:38:08
697
62
ASP.NET MVC and Spring.NET
Starting a new project and would like to use one of the MVC framworks. [ASP.NET MVC][1] is still in preview but [Spring.net][2] is in production and has a history with Java. I'd like to know the general lowdown between the two. Current questions.. What are the major feature differences? What about deployment/hosting issues? Future support? Do you think Spring.net will fade once ASP.NET MVC is in production. Current Support? I saw the Jeff twitting about a breaking change in the next preview. Thanks! [1]: http://www.asp.net/mvc/ [2]: http://springframework.net/
asp.net-mvc
framework
spring.net
null
null
null
open
ASP.NET MVC and Spring.NET === Starting a new project and would like to use one of the MVC framworks. [ASP.NET MVC][1] is still in preview but [Spring.net][2] is in production and has a history with Java. I'd like to know the general lowdown between the two. Current questions.. What are the major feature differences? What about deployment/hosting issues? Future support? Do you think Spring.net will fade once ASP.NET MVC is in production. Current Support? I saw the Jeff twitting about a breaking change in the next preview. Thanks! [1]: http://www.asp.net/mvc/ [2]: http://springframework.net/
0
43,006
09/04/2008 01:30:11
4,463
09/03/2008 22:51:36
1
1
Transmiting data throught the Serial Port
I'm working with the SerialPort class in the Compact Framework, but I can't recive more than 2047 bytes. Exists any limit for the amount of bytes that I can recive? or How can I setup the object? I was trying with the WriteBufferSize and ReadBufferSize properties but they didn't work.
compact-framework
serial-port
null
null
null
null
open
Transmiting data throught the Serial Port === I'm working with the SerialPort class in the Compact Framework, but I can't recive more than 2047 bytes. Exists any limit for the amount of bytes that I can recive? or How can I setup the object? I was trying with the WriteBufferSize and ReadBufferSize properties but they didn't work.
0
43,019
09/04/2008 01:38:19
4,473
09/04/2008 01:17:18
1
1
.NET 2008 Convert to Website
I have upgraded a MS Visual Studio Application from VS 2003 to VS 2008 (Targeting .NET 2.0). As part of the conversion process the wizard said I needed to take the additional step of Converting my Project to a Website by Right-Clicking and blah blah blah... I didn't follow directions and the web application seems to be working fine. My question is, should I be concerned about pushing this to a production system? What exactly is going on here? Thanks in Advance!
vs2008
upgrading
web-applications
null
null
null
open
.NET 2008 Convert to Website === I have upgraded a MS Visual Studio Application from VS 2003 to VS 2008 (Targeting .NET 2.0). As part of the conversion process the wizard said I needed to take the additional step of Converting my Project to a Website by Right-Clicking and blah blah blah... I didn't follow directions and the web application seems to be working fine. My question is, should I be concerned about pushing this to a production system? What exactly is going on here? Thanks in Advance!
0
43,021
09/04/2008 01:38:39
364
08/05/2008 05:33:41
487
28
(C#) Get index of current foreach iteration
Is there some rare language construct I haven't encountered (like the few I've learned recently, some on Stack Overflow) in C# to get a value representing the current iteration of a foreach loop? For instance, I currently do something like this depending on the circumstances: int i=0; foreach (Object o in collection) { ... i++; }
c#
null
null
null
null
null
open
(C#) Get index of current foreach iteration === Is there some rare language construct I haven't encountered (like the few I've learned recently, some on Stack Overflow) in C# to get a value representing the current iteration of a foreach loop? For instance, I currently do something like this depending on the circumstances: int i=0; foreach (Object o in collection) { ... i++; }
0
43,044
09/04/2008 01:54:12
3,415
08/28/2008 13:44:19
86
6
Coloring Algorithm
I'm looking for a simple algorithm to generate a large number of random, aesthetically pleasing colors. So no crazy neon colors, colors reminiscent of feces, etc. I've found solutions to this problem but they rely on alternative color pallets than RGB. I would rather just use straight RGB than mapping back and forth. These other solutions also can at most generate only 32 or so pleasing random colors. Any idea's would be great. Thanks, Brian Gianforcaro
algorithm
colors
null
null
null
null
open
Coloring Algorithm === I'm looking for a simple algorithm to generate a large number of random, aesthetically pleasing colors. So no crazy neon colors, colors reminiscent of feces, etc. I've found solutions to this problem but they rely on alternative color pallets than RGB. I would rather just use straight RGB than mapping back and forth. These other solutions also can at most generate only 32 or so pleasing random colors. Any idea's would be great. Thanks, Brian Gianforcaro
0
43,051
09/04/2008 01:57:53
3,631
08/29/2008 16:06:08
343
28
C# numeric constants
I have the following C# code: <pre> byte rule = 0; ... rule = rule | 0x80; </pre> which produces the error: *Cannot implicitly convert type 'int' to 'byte'. An explicit conversion exists (are you missing a cast?)* Sure enough adding the cast fixes the problem ... but is ugly. <pre> rule = rule | (byte) 0x80; </pre> Is there any other way of telling the compiler to treat the constant as a byte?
c#
null
null
null
null
null
open
C# numeric constants === I have the following C# code: <pre> byte rule = 0; ... rule = rule | 0x80; </pre> which produces the error: *Cannot implicitly convert type 'int' to 'byte'. An explicit conversion exists (are you missing a cast?)* Sure enough adding the cast fixes the problem ... but is ugly. <pre> rule = rule | (byte) 0x80; </pre> Is there any other way of telling the compiler to treat the constant as a byte?
0
43,076
09/04/2008 02:12:29
2,659
08/24/2008 02:37:40
88
5
How do you know if you can use a patented algorithm?
I've been reading up on Sun's new [Garbage First][1] garbage collection algorithm, and was considering using it on a personal project. When googling for more information I found that it is patented, which raises the question if I could ever release my code. How can I tell whether this specific research is safe to learn from and use? Did Sun patent it to prevent others from using it or prevent others from claiming ownership? This also makes me worried about all of the other research papers on garbage collection I've read on citeseer or otherwise. [1]: http://developers.sun.com/learning/javaoneonline/j1sessn.jsp?sessn=TS-5419&yr=2008&track=javase
algorithm
gc
patents
null
null
null
open
How do you know if you can use a patented algorithm? === I've been reading up on Sun's new [Garbage First][1] garbage collection algorithm, and was considering using it on a personal project. When googling for more information I found that it is patented, which raises the question if I could ever release my code. How can I tell whether this specific research is safe to learn from and use? Did Sun patent it to prevent others from using it or prevent others from claiming ownership? This also makes me worried about all of the other research papers on garbage collection I've read on citeseer or otherwise. [1]: http://developers.sun.com/learning/javaoneonline/j1sessn.jsp?sessn=TS-5419&yr=2008&track=javase
0
43,086
09/04/2008 02:24:38
130,278
09/02/2008 03:00:54
3
4
Best way to multi-thread?
What is the best way to multi-thread in c language? Very efficient or not CPU hog. Thanks
c
mulithread
null
null
null
09/16/2011 09:36:47
not constructive
Best way to multi-thread? === What is the best way to multi-thread in c language? Very efficient or not CPU hog. Thanks
4
43,099
09/04/2008 02:34:41
3,830
08/31/2008 05:08:21
1
0
How can I get a commit message from a bzr post-commit hook?
I'm trying to write a bzr post-commit hook for my private bugtracker, but I'm stuck at the function signature of post_commit(local, master, old_revno, old_revid, new_revno, mew_revid). How can I extract the commit message for the branch from this with bzrlib in Python?
python
dvcs
bazaar
null
null
null
open
How can I get a commit message from a bzr post-commit hook? === I'm trying to write a bzr post-commit hook for my private bugtracker, but I'm stuck at the function signature of post_commit(local, master, old_revno, old_revid, new_revno, mew_revid). How can I extract the commit message for the branch from this with bzrlib in Python?
0
43,111
09/04/2008 02:58:16
653
08/07/2008 14:31:07
315
20
LINQ to SQL for self-referencing tables?
Let's see if I can describe this well... Say, I have a self referencing Categories table. Each Category has a CategoryID, ParentCategoryID, CategoryName, etc. And each category can have any number of sub categories, and each of those sub categories can have any number of sub categories, and so and and so forth. So basically the tree can be X levels deep. Then Products are associated to leaf (sub) Categories. Is there a way to get all the Products for any given Category (which would be all the products associated to all its leaf descendants) using LINQ to SQL? This feels like a recursive problem. Is it better to used a Stored Procedure instead? Thanks in advanced!
database
linq-to-sql
null
null
null
null
open
LINQ to SQL for self-referencing tables? === Let's see if I can describe this well... Say, I have a self referencing Categories table. Each Category has a CategoryID, ParentCategoryID, CategoryName, etc. And each category can have any number of sub categories, and each of those sub categories can have any number of sub categories, and so and and so forth. So basically the tree can be X levels deep. Then Products are associated to leaf (sub) Categories. Is there a way to get all the Products for any given Category (which would be all the products associated to all its leaf descendants) using LINQ to SQL? This feels like a recursive problem. Is it better to used a Stored Procedure instead? Thanks in advanced!
0
43,116
09/04/2008 03:01:25
3,830
08/31/2008 05:08:21
1
0
How can I run an external program from C and parse its output?
I've got a utility that outputs a list of files required by a game. How can I run that utility and grab its output so I can act on it inside of a C program?
c
external-process
null
null
null
null
open
How can I run an external program from C and parse its output? === I've got a utility that outputs a list of files required by a game. How can I run that utility and grab its output so I can act on it inside of a C program?
0
43,126
09/04/2008 03:08:51
4,140
09/02/2008 01:10:54
66
11
IList.Cast<typeof(T)>() returns error, syntax looks ok
public static IList<T> LoadObjectListAll<T>() { ISession session = CheckForExistingSession(); var cfg = new NHibernate.Cfg.Configuration().Configure(); var returnList = session.CreateCriteria(typeof(T)); var list = returnList.List(); var castList = list.Cast<typeof(T)>(); return castList; } So, I'm getting a build error where I am casting the "list" element to a generic IList<T> .... can anyone see a glaring error here?
.net-3.5
.net
c#
syntax
null
null
open
IList.Cast<typeof(T)>() returns error, syntax looks ok === public static IList<T> LoadObjectListAll<T>() { ISession session = CheckForExistingSession(); var cfg = new NHibernate.Cfg.Configuration().Configure(); var returnList = session.CreateCriteria(typeof(T)); var list = returnList.List(); var castList = list.Cast<typeof(T)>(); return castList; } So, I'm getting a build error where I am casting the "list" element to a generic IList<T> .... can anyone see a glaring error here?
0
43,134
09/04/2008 03:21:31
4,142
09/02/2008 02:02:27
53
4
Is there a difference between :: and . when calling class methods in Ruby?
Simple question, but one that I've been curious about...is there a functional difference between the following two commands? String::class String.class They both do what I expect -- that is to say they return `Class` -- but what is the difference between using the `::` and the `.`? I notice that on those classes that have constants defined, IRB's auto-completion will return the constants as available options when you press tab after `::` but not after `.`, but I don't know what the reason for this is...
ruby
syntax
null
null
null
null
open
Is there a difference between :: and . when calling class methods in Ruby? === Simple question, but one that I've been curious about...is there a functional difference between the following two commands? String::class String.class They both do what I expect -- that is to say they return `Class` -- but what is the difference between using the `::` and the `.`? I notice that on those classes that have constants defined, IRB's auto-completion will return the constants as available options when you press tab after `::` but not after `.`, but I don't know what the reason for this is...
0
43,157
09/04/2008 03:46:16
797
08/09/2008 02:14:04
1,076
37
Easy way to write contents of a Java InputStream to an OuptutStream
I was surprised to find today that I couldn't track down any simple way to write the contents of an input stream to an output stream in Java. Obviously, the byte buffer code isn't difficult to write, but I suspect I'm just missing something which would make my life easier (and the code clearer). So, given an InputStream in and an OutputStream out, is there a simpler way to write the following? byte[] buffer = new byte[1024]; int len = in.read(buffer); while (len != -1) { out.write(buffer, 0, len); len = in.read(buffer); }
java
beginner
io
null
null
null
open
Easy way to write contents of a Java InputStream to an OuptutStream === I was surprised to find today that I couldn't track down any simple way to write the contents of an input stream to an output stream in Java. Obviously, the byte buffer code isn't difficult to write, but I suspect I'm just missing something which would make my life easier (and the code clearer). So, given an InputStream in and an OutputStream out, is there a simpler way to write the following? byte[] buffer = new byte[1024]; int len = in.read(buffer); while (len != -1) { out.write(buffer, 0, len); len = in.read(buffer); }
0
43,180
09/04/2008 04:28:09
4,050
09/01/2008 14:24:01
259
18
How to get started in operating system development
One thing I've always wanted to do is develop my very own operating system (not necessarily fancy like Linux or Windows, but better than a simple boot loader which I've already done). I'm having a hard time finding resources/guides that take you past writing a simple "Hello World" OS. I know lots of people will probably recommend I look at Linux or BSD; but the code base for systems like that is (presumably) so big that I wouldn't know where to start. Any suggestions?
operating-system
os
null
null
null
null
open
How to get started in operating system development === One thing I've always wanted to do is develop my very own operating system (not necessarily fancy like Linux or Windows, but better than a simple boot loader which I've already done). I'm having a hard time finding resources/guides that take you past writing a simple "Hello World" OS. I know lots of people will probably recommend I look at Linux or BSD; but the code base for systems like that is (presumably) so big that I wouldn't know where to start. Any suggestions?
0
43,194
09/04/2008 04:56:39
1,597
08/17/2008 10:01:21
73
7
Mixing C/C++ Libraries
Is it possible for gcc to link against a library that was created with Visual C++? If so, are there any conflicts/problems that might arise from doing so?
c++
visual-studio
gcc
linker
null
null
open
Mixing C/C++ Libraries === Is it possible for gcc to link against a library that was created with Visual C++? If so, are there any conflicts/problems that might arise from doing so?
0
43,196
09/04/2008 04:56:52
709
08/08/2008 06:23:45
1
1
Hyper V to Virtual PC
I am currently using Windows Server 2008 Standard and have several Hyper V machines. These are development VM's and I want to now switch back Vista x64 because I am missing Aero. I know Windows Server 2008 can have aero but the host performance is very very bad when I run VM in Hyper V. I want to export my Hyper V machines so that I can use it in Virtual PC. Anyone know an easy way?
virtual-pc
hyper-v
null
null
null
null
open
Hyper V to Virtual PC === I am currently using Windows Server 2008 Standard and have several Hyper V machines. These are development VM's and I want to now switch back Vista x64 because I am missing Aero. I know Windows Server 2008 can have aero but the host performance is very very bad when I run VM in Hyper V. I want to export my Hyper V machines so that I can use it in Virtual PC. Anyone know an easy way?
0