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
29,980
08/27/2008 12:29:09
266
08/04/2008 10:02:44
834
27
How should I test a method that populates a list from a DataReader?
So I'm working on some legacy code that's heavy on the manual database operations. I'm trying to maintain some semblance of quality here, so I'm going TDD as much as possible. The code I'm working on needs to populate, let's say a `List<Foo>` from a DataReader that returns all the fields required for a functioning Foo. However, if I want to verify that the code in fact returns one list item per one database row, I'm writing test code that looks something like this: Expect.Call(reader.Read()).Return(true); Expect.Call(reader["foo_id"]).Return((long) 1); // .... Expect.Call(reader.Read()).Return(true); Expect.Call(reader["foo_id"]).Return((long) 2); // .... Expect.Call(reader.Read()).Return(false); Which is rather tedious and rather easily broken, too. How should I be approaching this issue so that the result won't be a huge mess of brittle tests? Btw I'm currently using Rhino.Mocks for this, but I can change it if the result is convincing enough. Just as long as the alternative isn't TypeMock, because their EULA was a bit too scary for my tastes last I checked.
tdd
mocking
unit-testing
csharp
null
null
open
How should I test a method that populates a list from a DataReader? === So I'm working on some legacy code that's heavy on the manual database operations. I'm trying to maintain some semblance of quality here, so I'm going TDD as much as possible. The code I'm working on needs to populate, let's say a `List<Foo>` from a DataReader that returns all the fields required for a functioning Foo. However, if I want to verify that the code in fact returns one list item per one database row, I'm writing test code that looks something like this: Expect.Call(reader.Read()).Return(true); Expect.Call(reader["foo_id"]).Return((long) 1); // .... Expect.Call(reader.Read()).Return(true); Expect.Call(reader["foo_id"]).Return((long) 2); // .... Expect.Call(reader.Read()).Return(false); Which is rather tedious and rather easily broken, too. How should I be approaching this issue so that the result won't be a huge mess of brittle tests? Btw I'm currently using Rhino.Mocks for this, but I can change it if the result is convincing enough. Just as long as the alternative isn't TypeMock, because their EULA was a bit too scary for my tastes last I checked.
0
29,988
08/27/2008 12:40:40
3,191
08/27/2008 12:32:21
1
0
How to send email from a program _without_ using a preexisting account?
I'd like my program to be able to email me error reports. How can I do this without hard-coding a username/password/SMTP server/etc. into the code? (Doing so would allow users to decompile the program and take over this email account.) I've been told you could do some stuff with telneting to port 25, but I'm very fuzzy on the details. Most of the code snippets on Google assume you have a preexisting account, which doesn't work in this situation. I am using .NET v3.5 (C# in particular), but I would imagine the ideas are similar enough in most languages. As long as you realize I'm doing this for an offline app, and don't supply me with PHP code or something, we should be fine.
.net
email
smtp
null
null
null
open
How to send email from a program _without_ using a preexisting account? === I'd like my program to be able to email me error reports. How can I do this without hard-coding a username/password/SMTP server/etc. into the code? (Doing so would allow users to decompile the program and take over this email account.) I've been told you could do some stuff with telneting to port 25, but I'm very fuzzy on the details. Most of the code snippets on Google assume you have a preexisting account, which doesn't work in this situation. I am using .NET v3.5 (C# in particular), but I would imagine the ideas are similar enough in most languages. As long as you realize I'm doing this for an offline app, and don't supply me with PHP code or something, we should be fine.
0
29,993
08/27/2008 12:46:12
142
08/02/2008 12:41:43
150
11
Video Codec startcodes
Does anybody know (or know of a resource that contains) a list of frame start codes for common video formats (MPEG-1/2/4, .wmv, .mov etc.). For example, an MPEG-1 video frame will (I think) always start with "00 00 01 00". In essence I'd like to know these so that I could write a program that can automatically find the start of frames throughout a video for a number of different video formats.
video
null
null
null
null
null
open
Video Codec startcodes === Does anybody know (or know of a resource that contains) a list of frame start codes for common video formats (MPEG-1/2/4, .wmv, .mov etc.). For example, an MPEG-1 video frame will (I think) always start with "00 00 01 00". In essence I'd like to know these so that I could write a program that can automatically find the start of frames throughout a video for a number of different video formats.
0
29,995
08/27/2008 12:46:52
1,736
08/18/2008 11:29:16
1
0
Simple programming practice (Fizz Buzz, Print Primes)
I want to practice my skills away from a keyboard (i.e. pen and paper) and I'm after simple practice questions like Fizz Buzz, Print the first N primes. What are your favourite simple programming questions?
self-improvement
null
null
null
null
null
open
Simple programming practice (Fizz Buzz, Print Primes) === I want to practice my skills away from a keyboard (i.e. pen and paper) and I'm after simple practice questions like Fizz Buzz, Print the first N primes. What are your favourite simple programming questions?
0
30,003
08/27/2008 12:51:26
2,138
08/20/2008 14:23:45
20
1
How to compare html entity with JQuery
I have the next html code <h3 id="headerid"><span onclick="expandCollapse('headerid')">&uArr;</span>Header title</h3> I would like to toggle between up arrow and down arrow each time the user clicks the span tag. function expandCollapse(id) { var arrow = $("#"+id+" span").html(); // I have tried with .text() too if(arrow == "&dArr;") { $("#"+id+" span").html("&uArr;"); } else { $("#"+id+" span").html("&dArr;"); } } My function is going always the else path. If i make a javacript:alert of *arrow* variable i am getting the html entity represented as an arrow. How can i tell jquery to interpret arrow variable as a string and not as html. Thanks in advanced.
jquery
entity
null
null
null
null
open
How to compare html entity with JQuery === I have the next html code <h3 id="headerid"><span onclick="expandCollapse('headerid')">&uArr;</span>Header title</h3> I would like to toggle between up arrow and down arrow each time the user clicks the span tag. function expandCollapse(id) { var arrow = $("#"+id+" span").html(); // I have tried with .text() too if(arrow == "&dArr;") { $("#"+id+" span").html("&uArr;"); } else { $("#"+id+" span").html("&dArr;"); } } My function is going always the else path. If i make a javacript:alert of *arrow* variable i am getting the html entity represented as an arrow. How can i tell jquery to interpret arrow variable as a string and not as html. Thanks in advanced.
0
30,004
08/27/2008 12:51:57
87,645
08/18/2008 12:12:41
1
0
Can you use LINQ tools such as SQLMetal with an access database?
I'm creating a small database application to teach myself the following concepts 1. C# programming 2. .Net 3.5 framework 3. WPF 4. LINQ ORM I want to use Microsoft Access as the database but I can't seem to find any mention of whether its possible to use the SQLMetal to generate the ORM code from a Microsoft Access database. Does anyone know if this is possible? If not, are there any small database or embedded databases I could use? I think SQL express woul be overkill for me at this point.
linq-to-sql
microsoftaccess
c#
null
null
null
open
Can you use LINQ tools such as SQLMetal with an access database? === I'm creating a small database application to teach myself the following concepts 1. C# programming 2. .Net 3.5 framework 3. WPF 4. LINQ ORM I want to use Microsoft Access as the database but I can't seem to find any mention of whether its possible to use the SQLMetal to generate the ORM code from a Microsoft Access database. Does anyone know if this is possible? If not, are there any small database or embedded databases I could use? I think SQL express woul be overkill for me at this point.
0
30,005
08/27/2008 12:52:29
3,168
08/27/2008 05:16:27
1
0
How do I fire an event when a iframe has finished loading in jQuery?
I have to load a pdf within a page (don't ask...) Ideally I would like to have a loading animated gif which is replaced once the pdf is loaded. Thanks
jquery
javascript
iframe
null
null
null
open
How do I fire an event when a iframe has finished loading in jQuery? === I have to load a pdf within a page (don't ask...) Ideally I would like to have a loading animated gif which is replaced once the pdf is loaded. Thanks
0
30,018
08/27/2008 13:01:25
1,523
08/16/2008 10:10:13
1
1
How do I select an XML-node based on it's content?
How can I use XPath to select an XML-node based on it's content? If I e.g. have the following xml and I want to select the &lt;author&gt;-node that contains Ritchie to get the author's full name: <books> <book isbn='0131103628'> <title>The C Programming Language</title> <authors> <author>Ritchie, Dennis M.</author> <author>Kernighan, Brian W.</author> </authors> </book> <book isbn='1590593898'> <title>Joel on Software</title> <authors> <author>Spolsky, Joel</author> </authors> </book> </books>
xml
xpath
null
null
null
null
open
How do I select an XML-node based on it's content? === How can I use XPath to select an XML-node based on it's content? If I e.g. have the following xml and I want to select the &lt;author&gt;-node that contains Ritchie to get the author's full name: <books> <book isbn='0131103628'> <title>The C Programming Language</title> <authors> <author>Ritchie, Dennis M.</author> <author>Kernighan, Brian W.</author> </authors> </book> <book isbn='1590593898'> <title>Joel on Software</title> <authors> <author>Spolsky, Joel</author> </authors> </book> </books>
0
30,026
08/27/2008 13:05:38
2,045
08/19/2008 23:50:05
6
0
regex formats
I've seen a lot of commonality in regex capabilities of different regex-enabled tools/languages (e.g. perl, sed, java, vim, etc), but I've also many differences. Is there a *standard* subset of regex capabilities that all regex-enabled tools/languages will support? How do regex capabilities vary between tools/languages?
regex
null
null
null
null
null
open
regex formats === I've seen a lot of commonality in regex capabilities of different regex-enabled tools/languages (e.g. perl, sed, java, vim, etc), but I've also many differences. Is there a *standard* subset of regex capabilities that all regex-enabled tools/languages will support? How do regex capabilities vary between tools/languages?
0
30,036
08/27/2008 13:09:10
184
08/03/2008 05:34:19
960
11
JavaScript and Threads
Is there some way to do multi-threading in JavaScript?
javascript
null
null
null
null
null
open
JavaScript and Threads === Is there some way to do multi-threading in JavaScript?
0
30,049
08/27/2008 13:13:34
1,200
08/13/2008 12:48:18
354
9
Should DOM splitText and normalise compose to give the identity?
I got embroiled in a discussion about DOM implementation quirks yesterday, with gave rise to an interesting question regarding Text.splitText and Element.normalise behaviours, and how they should behave. In <a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html">DOM Level 1 Core</a>, Text.splitText is defined as... >Breaks this Text node into two Text nodes at the specified offset, keeping both in the tree as siblings. This node then only contains all the content up to the offset point. And a new Text node, which is inserted as the next sibling of this node, contains all the content at and after the offset point. Normalise is... >Puts all Text nodes in the full depth of the sub-tree underneath this Element into a "normal" form where only markup (e.g., tags, comments, processing instructions, CDATA sections, and entity references) separates Text nodes, i.e., there are no adjacent Text nodes. This can be used to ensure that the DOM view of a document is the same as if it were saved and re-loaded, and is useful when operations (such as XPointer lookups) that depend on a particular document tree structure are to be used. So, if I take a text node containing "Hello World", referenced in textNode, and do textNode.splitText(3) textNode now has the content "Hello", and a new sibling containing " World" If I then textNode.parent.normalize() *what is textNode*? The specification doesn't make it clear that textNode has to still be a child of it's previous parent, just updated to contain all adjacent text nodes (which are then removed). It seems to be to be a conforment behaviour to remove all the adjacent text nodes, and then recreate a new node with the concatenation of the values, leaving textNode pointing to something that is no longer part of the tree. Or, we can update textNode in the same fashion as in splitText, so it retains it's tree position, and gets a new value. The choice of behaviour is really quite different, and I can't find a clarification on which is correct, or if this is simply an oversight in the specification (it doesn't seem to be clarified in levels 2 or 3). Can any DOM/XML gurus out there shed some light?
dom
null
null
null
null
null
open
Should DOM splitText and normalise compose to give the identity? === I got embroiled in a discussion about DOM implementation quirks yesterday, with gave rise to an interesting question regarding Text.splitText and Element.normalise behaviours, and how they should behave. In <a href="http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html">DOM Level 1 Core</a>, Text.splitText is defined as... >Breaks this Text node into two Text nodes at the specified offset, keeping both in the tree as siblings. This node then only contains all the content up to the offset point. And a new Text node, which is inserted as the next sibling of this node, contains all the content at and after the offset point. Normalise is... >Puts all Text nodes in the full depth of the sub-tree underneath this Element into a "normal" form where only markup (e.g., tags, comments, processing instructions, CDATA sections, and entity references) separates Text nodes, i.e., there are no adjacent Text nodes. This can be used to ensure that the DOM view of a document is the same as if it were saved and re-loaded, and is useful when operations (such as XPointer lookups) that depend on a particular document tree structure are to be used. So, if I take a text node containing "Hello World", referenced in textNode, and do textNode.splitText(3) textNode now has the content "Hello", and a new sibling containing " World" If I then textNode.parent.normalize() *what is textNode*? The specification doesn't make it clear that textNode has to still be a child of it's previous parent, just updated to contain all adjacent text nodes (which are then removed). It seems to be to be a conforment behaviour to remove all the adjacent text nodes, and then recreate a new node with the concatenation of the values, leaving textNode pointing to something that is no longer part of the tree. Or, we can update textNode in the same fashion as in splitText, so it retains it's tree position, and gets a new value. The choice of behaviour is really quite different, and I can't find a clarification on which is correct, or if this is simply an oversight in the specification (it doesn't seem to be clarified in levels 2 or 3). Can any DOM/XML gurus out there shed some light?
0
30,058
08/27/2008 13:15:40
2,183
08/20/2008 19:42:13
205
7
How can I launch the Google Maps iPhone application from within my own native application?
The [Apple Developer Documentation explains][1] that if you place a link in a web page and then click it whilst using Mobile Safari on the iPhone, the Google Maps application that is provided as standard with the iPhone will launch. How can I launch the same Google Maps application with a specific address from within my own native iPhone application (i.e. not a web page through Mobile Safari) in the same way that tapping an address in Contacts launches the map? [1]: http://developer.apple.com/documentation/AppleApplications/Reference/SafariWebContent/UsingiPhoneApplications/chapter_6_section_4.html
iphone
objectivec
google-maps
null
null
null
open
How can I launch the Google Maps iPhone application from within my own native application? === The [Apple Developer Documentation explains][1] that if you place a link in a web page and then click it whilst using Mobile Safari on the iPhone, the Google Maps application that is provided as standard with the iPhone will launch. How can I launch the same Google Maps application with a specific address from within my own native iPhone application (i.e. not a web page through Mobile Safari) in the same way that tapping an address in Contacts launches the map? [1]: http://developer.apple.com/documentation/AppleApplications/Reference/SafariWebContent/UsingiPhoneApplications/chapter_6_section_4.html
0
30,066
08/27/2008 13:19:17
1,044
08/11/2008 18:59:21
1
0
How to redirect all stderr in bash?
I'm looking for a way to redirect all the stderr streams in interactive bash (ideally to its calling parent process). I don't want to redirect stderr stream from each individual command, which I could do by appending `2> a_file` to each command. By default, these stderr streams are redirected to the stdout of an interactive bash. I would like to get them on the stderr of this interactive bash process in order to prevent my stdout to be polluted by error messages and be able to treat them separatly. Any ideas?
linux
bash
shell
null
null
null
open
How to redirect all stderr in bash? === I'm looking for a way to redirect all the stderr streams in interactive bash (ideally to its calling parent process). I don't want to redirect stderr stream from each individual command, which I could do by appending `2> a_file` to each command. By default, these stderr streams are redirected to the stdout of an interactive bash. I would like to get them on the stderr of this interactive bash process in order to prevent my stdout to be polluted by error messages and be able to treat them separatly. Any ideas?
0
30,067
08/27/2008 13:20:15
1,782
08/18/2008 14:30:58
988
68
Should I migrate to ASP.NET MVC?
I just listened to the StackOverflow team's 17th podcast, and they talked so highly of ASP.NET MVC that I decided to check it out. But first, I want to be sure it's worth it. I already created a base web application (for other developers to build on) for a project that's starting in a few days and wanted to know, based on your experience, if I should take the time to learn the basics of MVC and re-create the base web application with this model. Are there really big pros that'd make it worthwhile?
asp.net
mvc
null
null
null
null
open
Should I migrate to ASP.NET MVC? === I just listened to the StackOverflow team's 17th podcast, and they talked so highly of ASP.NET MVC that I decided to check it out. But first, I want to be sure it's worth it. I already created a base web application (for other developers to build on) for a project that's starting in a few days and wanted to know, based on your experience, if I should take the time to learn the basics of MVC and re-create the base web application with this model. Are there really big pros that'd make it worthwhile?
0
30,071
08/27/2008 13:22:46
572
08/06/2008 20:56:54
1,803
159
How concerned should a developer be with the problem domain?
For example, let's say I'm working in the field of physics. How concerned should I be about the latest and greatest things in the field of physics in addition to the latest and greatest things in computer science and software engineering? Is it OK to just have a passing familiarity with the domain in which you are working? Does it depend on the domain itself how much knowledge you need to be an effective developer in it?
education
knowledge
null
null
null
07/13/2012 15:09:24
off topic
How concerned should a developer be with the problem domain? === For example, let's say I'm working in the field of physics. How concerned should I be about the latest and greatest things in the field of physics in addition to the latest and greatest things in computer science and software engineering? Is it OK to just have a passing familiarity with the domain in which you are working? Does it depend on the domain itself how much knowledge you need to be an effective developer in it?
2
30,073
08/27/2008 13:23:11
770
08/08/2008 17:20:44
1,002
51
Software to manage (hardware and software) assets
Can anyone recommend a system or piece of software that will allow me to keep track of the assets in our (small) company. Ideally I'm looking for something that will track laptops, desktops etc, as well as software we may have purchased. Would be a bonus if it also kept track of less tangible things like domains. Free would be nice, but not necessary. Currently we do it all in Excel and it is a bit messy.
hardware
management
software-tools
assets
null
null
open
Software to manage (hardware and software) assets === Can anyone recommend a system or piece of software that will allow me to keep track of the assets in our (small) company. Ideally I'm looking for something that will track laptops, desktops etc, as well as software we may have purchased. Would be a bonus if it also kept track of less tangible things like domains. Free would be nice, but not necessary. Currently we do it all in Excel and it is a bit messy.
0
30,074
08/27/2008 13:23:35
2,144
08/20/2008 14:49:43
46
5
Monitoring files - how to know when a file is complete
We have several .NET applications that monitor a directory for new files, using FileSystemWatcher. The files are copied from another location, uploaded via FTP, etc. When they come in, the files are processed in one way or another. However, one problem that I have never seen a satisfactory answer for is: for large files, how does one know when the files being monitored are still being written to? Obviously, we need to wait until the files are complete and closed before we begin processing them. The event args in the FileSystemWatcher events do not seem to address this.
.net
filesystems
null
null
null
null
open
Monitoring files - how to know when a file is complete === We have several .NET applications that monitor a directory for new files, using FileSystemWatcher. The files are copied from another location, uploaded via FTP, etc. When they come in, the files are processed in one way or another. However, one problem that I have never seen a satisfactory answer for is: for large files, how does one know when the files being monitored are still being written to? Obviously, we need to wait until the files are complete and closed before we begin processing them. The event args in the FileSystemWatcher events do not seem to address this.
0
30,076
08/27/2008 13:24:18
1,638
08/17/2008 17:58:57
303
34
Need a lightweight, free, windows SMTP server
Anyone have any experience with 3rd party SMTP server for windows (server 2003)? I would like to set one up so that the cruise control can send reports of nightly builds and svn check-ins. I would like the server to be lightweight and free (this will only be used for sending email) I know windows server 2003 has a SMTP server built in, but this machine is a virtual machine and I can't give it access to an install CD. Thanks!
cruisecontrol.net
smtp
null
null
null
null
open
Need a lightweight, free, windows SMTP server === Anyone have any experience with 3rd party SMTP server for windows (server 2003)? I would like to set one up so that the cruise control can send reports of nightly builds and svn check-ins. I would like the server to be lightweight and free (this will only be used for sending email) I know windows server 2003 has a SMTP server built in, but this machine is a virtual machine and I can't give it access to an install CD. Thanks!
0
30,080
08/27/2008 13:26:56
623
08/07/2008 11:31:46
1
0
How to know if a line intersects a plane in C#? - Basic 2D geometry
my school maths are very rusty and I think this is a good opportunity to take advance of this community :D I have two points (a line) and a rectangle, I would like to know how to calculate if the line intersects the rectangle, my first approach had so many "if" statements that the compiler sent me a link to this site. Thanks for your time!
c#
2d
null
null
null
null
open
How to know if a line intersects a plane in C#? - Basic 2D geometry === my school maths are very rusty and I think this is a good opportunity to take advance of this community :D I have two points (a line) and a rectangle, I would like to know how to calculate if the line intersects the rectangle, my first approach had so many "if" statements that the compiler sent me a link to this site. Thanks for your time!
0
30,094
08/27/2008 13:30:20
1,223
08/13/2008 13:53:10
121
18
Table Scan vs. Add Index - which is quicker?
I have a table with many millions of rows. I need to find all the rows with a specific column value. That column is not in an index, so a table scan results. But would it be quicker to add an index with the column at the head (prime key following), do the query, then drop the index? I can't add an index permanently as the user is nominating what column they're looking for.
database
optimization
query
null
null
null
open
Table Scan vs. Add Index - which is quicker? === I have a table with many millions of rows. I need to find all the rows with a specific column value. That column is not in an index, so a table scan results. But would it be quicker to add an index with the column at the head (prime key following), do the query, then drop the index? I can't add an index permanently as the user is nominating what column they're looking for.
0
30,099
08/27/2008 13:31:21
841
08/09/2008 09:37:17
82
7
C++ - What does "Stack automatic" mean?
In my browsings amongst the Internet, I came across [this post][1], which includes this > "(Well written) C++ goes to great > lengths to make stack automatic > objects work "just like" primitives, > as reflected in Stroustrup's advice to > "do as the ints do". This requires a > much greater adherence to the > principles of Object Oriented > development: your class isn't right > until it "works like" an int, > following the "Rule of Three" that > guarantees it can (just like an int) > be created, copied, and correctly > destroyed as a stack automatic." I've done a little C, and C++ code, but just in passing, never anything serious, but I'm just curious, what it means exactly? Can someone give an example? [1]: http://www.reddit.com/r/programming/comments/6y6lr/ask_proggit_which_is_more_useful_to_know_c_or_java/
c++
oop
null
null
null
null
open
C++ - What does "Stack automatic" mean? === In my browsings amongst the Internet, I came across [this post][1], which includes this > "(Well written) C++ goes to great > lengths to make stack automatic > objects work "just like" primitives, > as reflected in Stroustrup's advice to > "do as the ints do". This requires a > much greater adherence to the > principles of Object Oriented > development: your class isn't right > until it "works like" an int, > following the "Rule of Three" that > guarantees it can (just like an int) > be created, copied, and correctly > destroyed as a stack automatic." I've done a little C, and C++ code, but just in passing, never anything serious, but I'm just curious, what it means exactly? Can someone give an example? [1]: http://www.reddit.com/r/programming/comments/6y6lr/ask_proggit_which_is_more_useful_to_know_c_or_java/
0
30,101
08/27/2008 13:31:24
3,205
08/27/2008 13:06:13
1
0
Is there an automatic code formatter for C#?
In my work I deal mostly with C# code nowadays, with a sprinkle of java from time to time. What I absolutely love about Eclipse (and I know people using it daily love it even more) is a sophisticated code formatter, able to mould code into any coding standard one might imagine. Is there such a tool for C#? Visual Studio code formatting (triggered by deleting the '}' at the end of the file and entering it again) is subpar (Crtl+Shift+F or simply reformatting on save are much simpler to use) and StyleCop only checks the source without fixing it. My dream tool would run from console (for easy inclusion in automated builds or pre-commit hooks), have text-file based configuration easy to store in a project repository and a graphical rule editor with preview - just like the Eclipse Code Formatter does.
c#
formatting
build-automation
null
null
null
open
Is there an automatic code formatter for C#? === In my work I deal mostly with C# code nowadays, with a sprinkle of java from time to time. What I absolutely love about Eclipse (and I know people using it daily love it even more) is a sophisticated code formatter, able to mould code into any coding standard one might imagine. Is there such a tool for C#? Visual Studio code formatting (triggered by deleting the '}' at the end of the file and entering it again) is subpar (Crtl+Shift+F or simply reformatting on save are much simpler to use) and StyleCop only checks the source without fixing it. My dream tool would run from console (for easy inclusion in automated builds or pre-commit hooks), have text-file based configuration easy to store in a project repository and a graphical rule editor with preview - just like the Eclipse Code Formatter does.
0
30,121
08/27/2008 13:36:51
356
08/05/2008 01:13:09
8
0
PHP and JavaScript regex
After my webform is submitted, regex will be applied to user input on the server side (via PHP). I'd like to have the identical regex running in real-time on the client side to show the user what the real input will be. This will be pretty much the same as the Preview section on the Ask Question pages on StackOverflow except with PHP on the back-end instead of .NET. What do I need to keep in mind in order to have my PHP and JavaScript regular expressions act exactly the same as each other?
javascript
php
regex
null
null
null
open
PHP and JavaScript regex === After my webform is submitted, regex will be applied to user input on the server side (via PHP). I'd like to have the identical regex running in real-time on the client side to show the user what the real input will be. This will be pretty much the same as the Preview section on the Ask Question pages on StackOverflow except with PHP on the back-end instead of .NET. What do I need to keep in mind in order to have my PHP and JavaScript regular expressions act exactly the same as each other?
0
30,145
08/27/2008 13:43:08
758
08/08/2008 15:40:58
170
24
Ethernet MAC address as activation code for an appliance?
Let's suppose you deploy a network-attached appliances (small form factor PCs) in the field. You want to allow these to call home after being powered on, then be identified and activated by end users. Our current plan involves the user entering the MAC address into an activation page on our web site. Later our software (running on the box) will read the address from the interface and transmit this in a "call home" packet. If it matches, the server response with customer information and the box is activated. We like this approach because it's easy to access, and usually printed on external labels (FCC requirement?). Any problems to watch out for? (The hardware in use is small form factor so all NICs, etc are embedded and would be very hard to change. Customers don't normally have direct acccess to the OS in any way). I know Microsoft does some crazy fuzzy-hashing function for Windows activation using PCI device IDs, memory size, etc. But that seems overkill for our needs.
ethernet
drm
activation
licensing
null
null
open
Ethernet MAC address as activation code for an appliance? === Let's suppose you deploy a network-attached appliances (small form factor PCs) in the field. You want to allow these to call home after being powered on, then be identified and activated by end users. Our current plan involves the user entering the MAC address into an activation page on our web site. Later our software (running on the box) will read the address from the interface and transmit this in a "call home" packet. If it matches, the server response with customer information and the box is activated. We like this approach because it's easy to access, and usually printed on external labels (FCC requirement?). Any problems to watch out for? (The hardware in use is small form factor so all NICs, etc are embedded and would be very hard to change. Customers don't normally have direct acccess to the OS in any way). I know Microsoft does some crazy fuzzy-hashing function for Windows activation using PCI device IDs, memory size, etc. But that seems overkill for our needs.
0
30,148
08/27/2008 13:46:18
470
08/06/2008 02:58:55
45
10
Manual steps to upgrade VS.NET solution and target .NET framework?
After you've let the VS.NET (2008 in this case) wizard upgrade your solution, do you perform any manual steps to upgrade specific properties of your solution and projects? For instance, you have to go to each project and target a new version of the framework (from 2.0 to 3.5 in this case). Even after targeting a new version of the framework, I find assembly references still point to the assemblies from the old version (2.0 rather than 3.5 even after changing the target). Does this mean I lose out on the performance benefits of assemblies in the new version of the framework?
.net
visual-studio
null
null
null
null
open
Manual steps to upgrade VS.NET solution and target .NET framework? === After you've let the VS.NET (2008 in this case) wizard upgrade your solution, do you perform any manual steps to upgrade specific properties of your solution and projects? For instance, you have to go to each project and target a new version of the framework (from 2.0 to 3.5 in this case). Even after targeting a new version of the framework, I find assembly references still point to the assemblies from the old version (2.0 rather than 3.5 even after changing the target). Does this mean I lose out on the performance benefits of assemblies in the new version of the framework?
0
30,152
08/27/2008 13:47:19
3,229
08/27/2008 13:47:19
1
0
How does WinXP's "Send to Compressed (zipped) Folder" decide what to include in zip file?
I'm not going to be too surprised if I get shot-down for asking a "non programming" question, but maybe somebody knows ... I was zipping the contents of my subversion sandbox using WinXP's inbuilt "Send to Compressed (zipped) Folder" capability and was surprised to find that the .zip file created did not contain the .svn directories and their contents. I had always assumed that all files were included and I can't locate which property/option/attribute controls inclusion or otherwise. Can anybody help? Thanks, Tom
zip
windows-xp
null
null
null
null
open
How does WinXP's "Send to Compressed (zipped) Folder" decide what to include in zip file? === I'm not going to be too surprised if I get shot-down for asking a "non programming" question, but maybe somebody knows ... I was zipping the contents of my subversion sandbox using WinXP's inbuilt "Send to Compressed (zipped) Folder" capability and was surprised to find that the .zip file created did not contain the .svn directories and their contents. I had always assumed that all files were included and I can't locate which property/option/attribute controls inclusion or otherwise. Can anybody help? Thanks, Tom
0
30,160
08/27/2008 13:50:26
3,030
08/26/2008 12:41:34
66
3
Is there a Java Console/Editor similar to the GroovyConsole?
I'm giving a presentation to a Java User's Group on Groovy and I'm going to be doing some coding during the presentation to show some side-by-side Java/Groovy. I really like the GroovyConsole as it's simple and I can resize the text easily. I'm wondering if there is anything similar for Java? I know I could just use Eclipse but I'd rather have a smaller app to use without having to customize a view. What's the community got? Screen shot of GroovyConsole: ![alt text][1] [1]: http://lh5.ggpht.com/martin.les/SLVbKVz2caI/AAAAAAAADrY/6Q0hGuxnQRM/s400/grvycnsle.jpg
java
editor
presentations
null
null
null
open
Is there a Java Console/Editor similar to the GroovyConsole? === I'm giving a presentation to a Java User's Group on Groovy and I'm going to be doing some coding during the presentation to show some side-by-side Java/Groovy. I really like the GroovyConsole as it's simple and I can resize the text easily. I'm wondering if there is anything similar for Java? I know I could just use Eclipse but I'd rather have a smaller app to use without having to customize a view. What's the community got? Screen shot of GroovyConsole: ![alt text][1] [1]: http://lh5.ggpht.com/martin.les/SLVbKVz2caI/AAAAAAAADrY/6Q0hGuxnQRM/s400/grvycnsle.jpg
0
30,170
08/27/2008 13:53:51
797
08/09/2008 02:14:04
505
20
Avoiding repeated constants in CSS
Are there any useful techniques for reducing the repetition of constants in a CSS file? (For example, a bunch of different selectors which should all apply the same colour, or the same font size)?
css
null
null
null
null
null
open
Avoiding repeated constants in CSS === Are there any useful techniques for reducing the repetition of constants in a CSS file? (For example, a bunch of different selectors which should all apply the same colour, or the same font size)?
0
30,171
08/27/2008 13:53:58
96
08/01/2008 18:33:48
408
40
Why won't .NET deserialize my primitive array from a web service?!
Help! I have an Axis web service that is being consumed by a C# application. Everything works great, except that arrows of long values always come across as [0,0,0,0] - the right length, but the values aren't deserialized. I have tried with other primitives (ints, doubles) and the same thing happens. What do I do? I don't want to change the semantics of my service.
.net
java
service
primitive
null
null
open
Why won't .NET deserialize my primitive array from a web service?! === Help! I have an Axis web service that is being consumed by a C# application. Everything works great, except that arrows of long values always come across as [0,0,0,0] - the right length, but the values aren't deserialized. I have tried with other primitives (ints, doubles) and the same thing happens. What do I do? I don't want to change the semantics of my service.
0
30,183
08/27/2008 13:58:44
3,228
08/27/2008 13:46:11
1
0
How do I enable Edit and Continue on a 64-bit application and VB2008 Express
When i try to do that I get the error: > Changes to 64-bit applications are not allowed.
vb2008
64bit
32bit
ide
null
null
open
How do I enable Edit and Continue on a 64-bit application and VB2008 Express === When i try to do that I get the error: > Changes to 64-bit applications are not allowed.
0
30,184
08/27/2008 13:59:01
507
08/06/2008 13:04:33
136
14
Winforms - Click/drag anywhere in the form to move it around on the desktop.
I am creating a small modal form that is used in Winforms application. It is basically a progress bar of sorts. But I would like the user to be able to click anywhere in the form and drag it to move it around on the desktop while it is still being display. How can I implement this behavior?
.net
winforms
drag-and-drop
null
null
null
open
Winforms - Click/drag anywhere in the form to move it around on the desktop. === I am creating a small modal form that is used in Winforms application. It is basically a progress bar of sorts. But I would like the user to be able to click anywhere in the form and drag it to move it around on the desktop while it is still being display. How can I implement this behavior?
0
30,188
08/27/2008 14:00:18
2,993
08/26/2008 10:45:59
164
7
How can I format a javascript date to be serialized by jQuery
I am trying to set a javascript date so that it can be submitted via JSON to a .NET type, but when attempting to do this, jQuery sets the date to a full string, what format does it have to be in to be converted to a .NET type? var regDate = student.RegistrationDate.getMonth() + "/" + student.RegistrationDate.getDate() + "/" + student.RegistrationDate.getFullYear(); j("#student_registrationdate").val(regDate); // value to serialize I am using MonoRail on the server to perform the binding to a .NET type, that aside I need to know what to set the form hidden field value to, to get properly sent to .NET code
c#
castle-monorail
json
null
null
null
open
How can I format a javascript date to be serialized by jQuery === I am trying to set a javascript date so that it can be submitted via JSON to a .NET type, but when attempting to do this, jQuery sets the date to a full string, what format does it have to be in to be converted to a .NET type? var regDate = student.RegistrationDate.getMonth() + "/" + student.RegistrationDate.getDate() + "/" + student.RegistrationDate.getFullYear(); j("#student_registrationdate").val(regDate); // value to serialize I am using MonoRail on the server to perform the binding to a .NET type, that aside I need to know what to set the form hidden field value to, to get properly sent to .NET code
0
30,211
08/27/2008 14:06:52
1,414
08/15/2008 15:07:31
603
48
Windows built-in ZIP compression script-able?
Is the zip compression that is built into Windows XP/Vista/2003/2008 able to be scripted at all? What executable would I have to call from a BAT/CMD file? or is it possible to do it with VBScript? I realize that this is possible using WinZip, 7-zip and other external apps, but I'm looking for something that requires no external apps to be installed.
windows
batch
script
vbscript
zip
null
open
Windows built-in ZIP compression script-able? === Is the zip compression that is built into Windows XP/Vista/2003/2008 able to be scripted at all? What executable would I have to call from a BAT/CMD file? or is it possible to do it with VBScript? I realize that this is possible using WinZip, 7-zip and other external apps, but I'm looking for something that requires no external apps to be installed.
0
30,222
08/27/2008 14:10:49
2,486
08/22/2008 13:39:26
8
1
SQL Server: Get data for only the past year
I am writing a query in which I have to get the data for only the last year What is the best way to do this SELECT ... From ... WHERE date > '8/27/2007 12:00:00 AM' ????? I am new to SQL so thanks for the help
sql
null
null
null
null
null
open
SQL Server: Get data for only the past year === I am writing a query in which I have to get the data for only the last year What is the best way to do this SELECT ... From ... WHERE date > '8/27/2007 12:00:00 AM' ????? I am new to SQL so thanks for the help
0
30,230
08/27/2008 14:12:30
2,462
08/22/2008 12:21:34
18
4
enter key to insert newline in asp.net multiline textbox control
I have some C# / asp.net code I inherited which has a textbox which I want to make multiline. I did so by adding textmode="multiline" but when I try to insert a newline, the enter key instead submits the form :P I googled around and it seems like the default behavior should be for enter (or control-enter) to insert a newline. Like I said I inherited the code so I'm not sure if there's javascript monkeying around or if there's just a simple asp.net thing I have to do.
asp.net
null
null
null
null
null
open
enter key to insert newline in asp.net multiline textbox control === I have some C# / asp.net code I inherited which has a textbox which I want to make multiline. I did so by adding textmode="multiline" but when I try to insert a newline, the enter key instead submits the form :P I googled around and it seems like the default behavior should be for enter (or control-enter) to insert a newline. Like I said I inherited the code so I'm not sure if there's javascript monkeying around or if there's just a simple asp.net thing I have to do.
0
30,239
08/27/2008 14:16:08
3,047
08/26/2008 13:36:37
3
1
WPF setting a MenuItem.Icon in code
I have an images folder with a png in it. I would like to set a MenuItem's icon to that png. How do I write this in procedural code?
wpf
null
null
null
null
null
open
WPF setting a MenuItem.Icon in code === I have an images folder with a png in it. I would like to set a MenuItem's icon to that png. How do I write this in procedural code?
0
30,281
08/27/2008 14:30:29
3,245
08/27/2008 14:30:29
1
0
How Popular is the Seam Framework
I'm using JBoss Seam Framework, but it's seems to me isn't very popular among java developers. I want to know how many java programmers here are using it, and in what kind of projects. Is as good as django, or RoR?
java
framework
jboss
seam
null
null
open
How Popular is the Seam Framework === I'm using JBoss Seam Framework, but it's seems to me isn't very popular among java developers. I want to know how many java programmers here are using it, and in what kind of projects. Is as good as django, or RoR?
0
30,286
08/27/2008 14:31:57
31,505
2008-09-01
697
28
NullReferenceException on User Control handle
I have an Asp.NET application (VS2008, Framework 2.0). When I try to set a property on one of the user controls like myUserControl.SomeProperty = someValue; I get a NullReferenceException. When I debug, I found out that myUserControl is null. How is it possible that a user control handle is null? How do I fix this or how do I find what causes this?
asp.net
usercontrols
null
null
null
null
open
NullReferenceException on User Control handle === I have an Asp.NET application (VS2008, Framework 2.0). When I try to set a property on one of the user controls like myUserControl.SomeProperty = someValue; I get a NullReferenceException. When I debug, I found out that myUserControl is null. How is it possible that a user control handle is null? How do I fix this or how do I find what causes this?
0
30,288
08/27/2008 14:32:52
3,242
08/27/2008 14:24:18
1
0
How can you test to see if two arrays are the same using CFML?
Using CFML (ColdFusion Markup Langauge, aka ColdFusion), how can you compare if two single dimension arrays are the same?
cfml
null
null
null
null
null
open
How can you test to see if two arrays are the same using CFML? === Using CFML (ColdFusion Markup Langauge, aka ColdFusion), how can you compare if two single dimension arrays are the same?
0
30,297
08/27/2008 14:36:38
179
08/03/2008 02:38:27
99
7
MS hotfix delayed delivery.
I just requested a hotfix from support.microsoft.com and put in my email address, but I haven't received the email yet. The splash page I got after I requested the hotfix said: > **Hotfix Confirmation** > We will send these hotfixes to the following e-mail address: > [email protected] > Usually, our hotfix e-mail is delivered to you within five minutes. However, sometimes unforeseen issues in e-mail delivery systems may cause delays. > We will send the e-mail from the “[email protected]” e-mail account. If you use an e-mail filter or a SPAM blocker, we recommend that you add “[email protected]” or the “microsoft.com” domain to your safe senders list. (The safe senders list is also known as a whitelist or an approved senders list.) This will help prevent our e-mail from going into your junk e-mail folder or being automatically deleted. I'm sure that the email is not getting caught in a spam catcher. How long does it normally take to get one of these hotfixes? Am I waiting for some human to approve it, or something? Should I just give up and try to get the file I need some other way?
microsoft
hotfix
support
email
null
05/04/2012 16:05:48
off topic
MS hotfix delayed delivery. === I just requested a hotfix from support.microsoft.com and put in my email address, but I haven't received the email yet. The splash page I got after I requested the hotfix said: > **Hotfix Confirmation** > We will send these hotfixes to the following e-mail address: > [email protected] > Usually, our hotfix e-mail is delivered to you within five minutes. However, sometimes unforeseen issues in e-mail delivery systems may cause delays. > We will send the e-mail from the “[email protected]” e-mail account. If you use an e-mail filter or a SPAM blocker, we recommend that you add “[email protected]” or the “microsoft.com” domain to your safe senders list. (The safe senders list is also known as a whitelist or an approved senders list.) This will help prevent our e-mail from going into your junk e-mail folder or being automatically deleted. I'm sure that the email is not getting caught in a spam catcher. How long does it normally take to get one of these hotfixes? Am I waiting for some human to approve it, or something? Should I just give up and try to get the file I need some other way?
2
30,302
08/27/2008 14:38:39
3,085
08/26/2008 15:02:28
1
0
Asp.Net Routing: How do I ignore multiple wildcard routes?
I'd like to ignore multiple wildcard routes. With asp.net mvc preview 4, they ship with: RouteTable.Routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); I'd also like to add something like: RouteTable.Routes.IgnoreRoute("Content/{*pathInfo}"); but that seems to break some of the helpers that generate urls in my program. Thoughts?
asp.net
asp.net-mvc
routing
null
null
null
open
Asp.Net Routing: How do I ignore multiple wildcard routes? === I'd like to ignore multiple wildcard routes. With asp.net mvc preview 4, they ship with: RouteTable.Routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); I'd also like to add something like: RouteTable.Routes.IgnoreRoute("Content/{*pathInfo}"); but that seems to break some of the helpers that generate urls in my program. Thoughts?
0
30,307
08/27/2008 14:40:38
305
08/04/2008 14:04:19
942
59
Why would getcwd() return a different directory than a local pwd?
I'm doing some php stuff on an Ubuntu server. The path I'm working in is **/mnt/dev-windows-data/Staging/mbiek/test_list** but the PHP call ***getcwd()*** is returning **/mnt/dev-windows/Staging/mbiek/test_list** (notice how it's dev-windows instead of dev-windows-data). There aren't any symbolic links anywhere. Are there any other causes for ***getcwd()*** returning a different path from a local pwd call?
php
directory
null
null
null
null
open
Why would getcwd() return a different directory than a local pwd? === I'm doing some php stuff on an Ubuntu server. The path I'm working in is **/mnt/dev-windows-data/Staging/mbiek/test_list** but the PHP call ***getcwd()*** is returning **/mnt/dev-windows/Staging/mbiek/test_list** (notice how it's dev-windows instead of dev-windows-data). There aren't any symbolic links anywhere. Are there any other causes for ***getcwd()*** returning a different path from a local pwd call?
0
30,310
08/27/2008 14:41:31
3,085
08/26/2008 15:02:28
1
0
Asp.Net MVC: How do I enable dashes in my urls?
I'd like to have dashes separate words in my URLs. So instead of: /MyController/MyAction I'd like: /My-Controller/My-Action Is this possible?
asp.net-mvc
null
null
null
null
null
open
Asp.Net MVC: How do I enable dashes in my urls? === I'd like to have dashes separate words in my URLs. So instead of: /MyController/MyAction I'd like: /My-Controller/My-Action Is this possible?
0
30,311
08/27/2008 14:42:27
3,208
08/27/2008 13:12:45
1
1
Good QA / Testing Podcast
Can anyone recommend a good Podcast for Quality Assurance / Tester folks. I find there is a wide variety on development but yet to find a good one for QA/Testing ( not from the developer point of view ).
testing
podcast
qa
null
null
09/18/2011 02:59:13
not constructive
Good QA / Testing Podcast === Can anyone recommend a good Podcast for Quality Assurance / Tester folks. I find there is a wide variety on development but yet to find a good one for QA/Testing ( not from the developer point of view ).
4
30,318
08/27/2008 14:43:31
3,233
08/27/2008 13:54:44
1
1
Where can I find a graphical command shell?
Terminals and shells are very powerful but can be complicated to learn, especially to get the best out of them. Does anyone know of a more GUI based command shell that helps a user or displays answers in a more friendly way? I'm aware of IPython, but even the syntax of that is somewhat convoluted, although it's a step in the right direction. Further to this, results could be presented graphically, e.g. wouldn't it be nice to be able to pipe file sizes into a pie chart?
python
gui
shell
user-interface
terminal
null
open
Where can I find a graphical command shell? === Terminals and shells are very powerful but can be complicated to learn, especially to get the best out of them. Does anyone know of a more GUI based command shell that helps a user or displays answers in a more friendly way? I'm aware of IPython, but even the syntax of that is somewhat convoluted, although it's a step in the right direction. Further to this, results could be presented graphically, e.g. wouldn't it be nice to be able to pipe file sizes into a pie chart?
0
30,319
08/27/2008 14:44:02
2,098
08/20/2008 11:21:16
141
10
Is there a html opposite to noscript
Is there a tag in html that will only display its content if JavaScript is enabled? I know noscript works the opposite way around, displaying its html content when JavaScript is turned off. but I would like to only display a form on a site if JavaScript is available, telling them why they cant use the form if they don't have it. The only way I know who to do this is with the document.write(); method in a script tag, and it seams a bit messy for large amounts of html. Thanks
html
javascript
null
null
null
null
open
Is there a html opposite to noscript === Is there a tag in html that will only display its content if JavaScript is enabled? I know noscript works the opposite way around, displaying its html content when JavaScript is turned off. but I would like to only display a form on a site if JavaScript is available, telling them why they cant use the form if they don't have it. The only way I know who to do this is with the document.write(); method in a script tag, and it seams a bit messy for large amounts of html. Thanks
0
30,321
08/27/2008 14:44:25
982
08/11/2008 12:08:33
88
13
How to store Application Messages for a .NET Website
I am looking for a method of storing Application Messages, such as * "You have logged in successfully" * "An error has occurred, please call the helpdesk on x100" * "You do not have the authority to reset all system passwords" etc So that "when" the users decide they don't like the wording of messages I don't have to change the source cdoe, recompile then redeploy - instead I just change the message store. I really like the way that I can easily access strings in the web.config using keys and values. > ConfigurationManager.AppSettings("LOGINSUCCESS") However as I could have a large number of application messages I didn't want to use the web.config directly. I was going to add a 2nd web config file and use that but of course you can only have one per virtual directory. Does anyone have any suggestions on how to do this without writing much custom code? Thanks
vb.net
website
storing
null
null
null
open
How to store Application Messages for a .NET Website === I am looking for a method of storing Application Messages, such as * "You have logged in successfully" * "An error has occurred, please call the helpdesk on x100" * "You do not have the authority to reset all system passwords" etc So that "when" the users decide they don't like the wording of messages I don't have to change the source cdoe, recompile then redeploy - instead I just change the message store. I really like the way that I can easily access strings in the web.config using keys and values. > ConfigurationManager.AppSettings("LOGINSUCCESS") However as I could have a large number of application messages I didn't want to use the web.config directly. I was going to add a 2nd web config file and use that but of course you can only have one per virtual directory. Does anyone have any suggestions on how to do this without writing much custom code? Thanks
0
30,328
08/27/2008 14:46:28
3,249
08/27/2008 14:46:28
1
0
tesseract interface
How do you OCR an tiff file using tesseract's interface in c#? Currently only know how to do it using the executable.
c#
tesseract
null
null
null
null
open
tesseract interface === How do you OCR an tiff file using tesseract's interface in c#? Currently only know how to do it using the executable.
0
30,337
08/27/2008 14:47:46
2,881
08/25/2008 17:46:55
111
4
Install-base of Java JRE?
Is there an online resource somewhere that maintains statistics on the install-base of Java including JRE version information? If not, is there any recent report that has some numbers? I'm particularly interested in Windows users, but all other OSs are welcome too.
java
deployment
null
null
null
null
open
Install-base of Java JRE? === Is there an online resource somewhere that maintains statistics on the install-base of Java including JRE version information? If not, is there any recent report that has some numbers? I'm particularly interested in Windows users, but all other OSs are welcome too.
0
30,354
08/27/2008 14:54:52
863
08/09/2008 19:07:26
382
20
When must I set a variable to "Nothing" in VB6?
In one of my VB6 forms, I create several other Form objects and store them in member variables. Private m_frm1 as MyForm Private m_frm2 as MyForm // Later... Set m_frm1 = New MyForm Set m_frm2 = New MyForm I notice that I'm leaking memory whenever this (parent) form is created and destroyed. Is it necessary for me to assign these member variables to `Nothing` in `Form_Unload()`? In general, when is that required?
vb6
memory-leaks
null
null
null
null
open
When must I set a variable to "Nothing" in VB6? === In one of my VB6 forms, I create several other Form objects and store them in member variables. Private m_frm1 as MyForm Private m_frm2 as MyForm // Later... Set m_frm1 = New MyForm Set m_frm2 = New MyForm I notice that I'm leaking memory whenever this (parent) form is created and destroyed. Is it necessary for me to assign these member variables to `Nothing` in `Form_Unload()`? In general, when is that required?
0
30,373
08/27/2008 15:03:00
2,328
08/21/2008 16:45:54
286
17
C++ pitfalls
I remember first learning about vectors in the STL and after some time, I wanted to use a vector of bools for one of my projects. After seeing some strange behavior and doing some research, I learned that [a vector of bools is not really a vector of bools][1]. Anyone out there have any other common pitfalls to avoid in C++? [1]: http://www.informit.com/guides/content.aspx?g=cplusplus&seqNum=98
c++
stl
null
null
null
03/29/2011 03:44:56
not a real question
C++ pitfalls === I remember first learning about vectors in the STL and after some time, I wanted to use a vector of bools for one of my projects. After seeing some strange behavior and doing some research, I learned that [a vector of bools is not really a vector of bools][1]. Anyone out there have any other common pitfalls to avoid in C++? [1]: http://www.informit.com/guides/content.aspx?g=cplusplus&seqNum=98
1
30,374
08/27/2008 15:03:14
2,894
08/25/2008 20:06:55
71
13
What is a good source for learning OLAP
Are there any excellent sources (book, podcast, tribal folklore, etc) fo rgetting a grasp on using OLAP for data analysis in SQL Server (or just in generic terms that can be applied to SQL Server)?
sql-server
olap
null
null
null
09/11/2008 16:09:12
off topic
What is a good source for learning OLAP === Are there any excellent sources (book, podcast, tribal folklore, etc) fo rgetting a grasp on using OLAP for data analysis in SQL Server (or just in generic terms that can be applied to SQL Server)?
2
30,376
08/27/2008 15:04:34
269
08/04/2008 10:13:44
1,750
121
Getting organised; The TODO list.
What's the best way to organise my personal TODO list? and what tools are available for organising team TODO lists? Should I still be thinking in terms of TODO or are there better ways to manage my time and projects?
organizing
teamwork
planning
project-management
null
null
open
Getting organised; The TODO list. === What's the best way to organise my personal TODO list? and what tools are available for organising team TODO lists? Should I still be thinking in terms of TODO or are there better ways to manage my time and projects?
0
30,379
08/27/2008 15:05:51
2,349
08/21/2008 19:03:18
41
1
How do I replicate content on a web farm
We have a Windows Server Web Edition 2003 Web Farm. What can we use that handle replication across the servers for: Content & IIS Configuration (App Pools, Virtual Directories, etc...) We will be moving to Windows 2008 in the near future, so I guess what options are there on Windows 2008 as well.
iis
web-server
replication
null
null
null
open
How do I replicate content on a web farm === We have a Windows Server Web Edition 2003 Web Farm. What can we use that handle replication across the servers for: Content & IIS Configuration (App Pools, Virtual Directories, etc...) We will be moving to Windows 2008 in the near future, so I guess what options are there on Windows 2008 as well.
0
30,397
08/27/2008 15:11:38
2,470
08/22/2008 12:42:38
118
24
Dynamically display Edit Control Block menu item in SharePoint
I am trying to set up dynamic per-item menus (Edit Control Block) in SharePoint 2007. My goal is to have certain features that are available based on the current user's group membership. I know that the CustomAction tag that controls the creation of this menu item has a Rights attribute. The problem that I have with this is that the groups I am using have identical rights in the site (ViewListItems, ManageAlerts, etc). The groups that we have set up deal more with function, such as Manager, Employee, etc. We want to be able to assign a custom feature to a group, and have the menu items associated with that feature visible only to members of that group. Everyone has the same basic site permissions, but will have extra options availble based on their login credentials. I have seen several articles on modifying the Core.js file to hide items in the context menu, but they are an all-or-nothing approach. There is an interesting post at [http://blog.thekid.me.uk/archive/2008/04/29/sharepoint-custom-actions-in-a-list-view-webpart.aspx][1] that shows how to dynamically modify the Actions menu. It is trivial to modify this example to check the users group and show or hide the menu based on membership. Unfortunately, this example does not seem to apply to context menu items as evidenced here [http://forums.msdn.microsoft.com/en-US/sharepointdevelopment/thread/c2259839-24c4-4a7e-83e5-3925cdd17c44/][2]. Does anyone know of a way to do this without using javascript? If not, what is the best way to check the user's group from javascript? [1]: http://blog.thekid.me.uk/archive/2008/04/29/sharepoint-custom-actions-in-a-list-view-webpart.aspx [2]: http://forums.msdn.microsoft.com/en-US/sharepointdevelopment/thread/c2259839-24c4-4a7e-83e5-3925cdd17c44/
sharepoint
menu
null
null
null
null
open
Dynamically display Edit Control Block menu item in SharePoint === I am trying to set up dynamic per-item menus (Edit Control Block) in SharePoint 2007. My goal is to have certain features that are available based on the current user's group membership. I know that the CustomAction tag that controls the creation of this menu item has a Rights attribute. The problem that I have with this is that the groups I am using have identical rights in the site (ViewListItems, ManageAlerts, etc). The groups that we have set up deal more with function, such as Manager, Employee, etc. We want to be able to assign a custom feature to a group, and have the menu items associated with that feature visible only to members of that group. Everyone has the same basic site permissions, but will have extra options availble based on their login credentials. I have seen several articles on modifying the Core.js file to hide items in the context menu, but they are an all-or-nothing approach. There is an interesting post at [http://blog.thekid.me.uk/archive/2008/04/29/sharepoint-custom-actions-in-a-list-view-webpart.aspx][1] that shows how to dynamically modify the Actions menu. It is trivial to modify this example to check the users group and show or hide the menu based on membership. Unfortunately, this example does not seem to apply to context menu items as evidenced here [http://forums.msdn.microsoft.com/en-US/sharepointdevelopment/thread/c2259839-24c4-4a7e-83e5-3925cdd17c44/][2]. Does anyone know of a way to do this without using javascript? If not, what is the best way to check the user's group from javascript? [1]: http://blog.thekid.me.uk/archive/2008/04/29/sharepoint-custom-actions-in-a-list-view-webpart.aspx [2]: http://forums.msdn.microsoft.com/en-US/sharepointdevelopment/thread/c2259839-24c4-4a7e-83e5-3925cdd17c44/
0
30,425
08/27/2008 15:19:37
3,027
08/26/2008 12:39:00
31
2
Looking for terracotta examples
I am looking for good example code for terracotta. Especially around using master/worker pattern. In particular using custom routing (we like, but would like to use some strick data affinity type routing - ie. one worker looks after a set of task types ). Also examples or experience setting up masters and topologies would be great also.
java
cluster-analysis
terracotta
null
null
null
open
Looking for terracotta examples === I am looking for good example code for terracotta. Especially around using master/worker pattern. In particular using custom routing (we like, but would like to use some strick data affinity type routing - ie. one worker looks after a set of task types ). Also examples or experience setting up masters and topologies would be great also.
0
30,428
08/27/2008 15:21:31
3,027
08/26/2008 12:39:00
31
2
experience with java clustering ?
Would like to hear from people about their experience with java clustering (ie. implementing HA solutions). aka . terracotta, jgroups etc. It doesn't have to be web apps. Experience writing custom stand alone servers would be great also.
terracotta
jgroups
java
clustering
null
null
open
experience with java clustering ? === Would like to hear from people about their experience with java clustering (ie. implementing HA solutions). aka . terracotta, jgroups etc. It doesn't have to be web apps. Experience writing custom stand alone servers would be great also.
0
30,430
08/27/2008 15:22:52
2,684
08/24/2008 14:38:27
168
29
Moving from Visual Studio 2005 to 2008 and .NET 2.0
I'm currently using VS2005 Profesional and .NET 2.0, and since our project is rather large (25 projects in the solution), I'd like to try VS 2008, since its theoretically faster with larger projects. Before doing such thing, i'd like to know if what I've read is true: can I use VS2008 in ".net 2.0" mode? I don't want my customers to install .net 3.0 or .3.5, I just want to install VS2008, open my solution and start working from there. Is this possible? P.D.: the solution is a c# Window Forms project.
c#
visual-studio
.net
null
null
null
open
Moving from Visual Studio 2005 to 2008 and .NET 2.0 === I'm currently using VS2005 Profesional and .NET 2.0, and since our project is rather large (25 projects in the solution), I'd like to try VS 2008, since its theoretically faster with larger projects. Before doing such thing, i'd like to know if what I've read is true: can I use VS2008 in ".net 2.0" mode? I don't want my customers to install .net 3.0 or .3.5, I just want to install VS2008, open my solution and start working from there. Is this possible? P.D.: the solution is a c# Window Forms project.
0
30,465
08/27/2008 15:36:15
1,490
08/15/2008 21:35:24
426
48
How to collect customer feedback?
What's the best way to close the loop and have a desktop app "call home" with customer feedback? Right now our code will login to our SMTP server and send me some email.
customer
feedback
user-experience
null
null
null
open
How to collect customer feedback? === What's the best way to close the loop and have a desktop app "call home" with customer feedback? Right now our code will login to our SMTP server and send me some email.
0
30,474
08/27/2008 15:38:48
1,375
08/14/2008 21:41:25
129
5
Database Schema Diagram Design Tool
Does anyone know of a good tool to quickly and easily create a diagram for a database schema? I don't need it to generate SQL to create the schema, I just want to diagram it. My current process involves drawing out the db schema by hand on paper, works great but there has got to be a better way?
database-design
database-diagram
null
null
null
06/02/2012 19:01:20
not constructive
Database Schema Diagram Design Tool === Does anyone know of a good tool to quickly and easily create a diagram for a database schema? I don't need it to generate SQL to create the schema, I just want to diagram it. My current process involves drawing out the db schema by hand on paper, works great but there has got to be a better way?
4
30,485
08/27/2008 15:40:54
106
08/02/2008 00:12:12
627
65
What is a resonable length limit on person "Name" fields?
I have a simple webform that will allow unauthenticated users to input their information, including name. I gave the name field a limit of 50 characters to coincide with my database table where the field is varchar(50), but then I started to wonder. Is it more appropriate to use something like the Text column type or should I limit the length of the name to something reasonable? I'm using SQL Server 2005, in case that matters in your response.
sql
html
textbox
null
null
null
open
What is a resonable length limit on person "Name" fields? === I have a simple webform that will allow unauthenticated users to input their information, including name. I gave the name field a limit of 50 characters to coincide with my database table where the field is varchar(50), but then I started to wonder. Is it more appropriate to use something like the Text column type or should I limit the length of the name to something reasonable? I'm using SQL Server 2005, in case that matters in your response.
0
30,494
08/27/2008 15:43:27
1,490
08/15/2008 21:35:24
426
48
Compare Version Identifiers
Here is my code, which takes two version identifiers in the form "1, 5, 0, 4" or "1.5.0.4" and determines which is the newer version. Suggestions or improvements, please! /// <summary> /// Compares two specified version strings and returns an integer that /// indicates their relationship to one another in the sort order. /// </summary> /// <param name="strA">the first version</param> /// <param name="strB">the second version</param> /// <returns>less than zero if strA is less than strB, equal to zero if /// strA equals strB, and greater than zero if strA is greater than strB</returns> public static int CompareVersions(string strA, string strB) { char[] splitTokens = new char[] {'.', ','}; string[] strAsplit = strA.Split(splitTokens, StringSplitOptions.RemoveEmptyEntries); string[] strBsplit = strB.Split(splitTokens, StringSplitOptions.RemoveEmptyEntries); int[] versionA = new int[4]; int[] versionB = new int[4]; for (int i = 0; i < 4; i++) { versionA[i] = Convert.ToInt32(strAsplit[i]); versionB[i] = Convert.ToInt32(strBsplit[i]); } // now that we have parsed the input strings, compare them return RecursiveCompareArrays(versionA, versionB, 0); } /// <summary> /// Recursive function for comparing arrays, 0-index is highest priority /// </summary> private static int RecursiveCompareArrays(int[] versionA, int[] versionB, int idx) { if (versionA[idx] < versionB[idx]) return -1; else if (versionA[idx] > versionB[idx]) return 1; else { Debug.Assert(versionA[idx] == versionB[idx]); if (idx == versionA.Length - 1) return 0; else return RecursiveCompareArrays(versionA, versionB, idx + 1); } }
c#
.net
version
compare
null
null
open
Compare Version Identifiers === Here is my code, which takes two version identifiers in the form "1, 5, 0, 4" or "1.5.0.4" and determines which is the newer version. Suggestions or improvements, please! /// <summary> /// Compares two specified version strings and returns an integer that /// indicates their relationship to one another in the sort order. /// </summary> /// <param name="strA">the first version</param> /// <param name="strB">the second version</param> /// <returns>less than zero if strA is less than strB, equal to zero if /// strA equals strB, and greater than zero if strA is greater than strB</returns> public static int CompareVersions(string strA, string strB) { char[] splitTokens = new char[] {'.', ','}; string[] strAsplit = strA.Split(splitTokens, StringSplitOptions.RemoveEmptyEntries); string[] strBsplit = strB.Split(splitTokens, StringSplitOptions.RemoveEmptyEntries); int[] versionA = new int[4]; int[] versionB = new int[4]; for (int i = 0; i < 4; i++) { versionA[i] = Convert.ToInt32(strAsplit[i]); versionB[i] = Convert.ToInt32(strBsplit[i]); } // now that we have parsed the input strings, compare them return RecursiveCompareArrays(versionA, versionB, 0); } /// <summary> /// Recursive function for comparing arrays, 0-index is highest priority /// </summary> private static int RecursiveCompareArrays(int[] versionA, int[] versionB, int idx) { if (versionA[idx] < versionB[idx]) return -1; else if (versionA[idx] > versionB[idx]) return 1; else { Debug.Assert(versionA[idx] == versionB[idx]); if (idx == versionA.Length - 1) return 0; else return RecursiveCompareArrays(versionA, versionB, idx + 1); } }
0
30,504
08/27/2008 15:47:17
2,495
08/22/2008 14:30:23
43
1
programmatically retrieve Visual Studio install directory
I know there is a registry key indcating the install directory, but don't remember what it is off-hand. Currently interested in VS2008 install directory, though it wouldn't hurt to list others for future reference.
visual-studio
null
null
null
null
null
open
programmatically retrieve Visual Studio install directory === I know there is a registry key indcating the install directory, but don't remember what it is off-hand. Currently interested in VS2008 install directory, though it wouldn't hurt to list others for future reference.
0
30,505
08/27/2008 15:47:35
1,739
08/18/2008 11:38:21
119
9
Display solution/file path in Visual Studio IDE
I frequently work with multiple instances of Visual Studio, often working on different branches of the same solution. VC6 used to display the full path of the current source file in its title bar, but Visual Studio 2005 doesn't appear to do this. This makes it slightly more awkward than it should be to work out which branch of the solution I'm currently looking at (the quickest way I know of is to hover over a tab so you get the source file's path as a tooltip). Is there any way to get the full solution or file path into the title bar, or at least somewhere that's always visible so I can quickly tell which branch is loaded into each instance?
visual-studio
null
null
null
null
null
open
Display solution/file path in Visual Studio IDE === I frequently work with multiple instances of Visual Studio, often working on different branches of the same solution. VC6 used to display the full path of the current source file in its title bar, but Visual Studio 2005 doesn't appear to do this. This makes it slightly more awkward than it should be to work out which branch of the solution I'm currently looking at (the quickest way I know of is to hover over a tab so you get the source file's path as a tooltip). Is there any way to get the full solution or file path into the title bar, or at least somewhere that's always visible so I can quickly tell which branch is loaded into each instance?
0
30,521
08/27/2008 15:54:07
2,897
08/25/2008 20:17:12
1
0
Qt Child Window Placement
Is there a way to specify a child's initial window position in Qt? I have an application that runs on Linux and Windows and it looks like the default behavior of Qt lets the Window Manager determine the placement of the child windows. On Windows, this is in the center of the screen the parent is on which seems reasonable. On Linux, in GNOME (metacity) it is always in the upper left-hand corner which is annoying. I can't find any window manager preferences for metacity that allow me to control window placement so I would like to override that behavior.
gui
qt
null
null
null
null
open
Qt Child Window Placement === Is there a way to specify a child's initial window position in Qt? I have an application that runs on Linux and Windows and it looks like the default behavior of Qt lets the Window Manager determine the placement of the child windows. On Windows, this is in the center of the screen the parent is on which seems reasonable. On Linux, in GNOME (metacity) it is always in the upper left-hand corner which is annoying. I can't find any window manager preferences for metacity that allow me to control window placement so I would like to override that behavior.
0
30,526
08/27/2008 15:56:01
3,182
08/27/2008 09:11:40
1
5
Does anyone use mindmapping tools?
I wonder if anyone (or any team) uses mindmapping tools (mindstorms/brainstorms before projects). I'm going to start a new project and I think if it would be useful. If yes, which tool should I use.
mindmapping
tool
null
null
null
null
open
Does anyone use mindmapping tools? === I wonder if anyone (or any team) uses mindmapping tools (mindstorms/brainstorms before projects). I'm going to start a new project and I think if it would be useful. If yes, which tool should I use.
0
30,529
08/27/2008 15:57:50
2,015
08/19/2008 19:42:43
35
5
How to implement Type-safe enumerations in Delphi ?
How could i implement in delphi Type-Safe Enumerations ? Basically, i'd like to replace a set of primitive constants of a enumeration with a set of static final object references encapsulated in a class ? . In Java, we can do something like: public final class Enum { public static final Enum ENUMITEM1 = new Enum (); public static final Enum ENUMITEM2 = new Enum (); //... private Enum () {} } and make comparisons using the customized enumeration type: if (anObject != Enum.ENUMITEM1) ... I am currently using the old Delphi 5. Do you have a better way of implementing enums other than using the native delphi enums ? Regards, Gustavo
delphi
null
null
null
null
null
open
How to implement Type-safe enumerations in Delphi ? === How could i implement in delphi Type-Safe Enumerations ? Basically, i'd like to replace a set of primitive constants of a enumeration with a set of static final object references encapsulated in a class ? . In Java, we can do something like: public final class Enum { public static final Enum ENUMITEM1 = new Enum (); public static final Enum ENUMITEM2 = new Enum (); //... private Enum () {} } and make comparisons using the customized enumeration type: if (anObject != Enum.ENUMITEM1) ... I am currently using the old Delphi 5. Do you have a better way of implementing enums other than using the native delphi enums ? Regards, Gustavo
0
30,539
08/27/2008 16:01:57
2,813
08/25/2008 11:24:20
11
3
Best way to enumerate all available video codecs on Windows?
I'm looking for a good way to enumerate all the Video codecs on a Windows XP/Vista machine. I need present the user with a set of video codecs, including the compressors and decompressors. The output would look something like <pre> Available Decoders DiVX Version 6.0 XVID Motion JPEG CompanyX's MPEG-2 Decoder Windows Media Video **Available Encoders** DiVX Version 6.0 Windows Media Video </pre> The problem that I am running into is that there is no reliable way to to capture all of the decoders available to the system. For instance: 1) You can enumerate all the decompressors using DirectShow, but this tells you nothing about the compressors (encoders). 2) You can enumerate all the Video For Windows components, but you get no indication if these are encoders or decoders. 3) There are DirectShow filters that may do the job for you perfectly well (Motion JPEG filter for example), but there is no indication that a particular DirectShow filter is a "video decoder". Has anyone found a generalizes solution for this problem using any of the Windows APIs? Does the Windows Vista [Media Foundation API](http://en.wikipedia.org/wiki/Media_Foundation) solve any of these issues? Thanks
video
windows
directshow
codec
media
null
open
Best way to enumerate all available video codecs on Windows? === I'm looking for a good way to enumerate all the Video codecs on a Windows XP/Vista machine. I need present the user with a set of video codecs, including the compressors and decompressors. The output would look something like <pre> Available Decoders DiVX Version 6.0 XVID Motion JPEG CompanyX's MPEG-2 Decoder Windows Media Video **Available Encoders** DiVX Version 6.0 Windows Media Video </pre> The problem that I am running into is that there is no reliable way to to capture all of the decoders available to the system. For instance: 1) You can enumerate all the decompressors using DirectShow, but this tells you nothing about the compressors (encoders). 2) You can enumerate all the Video For Windows components, but you get no indication if these are encoders or decoders. 3) There are DirectShow filters that may do the job for you perfectly well (Motion JPEG filter for example), but there is no indication that a particular DirectShow filter is a "video decoder". Has anyone found a generalizes solution for this problem using any of the Windows APIs? Does the Windows Vista [Media Foundation API](http://en.wikipedia.org/wiki/Media_Foundation) solve any of these issues? Thanks
0
30,540
08/27/2008 16:02:00
1,940
08/19/2008 14:38:08
71
8
What does this javascript error mean? Permission denied to call method to Location.toString
This error just started popping up all over our site. ***Permission denied to call method to Location.toString*** I'm seeing google posts that suggest that this is related to flash and our crossdomain.xml. What caused this to occur and how do you fix?
javascript
flash
null
null
null
null
open
What does this javascript error mean? Permission denied to call method to Location.toString === This error just started popping up all over our site. ***Permission denied to call method to Location.toString*** I'm seeing google posts that suggest that this is related to flash and our crossdomain.xml. What caused this to occur and how do you fix?
0
30,541
08/27/2008 16:02:23
3,256
08/27/2008 15:21:10
1
0
Using MVP - How to use Events Properly for Testing
I've just started using the MVP pattern in the large ASP.NET application that I'm building (re-building actually) and I am having a hard time figuring out how I should be using Events applied to the view. Say I have 2 drop down lists in a User Control, where one is dependent on the other's value: <%@ Control Language="vb" AutoEventWireup="false" CodeBehind="ucTestMVP.ascx.vb" Inherits=".ucTestMVP" %> <asp:DropDownList ID="ddlCountry" runat="server" AutoPostBack="True" /> <asp:DropDownList ID="ddlCity" runat="server" /> How should should the AutoPostBack Event be defined in the interface? Should it be an event that is handled by the User Control like this: Public Partial Class ucTestMVP Inherits System.Web.UI.UserControl Implements ITestMVPView Protected Sub PageLoad(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load If Not Page.IsPostBack Then Dim presenter As New TestMVPPresenter(Me) presenter.InitView() End If End Sub Private Sub ddlCountrySelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ddlCountry.SelectedIndexChanged Dim presenter as New TestMVPPresenter(Me) presenter.CountryDDLIndexChanged() End Sub End Class Or should there be an event defined at the Interface? If this is the preferred pattern, how do I add events to be handled and used?
asp.net
design-patterns
mvp
null
null
null
open
Using MVP - How to use Events Properly for Testing === I've just started using the MVP pattern in the large ASP.NET application that I'm building (re-building actually) and I am having a hard time figuring out how I should be using Events applied to the view. Say I have 2 drop down lists in a User Control, where one is dependent on the other's value: <%@ Control Language="vb" AutoEventWireup="false" CodeBehind="ucTestMVP.ascx.vb" Inherits=".ucTestMVP" %> <asp:DropDownList ID="ddlCountry" runat="server" AutoPostBack="True" /> <asp:DropDownList ID="ddlCity" runat="server" /> How should should the AutoPostBack Event be defined in the interface? Should it be an event that is handled by the User Control like this: Public Partial Class ucTestMVP Inherits System.Web.UI.UserControl Implements ITestMVPView Protected Sub PageLoad(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load If Not Page.IsPostBack Then Dim presenter As New TestMVPPresenter(Me) presenter.InitView() End If End Sub Private Sub ddlCountrySelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ddlCountry.SelectedIndexChanged Dim presenter as New TestMVPPresenter(Me) presenter.CountryDDLIndexChanged() End Sub End Class Or should there be an event defined at the Interface? If this is the preferred pattern, how do I add events to be handled and used?
0
30,543
08/27/2008 16:04:29
1,048
08/11/2008 19:34:31
67
10
Is code written in Vista 64 compatible on 32 bit os?
We are getting new dev machines and moving up to Vista 64 Ultimate to take advantage of our 8gb ram. Our manager wants us to do all dev in 32bit virtual machines to make sure there will be no problems with our code moving into production. Is there anyway to guarantee the resultant programs will work on 32bit os's? I don't mind using virtual machines, but I don't like how they force you back into a "Single" monitor type view. I like moving my VS toolbars off to my other monitor. Thank you, Keith
64bit
compatibility
development-environment
null
null
null
open
Is code written in Vista 64 compatible on 32 bit os? === We are getting new dev machines and moving up to Vista 64 Ultimate to take advantage of our 8gb ram. Our manager wants us to do all dev in 32bit virtual machines to make sure there will be no problems with our code moving into production. Is there anyway to guarantee the resultant programs will work on 32bit os's? I don't mind using virtual machines, but I don't like how they force you back into a "Single" monitor type view. I like moving my VS toolbars off to my other monitor. Thank you, Keith
0
30,563
08/27/2008 16:14:42
2,486
08/22/2008 13:39:26
20
1
SQL: Returning the sum of items depending on which type it is
I have one field that I need to sum lets say named items However that field can be part of group a or b In the end I need to have all of the items summed for group a and group b
sql
sql-server
null
null
null
null
open
SQL: Returning the sum of items depending on which type it is === I have one field that I need to sum lets say named items However that field can be part of group a or b In the end I need to have all of the items summed for group a and group b
0
30,566
08/27/2008 16:15:48
111
08/02/2008 03:35:55
202
12
Delayed Write Failed on Windows 2003 Clustered Fileshare
I am trying to solve a persistent IO problem when we try to read or write to a Windows 2003 Clustered Fileshare. It is happening regularly and seem to be triggered by traffic. We are writing via .NET's FileStream object. Basically we are writing from a Windows 2003 Server running IIS to a Windows 2003 file share cluster. When writing to the file share, the IIS server often gets two errors. One is an Application Popup from Windows, the other is a warning from MRxSmb. Both say the same thing: > [Delayed Write Failed] Windows was unable to save all the data for the file \Device\LanmanRedirector. The data has been lost. This error may be caused by a failure of your computer hardware or network connection. Please try to save this file elswhere. On reads, we are also getting errors, which are System.IO.IOException errors: "The specified network name is no longer available." We have other servers writing more and larger files to this File Share Cluster without an issue. It's only coming from the one group of servers that the issue comes up. So it doesn't seem related to writing large files. We've applied all the hotfixes referenced in articles online dealing with this issue, and yet it continues. Our network team ran Network Monitor and didn't see any packet loss, from what I understand, but as I wasn't present for that test I can't say that for certain. Any ideas of where to check? I'm out of avenues to explore or tests to run. I'm guessing the issue is some kind of network problem, but as it's only happening when these servers connect to that File Share cluster, I'm not sure what kind of problem it might be. This issue is awfully specific, and potentially hardware related, but any help you can give would be of assistance. Eric Sipple
c#
windows
iis
2003
null
null
open
Delayed Write Failed on Windows 2003 Clustered Fileshare === I am trying to solve a persistent IO problem when we try to read or write to a Windows 2003 Clustered Fileshare. It is happening regularly and seem to be triggered by traffic. We are writing via .NET's FileStream object. Basically we are writing from a Windows 2003 Server running IIS to a Windows 2003 file share cluster. When writing to the file share, the IIS server often gets two errors. One is an Application Popup from Windows, the other is a warning from MRxSmb. Both say the same thing: > [Delayed Write Failed] Windows was unable to save all the data for the file \Device\LanmanRedirector. The data has been lost. This error may be caused by a failure of your computer hardware or network connection. Please try to save this file elswhere. On reads, we are also getting errors, which are System.IO.IOException errors: "The specified network name is no longer available." We have other servers writing more and larger files to this File Share Cluster without an issue. It's only coming from the one group of servers that the issue comes up. So it doesn't seem related to writing large files. We've applied all the hotfixes referenced in articles online dealing with this issue, and yet it continues. Our network team ran Network Monitor and didn't see any packet loss, from what I understand, but as I wasn't present for that test I can't say that for certain. Any ideas of where to check? I'm out of avenues to explore or tests to run. I'm guessing the issue is some kind of network problem, but as it's only happening when these servers connect to that File Share cluster, I'm not sure what kind of problem it might be. This issue is awfully specific, and potentially hardware related, but any help you can give would be of assistance. Eric Sipple
0
30,569
08/27/2008 16:16:47
2,972
08/26/2008 09:20:36
8
3
Resize transparent images using C#
Does anyone have the secret formula to resizing transparent images (mainly GIFs) *without* ANY quality loss - what so ever? I've tried a bunch of stuff, the closest I get is not good enough. Take a look at my main image: [http://www.thewallcompany.dk/test/main.gif][1] And then the scaled image: [http://www.thewallcompany.dk/test/ScaledImage.gif][2] //Internal resize for indexed colored images void IndexedRezise(int xSize, int ySize) { BitmapData sourceData; BitmapData targetData; AdjustSizes(ref xSize, ref ySize); scaledBitmap = new Bitmap(xSize, ySize, bitmap.PixelFormat); scaledBitmap.Palette = bitmap.Palette; sourceData = bitmap.LockBits(new Rectangle(0, 0, bitmap.Width, bitmap.Height), ImageLockMode.ReadOnly, bitmap.PixelFormat); try { targetData = scaledBitmap.LockBits(new Rectangle(0, 0, xSize, ySize), ImageLockMode.WriteOnly, scaledBitmap.PixelFormat); try { xFactor = (Double)bitmap.Width / (Double)scaledBitmap.Width; yFactor = (Double)bitmap.Height / (Double)scaledBitmap.Height; sourceStride = sourceData.Stride; sourceScan0 = sourceData.Scan0; int targetStride = targetData.Stride; System.IntPtr targetScan0 = targetData.Scan0; unsafe { byte* p = (byte*)(void*)targetScan0; int nOffset = targetStride - scaledBitmap.Width; int nWidth = scaledBitmap.Width; for (int y = 0; y < scaledBitmap.Height; ++y) { for (int x = 0; x < nWidth; ++x) { p[0] = GetSourceByteAt(x, y); ++p; } p += nOffset; } } } finally { scaledBitmap.UnlockBits(targetData); } } finally { bitmap.UnlockBits(sourceData); } } I'm using the above code, to do the indexed resizing. Does anyone have improvement ideas? [1]: http://www.thewallcompany.dk/test/main.gif [2]: http://www.thewallcompany.dk/test/ScaledImage.gif
c#
image
resize
null
null
null
open
Resize transparent images using C# === Does anyone have the secret formula to resizing transparent images (mainly GIFs) *without* ANY quality loss - what so ever? I've tried a bunch of stuff, the closest I get is not good enough. Take a look at my main image: [http://www.thewallcompany.dk/test/main.gif][1] And then the scaled image: [http://www.thewallcompany.dk/test/ScaledImage.gif][2] //Internal resize for indexed colored images void IndexedRezise(int xSize, int ySize) { BitmapData sourceData; BitmapData targetData; AdjustSizes(ref xSize, ref ySize); scaledBitmap = new Bitmap(xSize, ySize, bitmap.PixelFormat); scaledBitmap.Palette = bitmap.Palette; sourceData = bitmap.LockBits(new Rectangle(0, 0, bitmap.Width, bitmap.Height), ImageLockMode.ReadOnly, bitmap.PixelFormat); try { targetData = scaledBitmap.LockBits(new Rectangle(0, 0, xSize, ySize), ImageLockMode.WriteOnly, scaledBitmap.PixelFormat); try { xFactor = (Double)bitmap.Width / (Double)scaledBitmap.Width; yFactor = (Double)bitmap.Height / (Double)scaledBitmap.Height; sourceStride = sourceData.Stride; sourceScan0 = sourceData.Scan0; int targetStride = targetData.Stride; System.IntPtr targetScan0 = targetData.Scan0; unsafe { byte* p = (byte*)(void*)targetScan0; int nOffset = targetStride - scaledBitmap.Width; int nWidth = scaledBitmap.Width; for (int y = 0; y < scaledBitmap.Height; ++y) { for (int x = 0; x < nWidth; ++x) { p[0] = GetSourceByteAt(x, y); ++p; } p += nOffset; } } } finally { scaledBitmap.UnlockBits(targetData); } } finally { bitmap.UnlockBits(sourceData); } } I'm using the above code, to do the indexed resizing. Does anyone have improvement ideas? [1]: http://www.thewallcompany.dk/test/main.gif [2]: http://www.thewallcompany.dk/test/ScaledImage.gif
0
30,571
08/27/2008 16:17:02
1,709
08/18/2008 07:05:30
608
47
How do I tell Maven to use the latest version of a dependency?
In Maven, dependencies are usually set up like this: <pre> &lt;dependency&gt; &lt;groupId&gt;wonderful-inc&lt;/groupId&gt; &lt;artifactId&gt;dream-library&lt;/artifactId&gt; &lt;version&gt;1.2.3&lt;/version&gt; &lt;/dependency&gt; </pre> Now, if you are working with libraries that have frequent releases, constantly updating the <code>&lt;version&gt; tag can be somewhat annoying. Is there any way to tell Maven to always use the latest available version (from the repository)?
java
maven-2
dependencies
null
null
null
open
How do I tell Maven to use the latest version of a dependency? === In Maven, dependencies are usually set up like this: <pre> &lt;dependency&gt; &lt;groupId&gt;wonderful-inc&lt;/groupId&gt; &lt;artifactId&gt;dream-library&lt;/artifactId&gt; &lt;version&gt;1.2.3&lt;/version&gt; &lt;/dependency&gt; </pre> Now, if you are working with libraries that have frequent releases, constantly updating the <code>&lt;version&gt; tag can be somewhat annoying. Is there any way to tell Maven to always use the latest available version (from the repository)?
0
30,585
08/27/2008 16:26:25
2,813
08/25/2008 11:24:20
21
3
Can you use CruiseControl to build Cocoa/Objective-C projects?
Has anyone ever set up Cruise Control to build an OS X Cocoa/Objective-C project? If so, is there a preferred flavor of CruiseControl (CruiseControl.rb or just regular CruiseControl) that would be easier to do this with. I currently have a Ruby rake file that has steps for doing building and running tests, and wanted to automate this process after doing a checkin. Also, does CruiseControl have support for git? I couldn't find anything on the website for this.
cruisecontrol
cruisecontrol.rb
continuiousbuild
testing
build-process
null
open
Can you use CruiseControl to build Cocoa/Objective-C projects? === Has anyone ever set up Cruise Control to build an OS X Cocoa/Objective-C project? If so, is there a preferred flavor of CruiseControl (CruiseControl.rb or just regular CruiseControl) that would be easier to do this with. I currently have a Ruby rake file that has steps for doing building and running tests, and wanted to automate this process after doing a checkin. Also, does CruiseControl have support for git? I couldn't find anything on the website for this.
0
30,594
08/27/2008 16:34:09
3,274
08/27/2008 16:05:55
1
0
Is it possible to find code coverage in ColdFusion?
I am trying to be a "good" programmer and have unit tests for my ColdFusion application but haven't been able to find a code coverage tool that can tie into the test that I'm using. For those of you who do unit tests on your ColdFusion code, how have you approached this problem?
unit-testing
coldfusion
null
null
null
null
open
Is it possible to find code coverage in ColdFusion? === I am trying to be a "good" programmer and have unit tests for my ColdFusion application but haven't been able to find a code coverage tool that can tie into the test that I'm using. For those of you who do unit tests on your ColdFusion code, how have you approached this problem?
0
30,610
08/27/2008 16:43:37
572
08/06/2008 20:56:54
1,841
164
How important is the choice of language to the success of a project?
Does the choice between language X and language Y (and perhaps also Language Z) have *that* much of an impact on the success of a project? I understand that there are some languages that just aren't the right fit (I don't think you would write an operating system in Java, for example), but between two or three languages that all work, does the final decision really matter that much? EDIT: The assumption that the team is equally skilled with all languages should be assumed, otherwise there are a number of other factors that come into play beyond the language itself.
programming-languages
null
null
null
null
null
open
How important is the choice of language to the success of a project? === Does the choice between language X and language Y (and perhaps also Language Z) have *that* much of an impact on the success of a project? I understand that there are some languages that just aren't the right fit (I don't think you would write an operating system in Java, for example), but between two or three languages that all work, does the final decision really matter that much? EDIT: The assumption that the team is equally skilled with all languages should be assumed, otherwise there are a number of other factors that come into play beyond the language itself.
0
30,627
08/27/2008 16:55:59
828
08/09/2008 06:12:41
88
6
How would you use Java to handle various XML documents?
I'm looking for the best method to parse various XML documents using a Java application. I'm currently doing this with SAX and a custom content handler and it works great - zippy and stable. I've decided to explore the option having the same program, that currently recieves a single format XML document, receive two additional XML document formats, with various XML element changes. I was hoping to just swap out the ContentHandler with an appropriate one based on the first "startElement" in the document... but, uh-duh, the ContentHandler is set and **then** the document is parsed! ... constructor ... { SAXParserFactory spf = SAXParserFactory.newInstance(); try { SAXParser sp = spf.newSAXParser(); parser = sp.getXMLReader(); parser.setErrorHandler(new MyErrorHandler()); } catch (Exception e) {} ... parse StringBuffer ... try { parser.setContentHandler(pP); parser.parse(new InputSource(new StringReader(xml.toString()))); return true; } catch (IOException e) { e.printStackTrace(); } catch (SAXException e) { e.printStackTrace(); } ... So, it doesn't appear that I can do this in the way I initially thought I could. That being said, am I looking at this entirely wrong? What is the best method to parse multiple, discrete XML documents with the same XML handling code? [I tried to ask in a more general post earlier... but, I think I was being too vague][1]. For speed and efficiency purposes I never really looked at DOM because these XML documents are fairly large and the system receives about 1200 every few minutes. It's just a one way send of information To make this question too long and add to my confusion; following is a mockup of some various XML documents that I would like to have a single SAX, StAX, or ?? parser cleanly deal with. products.xml: <products> <product> <id>1</id> <name>Foo</name> <product> <id>2</id> <name>bar</name> </product> </products> stores.xml: <stores> <store> <id>1</id> <name>S1A</name> <location>CA</location> </store> <store> <id>2</id> <name>A1S</name> <location>NY</location> </store> </stores> managers.xml: <managers> <manager> <id>1</id> <name>Fen</name> <store>1</store> </manager> <manager> <id>2</id> <name>Diz</name> <store>2</store> </manager> </managers> [1]: http://stackoverflow.com/questions/23106/best-method-to-parse-various-custom-xml-documents-in-java
java
xml
sax
stax
null
null
open
How would you use Java to handle various XML documents? === I'm looking for the best method to parse various XML documents using a Java application. I'm currently doing this with SAX and a custom content handler and it works great - zippy and stable. I've decided to explore the option having the same program, that currently recieves a single format XML document, receive two additional XML document formats, with various XML element changes. I was hoping to just swap out the ContentHandler with an appropriate one based on the first "startElement" in the document... but, uh-duh, the ContentHandler is set and **then** the document is parsed! ... constructor ... { SAXParserFactory spf = SAXParserFactory.newInstance(); try { SAXParser sp = spf.newSAXParser(); parser = sp.getXMLReader(); parser.setErrorHandler(new MyErrorHandler()); } catch (Exception e) {} ... parse StringBuffer ... try { parser.setContentHandler(pP); parser.parse(new InputSource(new StringReader(xml.toString()))); return true; } catch (IOException e) { e.printStackTrace(); } catch (SAXException e) { e.printStackTrace(); } ... So, it doesn't appear that I can do this in the way I initially thought I could. That being said, am I looking at this entirely wrong? What is the best method to parse multiple, discrete XML documents with the same XML handling code? [I tried to ask in a more general post earlier... but, I think I was being too vague][1]. For speed and efficiency purposes I never really looked at DOM because these XML documents are fairly large and the system receives about 1200 every few minutes. It's just a one way send of information To make this question too long and add to my confusion; following is a mockup of some various XML documents that I would like to have a single SAX, StAX, or ?? parser cleanly deal with. products.xml: <products> <product> <id>1</id> <name>Foo</name> <product> <id>2</id> <name>bar</name> </product> </products> stores.xml: <stores> <store> <id>1</id> <name>S1A</name> <location>CA</location> </store> <store> <id>2</id> <name>A1S</name> <location>NY</location> </store> </stores> managers.xml: <managers> <manager> <id>1</id> <name>Fen</name> <store>1</store> </manager> <manager> <id>2</id> <name>Diz</name> <store>2</store> </manager> </managers> [1]: http://stackoverflow.com/questions/23106/best-method-to-parse-various-custom-xml-documents-in-java
0
30,632
08/27/2008 16:57:16
277
08/04/2008 10:55:22
291
10
Apache Webservers
What is the difference in terms of functionality between the Apache HTTP Server and Apache Tomcat? I know that Tomcat is written in Java and the HTTP Server is in C, but other than that I do not really know how they are distinguished. Do they have different functionality?
apache
tomcat
webserver
null
null
null
open
Apache Webservers === What is the difference in terms of functionality between the Apache HTTP Server and Apache Tomcat? I know that Tomcat is written in Java and the HTTP Server is in C, but other than that I do not really know how they are distinguished. Do they have different functionality?
0
30,651
08/27/2008 17:06:51
1,213
08/13/2008 13:18:30
38
3
Open 2 Visio diagrams in different windows
I would like to know if I can open 2 different diagrams using MS Visio and each diagram have its own window. I've tried in several ways, but I always end up with 1 Visio window ... I'm using a triple monitor setup and I'd like to put one diagram to each side of my main monitor. []'s André Casteliano PS: I'm using Visio 2007 here.
visio
diagrams
null
null
null
02/05/2012 01:01:38
off topic
Open 2 Visio diagrams in different windows === I would like to know if I can open 2 different diagrams using MS Visio and each diagram have its own window. I've tried in several ways, but I always end up with 1 Visio window ... I'm using a triple monitor setup and I'd like to put one diagram to each side of my main monitor. []'s André Casteliano PS: I'm using Visio 2007 here.
2
30,653
08/27/2008 17:08:47
814
08/09/2008 04:07:15
168
11
What do I need to do to implement an "out of proc" COM server in C#?
I am trying to implement an "out of proc" COM server written in C#. How do I do this?
c#
com
interop
null
null
null
open
What do I need to do to implement an "out of proc" COM server in C#? === I am trying to implement an "out of proc" COM server written in C#. How do I do this?
0
30,660
08/27/2008 17:11:09
547
08/06/2008 16:09:22
510
31
MySQL Binary Log Replication: Can it be set to ignore errors?
I'm running a master-slave MySQL binary log replication system (phew!) that, for some data, is not in sync (meaning, the master holds more data than the slave). But the slave stops very frequently on the slightest MySQL error, can this be disabled? (perhaps a my.cnf setting for the replicating slave ignore-replicating-errors or some of the sort ;) ) This is what happens, every now and then, when the slave tries to replicate an item that does not exist, the slave just dies. a quick check at **SHOW SLAVE STATUS \G;** gives Slave-IO-Running: Yes Slave-SQL-Running: No Replicate-Do-DB: Last-Errno: 1062 Last-Error: Error 'Duplicate entry '15218' for key 1' on query. Default database: 'db'. Query: 'INSERT INTO db.table ( FIELDS ) VALUES ( VALUES )' which I promptly fix (once I realize that the slave has been stopped) by doing the following: STOP SLAVE; RESET SLAVE; START SLAVE; ... lately this has been getting kind of tiresome, and before I spit out some sort of PHP which does this for me, i was wondering if there's some my.cnf entry which will not kill the slave on the first error. Cheers, /mp
mysql
replication
binlog
null
null
null
open
MySQL Binary Log Replication: Can it be set to ignore errors? === I'm running a master-slave MySQL binary log replication system (phew!) that, for some data, is not in sync (meaning, the master holds more data than the slave). But the slave stops very frequently on the slightest MySQL error, can this be disabled? (perhaps a my.cnf setting for the replicating slave ignore-replicating-errors or some of the sort ;) ) This is what happens, every now and then, when the slave tries to replicate an item that does not exist, the slave just dies. a quick check at **SHOW SLAVE STATUS \G;** gives Slave-IO-Running: Yes Slave-SQL-Running: No Replicate-Do-DB: Last-Errno: 1062 Last-Error: Error 'Duplicate entry '15218' for key 1' on query. Default database: 'db'. Query: 'INSERT INTO db.table ( FIELDS ) VALUES ( VALUES )' which I promptly fix (once I realize that the slave has been stopped) by doing the following: STOP SLAVE; RESET SLAVE; START SLAVE; ... lately this has been getting kind of tiresome, and before I spit out some sort of PHP which does this for me, i was wondering if there's some my.cnf entry which will not kill the slave on the first error. Cheers, /mp
0
30,686
08/27/2008 17:28:48
2,495
08/22/2008 14:30:23
43
2
get file version in powershell
How can you get the version information from a `.dll` or `.exe` file in PowerShell? Specifically interested in `File Version`, though other version info (i.e. `Company`, `Language`, `Product Name`, etc) would be helpful as well.
file
powershell
null
null
null
null
open
get file version in powershell === How can you get the version information from a `.dll` or `.exe` file in PowerShell? Specifically interested in `File Version`, though other version info (i.e. `Company`, `Language`, `Product Name`, etc) would be helpful as well.
0
30,696
08/27/2008 17:38:30
2,786
08/25/2008 03:55:03
1
1
Java code to import CSV into Access
I posted the code below to the Sun developers forum since I thought it was erroring (the true error was before this code was even hit). One of the responses I got said it would not work and to throw it away. But it is actually working. It might not be the best code (I am new to Java) but is there something inherently "wrong" with it? ============= CODE: <pre> private static void ImportFromCsvToAccessTable(String mdbFilePath, String accessTableName , String csvDirPath , String csvFileName ) throws ClassNotFoundException, SQLException { Connection msConn = getDestinationConnection(mdbFilePath); try{ String strSQL = "SELECT * INTO " + accessTableName + " FROM [Text;HDR=YES;DATABASE=" + csvDirPath + ";].[" + csvFileName + "]"; PreparedStatement selectPrepSt = msConn.prepareStatement(strSQL ); boolean result = selectPrepSt.execute(); System.out.println( "result = " + result ); } catch(Exception e) { System.out.println(e); } finally { msConn.close(); } }
java
null
null
null
null
null
open
Java code to import CSV into Access === I posted the code below to the Sun developers forum since I thought it was erroring (the true error was before this code was even hit). One of the responses I got said it would not work and to throw it away. But it is actually working. It might not be the best code (I am new to Java) but is there something inherently "wrong" with it? ============= CODE: <pre> private static void ImportFromCsvToAccessTable(String mdbFilePath, String accessTableName , String csvDirPath , String csvFileName ) throws ClassNotFoundException, SQLException { Connection msConn = getDestinationConnection(mdbFilePath); try{ String strSQL = "SELECT * INTO " + accessTableName + " FROM [Text;HDR=YES;DATABASE=" + csvDirPath + ";].[" + csvFileName + "]"; PreparedStatement selectPrepSt = msConn.prepareStatement(strSQL ); boolean result = selectPrepSt.execute(); System.out.println( "result = " + result ); } catch(Exception e) { System.out.println(e); } finally { msConn.close(); } }
0
30,706
08/27/2008 17:45:06
1,478
08/15/2008 19:37:57
143
12
How do I create a draggable and resizable JavaScript popup window?
I want to create a draggable and resizable window in JavaScript for cross browser use, but I want to try and avoid using a framework if I can. Has anyone got a link or some code that I can use?
javascript
dialog
null
null
null
null
open
How do I create a draggable and resizable JavaScript popup window? === I want to create a draggable and resizable window in JavaScript for cross browser use, but I want to try and avoid using a framework if I can. Has anyone got a link or some code that I can use?
0
30,710
08/27/2008 17:46:02
1,384,652
08/01/2008 12:01:23
1,394
72
How to unit test an object with database queries
I've heard that unit testing is "totally awesome", "really cool" and "all manner of good things" but 70% or more of my files involve database access (some read and some write) and I'm not sure how to write a unit test for these files. I'm using PHP and Python but I think it's a question that applies to most/all languages that use database access.
database
unit-testing
null
null
null
null
open
How to unit test an object with database queries === I've heard that unit testing is "totally awesome", "really cool" and "all manner of good things" but 70% or more of my files involve database access (some read and some write) and I'm not sure how to write a unit test for these files. I'm using PHP and Python but I think it's a question that applies to most/all languages that use database access.
0
30,712
08/27/2008 17:48:21
1,339
08/14/2008 15:11:18
101
6
What is the proper virtual directory access permission level required for a SOAP web service?
When setting up a new virtual directory for hosting a SOAP web service in IIS 6.0 on a Server 2003 box I am required to set the access permissions for the virtual directory. The various permissions are to allow/disallow the following: - **Read** - **Run scripts (such as ASP)** - **Execute (such as ISAPI or CGI)** - **Write** - **Browse** The SOAP web service is being published through the SOAP3.0 ISAPI server with the extensions set to "Allowed" in the Web Service Extensions pane of the IIS Manager. Since I'll be hosting the .wsdl definition file from this virtual directory, I know I'll need **Read** permissions to be set, and since I don't want to expose the contents of this directory to the web I know **Browse** is not desirable. But, I *don't* know if I need to have the **Run scripts**, **Execute**, and **Write** permissions enabled to properly publish this web service. The web service is being used to send and receive XML data sets between the server and remote clients. **What is the correct level of access permission for my SOAP web service's virtual directory?**
soap
web-services
file-permissions
null
null
null
open
What is the proper virtual directory access permission level required for a SOAP web service? === When setting up a new virtual directory for hosting a SOAP web service in IIS 6.0 on a Server 2003 box I am required to set the access permissions for the virtual directory. The various permissions are to allow/disallow the following: - **Read** - **Run scripts (such as ASP)** - **Execute (such as ISAPI or CGI)** - **Write** - **Browse** The SOAP web service is being published through the SOAP3.0 ISAPI server with the extensions set to "Allowed" in the Web Service Extensions pane of the IIS Manager. Since I'll be hosting the .wsdl definition file from this virtual directory, I know I'll need **Read** permissions to be set, and since I don't want to expose the contents of this directory to the web I know **Browse** is not desirable. But, I *don't* know if I need to have the **Run scripts**, **Execute**, and **Write** permissions enabled to properly publish this web service. The web service is being used to send and receive XML data sets between the server and remote clients. **What is the correct level of access permission for my SOAP web service's virtual directory?**
0
30,729
08/27/2008 17:55:16
3,291
08/27/2008 17:46:47
1
0
C# Performance For Proxy Server (vs C++)
I want to create a simple http proxy server that does some very basic processing on the http headers (i.e. if header x == y, do z). The server may need to support hundreds of users. I can write the server in C# (pretty easy) or c++ (much harder). However, would a C# version have as good of performance as a C++ version? If not, would the difference in performance be big enough that it would not make sense to write it in C#?
c#
c++
performance
sockets
system.net
null
open
C# Performance For Proxy Server (vs C++) === I want to create a simple http proxy server that does some very basic processing on the http headers (i.e. if header x == y, do z). The server may need to support hundreds of users. I can write the server in C# (pretty easy) or c++ (much harder). However, would a C# version have as good of performance as a C++ version? If not, would the difference in performance be big enough that it would not make sense to write it in C#?
0
30,752
08/27/2008 18:07:26
3,289
08/27/2008 17:27:05
1
0
How do I configure an ASP.NET MVC project to work with Boo
I want to see what it would be like to build an ASP.NET MVC application with Boo instead of C#. I you have tried this or know how to configure this, I'd be interested to know what you need to do. Chris
asp.net-mvc
boo
null
null
null
null
open
How do I configure an ASP.NET MVC project to work with Boo === I want to see what it would be like to build an ASP.NET MVC application with Boo instead of C#. I you have tried this or know how to configure this, I'd be interested to know what you need to do. Chris
0
30,754
08/27/2008 18:09:42
2,695
08/24/2008 15:29:59
371
27
Performance vs Readability
Reading [this question][1] I found this as (note the quotation marks) "code" to solve the problem (that's perl by the way). 100,{)..3%!'Fizz'*\5%!'Buzz'*+\or}%n* Obviously this is an intelectual example without real (I hope to never see that in real code in my life) implications but, when you have to make the choice, when do you sacrifice code readability for performance? Do you apply just common sense, do you do it always as a last resort? What are your strategies? [1]: http://stackoverflow.com/questions/437/what-is-your-solution-to-the-fizzbuzz-problem
performance
null
null
null
null
null
open
Performance vs Readability === Reading [this question][1] I found this as (note the quotation marks) "code" to solve the problem (that's perl by the way). 100,{)..3%!'Fizz'*\5%!'Buzz'*+\or}%n* Obviously this is an intelectual example without real (I hope to never see that in real code in my life) implications but, when you have to make the choice, when do you sacrifice code readability for performance? Do you apply just common sense, do you do it always as a last resort? What are your strategies? [1]: http://stackoverflow.com/questions/437/what-is-your-solution-to-the-fizzbuzz-problem
0
30,763
08/27/2008 18:12:20
2,121
08/20/2008 13:11:31
33
2
Understanding Interfaces
I have class method that returns a list of employees that I can iterate through. What's the best way to return the list? Typically I just return an ArrayList. However, as I understand, interfaces are better suited for this type of action. Which would be the best interface to use? Also, why is it better to return an interface, rather than the implementation (say ArrayList object)? It just seems like a lot more work to me.
interface
null
null
null
null
null
open
Understanding Interfaces === I have class method that returns a list of employees that I can iterate through. What's the best way to return the list? Typically I just return an ArrayList. However, as I understand, interfaces are better suited for this type of action. Which would be the best interface to use? Also, why is it better to return an interface, rather than the implementation (say ArrayList object)? It just seems like a lot more work to me.
0
30,770
08/27/2008 18:14:46
1,965
08/19/2008 15:51:08
1,651
102
Update Panel inside of a UserControl inside of a Repeater inside of another UpdatePanel
Yes, it sounds crazy....It might be. The final updatepanel does not appear to trigger anything, it just refreshes the update panels and does not call back to the usercontrol hosting it. Any ideas?
asp.net
ajax
updatepanel
usercontrols
null
null
open
Update Panel inside of a UserControl inside of a Repeater inside of another UpdatePanel === Yes, it sounds crazy....It might be. The final updatepanel does not appear to trigger anything, it just refreshes the update panels and does not call back to the usercontrol hosting it. Any ideas?
0
30,775
08/27/2008 18:15:39
2,469
08/22/2008 12:41:47
105
15
NHibernate and Oracle connect through Windows Authenication
How do I use Windows Authentication to connect to an Oracle database? Currently I just use an Oracle Username and password however a requirement is to give the user on install the option of selecting Windows Authentication since we offer the same as SQL.
windows
oracle
nhibernate
null
null
null
open
NHibernate and Oracle connect through Windows Authenication === How do I use Windows Authentication to connect to an Oracle database? Currently I just use an Oracle Username and password however a requirement is to give the user on install the option of selecting Windows Authentication since we offer the same as SQL.
0
30,781
08/27/2008 18:16:37
1,341
08/14/2008 15:30:17
216
11
How do I retrieve data sent to the web server in ASP.NET?
What are the ways to retrieve data submitted to the web server from a form in the client HTML in ASP.NET?
asp.net
null
null
null
null
null
open
How do I retrieve data sent to the web server in ASP.NET? === What are the ways to retrieve data submitted to the web server from a form in the client HTML in ASP.NET?
0
30,788
08/27/2008 18:18:16
3,300
08/27/2008 18:18:16
1
0
query all public folders for forms used
Does anyone have a script or can anyone point me in the right direction to query an Exchange (2003) public folder tree to determine all forms being used? I need an output of form object/display name and count for each form type in each folder.
exchange
publicfolders
script
reporting
null
null
open
query all public folders for forms used === Does anyone have a script or can anyone point me in the right direction to query an Exchange (2003) public folder tree to determine all forms being used? I need an output of form object/display name and count for each form type in each folder.
0
30,790
08/27/2008 18:18:29
2,469
08/22/2008 12:41:47
105
15
Is there a Way to use Linq to Oralce
I can connect with the DataContext to the Oracle database however I get errors in running the query against the oracle database. I looked at the SQL generated and it is for MSSQL and not Oracle PSQL. Does anybody know of a decent easy to use wrapper to use LINQ against an Oracle Database?
linq
oracle
null
null
null
null
open
Is there a Way to use Linq to Oralce === I can connect with the DataContext to the Oracle database however I get errors in running the query against the oracle database. I looked at the SQL generated and it is for MSSQL and not Oracle PSQL. Does anybody know of a decent easy to use wrapper to use LINQ against an Oracle Database?
0
30,800
08/27/2008 18:23:20
2,701
08/24/2008 15:51:24
53
5
Can I use establishSecurityContext in WCF so I only authenticate once?
What is the best approach to make sure you only need to authenticate once when using an API built on WCF? My current bindings and behaviors are listed below <bindings> <wsHttpBinding> <binding name="wsHttp"> <security mode="TransportWithMessageCredential"> <transport/> <message clientCredentialType="UserName" negotiateServiceCredential="false" establishSecurityContext="true"/> </security> </binding> </wsHttpBinding> </bindings> <behaviors> <serviceBehaviors> <behavior name="NorthwindBehavior"> <serviceMetadata httpGetEnabled="true"/> <serviceAuthorization principalPermissionMode="UseAspNetRoles"/> <serviceCredentials> <userNameAuthentication userNamePasswordValidationMode="MembershipProvider"/> </serviceCredentials> </behavior> </serviceBehaviors> </behaviors> **Next is what I am using in my client app to authenticate (currently I must do this everytime I want to make a call into WCF)** Dim client As ProductServiceClient = New ProductServiceClient("wsHttpProductService") client.ClientCredentials.UserName.UserName = "foo" client.ClientCredentials.UserName.Password = "bar" Dim ProductList As List(Of Product) = client.GetProducts()
wcf
null
null
null
null
null
open
Can I use establishSecurityContext in WCF so I only authenticate once? === What is the best approach to make sure you only need to authenticate once when using an API built on WCF? My current bindings and behaviors are listed below <bindings> <wsHttpBinding> <binding name="wsHttp"> <security mode="TransportWithMessageCredential"> <transport/> <message clientCredentialType="UserName" negotiateServiceCredential="false" establishSecurityContext="true"/> </security> </binding> </wsHttpBinding> </bindings> <behaviors> <serviceBehaviors> <behavior name="NorthwindBehavior"> <serviceMetadata httpGetEnabled="true"/> <serviceAuthorization principalPermissionMode="UseAspNetRoles"/> <serviceCredentials> <userNameAuthentication userNamePasswordValidationMode="MembershipProvider"/> </serviceCredentials> </behavior> </serviceBehaviors> </behaviors> **Next is what I am using in my client app to authenticate (currently I must do this everytime I want to make a call into WCF)** Dim client As ProductServiceClient = New ProductServiceClient("wsHttpProductService") client.ClientCredentials.UserName.UserName = "foo" client.ClientCredentials.UserName.Password = "bar" Dim ProductList As List(Of Product) = client.GetProducts()
0
30,811
08/27/2008 18:26:42
2,534
08/22/2008 17:28:13
1
0
Should I use Google Web Toolkit for my new webapp?
I would like to create a database backed interactive AJAX webapp which has a custom (specific kind of events, editing) calendaring system. This would involve quite a lot of JavaScript and AJAX, and I thought about Google Web Toolkit for the interface and Ruby on Rails for server side. Is Google Web Toolkit reliable and good? What hidden risks might be if I choose Google Web Toolkit? Can one easily combine it with Ruby on Rails on server side? Or should I try to use directly a JavaScript library like jQuery? I have no experience in web development except some HTML, but I am an experienced programmer (c++, java, c#), and I would like to use only free tools for this project.
ajaxtoolkit
ruby
google-web-toolkit
javascript
null
null
open
Should I use Google Web Toolkit for my new webapp? === I would like to create a database backed interactive AJAX webapp which has a custom (specific kind of events, editing) calendaring system. This would involve quite a lot of JavaScript and AJAX, and I thought about Google Web Toolkit for the interface and Ruby on Rails for server side. Is Google Web Toolkit reliable and good? What hidden risks might be if I choose Google Web Toolkit? Can one easily combine it with Ruby on Rails on server side? Or should I try to use directly a JavaScript library like jQuery? I have no experience in web development except some HTML, but I am an experienced programmer (c++, java, c#), and I would like to use only free tools for this project.
0
30,824
08/27/2008 18:34:09
2,663
08/24/2008 05:25:57
167
14
book on... System Archaeology
I work in the IT consulting line. My job is to penetrate into whatever client/customer environment I have been assigned to and bring about technological improvements (or sometimes, black magic tricks) to boost their business/domain. As I am sure many out there are just like me, you would know first hand the situation I describe. The environment we step into is not plain barren land waiting for brand new systems to be built upon. we inherit a world of legacy, and the world ain't perfect. It is less than complete, comprehensive, and systematic. There is a black box system developed in some ancient arcane platform. The vendor has closed shop 15 years ago. No source code or documentation exists. The corporate network is managed by a 3rd-party global infrastructure team and configuring all the firewalls your application will touch involves contacting over 30 different personnel. Your customer liaison doesn't know who they are either. Nobody dares to modify the framework layer code base ever since the original architects quit three years ago; they don't even know if the code in the version-control repository is the latest. The DBA or application team are always unavailable, and you cannot connect to the database or authenticate with their web service to pull the data for integrated or stress test. Nobody claims responsibility for that monitoring server in the corner with the crackling hard disks. The CIO knows squat about the enterprise architecture and what systems are in place, and commands no technological direction for the coming five years. What are the passwords to the servers in the DR site? Essentially, it is an environment where processes, information, documentation, and knowledge have been loss to time as generations gone by and relationships vaporized. Chaos is guaranteed when disaster happens, because the correct group of trained personnel to handle the situation are non-existent. A humongous amount of time and effort is spent peeling the layers of murk and dusting and combing for clues. Details absolutely necessary to get the our own jobs done. I have not come across any book that touches such job factors and conditions. Yes, a great deal is all about social engineering and dealing with the human factor to chart and plot the political boundaries (official or otherwise, public or hidden) and knowing the exact people to get things done. And *that* is part and parcel of our daily routine. I would *love* to read about the experience of others in their quest to overcome these hurdles of "lost technology" or "civilization". If there can really ever be a systematic guideline or approach in the unearthing and self inference of these artifacts? Am I crazy to wish for such a book?
books
customer-facing
infrastructure
enterprise-architecture
archaeology
null
open
book on... System Archaeology === I work in the IT consulting line. My job is to penetrate into whatever client/customer environment I have been assigned to and bring about technological improvements (or sometimes, black magic tricks) to boost their business/domain. As I am sure many out there are just like me, you would know first hand the situation I describe. The environment we step into is not plain barren land waiting for brand new systems to be built upon. we inherit a world of legacy, and the world ain't perfect. It is less than complete, comprehensive, and systematic. There is a black box system developed in some ancient arcane platform. The vendor has closed shop 15 years ago. No source code or documentation exists. The corporate network is managed by a 3rd-party global infrastructure team and configuring all the firewalls your application will touch involves contacting over 30 different personnel. Your customer liaison doesn't know who they are either. Nobody dares to modify the framework layer code base ever since the original architects quit three years ago; they don't even know if the code in the version-control repository is the latest. The DBA or application team are always unavailable, and you cannot connect to the database or authenticate with their web service to pull the data for integrated or stress test. Nobody claims responsibility for that monitoring server in the corner with the crackling hard disks. The CIO knows squat about the enterprise architecture and what systems are in place, and commands no technological direction for the coming five years. What are the passwords to the servers in the DR site? Essentially, it is an environment where processes, information, documentation, and knowledge have been loss to time as generations gone by and relationships vaporized. Chaos is guaranteed when disaster happens, because the correct group of trained personnel to handle the situation are non-existent. A humongous amount of time and effort is spent peeling the layers of murk and dusting and combing for clues. Details absolutely necessary to get the our own jobs done. I have not come across any book that touches such job factors and conditions. Yes, a great deal is all about social engineering and dealing with the human factor to chart and plot the political boundaries (official or otherwise, public or hidden) and knowing the exact people to get things done. And *that* is part and parcel of our daily routine. I would *love* to read about the experience of others in their quest to overcome these hurdles of "lost technology" or "civilization". If there can really ever be a systematic guideline or approach in the unearthing and self inference of these artifacts? Am I crazy to wish for such a book?
0