question_id int64 4 6.31M | answer_id int64 7 6.31M | title stringlengths 9 150 | question_body stringlengths 0 28.8k | answer_body stringlengths 60 27.2k | question_text stringlengths 40 28.9k | combined_text stringlengths 124 39.6k | tags listlengths 1 6 | question_score int64 0 26.3k | answer_score int64 0 28.8k | view_count int64 15 14M | answer_count int64 0 182 | favorite_count int64 0 32 | question_creation_date stringdate 2008-07-31 21:42:52 2011-06-10 18:12:18 | answer_creation_date stringdate 2008-07-31 22:17:57 2011-06-10 18:14:17 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
181,648 | 185,678 | Problem opening berkeley db in python | I have problems opening a berkeley db in python using bdtables. As bdtables is used by the library I am using to access the database, I need it to work. The problem seems to be that the db environment I am trying to open (I got a copy of the database to open), is version 4.4 while libdb is version 4.6. I get the follow... | I think answers should go in the "answer" section rather than as an addendum to the question since that marks the question as having an answer on the various question-list pages. I'll do that for you but, if you also get around to doing it, leave a comment on my answer so I can delete it. Quoting "answer in question": ... | Problem opening berkeley db in python I have problems opening a berkeley db in python using bdtables. As bdtables is used by the library I am using to access the database, I need it to work. The problem seems to be that the db environment I am trying to open (I got a copy of the database to open), is version 4.4 while ... | TITLE:
Problem opening berkeley db in python
QUESTION:
I have problems opening a berkeley db in python using bdtables. As bdtables is used by the library I am using to access the database, I need it to work. The problem seems to be that the db environment I am trying to open (I got a copy of the database to open), is ... | [
"python",
"database",
"berkeley-db"
] | 5 | 3 | 3,031 | 2 | 0 | 2008-10-08T07:21:19.683000 | 2008-10-09T02:16:06.663000 |
181,652 | 183,970 | Ruby on Rails - Can I modify the value of an attribute before it is called? | Let's say I have this model named Product with a field named brand. Suppose the values of brand are stored in the format this_is_a_brand. Can I define a method in the model (or anywhere else) that allows me to modify the value of brand before it is called. For example, if I call @product.brand, I want to get This is a ... | I would recommend using the square bracket syntax ( [] and []= ) instead of read_attribute and write_attribute. The square bracket syntax is shorter and designed to wrap the protected read/write_attribute methods. def brand original = self[:brand] transform(original) end
def brand=(b) self[:brand] = reverse_transform(... | Ruby on Rails - Can I modify the value of an attribute before it is called? Let's say I have this model named Product with a field named brand. Suppose the values of brand are stored in the format this_is_a_brand. Can I define a method in the model (or anywhere else) that allows me to modify the value of brand before i... | TITLE:
Ruby on Rails - Can I modify the value of an attribute before it is called?
QUESTION:
Let's say I have this model named Product with a field named brand. Suppose the values of brand are stored in the format this_is_a_brand. Can I define a method in the model (or anywhere else) that allows me to modify the value... | [
"ruby-on-rails",
"ruby",
"model",
"attributes"
] | 6 | 12 | 5,295 | 4 | 0 | 2008-10-08T07:23:02.987000 | 2008-10-08T17:49:38.510000 |
181,671 | 183,064 | Backup tool for Microsoft Virtual Server 2005 R2? | I am seeking a backup tool to back-up virtual OS instances run through Microsoft Virtual Server 2005 R2. According to the MS docs, it should be possible to do it live through volume shadow copy service, but I am having trouble finding any tool for any. What are the best solution to back-up MS Virtual Server instances? | I'm personally fond of using ImageX to capture the VHD to a WIM file. (This is called file-based imaging, as opposed to sector-based imaging.) WIMs are sort of like an NTFS-specific compression format. It also has a single-instance store, which means that files that appear multiple times are only stored once. The compr... | Backup tool for Microsoft Virtual Server 2005 R2? I am seeking a backup tool to back-up virtual OS instances run through Microsoft Virtual Server 2005 R2. According to the MS docs, it should be possible to do it live through volume shadow copy service, but I am having trouble finding any tool for any. What are the best... | TITLE:
Backup tool for Microsoft Virtual Server 2005 R2?
QUESTION:
I am seeking a backup tool to back-up virtual OS instances run through Microsoft Virtual Server 2005 R2. According to the MS docs, it should be possible to do it live through volume shadow copy service, but I am having trouble finding any tool for any.... | [
"backup",
"virtualization",
"virtual-server"
] | 1 | 1 | 1,119 | 3 | 0 | 2008-10-08T07:27:13.163000 | 2008-10-08T14:30:43.573000 |
181,690 | 181,757 | Thread synchronization question (in java) | my java application has a loading task which requires two server calls which can be parallelized. So I launch a Thread t1 (doing task1 ) and a Thread t2 (for task2 ). I want then to do a specific task, task3 when both other tasks (1 & 2) are over. Naturally I can't tell which of task1 and task2 will finish first... Whi... | You've got several options: If task3 is on a separate thread AND task1 and task2 threads are exclusive to their tasks (no thread pooling) and finish when the task finish, you can use {T1.join(); T2.join();} to wait for both threads. Pros: Easy. Cons: The situation is rarely that simple. If task3 is on a separate thread... | Thread synchronization question (in java) my java application has a loading task which requires two server calls which can be parallelized. So I launch a Thread t1 (doing task1 ) and a Thread t2 (for task2 ). I want then to do a specific task, task3 when both other tasks (1 & 2) are over. Naturally I can't tell which o... | TITLE:
Thread synchronization question (in java)
QUESTION:
my java application has a loading task which requires two server calls which can be parallelized. So I launch a Thread t1 (doing task1 ) and a Thread t2 (for task2 ). I want then to do a specific task, task3 when both other tasks (1 & 2) are over. Naturally I ... | [
"java",
"multithreading",
"concurrency",
"synchronization"
] | 4 | 7 | 1,658 | 4 | 0 | 2008-10-08T07:33:35.710000 | 2008-10-08T07:59:20.043000 |
181,718 | 181,736 | Why can't I debug my asp.net web app | When I add a breakpoint and hit F5 to run in the debugger (I am using my debug build), a dialog pops up telling my my web.config file does not have debug=true in it (which is does) and I get 2 choices a) run without the debugger or b) let visual studio update my web.config file. If I choose b) the web.config is updated... | Open web.config manually and make sure the following line is in there Now you should be able to debug from VS. If this does not work I suggest that you recreate the project. EDIT: perhaps from what you say it could be that web.config is screwed up, e.g.contains invalid xml, no closing tag for some element etc. | Why can't I debug my asp.net web app When I add a breakpoint and hit F5 to run in the debugger (I am using my debug build), a dialog pops up telling my my web.config file does not have debug=true in it (which is does) and I get 2 choices a) run without the debugger or b) let visual studio update my web.config file. If ... | TITLE:
Why can't I debug my asp.net web app
QUESTION:
When I add a breakpoint and hit F5 to run in the debugger (I am using my debug build), a dialog pops up telling my my web.config file does not have debug=true in it (which is does) and I get 2 choices a) run without the debugger or b) let visual studio update my we... | [
"c#",
"asp.net",
"iis",
"visual-c++"
] | 2 | 3 | 7,236 | 6 | 0 | 2008-10-08T07:46:38.790000 | 2008-10-08T07:52:50.633000 |
181,724 | 181,767 | When to use the Python debugger | Since Python is a dynamic, interpreted language you don't have to compile your code before running it. Hence, it's very easy to simply write your code, run it, see what problems occur, and fix them. Using hotkeys or macros can make this incredibly quick. So, because it's so easy to immediately see the output of your pr... | I use pdb for basic python debugging. Some of the situations I use it are: When you have a loop iterating over 100,000 entries and want to break at a specific point, it becomes really helpful.(conditional breaks) Trace the control flow of someone else's code. Its always better to use a debugger than litter the code wit... | When to use the Python debugger Since Python is a dynamic, interpreted language you don't have to compile your code before running it. Hence, it's very easy to simply write your code, run it, see what problems occur, and fix them. Using hotkeys or macros can make this incredibly quick. So, because it's so easy to immed... | TITLE:
When to use the Python debugger
QUESTION:
Since Python is a dynamic, interpreted language you don't have to compile your code before running it. Hence, it's very easy to simply write your code, run it, see what problems occur, and fix them. Using hotkeys or macros can make this incredibly quick. So, because it'... | [
"python",
"debugging"
] | 7 | 8 | 1,149 | 6 | 0 | 2008-10-08T07:49:01.903000 | 2008-10-08T08:04:08.643000 |
181,731 | 181,843 | Texture Sampling in Open GL | i need to get the color at a particular coordinate from a texture. There are 2 ways i can do this, by getting and looking at the raw png data, or by sampling my generated opengl texture. Is it possible to sample an opengl texture to get the color (RGBA) at a given UV or XY coord? If so, how? | Off the top of my head, your options are Fetch the entire texture using glGetTexImage() and check the texel you're interested in. Draw the texel you're interested in (eg. by rendering a GL_POINTS primitive), then grab the pixel where you rendered it from the framebuffer by using glReadPixels. Keep a copy of the texture... | Texture Sampling in Open GL i need to get the color at a particular coordinate from a texture. There are 2 ways i can do this, by getting and looking at the raw png data, or by sampling my generated opengl texture. Is it possible to sample an opengl texture to get the color (RGBA) at a given UV or XY coord? If so, how? | TITLE:
Texture Sampling in Open GL
QUESTION:
i need to get the color at a particular coordinate from a texture. There are 2 ways i can do this, by getting and looking at the raw png data, or by sampling my generated opengl texture. Is it possible to sample an opengl texture to get the color (RGBA) at a given UV or XY ... | [
"c++",
"opengl"
] | 1 | 2 | 2,243 | 3 | 0 | 2008-10-08T07:50:43.150000 | 2008-10-08T08:36:28.547000 |
181,745 | 300,972 | Why does the message BC30560 'mymodule_ascx' is ambiguous in the namespace 'ASP' come up sometimes then go away? | Often when making changes to a VS2008 ASP.net project we get a message like: BC30560: 'mymodule_ascx' is ambiguous in the namespace 'ASP'. This goes away after a recompile or sometimes just waiting 10 seconds and refreshing the page. Any way to get rid of it? | Another possibility: http://channel9.msdn.com/forums/TechOff/157050-BC30560-mycontrolascx-is-ambiguous-in-the-namespace-ASP/ Seemed to have some success with changing src="mycontrol.ascx.cs" to CodeBehind="mycontrol.ascx.cs" | Why does the message BC30560 'mymodule_ascx' is ambiguous in the namespace 'ASP' come up sometimes then go away? Often when making changes to a VS2008 ASP.net project we get a message like: BC30560: 'mymodule_ascx' is ambiguous in the namespace 'ASP'. This goes away after a recompile or sometimes just waiting 10 second... | TITLE:
Why does the message BC30560 'mymodule_ascx' is ambiguous in the namespace 'ASP' come up sometimes then go away?
QUESTION:
Often when making changes to a VS2008 ASP.net project we get a message like: BC30560: 'mymodule_ascx' is ambiguous in the namespace 'ASP'. This goes away after a recompile or sometimes just... | [
"asp.net"
] | 13 | 2 | 21,825 | 10 | 0 | 2008-10-08T07:55:21.843000 | 2008-11-19T04:15:05.873000 |
181,775 | 181,790 | Event Handler behavioral difference .net 1.1 vs 2.0 with null delegate | Not sure what exactly is going on here, but seems like in.NET 1.1 an uninitialized event delegate can run without issues, but in.NET 2.0+ it causes a NullReferenceException. Any ideas why. The code below will run fine without issues in 1.1, in 2.0 it gives a NullReferenceException. I'm curious why does it behave differ... | [updated] AFAIK, there was no change here to the fundamental delegate handling; the difference is in how DataTable behaves. However! Be very careful using static events, especially if you are subscribing from instances (rather than static methods). This is a good way to keep huge swathes of objects alive and not be gar... | Event Handler behavioral difference .net 1.1 vs 2.0 with null delegate Not sure what exactly is going on here, but seems like in.NET 1.1 an uninitialized event delegate can run without issues, but in.NET 2.0+ it causes a NullReferenceException. Any ideas why. The code below will run fine without issues in 1.1, in 2.0 i... | TITLE:
Event Handler behavioral difference .net 1.1 vs 2.0 with null delegate
QUESTION:
Not sure what exactly is going on here, but seems like in.NET 1.1 an uninitialized event delegate can run without issues, but in.NET 2.0+ it causes a NullReferenceException. Any ideas why. The code below will run fine without issue... | [
".net-2.0",
"delegates",
"events",
".net-1.1",
"nullreferenceexception"
] | 1 | 1 | 1,194 | 3 | 0 | 2008-10-08T08:05:51.073000 | 2008-10-08T08:11:33.247000 |
181,780 | 1,850,462 | Is there a documented way to set the iPhone orientation? | I have an app where I would like to support device rotation in certain views but other don't particularly make sense in Landscape mode, so as I swapping the views out I would like to force the rotation to be set to portrait. There is an undocumented property setter on UIDevice that does the trick but obviously generate... | This is no longer an issue on the later iPhone 3.1.2 SDK. It now appears to honor the requested orientation of the view being pushed back onto the stack. That likely means that you would need to detect older iPhone OS versions and only apply the setOrientation when it is prior to the latest release. It is not clear if ... | Is there a documented way to set the iPhone orientation? I have an app where I would like to support device rotation in certain views but other don't particularly make sense in Landscape mode, so as I swapping the views out I would like to force the rotation to be set to portrait. There is an undocumented property sett... | TITLE:
Is there a documented way to set the iPhone orientation?
QUESTION:
I have an app where I would like to support device rotation in certain views but other don't particularly make sense in Landscape mode, so as I swapping the views out I would like to force the rotation to be set to portrait. There is an undocume... | [
"iphone",
"objective-c",
"cocoa-touch"
] | 96 | 6 | 79,089 | 17 | 0 | 2008-10-08T08:06:48 | 2009-12-05T00:03:27.007000 |
181,784 | 181,896 | JAVA Swing client, Data Access to Remote Database; Ibatis | I've got a Java client that needs to access a remote database. It is the goal to hide database credentials from the user and not hardcode any credentials within the code. Therefore, the database access will probably have to be on the server side. I'm restricted to use Ibatis as a data abstraction framework. Apart from ... | Build a Service Layer and expose it over RMI - possibly as EJB3 stateless session beans as you have JBoss, possibly as pure RMI. I wouldn't bother with web services unless you have a specific need. RMI will take case of serialisation for you. Your service layer needs to expose a method to authenticate users using their... | JAVA Swing client, Data Access to Remote Database; Ibatis I've got a Java client that needs to access a remote database. It is the goal to hide database credentials from the user and not hardcode any credentials within the code. Therefore, the database access will probably have to be on the server side. I'm restricted ... | TITLE:
JAVA Swing client, Data Access to Remote Database; Ibatis
QUESTION:
I've got a Java client that needs to access a remote database. It is the goal to hide database credentials from the user and not hardcode any credentials within the code. Therefore, the database access will probably have to be on the server sid... | [
"java",
"jboss",
"data-access-layer",
"ibatis",
"data-access"
] | 3 | 3 | 3,057 | 3 | 0 | 2008-10-08T08:07:39.293000 | 2008-10-08T09:07:12.010000 |
181,791 | 185,849 | how can I save the output of windows internal FTP client? | UPDATED: on win2k it seems it works OK. Sorry for the confusion. MS Windows Vista internal ftp client has a strange behavior. When redirecting its output and error to a file, the errors do not show up there: ftp -n -s:commands.txt host >output.log 2>&1 When running it from Task Scheduler inside a batch file, I don't ge... | Not sure what's happening to you. I'd check the batch file that's running it, or maybe how you're scheduling the job. The output is confusing as the error seems out of order, but redirecting stderr seems to work on my XP machine: C:\Temp>ftp -s:ftpcmds.txt ftp.microsxoft.com >ftplog.txt 2>&1
C:\Temp>type ftplog.txt ft... | how can I save the output of windows internal FTP client? UPDATED: on win2k it seems it works OK. Sorry for the confusion. MS Windows Vista internal ftp client has a strange behavior. When redirecting its output and error to a file, the errors do not show up there: ftp -n -s:commands.txt host >output.log 2>&1 When runn... | TITLE:
how can I save the output of windows internal FTP client?
QUESTION:
UPDATED: on win2k it seems it works OK. Sorry for the confusion. MS Windows Vista internal ftp client has a strange behavior. When redirecting its output and error to a file, the errors do not show up there: ftp -n -s:commands.txt host >output.... | [
"windows",
"command-line",
"ftp",
"batch-file"
] | 1 | 2 | 12,227 | 2 | 0 | 2008-10-08T08:12:07.740000 | 2008-10-09T03:36:23.350000 |
181,792 | 181,807 | What techniques are most effective for dealing with millions of records? | I once had a MySQL database table containing 25 million records, which made even a simple COUNT(*) query takes minute to execute. I ended up making partitions, separating them into a couple tables. What i'm asking is, is there any pattern or design techniques to handle this kind of problem (huge number of records)? Is ... | See Why MySQL could be slow with large tables and COUNT(*) vs COUNT(col) Make sure you have an index on the column you're counting. If your server has plenty of RAM, consider increasing MySQL's buffer size. Make sure your disks are configured correctly -- DMA enabled, not sharing a drive or cable with the swap partitio... | What techniques are most effective for dealing with millions of records? I once had a MySQL database table containing 25 million records, which made even a simple COUNT(*) query takes minute to execute. I ended up making partitions, separating them into a couple tables. What i'm asking is, is there any pattern or desig... | TITLE:
What techniques are most effective for dealing with millions of records?
QUESTION:
I once had a MySQL database table containing 25 million records, which made even a simple COUNT(*) query takes minute to execute. I ended up making partitions, separating them into a couple tables. What i'm asking is, is there an... | [
"mysql",
"database"
] | 22 | 8 | 6,485 | 9 | 0 | 2008-10-08T08:12:53.727000 | 2008-10-08T08:22:58.997000 |
181,800 | 181,814 | Issue with localizing html title of a page | I'm trying to localize my aspx pages. I'm done with content localization using L10n features provided by.net f/w, like resource files. But I'm finding it difficult to set local data in page titles. Most of the browsers, including IE and FF, shows content on window title with some boxes (FF will show properly localized ... | I suspect this is a typeface issue. The browser title bar and other window ornaments are usually rendered by your OS, not by the browser itself, so if you've configured Windows to use a typeface that doesn't support the additional character glyphs required for Hindi, Arabic, etc., then you'll get the boxes instead. Wit... | Issue with localizing html title of a page I'm trying to localize my aspx pages. I'm done with content localization using L10n features provided by.net f/w, like resource files. But I'm finding it difficult to set local data in page titles. Most of the browsers, including IE and FF, shows content on window title with s... | TITLE:
Issue with localizing html title of a page
QUESTION:
I'm trying to localize my aspx pages. I'm done with content localization using L10n features provided by.net f/w, like resource files. But I'm finding it difficult to set local data in page titles. Most of the browsers, including IE and FF, shows content on w... | [
".net",
"asp.net",
"iis",
"localization"
] | 1 | 5 | 1,573 | 5 | 0 | 2008-10-08T08:18:41.097000 | 2008-10-08T08:25:41.987000 |
181,805 | 181,811 | Absolute path & Relative Path | What's the difference between absolute path & relative path when using any web server or Tomcat? | Absolute paths start with / and refer to a location from the root of the current site (or virtual host). Relative paths do not start with / and refer to a location from the actual location of the document the reference is made. Examples, assuming root is http://foo.com/site/ Absolute path, no matter where we are on the... | Absolute path & Relative Path What's the difference between absolute path & relative path when using any web server or Tomcat? | TITLE:
Absolute path & Relative Path
QUESTION:
What's the difference between absolute path & relative path when using any web server or Tomcat?
ANSWER:
Absolute paths start with / and refer to a location from the root of the current site (or virtual host). Relative paths do not start with / and refer to a location fr... | [
"tomcat",
"path",
"relative-path"
] | 10 | 29 | 21,383 | 3 | 0 | 2008-10-08T08:21:48.017000 | 2008-10-08T08:24:51.113000 |
181,808 | 490,825 | Eclipse treating all the files in a project as Derived | I have created a Dynamic Web Project in my Eclipse workspace. It is also a Maven project, and under SVN control. But in "Open Resource" (Ctrl+Alt+R) no file from this project appears, unless I check from the window's options (top right drop-down) "Show Derived Resources". I have checked on some of the project's folders... | I experienced a similar issue in Eclipse (Ganymede), when using the Maven and Subclipse plugins. I have not determined which plugin caused this problem, but I suspect that it is related to my pom.xml containing nested modules (ie. a main-module integration-test ). These appear in Eclipse as nested folders with their ow... | Eclipse treating all the files in a project as Derived I have created a Dynamic Web Project in my Eclipse workspace. It is also a Maven project, and under SVN control. But in "Open Resource" (Ctrl+Alt+R) no file from this project appears, unless I check from the window's options (top right drop-down) "Show Derived Reso... | TITLE:
Eclipse treating all the files in a project as Derived
QUESTION:
I have created a Dynamic Web Project in my Eclipse workspace. It is also a Maven project, and under SVN control. But in "Open Resource" (Ctrl+Alt+R) no file from this project appears, unless I check from the window's options (top right drop-down) ... | [
"eclipse"
] | 4 | 8 | 9,716 | 3 | 0 | 2008-10-08T08:24:10.087000 | 2009-01-29T07:59:50.883000 |
181,810 | 185,806 | How do I unit test a custom ant task? | I am writing a custom ant task that extends Task. I am using the log() method in the task. What I want to do is use a unit test while deveoping the task, but I don't know how to set up a context for the task to run in to initialise the task as if it were running in ant. This is the custom Task: public class CopyAndSetP... | Looking at the Ant source code these are the two relevent classes: ProjectComponent and Task You are calling the log method from Task: public void log(String msg) { log(msg, Project.MSG_INFO); } Which calls: public void log(String msg, int msgLevel) { if (getProject()!= null) { getProject().log(this, msg, msgLevel); } ... | How do I unit test a custom ant task? I am writing a custom ant task that extends Task. I am using the log() method in the task. What I want to do is use a unit test while deveoping the task, but I don't know how to set up a context for the task to run in to initialise the task as if it were running in ant. This is the... | TITLE:
How do I unit test a custom ant task?
QUESTION:
I am writing a custom ant task that extends Task. I am using the log() method in the task. What I want to do is use a unit test while deveoping the task, but I don't know how to set up a context for the task to run in to initialise the task as if it were running i... | [
"ant",
"junit"
] | 6 | 1 | 4,197 | 3 | 0 | 2008-10-08T08:24:47.557000 | 2008-10-09T03:15:14.297000 |
181,818 | 191,899 | How do I turn an RSS feed back into RSS? | According to the feedparser documentation, I can turn an RSS feed into a parsed object like this: import feedparser d = feedparser.parse('http://feedparser.org/docs/examples/atom10.xml') but I can't find anything showing how to go the other way; I'd like to be able do manipulate 'd' and then output the result as XML: p... | Appended is a not hugely-elegant, but working solution - it uses feedparser to parse the feed, you can then modify the entries, and it passes the data to PyRSS2Gen. It preserves most of the feed info (the important bits anyway, there are somethings that will need extra conversion, the parsed_feed['feed']['image'] eleme... | How do I turn an RSS feed back into RSS? According to the feedparser documentation, I can turn an RSS feed into a parsed object like this: import feedparser d = feedparser.parse('http://feedparser.org/docs/examples/atom10.xml') but I can't find anything showing how to go the other way; I'd like to be able do manipulate... | TITLE:
How do I turn an RSS feed back into RSS?
QUESTION:
According to the feedparser documentation, I can turn an RSS feed into a parsed object like this: import feedparser d = feedparser.parse('http://feedparser.org/docs/examples/atom10.xml') but I can't find anything showing how to go the other way; I'd like to be ... | [
"python",
"rss"
] | 5 | 7 | 913 | 4 | 0 | 2008-10-08T08:26:14.730000 | 2008-10-10T15:33:14.823000 |
181,829 | 181,844 | VisualBasic Month function inconsistency | I'm working in a web application using VB.NET. There is also VisualBasic code mixed in it, in particular the Date variable and the Month function of VB. The problem is this part: Month("10/01/2008") On the servers, I get 10 (October) as the month (which is supposed to be correct). On my machine, I get 1 (January) (whic... | This normally has to do with the regional settings, and more specifically the date/time formats. If you set these formats so that they are all the same on the machines you're testing on, the results should be consistent. Your idea of using ParseExact is definitely the better solution to go with, IMHO. | VisualBasic Month function inconsistency I'm working in a web application using VB.NET. There is also VisualBasic code mixed in it, in particular the Date variable and the Month function of VB. The problem is this part: Month("10/01/2008") On the servers, I get 10 (October) as the month (which is supposed to be correct... | TITLE:
VisualBasic Month function inconsistency
QUESTION:
I'm working in a web application using VB.NET. There is also VisualBasic code mixed in it, in particular the Date variable and the Month function of VB. The problem is this part: Month("10/01/2008") On the servers, I get 10 (October) as the month (which is supp... | [
"vb.net"
] | 3 | 5 | 651 | 2 | 0 | 2008-10-08T08:31:41.693000 | 2008-10-08T08:36:39.280000 |
181,840 | 181,851 | computing performance | I need to find out the time a function takes for computing the performance of the application / function. is their any open source Java APIs for doing the same? | You're in luck as there are quite a few open source Java profilers available for you. | computing performance I need to find out the time a function takes for computing the performance of the application / function. is their any open source Java APIs for doing the same? | TITLE:
computing performance
QUESTION:
I need to find out the time a function takes for computing the performance of the application / function. is their any open source Java APIs for doing the same?
ANSWER:
You're in luck as there are quite a few open source Java profilers available for you. | [
"java",
"performance",
"profiling"
] | 2 | 4 | 332 | 6 | 0 | 2008-10-08T08:35:51.747000 | 2008-10-08T08:40:19.320000 |
181,842 | 182,796 | How can I transition from Java to Clojure? | After discovering Clojure I have spent the last few days immersed in it. What project types lend themselves to Java over Clojure, vice versa, and in combination? What are examples of programs which you would have never attempted before Clojure? | Clojure lends itself well to concurrent programming. It provides such wonderful tools for dealing with threading as Software Transactional Memory and mutable references. As a demo for the Western Mass Developer's Group, Rich Hickey made an ant colony simulation in which each ant was its own thread and all of the variab... | How can I transition from Java to Clojure? After discovering Clojure I have spent the last few days immersed in it. What project types lend themselves to Java over Clojure, vice versa, and in combination? What are examples of programs which you would have never attempted before Clojure? | TITLE:
How can I transition from Java to Clojure?
QUESTION:
After discovering Clojure I have spent the last few days immersed in it. What project types lend themselves to Java over Clojure, vice versa, and in combination? What are examples of programs which you would have never attempted before Clojure?
ANSWER:
Cloju... | [
"java",
"functional-programming",
"clojure",
"use-case"
] | 27 | 14 | 3,712 | 4 | 0 | 2008-10-08T08:36:07.487000 | 2008-10-08T13:39:05.443000 |
181,845 | 186,187 | In a WPF ListBox with more than 1000 Image Items the Zoom Images become slow | I met a problem when deveoping a photo viewer application. I use ListBox to Show Images, which is contained in a ObservableCollection. I bind the ListBox's ItemsSource to the ObservableCollection. I also bind the Image'height in ListBox with a slider.(the slider's Value also bind to zoombarmanager.ZoomBarWidth.Width). ... | The problem is that your new Layout Panel is the WrapPanel and it doesn't support Virtualization! It is possible to create your own Virtualized WrapPanel... Read more here Also read more about other issues like the implementation IScrollInfo here I also highly recommend that your do not create a new control template ju... | In a WPF ListBox with more than 1000 Image Items the Zoom Images become slow I met a problem when deveoping a photo viewer application. I use ListBox to Show Images, which is contained in a ObservableCollection. I bind the ListBox's ItemsSource to the ObservableCollection. I also bind the Image'height in ListBox with a... | TITLE:
In a WPF ListBox with more than 1000 Image Items the Zoom Images become slow
QUESTION:
I met a problem when deveoping a photo viewer application. I use ListBox to Show Images, which is contained in a ObservableCollection. I bind the ListBox's ItemsSource to the ObservableCollection. I also bind the Image'height... | [
"wpf",
"image",
"listbox",
"performance"
] | 13 | 6 | 14,794 | 6 | 0 | 2008-10-08T08:37:26.580000 | 2008-10-09T06:46:34.337000 |
181,850 | 181,873 | Help on Open source controls in commercial application | What are the implications of including a set of visual components released under a Mozilla Public License in a commercial application. Do I have any obligations? | I've found pretty good analysis on MPL (and others) by Frank Hecker here: http://hecker.org/writings/setting-up-shop (search for "Mozilla Public License") This pretty much sums it up: For MozPL-ed source code considered as a set of source files, modifications of the original source files are considered to also fall und... | Help on Open source controls in commercial application What are the implications of including a set of visual components released under a Mozilla Public License in a commercial application. Do I have any obligations? | TITLE:
Help on Open source controls in commercial application
QUESTION:
What are the implications of including a set of visual components released under a Mozilla Public License in a commercial application. Do I have any obligations?
ANSWER:
I've found pretty good analysis on MPL (and others) by Frank Hecker here: ht... | [
"open-source",
"components"
] | 2 | 4 | 121 | 2 | 0 | 2008-10-08T08:40:10.473000 | 2008-10-08T08:50:45.367000 |
181,853 | 181,863 | Mocking an attribute change on a parameter - using Moq | I am using Moq to mock my Repository layer so I can unit test. My repository layer Insert methods update the Id property of my entities when a successful db insert occurs. How do I configure moq to update the Id property of the entity when the Insert method is called? Repository code:- void IAccountRepository.InsertAcc... | You can use the Callback method to mock side-effects. Something like: accountRepository.Expect(r => r.InsertAccount(account)).Callback(() => account.ID = 1); That's untested but it's along the right lines. | Mocking an attribute change on a parameter - using Moq I am using Moq to mock my Repository layer so I can unit test. My repository layer Insert methods update the Id property of my entities when a successful db insert occurs. How do I configure moq to update the Id property of the entity when the Insert method is call... | TITLE:
Mocking an attribute change on a parameter - using Moq
QUESTION:
I am using Moq to mock my Repository layer so I can unit test. My repository layer Insert methods update the Id property of my entities when a successful db insert occurs. How do I configure moq to update the Id property of the entity when the Ins... | [
"c#",
"tdd",
"mocking",
"moq"
] | 3 | 5 | 3,276 | 2 | 0 | 2008-10-08T08:40:47.743000 | 2008-10-08T08:45:47.873000 |
181,861 | 181,877 | Reporting Services 2008: export instead of regenerate? | Is there some way to cache a generated report in the reporting services, so that I could later export it to some other format? I.e., currently, I'm generating an HTML version of the report (throught the webservice) and if the users asks for an excel file, I generate it again, this time in excel. The problem is, that th... | If it's the same as SSRS 2005 then under each individual report on your report server portal there will be a "Properties" tab and one of the options under this tab will be "Execution". The first execution option is to work from the most recent data but a sub option allows you to cache the report for a certain amount of... | Reporting Services 2008: export instead of regenerate? Is there some way to cache a generated report in the reporting services, so that I could later export it to some other format? I.e., currently, I'm generating an HTML version of the report (throught the webservice) and if the users asks for an excel file, I generat... | TITLE:
Reporting Services 2008: export instead of regenerate?
QUESTION:
Is there some way to cache a generated report in the reporting services, so that I could later export it to some other format? I.e., currently, I'm generating an HTML version of the report (throught the webservice) and if the users asks for an exc... | [
"reporting-services"
] | 1 | 2 | 957 | 1 | 0 | 2008-10-08T08:44:03.947000 | 2008-10-08T08:53:20.200000 |
181,889 | 185,598 | Alter :path_prefix dynamically when calling has_attachment via Attachment Fu plugin | By default Attachment Fu stores uploaded files in "public/#{table_name}". I want to modify this to be something like "public/#{table_name}/#{site_id}", where site_id is a property of the model. Note that I've tried using self.site_id and both fail. has_attachment:storage =>:file_system,:max_size => 25.megabytes,:path_p... | site_id is a dynamic value, so you can't set this in the class. You'll want to redefine #full_filename in your model. The current definition looks like: def full_filename(thumbnail = nil) file_system_path = (thumbnail? thumbnail_class: self).attachment_options[:path_prefix].to_s File.join(RAILS_ROOT, file_system_path, ... | Alter :path_prefix dynamically when calling has_attachment via Attachment Fu plugin By default Attachment Fu stores uploaded files in "public/#{table_name}". I want to modify this to be something like "public/#{table_name}/#{site_id}", where site_id is a property of the model. Note that I've tried using self.site_id an... | TITLE:
Alter :path_prefix dynamically when calling has_attachment via Attachment Fu plugin
QUESTION:
By default Attachment Fu stores uploaded files in "public/#{table_name}". I want to modify this to be something like "public/#{table_name}/#{site_id}", where site_id is a property of the model. Note that I've tried usi... | [
"ruby-on-rails",
"ruby",
"attachment-fu"
] | 0 | 3 | 1,069 | 1 | 0 | 2008-10-08T09:01:08.077000 | 2008-10-09T01:28:59.317000 |
181,898 | 185,631 | apache + lighttpd front-proxy concept | In order to lighten Apache's load people often suggest using lighttpd to serve up static content. e.g. http://www.linux.com/feature/51673 In this setup Apache passes requests for static content back to lighttpd via mod_proxy, while serving dynamic requests itself. My question is: how does this reduce the load on the se... | Running Lighttpd behind Apache to serve static files certainly seems braindead to me. Apache still has to unpack the HTTP packets and parse the request through its parse tree, send proxy requests, and then Lighttpd has to re-unpack, hit the filesystem and send the files back through Apache. I've never heard of anyone u... | apache + lighttpd front-proxy concept In order to lighten Apache's load people often suggest using lighttpd to serve up static content. e.g. http://www.linux.com/feature/51673 In this setup Apache passes requests for static content back to lighttpd via mod_proxy, while serving dynamic requests itself. My question is: h... | TITLE:
apache + lighttpd front-proxy concept
QUESTION:
In order to lighten Apache's load people often suggest using lighttpd to serve up static content. e.g. http://www.linux.com/feature/51673 In this setup Apache passes requests for static content back to lighttpd via mod_proxy, while serving dynamic requests itself.... | [
"apache",
"lighttpd"
] | 5 | 9 | 3,878 | 5 | 0 | 2008-10-08T09:07:39.467000 | 2008-10-09T01:48:01.197000 |
181,901 | 181,941 | Reflection.Net: how to load dependencies? | I try to add an addons system to my Windows.Net application using Reflection; but it fails when there is addon with dependencie. Addon class have to implement an interface 'IAddon' and to have an empty constructor. Main program load the addon using Reflection: Assembly assembly = Assembly.LoadFile(@"C:\Temp\TestAddon\A... | If MyTools.dll is located in the same directory as Addon.dll, all you need to do is call Assembly.LoadFrom instead of Assembly.LoadFile to make your code work. Otherwise, handling the AppDomain.AssemblyResolve event is the way to go. | Reflection.Net: how to load dependencies? I try to add an addons system to my Windows.Net application using Reflection; but it fails when there is addon with dependencie. Addon class have to implement an interface 'IAddon' and to have an empty constructor. Main program load the addon using Reflection: Assembly assembly... | TITLE:
Reflection.Net: how to load dependencies?
QUESTION:
I try to add an addons system to my Windows.Net application using Reflection; but it fails when there is addon with dependencie. Addon class have to implement an interface 'IAddon' and to have an empty constructor. Main program load the addon using Reflection:... | [
"c#",
"reflection",
"dependencies",
"add-on"
] | 34 | 52 | 19,721 | 5 | 0 | 2008-10-08T09:09:06.050000 | 2008-10-08T09:31:14.427000 |
181,909 | 182,001 | Tool for Scripting Table Data | Are there any free tools for scripting MSSQL table data? I'll gladly write one, but am hoping it's been done, and the app matured a bit before/ | Microsoft SQL Server Database Publishing Wizard is a nice GUI that can script out the structure / data / Procs of a SQL Server 2000/2005 db. http://www.microsoft.com/downloads/details.aspx?FamilyId=56E5B1C5-BF17-42E0-A410-371A838E570A&displaylang=en Hope this helps | Tool for Scripting Table Data Are there any free tools for scripting MSSQL table data? I'll gladly write one, but am hoping it's been done, and the app matured a bit before/ | TITLE:
Tool for Scripting Table Data
QUESTION:
Are there any free tools for scripting MSSQL table data? I'll gladly write one, but am hoping it's been done, and the app matured a bit before/
ANSWER:
Microsoft SQL Server Database Publishing Wizard is a nice GUI that can script out the structure / data / Procs of a SQL... | [
"sql-server",
"database"
] | 7 | 8 | 3,522 | 5 | 0 | 2008-10-08T09:10:52.923000 | 2008-10-08T10:02:06.753000 |
181,912 | 181,925 | In a layered design with a separate DataAccess layer in .NET where should connection string be managed? | There is a long running habit here where I work that the connection string lives in the web.config, a Sql Connection object is instantiated in a using block with that connection string and passed to the DataObjects constructor (via a CreateInstance Method as the constructor is private). Something like this: using(SqlCo... | I like to code the classes in my data access layer so that they have one constructor that takes an IDbConnection as a parameter, and another that takes a (connection) string. That way the calling code can either construct its own SqlConnection and pass it in (handy for integration tests), mock an IDbConnection and pass... | In a layered design with a separate DataAccess layer in .NET where should connection string be managed? There is a long running habit here where I work that the connection string lives in the web.config, a Sql Connection object is instantiated in a using block with that connection string and passed to the DataObjects c... | TITLE:
In a layered design with a separate DataAccess layer in .NET where should connection string be managed?
QUESTION:
There is a long running habit here where I work that the connection string lives in the web.config, a Sql Connection object is instantiated in a using block with that connection string and passed to... | [
"c#",
"asp.net",
"database"
] | 3 | 4 | 1,179 | 3 | 0 | 2008-10-08T09:14:41.387000 | 2008-10-08T09:20:52.950000 |
181,920 | 182,344 | Windows SharePoint Services vs. Microsoft Office SharePoint Server? | There's Windows SharePoint Services (WSS) and then there is Microsoft Office SharePoint Server (MOSS). MOSS considerably more expensive than WSS (which ships as part of Microsoft Server licensing). My question is: what does MOSS do that makes it worth the extra cost?..and does Microsoft Search Server not compete with t... | About WSS vs MOSS: WSS in not a portal, it's only a collaborative plateform (there are no publishing features in WSS) MOSS allows you to use user profils, not WSS Search functionalities are cheap in WSS compare to MOSS (but you can extend them using Search Server Express) Many others: Infopath, BDC, Additional WebParts... | Windows SharePoint Services vs. Microsoft Office SharePoint Server? There's Windows SharePoint Services (WSS) and then there is Microsoft Office SharePoint Server (MOSS). MOSS considerably more expensive than WSS (which ships as part of Microsoft Server licensing). My question is: what does MOSS do that makes it worth ... | TITLE:
Windows SharePoint Services vs. Microsoft Office SharePoint Server?
QUESTION:
There's Windows SharePoint Services (WSS) and then there is Microsoft Office SharePoint Server (MOSS). MOSS considerably more expensive than WSS (which ships as part of Microsoft Server licensing). My question is: what does MOSS do th... | [
"sharepoint",
"moss",
"comparison",
"wss"
] | 12 | 3 | 21,240 | 5 | 0 | 2008-10-08T09:18:30.647000 | 2008-10-08T11:55:42.093000 |
181,928 | 253,032 | TreeView label editing question | I have a treeview with nodes like this: "Foo (1234)", and want to allow the user to rename the nodes, but only the Foo part, without (1234). I first tried to change the node text in BeforeLabelEdit like this: private void treeView1_BeforeLabelEdit(object sender, NodeLabelEditEventArgs e) { e.Node.Text = "Foo"; } But wh... | Finally I have found a solution to this on CodeProject. Among the comments at the bottom, you will also find a portable solution. | TreeView label editing question I have a treeview with nodes like this: "Foo (1234)", and want to allow the user to rename the nodes, but only the Foo part, without (1234). I first tried to change the node text in BeforeLabelEdit like this: private void treeView1_BeforeLabelEdit(object sender, NodeLabelEditEventArgs e)... | TITLE:
TreeView label editing question
QUESTION:
I have a treeview with nodes like this: "Foo (1234)", and want to allow the user to rename the nodes, but only the Foo part, without (1234). I first tried to change the node text in BeforeLabelEdit like this: private void treeView1_BeforeLabelEdit(object sender, NodeLab... | [
"c#",
"treeview"
] | 13 | 5 | 11,256 | 2 | 0 | 2008-10-08T09:24:13.663000 | 2008-10-31T10:16:29.860000 |
181,930 | 182,089 | SQL Server 2005 Performance: Distinct or full table in WHERE IN statement | We have two Tables: Document: id, title, document_type_id, showon_id DocumentType: id, name Relationship: DocumentType hasMany Documents. (Document.document_type_id = DocumentType.id) We wish to retrieve a list of all document types for one given ShowOn_Id. We see two possiblities: SELECT DocumentType.* FROM DocumentTy... | From my point of view it should not make any difference inside SQL Server (but who knows how this is implemented). Think of it this way: to return the resultset the server needs to go into the Document table and retrieve all document_type_id WHERE showon_id = 42. In the process of retrieving the document_type_ids (e.g.... | SQL Server 2005 Performance: Distinct or full table in WHERE IN statement We have two Tables: Document: id, title, document_type_id, showon_id DocumentType: id, name Relationship: DocumentType hasMany Documents. (Document.document_type_id = DocumentType.id) We wish to retrieve a list of all document types for one given... | TITLE:
SQL Server 2005 Performance: Distinct or full table in WHERE IN statement
QUESTION:
We have two Tables: Document: id, title, document_type_id, showon_id DocumentType: id, name Relationship: DocumentType hasMany Documents. (Document.document_type_id = DocumentType.id) We wish to retrieve a list of all document t... | [
"sql-server",
"database",
"performance"
] | 2 | 1 | 2,374 | 5 | 0 | 2008-10-08T09:25:38.870000 | 2008-10-08T10:44:08.180000 |
181,949 | 181,979 | Views vs. inline subqueries SQL Server 2005/2008 | In certain areas in my application I need data from several tables in the database (I have an application, the application has many attributes, each attribute has several definitions, and each definition has a value). I need the data from all these tables for an application. Should I use a view (one that would be rathe... | Views are typically expanded in place into subqueries, unless you explicitly mark the views as persisted by dropping a clustered index on them. | Views vs. inline subqueries SQL Server 2005/2008 In certain areas in my application I need data from several tables in the database (I have an application, the application has many attributes, each attribute has several definitions, and each definition has a value). I need the data from all these tables for an applicat... | TITLE:
Views vs. inline subqueries SQL Server 2005/2008
QUESTION:
In certain areas in my application I need data from several tables in the database (I have an application, the application has many attributes, each attribute has several definitions, and each definition has a value). I need the data from all these tabl... | [
"sql-server",
"view",
"subquery"
] | 1 | 2 | 4,323 | 2 | 0 | 2008-10-08T09:36:44.900000 | 2008-10-08T09:54:00.730000 |
181,951 | 236,898 | iframes and redirection | I have a webpage (say www.example.com/a.asp).. I am having an iframe in this page which loads a page from a different website (www.example.net/b.asp)... This b.asp asks few questions to the user and the results are posted to c.asp in my website (www.example.com/c.asp). This page (www.example.com/c.asp) gets loaded in t... | As mentioned above, you can use the "_top" in the target for the form, or you could use some JavaScript on the result page to check and see if its the "top" page. All things being equal, you're better off avoiding the JavaScript as it won't work if the client has scripting disabled. | iframes and redirection I have a webpage (say www.example.com/a.asp).. I am having an iframe in this page which loads a page from a different website (www.example.net/b.asp)... This b.asp asks few questions to the user and the results are posted to c.asp in my website (www.example.com/c.asp). This page (www.example.com... | TITLE:
iframes and redirection
QUESTION:
I have a webpage (say www.example.com/a.asp).. I am having an iframe in this page which loads a page from a different website (www.example.net/b.asp)... This b.asp asks few questions to the user and the results are posted to c.asp in my website (www.example.com/c.asp). This pag... | [
"iframe",
"asp-classic"
] | 0 | 0 | 1,770 | 4 | 0 | 2008-10-08T09:38:50.887000 | 2008-10-25T19:28:58.517000 |
181,956 | 182,055 | Prevent user from resizing columns with WPF ListView | How can I prevent a user from resizing GridViewColumns withing a ListView control? | i found a solution and probably it will help someone else someday;) you have to override the GridViewColumnHeader's ControlTemplate (default template is here ) and remove the PART_HeaderGripper from the template in order to prevent resizing of your columns. there is another solution that comes up with subclassing GridV... | Prevent user from resizing columns with WPF ListView How can I prevent a user from resizing GridViewColumns withing a ListView control? | TITLE:
Prevent user from resizing columns with WPF ListView
QUESTION:
How can I prevent a user from resizing GridViewColumns withing a ListView control?
ANSWER:
i found a solution and probably it will help someone else someday;) you have to override the GridViewColumnHeader's ControlTemplate (default template is here... | [
"wpf",
"gridview",
"listview"
] | 27 | 15 | 35,837 | 5 | 0 | 2008-10-08T09:41:14.050000 | 2008-10-08T10:30:27.913000 |
181,977 | 181,998 | Whirlwind tour of Eclipse? | Does anyone know of a whirlwind tour of Eclipse that would help a (former) Visual Studio user get up to speed with it? I just want something that tells me where all the basic features are and what all the cool stuff I've heard so much about is? So far I've been using it mostly as a text editor and have had some luck co... | Try Help -> Help Contents (no joke) and read the Workbench User Guide: Especially the Chapter Concepts. The same chapter is also very well in the Java Development User Guide I'm sure after reading these few pages, you'll already know more then the average Eclipse user (because needs Help this days?). | Whirlwind tour of Eclipse? Does anyone know of a whirlwind tour of Eclipse that would help a (former) Visual Studio user get up to speed with it? I just want something that tells me where all the basic features are and what all the cool stuff I've heard so much about is? So far I've been using it mostly as a text edito... | TITLE:
Whirlwind tour of Eclipse?
QUESTION:
Does anyone know of a whirlwind tour of Eclipse that would help a (former) Visual Studio user get up to speed with it? I just want something that tells me where all the basic features are and what all the cool stuff I've heard so much about is? So far I've been using it most... | [
"visual-studio",
"eclipse",
"ide"
] | 3 | 1 | 139 | 2 | 0 | 2008-10-08T09:53:40.170000 | 2008-10-08T10:01:25.600000 |
181,986 | 195,968 | What is the best way to organise e-mails in MS Outlook? | Every software development professional (and especially project managers) has to deal with a never ending stream of e-mails. What is the best way of organising them in MS Outlook? Obviously some fancy issue tracking tools give more flexibility but I am interested in plain vanilla approach that can be deployed within mo... | Within my main inbox I have 3 sub folers: Do, Done, Defer and 3 macros to move the selected folder into the relevent folder. (alt-1 moves the selected mail to done and then selects the next mail). Each day I quickly filter my inbox into the three folders. I can process several hundred mails in 20 mins or so. Do, someth... | What is the best way to organise e-mails in MS Outlook? Every software development professional (and especially project managers) has to deal with a never ending stream of e-mails. What is the best way of organising them in MS Outlook? Obviously some fancy issue tracking tools give more flexibility but I am interested ... | TITLE:
What is the best way to organise e-mails in MS Outlook?
QUESTION:
Every software development professional (and especially project managers) has to deal with a never ending stream of e-mails. What is the best way of organising them in MS Outlook? Obviously some fancy issue tracking tools give more flexibility bu... | [
"email",
"project-management"
] | 11 | 10 | 18,501 | 17 | 0 | 2008-10-08T09:56:07.093000 | 2008-10-12T20:14:15.363000 |
181,987 | 182,787 | Any complete library for Jabber in Delphi? | I'm looking for for a Jabber library for Delphi, I can see some COM based jabber components. But I'm looking for a real VCL library. Somebody knows one? | You could compile the code that underlies Exodus into a VCL. That code is called JOPL, and can be found at Google Code. | Any complete library for Jabber in Delphi? I'm looking for for a Jabber library for Delphi, I can see some COM based jabber components. But I'm looking for a real VCL library. Somebody knows one? | TITLE:
Any complete library for Jabber in Delphi?
QUESTION:
I'm looking for for a Jabber library for Delphi, I can see some COM based jabber components. But I'm looking for a real VCL library. Somebody knows one?
ANSWER:
You could compile the code that underlies Exodus into a VCL. That code is called JOPL, and can be... | [
"delphi",
"xmpp"
] | 5 | 6 | 10,829 | 5 | 0 | 2008-10-08T09:56:30.977000 | 2008-10-08T13:37:41.077000 |
181,990 | 182,045 | Programmatically access currency exchange rates | I'm setting up an online ordering system but I'm in Australia and for international customers I'd like to show prices in US dollars or Euros so they don't have to make the mental effort to convert from Australian dollars. Does anyone know if I can pull up to date exchange rates off the net somewhere in an easy-to-parse... | You can get currency conversions in a simple format from yahoo: For example, to convert from GBP to EUR: http://download.finance.yahoo.com/d/quotes.csv?s=GBPEUR=X&f=sl1d1t1ba&e=.csv | Programmatically access currency exchange rates I'm setting up an online ordering system but I'm in Australia and for international customers I'd like to show prices in US dollars or Euros so they don't have to make the mental effort to convert from Australian dollars. Does anyone know if I can pull up to date exchange... | TITLE:
Programmatically access currency exchange rates
QUESTION:
I'm setting up an online ordering system but I'm in Australia and for international customers I'd like to show prices in US dollars or Euros so they don't have to make the mental effort to convert from Australian dollars. Does anyone know if I can pull u... | [
"php",
"currency",
"finance"
] | 114 | 70 | 75,391 | 15 | 0 | 2008-10-08T09:58:42.720000 | 2008-10-08T10:23:43.697000 |
181,992 | 182,003 | How do you change Visual Studio's default web browser? | This is a for a Silverlight project that isn't anchored to an.aspx file, so right clicking, etc. is a bit out of the question. Any ideas? Edit: Add an.html file, then click it. Really dumb. Last time I ask a question at three in the morning. | Why is right-clicking out of the question? With any HTML document at least (even in Miscellaneous Files ) you can right-click on it, select Browse With..., select the browser, and click on Set as Default. If the browser doesn't appear in the list, click on Add.... | How do you change Visual Studio's default web browser? This is a for a Silverlight project that isn't anchored to an.aspx file, so right clicking, etc. is a bit out of the question. Any ideas? Edit: Add an.html file, then click it. Really dumb. Last time I ask a question at three in the morning. | TITLE:
How do you change Visual Studio's default web browser?
QUESTION:
This is a for a Silverlight project that isn't anchored to an.aspx file, so right clicking, etc. is a bit out of the question. Any ideas? Edit: Add an.html file, then click it. Really dumb. Last time I ask a question at three in the morning.
ANSW... | [
"visual-studio",
"visual-studio-2008",
"silverlight",
"browser"
] | 2 | 1 | 3,517 | 2 | 0 | 2008-10-08T09:59:10.080000 | 2008-10-08T10:06:15.497000 |
182,011 | 182,029 | Cast or convert when retrieving data from a database? | When accessing an object in a DataTable retrieved from a database, are there any reasons not to cast the object into your desired type, or are there reasons to use convert? I know the rule is cast when we know what data type we're working with, and convert when attempting to change the data type to something it isn't. ... | I would always cast, for the reasons you state. The gotchas I'm aware of that you need to handle are: You obviously need to be able to handle DBNulls (e.g. by testing with Convert.IsDBNull) In the case of ExecuteScalar I believe you need to check for null as well as DBNull. SQL Servers @@IDENTITY and SCOPE_IDENTITY fun... | Cast or convert when retrieving data from a database? When accessing an object in a DataTable retrieved from a database, are there any reasons not to cast the object into your desired type, or are there reasons to use convert? I know the rule is cast when we know what data type we're working with, and convert when atte... | TITLE:
Cast or convert when retrieving data from a database?
QUESTION:
When accessing an object in a DataTable retrieved from a database, are there any reasons not to cast the object into your desired type, or are there reasons to use convert? I know the rule is cast when we know what data type we're working with, and... | [
".net",
"datatable",
"casting"
] | 5 | 4 | 1,285 | 3 | 0 | 2008-10-08T10:10:19.700000 | 2008-10-08T10:17:22.290000 |
182,018 | 182,024 | Writing resultset to file with sorted output | I want to put "random" output from my result set (about 1.5 mil rows) in a file in a sorted manner. I know i can use sort by command in my query but that command is "expensive". Can you tell me is there any algorithm for writing result set rows in a file so the content would be sorted in the end and can i gain in perfo... | Define an index for the sort criteria in your table, then you can use the order by clause without problems and write the file as it comes from the resultset. If your query has multiple joins, create the proper indexes for the joins and for the sort criteria. You can sort the data on your program but you'd be wasting ti... | Writing resultset to file with sorted output I want to put "random" output from my result set (about 1.5 mil rows) in a file in a sorted manner. I know i can use sort by command in my query but that command is "expensive". Can you tell me is there any algorithm for writing result set rows in a file so the content would... | TITLE:
Writing resultset to file with sorted output
QUESTION:
I want to put "random" output from my result set (about 1.5 mil rows) in a file in a sorted manner. I know i can use sort by command in my query but that command is "expensive". Can you tell me is there any algorithm for writing result set rows in a file so... | [
"java",
"file",
"sorting",
"resultset"
] | 3 | 5 | 1,808 | 4 | 0 | 2008-10-08T10:13:27.167000 | 2008-10-08T10:15:23.200000 |
182,035 | 183,213 | Is there a way to enhance by CSS an HTML <select> and its <option> on IE 6? | Internet explorer 6 seems totally ignore CSS classes or rules on select, option or optgroup tags. Is there a way to bypass that limitation (except install a recent version of IE)? Edit: to be more precise, I'm trying to build a hierarchy between options like that example: Here's the HTML snippet: Os developers Linux Li... | This won't do exactly what you want, but rather than using CSS, you could just use a number of; for the indents, or dashes so: Level 1 -Level 2 --Level 3 etc. If you don't particularly like that, you could surround them with or So it would look like Level 1 Level 2 Level 3 Then you could have the CSS for modern browser... | Is there a way to enhance by CSS an HTML <select> and its <option> on IE 6? Internet explorer 6 seems totally ignore CSS classes or rules on select, option or optgroup tags. Is there a way to bypass that limitation (except install a recent version of IE)? Edit: to be more precise, I'm trying to build a hierarchy betwee... | TITLE:
Is there a way to enhance by CSS an HTML <select> and its <option> on IE 6?
QUESTION:
Internet explorer 6 seems totally ignore CSS classes or rules on select, option or optgroup tags. Is there a way to bypass that limitation (except install a recent version of IE)? Edit: to be more precise, I'm trying to build ... | [
"css",
"internet-explorer",
"browser"
] | 8 | 5 | 48,650 | 7 | 0 | 2008-10-08T10:21:08.493000 | 2008-10-08T14:56:06.690000 |
182,040 | 6,201,691 | Default segment name in rails resources routing | I want to create a route in my rails application along the lines of /panda/blog /tiger/blog /dog/blog where panda, tiger, and dog are all permalinks (for an animal class) The normal way of doing this map.resources:animals do |animal| animal.resource:blog end would create routes along the lines of /animals/panda/blog /a... | In rails 3.x, you can add path => "" to any resource or resources call to remove the first segment from the generated path. resources:animals,:path => "" $ rake routes
animals GET / {:action=>"index",:controller=>"animals"} POST / {:action=>"create",:controller=>"animals"} new_animal GET /new(.:format) {:action=>"new"... | Default segment name in rails resources routing I want to create a route in my rails application along the lines of /panda/blog /tiger/blog /dog/blog where panda, tiger, and dog are all permalinks (for an animal class) The normal way of doing this map.resources:animals do |animal| animal.resource:blog end would create ... | TITLE:
Default segment name in rails resources routing
QUESTION:
I want to create a route in my rails application along the lines of /panda/blog /tiger/blog /dog/blog where panda, tiger, and dog are all permalinks (for an animal class) The normal way of doing this map.resources:animals do |animal| animal.resource:blog... | [
"ruby-on-rails",
"resources",
"routes"
] | 3 | 6 | 1,617 | 2 | 0 | 2008-10-08T10:22:36.430000 | 2011-06-01T13:11:55.770000 |
182,066 | 182,359 | LINQ to SQL Table Dependency | If I have two tables... Category and Pet. Is there a way in LINQ to SQL to make the result of the joined query map to a another strongly typed class (such as: PetWithCategoryName) so that I can strongly pass it to a MVC View? I currently have Category and Pet classes... should I make another one? Maybe I missing someth... | How would I go about using LoadWith? I'm not finding much help online. Any good resources? I found this online: http://blogs.msdn.com/wriju/archive/2007/10/04/linq-to-sql-change-in-datacontext-from-beta-1-to-beta-2.aspx You would do something like: var loadOption = new DataLoadOptions(); loadOption.LoadWith (p => p.Cat... | LINQ to SQL Table Dependency If I have two tables... Category and Pet. Is there a way in LINQ to SQL to make the result of the joined query map to a another strongly typed class (such as: PetWithCategoryName) so that I can strongly pass it to a MVC View? I currently have Category and Pet classes... should I make anothe... | TITLE:
LINQ to SQL Table Dependency
QUESTION:
If I have two tables... Category and Pet. Is there a way in LINQ to SQL to make the result of the joined query map to a another strongly typed class (such as: PetWithCategoryName) so that I can strongly pass it to a MVC View? I currently have Category and Pet classes... sh... | [
"asp.net-mvc",
"linq",
"linq-to-sql"
] | 3 | 4 | 1,216 | 2 | 0 | 2008-10-08T10:37:46.027000 | 2008-10-08T11:58:39.607000 |
182,070 | 182,091 | Serialization problem | The situation is like this: Main project A. and a class library B. A references B Project B has the classes that will be serialized. The classes are used in A. Now, the problem appears when from Project A I try to serialize the objects from B. An exception is thrown that says a class from A cannot be serialized. This i... | I have written a tool called sertool that will tell you what in your object graph cannot be serialized and how it is being referenced. | Serialization problem The situation is like this: Main project A. and a class library B. A references B Project B has the classes that will be serialized. The classes are used in A. Now, the problem appears when from Project A I try to serialize the objects from B. An exception is thrown that says a class from A cannot... | TITLE:
Serialization problem
QUESTION:
The situation is like this: Main project A. and a class library B. A references B Project B has the classes that will be serialized. The classes are used in A. Now, the problem appears when from Project A I try to serialize the objects from B. An exception is thrown that says a c... | [
"c#",
"serialization"
] | 3 | 10 | 3,913 | 4 | 0 | 2008-10-08T10:39:09.720000 | 2008-10-08T10:44:52.877000 |
182,071 | 182,512 | What would be quicker Flash or Javascript? | I have an idea for a website which involves a canvas area which has no limit to its size. Basically you would be able to add items to the canvas (notes, photos whatever really). You would then be able to drag the canvas which would move those items along with the canvas until they disappear of screen. If you dragged th... | I don't think this is a question that will get you an objective answer - Flash developers will tell you Flash is better, web developers will say JavaScript. Trying to remain objective, I'd say that both technologies are suitable for what you describe, but have different advantages. Flash will definitely render faster, ... | What would be quicker Flash or Javascript? I have an idea for a website which involves a canvas area which has no limit to its size. Basically you would be able to add items to the canvas (notes, photos whatever really). You would then be able to drag the canvas which would move those items along with the canvas until ... | TITLE:
What would be quicker Flash or Javascript?
QUESTION:
I have an idea for a website which involves a canvas area which has no limit to its size. Basically you would be able to add items to the canvas (notes, photos whatever really). You would then be able to drag the canvas which would move those items along with... | [
"javascript",
"flash"
] | 3 | 4 | 312 | 5 | 0 | 2008-10-08T10:39:30.280000 | 2008-10-08T12:35:55.960000 |
182,073 | 185,407 | How do I use oracle.jdbc.driver.OracleLog? | I am receiving an error from the Oracle JDBC driver (ojdbc14_g.jar) when trying to obtain a connection to a 10g database. The driver has an oracle.jdbc.driver.OracleLog class which could help but the Oracle documentation is unclear how best to use it. Has anyone had any success using this class? If so, some guidance on... | The logging is usually too low to be interpreted by anyone except Oracle support. Anyway, the above code indicates there is some network connectivity issue between the client and the server (more data was expected to be read from the TCP socket but it somehow got interrupted). What kind of a network are you using? You ... | How do I use oracle.jdbc.driver.OracleLog? I am receiving an error from the Oracle JDBC driver (ojdbc14_g.jar) when trying to obtain a connection to a 10g database. The driver has an oracle.jdbc.driver.OracleLog class which could help but the Oracle documentation is unclear how best to use it. Has anyone had any succes... | TITLE:
How do I use oracle.jdbc.driver.OracleLog?
QUESTION:
I am receiving an error from the Oracle JDBC driver (ojdbc14_g.jar) when trying to obtain a connection to a 10g database. The driver has an oracle.jdbc.driver.OracleLog class which could help but the Oracle documentation is unclear how best to use it. Has any... | [
"java",
"oracle",
"logging",
"jdbc",
"oracle10g"
] | 2 | 1 | 6,310 | 2 | 0 | 2008-10-08T10:39:57.550000 | 2008-10-08T23:52:31.757000 |
182,075 | 182,969 | WPF quickstart documentation | I am totally new to WPF and looking for good quickstart documentation to start with. I will buy the book WPF Unleashed from Adam Nathan, but thats more a reference than a quickstart i think. I just want you to tell me your favorite links and books and maybe demo applications concerning wpf development. Focus of answers... | There is an excellent Hands on Lab for building an Outlook-esque UI using Blend and Visual Studio. It is a bit out of date in terms of Blend 2.5, but it is instrumental in learning how to use WPF and effectively using Blend. | WPF quickstart documentation I am totally new to WPF and looking for good quickstart documentation to start with. I will buy the book WPF Unleashed from Adam Nathan, but thats more a reference than a quickstart i think. I just want you to tell me your favorite links and books and maybe demo applications concerning wpf ... | TITLE:
WPF quickstart documentation
QUESTION:
I am totally new to WPF and looking for good quickstart documentation to start with. I will buy the book WPF Unleashed from Adam Nathan, but thats more a reference than a quickstart i think. I just want you to tell me your favorite links and books and maybe demo applicatio... | [
"wpf",
"documentation"
] | 18 | 1 | 7,176 | 4 | 0 | 2008-10-08T10:40:30.123000 | 2008-10-08T14:09:16.690000 |
182,082 | 182,929 | How to databind a property within a property | I cureently have a set up like below Public ClassA
property _classB as ClassB
End Class
Public ClassB
property _someProperty as someProperty
End Class what I want to do is to databind object A to a gridview with one of the columns being databound to ClassB._someProperty. When I try to databind it as Classb._somePr... | I found the way to do this is to use a template field and eval (see below) Set the datafield as property classB and then: <%#Eval("classB._someProperty")%> | How to databind a property within a property I cureently have a set up like below Public ClassA
property _classB as ClassB
End Class
Public ClassB
property _someProperty as someProperty
End Class what I want to do is to databind object A to a gridview with one of the columns being databound to ClassB._someProperty... | TITLE:
How to databind a property within a property
QUESTION:
I cureently have a set up like below Public ClassA
property _classB as ClassB
End Class
Public ClassB
property _someProperty as someProperty
End Class what I want to do is to databind object A to a gridview with one of the columns being databound to Cl... | [
"asp.net",
"vb.net",
"data-binding"
] | 0 | 0 | 2,058 | 2 | 0 | 2008-10-08T10:42:19.090000 | 2008-10-08T14:02:07.330000 |
182,086 | 188,078 | determining points from set of pairwise distances | given a matrix of distances between points is there an algorithm for determining a set of n-dimensional points that has these distances? (or at least minimises the error) sort of like a n-dimensional version of the turnpike problem. The best I can come up with is using multidimensional scaling. | You are on the right track with multi-dimensional scaling (MDS), but MDS is impractical for large datasets, as its time complexity is quadratic in the number of points. You may want to look at FastMap, which has linear time complexity and is better suited to indexing. See: Christos Faloutsos and King-Ip Lin: "FastMap: ... | determining points from set of pairwise distances given a matrix of distances between points is there an algorithm for determining a set of n-dimensional points that has these distances? (or at least minimises the error) sort of like a n-dimensional version of the turnpike problem. The best I can come up with is using ... | TITLE:
determining points from set of pairwise distances
QUESTION:
given a matrix of distances between points is there an algorithm for determining a set of n-dimensional points that has these distances? (or at least minimises the error) sort of like a n-dimensional version of the turnpike problem. The best I can come... | [
"algorithm",
"geometry",
"matrix"
] | 7 | 6 | 1,179 | 4 | 0 | 2008-10-08T10:43:29.227000 | 2008-10-09T16:31:25.140000 |
182,088 | 182,549 | Web App to best Add, Delete and Edit rows without refreshing the page | I am writing a Time Sheeting web application that involves users entering their tasks for the week. I would like not to have the page refresh so I am exploring ways to add/delete/edit tasks using JavaScript on the client browser. Currently I am using ASP.NET-MVC, Ajax, JQuery and LiveValidation and I am make steady (if... | I would suggest ExtJS. It is a library for more "application" like interfaces in web apps. Included is a EditorGridPanel class, which would be able to do what you're looking for fairly easily. And it looks GREAT. | Web App to best Add, Delete and Edit rows without refreshing the page I am writing a Time Sheeting web application that involves users entering their tasks for the week. I would like not to have the page refresh so I am exploring ways to add/delete/edit tasks using JavaScript on the client browser. Currently I am using... | TITLE:
Web App to best Add, Delete and Edit rows without refreshing the page
QUESTION:
I am writing a Time Sheeting web application that involves users entering their tasks for the week. I would like not to have the page refresh so I am exploring ways to add/delete/edit tasks using JavaScript on the client browser. Cu... | [
"jquery",
"asp.net-mvc",
"ajax"
] | 0 | 1 | 1,525 | 2 | 0 | 2008-10-08T10:43:31.583000 | 2008-10-08T12:47:39.680000 |
182,101 | 182,261 | SQL Server 2000 Live data mirroring | I am currently working with 2 sql 2000 servers one I can query but not add any databases to which lead to the second one having lots of queries that use the first as a linked server. I would like to improve performance while still querying live data. Is it possible to mirror the live data to the second server, that way... | You have three options. use replication to move the data from the first server to the second. This has the drawback of making changes extremely difficult due to the need to tear down and set the replication up for each change. Use log shipping in SQL 2000. The idea is that immediately after changes occur on your primar... | SQL Server 2000 Live data mirroring I am currently working with 2 sql 2000 servers one I can query but not add any databases to which lead to the second one having lots of queries that use the first as a linked server. I would like to improve performance while still querying live data. Is it possible to mirror the live... | TITLE:
SQL Server 2000 Live data mirroring
QUESTION:
I am currently working with 2 sql 2000 servers one I can query but not add any databases to which lead to the second one having lots of queries that use the first as a linked server. I would like to improve performance while still querying live data. Is it possible ... | [
"sql-server",
"database",
"sql-server-2000",
"mirror"
] | 2 | 2 | 3,436 | 1 | 0 | 2008-10-08T10:48:37.953000 | 2008-10-08T11:34:41.667000 |
182,130 | 182,255 | SQL - state machine - reporting on historical data based on changeset | I want to record user states and then be able to report historically based on the record of changes we've kept. I'm trying to do this in SQL (using PostgreSQL) and I have a proposed structure for recording user changes like the following. CREATE TABLE users ( userid SERIAL NOT NULL PRIMARY KEY, name VARCHAR(40), status... | This can be done, but would be a lot more efficient if you stored the end date of each log. With your model you have to do something like: select l1.userid from status_log l1 where l1.status='s' and l1.logcreated = (select max(l2.logcreated) from status_log l2 where l2.userid = l1.userid and l2.logcreated <= date '2008... | SQL - state machine - reporting on historical data based on changeset I want to record user states and then be able to report historically based on the record of changes we've kept. I'm trying to do this in SQL (using PostgreSQL) and I have a proposed structure for recording user changes like the following. CREATE TABL... | TITLE:
SQL - state machine - reporting on historical data based on changeset
QUESTION:
I want to record user states and then be able to report historically based on the record of changes we've kept. I'm trying to do this in SQL (using PostgreSQL) and I have a proposed structure for recording user changes like the foll... | [
"sql",
"postgresql"
] | 1 | 2 | 1,745 | 4 | 0 | 2008-10-08T10:55:38.877000 | 2008-10-08T11:33:09.410000 |
182,145 | 183,350 | A read on mesh algorithm and mesh library | I am interested to read and understand the 2D mesh algorithms. A search on Google reveals a lot of papers and sources, however most are too academic and not much on beginner's side. So, would anyone here recommend any reading sources ( suitable for the beginners), or open source implementation that I can learn from the... | I second David's answer regarding Jonathan Shewchuk's site as a good starting point. In terms of open source software, it depends on what you are looking for exactly. If you are interested in mesh generation, you can have a look at CGAL 's code. Understanding the low level parts of CGAL's code is too much for a beginne... | A read on mesh algorithm and mesh library I am interested to read and understand the 2D mesh algorithms. A search on Google reveals a lot of papers and sources, however most are too academic and not much on beginner's side. So, would anyone here recommend any reading sources ( suitable for the beginners), or open sourc... | TITLE:
A read on mesh algorithm and mesh library
QUESTION:
I am interested to read and understand the 2D mesh algorithms. A search on Google reveals a lot of papers and sources, however most are too academic and not much on beginner's side. So, would anyone here recommend any reading sources ( suitable for the beginne... | [
"algorithm",
"mesh"
] | 9 | 6 | 5,935 | 2 | 0 | 2008-10-08T11:01:05.993000 | 2008-10-08T15:21:42.943000 |
182,160 | 182,203 | Spring security: adding "On successful login event listener" | I'm new to Spring Security. How do I add an event listener which will be called as a user logs in successfully? Also I need to get some kind of unique session ID in this listener which should be available further on. I need this ID to synchronize with another server. | You need to define a Spring Bean which implements ApplicationListener. Then, in your code, do something like this: public void onApplicationEvent(ApplicationEvent appEvent) { if (appEvent instanceof AuthenticationSuccessEvent) { AuthenticationSuccessEvent event = (AuthenticationSuccessEvent) appEvent; UserDetails userD... | Spring security: adding "On successful login event listener" I'm new to Spring Security. How do I add an event listener which will be called as a user logs in successfully? Also I need to get some kind of unique session ID in this listener which should be available further on. I need this ID to synchronize with another... | TITLE:
Spring security: adding "On successful login event listener"
QUESTION:
I'm new to Spring Security. How do I add an event listener which will be called as a user logs in successfully? Also I need to get some kind of unique session ID in this listener which should be available further on. I need this ID to synchr... | [
"authentication",
"spring-security",
"listener"
] | 41 | 55 | 45,958 | 5 | 0 | 2008-10-08T11:05:21.947000 | 2008-10-08T11:14:31.270000 |
182,180 | 182,252 | Data from Google Analytics | So Google Analytics does not have an API that we can use to get our data, so is there an efficient way to programaticly fetch the data collected by Google, without logging it locally? Edit: I would prefer a Python or PHP solution but anything will work. | Also, I forgot about this: I never actually completely implemented this for a client because the deal fell through... But you can customize the dashboard to include the sections of Google Analytics that your report might need and have a scheduled email. If the reports do not need to be too detailed and if Google alread... | Data from Google Analytics So Google Analytics does not have an API that we can use to get our data, so is there an efficient way to programaticly fetch the data collected by Google, without logging it locally? Edit: I would prefer a Python or PHP solution but anything will work. | TITLE:
Data from Google Analytics
QUESTION:
So Google Analytics does not have an API that we can use to get our data, so is there an efficient way to programaticly fetch the data collected by Google, without logging it locally? Edit: I would prefer a Python or PHP solution but anything will work.
ANSWER:
Also, I forg... | [
"google-analytics"
] | 8 | 4 | 2,459 | 9 | 0 | 2008-10-08T11:10:11.013000 | 2008-10-08T11:31:54.653000 |
182,181 | 182,276 | sqlParameter conversion | I'm trying to call the SQL statement below but get the following error: System.Data.SqlClient.SqlException: Conversion failed when converting the varchar value '+@buildingIDs+' to data type int. @"SELECT id, startDateTime, endDateTime FROM tb_bookings WHERE buildingID IN ('+@buildingIDs+') AND startDateTime <= @fromDat... | Bravax's way is a bit dangerous. I'd go with the following so you don't get attacked with SQL Injections: int[] buildingIDs = new int[] { 1, 2, 3 };
/***/ @"SELECT id, startDateTime, endDateTime From tb_bookings WHERE buildingID IN (" + string.Join(", ", buildingIDs.Select(id => id.ToString()).ToArray()) + ") AND star... | sqlParameter conversion I'm trying to call the SQL statement below but get the following error: System.Data.SqlClient.SqlException: Conversion failed when converting the varchar value '+@buildingIDs+' to data type int. @"SELECT id, startDateTime, endDateTime FROM tb_bookings WHERE buildingID IN ('+@buildingIDs+') AND s... | TITLE:
sqlParameter conversion
QUESTION:
I'm trying to call the SQL statement below but get the following error: System.Data.SqlClient.SqlException: Conversion failed when converting the varchar value '+@buildingIDs+' to data type int. @"SELECT id, startDateTime, endDateTime FROM tb_bookings WHERE buildingID IN ('+@bu... | [
".net",
"sql",
"sql-server"
] | 1 | 2 | 851 | 4 | 0 | 2008-10-08T11:10:25.803000 | 2008-10-08T11:37:23.237000 |
182,194 | 182,310 | Should new web applications follow the MVC or MVP pattern? | Note that I am not asking which to choose (MVC or MVP), but rather if one of the two should be used for a web application. I realize that it might be too much work to convert an older application from its current design to a MVC or MVP pattern. However, what about for a new app? It appears these are the most popular ar... | MVP / MVC works well in web applications because the HTTP verb + URL combination is a very good way to determine which action to take. There are reasons not to use it, such as if your team has a lot of experience with another framework, but I would generally recommend an MVP / MVC framework. Your application will be fi... | Should new web applications follow the MVC or MVP pattern? Note that I am not asking which to choose (MVC or MVP), but rather if one of the two should be used for a web application. I realize that it might be too much work to convert an older application from its current design to a MVC or MVP pattern. However, what ab... | TITLE:
Should new web applications follow the MVC or MVP pattern?
QUESTION:
Note that I am not asking which to choose (MVC or MVP), but rather if one of the two should be used for a web application. I realize that it might be too much work to convert an older application from its current design to a MVC or MVP pattern... | [
"model-view-controller",
"architecture",
"web-applications",
"design-patterns",
"mvp"
] | 6 | 3 | 3,863 | 8 | 0 | 2008-10-08T11:12:42.990000 | 2008-10-08T11:46:07.353000 |
182,229 | 182,345 | What do I need to import to gain access to my models? | I'd like to run a script to populate my database. I'd like to access it through the Django database API. The only problem is that I don't know what I would need to import to gain access to this. How can this be achieved? | Import your settings module too import os os.environ["DJANGO_SETTINGS_MODULE"] = "mysite.settings"
from mysite.polls.models import Poll, Choice should do the trick. | What do I need to import to gain access to my models? I'd like to run a script to populate my database. I'd like to access it through the Django database API. The only problem is that I don't know what I would need to import to gain access to this. How can this be achieved? | TITLE:
What do I need to import to gain access to my models?
QUESTION:
I'd like to run a script to populate my database. I'd like to access it through the Django database API. The only problem is that I don't know what I would need to import to gain access to this. How can this be achieved?
ANSWER:
Import your settin... | [
"python",
"django"
] | 10 | 13 | 1,362 | 5 | 0 | 2008-10-08T11:23:54.933000 | 2008-10-08T11:55:46.883000 |
182,253 | 182,417 | Os.path : can you explain this behavior? | I love Python because it comes batteries included, and I use built-in functions, a lot, to do the dirty job for me. I have always been using happily the os.path module to deal with file path but recently I ended up with unexpected results on Python 2.5 under Ubuntu linux, while dealing with string that represent window... | If you want to manipulate Windows paths on linux you should use the ntpath module (this is the module that is imported as os.path on windows - posixpath is imported as os.path on linux) >>> import ntpath >>> filepath = r"c:\ttemp\FILEPA~1.EXE" >>> print ntpath.basename(filepath) FILEPA~1.EXE >>> print ntpath.splitdrive... | Os.path : can you explain this behavior? I love Python because it comes batteries included, and I use built-in functions, a lot, to do the dirty job for me. I have always been using happily the os.path module to deal with file path but recently I ended up with unexpected results on Python 2.5 under Ubuntu linux, while ... | TITLE:
Os.path : can you explain this behavior?
QUESTION:
I love Python because it comes batteries included, and I use built-in functions, a lot, to do the dirty job for me. I have always been using happily the os.path module to deal with file path but recently I ended up with unexpected results on Python 2.5 under Ub... | [
"python",
"path"
] | 7 | 26 | 2,358 | 3 | 0 | 2008-10-08T11:32:16.227000 | 2008-10-08T12:11:55.803000 |
182,258 | 182,724 | Are there any security risks associated with me using OpenID as the authentication method on my site? | Is OpenID a secure method of authentication users on a website? And, if not, what are the security risks associated with OpenID? | Actually I always disliked OpenID for various reasons. I have to trust the OpenID provider who I gave my data. I do trust certain sides to certain degrees, but just because I may trust Stack Overflow, I don't automatically trust any of the well known OpenID providers. If my OpenID password is compromised, all my sites ... | Are there any security risks associated with me using OpenID as the authentication method on my site? Is OpenID a secure method of authentication users on a website? And, if not, what are the security risks associated with OpenID? | TITLE:
Are there any security risks associated with me using OpenID as the authentication method on my site?
QUESTION:
Is OpenID a secure method of authentication users on a website? And, if not, what are the security risks associated with OpenID?
ANSWER:
Actually I always disliked OpenID for various reasons. I have ... | [
"security",
"openid"
] | 22 | 7 | 3,469 | 9 | 0 | 2008-10-08T11:33:19.050000 | 2008-10-08T13:24:34.783000 |
182,262 | 182,427 | How to constrain a database table so only one row can have a particular value in a column? | Using Oracle, if a column value can be 'YES' or 'NO' is it possible to constrain a table so that only one row can have a 'YES' value? I would rather redesign the table structure but this is not possible. [UDPATE] Sadly, null values are not allowed in this table. | Use a function-based index: create unique index only_one_yes on mytable (case when col='YES' then 'YES' end); Oracle only indexes keys that are not completely null, and the CASE expression here ensures that all the 'NO' values are changed to nulls and so not indexed. | How to constrain a database table so only one row can have a particular value in a column? Using Oracle, if a column value can be 'YES' or 'NO' is it possible to constrain a table so that only one row can have a 'YES' value? I would rather redesign the table structure but this is not possible. [UDPATE] Sadly, null valu... | TITLE:
How to constrain a database table so only one row can have a particular value in a column?
QUESTION:
Using Oracle, if a column value can be 'YES' or 'NO' is it possible to constrain a table so that only one row can have a 'YES' value? I would rather redesign the table structure but this is not possible. [UDPATE... | [
"oracle",
"triggers",
"constraints"
] | 18 | 21 | 9,527 | 7 | 0 | 2008-10-08T11:34:52.930000 | 2008-10-08T12:13:33.197000 |
182,273 | 182,304 | Versioning by default in SharePoint | How can I modify a SharePoint site so that versioning is turned on by default in Document Libraries? | Versioning is not done at the site level, but at the list level. If you want versioning to be turn on on each new library, you'll have to either: Use your own library template (with versioning turned on) Use feature + event handler to programmatically activate versioning on each new list The easiest way is probably to ... | Versioning by default in SharePoint How can I modify a SharePoint site so that versioning is turned on by default in Document Libraries? | TITLE:
Versioning by default in SharePoint
QUESTION:
How can I modify a SharePoint site so that versioning is turned on by default in Document Libraries?
ANSWER:
Versioning is not done at the site level, but at the list level. If you want versioning to be turn on on each new library, you'll have to either: Use your o... | [
"sharepoint"
] | 5 | 7 | 7,672 | 2 | 0 | 2008-10-08T11:36:55.267000 | 2008-10-08T11:43:57.810000 |
182,278 | 316,838 | Is there a way to simulate the C++ 'friend' concept in Java? | I would like to be able to write a Java class in one package which can access non-public methods of a class in another package without having to make it a subclass of the other class. Is this possible? | The 'friend' concept is useful in Java, for example, to separate an API from its implementation. It is common for implementation classes to need access to API class internals but these should not be exposed to API clients. This can be achieved using the 'Friend Accessor' pattern as detailed below: The class exposed thr... | Is there a way to simulate the C++ 'friend' concept in Java? I would like to be able to write a Java class in one package which can access non-public methods of a class in another package without having to make it a subclass of the other class. Is this possible? | TITLE:
Is there a way to simulate the C++ 'friend' concept in Java?
QUESTION:
I would like to be able to write a Java class in one package which can access non-public methods of a class in another package without having to make it a subclass of the other class. Is this possible?
ANSWER:
The 'friend' concept is useful... | [
"java",
"c++",
"friend",
"accessor"
] | 240 | 48 | 106,374 | 18 | 0 | 2008-10-08T11:37:53.360000 | 2008-11-25T09:44:13.493000 |
182,280 | 183,010 | Alternative to Html.Button<T>? | I know the Html.Button has been moved to the Microsoft.Web.Mvc namespace, but I really miss the generic versions that used to exist in the early Previews. All I want the Html.Button to do is to hit an action in my controller, but I'd rather not write the JavaScript in the onClickMethod argument. In my previous project ... | The problem with the generic versions is that filters are allowed to change the actual name of the action away from the name of the method (like the [ActionName] attribute). | Alternative to Html.Button<T>? I know the Html.Button has been moved to the Microsoft.Web.Mvc namespace, but I really miss the generic versions that used to exist in the early Previews. All I want the Html.Button to do is to hit an action in my controller, but I'd rather not write the JavaScript in the onClickMethod ar... | TITLE:
Alternative to Html.Button<T>?
QUESTION:
I know the Html.Button has been moved to the Microsoft.Web.Mvc namespace, but I really miss the generic versions that used to exist in the early Previews. All I want the Html.Button to do is to hit an action in my controller, but I'd rather not write the JavaScript in th... | [
"asp.net",
"asp.net-mvc",
"controller",
"action",
"codeplex"
] | 0 | 3 | 625 | 2 | 0 | 2008-10-08T11:38:26.357000 | 2008-10-08T14:18:19.857000 |
182,281 | 182,318 | Replace Placeholders in word document with c# | I have a template in word (.docx) format and want to replace some placeholders in this template with my own data, do you know where I can find the right classes for this project? It would be nice for me to know the namespace. Are there any newer classes for handling word documents in the docx format (xml) than the com ... | The new office formats (docx, xlsx, etc) are zip files that contain a collection of xml files. With that in mind you have a couple of approaches. You can use the Open XML SDK located at http://www.microsoft.com/downloads/details.aspx?FamilyId=AD0B72FB-4A1D-4C52-BDB5-7DD7E816D046&displaylang=en You can unzip the docx fi... | Replace Placeholders in word document with c# I have a template in word (.docx) format and want to replace some placeholders in this template with my own data, do you know where I can find the right classes for this project? It would be nice for me to know the namespace. Are there any newer classes for handling word do... | TITLE:
Replace Placeholders in word document with c#
QUESTION:
I have a template in word (.docx) format and want to replace some placeholders in this template with my own data, do you know where I can find the right classes for this project? It would be nice for me to know the namespace. Are there any newer classes fo... | [
"c#",
".net",
"ms-word",
"placeholder"
] | 6 | 5 | 10,144 | 4 | 0 | 2008-10-08T11:38:54.733000 | 2008-10-08T11:47:56.150000 |
182,287 | 182,353 | Can PHP PDO Statements accept the table or column name as parameter? | Why can't I pass the table name to a prepared PDO statement? $stmt = $dbh->prepare('SELECT * FROM:table WHERE 1'); if ($stmt->execute(array(':table' => 'users'))) { var_dump($stmt->fetchAll()); } Is there another safe way to insert a table name into a SQL query? With safe, I mean that I don't want to do $sql = "SELECT ... | Table and Column names CANNOT be replaced by parameters in PDO. In that case you will simply want to filter and sanitize the data manually. One way to do this is to pass in shorthand parameters to the function that will execute the query dynamically and then use a switch() statement to create a white list of valid valu... | Can PHP PDO Statements accept the table or column name as parameter? Why can't I pass the table name to a prepared PDO statement? $stmt = $dbh->prepare('SELECT * FROM:table WHERE 1'); if ($stmt->execute(array(':table' => 'users'))) { var_dump($stmt->fetchAll()); } Is there another safe way to insert a table name into a... | TITLE:
Can PHP PDO Statements accept the table or column name as parameter?
QUESTION:
Why can't I pass the table name to a prepared PDO statement? $stmt = $dbh->prepare('SELECT * FROM:table WHERE 1'); if ($stmt->execute(array(':table' => 'users'))) { var_dump($stmt->fetchAll()); } Is there another safe way to insert a... | [
"php",
"pdo"
] | 278 | 243 | 100,646 | 9 | 0 | 2008-10-08T11:39:57.787000 | 2008-10-08T11:57:15.897000 |
182,306 | 182,335 | How do I print to a Bluebird BIP-1300 thermal printer from C#? | My application runs under CF 2.0 locally and i would like to know how to connect and send something to print in the embedded printer of a http://www.milliontech.com/home/content/view/195/95/'>Bluebird BIP-1300 device. Ideally i would like an example in C#. Thank you in advance. | I'm not familiar with this particular device, but in general, printers in this class require you to send RAW data, as they don't have Windows drivers. This KB article outlines how to send data to the device using C#: whether this is useful for you depends on whether the unmanaged APIs used are available in the environm... | How do I print to a Bluebird BIP-1300 thermal printer from C#? My application runs under CF 2.0 locally and i would like to know how to connect and send something to print in the embedded printer of a http://www.milliontech.com/home/content/view/195/95/'>Bluebird BIP-1300 device. Ideally i would like an example in C#. ... | TITLE:
How do I print to a Bluebird BIP-1300 thermal printer from C#?
QUESTION:
My application runs under CF 2.0 locally and i would like to know how to connect and send something to print in the embedded printer of a http://www.milliontech.com/home/content/view/195/95/'>Bluebird BIP-1300 device. Ideally i would like ... | [
"c#",
"embedded",
"thermal-printer"
] | 2 | 2 | 3,142 | 2 | 0 | 2008-10-08T11:44:18.683000 | 2008-10-08T11:52:56.950000 |
182,316 | 182,422 | Java: Swing Libraries & Thread Safety | I've often heard criticism of the lack of thread safety in the Swing libraries. Yet, I am not sure as to what I would be doing in my own code with could cause issues: In what situations does the fact Swing is not thread safe come into play? What should I actively avoid doing? | Never do long running tasks in response to a button, event, etc as these are on the event thread. If you block the event thread, the ENTIRE GUI will be completely unresponsive resulting in REALLY pissed off users. This is why Swing seems slow and crusty. Use Threads, Executors, and SwingWorker to run tasks NOT ON THE E... | Java: Swing Libraries & Thread Safety I've often heard criticism of the lack of thread safety in the Swing libraries. Yet, I am not sure as to what I would be doing in my own code with could cause issues: In what situations does the fact Swing is not thread safe come into play? What should I actively avoid doing? | TITLE:
Java: Swing Libraries & Thread Safety
QUESTION:
I've often heard criticism of the lack of thread safety in the Swing libraries. Yet, I am not sure as to what I would be doing in my own code with could cause issues: In what situations does the fact Swing is not thread safe come into play? What should I actively ... | [
"java",
"multithreading",
"swing"
] | 23 | 27 | 10,743 | 11 | 0 | 2008-10-08T11:47:26.900000 | 2008-10-08T12:12:28.503000 |
182,323 | 1,784,248 | How to Serialize Hibernate Collections Properly? | I'm trying to serialize objects from a database that have been retrieved with Hibernate, and I'm only interested in the objects' actual data in its entirety (cycles included). Now I've been working with XStream, which seems powerful. The problem with XStream is that it looks all too blindly on the information. It recog... | solution described here worked well for me: http://jira.codehaus.org/browse/XSTR-226 the idea is to have custom XStream converter/mapper for hibernate collections, which will extract actual collection from hibernate one and will call corresponding standard converter (for ArrayList, HashMap etc.) | How to Serialize Hibernate Collections Properly? I'm trying to serialize objects from a database that have been retrieved with Hibernate, and I'm only interested in the objects' actual data in its entirety (cycles included). Now I've been working with XStream, which seems powerful. The problem with XStream is that it l... | TITLE:
How to Serialize Hibernate Collections Properly?
QUESTION:
I'm trying to serialize objects from a database that have been retrieved with Hibernate, and I'm only interested in the objects' actual data in its entirety (cycles included). Now I've been working with XStream, which seems powerful. The problem with XS... | [
"java",
"hibernate",
"serialization",
"collections"
] | 2 | 1 | 8,751 | 3 | 0 | 2008-10-08T11:48:47.927000 | 2009-11-23T16:23:54.083000 |
182,325 | 182,332 | Why are functional tests not enough? What do unit tests offer? | I just had a conversation with my lead developer who disagreed that unit tests are all that necessary or important. In his view, functional tests with a high enough code coverage should be enough since any inner refactorings (interface changes, etc.) will not lead to the tests being needed to be rewritten or looked ove... | Off the top of my head Unit tests are repeatable without effort. Write once, run thousands of times, no human effort required, and much faster feedback than you get from a functional test Unit tests test small units, so immediately point to the correct "sector" in which the error occurs. Functional tests point out erro... | Why are functional tests not enough? What do unit tests offer? I just had a conversation with my lead developer who disagreed that unit tests are all that necessary or important. In his view, functional tests with a high enough code coverage should be enough since any inner refactorings (interface changes, etc.) will n... | TITLE:
Why are functional tests not enough? What do unit tests offer?
QUESTION:
I just had a conversation with my lead developer who disagreed that unit tests are all that necessary or important. In his view, functional tests with a high enough code coverage should be enough since any inner refactorings (interface cha... | [
"unit-testing",
"tdd",
"functional-testing"
] | 12 | 20 | 2,332 | 8 | 0 | 2008-10-08T11:49:01.030000 | 2008-10-08T11:52:40.460000 |
182,365 | 182,462 | Module versions in a crash dump | Is there a way to figure out versions of modules that were loaded into the process' address space when the process crashed from a crash dump that was generated by the process calling the MiniDumpWriteDump function? In other words, is any version information stored inside a dmp file? Thanks. | load your minidump into WinDbg, then there's a Modules item off the Debug menu that shows checksum and timestamp information. That may be enough info for your purposes. You can get the version from all loaded modules by typing "LM v" in the command window, in WinDBG. The list is long and you get lots, including the Pro... | Module versions in a crash dump Is there a way to figure out versions of modules that were loaded into the process' address space when the process crashed from a crash dump that was generated by the process calling the MiniDumpWriteDump function? In other words, is any version information stored inside a dmp file? Than... | TITLE:
Module versions in a crash dump
QUESTION:
Is there a way to figure out versions of modules that were loaded into the process' address space when the process crashed from a crash dump that was generated by the process calling the MiniDumpWriteDump function? In other words, is any version information stored insid... | [
"winapi",
"crash-dumps",
"module-versions"
] | 2 | 2 | 2,137 | 2 | 0 | 2008-10-08T11:59:55.533000 | 2008-10-08T12:23:07.560000 |
182,372 | 183,568 | What is the easiest way using .net to check if events have been logged in the eventlog? | What is the easiest way to check if events have been logged in the eventlog during a period of time? I want to perform a series of automated test steps and then check if any errors were logged to the Application Event Log, ignoring a few sources that I'm not interested in. I can use System.Diagnostics.EventLog and then... | Just to be a good Wiki citizen and strive for completion, there are other ways. I didn't suggest it earlier because it is complete overkill for something that is only going to be run in-house as part of a test suite, and you said right in the title you wanted something easy. But if you need to see events as they occur ... | What is the easiest way using .net to check if events have been logged in the eventlog? What is the easiest way to check if events have been logged in the eventlog during a period of time? I want to perform a series of automated test steps and then check if any errors were logged to the Application Event Log, ignoring ... | TITLE:
What is the easiest way using .net to check if events have been logged in the eventlog?
QUESTION:
What is the easiest way to check if events have been logged in the eventlog during a period of time? I want to perform a series of automated test steps and then check if any errors were logged to the Application Ev... | [
"c#",
".net",
"testing",
"event-log"
] | 0 | 5 | 4,023 | 5 | 0 | 2008-10-08T12:01:07.230000 | 2008-10-08T16:08:49.353000 |
182,373 | 182,474 | What is the best way to do a flicker-free animated C# custom control? | I am currently creating a custom control that needs to handle animation in a C# project. It is basically a listbox that contains a fixed number of elements that are subject to move. An element (another user control with a background image and a couple of generated labels) can move upwards, downwards or be taken out of ... | your best bet for flicker-free animation is to do the painting yourself (use the Graphics object in the Paint event handler) and use double-buffering. In your custom control you will need code like this in the constructor: this.SetStyle(ControlStyles.UserPaint | ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPa... | What is the best way to do a flicker-free animated C# custom control? I am currently creating a custom control that needs to handle animation in a C# project. It is basically a listbox that contains a fixed number of elements that are subject to move. An element (another user control with a background image and a coupl... | TITLE:
What is the best way to do a flicker-free animated C# custom control?
QUESTION:
I am currently creating a custom control that needs to handle animation in a C# project. It is basically a listbox that contains a fixed number of elements that are subject to move. An element (another user control with a background... | [
"c#",
"animation",
"controls",
"doublebuffered"
] | 4 | 3 | 8,113 | 4 | 0 | 2008-10-08T12:01:40.177000 | 2008-10-08T12:25:30.427000 |
182,379 | 182,481 | Uppercase first two characters in a column in a db table | I've got a column in a database table (SQL Server 2005) that contains data like this: TQ7394 SZ910284 T r1534 su8472 I would like to update this column so that the first two characters are uppercase. I would also like to remove any spaces between the first two characters. So T q1234 would become TQ1234. The solution sh... | Here is a solution: EDIT: Updated to support replacement of multiple spaces between the first and the second non-space characters /* TEST TABLE */ DECLARE @T AS TABLE(code Varchar(20)) INSERT INTO @T SELECT 'ab1234x1' UNION SELECT ' ab1234x2' UNION SELECT ' ab1234x3' UNION SELECT 'a b1234x4' UNION SELECT 'a b1234x5' UN... | Uppercase first two characters in a column in a db table I've got a column in a database table (SQL Server 2005) that contains data like this: TQ7394 SZ910284 T r1534 su8472 I would like to update this column so that the first two characters are uppercase. I would also like to remove any spaces between the first two ch... | TITLE:
Uppercase first two characters in a column in a db table
QUESTION:
I've got a column in a database table (SQL Server 2005) that contains data like this: TQ7394 SZ910284 T r1534 su8472 I would like to update this column so that the first two characters are uppercase. I would also like to remove any spaces betwee... | [
"sql",
"sql-server",
"t-sql",
"language-agnostic"
] | 3 | 4 | 3,598 | 6 | 0 | 2008-10-08T12:03:23.093000 | 2008-10-08T12:27:45.710000 |
182,393 | 183,401 | Xml configuration versus Annotation based configuration | In a few large projects i have been working on lately it seems to become increasingly important to choose one or the other (XML or Annotation). As projects grow, consistency is very important for maintainability. My questions are: what are the advantages of XML-based configuration over Annotation-based configuration an... | Annotations have their use, but they are not the one silver bullet to kill XML configuration. I recommend mixing the two! For instance, if using Spring, it is entirely intuitive to use XML for the dependency injection portion of your application. This gets the code's dependencies away from the code which will be using ... | Xml configuration versus Annotation based configuration In a few large projects i have been working on lately it seems to become increasingly important to choose one or the other (XML or Annotation). As projects grow, consistency is very important for maintainability. My questions are: what are the advantages of XML-ba... | TITLE:
Xml configuration versus Annotation based configuration
QUESTION:
In a few large projects i have been working on lately it seems to become increasingly important to choose one or the other (XML or Annotation). As projects grow, consistency is very important for maintainability. My questions are: what are the ad... | [
"java",
"xml",
"spring",
"annotations"
] | 135 | 204 | 83,040 | 16 | 0 | 2008-10-08T12:06:00.247000 | 2008-10-08T15:31:53.513000 |
182,408 | 182,456 | Manual for cross-compiling a C++ application from Linux to Windows? | Is there a manual for cross-compiling a C++ application from Linux to Windows? Just that. I would like some information (links, reference, examples...) to guide me to do that. I don't even know if it's possible. My objective is to compile a program in Linux and get a.exe file that I can run under Windows. | The basics are not too difficult: sudo apt-get install mingw32 cat > main.c < Replace apt-get with yum, or whatever your Linux distro uses. That will generate a hello.exe for Windows. Once you get your head around that, you could use autotools, and set CC=i586-mingw32msvc-cc CC=i586-mingw32msvc-cc./configure && make Or... | Manual for cross-compiling a C++ application from Linux to Windows? Is there a manual for cross-compiling a C++ application from Linux to Windows? Just that. I would like some information (links, reference, examples...) to guide me to do that. I don't even know if it's possible. My objective is to compile a program in ... | TITLE:
Manual for cross-compiling a C++ application from Linux to Windows?
QUESTION:
Is there a manual for cross-compiling a C++ application from Linux to Windows? Just that. I would like some information (links, reference, examples...) to guide me to do that. I don't even know if it's possible. My objective is to com... | [
"c++",
"windows",
"linux",
"cross-compiling"
] | 43 | 51 | 38,057 | 3 | 0 | 2008-10-08T12:09:44.607000 | 2008-10-08T12:21:42.073000 |
182,432 | 183,026 | How to add non-nullable columns with default values | Often we need to add a non-nullable column to a table, and it is quite a mission. Using a default constraint as is doesn’t work, so we have to create nullable columns, update them to default values, then make them non-nullable. Is there not an easier way to do this? | Yes, the WITH VALUES modifier to a DEFAULT constraint applies the default value to existing rows, eliminating all the 'hard' work described in the question. IF NOT EXISTS (SELECT * FROM sys.columns WHERE object_id=OBJECT_ID('[caConfig]') AND [Name]='ExportWizardVersion') ALTER TABLE [caConfig] ADD [ExportWizardVersion]... | How to add non-nullable columns with default values Often we need to add a non-nullable column to a table, and it is quite a mission. Using a default constraint as is doesn’t work, so we have to create nullable columns, update them to default values, then make them non-nullable. Is there not an easier way to do this? | TITLE:
How to add non-nullable columns with default values
QUESTION:
Often we need to add a non-nullable column to a table, and it is quite a mission. Using a default constraint as is doesn’t work, so we have to create nullable columns, update them to default values, then make them non-nullable. Is there not an easier... | [
"sql-server"
] | 5 | 13 | 4,551 | 1 | 0 | 2008-10-08T12:15:29.400000 | 2008-10-08T14:21:15.310000 |
182,436 | 182,477 | Tool for validating SQL Server database schema | Are there any tools available for validating a database schema against a set of design rules, naming conventions, etc. I'm not talking about comparing one database to another (as covered by this question ). I want to be able to say "What in this database doesn't meet this set of rules". Some examples of the type of rul... | One way to accomplish this would be to script out an entire database and then apply rules consisting of regular expressions to the script. SSW's commercial tool does something similiar for SQL Server. | Tool for validating SQL Server database schema Are there any tools available for validating a database schema against a set of design rules, naming conventions, etc. I'm not talking about comparing one database to another (as covered by this question ). I want to be able to say "What in this database doesn't meet this ... | TITLE:
Tool for validating SQL Server database schema
QUESTION:
Are there any tools available for validating a database schema against a set of design rules, naming conventions, etc. I'm not talking about comparing one database to another (as covered by this question ). I want to be able to say "What in this database ... | [
"sql",
"sql-server",
"validation",
"schema"
] | 4 | 1 | 4,835 | 2 | 0 | 2008-10-08T12:17:33.280000 | 2008-10-08T12:26:24.653000 |
182,440 | 182,515 | "TryParse / Parse like" pattern: what is the best way to implement it | This question is a follow-up from How to indicate that a method was unsuccessful. The xxx() Tryxxx() pattern is something that can be very useful in many libraries. I am wondering what is the best way to offer both implementations without duplicating my code. What is best: public int DoSomething(string a) { // might th... | Making TrySomething just catch and swallow the exception is a really bad idea. Half the point of the TryXXX pattern is to avoid the performance hit of exceptions. If you don't need much information in the exception, you could make the DoSomething method just call TrySomething and throw an exception if it fails. If you ... | "TryParse / Parse like" pattern: what is the best way to implement it This question is a follow-up from How to indicate that a method was unsuccessful. The xxx() Tryxxx() pattern is something that can be very useful in many libraries. I am wondering what is the best way to offer both implementations without duplicating... | TITLE:
"TryParse / Parse like" pattern: what is the best way to implement it
QUESTION:
This question is a follow-up from How to indicate that a method was unsuccessful. The xxx() Tryxxx() pattern is something that can be very useful in many libraries. I am wondering what is the best way to offer both implementations w... | [
"design-patterns",
"return-value",
"try-catch"
] | 13 | 17 | 5,417 | 4 | 0 | 2008-10-08T12:18:23.093000 | 2008-10-08T12:37:05.770000 |
182,446 | 182,457 | How can I upload more than one file from a single HTML form in IE? | Internet Explorer (from versions 4 to 7, at least) limits the number of files uploaded using a single 'input type="file"' form field to one. What is the best approach to take if I want to upload more than one file in a single HTTP POST request? | You have to include multiple input controls, one per file to be uploaded. If you don't know how many you want ahead of time, you can use jQuery (or plain javascript) to create them on-the-fly. | How can I upload more than one file from a single HTML form in IE? Internet Explorer (from versions 4 to 7, at least) limits the number of files uploaded using a single 'input type="file"' form field to one. What is the best approach to take if I want to upload more than one file in a single HTTP POST request? | TITLE:
How can I upload more than one file from a single HTML form in IE?
QUESTION:
Internet Explorer (from versions 4 to 7, at least) limits the number of files uploaded using a single 'input type="file"' form field to one. What is the best approach to take if I want to upload more than one file in a single HTTP POST... | [
"html",
"internet-explorer",
"http",
"post",
"file-upload"
] | 1 | 5 | 1,035 | 3 | 0 | 2008-10-08T12:19:51.233000 | 2008-10-08T12:21:43.477000 |
182,452 | 189,577 | How to create documented WSDL using XFire | I use XFire to create a webservice wrapper around my application. XFire provides the webservice interface and WSDL at runtime (or creates them at compile time, don't know exactly). Many of our customers don't know webservices very well and additionally they simply don't read any external documentation like Javadoc. I k... | XFire is slowly headed for /dev/null. Use CXF instead. In other words, XFire is being deprecated in favor of CXF - it's pretty much the same developers. Since you use the Java-first approach, I suggest you generate you WSDL once and for all with CXF's java2wsdl tool, then you put your documentation in that and tell CXF... | How to create documented WSDL using XFire I use XFire to create a webservice wrapper around my application. XFire provides the webservice interface and WSDL at runtime (or creates them at compile time, don't know exactly). Many of our customers don't know webservices very well and additionally they simply don't read an... | TITLE:
How to create documented WSDL using XFire
QUESTION:
I use XFire to create a webservice wrapper around my application. XFire provides the webservice interface and WSDL at runtime (or creates them at compile time, don't know exactly). Many of our customers don't know webservices very well and additionally they si... | [
"java",
"web-services",
"documentation",
"wsdl",
"xfire"
] | 1 | 2 | 3,629 | 3 | 0 | 2008-10-08T12:20:55.677000 | 2008-10-09T23:24:03.933000 |
182,455 | 182,466 | ColdFusion and trailing comma | How do I remove a trailing comma from a string in ColdFusion? | To remove a trailing comma (if it exists): REReplace(list, ",$", "") To strip one or more trailing commas: REReplace(list, ",+$", "") | ColdFusion and trailing comma How do I remove a trailing comma from a string in ColdFusion? | TITLE:
ColdFusion and trailing comma
QUESTION:
How do I remove a trailing comma from a string in ColdFusion?
ANSWER:
To remove a trailing comma (if it exists): REReplace(list, ",$", "") To strip one or more trailing commas: REReplace(list, ",+$", "") | [
"coldfusion"
] | 12 | 25 | 11,918 | 6 | 0 | 2008-10-08T12:21:25.363000 | 2008-10-08T12:24:07.997000 |
182,475 | 182,822 | How to avoid rounding problems when comparing currency values in Delphi? | AFAIK, Currency type in Delphi Win32 depends on the processor floating point precision. Because of this I'm having rounding problems when comparing two Currency values, returning different results depending on the machine. For now I'm using the SameValue function passing a Epsilon parameter = 0.009, because I only need... | The Currency type in Delphi is a 64-bit integer scaled by 1/10,000; in other words, its smallest increment is equivalent to 0.0001. It is not susceptible to precision issues in the same way that floating point code is. However, if you are multiplying your Currency numbers by floating-point types, or dividing your Curre... | How to avoid rounding problems when comparing currency values in Delphi? AFAIK, Currency type in Delphi Win32 depends on the processor floating point precision. Because of this I'm having rounding problems when comparing two Currency values, returning different results depending on the machine. For now I'm using the Sa... | TITLE:
How to avoid rounding problems when comparing currency values in Delphi?
QUESTION:
AFAIK, Currency type in Delphi Win32 depends on the processor floating point precision. Because of this I'm having rounding problems when comparing two Currency values, returning different results depending on the machine. For no... | [
"delphi",
"winapi",
"floating-point",
"currency"
] | 4 | 15 | 8,489 | 6 | 0 | 2008-10-08T12:26:17.773000 | 2008-10-08T13:43:44.637000 |
182,492 | 182,508 | How do I configure the TortoiseSVN 'Global ignore pattern' properly? | I would like TortoiseSVN (1.5.3) to ignore certain folders, their contents and certain other files wherever they might appear in my directory hierarchy but I cannot get the global ignore string right. Whatever I do, it either adds to much or ignores too much What is the correct 'Global ignore pattern' to ignore.... Fol... | Currently I have the following in my Global Ignore Pattern: bin obj CVS.cvsignore *.user *.suo Debug Release *.pdb test.* Thumbs.db Works really well to ignore several hidden or temp files/folders.... So for your specific requirements: Folders: bin obj release compile Files: *.bak *.user *.suo I would use: bin obj rele... | How do I configure the TortoiseSVN 'Global ignore pattern' properly? I would like TortoiseSVN (1.5.3) to ignore certain folders, their contents and certain other files wherever they might appear in my directory hierarchy but I cannot get the global ignore string right. Whatever I do, it either adds to much or ignores t... | TITLE:
How do I configure the TortoiseSVN 'Global ignore pattern' properly?
QUESTION:
I would like TortoiseSVN (1.5.3) to ignore certain folders, their contents and certain other files wherever they might appear in my directory hierarchy but I cannot get the global ignore string right. Whatever I do, it either adds to... | [
"svn",
"tortoisesvn",
"svnignore"
] | 46 | 51 | 49,183 | 5 | 0 | 2008-10-08T12:30:17.687000 | 2008-10-08T12:34:48.787000 |
182,497 | 182,539 | What is the best starting point on the Entity Framework from MS? | Please give me the direction of the best guidance on the Entity Framework. | There is a list of some tutorials available in this question. This is a useful Entity Framework forum. For me, the most useful reference for learning about the Entity Framework when I started using it was Daniel Simmons' FAQ. Check it out! | What is the best starting point on the Entity Framework from MS? Please give me the direction of the best guidance on the Entity Framework. | TITLE:
What is the best starting point on the Entity Framework from MS?
QUESTION:
Please give me the direction of the best guidance on the Entity Framework.
ANSWER:
There is a list of some tutorials available in this question. This is a useful Entity Framework forum. For me, the most useful reference for learning abo... | [
"c#",
".net",
"entity-framework"
] | 0 | 2 | 631 | 2 | 0 | 2008-10-08T12:31:37.123000 | 2008-10-08T12:45:35.487000 |
182,519 | 182,601 | Regexp: Substituting a version number in an XML file | Ok I give up, I've been trying to write a regexp in ant to replace the version number from something that I have in a properties file. I have the following:..... many plugins later.... What I want to achieve is substitute the version number of the feature tag only, without changing the version of the xml or the version... | Assuming you're using the replaceregexp task: I'm also assuming there's only the one element. | Regexp: Substituting a version number in an XML file Ok I give up, I've been trying to write a regexp in ant to replace the version number from something that I have in a properties file. I have the following:..... many plugins later.... What I want to achieve is substitute the version number of the feature tag only, w... | TITLE:
Regexp: Substituting a version number in an XML file
QUESTION:
Ok I give up, I've been trying to write a regexp in ant to replace the version number from something that I have in a properties file. I have the following:..... many plugins later.... What I want to achieve is substitute the version number of the f... | [
"java",
"regex",
"ant"
] | 1 | 2 | 1,348 | 7 | 0 | 2008-10-08T12:39:11.990000 | 2008-10-08T13:00:30.933000 |
182,528 | 183,327 | Is this how you would structure your CSS stylesheet? | Leaving aside the question of whether you should serve single or multiple stylesheets, assuming you're sending just one, what do you think of this as a basic structure? /* Structure */ Any template layout stuff should be put into here, so header, footer, body etc. /* Structure End */ /* Common Components*/ Repeated ele... | That's similar to how I structure mine, however, I find that using sub-headings is the best way to do it, so I use this structure: /************************* * GLOBAL * *************************/ /* All of the common stuff goes here under the appropriate sub headings */ /* Heading formatting */ /* Text formatting */ /*... | Is this how you would structure your CSS stylesheet? Leaving aside the question of whether you should serve single or multiple stylesheets, assuming you're sending just one, what do you think of this as a basic structure? /* Structure */ Any template layout stuff should be put into here, so header, footer, body etc. /*... | TITLE:
Is this how you would structure your CSS stylesheet?
QUESTION:
Leaving aside the question of whether you should serve single or multiple stylesheets, assuming you're sending just one, what do you think of this as a basic structure? /* Structure */ Any template layout stuff should be put into here, so header, fo... | [
"css",
"stylesheet",
"markup"
] | 2 | 9 | 1,446 | 5 | 0 | 2008-10-08T12:42:31.280000 | 2008-10-08T15:15:39.507000 |
182,529 | 182,557 | Creating controls within a Loop | I have have some code which adds new cells to a table and fills them with text boxes. The way I've coded it so far works fine: TableCell tCell1 = new TableCell(); TableCell tCell2 = new TableCell(); TableCell tCell3 = new TableCell(); TableCell tCell4 = new TableCell(); TableCell tCell5 = new TableCell(); TableCell tCe... | I think this should do it: for (int i = 0; i < 7; i++) {
TableCell tCell = new TableCell(); TextBox txt = new TextBox(); tCell.Controls.Add(txt); tRow.Cells.Add(tCell);
} Make sure that 6 is changed to a 7. | Creating controls within a Loop I have have some code which adds new cells to a table and fills them with text boxes. The way I've coded it so far works fine: TableCell tCell1 = new TableCell(); TableCell tCell2 = new TableCell(); TableCell tCell3 = new TableCell(); TableCell tCell4 = new TableCell(); TableCell tCell5 ... | TITLE:
Creating controls within a Loop
QUESTION:
I have have some code which adds new cells to a table and fills them with text boxes. The way I've coded it so far works fine: TableCell tCell1 = new TableCell(); TableCell tCell2 = new TableCell(); TableCell tCell3 = new TableCell(); TableCell tCell4 = new TableCell();... | [
"c#",
"asp.net",
".net-2.0"
] | 1 | 2 | 1,606 | 4 | 0 | 2008-10-08T12:43:18.613000 | 2008-10-08T12:48:50.567000 |
182,541 | 182,701 | Converting XML Datetime to SQL Datetime | I have an XML datatype and want to convert an element into a sql DateTime variable. How? e.g. Declare @Xml Xml Set @Xml = ' 2008-10-31T00:00:00 '
Declare @DateFrom DateTime Set @DateFrom =????? How can I set @DateFrom with the date from the xml above? | Declare @Xml Xml Set @Xml = ' 8/10/2008 '
Declare @DateFrom DateTime Select @DateFrom= t.b.value('DateFrom[1]', 'datetime') from @xml.nodes('//Root') t(b) I highly recommend you look at the.nodes functionality of the XML data type. The above code pulls out the value of the DateFrom element and converts it to Date Time... | Converting XML Datetime to SQL Datetime I have an XML datatype and want to convert an element into a sql DateTime variable. How? e.g. Declare @Xml Xml Set @Xml = ' 2008-10-31T00:00:00 '
Declare @DateFrom DateTime Set @DateFrom =????? How can I set @DateFrom with the date from the xml above? | TITLE:
Converting XML Datetime to SQL Datetime
QUESTION:
I have an XML datatype and want to convert an element into a sql DateTime variable. How? e.g. Declare @Xml Xml Set @Xml = ' 2008-10-31T00:00:00 '
Declare @DateFrom DateTime Set @DateFrom =????? How can I set @DateFrom with the date from the xml above?
ANSWER:
... | [
"sql",
"sql-server-2005"
] | 1 | 1 | 3,065 | 1 | 0 | 2008-10-08T12:46:10.493000 | 2008-10-08T13:17:12.117000 |
182,542 | 182,582 | Email Address Validation for ASP.NET | What do you use to validate an email address on a ASP.NET form. I want to make sure that it contains no XSS exploits. This is ASP.NET 1.1 | Any script tags posted on an ASP.NET web form will cause your site to throw and unhandled exception. You can use a asp regex validator to confirm input, just ensure you wrap your code behind method with a if(IsValid) clause in case your javascript is bypassed. If your client javascript is bypassed and script tags are p... | Email Address Validation for ASP.NET What do you use to validate an email address on a ASP.NET form. I want to make sure that it contains no XSS exploits. This is ASP.NET 1.1 | TITLE:
Email Address Validation for ASP.NET
QUESTION:
What do you use to validate an email address on a ASP.NET form. I want to make sure that it contains no XSS exploits. This is ASP.NET 1.1
ANSWER:
Any script tags posted on an ASP.NET web form will cause your site to throw and unhandled exception. You can use a asp... | [
"asp.net",
"validation",
"email"
] | 73 | 128 | 264,763 | 9 | 0 | 2008-10-08T12:46:21.070000 | 2008-10-08T12:55:47.713000 |
182,544 | 182,694 | SQL to find duplicate entries (within a group) | SQL to find duplicate entries (within a group) I have a small problem and I'm not sure what would be the best way to fix it, as I only have limited access to the database (Oracle) itself. In our Table "EVENT" we have about 160k entries, each EVENT has a GROUPID and a normal entry has exactly 5 rows with the same GROUPI... | You can get the answer with a join instead of a subquery select a.* from event as a inner join (select groupid from event group by groupid having count(*) <> 5) as b on a.groupid = b.groupid This is a fairly common way of obtaining the all the information out of the rows in a group. Like your suggested answer and the o... | SQL to find duplicate entries (within a group) SQL to find duplicate entries (within a group) I have a small problem and I'm not sure what would be the best way to fix it, as I only have limited access to the database (Oracle) itself. In our Table "EVENT" we have about 160k entries, each EVENT has a GROUPID and a norma... | TITLE:
SQL to find duplicate entries (within a group)
QUESTION:
SQL to find duplicate entries (within a group) I have a small problem and I'm not sure what would be the best way to fix it, as I only have limited access to the database (Oracle) itself. In our Table "EVENT" we have about 160k entries, each EVENT has a G... | [
"sql",
"oracle",
"join"
] | 4 | 5 | 18,241 | 7 | 0 | 2008-10-08T12:46:46.920000 | 2008-10-08T13:15:59.060000 |
182,554 | 401,003 | Microsecond accurate (or better) process timing in Linux | I need a very accurate way to time parts of my program. I could use the regular high-resolution clock for this, but that will return wallclock time, which is not what I need: I needthe time spent running only my process. I distinctly remember seeing a Linux kernel patch that would allow me to time my processes to nanos... | If you are looking for this level of timing resolution, you are probably trying to do some micro-optimization. If that's the case, you should look at PAPI. Not only does it provide both wall-clock and virtual (process only) timing information, it also provides access to CPU event counters, which can be indispensable wh... | Microsecond accurate (or better) process timing in Linux I need a very accurate way to time parts of my program. I could use the regular high-resolution clock for this, but that will return wallclock time, which is not what I need: I needthe time spent running only my process. I distinctly remember seeing a Linux kerne... | TITLE:
Microsecond accurate (or better) process timing in Linux
QUESTION:
I need a very accurate way to time parts of my program. I could use the regular high-resolution clock for this, but that will return wallclock time, which is not what I need: I needthe time spent running only my process. I distinctly remember se... | [
"linux",
"process",
"real-time",
"timing",
"high-resolution-clock"
] | 14 | 5 | 19,545 | 8 | 0 | 2008-10-08T12:48:42.423000 | 2008-12-30T18:09:47.900000 |
182,558 | 182,699 | Can I upgrade an ASP.NET web service to WCF and still call it from ASP.NET 1.1? | I need to make a change to an ASP.NET web service written a couple years ago on 2.0. I call this web service from an old 1.1 web site. I need to make some changes to the web service, so am thinking, should I rewrite this into a WCF service and if so, will I still be able to use it from my 1.1 web site? | Yes this will work. Your service will need to be at least.net 3.0, but as long as you use a basicHttpBinding or wsHttpBinding, you can consume it like any other webservice. | Can I upgrade an ASP.NET web service to WCF and still call it from ASP.NET 1.1? I need to make a change to an ASP.NET web service written a couple years ago on 2.0. I call this web service from an old 1.1 web site. I need to make some changes to the web service, so am thinking, should I rewrite this into a WCF service ... | TITLE:
Can I upgrade an ASP.NET web service to WCF and still call it from ASP.NET 1.1?
QUESTION:
I need to make a change to an ASP.NET web service written a couple years ago on 2.0. I call this web service from an old 1.1 web site. I need to make some changes to the web service, so am thinking, should I rewrite this i... | [
"asp.net",
"wcf",
"web-services"
] | 2 | 3 | 1,364 | 3 | 0 | 2008-10-08T12:48:57.197000 | 2008-10-08T13:16:48.217000 |
182,569 | 187,083 | Row number in Sybase tables | Sybase db tables do not have a concept of self updating row numbers. However, for one of the modules, I require the presence of rownumber corresponding to each row in the database such that max(Column) would always tell me the number of rows in the table. I thought I'll introduce an int column and keep updating this co... | Delete trigger CREATE TRIGGER tigger ON myTable FOR DELETE AS update myTable set id = id - (select count(*) from deleted d where d.id < t.id) from myTable t To avoid locking problems You could add an extra table (which joins to your primary table) like this: CREATE TABLE rowCounter (id int, -- foreign key to main table... | Row number in Sybase tables Sybase db tables do not have a concept of self updating row numbers. However, for one of the modules, I require the presence of rownumber corresponding to each row in the database such that max(Column) would always tell me the number of rows in the table. I thought I'll introduce an int colu... | TITLE:
Row number in Sybase tables
QUESTION:
Sybase db tables do not have a concept of self updating row numbers. However, for one of the modules, I require the presence of rownumber corresponding to each row in the database such that max(Column) would always tell me the number of rows in the table. I thought I'll int... | [
"sql",
"sybase"
] | 1 | 0 | 18,503 | 3 | 0 | 2008-10-08T12:51:23.057000 | 2008-10-09T12:44:17.407000 |
182,571 | 274,964 | The dangers of using ExtJS on a big project with RoR? | We are developing a considerably big application using Ruby on Rails framework (CRM system) and are considering to rewrite it to use ExtJS so that Rails would just do the data handling, while ExtJS would do all the browser heavylifting in a desktop-like manner. Anyone has some experience and hints about what would be t... | I currently have an extremely large, desktop style app written in ExtJS. It used to run on top of Perl's Catalyst MVC framework, but once the entire View layer was converted to an ExtJS based desktop I started migrating to Ruby on Rails models and controllers. It is equally as fast, if not faster, and easier to maintai... | The dangers of using ExtJS on a big project with RoR? We are developing a considerably big application using Ruby on Rails framework (CRM system) and are considering to rewrite it to use ExtJS so that Rails would just do the data handling, while ExtJS would do all the browser heavylifting in a desktop-like manner. Anyo... | TITLE:
The dangers of using ExtJS on a big project with RoR?
QUESTION:
We are developing a considerably big application using Ruby on Rails framework (CRM system) and are considering to rewrite it to use ExtJS so that Rails would just do the data handling, while ExtJS would do all the browser heavylifting in a desktop... | [
"ruby-on-rails",
"ruby",
"extjs",
"ria",
"rich-internet-application"
] | 22 | 29 | 17,027 | 10 | 0 | 2008-10-08T12:51:34.913000 | 2008-11-08T17:28:12.243000 |
182,587 | 182,649 | Using Javascript With ASP.Net controls | Is there a best practice when it comes to setting client side "onclick" events when using ASP.Net controls? Simply adding the onclick attribute results in a Visual Studio warning that onclick is not a valid attribute of that control. Adding it during the Page_Load event through codebehind works, but is less clear than ... | ** just a pre-note on the answer: HTML validation in VS is often BS. It complains about stuff that works IRL, even if that stuff is bad practice. But sometimes you gotta bend the rules to get stuff done. Every ASP.NET page (2.0 and greater) comes with a ClientScriptManager. You use this to register javascript from serv... | Using Javascript With ASP.Net controls Is there a best practice when it comes to setting client side "onclick" events when using ASP.Net controls? Simply adding the onclick attribute results in a Visual Studio warning that onclick is not a valid attribute of that control. Adding it during the Page_Load event through co... | TITLE:
Using Javascript With ASP.Net controls
QUESTION:
Is there a best practice when it comes to setting client side "onclick" events when using ASP.Net controls? Simply adding the onclick attribute results in a Visual Studio warning that onclick is not a valid attribute of that control. Adding it during the Page_Loa... | [
"asp.net",
"javascript",
"events"
] | 2 | 2 | 1,844 | 4 | 0 | 2008-10-08T12:56:40.067000 | 2008-10-08T13:09:32.193000 |
182,592 | 3,489,623 | MySQL driver segfaulting under mod_perl - where to look for issue | I have a webapp that segfaults when the database in restarted and it tries to use the old connections. Running it under gdb --args apache -X leads to the following output: Program received signal SIGSEGV, Segmentation fault. [Switching to Thread -1212868928 (LWP 16098)] 0xb7471c20 in mysql_send_query () from /usr/lib/l... | This is a known problem in old DBD::mysql. Upgrade it (4.008 is not up to date). There's a simple test script attached to https://rt.cpan.org/Public/Bug/Display.html?id=37027 that will trigger this bug. | MySQL driver segfaulting under mod_perl - where to look for issue I have a webapp that segfaults when the database in restarted and it tries to use the old connections. Running it under gdb --args apache -X leads to the following output: Program received signal SIGSEGV, Segmentation fault. [Switching to Thread -1212868... | TITLE:
MySQL driver segfaulting under mod_perl - where to look for issue
QUESTION:
I have a webapp that segfaults when the database in restarted and it tries to use the old connections. Running it under gdb --args apache -X leads to the following output: Program received signal SIGSEGV, Segmentation fault. [Switching ... | [
"mysql",
"perl",
"mod-perl"
] | 5 | 1 | 612 | 4 | 0 | 2008-10-08T12:58:10.970000 | 2010-08-15T22:56:28.493000 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.