PostId
int64
4
11.8M
PostCreationDate
stringlengths
19
19
OwnerUserId
int64
1
1.57M
OwnerCreationDate
stringlengths
10
19
ReputationAtPostCreation
int64
-55
461k
OwnerUndeletedAnswerCountAtPostTime
int64
0
21.5k
Title
stringlengths
3
250
BodyMarkdown
stringlengths
5
30k
Tag1
stringlengths
1
25
Tag2
stringlengths
1
25
Tag3
stringlengths
1
25
Tag4
stringlengths
1
25
Tag5
stringlengths
1
25
PostClosedDate
stringlengths
19
19
OpenStatus
stringclasses
5 values
unified_texts
stringlengths
32
30.1k
OpenStatus_id
int64
0
4
37,845
09/01/2008 12:16:54
277
08/04/2008 10:55:22
356
11
VMWare Video Tutorials?
Are there any good sites or URLs with video tutorials for using the various VMWare products (mainly Player and Server, but the other products would be interesting to see to)? I have found some paper documentation, but I think it would be interesting if there were some multimedia based videos to get myself oriented first.
vmware
tutorial
multimedia
null
null
null
open
VMWare Video Tutorials? === Are there any good sites or URLs with video tutorials for using the various VMWare products (mainly Player and Server, but the other products would be interesting to see to)? I have found some paper documentation, but I think it would be interesting if there were some multimedia based videos to get myself oriented first.
0
37,851
09/01/2008 12:19:13
2,998
08/26/2008 11:02:36
121
5
Application Control Scripts on Unix
I'm looking for some software that allows me to control a server based application, that is, there are bunch of interdependent processes that I'd like to be able to start up, shut down and monitor in a controller manner. I've come across programs like Autosys, but that's expensive and very much over the top for what I want. I've also seen [AppCtl][1], but that seems not to handle dependencies. Maybe it would be possible to repurpose the init scripts? Oh, and as an added complication it should be able to run on a Solaris 10 or Linux box without installing any new binaries. On the boxes I've seen recently, that means shell scripts and Perl but not Python. Do any such programs exist or do I need to dust off my copy of Programming Perl? [1]: http://appctl.sourceforge.net/
linux
unix
script
solaris
null
null
open
Application Control Scripts on Unix === I'm looking for some software that allows me to control a server based application, that is, there are bunch of interdependent processes that I'd like to be able to start up, shut down and monitor in a controller manner. I've come across programs like Autosys, but that's expensive and very much over the top for what I want. I've also seen [AppCtl][1], but that seems not to handle dependencies. Maybe it would be possible to repurpose the init scripts? Oh, and as an added complication it should be able to run on a Solaris 10 or Linux box without installing any new binaries. On the boxes I've seen recently, that means shell scripts and Perl but not Python. Do any such programs exist or do I need to dust off my copy of Programming Perl? [1]: http://appctl.sourceforge.net/
0
37,871
09/01/2008 12:32:20
3,709
08/30/2008 08:02:55
26
4
Roaming settings with LocalFileSettingsProvider
On my way through whipping up a Windows Forms application I thought it might have been a good idea to use the settings file to store miscellaneous application options (instead of the registry) and user parameters (window positions, column orderings, etc.). Out of the box, quick and simple, or so I thought. All works as per MSDN using the default SettingsProvider (LocalFileSettingsProvider), but I do have concerns about where it gets stored and hopefully somebody can provide a solution. Essentially the file ends up in the local application data and in an unsavoury sub-directory structure. (AppData / Local / *company* / *namespace_StrongName_gibberish* / *version* ). Is there a way to tell the LocalFileSettingsProvider to store the configuration file so the data will roam and perhaps in a less crazy folder structure? (or maybe an implementation of SettingsProvider that already does this?)
.net
winforms
null
null
null
null
open
Roaming settings with LocalFileSettingsProvider === On my way through whipping up a Windows Forms application I thought it might have been a good idea to use the settings file to store miscellaneous application options (instead of the registry) and user parameters (window positions, column orderings, etc.). Out of the box, quick and simple, or so I thought. All works as per MSDN using the default SettingsProvider (LocalFileSettingsProvider), but I do have concerns about where it gets stored and hopefully somebody can provide a solution. Essentially the file ends up in the local application data and in an unsavoury sub-directory structure. (AppData / Local / *company* / *namespace_StrongName_gibberish* / *version* ). Is there a way to tell the LocalFileSettingsProvider to store the configuration file so the data will roam and perhaps in a less crazy folder structure? (or maybe an implementation of SettingsProvider that already does this?)
0
37,882
09/01/2008 12:37:30
3,394
08/28/2008 12:35:39
893
49
How can you easily reorder columns in LINQ to SQL designer?
When designing LINQ classes using the LINQ to SQL designer I've sometimes needed to reorder the classes for the purposes of having the resultant columns in a DataGridView appear in a different order. Unfortunately this seems to be exceedingly difficult; you need to cut and paste properties about, or delete them and re-insert them manually. I *know* you can reorder columns fairly easily in a DataGridView, however that would result in a lot of hardcoding and I want the designer to match up to the grid. Does anyone know of any easier way of achieving this or is cutting/pasting the only available method? I tried manually editing the .designer.cs file, but reordering properties there doesn't appear to do anything!
c#
linq-to-sql
linq
null
null
null
open
How can you easily reorder columns in LINQ to SQL designer? === When designing LINQ classes using the LINQ to SQL designer I've sometimes needed to reorder the classes for the purposes of having the resultant columns in a DataGridView appear in a different order. Unfortunately this seems to be exceedingly difficult; you need to cut and paste properties about, or delete them and re-insert them manually. I *know* you can reorder columns fairly easily in a DataGridView, however that would result in a lot of hardcoding and I want the designer to match up to the grid. Does anyone know of any easier way of achieving this or is cutting/pasting the only available method? I tried manually editing the .designer.cs file, but reordering properties there doesn't appear to do anything!
0
37,887
09/01/2008 12:56:40
4,018
09/01/2008 11:24:40
23
0
How do you update your web application on the server?
I am aware of [Capistrano](http://www.capify.org/) but it is a bit too heavyweight for me. Personally I set up two [Mercurial](http://www.selenic.com/mercurial/wiki/) repositories, one on the production server and another on my local dev machine. Regularly, when a new feature is ready, I push changes from repository on my local machine to repository on the server, then update on the server. This is pretty simple and quick way to keep files in sync on several computers, but does not help to update database. What is your solution to the problem?
deployment
web-application
administration
maintenance
null
null
open
How do you update your web application on the server? === I am aware of [Capistrano](http://www.capify.org/) but it is a bit too heavyweight for me. Personally I set up two [Mercurial](http://www.selenic.com/mercurial/wiki/) repositories, one on the production server and another on my local dev machine. Regularly, when a new feature is ready, I push changes from repository on my local machine to repository on the server, then update on the server. This is pretty simple and quick way to keep files in sync on several computers, but does not help to update database. What is your solution to the problem?
0
37,920
09/01/2008 13:15:33
3,229
08/27/2008 13:47:19
8
0
How do you display a dialog from a hidden window application?
Apologies in advance if I use duff terminology in this question, I'm working at the edge of my understanding of Win32. I have developed a COM component (dll) that implements an Edit() method displaying a WTL modal dialog. The complete interface to this COM component corresponds to a software standard used in the chemical process industry (CAPE-OPEN) and as a result this COM component is supposed to be usable by a range of 3rd party executables that are out of my control. My component works as expected in many of these EXEs, but for one in particular the Edit() method just hangs without the dialog appearing. I have a suspicion that the problem may be something to do with this particular EXE running as a 'hidden window application'. Can anyone suggest how I might get it to display the dialog? I know it is possible because I've seen this EXE display the dialogs from other COM components corresponding to the same interface.
winapi
com
null
null
null
null
open
How do you display a dialog from a hidden window application? === Apologies in advance if I use duff terminology in this question, I'm working at the edge of my understanding of Win32. I have developed a COM component (dll) that implements an Edit() method displaying a WTL modal dialog. The complete interface to this COM component corresponds to a software standard used in the chemical process industry (CAPE-OPEN) and as a result this COM component is supposed to be usable by a range of 3rd party executables that are out of my control. My component works as expected in many of these EXEs, but for one in particular the Edit() method just hangs without the dialog appearing. I have a suspicion that the problem may be something to do with this particular EXE running as a 'hidden window application'. Can anyone suggest how I might get it to display the dialog? I know it is possible because I've seen this EXE display the dialogs from other COM components corresponding to the same interface.
0
37,921
09/01/2008 13:15:41
2,608
08/23/2008 14:39:53
115
7
What is the best winform UI component set?
I've been looking for a commercial winform UI component set for a while now. I've looked at most of the big players out there and I think I'm going to spend my cash on the Developer Express DXperience package. It's not cheap, but does a lot of great things like integrated printing adn reporting, a good spell checker implementation, etc. It's been quite a learing curve as it's feature rich, but they have a great support site and give good support. I'm wondering what other people use and if there are any "gotchas" with the Dev Express components.
winforms
null
null
null
null
null
open
What is the best winform UI component set? === I've been looking for a commercial winform UI component set for a while now. I've looked at most of the big players out there and I think I'm going to spend my cash on the Developer Express DXperience package. It's not cheap, but does a lot of great things like integrated printing adn reporting, a good spell checker implementation, etc. It's been quite a learing curve as it's feature rich, but they have a great support site and give good support. I'm wondering what other people use and if there are any "gotchas" with the Dev Express components.
0
37,929
09/01/2008 13:22:19
184
08/03/2008 05:34:19
1,620
23
How to test java application for performance bottlenecks?
I am reviewing a big java application to see if there are any performance bottlenecks. The real problem is that I cannot pinpoint the performance issues to any single module. The whole application is slow as such. Is there some tool/technique I can use to help me out in this?
java
performance
null
null
null
null
open
How to test java application for performance bottlenecks? === I am reviewing a big java application to see if there are any performance bottlenecks. The real problem is that I cannot pinpoint the performance issues to any single module. The whole application is slow as such. Is there some tool/technique I can use to help me out in this?
0
37,931
09/01/2008 13:22:50
3,974
09/01/2008 06:18:59
1
1
What's the use of value types in .Net?
The [official guidelines][1] suggest that there can be very few practical uses for these. Does anyone have examples of where they've put them to good use? [1]: http://msdn.microsoft.com/en-us/library/y23b5415.aspx
.net
null
null
null
null
null
open
What's the use of value types in .Net? === The [official guidelines][1] suggest that there can be very few practical uses for these. Does anyone have examples of where they've put them to good use? [1]: http://msdn.microsoft.com/en-us/library/y23b5415.aspx
0
37,932
09/01/2008 13:23:17
4,019
09/01/2008 11:56:49
1
0
XML in C# - Read from Resources, Manipulate and Display.
I'd like to do the following and can't find an elegant way: 1) Read an XML template into a System.Xml.XmlDocument 2) Populate it with data from my UI 3) Transform it with an XSLT I've written 4) Apply a CSS Stylesheet 5) Render it to a WebBrowser control I'm currently reading it from a file on disk, populating it, then saving it back out to disk after populating it. I reference the XSLT in the template, and the CSS in the XSLT and then use the WebBrowser.Navigate([filename]) method to display the XML file. Obviously, when I come to deploy this app, it'll break horribly as the file won't exist on disk, and I won't be able to reference the XSLT and CSS files as they'll be resouces. I'm planning to include the template as a resource, but can't find a neat way to proceed from there. Any help much appreciated, Jon
c#
xml
null
null
null
null
open
XML in C# - Read from Resources, Manipulate and Display. === I'd like to do the following and can't find an elegant way: 1) Read an XML template into a System.Xml.XmlDocument 2) Populate it with data from my UI 3) Transform it with an XSLT I've written 4) Apply a CSS Stylesheet 5) Render it to a WebBrowser control I'm currently reading it from a file on disk, populating it, then saving it back out to disk after populating it. I reference the XSLT in the template, and the CSS in the XSLT and then use the WebBrowser.Navigate([filename]) method to display the XML file. Obviously, when I come to deploy this app, it'll break horribly as the file won't exist on disk, and I won't be able to reference the XSLT and CSS files as they'll be resouces. I'm planning to include the template as a resource, but can't find a neat way to proceed from there. Any help much appreciated, Jon
0
37,936
09/01/2008 13:27:08
1,518
08/16/2008 09:05:30
21
2
Handling XSD Dataset ConstraintExceptions
Does anyone have any tips for dealing with ConstraintExceptions thrown by XSD datasets? This is the exception with the cryptic message: System.Data.ConstraintException : Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints.
xsd
dataset
constraintexception
null
null
null
open
Handling XSD Dataset ConstraintExceptions === Does anyone have any tips for dealing with ConstraintExceptions thrown by XSD datasets? This is the exception with the cryptic message: System.Data.ConstraintException : Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints.
0
37,944
09/01/2008 13:32:22
380
08/05/2008 10:39:18
1,826
166
How popular is WPF as a technology?
I had a discussion with some colleagues mentioning that there are not too many projects that we do which make use of WPF for creating UI for a windows application (we almost always use Windows Forms instead). * Are your experiences the same - i.e. there is not too much adoption of this technology? * Why do you think that is? And will we have a time when we see much more of WPF?
wpf
null
null
null
null
null
open
How popular is WPF as a technology? === I had a discussion with some colleagues mentioning that there are not too many projects that we do which make use of WPF for creating UI for a windows application (we almost always use Windows Forms instead). * Are your experiences the same - i.e. there is not too much adoption of this technology? * Why do you think that is? And will we have a time when we see much more of WPF?
0
37,956
09/01/2008 13:35:41
1,578
08/16/2008 20:25:25
167
9
C++ : What's the easiest library to open video file
I would like to open a small video file and map every frames in memory (to apply some custom filter). I don't want to handle the video codec, I would rather let the library handle that for me. I've tried to use Direct Show with the SampleGrabber filter ([using this sample][1]), but I only managed to grab some frames (not every frames!). I'm quite new in video software programming, maybe I'm not using the best library, or I'm doing it wrong. I've pasted a part of my code (mainly a modified copy/paste from [the msdn example][1]), unfortunately it doesn't grabb the 25 first frames as expected... [...] hr = pGrabber->SetOneShot(TRUE); hr = pGrabber->SetBufferSamples(TRUE); pControl->Run(); // Run the graph. pEvent->WaitForCompletion(INFINITE, &evCode); // Wait till it's done. // Find the required buffer size. long cbBuffer = 0; hr = pGrabber->GetCurrentBuffer(&cbBuffer, NULL); for( int i = 0 ; i < 25 ; ++i ) { pControl->Run(); // Run the graph. pEvent->WaitForCompletion(INFINITE, &evCode); // Wait till it's done. char *pBuffer = new char[cbBuffer]; hr = pGrabber->GetCurrentBuffer(&cbBuffer, (long*)pBuffer); AM_MEDIA_TYPE mt; hr = pGrabber->GetConnectedMediaType(&mt); VIDEOINFOHEADER *pVih; pVih = (VIDEOINFOHEADER*)mt.pbFormat; [...] } [...] Is there somebody, with video software experience, who can advise me about code or other simpler library? Thanks [1]: http://msdn.microsoft.com/en-us/library/ms787867(VS.85).aspx
c++
video
windows
null
null
null
open
C++ : What's the easiest library to open video file === I would like to open a small video file and map every frames in memory (to apply some custom filter). I don't want to handle the video codec, I would rather let the library handle that for me. I've tried to use Direct Show with the SampleGrabber filter ([using this sample][1]), but I only managed to grab some frames (not every frames!). I'm quite new in video software programming, maybe I'm not using the best library, or I'm doing it wrong. I've pasted a part of my code (mainly a modified copy/paste from [the msdn example][1]), unfortunately it doesn't grabb the 25 first frames as expected... [...] hr = pGrabber->SetOneShot(TRUE); hr = pGrabber->SetBufferSamples(TRUE); pControl->Run(); // Run the graph. pEvent->WaitForCompletion(INFINITE, &evCode); // Wait till it's done. // Find the required buffer size. long cbBuffer = 0; hr = pGrabber->GetCurrentBuffer(&cbBuffer, NULL); for( int i = 0 ; i < 25 ; ++i ) { pControl->Run(); // Run the graph. pEvent->WaitForCompletion(INFINITE, &evCode); // Wait till it's done. char *pBuffer = new char[cbBuffer]; hr = pGrabber->GetCurrentBuffer(&cbBuffer, (long*)pBuffer); AM_MEDIA_TYPE mt; hr = pGrabber->GetConnectedMediaType(&mt); VIDEOINFOHEADER *pVih; pVih = (VIDEOINFOHEADER*)mt.pbFormat; [...] } [...] Is there somebody, with video software experience, who can advise me about code or other simpler library? Thanks [1]: http://msdn.microsoft.com/en-us/library/ms787867(VS.85).aspx
0
37,969
09/01/2008 13:46:41
2,454
08/22/2008 11:22:25
127
3
Tool for posting test messages onto a JMS queue?
Can anyone recommend a tool for quickly posting test messages onto a JMS queue? The tool should allow the user to enter some data, perhaps an XML payload, and then submit it to a queue? I know I could probably knock something up reasonably quickly to do this but I thought I'd ask first before reinventing the wheel. Cheers.
messaging
null
null
null
null
null
open
Tool for posting test messages onto a JMS queue? === Can anyone recommend a tool for quickly posting test messages onto a JMS queue? The tool should allow the user to enter some data, perhaps an XML payload, and then submit it to a queue? I know I could probably knock something up reasonably quickly to do this but I thought I'd ask first before reinventing the wheel. Cheers.
0
37,976
09/01/2008 13:52:35
1,113
08/12/2008 12:53:12
31
1
How do I change XML indentation in IntelliJ IDEA?
By default IntelliJ IDEA 7.0.4 seems to use 4 spaces for indentation in XML files. The project I'm working on uses 2 spaces as indentation in all it's XML. Is there a way to configure the indentation in IntelliJ's editor?
java
xml
ide
intellij
null
null
open
How do I change XML indentation in IntelliJ IDEA? === By default IntelliJ IDEA 7.0.4 seems to use 4 spaces for indentation in XML files. The project I'm working on uses 2 spaces as indentation in all it's XML. Is there a way to configure the indentation in IntelliJ's editor?
0
37,979
09/01/2008 13:58:49
393,028
09/01/2008 13:58:49
1
0
ActiveRecord
Does anyone have any recommendations for implementations of ActiveRecord in PHP? I've been using [CBL ActiveRecord][1], but I was wondering if there were any viable alternatives. [1]: http://31tools.com/cbl_activerecord/
php
database
null
null
null
null
open
ActiveRecord === Does anyone have any recommendations for implementations of ActiveRecord in PHP? I've been using [CBL ActiveRecord][1], but I was wondering if there were any viable alternatives. [1]: http://31tools.com/cbl_activerecord/
0
37,991
09/01/2008 14:14:53
4,045
09/01/2008 14:14:53
1
0
Using MS Access & ODBC to connect to a remote PostgreSQL
I currently have an MS Access application that connects to a PostgreSQL database via ODBC. This successfully runs on a LAN with 20 users (each running their own version of Access). Now I am thinking through some disaster recovery scenarios, and it seems that a quick and easy method of protecting the data is to use [log shipping][1] to create a warm-standby. This lead me to think about putting this warm-standby at a remote location, but then I have the question: **Is Access connecting to a remote database via ODBC usable?** [1]: http://www.postgresql.org/docs/8.3/static/warm-standby.html
ms-access
postgresql
odbc
null
null
null
open
Using MS Access & ODBC to connect to a remote PostgreSQL === I currently have an MS Access application that connects to a PostgreSQL database via ODBC. This successfully runs on a LAN with 20 users (each running their own version of Access). Now I am thinking through some disaster recovery scenarios, and it seems that a quick and easy method of protecting the data is to use [log shipping][1] to create a warm-standby. This lead me to think about putting this warm-standby at a remote location, but then I have the question: **Is Access connecting to a remote database via ODBC usable?** [1]: http://www.postgresql.org/docs/8.3/static/warm-standby.html
0
37,996
09/01/2008 14:22:51
191
08/03/2008 09:55:26
16
0
How to Get attachments Associated with artifacts in SourceForge Enterprise Edition
We are using SourceForge Enterprise Edition 4.4 in one of our project. I am very new to it. My question is, in CollabNet SFEE (SourceForge Enterprise Edition 4.4), how will we get attachments associated with an Artifacts Using SFEE SOAP API? We have made our own .net 2.0 client. We are not using .net SDK provided by Collabnet.
sourceforge
null
null
null
null
null
open
How to Get attachments Associated with artifacts in SourceForge Enterprise Edition === We are using SourceForge Enterprise Edition 4.4 in one of our project. I am very new to it. My question is, in CollabNet SFEE (SourceForge Enterprise Edition 4.4), how will we get attachments associated with an Artifacts Using SFEE SOAP API? We have made our own .net 2.0 client. We are not using .net SDK provided by Collabnet.
0
37,997
09/01/2008 14:26:39
1,228,206
08/10/2008 07:14:25
20
2
Whats the best way to deliver TFS build status notifications to the team?
I like the status email sent by TFS's alerts mechanism when a build breaks. However I would like to send such an email to the entire team and not rely on the team to subscribe to the alert... Having a hard time producing a nice and detailed enough message by myself when overriding the "OnBuildBreak" and using the MSBuildCommunityTasks EMail task. Is there a way to force a TFS alert to be sent to a list of emails? Can you recommend of a way to send such status notifications?
tfs
msbuild
build-automation
continuous-integration
null
null
open
Whats the best way to deliver TFS build status notifications to the team? === I like the status email sent by TFS's alerts mechanism when a build breaks. However I would like to send such an email to the entire team and not rely on the team to subscribe to the alert... Having a hard time producing a nice and detailed enough message by myself when overriding the "OnBuildBreak" and using the MSBuildCommunityTasks EMail task. Is there a way to force a TFS alert to be sent to a list of emails? Can you recommend of a way to send such status notifications?
0
38,002
09/01/2008 14:33:43
2,701
08/24/2008 15:51:24
173
16
How to get your network support team behind click-once?
I'm trying to make the case for click-once and smart client development but my network support team wants to keep with web development for everything. What is the best way to convince them that click-once and smart client development have a place in the business?
smart-client
null
null
null
null
null
open
How to get your network support team behind click-once? === I'm trying to make the case for click-once and smart client development but my network support team wants to keep with web development for everything. What is the best way to convince them that click-once and smart client development have a place in the business?
0
38,005
09/01/2008 14:37:40
4,050
09/01/2008 14:24:01
1
0
How to use LINQ To SQL in an N-Tier Solution?
Now that LINQ to SQL is a *little* more mature, I'd like to know of any techniques people are using to create an n-tiered solution using the technology, because it does not seem that obvious to me.
linq-to-sql
n-tier
null
null
null
null
open
How to use LINQ To SQL in an N-Tier Solution? === Now that LINQ to SQL is a *little* more mature, I'd like to know of any techniques people are using to create an n-tiered solution using the technology, because it does not seem that obvious to me.
0
38,010
09/01/2008 14:41:59
2,993
08/26/2008 10:45:59
360
15
C# string concatenation and string interning
When performing string concatentation of an existing string in the intern pool, is a new string entered into the intern pool or is a reference returned to the existing string in the intern pool? According to this article, String.Concat and StringBuilder will insert new string instances into the intern pool? [http://community.bartdesmet.net/blogs/bart/archive/2006/09/27/4472.aspx][1] Can anyone explain how concatenation works with the intern pool? [1]: http://community.bartdesmet.net/blogs/bart/archive/2006/09/27/4472.aspx
c#
null
null
null
null
null
open
C# string concatenation and string interning === When performing string concatentation of an existing string in the intern pool, is a new string entered into the intern pool or is a reference returned to the existing string in the intern pool? According to this article, String.Concat and StringBuilder will insert new string instances into the intern pool? [http://community.bartdesmet.net/blogs/bart/archive/2006/09/27/4472.aspx][1] Can anyone explain how concatenation works with the intern pool? [1]: http://community.bartdesmet.net/blogs/bart/archive/2006/09/27/4472.aspx
0
38,014
09/01/2008 14:51:30
191
08/03/2008 09:55:26
16
1
Issue in Oracle Sql Query
I am facing problem with an Oracle Query in a .net 2.0 based windows application. I am using "*System.Data.OracleClient*" to connect to oracle database. Name of database is "*myDB*". Below the the connection string I am using: *Data Source=(DESCRIPTION =(ADDRESS_LIST =(ADDRESS = (PROTOCOL = TCP) (HOST = 172.16.0.24)(PORT = 1522)))(CONNECT_DATA =(SERVICE_NAME = ORCL))); User ID=myDB;Password=myDB;Unicode=True* If I run the below query then it will given me wrong result: *SELECT ID, NAME FROM MyTempTable WHERE ID IN (10780, 10760, 11890)* But if I append the database name along with it the it is giving correct result: *SELECT ID, NAME FROM "myDB".MyTempTable WHERE ID IN (10780, 10760, 11890)* My limitation is that I cannot append the database name as this is a generic application and can run with any database on run time. Please help.
oracle
sql
.net
null
null
null
open
Issue in Oracle Sql Query === I am facing problem with an Oracle Query in a .net 2.0 based windows application. I am using "*System.Data.OracleClient*" to connect to oracle database. Name of database is "*myDB*". Below the the connection string I am using: *Data Source=(DESCRIPTION =(ADDRESS_LIST =(ADDRESS = (PROTOCOL = TCP) (HOST = 172.16.0.24)(PORT = 1522)))(CONNECT_DATA =(SERVICE_NAME = ORCL))); User ID=myDB;Password=myDB;Unicode=True* If I run the below query then it will given me wrong result: *SELECT ID, NAME FROM MyTempTable WHERE ID IN (10780, 10760, 11890)* But if I append the database name along with it the it is giving correct result: *SELECT ID, NAME FROM "myDB".MyTempTable WHERE ID IN (10780, 10760, 11890)* My limitation is that I cannot append the database name as this is a generic application and can run with any database on run time. Please help.
0
38,019
09/01/2008 14:55:47
3,598
08/29/2008 09:16:05
1
1
What's the best approach to naming classes?
Coming up with good, precise names for classes is notoriously difficult. Done right, it makes code more self-documenting and provides a vocabulary for reasoning about code at a higher level of abstraction. Classes which implement a particular design pattern might be given a name based on the well known pattern name (e.g. FooFactory, FooFacade), and classes which directly model domain concepts can take their names from the problem domain, but what about other classes? Is there anything like a programmer's thesaurus that I can turn to when I'm lacking inspiration, and want to avoid using generic class names (like FooHandler, FooProcessor, FooUtils, and FooManager)?
naming
null
null
null
null
null
open
What's the best approach to naming classes? === Coming up with good, precise names for classes is notoriously difficult. Done right, it makes code more self-documenting and provides a vocabulary for reasoning about code at a higher level of abstraction. Classes which implement a particular design pattern might be given a name based on the well known pattern name (e.g. FooFactory, FooFacade), and classes which directly model domain concepts can take their names from the problem domain, but what about other classes? Is there anything like a programmer's thesaurus that I can turn to when I'm lacking inspiration, and want to avoid using generic class names (like FooHandler, FooProcessor, FooUtils, and FooManager)?
0
38,021
09/01/2008 14:57:16
319
08/04/2008 16:03:00
41
2
How do I find the definitive Name Server for a domain name?
And for extra credit. Is it possible to find the origins of conflicting DNS records?
dns
null
null
null
null
null
open
How do I find the definitive Name Server for a domain name? === And for extra credit. Is it possible to find the origins of conflicting DNS records?
0
38,026
09/01/2008 15:01:39
470
08/06/2008 02:58:55
204
20
How can I improve my support of Novell networks when I don't have a Novell network?
I work for a .NET/MSSQL shop that has trouble supporting customers running Novell, partially because we don't have Novell (or the money for it) and partially because we have no one with Novell experience. This question could easily be expanded to "How can we improve our support of technology X when we don't have technology X?" Obviously, I expect someone to say "it is easy to acquire the technology or someone with that kind of experience," but keep in mind I'm just a developer, not the development manager or someone with power over the purse strings. I looked for a Novell server virtual appliance (though I'm not sure "Novell server" is what I should be looking for) but didn't find much on VMware's website.
.net
mssql
vmware
support
novell
null
open
How can I improve my support of Novell networks when I don't have a Novell network? === I work for a .NET/MSSQL shop that has trouble supporting customers running Novell, partially because we don't have Novell (or the money for it) and partially because we have no one with Novell experience. This question could easily be expanded to "How can we improve our support of technology X when we don't have technology X?" Obviously, I expect someone to say "it is easy to acquire the technology or someone with that kind of experience," but keep in mind I'm just a developer, not the development manager or someone with power over the purse strings. I looked for a Novell server virtual appliance (though I'm not sure "Novell server" is what I should be looking for) but didn't find much on VMware's website.
0
38,027
09/01/2008 15:02:39
572
08/06/2008 20:56:54
2,323
192
Why does Splint (the C code checker) give an error when comparing a float to an int?
Both are mathematical values, however the float does have more precision. Is that the only reason for the error - the difference in precision? Or is there another potential (and more serious) problem?
c
lint
splint
null
null
null
open
Why does Splint (the C code checker) give an error when comparing a float to an int? === Both are mathematical values, however the float does have more precision. Is that the only reason for the error - the difference in precision? Or is there another potential (and more serious) problem?
0
38,035
09/01/2008 15:08:13
393,028
09/01/2008 13:58:49
1
2
Selecting X words from a text field in MySQL
I'm building a basic search functionality, using LIKE (I'd be using fulltext but can't at the moment) and I'm wondering if MySQL can, on searching for a keyword (e.g. WHERE field LIKE '%word%') return 20 words either side of the keyword, as well?
mysql
null
null
null
null
null
open
Selecting X words from a text field in MySQL === I'm building a basic search functionality, using LIKE (I'd be using fulltext but can't at the moment) and I'm wondering if MySQL can, on searching for a keyword (e.g. WHERE field LIKE '%word%') return 20 words either side of the keyword, as well?
0
38,037
09/01/2008 15:10:13
3,590
08/29/2008 08:09:23
31
4
C++: How to extract a string from rapidxml
In my C++ program I want to parse a small piece of XML, insert some nodes, then extract the new XML (preferably as a std::string) RapidXML ([http://rapidxml.sourceforge.net/][1]) has been recommended to me, but I can't see how to retrieve the XML back as a text string. (I could iterate over the nodes and attributes and build it myself, but surely there's a build in function that I am missing) Thank you [1]: http://rapidxml.sourceforge.net/
c++
xml
rapidxml
null
null
null
open
C++: How to extract a string from rapidxml === In my C++ program I want to parse a small piece of XML, insert some nodes, then extract the new XML (preferably as a std::string) RapidXML ([http://rapidxml.sourceforge.net/][1]) has been recommended to me, but I can't see how to retrieve the XML back as a text string. (I could iterate over the nodes and attributes and build it myself, but surely there's a build in function that I am missing) Thank you [1]: http://rapidxml.sourceforge.net/
0
38,039
09/01/2008 15:10:38
383
08/05/2008 10:46:37
2,409
214
How can I get the DateTime for the Start of the Week?
How do I find the Start of the week (Both Sunday and Monday) knowing just the current time in C#.NET Something like: DateTime.Now.StartWeek(Monday);
c#
datetime
null
null
null
null
open
How can I get the DateTime for the Start of the Week? === How do I find the Start of the week (Both Sunday and Monday) knowing just the current time in C#.NET Something like: DateTime.Now.StartWeek(Monday);
0
38,056
09/01/2008 15:20:52
1,531
08/16/2008 12:01:05
71
1
How do you check in Python under Linux if a process is running?
The only *nice* way I've found is: import sys import os try: os.kill(int(sys.argv[1]), 0) print "Running" except: print "Not running" ([Source](http://www.unix.com/unix-advanced-expert-users/79267-trick-bash-scripters-check-if-process-running.html)) But is this reliable? Does it work with every process and every distribution?
python
linux
process
null
null
null
open
How do you check in Python under Linux if a process is running? === The only *nice* way I've found is: import sys import os try: os.kill(int(sys.argv[1]), 0) print "Running" except: print "Not running" ([Source](http://www.unix.com/unix-advanced-expert-users/79267-trick-bash-scripters-check-if-process-running.html)) But is this reliable? Does it work with every process and every distribution?
0
38,057
09/01/2008 15:21:01
4,052
09/01/2008 14:36:26
1
0
Why @OneToMany does not work with inheritance in Hibernate
<pre> @Entity @Inheritance(strategy = InheritanceType.SINGLE_TABLE) public class Problem { @ManyToOne private Person person; } @Entity @DiscriminatorValue("UP") public class UglyProblem extends Problem {} @Entity public class Person { @OneToMany(mappedBy="person") private List< UglyProblem > problems; } </pre> I think it is pretty clear what I am trying to do. I expect @ManyToOne person to be inherited by UglyProblem class. But there will be an exception saying something like: "There is no such property found in UglyProblem class (mappedBy="person")". All I found is [this][1]. I was not able to find the post by Emmanuel Bernard explaining reasons behind this. [1]: http://opensource.atlassian.com/projects/hibernate/browse/ANN-558
java
orm
inheritance
hibernate
null
null
open
Why @OneToMany does not work with inheritance in Hibernate === <pre> @Entity @Inheritance(strategy = InheritanceType.SINGLE_TABLE) public class Problem { @ManyToOne private Person person; } @Entity @DiscriminatorValue("UP") public class UglyProblem extends Problem {} @Entity public class Person { @OneToMany(mappedBy="person") private List< UglyProblem > problems; } </pre> I think it is pretty clear what I am trying to do. I expect @ManyToOne person to be inherited by UglyProblem class. But there will be an exception saying something like: "There is no such property found in UglyProblem class (mappedBy="person")". All I found is [this][1]. I was not able to find the post by Emmanuel Bernard explaining reasons behind this. [1]: http://opensource.atlassian.com/projects/hibernate/browse/ANN-558
0
38,066
09/01/2008 15:47:05
1,116
08/12/2008 13:25:41
530
39
Whats your PostMortem Meeting format?
I'm planning to introduce project post-mortems to the business I work for. I think they will improve development-client relations. Encourage feedback and improve the quality of service to clients. However as I have never done them before I don't have a format to follow. What is the Post-Mortem procedure you use? Are there any anti-patterns with post-mortems?
project-management
null
null
null
null
null
open
Whats your PostMortem Meeting format? === I'm planning to introduce project post-mortems to the business I work for. I think they will improve development-client relations. Encourage feedback and improve the quality of service to clients. However as I have never done them before I don't have a format to follow. What is the Post-Mortem procedure you use? Are there any anti-patterns with post-mortems?
0
38,070
09/01/2008 15:49:49
1,338
08/14/2008 15:10:01
221
15
Best .NET Wrapper for Google Maps or Yahoo Maps?
I need to do a quick demo app using Google Maps (or Yahoo Maps, or any similar service). So far I haven't had much luck finding .NET wrappers for any of these services. Any suggestions or pointers? I'm not opposed to using the native javascript api to do this, but I assumed someone would have already written a wrapper to easily integrate this into an ASP.NET application.
asp.net
map
null
null
null
null
open
Best .NET Wrapper for Google Maps or Yahoo Maps? === I need to do a quick demo app using Google Maps (or Yahoo Maps, or any similar service). So far I haven't had much luck finding .NET wrappers for any of these services. Any suggestions or pointers? I'm not opposed to using the native javascript api to do this, but I assumed someone would have already written a wrapper to easily integrate this into an ASP.NET application.
0
38,074
09/01/2008 15:52:32
2,846
08/25/2008 14:06:29
1
0
Best way to handle LOBs in Oracle dblink'ed tables
If you create an Oracle dblink you cannot directly access LOB columns in the target tables. For instance, you create a dblink with: create database link TEST_LINK connect to TARGETUSER IDENTIFIED BY password using 'DATABASESID'; After this you can do stuff like: select column_a, column_b from data_user.sample_table@TEST_LINK Except if the column is a LOB, then you get the error: ORA-22992: cannot use LOB locators selected from remote tables This is documented here: http://download-uk.oracle.com/docs/cd/B10501_01/appdev.920/a96591/adl04mng.htm#98328 The same page suggests you fetch the values into a local table, but that is... kind of messy: CREATE TABLE tmp_hello AS SELECT column_a from data_user.sample_table@TEST_LINK Any ideas? Thanks
oracle
sql
dblink
null
null
null
open
Best way to handle LOBs in Oracle dblink'ed tables === If you create an Oracle dblink you cannot directly access LOB columns in the target tables. For instance, you create a dblink with: create database link TEST_LINK connect to TARGETUSER IDENTIFIED BY password using 'DATABASESID'; After this you can do stuff like: select column_a, column_b from data_user.sample_table@TEST_LINK Except if the column is a LOB, then you get the error: ORA-22992: cannot use LOB locators selected from remote tables This is documented here: http://download-uk.oracle.com/docs/cd/B10501_01/appdev.920/a96591/adl04mng.htm#98328 The same page suggests you fetch the values into a local table, but that is... kind of messy: CREATE TABLE tmp_hello AS SELECT column_a from data_user.sample_table@TEST_LINK Any ideas? Thanks
0
38,081
09/01/2008 15:54:46
2,095
08/20/2008 11:01:19
81
6
How to implement mouse dragging in Visual Basic?
I need to create a quick-n-dirty knob control in Visual Basic 2005 Express, the value of which is incremented/decremented by "grabbing" it with the mouse and moving the cursor up/down. Because the knob itself doesn't move, I need to keep tracking the mouse movement outside of the rectangle of the control. I use a Label with an ImageList to implement this (I have a list of 127 bitmaps representing the knob in various positions). Which events should I react to?
usercontrols
drag-and-drop
vb
null
null
null
open
How to implement mouse dragging in Visual Basic? === I need to create a quick-n-dirty knob control in Visual Basic 2005 Express, the value of which is incremented/decremented by "grabbing" it with the mouse and moving the cursor up/down. Because the knob itself doesn't move, I need to keep tracking the mouse movement outside of the rectangle of the control. I use a Label with an ImageList to implement this (I have a list of 127 bitmaps representing the knob in various positions). Which events should I react to?
0
38,090
09/01/2008 16:03:55
4,045
09/01/2008 14:14:53
6
0
How to prevent Write Ahead Logging on just one table in PostgreSQL?
I am considering log-shipping of [Write Ahead Logs (WAL)][1] in PostgreSQL to create a warm-standby database. However I have one table in the database that receives a huge amount of INSERT/DELETEs each day, but which I don't care about protecting the data in it. To reduce the amount of WALs produced I was wondering, **is there a way to prevent any activity on one table from being recorded in the WALs?** [1]: http://www.postgresql.org/docs/8.2/static/runtime-config-wal.html
postgresql
null
null
null
null
null
open
How to prevent Write Ahead Logging on just one table in PostgreSQL? === I am considering log-shipping of [Write Ahead Logs (WAL)][1] in PostgreSQL to create a warm-standby database. However I have one table in the database that receives a huge amount of INSERT/DELETEs each day, but which I don't care about protecting the data in it. To reduce the amount of WALs produced I was wondering, **is there a way to prevent any activity on one table from being recorded in the WALs?** [1]: http://www.postgresql.org/docs/8.2/static/runtime-config-wal.html
0
38,107
09/01/2008 16:20:44
1,127,460
08/28/2008 09:38:19
96
3
Cross Page Postback doesn't work for client-side enabled button
I am using a cross page postback for Page A to pass data to Page B. The button that causes the postback has its postbackurl set but is disabled until the user selects a value from a DDL at which point the button is enable using javascript. However this prevents the cross page postback from occurring, Page A just postbacks to itself. If the button is never disabled it works fine. Anyone know how to solve this?
asp.net
null
null
null
null
null
open
Cross Page Postback doesn't work for client-side enabled button === I am using a cross page postback for Page A to pass data to Page B. The button that causes the postback has its postbackurl set but is disabled until the user selects a value from a DDL at which point the button is enable using javascript. However this prevents the cross page postback from occurring, Page A just postbacks to itself. If the button is never disabled it works fine. Anyone know how to solve this?
0
38,109
09/01/2008 16:21:32
3,632
08/29/2008 16:06:14
19
1
Pair programming
I'm very curious, how popular in the world ( and I know that the stackoverflow community comes from different parts of the world ) is pair programming. Have you ever worked/are working/will work in a company where you've been pair programming ? What's your opinion on the matter ?
agile
methodology
pair-programming
null
null
null
open
Pair programming === I'm very curious, how popular in the world ( and I know that the stackoverflow community comes from different parts of the world ) is pair programming. Have you ever worked/are working/will work in a company where you've been pair programming ? What's your opinion on the matter ?
0
38,117
09/01/2008 16:24:14
4,066
09/01/2008 16:06:15
1
0
Inbox Management (in Outlook)
I've gone back and forth between having an organized inbox and having an inbox with absolutely everything I've received in it. Would you recommend leaving everything in an inbox, or organize it? If you organize it, is there any method to your madness or possibly an Outlook (2003) plug-in to aid in this task? For what it's worth, I *feel* way more productive with everything in my inbox, grouped by date. I *feel* like a spend way more time doing inbox management any other way.
email
outlook
gettingthingsdone
null
null
null
open
Inbox Management (in Outlook) === I've gone back and forth between having an organized inbox and having an inbox with absolutely everything I've received in it. Would you recommend leaving everything in an inbox, or organize it? If you organize it, is there any method to your madness or possibly an Outlook (2003) plug-in to aid in this task? For what it's worth, I *feel* way more productive with everything in my inbox, grouped by date. I *feel* like a spend way more time doing inbox management any other way.
0
38,125
09/01/2008 16:29:10
4,063
09/01/2008 15:49:49
1
1
Strategies for keeping a Lucene Index up to date with domain model changes
Was looking to get peoples thoughts on keeping a Lucene index up to date as changes are made to the domain model objects of an application. The application in question is a Java/J2EE based web app that uses Hibernate. The way I currently have things working is that the Hibernate mapped model objects all implement a common "Indexable" interface that can return a set of key/value pairs that are recorded in Lucene. Whenever a CRUD operation is performed involving such an object I send it via JMS queue into a message driven bean that records in Lucene the primary key of the object and the key/value pairs returned from the index( ) method of the Indexable object that was provided. My main worries about this scheme is if the MDB gets behind and can't keep up with the indexing operations that are coming in or if some sort of error/exception stops an object from being index. The result is an out-of-date index for either a sort, or long, period of time. Basically I was just wondering what kind of strategies others had come up with for this sort of thing. Not necessarily looking for one correct answer but am imagining a list of "whiteboard" sort of ideas to get my brain thinking about alternatives.
design
null
null
null
null
null
open
Strategies for keeping a Lucene Index up to date with domain model changes === Was looking to get peoples thoughts on keeping a Lucene index up to date as changes are made to the domain model objects of an application. The application in question is a Java/J2EE based web app that uses Hibernate. The way I currently have things working is that the Hibernate mapped model objects all implement a common "Indexable" interface that can return a set of key/value pairs that are recorded in Lucene. Whenever a CRUD operation is performed involving such an object I send it via JMS queue into a message driven bean that records in Lucene the primary key of the object and the key/value pairs returned from the index( ) method of the Indexable object that was provided. My main worries about this scheme is if the MDB gets behind and can't keep up with the indexing operations that are coming in or if some sort of error/exception stops an object from being index. The result is an out-of-date index for either a sort, or long, period of time. Basically I was just wondering what kind of strategies others had come up with for this sort of thing. Not necessarily looking for one correct answer but am imagining a list of "whiteboard" sort of ideas to get my brain thinking about alternatives.
0
38,151
09/01/2008 16:41:44
2,839
08/25/2008 13:34:44
6
4
<asp:hyperlink> after opening target in new window - new window cannot be closed
I've got a page with an <asp:hyperlink> control - the link is to a gif file. Right clicking on the link (in IE7) and selecting "open target in new window" correctly displays the image. However I can't then close the new IE window. What might I be doing wrong ? TIA Tom
asp.net
null
null
null
null
null
open
<asp:hyperlink> after opening target in new window - new window cannot be closed === I've got a page with an <asp:hyperlink> control - the link is to a gif file. Right clicking on the link (in IE7) and selecting "open target in new window" correctly displays the image. However I can't then close the new IE window. What might I be doing wrong ? TIA Tom
0
38,158
09/01/2008 16:46:46
2,701
08/24/2008 15:51:24
187
16
What is a good maintainability index using Visual Studio 2008 code analysis?
My company recently purchased TFS and I have started looking into the code analysis tools to help drive up code quality and noticed a good looking metric "maintainability index". Is anyone using this metric for code reviews/checkins/etc? If so, what is an acceptable index for developers to work toward?
visual-studio
code-analysis
null
null
null
null
open
What is a good maintainability index using Visual Studio 2008 code analysis? === My company recently purchased TFS and I have started looking into the code analysis tools to help drive up code quality and noticed a good looking metric "maintainability index". Is anyone using this metric for code reviews/checkins/etc? If so, what is an acceptable index for developers to work toward?
0
38,160
09/01/2008 16:47:53
163
08/02/2008 20:40:09
448
19
Parallelize Bash Script
Lets say I have a loop in bash: for foo in `some-command` do do-something $foo done `do-something` is cpu bound and I have a nice shiny 4 core processor. I'd like to be able to run up to 4 `do-something`'s at once. The naive approach seems to be: for foo in `some-command` do do-something $foo & done This will run *all* `do-something`s at once, but there are a couple downsides, mainly that do-something may also have some significant I/O which performing *all* at once might slow down a bit. The other problem is that this code block returns immediately, so no way to do other work when all the `do-something`s are finished. How would you write this loop so there are always X `do-something`s running at once?
bash
null
null
null
null
null
open
Parallelize Bash Script === Lets say I have a loop in bash: for foo in `some-command` do do-something $foo done `do-something` is cpu bound and I have a nice shiny 4 core processor. I'd like to be able to run up to 4 `do-something`'s at once. The naive approach seems to be: for foo in `some-command` do do-something $foo & done This will run *all* `do-something`s at once, but there are a couple downsides, mainly that do-something may also have some significant I/O which performing *all* at once might slow down a bit. The other problem is that this code block returns immediately, so no way to do other work when all the `do-something`s are finished. How would you write this loop so there are always X `do-something`s running at once?
0
38,181
09/01/2008 17:07:24
781
08/08/2008 21:28:19
150
10
When should I mock?
I have a basic understanding of mock and fake objects, but I'm not sure I have a feeling about when/where to use mocking - especially as it would apply to [this][1] scenario here. [1]: http://stackoverflow.com/questions/37375/how-do-i-unit-test-a-wcf-service
mocking
unit-testing
null
null
null
null
open
When should I mock? === I have a basic understanding of mock and fake objects, but I'm not sure I have a feeling about when/where to use mocking - especially as it would apply to [this][1] scenario here. [1]: http://stackoverflow.com/questions/37375/how-do-i-unit-test-a-wcf-service
0
38,183
09/01/2008 17:09:44
2,554
08/22/2008 20:23:30
31
5
Any data-driven open source JEE5 EJB3+JSF Sample Project out there?
I am looking for an open source example project that uses EJB3 as backend and JSF as frontend. The application should be data-driven, i.e. the following aspects are fundamental and make 80% or more of the application. - form-based (many input forms) - table views, master/detail, etc. - CRUD (create/read/update/delete)-Operations have been implemented - support for relations: 1:1, 1:n Typical applications are CRM / ERP projects where people work a lot with lists, tables, and forms. But any other "administrative" application should be OK, too. I know petstore, but that application isn't form-based. petstore is a end-user application. I am looking for backend-user applications. Something like Microsofts AdventureWorks series, but with EJB3+JSF... Something like SugarCRM, but with EJB3+JSF... I've googled *a lot*... with no results :-(
java
open-source
jsf
java-ee
java-ee-5
null
open
Any data-driven open source JEE5 EJB3+JSF Sample Project out there? === I am looking for an open source example project that uses EJB3 as backend and JSF as frontend. The application should be data-driven, i.e. the following aspects are fundamental and make 80% or more of the application. - form-based (many input forms) - table views, master/detail, etc. - CRUD (create/read/update/delete)-Operations have been implemented - support for relations: 1:1, 1:n Typical applications are CRM / ERP projects where people work a lot with lists, tables, and forms. But any other "administrative" application should be OK, too. I know petstore, but that application isn't form-based. petstore is a end-user application. I am looking for backend-user applications. Something like Microsofts AdventureWorks series, but with EJB3+JSF... Something like SugarCRM, but with EJB3+JSF... I've googled *a lot*... with no results :-(
0
38,190
09/01/2008 17:27:43
1,834
08/18/2008 19:14:32
112
7
How do I read a disk directly with .Net?
Is is possible to read a disk directly with .Net? By directly I mean via the device bypassing the file system. I think I would go about this by opening the device some way "\Device\Ide\IdeDeviceP2T0L0-1" for example. If I can't open the device with a .NET api knowing which Win32 API to use would be helpful.
.net
winapi
disk
null
null
null
open
How do I read a disk directly with .Net? === Is is possible to read a disk directly with .Net? By directly I mean via the device bypassing the file system. I think I would go about this by opening the device some way "\Device\Ide\IdeDeviceP2T0L0-1" for example. If I can't open the device with a .NET api knowing which Win32 API to use would be helpful.
0
38,193
09/01/2008 17:34:06
4,082
09/01/2008 17:33:08
1
0
Determine if a ruby script is already running
Is there an easy way to tell if a ruby script is already running and then handle it appropriately? For example: I have a script called really_long_script.rb. I have it cronned to run every 5 minutes. When it runs, I want to see if the previous run is still running and then stop the execution of the second script. Any ideas?
ruby
null
null
null
null
null
open
Determine if a ruby script is already running === Is there an easy way to tell if a ruby script is already running and then handle it appropriately? For example: I have a script called really_long_script.rb. I have it cronned to run every 5 minutes. When it runs, I want to see if the previous run is still running and then stop the execution of the second script. Any ideas?
0
38,197
09/01/2008 17:40:52
1,114
08/12/2008 12:54:42
40
6
Why is the subprocess.Popen class not named Subprocess?
The primary class in the `subprocess` module is name `Popen`, and represents a subprocess. `Popen` sounds like someone was trying to force the name to follow some function naming format, rather than chosing a name that actually represents what the object is. Does anyone know why it was chosen over something simple like, say, `Subprocess`?
python
subprocess
null
null
null
02/11/2012 16:23:01
not constructive
Why is the subprocess.Popen class not named Subprocess? === The primary class in the `subprocess` module is name `Popen`, and represents a subprocess. `Popen` sounds like someone was trying to force the name to follow some function naming format, rather than chosing a name that actually represents what the object is. Does anyone know why it was chosen over something simple like, say, `Subprocess`?
4
38,198
09/01/2008 17:43:49
572
08/06/2008 20:56:54
2,329
192
Why does this C code produce a double instead of a float?
<code>celsius = (5.0/9.0) * (fahr-32.0);</code> Is it just a development choice that the C developers decided upon or is there a reason to this? I believe a float is smaller than a double, so it might be to prevent overflows caused by not knowing what decimal format to use. Is that the reason, or am I overlooking something?
c
types
null
null
null
null
open
Why does this C code produce a double instead of a float? === <code>celsius = (5.0/9.0) * (fahr-32.0);</code> Is it just a development choice that the C developers decided upon or is there a reason to this? I believe a float is smaller than a double, so it might be to prevent overflows caused by not knowing what decimal format to use. Is that the reason, or am I overlooking something?
0
38,210
09/01/2008 17:52:58
1,944
08/19/2008 14:49:14
105
5
What non-programming books should programmers read?
As a follow-up to [this question][1] (I liked the democratic nature of the recommendations; those books most heavily recommended float to the top), I thought I'd ask "what **non-programming** books should programmers read?" To make the answers work best, only post one book per answer. If you have more than one book recommendation, post an answer for each. Eloborate on your recommendation if you like; saying *why* a book is a good read from a programmers perspective is always useful to know. [1]: http://beta.stackoverflow.com/questions/1711/what-is-the-single-most-influential-book-every-programmer-should-read
books
non-technical
null
null
null
06/10/2010 15:23:40
off topic
What non-programming books should programmers read? === As a follow-up to [this question][1] (I liked the democratic nature of the recommendations; those books most heavily recommended float to the top), I thought I'd ask "what **non-programming** books should programmers read?" To make the answers work best, only post one book per answer. If you have more than one book recommendation, post an answer for each. Eloborate on your recommendation if you like; saying *why* a book is a good read from a programmers perspective is always useful to know. [1]: http://beta.stackoverflow.com/questions/1711/what-is-the-single-most-influential-book-every-programmer-should-read
2
38,239
09/01/2008 18:16:41
1,037
08/11/2008 17:42:51
497
33
Practices for programming in a scientific environment
### Background ### Last year, I did an internship in a physics research group at a university. In this group, we mostly used LabVIEW to write programs for controlling our setups, doing data acquisition and analyzing our data. For the first two purposes, that works quite OK, but for data analysis, it's a real pain. On top of that, everyone was mostly self-taught, so code that was written was generally quite a mess (no wonder that every PhD quickly decided to rewrite everything from scratch). Version control was unknown, and impossible to set up because of strict software and network regulations from the IT department. Now, things actually worked out surprisingly OK, but I have been wondering how other **people in the natural sciences do their software development**. Is there anyone around here with experience in that field? ### Questions ### Some concrete questions: - What languages/environments have you used for developing scientific software, esp. data analysis? What libraries? (E.g., what do you use for plotting?) - Was there any training for people without any significant background in programming? - Did you have anything like version control, bug tracking? - How would you go about trying to create a decent environment for programming, without getting too much in the way of the individual scientists (esp. physicists are stubborn people!) I realize this is a rather broad question, but I do think it'd be interesting to gather some experiences here. I'll try to summarize things later on and perhaps change this into a wiki-style topic. Thanks a lot! Best regards, Onno
teamwork
physics
null
null
null
null
open
Practices for programming in a scientific environment === ### Background ### Last year, I did an internship in a physics research group at a university. In this group, we mostly used LabVIEW to write programs for controlling our setups, doing data acquisition and analyzing our data. For the first two purposes, that works quite OK, but for data analysis, it's a real pain. On top of that, everyone was mostly self-taught, so code that was written was generally quite a mess (no wonder that every PhD quickly decided to rewrite everything from scratch). Version control was unknown, and impossible to set up because of strict software and network regulations from the IT department. Now, things actually worked out surprisingly OK, but I have been wondering how other **people in the natural sciences do their software development**. Is there anyone around here with experience in that field? ### Questions ### Some concrete questions: - What languages/environments have you used for developing scientific software, esp. data analysis? What libraries? (E.g., what do you use for plotting?) - Was there any training for people without any significant background in programming? - Did you have anything like version control, bug tracking? - How would you go about trying to create a decent environment for programming, without getting too much in the way of the individual scientists (esp. physicists are stubborn people!) I realize this is a rather broad question, but I do think it'd be interesting to gather some experiences here. I'll try to summarize things later on and perhaps change this into a wiki-style topic. Thanks a lot! Best regards, Onno
0
38,264
09/01/2008 18:36:12
2,443
08/22/2008 10:53:30
260
22
What lightweight neural networks are there for Java?
I have a specific problem of having to decide in a fuzzy way between various outputs from a given set of metrics. It's a perfect candidate for neural network approaches. I've used Joone in the past with success but I'm a little scared of its 2MB jar file for something that in my mind can be done in far less code than that. Of course the "Roll your own" approach would do it, but I'd rather be using something with more eyeballs on it than just mine. What do you suggest I do?
java
algorithm
neural-network
null
null
null
open
What lightweight neural networks are there for Java? === I have a specific problem of having to decide in a fuzzy way between various outputs from a given set of metrics. It's a perfect candidate for neural network approaches. I've used Joone in the past with success but I'm a little scared of its 2MB jar file for something that in my mind can be done in far less code than that. Of course the "Roll your own" approach would do it, but I'd rather be using something with more eyeballs on it than just mine. What do you suggest I do?
0
38,280
09/01/2008 18:48:22
3,263
08/27/2008 15:33:09
16
4
Best browser for web application
I am in a position where I can choose the client browser for my web app. The app is being used internally, and we are installing each client "manually".I would like to find a better solution for the browser,so : What is a good browser that I can use as a client to a web application? General functionalities I would like to have: - opening the browser from a shortcut, directly to the application's URL - ability to restrict navigation to a set of allowed URLs - fullscreen mode, no menu, no address bar - javascript - good CSS support - ability to cancel Back button (or at least solve the "Webpage has expired" IE problem) IE7 and FireFox are good candidates, but each seem to have it's own problems and issues.
browser
web-applications
null
null
null
09/07/2011 22:35:13
not constructive
Best browser for web application === I am in a position where I can choose the client browser for my web app. The app is being used internally, and we are installing each client "manually".I would like to find a better solution for the browser,so : What is a good browser that I can use as a client to a web application? General functionalities I would like to have: - opening the browser from a shortcut, directly to the application's URL - ability to restrict navigation to a set of allowed URLs - fullscreen mode, no menu, no address bar - javascript - good CSS support - ability to cancel Back button (or at least solve the "Webpage has expired" IE problem) IE7 and FireFox are good candidates, but each seem to have it's own problems and issues.
4
38,288
09/01/2008 18:59:14
3,624
08/29/2008 15:49:07
100
1
How do I add a user in Ubuntu?
... using the command line
ubuntu
user
null
null
null
null
open
How do I add a user in Ubuntu? === ... using the command line
0
38,295
09/01/2008 19:02:13
3,798
08/30/2008 22:09:59
8
1
Apply an ICC Color Profile to an image in C# (Dotnet)
How does one convert an image from one color profile to another (screen to printer, or scanner to screen). In Visual C++ you would use the function in ICM.h, is there a managed way to do this with GDI+?
c#
.net
gdi+
null
null
null
open
Apply an ICC Color Profile to an image in C# (Dotnet) === How does one convert an image from one color profile to another (screen to printer, or scanner to screen). In Visual C++ you would use the function in ICM.h, is there a managed way to do this with GDI+?
0
38,299
09/01/2008 19:04:06
4,101
09/01/2008 19:04:06
1
0
Tutorial on understanding strings in Symbian
I have Carbide.c++ Developer from Nokia and I want to create applications for my S60 phone. I've looked at the samples that goes with the different SDK's for S60 but I haven't found any simple explanation on how strings, called descriptors, are used in Symbian. One of the problems are that I'm visually impaired and therefore it takes quite some time to read through large documents that has page up and page down with lots of unuseful info and I've given up. I'm willing to give it another try. Can anyone help me?
c++
symbian
carbide
tutorial
null
null
open
Tutorial on understanding strings in Symbian === I have Carbide.c++ Developer from Nokia and I want to create applications for my S60 phone. I've looked at the samples that goes with the different SDK's for S60 but I haven't found any simple explanation on how strings, called descriptors, are used in Symbian. One of the problems are that I'm visually impaired and therefore it takes quite some time to read through large documents that has page up and page down with lots of unuseful info and I've given up. I'm willing to give it another try. Can anyone help me?
0
38,302
09/01/2008 19:06:01
4,055
09/01/2008 14:58:25
1
0
Pinning pointer arrays in memory
I'm currently working on a ray-tracer in C# as a hobby project. I'm trying to achieve a decent rendering speed by implementing some tricks from a c++ implementation and have run into a spot of trouble. The objects in the scenes which the ray-tracer renders are stored in a KdTree structure and the tree's nodes are, in turn, stored in an array. The optimization I'm having problems with is while trying to fit as many tree nodes as possible into a cache line. One means of doing this is for nodes to contain a pointer to the left child node only. It is then implicit that the right child follows directly after the left one in the array. The nodes are structs and during tree construction they are succesfully put into the array by a static memory manager class. When I begin to traverse the tree it, at first, seems to work just fine. Then at a point early in the rendering (about the same place each time), the left child pointer of the root node is suddenly pointing at a null pointer. I have come to the conclusion that the garbage collecter has moved the structs as the array lies on the heap. I've tried several things to pin the addresses in memory but none of them seems to last for the entire application lifetime as I need. The 'fixed' keyword only seems to help during single method calls and declaring 'fixed' arrays can only be done on simple types which a node isn't. Is there a good way to do this or am I just too far down the path of stuff C# wasn't meant for. Btw, changing to c++, while perhaps the better choice for a high performance program, is not an option.
c#
optimization
raytracing
unsafe
null
null
open
Pinning pointer arrays in memory === I'm currently working on a ray-tracer in C# as a hobby project. I'm trying to achieve a decent rendering speed by implementing some tricks from a c++ implementation and have run into a spot of trouble. The objects in the scenes which the ray-tracer renders are stored in a KdTree structure and the tree's nodes are, in turn, stored in an array. The optimization I'm having problems with is while trying to fit as many tree nodes as possible into a cache line. One means of doing this is for nodes to contain a pointer to the left child node only. It is then implicit that the right child follows directly after the left one in the array. The nodes are structs and during tree construction they are succesfully put into the array by a static memory manager class. When I begin to traverse the tree it, at first, seems to work just fine. Then at a point early in the rendering (about the same place each time), the left child pointer of the root node is suddenly pointing at a null pointer. I have come to the conclusion that the garbage collecter has moved the structs as the array lies on the heap. I've tried several things to pin the addresses in memory but none of them seems to last for the entire application lifetime as I need. The 'fixed' keyword only seems to help during single method calls and declaring 'fixed' arrays can only be done on simple types which a node isn't. Is there a good way to do this or am I just too far down the path of stuff C# wasn't meant for. Btw, changing to c++, while perhaps the better choice for a high performance program, is not an option.
0
38,305
09/01/2008 19:09:19
2,443
08/22/2008 10:53:30
275
23
How do I strip the fluff out of a third party library?
It may not be best practice but are there ways of removing unsused classes from a third party's jar files. Something that looks at the way in which my classes are using the library and does some kind of coverage analysis, then spits out another jar with all of the untouched classes removed. Obviously there are issues with this. Specifically, the usage scenario I put it though may not use all classes all the time. But neglecting these problems, can it be done in principle?
java
optimization
size
null
null
null
open
How do I strip the fluff out of a third party library? === It may not be best practice but are there ways of removing unsused classes from a third party's jar files. Something that looks at the way in which my classes are using the library and does some kind of coverage analysis, then spits out another jar with all of the untouched classes removed. Obviously there are issues with this. Specifically, the usage scenario I put it though may not use all classes all the time. But neglecting these problems, can it be done in principle?
0
38,308
09/01/2008 19:13:10
3,798
08/30/2008 22:09:59
8
1
Is there any way to draw an image to use 4 points rather than 3 (perspective warp).
Drawing a parallelgram is nicely supported with Graphics.DrawImage: Bitmap destImage = new Bitmap(srcImage.Width, srcImage.Height); using (Graphics gr = new Graphics.FromImage(destImage)) { Point[] destPts = new Point[] { new PointF(x1, y1), new PointF(x2, y2), new PointF(x4, y4)}; gr.DrawImage(srcImage, destPts); How, do you do 4 points (obviously the following is not supported, but this is what is wanted): Bitmap destImage = new Bitmap(srcImage.Width, srcImage.Height); using (Graphics gr = new Graphics.FromImage(destImage)) { Point[] destPts = new Point[] { new PointF(x1, y1), new PointF(x2, y2), new PointF(x3, y3), new PointF(x4, y4)}; gr.DrawImage(srcImage, destPts); }
c#
.net
gdi+
null
null
null
open
Is there any way to draw an image to use 4 points rather than 3 (perspective warp). === Drawing a parallelgram is nicely supported with Graphics.DrawImage: Bitmap destImage = new Bitmap(srcImage.Width, srcImage.Height); using (Graphics gr = new Graphics.FromImage(destImage)) { Point[] destPts = new Point[] { new PointF(x1, y1), new PointF(x2, y2), new PointF(x4, y4)}; gr.DrawImage(srcImage, destPts); How, do you do 4 points (obviously the following is not supported, but this is what is wanted): Bitmap destImage = new Bitmap(srcImage.Width, srcImage.Height); using (Graphics gr = new Graphics.FromImage(destImage)) { Point[] destPts = new Point[] { new PointF(x1, y1), new PointF(x2, y2), new PointF(x3, y3), new PointF(x4, y4)}; gr.DrawImage(srcImage, destPts); }
0
38,323
09/01/2008 19:26:42
3,010
08/26/2008 11:47:04
31
1
VMware or Hyper-V for Developers
I'm looking to replace a couple of machines in the office with a more powerful multi-processor machine running either VMware or Microsoft's Hyper-V with a view to hosting a mix of Windows Server 2003, Windows Server 2008 and Linux operating systems. The machines are used mainly for testing ASP.Net or Perl web sites. I don't need advanced features like live migration of running systems but it would be useful to be able to restore a machine to a known state. Performance is not really a big issue either unless one is noticeable faster than the other. My question is: Should I play safe and go with VMware or is Hyper-V mature enough to be a candidate?
vmware
virtualization
hyper-v
null
null
null
open
VMware or Hyper-V for Developers === I'm looking to replace a couple of machines in the office with a more powerful multi-processor machine running either VMware or Microsoft's Hyper-V with a view to hosting a mix of Windows Server 2003, Windows Server 2008 and Linux operating systems. The machines are used mainly for testing ASP.Net or Perl web sites. I don't need advanced features like live migration of running systems but it would be useful to be able to restore a machine to a known state. Performance is not really a big issue either unless one is noticeable faster than the other. My question is: Should I play safe and go with VMware or is Hyper-V mature enough to be a candidate?
0
38,336
09/01/2008 19:48:10
3,654
08/29/2008 17:52:22
173
9
How do I develop font families that Linux users can benefit from?
Because Linux (and it's variants) have a completely different set of fonts than Windows and Mac OS X, is there anyone with any experience of creating cross platform font families - ideally finding equivalents to the common fonts found on the aforementioned operating systems? If so, what is the best route to take?
fonts
css
linux
cross-platform
null
null
open
How do I develop font families that Linux users can benefit from? === Because Linux (and it's variants) have a completely different set of fonts than Windows and Mac OS X, is there anyone with any experience of creating cross platform font families - ideally finding equivalents to the common fonts found on the aforementioned operating systems? If so, what is the best route to take?
0
38,338
09/01/2008 19:51:06
3,485
08/28/2008 18:14:08
51
5
Why is Lua considered a game language?
I have been learning about Lua in the past month and I'm absolutely in love with the language, but all I see around that is built with lua are games. I mean, the syntax is very simple, there is no fuss, no special meaning characters that makes code look like regex, has all the good things about a script language and integrates so painlessly with other languages like C, Java, etc. The only down-side I saw so far is the prototype based object orientation that some people do not like (or lack of OO built-in). I do not see how ruby or python are better, surely not in performance ( http://shootout.alioth.debian.org/gp4/benchmark.php?test=all&lang=lua&lang2=python ). I was planning on writting a web app using lua with the Kepler framework and Javascript, but the lack of other projects that use lua as a web language makes me feel a bit uneasy since this is my firts try with web development. Lua is considered a kids language, most of you on stackoverflow probably only know the language because of the WoW addons. I can't really see why is that... http://lua-users.org/wiki/LuaVersusPython this link provides some insights on Lua against Python, but this is clearly biased.
python
ruby
lua
null
null
11/11/2011 21:34:49
not constructive
Why is Lua considered a game language? === I have been learning about Lua in the past month and I'm absolutely in love with the language, but all I see around that is built with lua are games. I mean, the syntax is very simple, there is no fuss, no special meaning characters that makes code look like regex, has all the good things about a script language and integrates so painlessly with other languages like C, Java, etc. The only down-side I saw so far is the prototype based object orientation that some people do not like (or lack of OO built-in). I do not see how ruby or python are better, surely not in performance ( http://shootout.alioth.debian.org/gp4/benchmark.php?test=all&lang=lua&lang2=python ). I was planning on writting a web app using lua with the Kepler framework and Javascript, but the lack of other projects that use lua as a web language makes me feel a bit uneasy since this is my firts try with web development. Lua is considered a kids language, most of you on stackoverflow probably only know the language because of the WoW addons. I can't really see why is that... http://lua-users.org/wiki/LuaVersusPython this link provides some insights on Lua against Python, but this is clearly biased.
4
38,340
09/01/2008 19:56:27
3,868
08/31/2008 14:15:41
11
3
Manipulating content of pages that pass through an HTTP proxy (and calling Java)
I need to make a web proxy that adds annotations to the HTML of web pages that pass through. I'm hoping some decent software exists that can handle the HTTP proxying part of the application, so that, for the most part, I only have to worry about making a function that sits on the stream with a signature similar in intent to void process(InputStream incomingHTML, OutputStream outgoingHTML); The ability to redistribute the non-proxy portion of the code under a nonfree license is essential, and paying money for a commercial solution is possible. Also, the processing code needs to call some Java libraries. So, do you know of anything that suits my needs?
http
proxy
plugin
java
null
null
open
Manipulating content of pages that pass through an HTTP proxy (and calling Java) === I need to make a web proxy that adds annotations to the HTML of web pages that pass through. I'm hoping some decent software exists that can handle the HTTP proxying part of the application, so that, for the most part, I only have to worry about making a function that sits on the stream with a signature similar in intent to void process(InputStream incomingHTML, OutputStream outgoingHTML); The ability to redistribute the non-proxy portion of the code under a nonfree license is essential, and paying money for a commercial solution is possible. Also, the processing code needs to call some Java libraries. So, do you know of anything that suits my needs?
0
38,342
09/01/2008 19:56:32
1,456
08/15/2008 17:03:51
32
3
Measuring/benchmarking hard drive performance
We know that disk speed is an [important performance component](http://stackoverflow.com/questions/19019/ideal-computer-for-software-development) of a [development machine](http://stackoverflow.com/questions/9157/what-is-the-best-laptop-for-programmers). I'd like to understand how the multiple drives in my Windows Vista machine compare. Vista will give me a performance index for the system but what's a good (preferably free) benchmarking tool for measuring each drive's performance?
productivity
hardware
harddrive
hdd
null
null
open
Measuring/benchmarking hard drive performance === We know that disk speed is an [important performance component](http://stackoverflow.com/questions/19019/ideal-computer-for-software-development) of a [development machine](http://stackoverflow.com/questions/9157/what-is-the-best-laptop-for-programmers). I'd like to understand how the multiple drives in my Windows Vista machine compare. Vista will give me a performance index for the system but what's a good (preferably free) benchmarking tool for measuring each drive's performance?
0
38,345
09/01/2008 19:59:37
2,905
08/25/2008 21:26:52
11
2
Elegant zip in Perl 5?
I recently "needed" a zip function in Perl 5 (while I was [considering a question on this site][1]), i.e. a function that takes two lists and "zips" them together to one list, interleaving the elements. (Pseudo)example: @a=(1, 2, 3), @b=('apple', 'orange', 'grape'), zip @a, @b -> (1, 'apple', 2, 'orange', 3, 'grape'). [Haskell has zip in the Prelude][2] and [Perl 6 has a zip operator][3] built in, but how do you do it in an elegant way in Perl 5? [1]: http://stackoverflow.com/questions/11/how-do-i-calculate-relative-time [2]: http://www.haskell.org/onlinereport/standard-prelude.html [3]: http://ferreira.nfshost.com/perl6/zip.html
perl
haskell
zip
perl6
perl5
null
open
Elegant zip in Perl 5? === I recently "needed" a zip function in Perl 5 (while I was [considering a question on this site][1]), i.e. a function that takes two lists and "zips" them together to one list, interleaving the elements. (Pseudo)example: @a=(1, 2, 3), @b=('apple', 'orange', 'grape'), zip @a, @b -> (1, 'apple', 2, 'orange', 3, 'grape'). [Haskell has zip in the Prelude][2] and [Perl 6 has a zip operator][3] built in, but how do you do it in an elegant way in Perl 5? [1]: http://stackoverflow.com/questions/11/how-do-i-calculate-relative-time [2]: http://www.haskell.org/onlinereport/standard-prelude.html [3]: http://ferreira.nfshost.com/perl6/zip.html
0
38,348
09/01/2008 20:01:06
4,097
09/01/2008 18:49:14
1
0
Finding all messages with a given PR_SEARCH_KEY
I need to query an Exchange server to find all messages having a certain value in PR_SEARCH_KEY. Do I have to open every mailbox and iterate through it or is there a faster solution.
exchange
mapi
email
performance
null
null
open
Finding all messages with a given PR_SEARCH_KEY === I need to query an Exchange server to find all messages having a certain value in PR_SEARCH_KEY. Do I have to open every mailbox and iterate through it or is there a faster solution.
0
38,352
09/01/2008 20:02:15
521
08/06/2008 14:16:34
643
34
Address book DB schema
I need to store contact information for users. I want to present this data on the page as an [hCard][1] and downloadable as a [vCard][2]. I'd also like to be able to search the database by phone number, email, etc. What do you think is the best way to store this data? Since users could have multiple addresses, etc complete normalization would be a mess. I'm thinking about using XML, but I'm not familiar with querying XML db fields. Would I still be able to search for users by contact info? I'm using SQL Server 2005, if that matters. [1]: http://en.wikipedia.org/wiki/Hcard [2]: http://en.wikipedia.org/wiki/VCard
schema
normalizing
microformats
hcard
vcard
null
open
Address book DB schema === I need to store contact information for users. I want to present this data on the page as an [hCard][1] and downloadable as a [vCard][2]. I'd also like to be able to search the database by phone number, email, etc. What do you think is the best way to store this data? Since users could have multiple addresses, etc complete normalization would be a mess. I'm thinking about using XML, but I'm not familiar with querying XML db fields. Would I still be able to search for users by contact info? I'm using SQL Server 2005, if that matters. [1]: http://en.wikipedia.org/wiki/Hcard [2]: http://en.wikipedia.org/wiki/VCard
0
38,357
09/01/2008 20:04:49
1,175
08/13/2008 10:21:54
977
93
Error Code Reference for OSX/Cocoa
If I get an error code result from a Cocoa function, is there any easy way to figure out what it means (other than by grepping through all the .h files in the framework bundles)?
cocoa
osx
xcode
null
null
null
open
Error Code Reference for OSX/Cocoa === If I get an error code result from a Cocoa function, is there any easy way to figure out what it means (other than by grepping through all the .h files in the framework bundles)?
0
38,360
09/01/2008 20:07:42
905
08/10/2008 09:37:14
3,048
200
Can you recommend an alternative for NCover?
I'm looking for a good .Net code coverage alternative to NCover (insufficient .Net 3.5 coverage and now pay-for) or VSTS (way too expensive). We currently test with NUnit, but could switch to something with a similar 'layout' for its text fixtures if it were better integrated.
.net
code-coverage
null
null
null
06/11/2012 08:31:39
not constructive
Can you recommend an alternative for NCover? === I'm looking for a good .Net code coverage alternative to NCover (insufficient .Net 3.5 coverage and now pay-for) or VSTS (way too expensive). We currently test with NUnit, but could switch to something with a similar 'layout' for its text fixtures if it were better integrated.
4
38,362
09/01/2008 20:12:08
2,461
08/22/2008 12:19:10
66
1
Best version control system for managing home directories
I have 3 Linux machines, and want some way to keep the dotfiles in their home directories in sync. Some files, like .vimrc, are the same across all 3 machines, and some are unique to each machine. I've used SVN before, but all the buzz about DVCSs makes me think I should try one - is there a particular one that would work best with this? Or should I stick with SVN?
linux
version-control
null
null
null
null
open
Best version control system for managing home directories === I have 3 Linux machines, and want some way to keep the dotfiles in their home directories in sync. Some files, like .vimrc, are the same across all 3 machines, and some are unique to each machine. I've used SVN before, but all the buzz about DVCSs makes me think I should try one - is there a particular one that would work best with this? Or should I stick with SVN?
0
38,370
09/01/2008 20:17:28
1,578
08/16/2008 20:25:25
199
9
PHP : session variable aren't usable when site is redirected
I've to admin a small website for my alumni group which is hosted by my ISV. The url is something like www.myIsv.com/myWebSite/ which is quite ugly and very forgetable. The main admin of the webserver has registered a domain name www.mysmallwebsite.com and put a index.html with this content: <html> <head> <title>www.mysmallwebsite.com</title> </head> <frameset> <frame src="http://www.myIsv.com/myWebSite/" name="redir"> <noframes> <p>Original location: <a href="www.myIsv.com/myWebSite/">http://www.myIsv.com/myWebSite/</a> </p> </noframes> </frameset> </html> It works fine, but some features like PHP Session variables doesn't work anymore! Anyone has a suggestion for correcting that? Thanks
php
null
null
null
null
null
open
PHP : session variable aren't usable when site is redirected === I've to admin a small website for my alumni group which is hosted by my ISV. The url is something like www.myIsv.com/myWebSite/ which is quite ugly and very forgetable. The main admin of the webserver has registered a domain name www.mysmallwebsite.com and put a index.html with this content: <html> <head> <title>www.mysmallwebsite.com</title> </head> <frameset> <frame src="http://www.myIsv.com/myWebSite/" name="redir"> <noframes> <p>Original location: <a href="www.myIsv.com/myWebSite/">http://www.myIsv.com/myWebSite/</a> </p> </noframes> </frameset> </html> It works fine, but some features like PHP Session variables doesn't work anymore! Anyone has a suggestion for correcting that? Thanks
0
38,378
09/01/2008 20:21:50
398
08/05/2008 12:58:30
282
15
Clone a control in silverlight
What's the best way to clone a control in Silverlight (including it's children)?
silverlight
null
null
null
null
null
open
Clone a control in silverlight === What's the best way to clone a control in Silverlight (including it's children)?
0
38,408
09/01/2008 20:44:37
4,112
09/01/2008 20:44:37
1
0
How can I make flash cs3, actionscript send events to javascript?
I'm using Flash to play an .flv movieclip on my site, but I want to have the .swf send trigger an event in my javascript when it start loading, starts playing and ends playing. What is the best way to do that in Flash CS3 using Actionscript 3.0 ?
javascript
flash
actionscript
null
null
null
open
How can I make flash cs3, actionscript send events to javascript? === I'm using Flash to play an .flv movieclip on my site, but I want to have the .swf send trigger an event in my javascript when it start loading, starts playing and ends playing. What is the best way to do that in Flash CS3 using Actionscript 3.0 ?
0
38,409
09/01/2008 20:44:47
4,082
09/01/2008 17:33:08
8
0
Convert an ruby string with brackets to an array
I would like to convert the following string into an array/nested array: str = "[[this, is],[a, nested],[array]]" newarray = # this is what I need help with! newarray.inspect # => [['this','is'],['a','nested'],['array']]
ruby
arrays
null
null
null
null
open
Convert an ruby string with brackets to an array === I would like to convert the following string into an array/nested array: str = "[[this, is],[a, nested],[array]]" newarray = # this is what I need help with! newarray.inspect # => [['this','is'],['a','nested'],['array']]
0
38,421
09/01/2008 20:57:12
2,362
08/21/2008 20:46:43
46
10
Security advice for jquery ajax data post?
I'm using jquery ajax to post updates back to my server. I'm concerned about making sure I have put in place appropriate measures so that only my AJAX calls can post data. My stack is PHP on Apache against a MySQL backend. Advice greatly appreciated!
security
jquery
ajax
post
null
null
open
Security advice for jquery ajax data post? === I'm using jquery ajax to post updates back to my server. I'm concerned about making sure I have put in place appropriate measures so that only my AJAX calls can post data. My stack is PHP on Apache against a MySQL backend. Advice greatly appreciated!
0
38,427
09/01/2008 21:00:01
2,638
08/23/2008 20:10:14
581
32
Tips for working in a large library?
I'm currently working on a quite large library (5M lines of code, in C++ under VS2005, 1 solution and close to 100 projects). Even though we distribute compilation, and use incremental linking, recompilation and relinking after small source modifications takes between a few minutes (usually at least 3) and close to one hour. This means that our modify code/build/debug cycles tend to be really long (to my taste!), and it's quite easy to lose the 'flow' during a build: there's typically not much time to do anything useful (maybe do a bit of email, otherwise read some article online or a few pages of a book). When writing new code or doing major refactoring, I try to compile one file at a time only. However, during debugging for example, it really gets on my nerves! I'm wondering how I could optimize my time? I guess I'm not the only one in that situation: what do/would *you* do?
time-management
organizing
null
null
null
null
open
Tips for working in a large library? === I'm currently working on a quite large library (5M lines of code, in C++ under VS2005, 1 solution and close to 100 projects). Even though we distribute compilation, and use incremental linking, recompilation and relinking after small source modifications takes between a few minutes (usually at least 3) and close to one hour. This means that our modify code/build/debug cycles tend to be really long (to my taste!), and it's quite easy to lose the 'flow' during a build: there's typically not much time to do anything useful (maybe do a bit of email, otherwise read some article online or a few pages of a book). When writing new code or doing major refactoring, I try to compile one file at a time only. However, during debugging for example, it really gets on my nerves! I'm wondering how I could optimize my time? I guess I'm not the only one in that situation: what do/would *you* do?
0
38,428
09/01/2008 21:00:05
3,191
08/27/2008 12:32:21
171
7
Positioning controls in the middle of a CheckBox
THis is a followup to my previous question "<a href="http://stackoverflow.com/questions/37306/font-dependent-control-positioning">Font-dependent control positioning.</a>" It's an attempt to solve the *real* problem behind that question, perhaps in ways different than the one I was asking about. **Example of the problem statement:** I want a checkbox that says "Adjust prices by *&lt;X&gt;* *&lt;Y&gt;* after loading," where *&lt;X&gt;* is a number---adjustable with a `NumericUpDown`---and *&lt;Y&gt;* is either "percent" or "dollars," with the choices being made by a `ComboBox`. This will be on a single line. **The complication:** I want to be able to change my fonts for all these controls (basically setting them to `System.Drawing.Fonts.MessageBoxFont`, which is Tahoma 8 pt on Windows XP/etc. and Segoe UI 9 pt on Vista), without messing up my layout, which with my current `Position`-property--setting paradigm does not work. More generally, I'd like the controls to be dynamically laid out in a font-independent way, so that the *&lt;X&gt;* `NumericUpDown` fits snugly into the space between "by " and the *&lt;Y&gt;* `ComboBox`, and similarly the *&lt;X&gt;* `ComboBox` fits in with respect to the *&lt;X&gt;* `CheckBox` and the string " after loading" to its right. **The part everyone seems to miss:** This is all nested within a `CheckBox`. So, ideally, clicking on the words "after loading" should check/uncheck the checkbox, and draw that little highlight rectangle around "Adjust prices by&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;after loading." So just slapping an extra `Label` on the end doesn't work, because then it doesn't toggle the `CheckBox`; similarly, trying to band-aid things by hooking up such a `Label`'s `Click` event won't produce the desired highlight-rectangle. **Solutions?** At this point I'm thinking either: 1. Rethink the problem, somehow, maybe with an ugly solution like two separate lines of text: "Adjust found prices after loading" (`CheckBox`), "Adjustment amount:" (`NumericUpDown` and `ComboBox`). This is really bad because my options box is absolutely full of options of this type (i.e. the type in the example), so it would at least double in vertical size. 2. Some sort of custom control? `SplittableCheckBox`? 3. Some kind of magic with a `TableLayout` control? (Pretty sure this fails at "the part everyone seems to miss.) 4. Give up and either go back to MS Sans Serif, or use Tahoma uniformly, or package Segoe UI with my application, thus disrespecting the system default fonts.
fonts
winforms
layout
null
null
null
open
Positioning controls in the middle of a CheckBox === THis is a followup to my previous question "<a href="http://stackoverflow.com/questions/37306/font-dependent-control-positioning">Font-dependent control positioning.</a>" It's an attempt to solve the *real* problem behind that question, perhaps in ways different than the one I was asking about. **Example of the problem statement:** I want a checkbox that says "Adjust prices by *&lt;X&gt;* *&lt;Y&gt;* after loading," where *&lt;X&gt;* is a number---adjustable with a `NumericUpDown`---and *&lt;Y&gt;* is either "percent" or "dollars," with the choices being made by a `ComboBox`. This will be on a single line. **The complication:** I want to be able to change my fonts for all these controls (basically setting them to `System.Drawing.Fonts.MessageBoxFont`, which is Tahoma 8 pt on Windows XP/etc. and Segoe UI 9 pt on Vista), without messing up my layout, which with my current `Position`-property--setting paradigm does not work. More generally, I'd like the controls to be dynamically laid out in a font-independent way, so that the *&lt;X&gt;* `NumericUpDown` fits snugly into the space between "by " and the *&lt;Y&gt;* `ComboBox`, and similarly the *&lt;X&gt;* `ComboBox` fits in with respect to the *&lt;X&gt;* `CheckBox` and the string " after loading" to its right. **The part everyone seems to miss:** This is all nested within a `CheckBox`. So, ideally, clicking on the words "after loading" should check/uncheck the checkbox, and draw that little highlight rectangle around "Adjust prices by&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;after loading." So just slapping an extra `Label` on the end doesn't work, because then it doesn't toggle the `CheckBox`; similarly, trying to band-aid things by hooking up such a `Label`'s `Click` event won't produce the desired highlight-rectangle. **Solutions?** At this point I'm thinking either: 1. Rethink the problem, somehow, maybe with an ugly solution like two separate lines of text: "Adjust found prices after loading" (`CheckBox`), "Adjustment amount:" (`NumericUpDown` and `ComboBox`). This is really bad because my options box is absolutely full of options of this type (i.e. the type in the example), so it would at least double in vertical size. 2. Some sort of custom control? `SplittableCheckBox`? 3. Some kind of magic with a `TableLayout` control? (Pretty sure this fails at "the part everyone seems to miss.) 4. Give up and either go back to MS Sans Serif, or use Tahoma uniformly, or package Segoe UI with my application, thus disrespecting the system default fonts.
0
38,431
09/01/2008 21:01:44
230
08/03/2008 19:32:46
450
31
MVC .net - How actions names effect url
Using MVC out of the box I found the generated URLs can be misleading and I wanted to know if this can be fixed or if my approach\understanding is wrong. Suppose I have a CreateEgg page, which has a form on it, and once the form is filled in and submitted the user is taken to a ListEggs page with the new egg in it. So my egg controller will look some thing like this: public class EggController :Controller { public void Add() { //do stuff RenderView("CreateEgg", viewData); } public void Create() { //do stuff RenderView("ListEggs", viewData); } } So my first page will have a url of something like http://localhost/egg/add and the form on the page will have an action of: using (Html.Form<EggController>(c => c.Create()) Meaning the second page will have a url of http://localhost/Egg/Create, to me this is misleading, the action should be called Create, because im creating the egg, but a list view is being displayed so the url of http://localhost/Egg/List would make more scene. How do i achieve this without making my view or action names misleading?
asp.net-mvc
null
null
null
null
null
open
MVC .net - How actions names effect url === Using MVC out of the box I found the generated URLs can be misleading and I wanted to know if this can be fixed or if my approach\understanding is wrong. Suppose I have a CreateEgg page, which has a form on it, and once the form is filled in and submitted the user is taken to a ListEggs page with the new egg in it. So my egg controller will look some thing like this: public class EggController :Controller { public void Add() { //do stuff RenderView("CreateEgg", viewData); } public void Create() { //do stuff RenderView("ListEggs", viewData); } } So my first page will have a url of something like http://localhost/egg/add and the form on the page will have an action of: using (Html.Form<EggController>(c => c.Create()) Meaning the second page will have a url of http://localhost/Egg/Create, to me this is misleading, the action should be called Create, because im creating the egg, but a list view is being displayed so the url of http://localhost/Egg/List would make more scene. How do i achieve this without making my view or action names misleading?
0
38,435
09/01/2008 21:06:07
2,193
08/20/2008 20:45:32
1
0
Retrieving an Oracle timestamp using Python's Win32 ODBC module
Given an Oracle table created using the following: CREATE TABLE Log(WhenAdded TIMESTAMP(6) WITH TIME ZONE); Using the Python ODBC module from its Win32 extensions (from the win32all package), I tried the following: import dbi, odbc connection = odbc.odbc("Driver=Oracle in OraHome92;Dbq=SERVER;Uid=USER;Pwd=PASSWD") cursor = connection.cursor() cursor.execute("SELECT WhenAdded FROM Log") results = cursor.fetchall() When I run this, I get the following: Traceback (most recent call last): ... results = cursor.fetchall() dbi.operation-error: [Oracle][ODBC][Ora]ORA-00932: inconsistent datatypes: expected %s got %s in FETCH The other data types I've tried (VARCHAR2, BLOB) do not cause this problem. Is there a way of retrieving timestamps?
python
oracle
null
null
null
null
open
Retrieving an Oracle timestamp using Python's Win32 ODBC module === Given an Oracle table created using the following: CREATE TABLE Log(WhenAdded TIMESTAMP(6) WITH TIME ZONE); Using the Python ODBC module from its Win32 extensions (from the win32all package), I tried the following: import dbi, odbc connection = odbc.odbc("Driver=Oracle in OraHome92;Dbq=SERVER;Uid=USER;Pwd=PASSWD") cursor = connection.cursor() cursor.execute("SELECT WhenAdded FROM Log") results = cursor.fetchall() When I run this, I get the following: Traceback (most recent call last): ... results = cursor.fetchall() dbi.operation-error: [Oracle][ODBC][Ora]ORA-00932: inconsistent datatypes: expected %s got %s in FETCH The other data types I've tried (VARCHAR2, BLOB) do not cause this problem. Is there a way of retrieving timestamps?
0
38,437
09/01/2008 21:10:14
3,711
08/30/2008 08:33:38
1
0
howto track data changes in a database table
What is the best way to track changes in a database table? Imagine you got an application in which users (in the context of the application not DB users ) are able to change data which are store in some database table. What's the best way to track a history of all changes, so that you can show which user at what time change which data how?
database
null
null
null
null
null
open
howto track data changes in a database table === What is the best way to track changes in a database table? Imagine you got an application in which users (in the context of the application not DB users ) are able to change data which are store in some database table. What's the best way to track a history of all changes, so that you can show which user at what time change which data how?
0
38,447
09/01/2008 21:17:07
4,059
09/01/2008 15:44:26
1
1
Asynchronous Mysql connector for C++ or C
Does there exist any asynchronous connectors to Mysql that can be used in C or C++? I'm looking for something that can be plugged into a [reactor pattern][1] written in [Boost.Asio][2]. [1]: http://en.wikipedia.org/wiki/Reactor_pattern "reactor pattern" [2]: http://www.boost.org/doc/libs/release/libs/asio/index.html "Boost.Asio"
c++
mysql
asynchronous
asio
boost
null
open
Asynchronous Mysql connector for C++ or C === Does there exist any asynchronous connectors to Mysql that can be used in C or C++? I'm looking for something that can be plugged into a [reactor pattern][1] written in [Boost.Asio][2]. [1]: http://en.wikipedia.org/wiki/Reactor_pattern "reactor pattern" [2]: http://www.boost.org/doc/libs/release/libs/asio/index.html "Boost.Asio"
0
38,463
09/01/2008 21:28:11
3,305
08/27/2008 18:56:35
174
15
Is SOAP now a legacy technology?
Are people still writing [SOAP services][1] or is it a technology that has passed its [architectural shelf life][2]? Are people returning to binary formats? [1]: http://zeroc.com/blogs/michi/ [2]: http://www.addsimplicity.com/
soap
rpc
null
null
null
null
open
Is SOAP now a legacy technology? === Are people still writing [SOAP services][1] or is it a technology that has passed its [architectural shelf life][2]? Are people returning to binary formats? [1]: http://zeroc.com/blogs/michi/ [2]: http://www.addsimplicity.com/
0
38,493
09/01/2008 21:52:42
4,121
09/01/2008 21:29:49
1
0
Are there any good C++ Mock object frameworks?
Does anyone have any experience with Mock Object frameworks in C++? I haven't been able to find much. It appears Google will be open sourcing theirs soon, so I guess it may be best to wait for that, but still interested to hear of others.
c++
unit-testing
testing
mocks
null
null
open
Are there any good C++ Mock object frameworks? === Does anyone have any experience with Mock Object frameworks in C++? I haven't been able to find much. It appears Google will be open sourcing theirs soon, so I guess it may be best to wait for that, but still interested to hear of others.
0
38,499
09/01/2008 21:55:05
3,692
08/29/2008 23:07:07
19
3
Good book for learning the C++ standard template library?
I'm looking for a good tutorial book on the C++ Standard Template Library. I don't want a reference, there are plenty of them online, but rather a book that will lead me through using the various parts of the STL and give some insight into why it is the way it is. Does anybody know of such a book?
c++
books
null
null
null
10/27/2011 13:29:43
not constructive
Good book for learning the C++ standard template library? === I'm looking for a good tutorial book on the C++ Standard Template Library. I don't want a reference, there are plenty of them online, but rather a book that will lead me through using the various parts of the STL and give some insight into why it is the way it is. Does anybody know of such a book?
4
38,501
09/01/2008 21:57:16
3,146
08/27/2008 00:25:15
110
12
Thread pool for executing arbitrary tasks with different priorities
I'm trying to come up with a design for a thread pool with a lot of design requirements for my job. This is a real problem for working software, and it's a difficult task. I have a working implementation but I'd like to throw this out to SO and see what interesting ideas people can come up with, so that I can compare to my implementation and see how it stacks up. I've tried to be as specific to the requirements as I can. The thread pool needs to execute a series of tasks. The tasks can be short running (<1sec) or long running (hours or days). Each task has an associated priority (from 1 = very low to 5 = very high). Tasks can arrive at any time while the other tasks are running, so as they arrive the thread pool needs to pick these up and schedule them as threads become available. The task priority is completely independant of the task length. In fact it is impossible to tell how long a task could take to run without just running it. Some tasks are CPU bound while some are greatly IO bound. It is impossible to tell beforehand what a given task would be (although I guess it might be possible to detect while the tasks are running). The primary goal of the thread pool is to maximise throughput. The thread pool should effectively use the resources of the computer. Ideally, for CPU bound tasks, the number of active threads would be equal to the number of CPUs. For IO bound tasks, more threads should be allocated than there are CPUs so that blocking does not overly affect throughput. Minimising the use of locks and using thread safe/fast containers is important. In general, you should run higher priority tasks with a higher CPU priority (ref: SetThreadPriority). Lower priority tasks should not "block" higher priority tasks from running, so if a higher priority task comes along while all low priority tasks are running, the higher priority task will get to run. It needs to run on Windows XP, Server 2003, Vista and Server 2008 (latest service packs). For refernce, we might use the following interface: namespace ThreadPool { class Task { public: Task(); void run(); }; class ThreadPool { public: ThreadPool(); ~ThreadPool(); void run(Task *inst); void stop(); }; }
c++
multithreading
windows
null
null
null
open
Thread pool for executing arbitrary tasks with different priorities === I'm trying to come up with a design for a thread pool with a lot of design requirements for my job. This is a real problem for working software, and it's a difficult task. I have a working implementation but I'd like to throw this out to SO and see what interesting ideas people can come up with, so that I can compare to my implementation and see how it stacks up. I've tried to be as specific to the requirements as I can. The thread pool needs to execute a series of tasks. The tasks can be short running (<1sec) or long running (hours or days). Each task has an associated priority (from 1 = very low to 5 = very high). Tasks can arrive at any time while the other tasks are running, so as they arrive the thread pool needs to pick these up and schedule them as threads become available. The task priority is completely independant of the task length. In fact it is impossible to tell how long a task could take to run without just running it. Some tasks are CPU bound while some are greatly IO bound. It is impossible to tell beforehand what a given task would be (although I guess it might be possible to detect while the tasks are running). The primary goal of the thread pool is to maximise throughput. The thread pool should effectively use the resources of the computer. Ideally, for CPU bound tasks, the number of active threads would be equal to the number of CPUs. For IO bound tasks, more threads should be allocated than there are CPUs so that blocking does not overly affect throughput. Minimising the use of locks and using thread safe/fast containers is important. In general, you should run higher priority tasks with a higher CPU priority (ref: SetThreadPriority). Lower priority tasks should not "block" higher priority tasks from running, so if a higher priority task comes along while all low priority tasks are running, the higher priority task will get to run. It needs to run on Windows XP, Server 2003, Vista and Server 2008 (latest service packs). For refernce, we might use the following interface: namespace ThreadPool { class Task { public: Task(); void run(); }; class ThreadPool { public: ThreadPool(); ~ThreadPool(); void run(Task *inst); void stop(); }; }
0
38,502
09/01/2008 21:57:45
4,123
09/01/2008 21:51:10
1
0
What's a good algorithm to generate a maze?
Say you want a simple maze on an N by M grid, with one path through, and a good number of dead ends, but that looks "right" (i.e. like someone made it by hand without too many little tiny dead ends and all that). Is there a known way to do this?
algorithm
maze
null
null
null
null
open
What's a good algorithm to generate a maze? === Say you want a simple maze on an N by M grid, with one path through, and a good number of dead ends, but that looks "right" (i.e. like someone made it by hand without too many little tiny dead ends and all that). Is there a known way to do this?
0
38,508
09/01/2008 22:01:02
3,880
08/31/2008 15:48:19
33
1
What's the best way return multiple values from a function in Python?
I have a function where I need to do something to a string. I need the function to return a boolean indicating whether or not the operation suceeded, and I also need to return the modified string. In C#, I would use an out parameter for the string, but there is no equivalent in Python. I'm still very new to Python and the only thing I can think of is to return a tuple with the boolean and modified string.
python
null
null
null
null
null
open
What's the best way return multiple values from a function in Python? === I have a function where I need to do something to a string. I need the function to return a boolean indicating whether or not the operation suceeded, and I also need to return the modified string. In C#, I would use an out parameter for the string, but there is no equivalent in Python. I'm still very new to Python and the only thing I can think of is to return a tuple with the boolean and modified string.
0
38,510
09/01/2008 22:01:25
1,344
08/14/2008 16:03:00
1,468
108
C# WinForms - DataGridView/SQL Compact - Negative integer in primary key column
I'm just getting dirty in WinForms, and I've discovered, through a lovely tutorial, the magic of dragging a database table onto the design view of my main form. So, all is lovely, I've got my DataGridView with all of the columns represented beautifully. BUT... When I run my application against this brand new, empty .sdf (empty save for the two tables I've created, which are themselves empty), I get a -1 in the column corresponding to my primary key/identity column whenever I try to create that first record. Any idea why this might be happening? If it helps, the column is an `int`.
c#
winforms
data-binding
sql-server
sql-server-ce
null
open
C# WinForms - DataGridView/SQL Compact - Negative integer in primary key column === I'm just getting dirty in WinForms, and I've discovered, through a lovely tutorial, the magic of dragging a database table onto the design view of my main form. So, all is lovely, I've got my DataGridView with all of the columns represented beautifully. BUT... When I run my application against this brand new, empty .sdf (empty save for the two tables I've created, which are themselves empty), I get a -1 in the column corresponding to my primary key/identity column whenever I try to create that first record. Any idea why this might be happening? If it helps, the column is an `int`.
0
38,548
09/01/2008 22:34:15
2,701
08/24/2008 15:51:24
219
18
Distributed caching with .NET 2.0+ ?
What is the best approach to implement distributed caching with .NET?
caching
asp.net
null
null
null
null
open
Distributed caching with .NET 2.0+ ? === What is the best approach to implement distributed caching with .NET?
0
38,549
09/01/2008 22:36:06
3,836
08/31/2008 08:07:03
234
14
SQL: difference between inner and outer join
What is the difference between INNER JOIN and OUTER JOIN?
sql
null
null
null
null
null
open
SQL: difference between inner and outer join === What is the difference between INNER JOIN and OUTER JOIN?
0
38,561
09/01/2008 22:45:25
572
08/06/2008 20:56:54
2,351
192
What is the argument for printf that formats a long?
The <code>printf</code> function takes an argument type, such as %d or %i for a signed int. However, I don't see anything for a long value.
c
null
null
null
null
null
open
What is the argument for printf that formats a long? === The <code>printf</code> function takes an argument type, such as %d or %i for a signed int. However, I don't see anything for a long value.
0
38,571
09/01/2008 22:50:52
56,456
09/01/2008 22:50:52
1
0
Common lisp idiom - is there a better way?
I find myself doing this sort of thing all the time. I've been considering writing a macro/function to make this sort of thing easier, but it occurs to me that I'm probably reinventing the wheel. Is there an existing function that will let me accomplish this same sort of thing more succinctly? (defun remove-low-words (word-list) "Return a list with words of insufficient score removed." (let ((result nil)) (dolist (word word-list) (when (good-enough-score-p word) (push word result))) result))
lisp
null
null
null
null
null
open
Common lisp idiom - is there a better way? === I find myself doing this sort of thing all the time. I've been considering writing a macro/function to make this sort of thing easier, but it occurs to me that I'm probably reinventing the wheel. Is there an existing function that will let me accomplish this same sort of thing more succinctly? (defun remove-low-words (word-list) "Return a list with words of insufficient score removed." (let ((result nil)) (dolist (word word-list) (when (good-enough-score-p word) (push word result))) result))
0
38,572
09/01/2008 22:51:45
3,747
08/30/2008 14:33:59
91
16
Is .NET 3.5 SP1 Required on the server to use Dynamic Data?
Is .NET 3.5 SP1 Required on the server to use Dynamic Data? It looks like it generates a lot of code and therefore wouldn't require anything special on the server side. I ask because I would like to use it but the shared hosting provider my client is using only have 3.5 installed and not 3.5 SP1.
asp.net
deployment
dynamicdata
null
null
null
open
Is .NET 3.5 SP1 Required on the server to use Dynamic Data? === Is .NET 3.5 SP1 Required on the server to use Dynamic Data? It looks like it generates a lot of code and therefore wouldn't require anything special on the server side. I ask because I would like to use it but the shared hosting provider my client is using only have 3.5 installed and not 3.5 SP1.
0
38,589
09/01/2008 23:11:32
3,747
08/30/2008 14:33:59
93
16
Did Installing OneCare cause a "Generating user instances in SQL Server is disabled" error?
Did Installing OneCare cause a "Generating user instances in SQL Server is disabled" error? The only change that I've made to my computer is uninstalling AVG and installing the trial for Microsoft OneCare. Did OneCare change the SQLServer installation somehow? This is a very "odd" question but is something I would post on EE in hopes of someone having had the same issue and giving their solution.
sql-server
null
null
null
null
null
open
Did Installing OneCare cause a "Generating user instances in SQL Server is disabled" error? === Did Installing OneCare cause a "Generating user instances in SQL Server is disabled" error? The only change that I've made to my computer is uninstalling AVG and installing the trial for Microsoft OneCare. Did OneCare change the SQLServer installation somehow? This is a very "odd" question but is something I would post on EE in hopes of someone having had the same issue and giving their solution.
0
38,592
09/01/2008 23:19:03
823
08/09/2008 05:00:46
90
4
How do I make persistent ruby sockets?
I'd like to be able to write a ruby program that can restart without dropping it's socket connections.
ruby
sockets
persistent
null
null
null
open
How do I make persistent ruby sockets? === I'd like to be able to write a ruby program that can restart without dropping it's socket connections.
0
38,596
09/01/2008 23:20:59
4,133
09/01/2008 23:20:58
1
0
What's the best way to keep a PHP script running as a daemon?
What is the best way to keep a PHP script running as a daemon, and what's the best way to check if needs restarting. I have some scripts that need to run 24/7 and for the most part I can run them using nohup. But if they go down, what's the best way to monitor it so it can be automatically restarted?
php
daemon
null
null
null
null
open
What's the best way to keep a PHP script running as a daemon? === What is the best way to keep a PHP script running as a daemon, and what's the best way to check if needs restarting. I have some scripts that need to run 24/7 and for the most part I can run them using nohup. But if they go down, what's the best way to monitor it so it can be automatically restarted?
0
38,598
09/01/2008 23:21:33
3,656
08/29/2008 17:53:13
21
3
How do you unit test business applications?
How are people unit testing their business applications? I've seen a lot of examples of unit testing with "simple to test" examples. Ex. a calculator. How are people unit testing data-heavy applications? How are you putting together your sample data? In many cases, data for one test may not work at all for another test which makes it hard to just have one test database? Any thoughts, ideas, suggestions, or tips are appreciated.
unit-testing
null
null
null
null
null
open
How do you unit test business applications? === How are people unit testing their business applications? I've seen a lot of examples of unit testing with "simple to test" examples. Ex. a calculator. How are people unit testing data-heavy applications? How are you putting together your sample data? In many cases, data for one test may not work at all for another test which makes it hard to just have one test database? Any thoughts, ideas, suggestions, or tips are appreciated.
0
38,601
09/01/2008 23:22:55
2,592
08/23/2008 12:32:00
8
2
Using Django time/date widgets in custom form
How can i use the nifty js date and time widgets that the default admin uses with my custom view? I have looked through http://www.djangoproject.com/documentation/forms/ , and it brefly mentions django.contrib.admin.widgets, but i don't know how to use it? Here is my template that i want it applied on. <form action="." method="POST"> <table> {% for f in form %} <tr> <td> {{ f.name }}</td> <td>{{ f }}</td> </tr> {% endfor %} </table> <input type="submit" name="submit" value="Add Product"> </form> Also, i think it should be noted that i havnt really written a view up myself for this form, i am using a generic view. Here is the entry from the url.py (r'^admin/products/add/$', create_object, {'model': Product, 'post_save_redirect': ''}), And i am relevantly new to the whole Django/MVC/MTV thing, so please go easy...
django
null
null
null
null
null
open
Using Django time/date widgets in custom form === How can i use the nifty js date and time widgets that the default admin uses with my custom view? I have looked through http://www.djangoproject.com/documentation/forms/ , and it brefly mentions django.contrib.admin.widgets, but i don't know how to use it? Here is my template that i want it applied on. <form action="." method="POST"> <table> {% for f in form %} <tr> <td> {{ f.name }}</td> <td>{{ f }}</td> </tr> {% endfor %} </table> <input type="submit" name="submit" value="Add Product"> </form> Also, i think it should be noted that i havnt really written a view up myself for this form, i am using a generic view. Here is the entry from the url.py (r'^admin/products/add/$', create_object, {'model': Product, 'post_save_redirect': ''}), And i am relevantly new to the whole Django/MVC/MTV thing, so please go easy...
0
38,602
09/01/2008 23:23:26
4,096
09/01/2008 18:43:59
1
1
Best way to display/format SQL 2005 money data type in ASP.Net
I am attempting to set an asp.net textbox to a SQL 2005 money data type field, the initial result displayed to the user is 40.0000 instead of 40.00. In my asp.net textbox control I would like to only display the first 2 numbers after the decimal point e.g. 40.00 What would be the best way to do this? My code is below: this.txtPayment.Text = dr["Payment"].ToString();
asp.net
null
null
null
null
null
open
Best way to display/format SQL 2005 money data type in ASP.Net === I am attempting to set an asp.net textbox to a SQL 2005 money data type field, the initial result displayed to the user is 40.0000 instead of 40.00. In my asp.net textbox control I would like to only display the first 2 numbers after the decimal point e.g. 40.00 What would be the best way to do this? My code is below: this.txtPayment.Text = dr["Payment"].ToString();
0