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
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
16,828 | 08/19/2008 20:00:33 | 1,797 | 08/18/2008 15:46:11 | 199 | 21 | How do you do a case insensitive search using a pattern modifier using less ? | It seems like the only way to do this is to pass the -i parameter in when you initially run less. Does anyone know of some secret hack to make something like this work
/something to search for/i
? | unix | searching | null | null | null | null | open | How do you do a case insensitive search using a pattern modifier using less ?
===
It seems like the only way to do this is to pass the -i parameter in when you initially run less. Does anyone know of some secret hack to make something like this work
/something to search for/i
? | 0 |
16,829 | 08/19/2008 20:01:30 | 2,017 | 08/19/2008 20:01:30 | 1 | 0 | Structure of Projects in Version Control | I know there are at least 10 different ways to structure project in version control. I'm curious what some methods being used are and which ones work for you. I've worked with SVN, TFS, and currently/unfortunately VSS. I've seen version control implemented very poorly and just OK, but never great.
Just to get the ball rolling, here is a review of things I've seen.
This example is SVN-based, but applies to most VCS's.
1. branch the individual projects that are part of site
/division/web/projectName/vb/src/[trunk|branches|tags]
2. branch the whole site, in the case I've seen, the whole site except for core components was branched.
/division/[trunk|branches|tags]/web/projectName/vb/src/
3. Use main-line a default, only branch when necessary for **huge** changes. | version-control | null | null | null | null | null | open | Structure of Projects in Version Control
===
I know there are at least 10 different ways to structure project in version control. I'm curious what some methods being used are and which ones work for you. I've worked with SVN, TFS, and currently/unfortunately VSS. I've seen version control implemented very poorly and just OK, but never great.
Just to get the ball rolling, here is a review of things I've seen.
This example is SVN-based, but applies to most VCS's.
1. branch the individual projects that are part of site
/division/web/projectName/vb/src/[trunk|branches|tags]
2. branch the whole site, in the case I've seen, the whole site except for core components was branched.
/division/[trunk|branches|tags]/web/projectName/vb/src/
3. Use main-line a default, only branch when necessary for **huge** changes. | 0 |
16,832 | 08/19/2008 20:06:55 | 1,185 | 08/13/2008 12:02:03 | 435 | 48 | Lightweight source control | I am looking for a lightweight source control system for use on "hobby" projects with only one person (myself) working on the project. Does anyone have any suggestions? | sourcecontrol | null | null | null | null | null | open | Lightweight source control
===
I am looking for a lightweight source control system for use on "hobby" projects with only one person (myself) working on the project. Does anyone have any suggestions? | 0 |
16,833 | 08/19/2008 20:07:43 | 1,786 | 08/18/2008 14:52:43 | 21 | 4 | How do you download and extract a gzipped file with C#? | I need to periodically download, extract and save the contents of http://data.dot.state.mn.us/dds/det_sample.xml.gz to disk. Anyone have experience downloading gzipped files with C#? | c# | gzip | null | null | null | null | open | How do you download and extract a gzipped file with C#?
===
I need to periodically download, extract and save the contents of http://data.dot.state.mn.us/dds/det_sample.xml.gz to disk. Anyone have experience downloading gzipped files with C#? | 0 |
16,860 | 08/19/2008 20:18:09 | 149 | 08/02/2008 15:03:56 | 368 | 21 | Getting Started with Unit Testing | Unit tests are small blocks of innocuous code that use your assumptions to see if a function returns the expected result.
My question is, what are the current "best practices" in terms of tools as well as when and where to use unit testing as part of your daily coding?
Lets try to be somewhat language agnostic and cover all the bases. | bestpractices | unit-testing | null | null | null | null | open | Getting Started with Unit Testing
===
Unit tests are small blocks of innocuous code that use your assumptions to see if a function returns the expected result.
My question is, what are the current "best practices" in terms of tools as well as when and where to use unit testing as part of your daily coding?
Lets try to be somewhat language agnostic and cover all the bases. | 0 |
16,861 | 08/19/2008 20:18:31 | 2,019 | 08/19/2008 20:18:31 | 1 | 0 | Sanitising user input using Python | What's the best way to sanitise user input for a Python-based web app? Is there a single function to remove HTML chars and any other necessary characters combinations to ensure that an XSS or SQL injection attack isn't possible?
| python | xss | null | null | null | null | open | Sanitising user input using Python
===
What's the best way to sanitise user input for a Python-based web app? Is there a single function to remove HTML chars and any other necessary characters combinations to ensure that an XSS or SQL injection attack isn't possible?
| 0 |
16,873 | 08/19/2008 20:23:25 | 381 | 08/05/2008 10:39:26 | 975 | 18 | Choosing a multiplier for a (string) hash function | Do you have any advice/rules on selecting a multiplier to use in a (multiplicative) hash function. The function is computing the hash value of a string. | performance | algorithm | null | null | null | null | open | Choosing a multiplier for a (string) hash function
===
Do you have any advice/rules on selecting a multiplier to use in a (multiplicative) hash function. The function is computing the hash value of a string. | 0 |
16,888 | 08/19/2008 20:30:59 | 1,858 | 08/18/2008 22:50:18 | 6 | 0 | Separating What from How - Design in an Agile Environment | In an agile (scrum) environment, how do you get product management to create small enough backlog items or stories without having them do all the design, which is not their specialty? In other words, how do you separate the what (business requirements) from the how (design) in agile development? | agile | productmanagement | scrum | null | null | null | open | Separating What from How - Design in an Agile Environment
===
In an agile (scrum) environment, how do you get product management to create small enough backlog items or stories without having them do all the design, which is not their specialty? In other words, how do you separate the what (business requirements) from the how (design) in agile development? | 0 |
16,891 | 08/19/2008 20:32:42 | 1,789 | 08/18/2008 15:06:40 | 1 | 0 | VS 2008 - ctrl-tab behavior | As you may know, in VS 2008 ctrl+tab brings up a nifty navigator window with a thumbnail of each file. I love it, but there is one tiny thing that is annoying to me about this feature: *the window stays around after releasing the ctrl key*. When doing an alt-tab in windows, you can hit tab to get to the item you want (while still holding down the alt key), and then when you find what you want, *lifting up* on the alt key selects that item.
I wish VS 2008 would do the same. For me, when I lift off of ctrl, the window is still there. I have to hit enter to actually select the item. I find this annoying.
Does anyone know how to make VS 2008 dismiss the window on the *release* of the ctrl key? Thanks! | vs2008 | ide | null | null | null | null | open | VS 2008 - ctrl-tab behavior
===
As you may know, in VS 2008 ctrl+tab brings up a nifty navigator window with a thumbnail of each file. I love it, but there is one tiny thing that is annoying to me about this feature: *the window stays around after releasing the ctrl key*. When doing an alt-tab in windows, you can hit tab to get to the item you want (while still holding down the alt key), and then when you find what you want, *lifting up* on the alt key selects that item.
I wish VS 2008 would do the same. For me, when I lift off of ctrl, the window is still there. I have to hit enter to actually select the item. I find this annoying.
Does anyone know how to make VS 2008 dismiss the window on the *release* of the ctrl key? Thanks! | 0 |
16,897 | 08/19/2008 20:34:13 | 2,015 | 08/19/2008 19:42:43 | 1 | 2 | Delphi and COM: TLB and maintenance issues | In the company that i work, we develop all the GUI in C#, but the application kernel is mainly developed in Delphi 5 (for historical reasons), with a lot of components made in COM+. Related to this very specific sort of application a I two questions:
- Experienced guys in Delphi and/or COM, do you have any workrounds to work with the buggy TLB interface ?
Some of the bugs are: IDE crashing during edition of a large TLB, lost of methods IDs, TLB corruption, etc.
Here, we haven't found any good solution. Actually we tried do upgrade do the new 2007 version. But the new IDE TLB interface has the same bugs that we found before.
- How do you control TLBs versions ? The TLB file is in a binary format and conflict resolutions are very hard to do. We tried to do it exporting the interfaces descriptions to IDL and commiting into CVS, but we didn't found any good way to generate TLBs from IDL using Delphi. Additionaly, the MIDL tool provided by Microsoft, didn't parse correctly the IDL files that we exported from delphi.
Thanks in advance,
Gustavo
| delphi | com | null | null | null | null | open | Delphi and COM: TLB and maintenance issues
===
In the company that i work, we develop all the GUI in C#, but the application kernel is mainly developed in Delphi 5 (for historical reasons), with a lot of components made in COM+. Related to this very specific sort of application a I two questions:
- Experienced guys in Delphi and/or COM, do you have any workrounds to work with the buggy TLB interface ?
Some of the bugs are: IDE crashing during edition of a large TLB, lost of methods IDs, TLB corruption, etc.
Here, we haven't found any good solution. Actually we tried do upgrade do the new 2007 version. But the new IDE TLB interface has the same bugs that we found before.
- How do you control TLBs versions ? The TLB file is in a binary format and conflict resolutions are very hard to do. We tried to do it exporting the interfaces descriptions to IDL and commiting into CVS, but we didn't found any good way to generate TLBs from IDL using Delphi. Additionaly, the MIDL tool provided by Microsoft, didn't parse correctly the IDL files that we exported from delphi.
Thanks in advance,
Gustavo
| 0 |
16,918 | 08/19/2008 20:44:48 | 2,018 | 08/19/2008 20:14:45 | 1 | 4 | Beginners Guide to Haskell? | I've been looking for a decent guide to Haskell for some time, but haven't been able to find one that seems interesting enough to read through and/or makes sense.
I've had prior exposure to Haskell a few years back, but I can't remember much about it. I remember the "Aha!"-feeling was incredible when I finally got it, and it was actually fun to play with, so I'm looking to rediscover the lost art of Haskell.
I'm familiar with Ruby and its functional programming tricks, so I think I'm not completely in the dark. Any links? | functionalprogramming | haskell | null | null | null | 05/01/2012 23:08:09 | not constructive | Beginners Guide to Haskell?
===
I've been looking for a decent guide to Haskell for some time, but haven't been able to find one that seems interesting enough to read through and/or makes sense.
I've had prior exposure to Haskell a few years back, but I can't remember much about it. I remember the "Aha!"-feeling was incredible when I finally got it, and it was actually fun to play with, so I'm looking to rediscover the lost art of Haskell.
I'm familiar with Ruby and its functional programming tricks, so I think I'm not completely in the dark. Any links? | 4 |
16,926 | 08/19/2008 20:49:47 | 744 | 08/08/2008 13:43:38 | 11 | 1 | Tool for generating CSS skeleton? | My HTML is all marked up, ready to make it rain CSS. The problem is that I have to go back and find out what all my id and class names are so I can get started. What I need is a tool that parses my HTML and spits out a stylesheet with all the possible elements ready to be styled (maybe even with some defaults). Does such a tool exist? | css | markup | null | null | null | null | open | Tool for generating CSS skeleton?
===
My HTML is all marked up, ready to make it rain CSS. The problem is that I have to go back and find out what all my id and class names are so I can get started. What I need is a tool that parses my HTML and spits out a stylesheet with all the possible elements ready to be styled (maybe even with some defaults). Does such a tool exist? | 0 |
16,935 | 08/19/2008 20:53:53 | 2,024 | 08/19/2008 20:53:53 | 1 | 0 | Ant's <javac> tasks throws StackOverflowException | I'm trying to compile over 100 java classes from different packages from a clean
directory (no incremental compiles) using the following ant tasks:
<target name="-main-src-depend">
<depend srcdir="${src.dir}"
destdir="${bin.dir}"
cache="${cache.dir}"
closure="true"/>
</target>
<target name="compile" depends="-main-src-depend"
description="Compiles the project.">
<echo>Compiling</echo>
<javac target="${javac.target}"
source="${javac.source}"
debug="${javac.debug}"
srcdir="${src.dir}"
destdir="${bin.dir}">
<classpath>
<path refid="runtime.classpath"/>
<path refid="compile.classpath"/>
</classpath>
</javac>
</target>
However, the first time a run the compile task I always get a StackOverflowException. If I run the task again the compiler does an incremental build and everything works fine. This is undesirable since we are using [CruiseControl][1] to do an automatic daily build and this is causing false build failures.
As a quick-and-dirty solution I have created 2 separate tasks, compiling portions of the project in each. I really don't think this solution will hold as more classes are added in the future, and I don't want to be adding new compile tasks every time we hit the "compile limit".
[1]: http://cruisecontrol.sourceforge.net/ | java | ant | null | null | null | null | open | Ant's <javac> tasks throws StackOverflowException
===
I'm trying to compile over 100 java classes from different packages from a clean
directory (no incremental compiles) using the following ant tasks:
<target name="-main-src-depend">
<depend srcdir="${src.dir}"
destdir="${bin.dir}"
cache="${cache.dir}"
closure="true"/>
</target>
<target name="compile" depends="-main-src-depend"
description="Compiles the project.">
<echo>Compiling</echo>
<javac target="${javac.target}"
source="${javac.source}"
debug="${javac.debug}"
srcdir="${src.dir}"
destdir="${bin.dir}">
<classpath>
<path refid="runtime.classpath"/>
<path refid="compile.classpath"/>
</classpath>
</javac>
</target>
However, the first time a run the compile task I always get a StackOverflowException. If I run the task again the compiler does an incremental build and everything works fine. This is undesirable since we are using [CruiseControl][1] to do an automatic daily build and this is causing false build failures.
As a quick-and-dirty solution I have created 2 separate tasks, compiling portions of the project in each. I really don't think this solution will hold as more classes are added in the future, and I don't want to be adding new compile tasks every time we hit the "compile limit".
[1]: http://cruisecontrol.sourceforge.net/ | 0 |
16,939 | 08/19/2008 20:57:24 | 1,048 | 08/11/2008 19:34:31 | 18 | 5 | Difference between a byte array and MemoryStream | I am reading a binary file into a parsing program. I will need to iterate through the file and look for certain markers so I can split the file up and pass those parts into their respective object’s constructors.
Is there an advantage to holding the file as a stream, either MemoryStream or FileStream, or should it be converted into a byte[] array?
Keith
| performance | comparison | null | null | null | null | open | Difference between a byte array and MemoryStream
===
I am reading a binary file into a parsing program. I will need to iterate through the file and look for certain markers so I can split the file up and pass those parts into their respective object’s constructors.
Is there an advantage to holding the file as a stream, either MemoryStream or FileStream, or should it be converted into a byte[] array?
Keith
| 0 |
16,940 | 08/19/2008 20:57:28 | 230 | 08/03/2008 19:32:46 | 529 | 28 | VS 2008 - Detachable code tabs | Admittedly this might not be a problem on larger screens, but my employer is abit tight and refuses to buy monitors larger than 19inch, this means that I dont have much screen real estate to view all the Visual Studio windows and my code at the same time, or two pieces of code at once. Is there anything that allows me to detach the code panels so that I can view two different classes at once on each of my screens? | vs2008 | null | null | null | null | null | open | VS 2008 - Detachable code tabs
===
Admittedly this might not be a problem on larger screens, but my employer is abit tight and refuses to buy monitors larger than 19inch, this means that I dont have much screen real estate to view all the Visual Studio windows and my code at the same time, or two pieces of code at once. Is there anything that allows me to detach the code panels so that I can view two different classes at once on each of my screens? | 0 |
16,963 | 08/19/2008 21:09:30 | 1,368 | 08/14/2008 18:57:47 | 73 | 7 | Who actually uses DataGrid/GridView/FormVIew/etc in product apps? | Curious if others feel the same as me. To me, controls such as datagrid/gridview/formview/etc. are great for presentations or demo's only. To take the time and tweak this controls, override their default behavior (hooking into their silly events etc.) is a big headache. The only control that I use is the repeater, since it offers me the most flexibility over the others.
**In short, they are pretty much bloatware.**
I'd rather weave my own html/css, use my own custom paging queries.
Again, if you need to throw up a quick page these controls are great (especially if you are trying to woo people into the ease of .net development hehe).
I must be in the minority, otherwise MS wouldn't dedicated so much development time on these types of controls... | datacontrols | .net | bloatware | null | null | null | open | Who actually uses DataGrid/GridView/FormVIew/etc in product apps?
===
Curious if others feel the same as me. To me, controls such as datagrid/gridview/formview/etc. are great for presentations or demo's only. To take the time and tweak this controls, override their default behavior (hooking into their silly events etc.) is a big headache. The only control that I use is the repeater, since it offers me the most flexibility over the others.
**In short, they are pretty much bloatware.**
I'd rather weave my own html/css, use my own custom paging queries.
Again, if you need to throw up a quick page these controls are great (especially if you are trying to woo people into the ease of .net development hehe).
I must be in the minority, otherwise MS wouldn't dedicated so much development time on these types of controls... | 0 |
16,964 | 08/19/2008 21:10:47 | 614 | 08/07/2008 10:47:20 | 135 | 13 | Creating your own table with CommandArgument buttons in ASP.NET MVC | I'm trying to implement something like this:
<div>
<table>
<thead>
<tr>
<td>Port name</td>
<td>Current port version</td>
<td>New port version</td>
<td>Update</td>
</tr>
</thead>
<% foreach (var ip in Ports) { %>
<tr>
<td><%= ip.PortName %></td>
<td><%= ip.CurrentVersion %></td>
<td><%= ip.NewVersion %></td>
<td><asp:Button ID="btnUpdate" runat="server" Text="Update" CommandArgument="<% ip.PortName %>" /></td>
</tr>
<% } %>
</table>
</div>
The button's CommandArgument property is where my code complains about not being able to resolve symbol 'ip'. Is there any way to do what I'm trying to do? | asp.net-mvc | null | null | null | null | null | open | Creating your own table with CommandArgument buttons in ASP.NET MVC
===
I'm trying to implement something like this:
<div>
<table>
<thead>
<tr>
<td>Port name</td>
<td>Current port version</td>
<td>New port version</td>
<td>Update</td>
</tr>
</thead>
<% foreach (var ip in Ports) { %>
<tr>
<td><%= ip.PortName %></td>
<td><%= ip.CurrentVersion %></td>
<td><%= ip.NewVersion %></td>
<td><asp:Button ID="btnUpdate" runat="server" Text="Update" CommandArgument="<% ip.PortName %>" /></td>
</tr>
<% } %>
</table>
</div>
The button's CommandArgument property is where my code complains about not being able to resolve symbol 'ip'. Is there any way to do what I'm trying to do? | 0 |
16,965 | 08/19/2008 21:11:45 | 2,018 | 08/19/2008 20:14:45 | 23 | 5 | JRuby / Rack deployment | I know this is pretty exotic, but I want to deploy a Ruby web application (not Rails, but Rack based, so it plugs into most Ruby servers just fine) using JRuby. Google and friends give me a few success stories, but mostly rails related and if not, no details on the deployment are provided. The framework I'm using is Ramaze, if it matters.
Any help would be greatly appreciated. | ruby | rack | deployment | webdeploymentproject | webdevelopment | null | open | JRuby / Rack deployment
===
I know this is pretty exotic, but I want to deploy a Ruby web application (not Rails, but Rack based, so it plugs into most Ruby servers just fine) using JRuby. Google and friends give me a few success stories, but mostly rails related and if not, no details on the deployment are provided. The framework I'm using is Ramaze, if it matters.
Any help would be greatly appreciated. | 0 |
16,969 | 08/19/2008 21:13:37 | 2,009 | 08/19/2008 19:16:03 | 1 | 0 | .net solution subversion best practices? | There are so many examples of how to set up your dotnet projects but none seemed to fit our situation.
We have one solution with multiple applications, multiple dependencies. We're on SourceSafe currently and are planning to move to subversion but are finding it difficult to organize our source the right way.
- Example solution
- App1
- App2
- BizObjects
- DataAccess
- CustomControls
- Dependencies
- BizObjects->DataAccess
- App1->CustomControls
- App1->BizObjects
- App1->DataAccess
- App2->CustomControls
- App2->BizObjects
We also have a configuration management system which deploys (via copy from database) depending on which workload the operator is working. We mark an application "release" with a version and to that release we add multiple file dependencies. Bear in mind the solution we have in place now is an attempt to band-aid the old (windows 3.1 developed) solution to work with .NET file/dependency structure.
In the case of App1 we have App1.exe, BizObjects.dll, DataAccess.dll, and CustomControls.dll.
We have the same set of dependencies for App2 due to BizObjects referencing DataAccess -- but this is defined manually. We don't have a system in place to identify the dependency tree.
Each of the dependencies for a "release" is a file and version id. And the same application could contain different versions for each file for a different workload.
1. Where in the world have we gone wrong? Did we go wrong?
2. How can we structure a svn source tree to accommodate the deployment requirements?
- or
3. how can we re-structure the code the better support a deployment strategy which makes sense for our setup?
We have an old and over-engineered solution to (it would seem) a relatively simple problem. Can anyone steer me/us in the right direction?
edit: I read this(http://stackoverflow.com/questions/3667/what-is-your-favorite-web-app-deployment-workflow-with-svn) question and remembered we also have the same dev/test/prod areas which the code must move through.
| visual-studio | subversion | sourcecontrol | configurationmanagement | deployment | null | open | .net solution subversion best practices?
===
There are so many examples of how to set up your dotnet projects but none seemed to fit our situation.
We have one solution with multiple applications, multiple dependencies. We're on SourceSafe currently and are planning to move to subversion but are finding it difficult to organize our source the right way.
- Example solution
- App1
- App2
- BizObjects
- DataAccess
- CustomControls
- Dependencies
- BizObjects->DataAccess
- App1->CustomControls
- App1->BizObjects
- App1->DataAccess
- App2->CustomControls
- App2->BizObjects
We also have a configuration management system which deploys (via copy from database) depending on which workload the operator is working. We mark an application "release" with a version and to that release we add multiple file dependencies. Bear in mind the solution we have in place now is an attempt to band-aid the old (windows 3.1 developed) solution to work with .NET file/dependency structure.
In the case of App1 we have App1.exe, BizObjects.dll, DataAccess.dll, and CustomControls.dll.
We have the same set of dependencies for App2 due to BizObjects referencing DataAccess -- but this is defined manually. We don't have a system in place to identify the dependency tree.
Each of the dependencies for a "release" is a file and version id. And the same application could contain different versions for each file for a different workload.
1. Where in the world have we gone wrong? Did we go wrong?
2. How can we structure a svn source tree to accommodate the deployment requirements?
- or
3. how can we re-structure the code the better support a deployment strategy which makes sense for our setup?
We have an old and over-engineered solution to (it would seem) a relatively simple problem. Can anyone steer me/us in the right direction?
edit: I read this(http://stackoverflow.com/questions/3667/what-is-your-favorite-web-app-deployment-workflow-with-svn) question and remembered we also have the same dev/test/prod areas which the code must move through.
| 0 |
16,970 | 08/19/2008 21:13:55 | 1,043 | 08/11/2008 18:08:32 | 489 | 40 | Recommended notes/doc service that offers an API? | I'm looking for a good online service for notes/documents (think Google Docs) that has a decent web UI and offers an API for clients to read/write the stored data.
Google Docs is almost perfect - except there's no way to update the contents of existing documents :(
Any suggestions appreciated!
| document-server | null | null | null | null | null | open | Recommended notes/doc service that offers an API?
===
I'm looking for a good online service for notes/documents (think Google Docs) that has a decent web UI and offers an API for clients to read/write the stored data.
Google Docs is almost perfect - except there's no way to update the contents of existing documents :(
Any suggestions appreciated!
| 0 |
16,971 | 08/19/2008 21:14:32 | 1,976 | 08/19/2008 16:34:45 | 11 | 1 | How do I reset an increment identity's starting value in SQL Server | I would like to have a nice template for doing this in development. | mssql | sql-server | identity | null | null | null | open | How do I reset an increment identity's starting value in SQL Server
===
I would like to have a nice template for doing this in development. | 0 |
16,981 | 08/19/2008 21:19:50 | 1,043 | 08/11/2008 18:08:32 | 489 | 40 | If two monitors are good are three monitors better? And how? | I'd be interested to hear peoples thoughts about the productivity gains (or lackof) from moving from a dual to triple monitor setup.
I find a multi-monitor setup indispensable both in the office and at home (for hobby development). Since I start dividing my time 50/50 between development and management I'm beginning to feel that I'm doing a lot more Alt+Tabbing and am considering a third monitor.
On that note - aside from installing a second graphics card are there any other solutions for a triple monitor setup?
Cheers,
A. | productivity | workenvironment | null | null | null | 11/17/2011 22:18:14 | off topic | If two monitors are good are three monitors better? And how?
===
I'd be interested to hear peoples thoughts about the productivity gains (or lackof) from moving from a dual to triple monitor setup.
I find a multi-monitor setup indispensable both in the office and at home (for hobby development). Since I start dividing my time 50/50 between development and management I'm beginning to feel that I'm doing a lot more Alt+Tabbing and am considering a third monitor.
On that note - aside from installing a second graphics card are there any other solutions for a triple monitor setup?
Cheers,
A. | 2 |
16,991 | 08/19/2008 21:26:22 | 2,018 | 08/19/2008 20:14:45 | 23 | 7 | What Ruby IDE do you prefer? | I've been using Eclipse with RDT (not RadRails) a lot lately, and I'm quite happy with it, but I'm wondering if you guys know any decent alternatives. I know NetBeans also supports Ruby these days, but I'm not sure what it has to offer over Eclipse.
Please, list any features you think are brilliant or useful when suggesting an IDE, makes it easier to compare.
Also, I said Ruby, not Rails. While Rails support is a plus, I prefer things to be none Rails-centric. | ruby | ide | editor | null | null | 12/22/2011 03:43:29 | not constructive | What Ruby IDE do you prefer?
===
I've been using Eclipse with RDT (not RadRails) a lot lately, and I'm quite happy with it, but I'm wondering if you guys know any decent alternatives. I know NetBeans also supports Ruby these days, but I'm not sure what it has to offer over Eclipse.
Please, list any features you think are brilliant or useful when suggesting an IDE, makes it easier to compare.
Also, I said Ruby, not Rails. While Rails support is a plus, I prefer things to be none Rails-centric. | 4 |
16,998 | 08/19/2008 21:28:53 | 2,047 | 08/19/2008 23:53:14 | 1 | 0 | Reading "chunked" response with HttpWebResponse | I'm having trouble reading a "chunked" response when using a StreamReader to read the stream returned by GetResponseStream() of a HttpWebResponse:
// response is an HttpWebResponse
StreamReader reader = new StreamReader(response.GetResponseStream());
string output = reader.ReadToEnd(); // throws exception...
When the reader.ReadToEnd() method is called I'm getting the following System.IO.IOException: **Unable to read data from the transport connection: The connection was closed.**
The above code works just fine when server returns a "non-chunked" response.
The only way I've been able to get it to work is to use HTTP/1.0 for the initial request (instead of HTTP/1.1, the default) but this seems like a lame work-around.
Any ideas?
| c# | .net20 | .net-3.5 | http | null | null | open | Reading "chunked" response with HttpWebResponse
===
I'm having trouble reading a "chunked" response when using a StreamReader to read the stream returned by GetResponseStream() of a HttpWebResponse:
// response is an HttpWebResponse
StreamReader reader = new StreamReader(response.GetResponseStream());
string output = reader.ReadToEnd(); // throws exception...
When the reader.ReadToEnd() method is called I'm getting the following System.IO.IOException: **Unable to read data from the transport connection: The connection was closed.**
The above code works just fine when server returns a "non-chunked" response.
The only way I've been able to get it to work is to use HTTP/1.0 for the initial request (instead of HTTP/1.1, the default) but this seems like a lame work-around.
Any ideas?
| 0 |
17,017 | 08/19/2008 21:40:11 | 2,029 | 08/19/2008 21:21:52 | 1 | 0 | How do I parse and convert DateTime's to the RFC 3339 date-time format? | How do I convert a DateTime structure to its equivalent [RFC 3339][1] formatted string representation and/or parse this string representation back to a [DateTime][2] structure? The RFC-3339 date-time format is used in a number of specifications such as the [Atom Syndication Format][3].
[1]: http://www.ietf.org/rfc/rfc3339.txt
[2]: http://msdn.microsoft.com/en-us/library/system.datetime.aspx
[3]: http://www.atomenabled.org/developers/syndication/atom-format-spec.php#date.constructs | datetime | atom | rfc-3339 | null | null | null | open | How do I parse and convert DateTime's to the RFC 3339 date-time format?
===
How do I convert a DateTime structure to its equivalent [RFC 3339][1] formatted string representation and/or parse this string representation back to a [DateTime][2] structure? The RFC-3339 date-time format is used in a number of specifications such as the [Atom Syndication Format][3].
[1]: http://www.ietf.org/rfc/rfc3339.txt
[2]: http://msdn.microsoft.com/en-us/library/system.datetime.aspx
[3]: http://www.atomenabled.org/developers/syndication/atom-format-spec.php#date.constructs | 0 |
17,020 | 08/19/2008 21:42:30 | 1,633 | 08/17/2008 17:30:24 | 76 | 16 | What is the best way to partition terabyte drive in a linux development machine? | I have a new 1 TB drive coming in tomorrow. What is the best way to divide this space for a development workstation?
The biggest problem I think I'm going to have is that some partitions (probably /usr) will become to small after a bit of use. Other partitions are probably to huge. The swap drive for example is currently 2GB (2x 1GB RAM), but it is almost never used (only once that I know of).
| linux | storage | partition | null | null | 11/30/2011 02:43:57 | off topic | What is the best way to partition terabyte drive in a linux development machine?
===
I have a new 1 TB drive coming in tomorrow. What is the best way to divide this space for a development workstation?
The biggest problem I think I'm going to have is that some partitions (probably /usr) will become to small after a bit of use. Other partitions are probably to huge. The swap drive for example is currently 2GB (2x 1GB RAM), but it is almost never used (only once that I know of).
| 2 |
17,032 | 08/19/2008 21:49:07 | 1,853 | 08/18/2008 22:03:57 | 1 | 3 | Should I *always* favour implictly typed local variables in C# 3.0? | [Resharper][1] certainly thinks so, and out of the box it will nag you to convert
Dooberry dooberry = new Dooberry();
to
var dooberry = new Dooberry();
Is that really considered the best style?
[1]: http://resharper.blogspot.com/2008/03/varification-using-implicitly-typed.html | c# | style | null | null | null | null | open | Should I *always* favour implictly typed local variables in C# 3.0?
===
[Resharper][1] certainly thinks so, and out of the box it will nag you to convert
Dooberry dooberry = new Dooberry();
to
var dooberry = new Dooberry();
Is that really considered the best style?
[1]: http://resharper.blogspot.com/2008/03/varification-using-implicitly-typed.html | 0 |
17,054 | 08/19/2008 22:02:21 | 868 | 08/09/2008 22:34:02 | 73 | 9 | Sockets in Pascal | How do you use network sockets in Pascal? | sockets | networking | pascal | null | null | null | open | Sockets in Pascal
===
How do you use network sockets in Pascal? | 0 |
17,056 | 08/19/2008 22:04:13 | 1,925 | 08/19/2008 14:23:13 | 1 | 0 | MSSQL Full Text Searching | I am currently working on an application where we have a mssql database and I need to get a full text search working that allows us to search people's names.
Currently the user can enter a into a name field that searches 3 different varchar cols. First, Last, Middle names
So say I have 3 rows with the following info.
1 - Phillip - J - Fry
2 - Amy - NULL - Wong
3 - Leo - NULL - Wong
If the user enters a name such as 'Fry' it will return row 1. However if they enter Phillip Fry, or Fr, or Phil they get nothing.. and I don't understand why its doing this. If they search for Wong they get rows 2 and 3 if they search for Amy Wong they again get nothing.
Currently the query is using CONTAINSTABLE but I have switched that with FREETEXTTABLE, CONTAINS, and FREETEXT without any noticeable differences in the results. The table methods are be preferred because they return the same results but with ranking.
Here is the query.
....
@Name nvarchar(100),
....
--""s added to prevent crash if searching on more then one word.
DECLARE @SearchString varchar(100)
SET @SearchString = '"'+@Name+'"'
SELECT Per.Lastname, Per.Firstname, Per.MiddleName
FROM Person as Per
INNER JOIN CONTAINSTABLE(Person, (LastName, Firstname, MiddleName), @SearchString)
AS KEYTBL
ON Per.Person_ID = KEYTBL.[KEY]
WHERE KEY_TBL.RANK > 2
ORDER BY KEYTBL.RANK DESC;
....
Any Ideas why this full text search is not working correctly? | mssql | search | null | null | null | null | open | MSSQL Full Text Searching
===
I am currently working on an application where we have a mssql database and I need to get a full text search working that allows us to search people's names.
Currently the user can enter a into a name field that searches 3 different varchar cols. First, Last, Middle names
So say I have 3 rows with the following info.
1 - Phillip - J - Fry
2 - Amy - NULL - Wong
3 - Leo - NULL - Wong
If the user enters a name such as 'Fry' it will return row 1. However if they enter Phillip Fry, or Fr, or Phil they get nothing.. and I don't understand why its doing this. If they search for Wong they get rows 2 and 3 if they search for Amy Wong they again get nothing.
Currently the query is using CONTAINSTABLE but I have switched that with FREETEXTTABLE, CONTAINS, and FREETEXT without any noticeable differences in the results. The table methods are be preferred because they return the same results but with ranking.
Here is the query.
....
@Name nvarchar(100),
....
--""s added to prevent crash if searching on more then one word.
DECLARE @SearchString varchar(100)
SET @SearchString = '"'+@Name+'"'
SELECT Per.Lastname, Per.Firstname, Per.MiddleName
FROM Person as Per
INNER JOIN CONTAINSTABLE(Person, (LastName, Firstname, MiddleName), @SearchString)
AS KEYTBL
ON Per.Person_ID = KEYTBL.[KEY]
WHERE KEY_TBL.RANK > 2
ORDER BY KEYTBL.RANK DESC;
....
Any Ideas why this full text search is not working correctly? | 0 |
17,057 | 08/19/2008 22:05:00 | 1,929 | 08/19/2008 14:25:01 | 1 | 0 | What is the best way to gzip and cache static images in Asp.net mvc | I'm trying to find the best way to speed up the delivery of the static images that compose the design of an mvc site. The images are not gzipped, nor cached in the server or on the client (with content expire). Options are:
1. Find why images are not cached and gzipped direcly from IIS6
2. Write a specialized http handler
3. Register a special route for static images and write a bynary actionresult method
What could be the best solution in terms of performance? | asp.net-mvc | .net-2.0 | null | null | null | null | open | What is the best way to gzip and cache static images in Asp.net mvc
===
I'm trying to find the best way to speed up the delivery of the static images that compose the design of an mvc site. The images are not gzipped, nor cached in the server or on the client (with content expire). Options are:
1. Find why images are not cached and gzipped direcly from IIS6
2. Write a specialized http handler
3. Register a special route for static images and write a bynary actionresult method
What could be the best solution in terms of performance? | 0 |
17,085 | 08/19/2008 22:18:17 | 578 | 08/06/2008 22:07:45 | 33 | 4 | Esacping XML tag contents | I have a simple CAML query like
<Where><Eq><Field="FieldName"><Value Type="Text">Value text</Value></Field></Eq></Where>
And I have a variable to substitute for "Value text". What's the best way to validate/escape the text that is substituted here in the .NET framework?
I've done a quick web search on this problem but all what I found was [System.Xml.Convert](http://msdn.microsoft.com/en-us/library/system.xml.xmlconvert.aspx) class but this seems to be not quite what I need here.
I no I could have gone with an XmlWriter here, but it seems like a lot of code for such a simple task where I just need to make sure that "Value text" part is formatted well.
| .net | xml | framework | escaping | encode | null | open | Esacping XML tag contents
===
I have a simple CAML query like
<Where><Eq><Field="FieldName"><Value Type="Text">Value text</Value></Field></Eq></Where>
And I have a variable to substitute for "Value text". What's the best way to validate/escape the text that is substituted here in the .NET framework?
I've done a quick web search on this problem but all what I found was [System.Xml.Convert](http://msdn.microsoft.com/en-us/library/system.xml.xmlconvert.aspx) class but this seems to be not quite what I need here.
I no I could have gone with an XmlWriter here, but it seems like a lot of code for such a simple task where I just need to make sure that "Value text" part is formatted well.
| 0 |
17,098 | 08/19/2008 22:26:12 | 1,851 | 08/18/2008 21:56:51 | 1 | 0 | What's the best way to authenticate over WCF? | What's the best way to implement authentication over WCF?
I'd prefer to not use WS-* as it needs to be transport independant.
Should I "roll my own"? Is there any guidance for doing that (articles/blog posts)?
Or is there some way to *(and should I)* use the built in ASP.NET Membership and Profile providers on the server side? | .net | asp.net | wcf | authentication | membership | null | open | What's the best way to authenticate over WCF?
===
What's the best way to implement authentication over WCF?
I'd prefer to not use WS-* as it needs to be transport independant.
Should I "roll my own"? Is there any guidance for doing that (articles/blog posts)?
Or is there some way to *(and should I)* use the built in ASP.NET Membership and Profile providers on the server side? | 0 |
17,106 | 08/19/2008 22:29:47 | 1,428 | 08/15/2008 15:27:39 | 31 | 5 | How to generate sample XML documents from their DTD or XSD? | We are developing an application that involves a substantial amount of XML transformations. We do not have any proper input test data per se, only DTD or XSD files. We'd like to generate our test data ourselves from these files. Is there an easy/free way to do that? | xml | xsd | dtd | testdata | null | null | open | How to generate sample XML documents from their DTD or XSD?
===
We are developing an application that involves a substantial amount of XML transformations. We do not have any proper input test data per se, only DTD or XSD files. We'd like to generate our test data ourselves from these files. Is there an easy/free way to do that? | 0 |
17,107 | 08/19/2008 22:29:53 | 1,467 | 08/15/2008 17:35:39 | 56 | 8 | What's the best way to code a desktop application-like menu bar in Javascript? | I'm looking to create a menu bar similar to those found in desktop applications using html and javascript.
I don't mind using a framework like jQuery (in fact I'm already using jQuery for other behaviour in the app), but I'd like to avoid using a plugin or an external js solution (the idea is to keep it as light and as tightly-controlled as possible). Any suggestions? | javascript | user-interface | jquery | null | null | null | open | What's the best way to code a desktop application-like menu bar in Javascript?
===
I'm looking to create a menu bar similar to those found in desktop applications using html and javascript.
I don't mind using a framework like jQuery (in fact I'm already using jQuery for other behaviour in the app), but I'd like to avoid using a plugin or an external js solution (the idea is to keep it as light and as tightly-controlled as possible). Any suggestions? | 0 |
17,108 | 08/19/2008 22:31:40 | 1,363 | 08/14/2008 18:24:19 | 3 | 1 | Where to start with CruiseControl.NET | I'm setting up my team's source control + build/integration process from scratch. We were using VSS and a tool we created in-house to perform the build process. We decided to move on to a more modern environment. I have the SVN running, and I would like to set a continuous integration process with CruiseControl.NET.
Is there a good step-by-step starter guide that will get me started with the best practices of this tool? | continuous-integration | cruisecontrol.net | null | null | null | null | open | Where to start with CruiseControl.NET
===
I'm setting up my team's source control + build/integration process from scratch. We were using VSS and a tool we created in-house to perform the build process. We decided to move on to a more modern environment. I have the SVN running, and I would like to set a continuous integration process with CruiseControl.NET.
Is there a good step-by-step starter guide that will get me started with the best practices of this tool? | 0 |
17,117 | 08/19/2008 22:35:25 | 342 | 08/04/2008 19:59:52 | 347 | 59 | C++ std::tr2 for 2005 | Is Boost the only way for VS2005 users experience TR2? Also is there a idiot proof way of downloading only the TR2 related packages?
I was looking at the boost installer provided by BoostPro Consulting. If I select the options for all the threading options with all the packages for MSVC8 it requires 1.1GB. While I am not short of space, it seems ridiculous that a **library** needs over a gigabyte of space and it takes BPC a long time to catch up with the current release.
What packages do I need? I'm really only interested in those that comprise std::tr2 and can find that out by comparing those on offer to those in from the TR2 report and selecting those from the list but even then it isn't clear what is needed and the fact that it is a version behind annoys me.
I know from previous encounters with Boost (1.33.1) that self compiling is a miserable experience: A lot of time wasted to get it started and then a hoard of errors passes across your screen faster than you can read, so what you are left with is an uneasy feeling that something is broken but you don't quite know what.
I've never had these problems with any Apache library but that is another rant... | c++ | boost | tr2 | vs2005 | null | null | open | C++ std::tr2 for 2005
===
Is Boost the only way for VS2005 users experience TR2? Also is there a idiot proof way of downloading only the TR2 related packages?
I was looking at the boost installer provided by BoostPro Consulting. If I select the options for all the threading options with all the packages for MSVC8 it requires 1.1GB. While I am not short of space, it seems ridiculous that a **library** needs over a gigabyte of space and it takes BPC a long time to catch up with the current release.
What packages do I need? I'm really only interested in those that comprise std::tr2 and can find that out by comparing those on offer to those in from the TR2 report and selecting those from the list but even then it isn't clear what is needed and the fact that it is a version behind annoys me.
I know from previous encounters with Boost (1.33.1) that self compiling is a miserable experience: A lot of time wasted to get it started and then a hoard of errors passes across your screen faster than you can read, so what you are left with is an uneasy feeling that something is broken but you don't quite know what.
I've never had these problems with any Apache library but that is another rant... | 0 |
17,125 | 08/19/2008 22:45:19 | 1,782 | 08/18/2008 14:30:58 | 50 | 6 | What are real life applications of yield? | I know what `yield` does, and I've seen a few examples, but I can't think of real life applications, have you used it to solve some specific problem?
(Ideally some problem that cannot be solved some other way) | c# | .net | null | null | null | null | open | What are real life applications of yield?
===
I know what `yield` does, and I've seen a few examples, but I can't think of real life applications, have you used it to solve some specific problem?
(Ideally some problem that cannot be solved some other way) | 0 |
17,127 | 08/19/2008 22:46:21 | 1,323 | 08/14/2008 14:22:11 | 53 | 4 | Can you link 68K code compiled with CodeWarrior for Palm OS with code compiled with PRC-Tools (GCC)? | I've got a Palm OS/Garnet 68K application that uses a third-party static library built with CodeWarrior. Can I rebuilt the application using PRC-Tools, the port of GCC for the Palm OS platform and still link with the third-party library? | palm-os | codewarrior | prc-tools | null | null | null | open | Can you link 68K code compiled with CodeWarrior for Palm OS with code compiled with PRC-Tools (GCC)?
===
I've got a Palm OS/Garnet 68K application that uses a third-party static library built with CodeWarrior. Can I rebuilt the application using PRC-Tools, the port of GCC for the Palm OS platform and still link with the third-party library? | 0 |
17,140 | 08/19/2008 22:53:47 | 432 | 08/05/2008 17:18:46 | 780 | 40 | How do you spawn another process in C? | How do you run an external program and pass it command line parameters using C? If you have to use operating system API, include a solution for Windows, Mac, and Linux. | c | api | process | null | null | null | open | How do you spawn another process in C?
===
How do you run an external program and pass it command line parameters using C? If you have to use operating system API, include a solution for Windows, Mac, and Linux. | 0 |
17,170 | 08/19/2008 23:09:54 | 1,560 | 08/16/2008 17:17:39 | 1 | 1 | When to use IList and when to use List | I know that IList is the interface and List is the concrete type but I still don't know when to use each one. What I'm doing now is if I don't need the Sort or FindAll methods I use the interface. Am I right? Is there a better way to decide when to use the interface or the concrete type? | c# | .net | null | null | null | null | open | When to use IList and when to use List
===
I know that IList is the interface and List is the concrete type but I still don't know when to use each one. What I'm doing now is if I don't need the Sort or FindAll methods I use the interface. Am I right? Is there a better way to decide when to use the interface or the concrete type? | 0 |
17,172 | 08/19/2008 23:11:49 | 40 | 08/01/2008 12:48:12 | 1,648 | 146 | Implementing permissions in PHP | I've tried to do this several times with no luck. After reading [this post][1], it made me interested in doing this again. So can anyone tell me why the following doesn't work?
<?php
$guest = 1;
$editor = 2;
$admin = 4;
$user = $editor;
if( $user == ($editor | $admin) ) {
echo "Test";
}
?>
[1]: http://stackoverflow.com/questions/1451/what-is-the-best-way-to-handle-multiple-permission-types#1477 | php | permissions | null | null | null | null | open | Implementing permissions in PHP
===
I've tried to do this several times with no luck. After reading [this post][1], it made me interested in doing this again. So can anyone tell me why the following doesn't work?
<?php
$guest = 1;
$editor = 2;
$admin = 4;
$user = $editor;
if( $user == ($editor | $admin) ) {
echo "Test";
}
?>
[1]: http://stackoverflow.com/questions/1451/what-is-the-best-way-to-handle-multiple-permission-types#1477 | 0 |
17,175 | 08/19/2008 23:16:20 | 5 | 07/31/2008 14:22:31 | 1,455 | 73 | What's your top feature request for Silverlight? | I'll take away the obvious one here: mic and webcam support. Other than that, if you ran the Silverlight team, what would your highest priority be for Silverlight 3?
Disclaimer: If we get some good responses, I'll pass them along to folks I know on the Silverlight team. Is that cool? I mean, this site will be public soon enough, so they could find it if they wanted anyhow. | silverlight | null | null | null | null | null | open | What's your top feature request for Silverlight?
===
I'll take away the obvious one here: mic and webcam support. Other than that, if you ran the Silverlight team, what would your highest priority be for Silverlight 3?
Disclaimer: If we get some good responses, I'll pass them along to folks I know on the Silverlight team. Is that cool? I mean, this site will be public soon enough, so they could find it if they wanted anyhow. | 0 |
17,181 | 08/19/2008 23:19:18 | 1,556 | 08/16/2008 16:41:03 | 163 | 5 | Test Cases VS ASSERTION statement | In my most C++ project I heavily used ASSERTION statement as following:
int doWonderfulThings(const int* fantasticData)
{
ASSERT(fantasticData);
if(!fantasticData)
return -1;
// ,,,
return WOW_VALUE;
}
But TDD community seems like to enjoy doing something like this:
int doMoreWonderfulThings(const int* fantasticData)
{
if(!fantasticData)
return ERROR_VALUE;
// ...
return AHA_VALUE;
}
TEST(TDD_Enjoy)
{
ASSERT_EQ(ERROR_VALUE, doMoreWonderfulThings(0L));
ASSERT_EQ(AHA_VALUE, doMoreWonderfulThings("Foo"));
}
Just with my experiences first approaches let me remove so many subtle bugs.
But TDD approaches are very smart idea to handle legacy codes.
"Google" - they compare "FIRST METHOD" to "Walk the shore with life-vest, swim ocean without any safe guard".
Which one is better?
Which one makes software robust?
| c++ | tdd | defensive-programming | null | null | null | open | Test Cases VS ASSERTION statement
===
In my most C++ project I heavily used ASSERTION statement as following:
int doWonderfulThings(const int* fantasticData)
{
ASSERT(fantasticData);
if(!fantasticData)
return -1;
// ,,,
return WOW_VALUE;
}
But TDD community seems like to enjoy doing something like this:
int doMoreWonderfulThings(const int* fantasticData)
{
if(!fantasticData)
return ERROR_VALUE;
// ...
return AHA_VALUE;
}
TEST(TDD_Enjoy)
{
ASSERT_EQ(ERROR_VALUE, doMoreWonderfulThings(0L));
ASSERT_EQ(AHA_VALUE, doMoreWonderfulThings("Foo"));
}
Just with my experiences first approaches let me remove so many subtle bugs.
But TDD approaches are very smart idea to handle legacy codes.
"Google" - they compare "FIRST METHOD" to "Walk the shore with life-vest, swim ocean without any safe guard".
Which one is better?
Which one makes software robust?
| 0 |
17,194 | 08/19/2008 23:24:47 | 1,199,387 | 08/06/2008 23:58:10 | 194 | 14 | SQL query to compare product sales by month | I have a Monthly Status database view I need to build a report based on. The data in the view looks something like this:
<table>
<tr><th>Category</th><th>Revenue</th><th>Yearh</th><th>Month</th></tr>
<tr><td>Bikes</td><td>10 000</td><td>2008</td><td>1</td>
<tr><td>Bikes</td><td>12 000</td><td>2008</td><td>2</td>
<tr><td>Bikes</td><td>12 000</td><td>2008</td><td>3</td>
<tr><td>Bikes</td><td>15 000</td><td>2008</td><td>1</td>
<tr><td>Bikes</td><td>11 000</td><td>2007</td><td>2</td>
<tr><td>Bikes</td><td>11 500</td><td>2007</td><td>3</td>
<tr><td>Bikes</td><td>15 400</td><td>2007</td><td>4</td>
</table>
<br/>
... And so forth
The view has a product category, a revenue, a year and a month. I want to create a report comparing 2007 and 2008, showing 0 for the months with no sales. So the report should look something like this:
<table>
<tr><th>Category</th><th>Month</th><th>Revenue This Year</th><th>Revenue Last Year</th></tr>
<tr><td>Bikes</td><td>1</td><td>10 000</td><td>0</td></tr>
<tr><td>Bikes</td><td>2</td><td>12 000</td><td>11 000</td></tr>
<tr><td>Bikes</td><td>3</td><td>12 000</td><td>11 500</td></tr>
<tr><td>Bikes</td><td>4</td><td>0</td><td>15 400</td></tr>
</table>
<br/>
The key thing to notice is how month 1 only has sales in 2008, and therefore is 0 for 2007. Also, month 4 only has no sales in 2008, hence the 0, while it has sales in 2007 and still show up.
Also, the report is actually for financial year - so I would love to have empty columns with 0 in both if there was no sales in say month 5 for either 2007 or 2008.
The query I got looks something like this:
SELECT
SP1.Program,
SP1.Year,
SP1.Month,
SP1.TotalRevenue,
IsNull(SP2.TotalRevenue, 0) AS LastYearTotalRevenue
FROM PVMonthlyStatusReport AS SP1
LEFT OUTER JOIN PVMonthlyStatusReport AS SP2 ON
SP1.Program = SP2.Program AND
SP2.Year = SP1.Year - 1 AND
SP1.Month = SP2.Month
WHERE
SP1.Program = 'Bikes' AND
SP1.Category = @Category AND
(SP1.Year >= @FinancialYear AND SP1.Year <= @FinancialYear + 1) AND
((SP1.Year = @FinancialYear AND SP1.Month > 6) OR
(SP1.Year = @FinancialYear + 1 AND SP1.Month <= 6))
ORDER BY SP1.Year, SP1.Month
The problem with this query is that it would not return the fourth row in my example data above, since we didn't have any sales in 2008, but we actually did in 2007.
This is probably a common query/problem, but my SQL is rusty after doing front-end development for so long. Any help is greatly appreciated!
Oh, btw, I'm using SQL 2005 for this query so if there are any helpful new features that might help me let me know. | sql | database | query | reporting | null | null | open | SQL query to compare product sales by month
===
I have a Monthly Status database view I need to build a report based on. The data in the view looks something like this:
<table>
<tr><th>Category</th><th>Revenue</th><th>Yearh</th><th>Month</th></tr>
<tr><td>Bikes</td><td>10 000</td><td>2008</td><td>1</td>
<tr><td>Bikes</td><td>12 000</td><td>2008</td><td>2</td>
<tr><td>Bikes</td><td>12 000</td><td>2008</td><td>3</td>
<tr><td>Bikes</td><td>15 000</td><td>2008</td><td>1</td>
<tr><td>Bikes</td><td>11 000</td><td>2007</td><td>2</td>
<tr><td>Bikes</td><td>11 500</td><td>2007</td><td>3</td>
<tr><td>Bikes</td><td>15 400</td><td>2007</td><td>4</td>
</table>
<br/>
... And so forth
The view has a product category, a revenue, a year and a month. I want to create a report comparing 2007 and 2008, showing 0 for the months with no sales. So the report should look something like this:
<table>
<tr><th>Category</th><th>Month</th><th>Revenue This Year</th><th>Revenue Last Year</th></tr>
<tr><td>Bikes</td><td>1</td><td>10 000</td><td>0</td></tr>
<tr><td>Bikes</td><td>2</td><td>12 000</td><td>11 000</td></tr>
<tr><td>Bikes</td><td>3</td><td>12 000</td><td>11 500</td></tr>
<tr><td>Bikes</td><td>4</td><td>0</td><td>15 400</td></tr>
</table>
<br/>
The key thing to notice is how month 1 only has sales in 2008, and therefore is 0 for 2007. Also, month 4 only has no sales in 2008, hence the 0, while it has sales in 2007 and still show up.
Also, the report is actually for financial year - so I would love to have empty columns with 0 in both if there was no sales in say month 5 for either 2007 or 2008.
The query I got looks something like this:
SELECT
SP1.Program,
SP1.Year,
SP1.Month,
SP1.TotalRevenue,
IsNull(SP2.TotalRevenue, 0) AS LastYearTotalRevenue
FROM PVMonthlyStatusReport AS SP1
LEFT OUTER JOIN PVMonthlyStatusReport AS SP2 ON
SP1.Program = SP2.Program AND
SP2.Year = SP1.Year - 1 AND
SP1.Month = SP2.Month
WHERE
SP1.Program = 'Bikes' AND
SP1.Category = @Category AND
(SP1.Year >= @FinancialYear AND SP1.Year <= @FinancialYear + 1) AND
((SP1.Year = @FinancialYear AND SP1.Month > 6) OR
(SP1.Year = @FinancialYear + 1 AND SP1.Month <= 6))
ORDER BY SP1.Year, SP1.Month
The problem with this query is that it would not return the fourth row in my example data above, since we didn't have any sales in 2008, but we actually did in 2007.
This is probably a common query/problem, but my SQL is rusty after doing front-end development for so long. Any help is greatly appreciated!
Oh, btw, I'm using SQL 2005 for this query so if there are any helpful new features that might help me let me know. | 0 |
17,225 | 08/19/2008 23:47:00 | 432 | 08/05/2008 17:18:46 | 810 | 43 | Echo system commands to terminal in Perl | In Perl, you can execute system commands using system() or `` (backticks). You can even capture the output of the command into a variable. However, this hides the program execution in the background so that the person executing your script can't see it. Normally this is useful but sometimes I want to see what is going on behind the scenes. How do you make it so the commands executed are printed to the terminal, and those programs' output printed to the terminal? This would be the .bat equivalent of "@echo on".
| perl | command-line | terminal | system | null | null | open | Echo system commands to terminal in Perl
===
In Perl, you can execute system commands using system() or `` (backticks). You can even capture the output of the command into a variable. However, this hides the program execution in the background so that the person executing your script can't see it. Normally this is useful but sometimes I want to see what is going on behind the scenes. How do you make it so the commands executed are printed to the terminal, and those programs' output printed to the terminal? This would be the .bat equivalent of "@echo on".
| 0 |
17,228 | 08/19/2008 23:49:40 | 1,449 | 08/15/2008 16:25:48 | 11 | 2 | What tools do you use to develop C++ applications on Linux? | I develop C++ applications in a Linux environment. The tools I use every day include Eclipse with the CDT plugin, gdb and valgrind.
What tools do other people use? Is there anything out there for Linux that rivals the slickness of Microsoft Visual Studio? | c++ | linux | eclipse | gdb | valgrind | null | open | What tools do you use to develop C++ applications on Linux?
===
I develop C++ applications in a Linux environment. The tools I use every day include Eclipse with the CDT plugin, gdb and valgrind.
What tools do other people use? Is there anything out there for Linux that rivals the slickness of Microsoft Visual Studio? | 0 |
17,231 | 08/19/2008 23:50:47 | 1,438 | 08/15/2008 15:44:20 | 51 | 8 | Why shouldn't I "bet the future of the company" on shell scripts? | I was looking at <http://tldp.org/LDP/abs/html/why-shell.html> and was struck by:
> When not to use shell scripts
>
> ...
>
> - Mission-critical applications upon which you are betting the future of the company
Why not? | shell | bash | ksh | null | null | null | open | Why shouldn't I "bet the future of the company" on shell scripts?
===
I was looking at <http://tldp.org/LDP/abs/html/why-shell.html> and was struck by:
> When not to use shell scripts
>
> ...
>
> - Mission-critical applications upon which you are betting the future of the company
Why not? | 0 |
17,250 | 08/20/2008 00:16:40 | 394 | 08/05/2008 12:36:16 | 156 | 24 | Create an encrypted ZIP file in Python | I'm creating an ZIP file with ZipFile in Python 2.5, it works ok so far:
import zipfile, os
locfile = "test.txt"
loczip = os.path.splitext (locfile)[0] + ".zip"
zip = zipfile.ZipFile (loczip, "w")
zip.write (locfile)
zip.close()
but I couldn't find how to encrypt the files in the ZIP file.
I could use system and call PKZIP -s, but I suppose there must be a more "pythonic" way. | python | null | null | null | null | null | open | Create an encrypted ZIP file in Python
===
I'm creating an ZIP file with ZipFile in Python 2.5, it works ok so far:
import zipfile, os
locfile = "test.txt"
loczip = os.path.splitext (locfile)[0] + ".zip"
zip = zipfile.ZipFile (loczip, "w")
zip.write (locfile)
zip.close()
but I couldn't find how to encrypt the files in the ZIP file.
I could use system and call PKZIP -s, but I suppose there must be a more "pythonic" way. | 0 |
17,269 | 08/20/2008 00:54:15 | 1,647 | 08/17/2008 18:32:33 | 1 | 0 | Hyperlinks displaced on IE7 | Browse to a webpage with hyperlinks using IE (I am using IE7) Once on the page, enlarge the fonts using ctl + mouse wheel. Now when you try to hover over the hyperlinks, they are laterally displaced to the right. To click on the link, i have to move the mouse to the right till the cursor turns into a hand.
Anyone has a comment on this?? | browser | null | null | null | null | null | open | Hyperlinks displaced on IE7
===
Browse to a webpage with hyperlinks using IE (I am using IE7) Once on the page, enlarge the fonts using ctl + mouse wheel. Now when you try to hover over the hyperlinks, they are laterally displaced to the right. To click on the link, i have to move the mouse to the right till the cursor turns into a hand.
Anyone has a comment on this?? | 0 |
17,274 | 08/20/2008 01:02:55 | 1,110 | 08/12/2008 12:33:05 | 1 | 0 | REALLY Simple Website--How Basic Can You Go? | Although I've done programming, I'm not a programmer. I've recently agreed to coordinate getting a Website up for a club. The resources are--me, who has done Web content maintenance (putting content into HTML and ColdFusion templates via a gatekeeper to the site itself; doing simple HTML and XML coding); a serious Web developer who does database programming, ColdFusion, etc., and talks way over the heads of the rest of us; two designers who use Dreamweaver; the guy who created the original (and now badly broken) site in Front Page and wants to use Expression Web; and assorted other club members who are even less technically inclined.
What we need up first is some text and graphics (a gorgeous design has been created in Dreamweaver), some links (including to existing PDF newsletters for download), and maybe hooking up an existing Blogspot blog. Later (or earlier if it's not hard), we may add mouseover menus to the links, a gallery, a calendar, a few Mapquest hotlinks, and so on.
My question--First, is there any real problem with sticking with HTML and jpegs for the initial site? Second, for the "later" part of the site development, what's the simplest we can go with? Third, are there costs in doing this the simple way that will make us regret it down the road? Also, is there a good site/resource where I can learn more about this from a newbie perspective?
Thanks all! | personal-website | newbies | null | null | null | null | open | REALLY Simple Website--How Basic Can You Go?
===
Although I've done programming, I'm not a programmer. I've recently agreed to coordinate getting a Website up for a club. The resources are--me, who has done Web content maintenance (putting content into HTML and ColdFusion templates via a gatekeeper to the site itself; doing simple HTML and XML coding); a serious Web developer who does database programming, ColdFusion, etc., and talks way over the heads of the rest of us; two designers who use Dreamweaver; the guy who created the original (and now badly broken) site in Front Page and wants to use Expression Web; and assorted other club members who are even less technically inclined.
What we need up first is some text and graphics (a gorgeous design has been created in Dreamweaver), some links (including to existing PDF newsletters for download), and maybe hooking up an existing Blogspot blog. Later (or earlier if it's not hard), we may add mouseover menus to the links, a gallery, a calendar, a few Mapquest hotlinks, and so on.
My question--First, is there any real problem with sticking with HTML and jpegs for the initial site? Second, for the "later" part of the site development, what's the simplest we can go with? Third, are there costs in doing this the simple way that will make us regret it down the road? Also, is there a good site/resource where I can learn more about this from a newbie perspective?
Thanks all! | 0 |
17,289 | 08/20/2008 01:28:00 | 2,056 | 08/20/2008 01:28:00 | 1 | 0 | iFrame Best Practices | Here's a lowly HTML question...
I have a large, hi-def JavaScript-intensive image banner for a site I'm designing. What is everyone's opinion of using IFrames so that you incur the load time only once? Is there a CSS alternative to the IFrame?
feel free to preview the site at http://csm.dev11.com
It is very much a work in progress.
Thanks,
KN | css | xhtml | iframe | load | time | null | open | iFrame Best Practices
===
Here's a lowly HTML question...
I have a large, hi-def JavaScript-intensive image banner for a site I'm designing. What is everyone's opinion of using IFrames so that you incur the load time only once? Is there a CSS alternative to the IFrame?
feel free to preview the site at http://csm.dev11.com
It is very much a work in progress.
Thanks,
KN | 0 |
17,299 | 08/20/2008 01:44:58 | 522 | 08/06/2008 14:24:03 | 239 | 25 | Pointer Manipulation Help | I am trying to build a function in C/c++ to sort an array and replace each value with its "score" or rank. It takes in a double pointer array to an array of ints, and sorts the double pointers based on the dereferenced value of the integers. I have tried quite a few times to make it work, but cant get it down. Once again, it must sort the double pointers based on the values they point to. This is what I have:
void SortArray( int ** pArray, int ArrayLength ) {
int i, j, flag = 1; // set flag to 1 to begin initial pass
int * temp; // holding variable orig with no *
for(i = 1; (i <= ArrayLength) && flag; i++)
{
flag = 0;
for (j=0; j < (ArrayLength -1); j++)
{
if (*pArray[j+1] > *pArray[j]) // ascending order simply changes to <
{
temp = &pArray[j]; // swap elements
pArray[j] = &pArray[j+1];
pArray[j+1] = &temp;
flag = 1; // indicates that a swap occurred.
}
}
}
};
thanks in advance. | c++ | c | arrays | pointer | null | null | open | Pointer Manipulation Help
===
I am trying to build a function in C/c++ to sort an array and replace each value with its "score" or rank. It takes in a double pointer array to an array of ints, and sorts the double pointers based on the dereferenced value of the integers. I have tried quite a few times to make it work, but cant get it down. Once again, it must sort the double pointers based on the values they point to. This is what I have:
void SortArray( int ** pArray, int ArrayLength ) {
int i, j, flag = 1; // set flag to 1 to begin initial pass
int * temp; // holding variable orig with no *
for(i = 1; (i <= ArrayLength) && flag; i++)
{
flag = 0;
for (j=0; j < (ArrayLength -1); j++)
{
if (*pArray[j+1] > *pArray[j]) // ascending order simply changes to <
{
temp = &pArray[j]; // swap elements
pArray[j] = &pArray[j+1];
pArray[j+1] = &temp;
flag = 1; // indicates that a swap occurred.
}
}
}
};
thanks in advance. | 0 |
17,320 | 08/20/2008 01:59:08 | 1,880 | 08/19/2008 03:12:41 | 1 | 0 | What areas of specialization within programming would you recommend to a beginner | I am a student studying software development, and I feel programming, in general, is too broad of a subject to try to know everything. To be proficient, you have to decide which areas to focus your learning and understanding. Certain skill sets synergize with each other, like data-driven web development and SQL experience. However, all the win32 API experience in the world may not directly apply to linux development. This leads me to believe, as a beginning programmer, I should start deciding where I want to specialize after I have general understanding of the basic principles of software development.
This is a multi-part question really. What are the common specializations within computer programming and software development. Which of these specializations have more long-term value, both as a foundation for other specializations and/or as marketable skills. Which skill sets complement each other. Are there any areas of specialization that hinder your ability of developing other areas of specialization. | language-agnostic | education | null | null | null | null | open | What areas of specialization within programming would you recommend to a beginner
===
I am a student studying software development, and I feel programming, in general, is too broad of a subject to try to know everything. To be proficient, you have to decide which areas to focus your learning and understanding. Certain skill sets synergize with each other, like data-driven web development and SQL experience. However, all the win32 API experience in the world may not directly apply to linux development. This leads me to believe, as a beginning programmer, I should start deciding where I want to specialize after I have general understanding of the basic principles of software development.
This is a multi-part question really. What are the common specializations within computer programming and software development. Which of these specializations have more long-term value, both as a foundation for other specializations and/or as marketable skills. Which skill sets complement each other. Are there any areas of specialization that hinder your ability of developing other areas of specialization. | 0 |
17,333 | 08/20/2008 02:09:33 | 2,057 | 08/20/2008 02:09:33 | 1 | 0 | Most effective way for float and double comparison | What would be the most efficient way to compare two doubles or two floats (single precision)?
Simply doing this is not correct:
<code>bool CompareDoubles1 (double A, double B)
{
return A == B;
}
</code>
But something like:
bool CompareDoubles2 (double A, double B)
{
diff = A - B;
return (diff < EPSILON) && (-diff > EPSILON);
}
Seems to waste processing.
Does anyone knows a smarter float comparer?
| c++ | optimization | algorithms | floating-point | null | null | open | Most effective way for float and double comparison
===
What would be the most efficient way to compare two doubles or two floats (single precision)?
Simply doing this is not correct:
<code>bool CompareDoubles1 (double A, double B)
{
return A == B;
}
</code>
But something like:
bool CompareDoubles2 (double A, double B)
{
diff = A - B;
return (diff < EPSILON) && (-diff > EPSILON);
}
Seems to waste processing.
Does anyone knows a smarter float comparer?
| 0 |
17,352 | 08/20/2008 02:40:40 | 803 | 08/09/2008 02:52:45 | 149 | 9 | What are OpenGL extensions and what are the benefits/tradeoffs of using them? | In relation to this question on [Using OpenGL extensions][1], what's the purpose of these extension functions (why would I want to use them), and are there any tradeoffs or gotchas associated with using them.
[1]: http://stackoverflow.com/questions/14413/using-opengl-extensions-on-windows | opengl | null | null | null | null | null | open | What are OpenGL extensions and what are the benefits/tradeoffs of using them?
===
In relation to this question on [Using OpenGL extensions][1], what's the purpose of these extension functions (why would I want to use them), and are there any tradeoffs or gotchas associated with using them.
[1]: http://stackoverflow.com/questions/14413/using-opengl-extensions-on-windows | 0 |
17,359 | 08/20/2008 02:48:50 | 1,339 | 08/14/2008 15:11:18 | 89 | 4 | How do I send a file as an email attachement using Linux command line? | I've created a script that runs every night on my Linux server that uses <code>mysqldump</code> to back up my MySQL database to a .sql file and packages them together as a compressed .tar file. The next step I want to accomplish is to send that tar file through email to a remote email server for safekeeping. I've been able to send the raw script in the body an email by piping the backup text file to <code>mailx</code> like so:
$ cat mysqldbbackup.sql | mailx [email protected]
<code>cat</code> echoes the backup file's text which is piped into the <code>mailx</code> program with the recipient's email address passed as an argument.
While this accomplishes what I need, I think it could be one step better, **Is there any way, using shell scripts or otherwise, to send the compressed .tar file to an outgoing email message as an *attachment*?** This would beat having to deal with very long email messages which contain header data and often have word-wrapping issues etc. | linux | email | bash | shell | command-line | null | open | How do I send a file as an email attachement using Linux command line?
===
I've created a script that runs every night on my Linux server that uses <code>mysqldump</code> to back up my MySQL database to a .sql file and packages them together as a compressed .tar file. The next step I want to accomplish is to send that tar file through email to a remote email server for safekeeping. I've been able to send the raw script in the body an email by piping the backup text file to <code>mailx</code> like so:
$ cat mysqldbbackup.sql | mailx [email protected]
<code>cat</code> echoes the backup file's text which is piped into the <code>mailx</code> program with the recipient's email address passed as an argument.
While this accomplishes what I need, I think it could be one step better, **Is there any way, using shell scripts or otherwise, to send the compressed .tar file to an outgoing email message as an *attachment*?** This would beat having to deal with very long email messages which contain header data and often have word-wrapping issues etc. | 0 |
17,370 | 08/20/2008 03:19:34 | 1,630 | 08/17/2008 17:03:19 | 354 | 34 | Using GLEW to use OpenGL extensions under Windows | I've been using OpenGL extensions on Windows the [painful way][1]. Is GLEW the easier way to go? How do I get started with it?
[1]: http://stackoverflow.com/questions/14413/using-opengl-extensions-on-windows | opengl | extension | glew | null | null | null | open | Using GLEW to use OpenGL extensions under Windows
===
I've been using OpenGL extensions on Windows the [painful way][1]. Is GLEW the easier way to go? How do I get started with it?
[1]: http://stackoverflow.com/questions/14413/using-opengl-extensions-on-windows | 0 |
17,373 | 08/20/2008 03:20:02 | 338 | 08/04/2008 18:34:44 | 78 | 3 | How do I open the default mail program with a Subject and Body in a cross-platform way? | Unfortunately, this is not for a website, but a client app written in Java.
I would like this to work in a cross-platform way (which means Windows and Mac, sorry Linux). I am happy to execute a VBScript in Windows, or AppleScript in OS X. But I have no idea what those scripts should contain. I would love to execute the user's default program vs. just searching for Outlook or whatever.
In OS X, I have tried executing the command:
open mailto:?subject=MySubject&body=TheBody
But run into problems with URL escaping and the use of the `open` command. I haven't tried using `start` in Wndows yet.
| java | windows | os | x | email | null | open | How do I open the default mail program with a Subject and Body in a cross-platform way?
===
Unfortunately, this is not for a website, but a client app written in Java.
I would like this to work in a cross-platform way (which means Windows and Mac, sorry Linux). I am happy to execute a VBScript in Windows, or AppleScript in OS X. But I have no idea what those scripts should contain. I would love to execute the user's default program vs. just searching for Outlook or whatever.
In OS X, I have tried executing the command:
open mailto:?subject=MySubject&body=TheBody
But run into problems with URL escaping and the use of the `open` command. I haven't tried using `start` in Wndows yet.
| 0 |
17,376 | 08/20/2008 03:27:08 | 338 | 08/04/2008 18:34:44 | 78 | 3 | How would you implement FORM based authentication without a backing database? | I have a PHP script that runs as a CGI program and the HTTP header Authenticate header gets eaten and spit out. So I would like to implement some kind of FORMs based authentication. Worse yet, I have no database, so can't store session info.
I am very open to having master username and password. I just need to protect this thing from an intruder who doesn't know there credentials.
So how would you implement this?
Cookies?
I could present the form and if it validates, I can send back a cookie that is a hash of the IP address come secret code. Then I can prevent pages from rendering unless the thing decrypts correctly. But I have no idea how to implement that in PHP. | php | authentication | cookies | cgi | http | null | open | How would you implement FORM based authentication without a backing database?
===
I have a PHP script that runs as a CGI program and the HTTP header Authenticate header gets eaten and spit out. So I would like to implement some kind of FORMs based authentication. Worse yet, I have no database, so can't store session info.
I am very open to having master username and password. I just need to protect this thing from an intruder who doesn't know there credentials.
So how would you implement this?
Cookies?
I could present the form and if it validates, I can send back a cookie that is a hash of the IP address come secret code. Then I can prevent pages from rendering unless the thing decrypts correctly. But I have no idea how to implement that in PHP. | 0 |
17,387 | 08/20/2008 03:39:30 | 209 | 08/03/2008 13:54:19 | 53 | 5 | Privatizing a BlogEngine.Net Installation | I have a blogengine.net install that requires privatization.
I'm doing research work at the moment, but I have to keep my blog/journal private until certain conditions are met.
How can I anonymize my blogEngine.net install so that readers must log in to read my posts? | c# | .net | asp.net | blogs | null | null | open | Privatizing a BlogEngine.Net Installation
===
I have a blogengine.net install that requires privatization.
I'm doing research work at the moment, but I have to keep my blog/journal private until certain conditions are met.
How can I anonymize my blogEngine.net install so that readers must log in to read my posts? | 0 |
17,430 | 08/20/2008 05:18:22 | 718 | 08/08/2008 07:07:38 | 652 | 32 | Language Conversion Testing | We created a tool which converts a language called P2, a language similar to assembly which I think exists only in Japan, to C#. There are at least a hundred modules written in P2 and we want to verify if the conversion to C# is right? How can we test this? | testing | null | null | null | null | null | open | Language Conversion Testing
===
We created a tool which converts a language called P2, a language similar to assembly which I think exists only in Japan, to C#. There are at least a hundred modules written in P2 and we want to verify if the conversion to C# is right? How can we test this? | 0 |
17,434 | 08/20/2008 05:29:32 | 716 | 08/08/2008 06:57:38 | 171 | 14 | when should you use 'friend' in c++ ? | I have been reading through the [c++ faq][1] and was curious about the [`friend`][2] declaration. I personally have never used it howevever in the interest of exploring the language I was wondering if anyone here has?
The c++ faq is helpful, but some of the explanation went over my head. So does anyone here have a good example of using `friend` ?
[1]: http://yosefk.com/c++fqa/
[2]: http://yosefk.com/c++fqa/friend.html | c++ | oop | encapsulation | null | null | null | open | when should you use 'friend' in c++ ?
===
I have been reading through the [c++ faq][1] and was curious about the [`friend`][2] declaration. I personally have never used it howevever in the interest of exploring the language I was wondering if anyone here has?
The c++ faq is helpful, but some of the explanation went over my head. So does anyone here have a good example of using `friend` ?
[1]: http://yosefk.com/c++fqa/
[2]: http://yosefk.com/c++fqa/friend.html | 0 |
17,435 | 08/20/2008 05:33:28 | 1,693 | 08/18/2008 02:25:37 | 181 | 6 | Server-side Javascript | Does anyone see Server-side Javascript taking off? There are a couple of implementations out there, but it all seems to be a bit of a stretch (as in, "doing it BECAUSE WE CAN" type of attitude).
I'm curious to know if anyone actually writes Javascript for the server-side and what their experiences with it have been to date.
Also, which implementation is generally seen as the most stable? | javascript | javascript-server | null | null | null | null | open | Server-side Javascript
===
Does anyone see Server-side Javascript taking off? There are a couple of implementations out there, but it all seems to be a bit of a stretch (as in, "doing it BECAUSE WE CAN" type of attitude).
I'm curious to know if anyone actually writes Javascript for the server-side and what their experiences with it have been to date.
Also, which implementation is generally seen as the most stable? | 0 |
17,469 | 08/20/2008 06:34:31 | 432 | 08/05/2008 17:18:46 | 843 | 44 | IE6 - can't load a normal JPG | Try loading [this normal .jpg file][1] in Internet Explorer 6.0. I get an error saying the picture won't load. Try it in any other browser and it works fine. What's wrong? The .jpg file is just a normal picture sitting on the web server. I can even create a simple web page:
<a href="http://www.zodiacwheels.com/images/wheels/blackout_thumb.jpg">blah</a>
and use right click + save target as with IE6 to save it to my desktop, and it's a valid JPG file. However, *it won't load in the browser!*
Why?!
I even tried checking the header response and MIME type and it looks fine:
andy@debian:~$ telnet www.zodiacwheels.com 80
Trying 72.167.174.247...
Connected to zodiacwheels.com.
Escape character is '^]'.
HEAD /images/wheels/blackout_thumb.jpg HTTP/1.1
Host: www.zodiacwheels.com
HTTP/1.1 200 OK
Date: Wed, 20 Aug 2008 06:19:04 GMT
Server: Apache
Last-Modified: Wed, 20 Aug 2008 00:29:36 GMT
ETag: "1387402-914ac-48ab6570"
Accept-Ranges: bytes
Content-Length: 595116
Content-Type: image/jpeg
The site needs to be able to work with IE6, how come it won't load a simple .jpg file?
[1]: http://www.zodiacwheels.com/images/wheels/blackout_thumb.jpg | internet-explorer | null | null | null | null | null | open | IE6 - can't load a normal JPG
===
Try loading [this normal .jpg file][1] in Internet Explorer 6.0. I get an error saying the picture won't load. Try it in any other browser and it works fine. What's wrong? The .jpg file is just a normal picture sitting on the web server. I can even create a simple web page:
<a href="http://www.zodiacwheels.com/images/wheels/blackout_thumb.jpg">blah</a>
and use right click + save target as with IE6 to save it to my desktop, and it's a valid JPG file. However, *it won't load in the browser!*
Why?!
I even tried checking the header response and MIME type and it looks fine:
andy@debian:~$ telnet www.zodiacwheels.com 80
Trying 72.167.174.247...
Connected to zodiacwheels.com.
Escape character is '^]'.
HEAD /images/wheels/blackout_thumb.jpg HTTP/1.1
Host: www.zodiacwheels.com
HTTP/1.1 200 OK
Date: Wed, 20 Aug 2008 06:19:04 GMT
Server: Apache
Last-Modified: Wed, 20 Aug 2008 00:29:36 GMT
ETag: "1387402-914ac-48ab6570"
Accept-Ranges: bytes
Content-Length: 595116
Content-Type: image/jpeg
The site needs to be able to work with IE6, how come it won't load a simple .jpg file?
[1]: http://www.zodiacwheels.com/images/wheels/blackout_thumb.jpg | 0 |
17,483 | 08/20/2008 06:50:32 | 1,366 | 08/14/2008 18:30:52 | 265 | 11 | C++ Anyway to prevent a method from being over ridden in sub classes? | Is anyone aware of a language feature or technique in C++ to prevent a child class from over riding a particular method in the parent class? | c++ | null | null | null | null | null | open | C++ Anyway to prevent a method from being over ridden in sub classes?
===
Is anyone aware of a language feature or technique in C++ to prevent a child class from over riding a particular method in the parent class? | 0 |
17,489 | 08/20/2008 06:56:16 | 116 | 08/02/2008 05:51:57 | 2,944 | 168 | Best environment for Python on Windows? | So I've got plain python downloaded, so I can run .py files from the command line. Now I want to step it up, have a debugger, be able to call .net or other Windows things, etc...
What's my next step? What's a good Python environment for Windows? | windows | python | null | null | null | 08/30/2011 14:13:16 | not constructive | Best environment for Python on Windows?
===
So I've got plain python downloaded, so I can run .py files from the command line. Now I want to step it up, have a debugger, be able to call .net or other Windows things, etc...
What's my next step? What's a good Python environment for Windows? | 4 |
17,500 | 08/20/2008 07:07:30 | 2,074 | 08/20/2008 06:54:42 | 1 | 0 | Why are DispatcherObject.CheckAccess() and VerifyAccess() hidden from Intellisense? | The `System.Windows.Threading.DispatcherObject` class (which `DependencyObject` is based on) contains a useful function, called `CheckAccess()`, that determines whether or not the code is running on the UI thread.
When I wanted to use it yesterday, I was puzzled to find out that Intellisense didn't show the function (nor `VerifyAccess()`, which throws an exception when not on the UI thread), even though the MSDN library lists it. I decided to investigate the class using Reflector. It seems that the function in question has an `EditorVisible(EditorVisibleState.Never)` attribute attached to it. The `Dispatcher` class, which is used by `DispatcherObject`, has the same attribute attached to `CheckAccess()` and `VerifyAccess()`.
I don't believe that the application of that attribute is random (or a joke), so my question is: why is it there? Should those methods not be called directly? Then why aren't they `protected` (or `internal`, like some of the most useful methods in the WPF)? | .net | intellisense | null | null | null | null | open | Why are DispatcherObject.CheckAccess() and VerifyAccess() hidden from Intellisense?
===
The `System.Windows.Threading.DispatcherObject` class (which `DependencyObject` is based on) contains a useful function, called `CheckAccess()`, that determines whether or not the code is running on the UI thread.
When I wanted to use it yesterday, I was puzzled to find out that Intellisense didn't show the function (nor `VerifyAccess()`, which throws an exception when not on the UI thread), even though the MSDN library lists it. I decided to investigate the class using Reflector. It seems that the function in question has an `EditorVisible(EditorVisibleState.Never)` attribute attached to it. The `Dispatcher` class, which is used by `DispatcherObject`, has the same attribute attached to `CheckAccess()` and `VerifyAccess()`.
I don't believe that the application of that attribute is random (or a joke), so my question is: why is it there? Should those methods not be called directly? Then why aren't they `protected` (or `internal`, like some of the most useful methods in the WPF)? | 0 |
17,532 | 08/20/2008 07:49:06 | 832 | 08/09/2008 06:51:40 | 766 | 70 | ASP.NET Custom Controls - Composites | ##Summary
Hi All,
OK, further into my adventures with custom controls...
In summary, here is that I have learned of three main "classes" of custom controls. Please feel free to correct me if any of this is wrong!
1. **UserControls** - Which inherit from _UserControl_ and are contained within an _ASCX_ file. These are pretty limited in what they can do, but are a quick and light way to get some UI commonality with designer support.
2. **Custom Composite Controls** - These are controls that inherit from _WebControl_ where you add pre-existing controls to the control within the _CreateChildControls_ method. This provides great flexibility, but lack of designer support without additional coding. They are highly portable though since they can be compiled into a DLL.
3. **Custom Rendered Controls** - Similar to Custom Composite Controls, these are added to a Web Control Library project. The rendering of the control is completely controlled by the programmer by overriding the _Render_ method.
##My Thoughts..
OK, so while playing with custom composites, I found the following:
* You have little/no control over the HTML output making it difficult to "debug".
* The _CreateChildControls_ (and subsequent methods) can get real busy with _Controls.Add(myControl)_ everywhere.
* I found rendering tables (be it for layout or content) to be considerably awkward.
##The Question(s)..
So, I admit, I am new to this so I could be way off-base with some of my points noted above..
* Do you use Composites?
* Do you have any neat tricks to control the HTML output?
* Do you just say "to hell with it" and go ahead and create a custom rendered control?
**Its something I am keen to get really firm in my mind since I know how much _good_ control development can cut overall development time.**
I look forward to your answers ^_^ | c# | .net | asp.net | controls | usercontrols | null | open | ASP.NET Custom Controls - Composites
===
##Summary
Hi All,
OK, further into my adventures with custom controls...
In summary, here is that I have learned of three main "classes" of custom controls. Please feel free to correct me if any of this is wrong!
1. **UserControls** - Which inherit from _UserControl_ and are contained within an _ASCX_ file. These are pretty limited in what they can do, but are a quick and light way to get some UI commonality with designer support.
2. **Custom Composite Controls** - These are controls that inherit from _WebControl_ where you add pre-existing controls to the control within the _CreateChildControls_ method. This provides great flexibility, but lack of designer support without additional coding. They are highly portable though since they can be compiled into a DLL.
3. **Custom Rendered Controls** - Similar to Custom Composite Controls, these are added to a Web Control Library project. The rendering of the control is completely controlled by the programmer by overriding the _Render_ method.
##My Thoughts..
OK, so while playing with custom composites, I found the following:
* You have little/no control over the HTML output making it difficult to "debug".
* The _CreateChildControls_ (and subsequent methods) can get real busy with _Controls.Add(myControl)_ everywhere.
* I found rendering tables (be it for layout or content) to be considerably awkward.
##The Question(s)..
So, I admit, I am new to this so I could be way off-base with some of my points noted above..
* Do you use Composites?
* Do you have any neat tricks to control the HTML output?
* Do you just say "to hell with it" and go ahead and create a custom rendered control?
**Its something I am keen to get really firm in my mind since I know how much _good_ control development can cut overall development time.**
I look forward to your answers ^_^ | 0 |
17,533 | 08/20/2008 07:50:29 | 1,147 | 08/12/2008 19:29:43 | 38 | 5 | Request vista UAC elevation if path is protected? | For my C# app, I don't want to always prompt for elevation on application start, but if they choose an output path that is UAC protected then I need to request elevation.
So, how do I check if a path is UAC protected and then how do I request elevation mid-execution?
Thanks. | c# | .net | windows-vista | uac | null | null | open | Request vista UAC elevation if path is protected?
===
For my C# app, I don't want to always prompt for elevation on application start, but if they choose an output path that is UAC protected then I need to request elevation.
So, how do I check if a path is UAC protected and then how do I request elevation mid-execution?
Thanks. | 0 |
17,549 | 08/20/2008 08:01:25 | 116 | 08/02/2008 05:51:57 | 3,002 | 172 | software: when to pay, when to use free? | What are your criteria when evaluating free vs pay software? Which is your "default" choice? | evaluation | commercial | free | null | null | 07/16/2012 20:58:35 | not constructive | software: when to pay, when to use free?
===
What are your criteria when evaluating free vs pay software? Which is your "default" choice? | 4 |
17,561 | 08/20/2008 08:09:38 | 1,762 | 08/18/2008 13:12:06 | 8 | 3 | Recommendations for browser add-on tools to help with development | Can anyone suggest some good browser add-on tools/extensions to help with development?
I have firebug installed in Firefox which is great for dealing with CSS, HTML and javascript; any other suggestions?
[Firebug][1]
[1]: https://addons.mozilla.org/en-US/firefox/addon/1843 | web | development | softwaretools | browsers | null | null | open | Recommendations for browser add-on tools to help with development
===
Can anyone suggest some good browser add-on tools/extensions to help with development?
I have firebug installed in Firefox which is great for dealing with CSS, HTML and javascript; any other suggestions?
[Firebug][1]
[1]: https://addons.mozilla.org/en-US/firefox/addon/1843 | 0 |
17,575 | 08/20/2008 08:14:02 | 1,269 | 08/14/2008 08:00:22 | 31 | 5 | Tool for generation MSDN-like documentation from <summary> tags? | Does anyone know any tool like NDoc that could generate MSDN-like documentation out of XML comments in the C# code? I need it for .NET 3.5 and C#.
Sandcastle maybe?
Thanks. | documentation | sandcastle | ndoc | null | null | null | open | Tool for generation MSDN-like documentation from <summary> tags?
===
Does anyone know any tool like NDoc that could generate MSDN-like documentation out of XML comments in the C# code? I need it for .NET 3.5 and C#.
Sandcastle maybe?
Thanks. | 0 |
17,576 | 08/20/2008 08:14:06 | 718 | 08/08/2008 07:07:38 | 682 | 34 | Non Public Members for C# Interfaces | In C#, when you implement an interface all members are public by default. Do you think it's better if we can specify the accessibility modifier (protected, internal, etc) or better use an abstract class instead? | c# | interface | design | null | null | null | open | Non Public Members for C# Interfaces
===
In C#, when you implement an interface all members are public by default. Do you think it's better if we can specify the accessibility modifier (protected, internal, etc) or better use an abstract class instead? | 0 |
17,586 | 08/20/2008 08:19:29 | 1,556 | 08/16/2008 16:41:03 | 168 | 5 | Best word wrap algorithm? | Word wrap is one of must-have features in modern text editor.
Do you know how to handle word wrap?
What is the best algorithm for word-wrap?
| text-editor | word-wrap | null | null | null | null | open | Best word wrap algorithm?
===
Word wrap is one of must-have features in modern text editor.
Do you know how to handle word wrap?
What is the best algorithm for word-wrap?
| 0 |
17,612 | 08/20/2008 08:43:00 | 580 | 08/06/2008 22:30:28 | 338 | 42 | How do you place a file in recycle bin instead of delete? | Programmatic solution of course... | c# | .net | io | null | null | null | open | How do you place a file in recycle bin instead of delete?
===
Programmatic solution of course... | 0 |
17,624 | 08/20/2008 08:52:00 | 364 | 08/05/2008 05:33:41 | 220 | 14 | What is the easiest way using T-SQL / MS-SQL to append a string to existing table cells? | I have a table with a 'filename' column.
I recently performed an insert into this column but in my haste forgot to append the file extension to all the filenames entered. Fortunately they are all '.jpg' images.
How can I easily update the 'filename' column of these inserted fields (assuming I can select the recent rows based on known id values) to include the '.jpg' extension? | sql | ms-sql | t-sql | null | null | null | open | What is the easiest way using T-SQL / MS-SQL to append a string to existing table cells?
===
I have a table with a 'filename' column.
I recently performed an insert into this column but in my haste forgot to append the file extension to all the filenames entered. Fortunately they are all '.jpg' images.
How can I easily update the 'filename' column of these inserted fields (assuming I can select the recent rows based on known id values) to include the '.jpg' extension? | 0 |
17,645 | 08/20/2008 09:18:44 | 86 | 08/01/2008 16:45:58 | 207 | 23 | Differences between unix and windows files | Im I correct in assuming that the only difference between "windows files" and "unix files" is the linebreak?
We have a system that has been moved from a windows machine to a unix machine and are having troubles with the format. | unix | windows | null | null | null | null | open | Differences between unix and windows files
===
Im I correct in assuming that the only difference between "windows files" and "unix files" is the linebreak?
We have a system that has been moved from a windows machine to a unix machine and are having troubles with the format. | 0 |
17,653 | 08/20/2008 09:23:16 | 1,483 | 08/15/2008 20:40:17 | 12 | 4 | Which Vista edition is the best for developer machine? | Microsoft says that Visual Studio 2008 can be installed on any version of Vista (excluding started edition).
But I am not sure, if Home Editions cause not problems with debugging, virtual machines, IIS, MS SQL 2008 and all other tools which developers use or with some old tools like Visual Basic 6.0.
Seems that Vista Business would be the best, but Home Editions are much more popular.
Or, the would be stay with Windows XP Pro? | windows-vista | operating-system | developer-machine | null | null | null | open | Which Vista edition is the best for developer machine?
===
Microsoft says that Visual Studio 2008 can be installed on any version of Vista (excluding started edition).
But I am not sure, if Home Editions cause not problems with debugging, virtual machines, IIS, MS SQL 2008 and all other tools which developers use or with some old tools like Visual Basic 6.0.
Seems that Vista Business would be the best, but Home Editions are much more popular.
Or, the would be stay with Windows XP Pro? | 0 |
17,664 | 08/20/2008 09:34:54 | 91 | 08/01/2008 17:55:22 | 5,489 | 267 | Retreiving the PC Name of a Client? (Windows Auth) | I have an ASP.net Application that runs on the internal network (well, actually it's running on Sharepoint 2007). I just wonder: Can I somehow retrieve the name of the PC the Client is using? I would have access to Active Directory if that helps. Thing is, people use multiple PCs, so I cannot use any manual/static mapping.
If possible, I do not want to use any client-side (read: JavaScript) code, but if it cannot be done server-side, JavaScript would be OK as well. (ActiveX is absolutely out of question) | asp.net | sharepoint | authentication | null | null | null | open | Retreiving the PC Name of a Client? (Windows Auth)
===
I have an ASP.net Application that runs on the internal network (well, actually it's running on Sharepoint 2007). I just wonder: Can I somehow retrieve the name of the PC the Client is using? I would have access to Active Directory if that helps. Thing is, people use multiple PCs, so I cannot use any manual/static mapping.
If possible, I do not want to use any client-side (read: JavaScript) code, but if it cannot be done server-side, JavaScript would be OK as well. (ActiveX is absolutely out of question) | 0 |
17,670 | 08/20/2008 09:37:02 | 379 | 08/05/2008 10:03:38 | 159 | 9 | Suitable alternative to CryptEncrypt | We have a situation in our product where for a long time some data has been stored in the application's database as SQL string (choice of MS SQL server or sybase SQL anywhere) which was encrypted via the Windows API function [CryptEncrypt.][1] (direct and decryptable)
The problem is that CryptEncrypt can produce NULL's in the output, meaning that when it's stored in the database, the string manipulations will at some point truncate the ciphertext.
Ideally we'd like to use an algo that will produce cyphertext that doesn't contain NULLs as that will cause the least amount of change to the existing databases (changing a column from string to binary and code to deal with binary instead of strings) and just decrypt existing data and re-encrypt with the new algo at database upgrade time.
The algorithm doesn't need to be the most secure, as the database is already in a reasonably secure environment (not an open network / teh interwebs) but does need to bebetter than ROT13 (which I can almost decrypt in my head now!)
Cheers
[1]: http://msdn.microsoft.com/en-us/library/aa379924.aspx | win32api | c++ | windowssdk | null | null | null | open | Suitable alternative to CryptEncrypt
===
We have a situation in our product where for a long time some data has been stored in the application's database as SQL string (choice of MS SQL server or sybase SQL anywhere) which was encrypted via the Windows API function [CryptEncrypt.][1] (direct and decryptable)
The problem is that CryptEncrypt can produce NULL's in the output, meaning that when it's stored in the database, the string manipulations will at some point truncate the ciphertext.
Ideally we'd like to use an algo that will produce cyphertext that doesn't contain NULLs as that will cause the least amount of change to the existing databases (changing a column from string to binary and code to deal with binary instead of strings) and just decrypt existing data and re-encrypt with the new algo at database upgrade time.
The algorithm doesn't need to be the most secure, as the database is already in a reasonably secure environment (not an open network / teh interwebs) but does need to bebetter than ROT13 (which I can almost decrypt in my head now!)
Cheers
[1]: http://msdn.microsoft.com/en-us/library/aa379924.aspx | 0 |
17,679 | 08/20/2008 09:44:02 | 1,039 | 08/11/2008 17:51:44 | 21 | 2 | Why does Guid.ToString() reverse the byte order? | We're storing some Guids in a MS SQL database. There's some legacy code that does Guid.ToString() and then passes them in to a varchar(64) and there's some newer code that passes them in using a uniqueidentifier parameter. When you look at the results using MS SQL Management studio they look different. The byte order of the first three blocks is reversed but the last one remains the same. Why? | .net | sql-server | null | null | null | null | open | Why does Guid.ToString() reverse the byte order?
===
We're storing some Guids in a MS SQL database. There's some legacy code that does Guid.ToString() and then passes them in to a varchar(64) and there's some newer code that passes them in using a uniqueidentifier parameter. When you look at the results using MS SQL Management studio they look different. The byte order of the first three blocks is reversed but the last one remains the same. Why? | 0 |
17,681 | 08/20/2008 09:48:43 | 267 | 08/04/2008 10:11:06 | 1,847 | 106 | WebSVN with VisualSVN Server, anyone gotten authentication to work? | I have a [VisualSVN Server](http://www.visualsvn.com/server/) installed on a Windows server, serving several repositories.
Since the web-viewer built into VisualSVN server is a minimalistic subversion browser, I'd like to install [WebSVN](http://websvn.tigris.org/) on top of my repositories.
The problem, however, is that I can't seem to get authentication to work. Ideally I'd like my current repository authentication as specified in VisualSVN to work with WebSVN, so that though I see all the repository names in WebSVN, I can't actually browse into them without the right credentials.
By visiting the cached copy of the topmost link on [this google query](http://www.google.com/search?q=WebSVN+authentication+with+IIS+and+VisualSVN) you can see what I've found so far that looks promising.
(the main blog page seems to have been destroyed, domain of the topmost page I'm referring to is the-wizzard.de)
There I found some php functions I could tack onto one of the php files in WebSVN. I followed the modifications there, but all I succeeded in doing was make WebSVN ask me for a username and password and no matter what I input, it won't let me in.
Unfortunately, php and apache is largely black magic to me.
So, has anyone successfully integrated WebSVN with VisualSVN hosted repositories? | php | subversion | visualsvn | websvn | null | null | open | WebSVN with VisualSVN Server, anyone gotten authentication to work?
===
I have a [VisualSVN Server](http://www.visualsvn.com/server/) installed on a Windows server, serving several repositories.
Since the web-viewer built into VisualSVN server is a minimalistic subversion browser, I'd like to install [WebSVN](http://websvn.tigris.org/) on top of my repositories.
The problem, however, is that I can't seem to get authentication to work. Ideally I'd like my current repository authentication as specified in VisualSVN to work with WebSVN, so that though I see all the repository names in WebSVN, I can't actually browse into them without the right credentials.
By visiting the cached copy of the topmost link on [this google query](http://www.google.com/search?q=WebSVN+authentication+with+IIS+and+VisualSVN) you can see what I've found so far that looks promising.
(the main blog page seems to have been destroyed, domain of the topmost page I'm referring to is the-wizzard.de)
There I found some php functions I could tack onto one of the php files in WebSVN. I followed the modifications there, but all I succeeded in doing was make WebSVN ask me for a username and password and no matter what I input, it won't let me in.
Unfortunately, php and apache is largely black magic to me.
So, has anyone successfully integrated WebSVN with VisualSVN hosted repositories? | 0 |
17,715 | 08/20/2008 10:38:45 | 1,951 | 08/19/2008 15:06:09 | 121 | 9 | When is a file just a file? | So, you're writing a web application and you have several areas of the site where the user can upload files. My basic working method for this is to store the actual file on the server, and have a database table that connects the stored filename to the record it relates to.
My question is this: Should there be a different table for each "type" of file? Also, should the files be stored in context-related locations on the server, or all together?
Some examples: user profile photos, job application CVs, related documents on CMS pages, etc. | bestpractices | webdevelopment | null | null | null | null | open | When is a file just a file?
===
So, you're writing a web application and you have several areas of the site where the user can upload files. My basic working method for this is to store the actual file on the server, and have a database table that connects the stored filename to the record it relates to.
My question is this: Should there be a different table for each "type" of file? Also, should the files be stored in context-related locations on the server, or all together?
Some examples: user profile photos, job application CVs, related documents on CMS pages, etc. | 0 |
17,717 | 08/20/2008 10:40:38 | 1,693 | 08/18/2008 02:25:37 | 196 | 6 | Migrating from MySQL to PostgreSQL | We are currently using MySQL for a product we are building, and are keen to move to PostgreSQL as soon as possible, primarily for licensing reasons.
Has anyone else done such a move? Our database is the lifeblood of the application and will eventually be storing TBs of data, so I'm keen to hear about experiences of performance improvements/losses, major hurdles in converting SQL and stored procedures, etc. | mysql | postgresql | migrating | database | null | 01/31/2012 16:13:40 | not constructive | Migrating from MySQL to PostgreSQL
===
We are currently using MySQL for a product we are building, and are keen to move to PostgreSQL as soon as possible, primarily for licensing reasons.
Has anyone else done such a move? Our database is the lifeblood of the application and will eventually be storing TBs of data, so I'm keen to hear about experiences of performance improvements/losses, major hurdles in converting SQL and stored procedures, etc. | 4 |
17,721 | 08/20/2008 10:43:13 | 446,497 | 08/18/2008 01:08:53 | 113 | 13 | Experience with Hadoop? | Did some of you tried Hadoop? Can it be used without the distributed filesystem that goes with it, in a Share-nothing architecture? Would that make sense?
I'm also interested into any performance results you have... | performance | distributed | hadoop | share-nothing | null | null | open | Experience with Hadoop?
===
Did some of you tried Hadoop? Can it be used without the distributed filesystem that goes with it, in a Share-nothing architecture? Would that make sense?
I'm also interested into any performance results you have... | 0 |
17,725 | 08/20/2008 10:46:20 | 832 | 08/09/2008 06:51:40 | 791 | 71 | Large, Complex Objects as a Web Service Result | Hello again ladies and gents!
OK, following on from my other question on [ASP.NET Web Service Results, Proxy Classes and Type Conversion](http://stackoverflow.com/questions/6681/aspnet-web-service-results-proxy-classes-and-type-conversion). I've come to a part in my project where I need to get my thinking cap on.
Basically, we have a large, complex custom object that needs to be returned from a Web Service and consumed in the client application.
Now, based on the previous discussion, we know this is going to then take the form of the proxy class(es) as the return type. To overcome this, we need to basically copy the properties from one to the other.
In this case, that is something that I would really, really, _really!_ like to avoid!
So, it got me thinking, **how else could we do this?**
My current thoughts are to enable the object for complete serialization to XML and then return the XML as a string from the Web Service. We then de-serialize at the client. This will mean a fair bit of attribute decorating, but at least the code at both endpoints will be light, namely by just using the .NET XML Serializer.
##What are your thoughts on this? | c# | asp.net | xml | webservices | serialization | null | open | Large, Complex Objects as a Web Service Result
===
Hello again ladies and gents!
OK, following on from my other question on [ASP.NET Web Service Results, Proxy Classes and Type Conversion](http://stackoverflow.com/questions/6681/aspnet-web-service-results-proxy-classes-and-type-conversion). I've come to a part in my project where I need to get my thinking cap on.
Basically, we have a large, complex custom object that needs to be returned from a Web Service and consumed in the client application.
Now, based on the previous discussion, we know this is going to then take the form of the proxy class(es) as the return type. To overcome this, we need to basically copy the properties from one to the other.
In this case, that is something that I would really, really, _really!_ like to avoid!
So, it got me thinking, **how else could we do this?**
My current thoughts are to enable the object for complete serialization to XML and then return the XML as a string from the Web Service. We then de-serialize at the client. This will mean a fair bit of attribute decorating, but at least the code at both endpoints will be light, namely by just using the .NET XML Serializer.
##What are your thoughts on this? | 0 |
17,732 | 08/20/2008 11:01:19 | 2,095 | 08/20/2008 11:01:19 | 1 | 0 | When should assertions stay in production code? | There's a [discussion][1] going on over at comp.lang.c++.moderated about whether or not assertions, which in C++ only exist in debug builds by default, should be kept in production code or not.
Obviously, each project is unique, so my question here is **not** so much **whether** assertions should be kept, **but in which cases** this is recommendable/not a good idea.
By assertion, I mean:
- A run-time check that tests a condition which, when false, reveals a bug in the software.
- A mechanism by which the program is halted (maybe after really minimal clean-up work).
I'm not necessarily talking about C or C++.
My own opinion is that if you're the programmer, but don't own the data (which is the case with most commercial desktop applications), you should keep them on, because a failing asssertion shows a bug, and you should not go on with a bug, with the risk of corrupting the user's data. This forces you to test strongly before you ship, and makes bugs more visible, thus easier to spot and fix.
What's your opinion/experience?
Cheers,
Carl
[1]: http://groups.google.com/group/comp.lang.c++.moderated/browse_thread/thread/8e0235d58c8635c2 "assertions: does it matter that they are disabled in production?" | quality | assert | null | null | null | null | open | When should assertions stay in production code?
===
There's a [discussion][1] going on over at comp.lang.c++.moderated about whether or not assertions, which in C++ only exist in debug builds by default, should be kept in production code or not.
Obviously, each project is unique, so my question here is **not** so much **whether** assertions should be kept, **but in which cases** this is recommendable/not a good idea.
By assertion, I mean:
- A run-time check that tests a condition which, when false, reveals a bug in the software.
- A mechanism by which the program is halted (maybe after really minimal clean-up work).
I'm not necessarily talking about C or C++.
My own opinion is that if you're the programmer, but don't own the data (which is the case with most commercial desktop applications), you should keep them on, because a failing asssertion shows a bug, and you should not go on with a bug, with the risk of corrupting the user's data. This forces you to test strongly before you ship, and makes bugs more visible, thus easier to spot and fix.
What's your opinion/experience?
Cheers,
Carl
[1]: http://groups.google.com/group/comp.lang.c++.moderated/browse_thread/thread/8e0235d58c8635c2 "assertions: does it matter that they are disabled in production?" | 0 |
17,761 | 08/20/2008 11:21:36 | 991 | 08/11/2008 12:19:01 | 21 | 2 | Are e-book readers good enough for tech books? | I was wondering if the current generation of e-book readers (like the Kindle, or Sony's Reader) are big/high-res enough that you can comfortably use them for large paper-size PDFs, like most programming and other technical books? I've bought a few PDF books from Pragmatic Bookshelf lately, and it would be nice to have something to read them on that is smaller and cooler than a laptop and not backlit :-)
Does anyone have experience with this? | books | pdf | e-book-reader | null | null | 08/21/2011 02:28:19 | off topic | Are e-book readers good enough for tech books?
===
I was wondering if the current generation of e-book readers (like the Kindle, or Sony's Reader) are big/high-res enough that you can comfortably use them for large paper-size PDFs, like most programming and other technical books? I've bought a few PDF books from Pragmatic Bookshelf lately, and it would be nice to have something to read them on that is smaller and cooler than a laptop and not backlit :-)
Does anyone have experience with this? | 2 |
17,770 | 08/20/2008 11:32:33 | 1,693 | 08/18/2008 02:25:37 | 196 | 7 | Tracking Useful Information | What do the clever programmers here do to keep track of handy programming tricks and useful information they pick up over their many years of experience? Things like useful compiler arguments, IDE short-cuts, clever code snippets, etc.
I sometimes find myself frustrated when looking up something that I used to know a year or two ago. My IE favourites probably represent a good chunk of the Internet in the late 1990s, so clearly that isn't effective (at least for me). Or am I just getting old?
So.. what do you do? | knowledge-management | null | null | null | null | null | open | Tracking Useful Information
===
What do the clever programmers here do to keep track of handy programming tricks and useful information they pick up over their many years of experience? Things like useful compiler arguments, IDE short-cuts, clever code snippets, etc.
I sometimes find myself frustrated when looking up something that I used to know a year or two ago. My IE favourites probably represent a good chunk of the Internet in the late 1990s, so clearly that isn't effective (at least for me). Or am I just getting old?
So.. what do you do? | 0 |
17,772 | 08/20/2008 11:34:06 | 905 | 08/10/2008 09:37:14 | 2,083 | 154 | Anyone know a quick way to get to custom attributes on an enum value? | This is probably best shown with an example. I have an enum with attributes:
public enum MyEnum {
[CustomInfo("This is a custom attrib")]
None = 0,
[CustomInfo("This is another attrib")]
ValueA,
[CustomInfo("This has an extra flag", AllowSomething = true)]
ValueB,
}
I want to get to those attributes from an instance:
public CustomInfoAttribute GetInfo( MyEnum enumInput ) {
Type typeOfEnum = enumInput.GetType(); //this will be typeof( MyEnum )
//here is the problem, GetField takes a string
// the .ToString() on enums is very slow
FieldInfo fi = typeOfEnum.GetField( enumInput.ToString() );
//get the attribute from the field
return fi.GetCustomAttributes( typeof( CustomInfoAttribute ), false ).
FirstOrDefault() //Linq method to get first or null
as CustomInfoAttribute; //use as operator to convert
}
As this is using reflection I expect some slowness, but it seems messy to convert the enum value to a string (which reflects the name) when I already have an instance of it.
Does anyone have a better way? | c# | .net | reflection | attributes | enums | null | open | Anyone know a quick way to get to custom attributes on an enum value?
===
This is probably best shown with an example. I have an enum with attributes:
public enum MyEnum {
[CustomInfo("This is a custom attrib")]
None = 0,
[CustomInfo("This is another attrib")]
ValueA,
[CustomInfo("This has an extra flag", AllowSomething = true)]
ValueB,
}
I want to get to those attributes from an instance:
public CustomInfoAttribute GetInfo( MyEnum enumInput ) {
Type typeOfEnum = enumInput.GetType(); //this will be typeof( MyEnum )
//here is the problem, GetField takes a string
// the .ToString() on enums is very slow
FieldInfo fi = typeOfEnum.GetField( enumInput.ToString() );
//get the attribute from the field
return fi.GetCustomAttributes( typeof( CustomInfoAttribute ), false ).
FirstOrDefault() //Linq method to get first or null
as CustomInfoAttribute; //use as operator to convert
}
As this is using reflection I expect some slowness, but it seems messy to convert the enum value to a string (which reflects the name) when I already have an instance of it.
Does anyone have a better way? | 0 |
17,781 | 08/20/2008 11:36:55 | 277 | 08/04/2008 10:55:22 | 150 | 6 | What Certificate Authority Software is Available? | I am running a number of SSL-encrypted websites, and need to generate certificates to run on these. They are all internal applications, so I don't need to purchase a certificate, I can create my own.
I have found it quite tedious to do everything using openssl all the time, and figure this is the kind of thing that has probably been done before and software exists for it.
My preference is for linux-based systems, and I would prefer a command-line system rather than a GUI.
Does anyone have some suggestions? | linux | certificateauthority | openssl | null | null | null | open | What Certificate Authority Software is Available?
===
I am running a number of SSL-encrypted websites, and need to generate certificates to run on these. They are all internal applications, so I don't need to purchase a certificate, I can create my own.
I have found it quite tedious to do everything using openssl all the time, and figure this is the kind of thing that has probably been done before and software exists for it.
My preference is for linux-based systems, and I would prefer a command-line system rather than a GUI.
Does anyone have some suggestions? | 0 |
17,785 | 08/20/2008 11:43:21 | 194 | 08/03/2008 10:56:49 | 1,249 | 78 | Default Internet connection on Dual LAN Workstation | I know this is not programming directly, but it's regarding a development workstation I'm setting up...so bare with me.
I've got a Windows Server 2003 machine that needs to be on two LAN segments at the same time. One of them is a 10.17.x.x LAN and the other is 10.16.x.x
The problem is that I don't want to be using up the bandwidth on the 10.16.x.x network for internet traffic, etc (this network is basically only for internal stuff, though it does have internet access) so I would like the system to use the 10.17.x.x connection for anything that is external to the LAN (and for anything on 10.17.x.x of course, and to only use the 10.16.x.x connection for things that are on *that* specific LAN.
I've tried looking into the windows "route" command but it's fairly confusing and won't seem to let me delete routes tha tI believe are interfering with what I want it to do. Is there a better way of doing this? Any good software for segmenting your LAN access? | networking | windows-server-2003 | null | null | null | null | open | Default Internet connection on Dual LAN Workstation
===
I know this is not programming directly, but it's regarding a development workstation I'm setting up...so bare with me.
I've got a Windows Server 2003 machine that needs to be on two LAN segments at the same time. One of them is a 10.17.x.x LAN and the other is 10.16.x.x
The problem is that I don't want to be using up the bandwidth on the 10.16.x.x network for internet traffic, etc (this network is basically only for internal stuff, though it does have internet access) so I would like the system to use the 10.17.x.x connection for anything that is external to the LAN (and for anything on 10.17.x.x of course, and to only use the 10.16.x.x connection for things that are on *that* specific LAN.
I've tried looking into the windows "route" command but it's fairly confusing and won't seem to let me delete routes tha tI believe are interfering with what I want it to do. Is there a better way of doing this? Any good software for segmenting your LAN access? | 0 |
17,786 | 08/20/2008 11:43:49 | 1,912 | 08/19/2008 14:07:17 | 13 | 8 | Warning C4341 - 'XX': signed value is out of range for enum constant | When compiling my C++ .Net application I get 104 warnings of the type:
Warning C4341 - 'XX': signed value is out of range for enum constant
Where XX can be WCHAR, LONG, BIT, BINARY, GUID etc.
I can't seem to remove these warnings whatever I do. When I double click on them it takes me to a part of my code that uses OdbcParameters - any when I try a test project with all the rest of my stuff but no OdbcParameters it doesn't give the warnings.
Any idea how I can get rid of these warnings? They're making real warnings from code I've actually written hard to see - and it just gives me a horrible feeling knowing my app has 104 warnings!
| .net | c++ | visual-c++ | null | null | null | open | Warning C4341 - 'XX': signed value is out of range for enum constant
===
When compiling my C++ .Net application I get 104 warnings of the type:
Warning C4341 - 'XX': signed value is out of range for enum constant
Where XX can be WCHAR, LONG, BIT, BINARY, GUID etc.
I can't seem to remove these warnings whatever I do. When I double click on them it takes me to a part of my code that uses OdbcParameters - any when I try a test project with all the rest of my stuff but no OdbcParameters it doesn't give the warnings.
Any idea how I can get rid of these warnings? They're making real warnings from code I've actually written hard to see - and it just gives me a horrible feeling knowing my app has 104 warnings!
| 0 |
17,795 | 08/20/2008 11:52:59 | 2,104 | 08/20/2008 11:52:59 | 1 | 0 | Getting the Remote Name Address (not IP) | I wanted to show the users Name Address (see: www.ipchicken.com), but the only thing I can find is the IP Address. I tried a reverse lookup, but didn't work either:
IPAddress ip = IPAddress.Parse(this.lblIp.Text);
string hostName = Dns.GetHostByAddress(ip).HostName;
this.lblHost.Text = hostName;
But HostName is the same as the IP address.
Who know's what I need to do?
Thanks.
Gab. | .net | asp.net | null | null | null | null | open | Getting the Remote Name Address (not IP)
===
I wanted to show the users Name Address (see: www.ipchicken.com), but the only thing I can find is the IP Address. I tried a reverse lookup, but didn't work either:
IPAddress ip = IPAddress.Parse(this.lblIp.Text);
string hostName = Dns.GetHostByAddress(ip).HostName;
this.lblHost.Text = hostName;
But HostName is the same as the IP address.
Who know's what I need to do?
Thanks.
Gab. | 0 |
17,806 | 08/20/2008 12:00:59 | 2,078 | 08/20/2008 08:00:36 | 1 | 1 | Warning: Found conflicts between different versions of the same dependent assembly | I am currently developing a .NET application, which consists of 20 projects. Some of those projects are compiled using .NET 3.5, some others are still .NET 2.0 projects (so far no problem).
The problem is that if I include an external component I always get the following warning:
"Found conflicts between different versions of the same dependent assembly".
What exactly does this warning mean and is there maybe a possibility to exclude this warning (like using #pragma disable in the source- code files)? | warning | compiler | null | null | null | null | open | Warning: Found conflicts between different versions of the same dependent assembly
===
I am currently developing a .NET application, which consists of 20 projects. Some of those projects are compiled using .NET 3.5, some others are still .NET 2.0 projects (so far no problem).
The problem is that if I include an external component I always get the following warning:
"Found conflicts between different versions of the same dependent assembly".
What exactly does this warning mean and is there maybe a possibility to exclude this warning (like using #pragma disable in the source- code files)? | 0 |
17,817 | 08/20/2008 12:12:13 | 1,912 | 08/19/2008 14:07:17 | 25 | 9 | Recommendation for javascript form validation library | Any recommendations for a javascript form validation library. I could try and roll my own (but I'm not very good at javascript). Needs to support checking for required fields, and preferably regexp validation of fields. | javascript | null | null | null | null | null | open | Recommendation for javascript form validation library
===
Any recommendations for a javascript form validation library. I could try and roll my own (but I'm not very good at javascript). Needs to support checking for required fields, and preferably regexp validation of fields. | 0 |
17,825 | 08/20/2008 12:22:41 | 1,683 | 08/18/2008 00:30:32 | 38 | 3 | best practice for releasing Microsoft dll's in setup | I'm working on a setup which <i>wants</i> to include the Microsoft.Web.Services3 (WSE 3.0) DLL. However, I typically do not like including Microsoft DLL's in our installs except by way of Microsoft's redistributables. There is both a developer and a redist install package available from Microsoft.
So, as a best practice, should I include the single DLL in my install or refer them to one of the WSE 3.0 installs (assuming they do not already have it installed)? | windows-installer | install | redistributable | null | null | null | open | best practice for releasing Microsoft dll's in setup
===
I'm working on a setup which <i>wants</i> to include the Microsoft.Web.Services3 (WSE 3.0) DLL. However, I typically do not like including Microsoft DLL's in our installs except by way of Microsoft's redistributables. There is both a developer and a redist install package available from Microsoft.
So, as a best practice, should I include the single DLL in my install or refer them to one of the WSE 3.0 installs (assuming they do not already have it installed)? | 0 |
17,840 | 08/20/2008 12:38:49 | 1,190 | 08/13/2008 12:15:38 | 453 | 38 | How can I learn about parser combinators? | I've found a few resources on the subject, but they all require a deep understanding of SmallTalk or Haskell, neither of which I know. | parsing | monads | null | null | null | null | open | How can I learn about parser combinators?
===
I've found a few resources on the subject, but they all require a deep understanding of SmallTalk or Haskell, neither of which I know. | 0 |
17,845 | 08/20/2008 12:42:49 | 1,730 | 08/18/2008 11:09:24 | 21 | 11 | RDF storage | Has someone experiment RDF storage solution like [sesame](http://www.openrdf.org/) ? I'm looking for performance review of this kingd of solution compared to the traditional database solution. | rdf | database | sesame | performance | null | null | open | RDF storage
===
Has someone experiment RDF storage solution like [sesame](http://www.openrdf.org/) ? I'm looking for performance review of this kingd of solution compared to the traditional database solution. | 0 |
17,851 | 08/20/2008 12:51:25 | 572 | 08/06/2008 20:56:54 | 809 | 73 | Is it worth it to learn an esoteric programming language? | [Wikipedia][1]: An esoteric programming language (sometimes shortened to esolang) is a programming language designed as a test of the boundaries of computer programming language design, as a proof of concept, or as a joke. There is usually no intention of the language being adopted for real-world programming. Such languages are often popular among hackers and hobbyists. This use of esoteric is meant to distinguish these languages from more popular programming languages. Some more popular languages may appear esoteric (in the usual sense of the word) to some, and though these could arguably be called "esoteric programming languages" too, this is not what is meant.
I think it might be worth it, just to learn a new language and go through the process, although only if you don't have anything else to do (like a real project or learning a new real language). But what does the community think? Is there some value in these languages?
[1]: http://en.wikipedia.org/wiki/Esoteric_programming_language | education | programming-language | null | null | null | null | open | Is it worth it to learn an esoteric programming language?
===
[Wikipedia][1]: An esoteric programming language (sometimes shortened to esolang) is a programming language designed as a test of the boundaries of computer programming language design, as a proof of concept, or as a joke. There is usually no intention of the language being adopted for real-world programming. Such languages are often popular among hackers and hobbyists. This use of esoteric is meant to distinguish these languages from more popular programming languages. Some more popular languages may appear esoteric (in the usual sense of the word) to some, and though these could arguably be called "esoteric programming languages" too, this is not what is meant.
I think it might be worth it, just to learn a new language and go through the process, although only if you don't have anything else to do (like a real project or learning a new real language). But what does the community think? Is there some value in these languages?
[1]: http://en.wikipedia.org/wiki/Esoteric_programming_language | 0 |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.