question_id
int64
4
6.31M
answer_id
int64
7
6.31M
title
stringlengths
9
150
question_body
stringlengths
0
28.8k
answer_body
stringlengths
60
27.2k
question_text
stringlengths
40
28.9k
combined_text
stringlengths
124
39.6k
tags
listlengths
1
6
question_score
int64
0
26.3k
answer_score
int64
0
28.8k
view_count
int64
15
14M
answer_count
int64
0
182
favorite_count
int64
0
32
question_creation_date
stringdate
2008-07-31 21:42:52
2011-06-10 18:12:18
answer_creation_date
stringdate
2008-07-31 22:17:57
2011-06-10 18:14:17
14,857
96,161
Why does VS 2005 keep giving me the "'x' is ambiguous in the namespace 'y'" error?
I'm not sure what VS setting I've changed or if it's a web.config setting or what, but I keep getting this error in the error list and yet all solutions build fine. Here are some examples: Error 5 'CompilerGlobalScopeAttribute' is ambiguous in the namespace 'System.Runtime.CompilerServices'. C:\projects\MyProject\Web\C...
Based on the results of your gacutil output (thanks for doing that; I think it helps), I would say you need to try and run a repair on the.NET Framework install and Visual Studio 2005. I'm not sure if that will fix it, but as you can see from the output of the gacutil, you have none for 2.0. From my VS2005 Command Prom...
Why does VS 2005 keep giving me the "'x' is ambiguous in the namespace 'y'" error? I'm not sure what VS setting I've changed or if it's a web.config setting or what, but I keep getting this error in the error list and yet all solutions build fine. Here are some examples: Error 5 'CompilerGlobalScopeAttribute' is ambigu...
TITLE: Why does VS 2005 keep giving me the "'x' is ambiguous in the namespace 'y'" error? QUESTION: I'm not sure what VS setting I've changed or if it's a web.config setting or what, but I keep getting this error in the error list and yet all solutions build fine. Here are some examples: Error 5 'CompilerGlobalScopeAt...
[ ".net", "visual-studio", "visual-studio-2005", "namespaces" ]
2
1
2,720
8
0
2008-08-18T16:18:31.430000
2008-09-18T19:43:00.240000
14,872
39,514
[ADO.NET error]: CREATE DATABASE permission denied in database 'master'. An attempt to attach an auto-named database for file HelloWorld.mdf failed
CREATE DATABASE permission denied in database 'master'. An attempt to attach an auto-named database for file C:\Documents and Settings\..\App_Data\HelloWorld.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share. I've found these links: http://blog.benhall.m...
Generally the user that you are using to run the SQL Server service will not have access to your personal user folders, that is why you're getting the error. You either need to change the credentials used for the service, or move the database to another folder, which did the trick in your case.
[ADO.NET error]: CREATE DATABASE permission denied in database 'master'. An attempt to attach an auto-named database for file HelloWorld.mdf failed CREATE DATABASE permission denied in database 'master'. An attempt to attach an auto-named database for file C:\Documents and Settings\..\App_Data\HelloWorld.mdf failed. A ...
TITLE: [ADO.NET error]: CREATE DATABASE permission denied in database 'master'. An attempt to attach an auto-named database for file HelloWorld.mdf failed QUESTION: CREATE DATABASE permission denied in database 'master'. An attempt to attach an auto-named database for file C:\Documents and Settings\..\App_Data\HelloWo...
[ "sql-server", "database", "ado.net", "sql-server-express" ]
6
4
13,804
7
0
2008-08-18T16:33:46.890000
2008-09-02T13:29:56.573000
14,873
14,972
How do I display database query statistics on Wordpress site?
I've noticed that a few Wordpress blogs have query statistics present in their footer that simply state the number of queries and the total time required to process them for the particular page, reading something like: 23 queries. 0.448 seconds I was wondering how this is accomplished. Is it through the use of a partic...
Try adding this to the bottom of the footer in your template: num_queries;?>.
How do I display database query statistics on Wordpress site? I've noticed that a few Wordpress blogs have query statistics present in their footer that simply state the number of queries and the total time required to process them for the particular page, reading something like: 23 queries. 0.448 seconds I was wonderi...
TITLE: How do I display database query statistics on Wordpress site? QUESTION: I've noticed that a few Wordpress blogs have query statistics present in their footer that simply state the number of queries and the total time required to process them for the particular page, reading something like: 23 queries. 0.448 sec...
[ "mysql", "performance", "wordpress", "layout", "statistics" ]
15
18
6,577
3
0
2008-08-18T16:33:58.870000
2008-08-18T17:40:51.717000
14,874
66,556
Drawing a view hierarchy into a specific context in Cocoa
For part of my application I have a need to create an image of a certain view and all of its subviews. To do this I'm creating a context that wraps a bitmap with the same-size as the view, but I'm unsure how to draw the view hierarchy into it. I can draw a single view just be setting the context and explicitly calling ...
I found that writing the drawing code myself was the best way to: deal with potential transparency issues (some of the other options do add a white background to the whole image) performance was much better The code below is not perfect, because it does not deal with scaling issues when going from bounds to frames, but...
Drawing a view hierarchy into a specific context in Cocoa For part of my application I have a need to create an image of a certain view and all of its subviews. To do this I'm creating a context that wraps a bitmap with the same-size as the view, but I'm unsure how to draw the view hierarchy into it. I can draw a singl...
TITLE: Drawing a view hierarchy into a specific context in Cocoa QUESTION: For part of my application I have a need to create an image of a certain view and all of its subviews. To do this I'm creating a context that wraps a bitmap with the same-size as the view, but I'm unsure how to draw the view hierarchy into it. ...
[ "objective-c", "cocoa", "macos" ]
4
2
3,178
4
0
2008-08-18T16:34:01.040000
2008-09-15T20:21:51.760000
14,884
14,899
Find the best combination from a given set of multiple sets
Say you have a shipment. It needs to go from point A to point B, point B to point C and finally point C to point D. You need it to get there in five days for the least amount of money possible. There are three possible shippers for each leg, each with their own different time and cost for each leg: Array ( [leg0] => Ar...
Could alter some of the shortest path algorithms, like Dijkstra's, to weight each path by cost but also keep track of time and stop going along a certain path if the time exceeds your threshold. Should find the cheapest that gets you in under your threshold that way
Find the best combination from a given set of multiple sets Say you have a shipment. It needs to go from point A to point B, point B to point C and finally point C to point D. You need it to get there in five days for the least amount of money possible. There are three possible shippers for each leg, each with their ow...
TITLE: Find the best combination from a given set of multiple sets QUESTION: Say you have a shipment. It needs to go from point A to point B, point B to point C and finally point C to point D. You need it to get there in five days for the least amount of money possible. There are three possible shippers for each leg, ...
[ "php", "algorithm", "puzzle", "combinations", "np-complete" ]
10
8
2,386
7
0
2008-08-18T16:39:23.557000
2008-08-18T16:52:36.930000
14,893
15,011
Improving Your Build Process
Or, actually establishing a build process when there isn't much of one in place to begin with. Currently, that's pretty much the situation my group faces. We do web-app development primarily (but no desktop development at this time). Software deployments are ugly and unwieldy even with our modest apps, and we've had fa...
When taking on a project that has never had an automated build process, it is easier to take it in steps. Do not try to swallow to much at one time, otherwise it can feel overwhelming. First get your code compiling with one step using an automated build program (i.e. nant/msbuild). I am not going to debate which one is...
Improving Your Build Process Or, actually establishing a build process when there isn't much of one in place to begin with. Currently, that's pretty much the situation my group faces. We do web-app development primarily (but no desktop development at this time). Software deployments are ugly and unwieldy even with our ...
TITLE: Improving Your Build Process QUESTION: Or, actually establishing a build process when there isn't much of one in place to begin with. Currently, that's pretty much the situation my group faces. We do web-app development primarily (but no desktop development at this time). Software deployments are ugly and unwie...
[ "build-process", "build-automation", "build" ]
27
18
7,169
8
0
2008-08-18T16:48:50.293000
2008-08-18T18:07:27.763000
14,909
14,921
Tree-Based (vs. HTML-Based) Web Framework?
Anyone who writes client-side JavaScript is familiar with the DOM - the tree structure that your browser references in memory, generated from the HTML it got from the server. JavaScript can add, remove and modify nodes on the DOM tree to make changes to the page. I find it very nice to work with (browser bugs aside), a...
You're describing Rhino on Rails, which is not out but will be soon. Similarly, Aptana Jaxer, however RnR will include an actual framework (Rails) whereas Jaxer is just the server technology.
Tree-Based (vs. HTML-Based) Web Framework? Anyone who writes client-side JavaScript is familiar with the DOM - the tree structure that your browser references in memory, generated from the HTML it got from the server. JavaScript can add, remove and modify nodes on the DOM tree to make changes to the page. I find it ver...
TITLE: Tree-Based (vs. HTML-Based) Web Framework? QUESTION: Anyone who writes client-side JavaScript is familiar with the DOM - the tree structure that your browser references in memory, generated from the HTML it got from the server. JavaScript can add, remove and modify nodes on the DOM tree to make changes to the p...
[ "javascript", "html", "dom" ]
5
2
412
4
0
2008-08-18T16:58:12.393000
2008-08-18T17:04:54.377000
14,911
114,334
PDF generation from XHTML in a LAMP environment
Can anyone recommend a good server-side PDF generation tool that would work in a Linux environment. I want easy as possible, pass it a XHTML file (with images) and have it generate a PDF from the rendered source. I don't have a massive budget, but anything under $1000 should be alright. Andrew
I used HTMLDoc about 8 years ago and it did a good job of turning HTML tables with some basic formatting into a decent PDF report. There also seems to be an open source version as well.
PDF generation from XHTML in a LAMP environment Can anyone recommend a good server-side PDF generation tool that would work in a Linux environment. I want easy as possible, pass it a XHTML file (with images) and have it generate a PDF from the rendered source. I don't have a massive budget, but anything under $1000 sho...
TITLE: PDF generation from XHTML in a LAMP environment QUESTION: Can anyone recommend a good server-side PDF generation tool that would work in a Linux environment. I want easy as possible, pass it a XHTML file (with images) and have it generate a PDF from the rendered source. I don't have a massive budget, but anythi...
[ "linux", "pdf", "pdf-generation" ]
5
1
2,630
8
0
2008-08-18T16:58:50.007000
2008-09-22T11:30:46.010000
14,923
36,833
Can I generate ASP.NET MVC routes from a Sitemap?
I'm thinking of learning the ASP.NET MVC framework for an upcoming project. Can I use the advanced routing to create long URLs based on the sitemap hierarchy? Example navigation path: Home > Shop > Products > Household > Kitchen > Cookware > Cooksets > Nonstick Typical (I think) MVC URL: http://example.com/products/cat...
Zack, if I understand right you want unlimited depth of the subcategories. No biggie, since MVC Preview 3 (I think 3 or 4) this has been solved. Just define a route like "{controller}/{action}/{*categoryPath}" for an url such as: http://example.com/shop/products/household/kitchen/cookware/cooksets/nonstick you should h...
Can I generate ASP.NET MVC routes from a Sitemap? I'm thinking of learning the ASP.NET MVC framework for an upcoming project. Can I use the advanced routing to create long URLs based on the sitemap hierarchy? Example navigation path: Home > Shop > Products > Household > Kitchen > Cookware > Cooksets > Nonstick Typical ...
TITLE: Can I generate ASP.NET MVC routes from a Sitemap? QUESTION: I'm thinking of learning the ASP.NET MVC framework for an upcoming project. Can I use the advanced routing to create long URLs based on the sitemap hierarchy? Example navigation path: Home > Shop > Products > Household > Kitchen > Cookware > Cooksets >...
[ "asp.net", "asp.net-mvc", "url", "routes", "sitemap" ]
4
10
2,054
2
0
2008-08-18T17:05:40.400000
2008-08-31T12:38:24.453000
14,934
14,946
Parameter Binding: What happens under the hood?
.NET, Java and other high level database API's in various language often provide techniques known as prepared statements and parameter binding as opposed to sending plain text commands to the Database server. What I would like to know is what happens when you execute a statement like this: SqlCommand cmd = new SqlComma...
The MySQL manual page on prepared statements provides lots of information (which should apply to any other RDBMS). Basically, your statement is parsed and processed ahead of time, and the parameters are sent separately instead of being handled along with the SQL code. This eliminates SQL-injection attacks because the S...
Parameter Binding: What happens under the hood? .NET, Java and other high level database API's in various language often provide techniques known as prepared statements and parameter binding as opposed to sending plain text commands to the Database server. What I would like to know is what happens when you execute a st...
TITLE: Parameter Binding: What happens under the hood? QUESTION: .NET, Java and other high level database API's in various language often provide techniques known as prepared statements and parameter binding as opposed to sending plain text commands to the Database server. What I would like to know is what happens whe...
[ "c#", ".net", "sql", "database", "api" ]
8
7
3,189
3
0
2008-08-18T17:11:15.083000
2008-08-18T17:18:50.310000
14,943
14,960
How to Disable Alt + F4 closing form?
What is the best way to disable Alt + F4 in a c# win form to prevent the user from closing the form? I am using a form as a popup dialog to display a progress bar and I do not want the user to be able to close it.
This does the job: private void Form1_FormClosing(object sender, FormClosingEventArgs e) { e.Cancel = true; } Edit: In response to pix0rs concern - yes you are correct that you will not be able to programatically close the app. However, you can simply remove the event handler for the form_closing event before closing t...
How to Disable Alt + F4 closing form? What is the best way to disable Alt + F4 in a c# win form to prevent the user from closing the form? I am using a form as a popup dialog to display a progress bar and I do not want the user to be able to close it.
TITLE: How to Disable Alt + F4 closing form? QUESTION: What is the best way to disable Alt + F4 in a c# win form to prevent the user from closing the form? I am using a form as a popup dialog to display a progress bar and I do not want the user to be able to close it. ANSWER: This does the job: private void Form1_For...
[ "c#", ".net", "winforms" ]
83
110
84,834
11
0
2008-08-18T17:16:52.577000
2008-08-18T17:27:38.343000
14,963
15,098
.NET 3.5 Service Pack 1 causes 404 pages on ASP.NET Web App
I have a problem with IIS 6.0 ceasing to work for an ASP.NET application after installing Service Pack 1 for.NET 3.5. I have 2 identical virtual dedicated servers. Installing SP1 on the first had no adverse effect. Installing it on the second caused ASP.NET pages to start returning 404 page not found. Static.html pages...
This is broad problem, so let's start by asking some troubleshooting questions: Based on your description, the ASP.NET runtime is not catching your request and processing the aspx files. You may need to register the asp.net pipeline with IIS again using ASPNET_REGIIS -i. Have you made sure that the app_offline.htm file...
.NET 3.5 Service Pack 1 causes 404 pages on ASP.NET Web App I have a problem with IIS 6.0 ceasing to work for an ASP.NET application after installing Service Pack 1 for.NET 3.5. I have 2 identical virtual dedicated servers. Installing SP1 on the first had no adverse effect. Installing it on the second caused ASP.NET pa...
TITLE: .NET 3.5 Service Pack 1 causes 404 pages on ASP.NET Web App QUESTION: I have a problem with IIS 6.0 ceasing to work for an ASP.NET application after installing Service Pack 1 for.NET 3.5. I have 2 identical virtual dedicated servers. Installing SP1 on the first had no adverse effect. Installing it on the second...
[ "iis", ".net-3.5", "servicepacks" ]
5
4
3,184
6
0
2008-08-18T17:30:18.553000
2008-08-18T19:14:46.223000
15,007
15,037
Executing JavaScript to Render HTML for Server-Side Caching
There are lots of widgets provided by sites that are effectively bits of JavaScript that generate HTML through DOM manipulation or document.write(). Rather than slow the browser down even more with additional requests and trust yet another provider to be fast, reliable and not change the widget output, I want to execut...
Wikipedia's "Server-side JavaScript" article lists numerous implementations, many of which are based on Mozilla's Rhino JavaScript-to-Java converter, or its cousin SpiderMonkey (the same engine as found in Firefox and other Gecko-based browsers). In particular, something simple like mod_js for Apache may suit your need...
Executing JavaScript to Render HTML for Server-Side Caching There are lots of widgets provided by sites that are effectively bits of JavaScript that generate HTML through DOM manipulation or document.write(). Rather than slow the browser down even more with additional requests and trust yet another provider to be fast,...
TITLE: Executing JavaScript to Render HTML for Server-Side Caching QUESTION: There are lots of widgets provided by sites that are effectively bits of JavaScript that generate HTML through DOM manipulation or document.write(). Rather than slow the browser down even more with additional requests and trust yet another pr...
[ "javascript", "html", "rendering", "greasemonkey" ]
15
4
9,376
3
0
2008-08-18T18:01:33.623000
2008-08-18T18:26:10.300000
15,015
15,069
Web Application Testing for .Net (WatiN Test Recorder)
I've been using WatiN as a testing tool for my current project. Besides the minor bugs with the Test Recorder, I've been able to use it and automate a lot of my tests in conjunction with NUnit. Anyone else out there with experience with different tools they might suggest?
I have used: WatiN AutomatedQA TestComplete All of them have had their purpose and are very good tools.
Web Application Testing for .Net (WatiN Test Recorder) I've been using WatiN as a testing tool for my current project. Besides the minor bugs with the Test Recorder, I've been able to use it and automate a lot of my tests in conjunction with NUnit. Anyone else out there with experience with different tools they might s...
TITLE: Web Application Testing for .Net (WatiN Test Recorder) QUESTION: I've been using WatiN as a testing tool for my current project. Besides the minor bugs with the Test Recorder, I've been able to use it and automate a lot of my tests in conjunction with NUnit. Anyone else out there with experience with different ...
[ ".net", "automated-tests", "watin" ]
8
1
7,210
6
0
2008-08-18T18:12:09.187000
2008-08-18T18:43:14.943000
15,024
15,035
Tools to help a small shop score higher on the "Joel Test"
Questions #1 through #4 on the Joel Test in my opinion are all about the development tools being used and the support system in place for developers: Do you use source control? Can you make a build in one step? Do you make daily builds? Do you have a bug database? I'm just curious what free/cheap (but good) tools exist...
source control: Subversion or Mercurial or Git build automation: NAnt, MSBuild, Rake, Maven continuous integration: CruiseControl.NET or Continuum or Jenkins issue tracking: Trac, Bugzilla, Gemini (if it must be.NET and free-ish) Don't forget automated testing with NUnit, Fit, and WatiN.
Tools to help a small shop score higher on the "Joel Test" Questions #1 through #4 on the Joel Test in my opinion are all about the development tools being used and the support system in place for developers: Do you use source control? Can you make a build in one step? Do you make daily builds? Do you have a bug databa...
TITLE: Tools to help a small shop score higher on the "Joel Test" QUESTION: Questions #1 through #4 on the Joel Test in my opinion are all about the development tools being used and the support system in place for developers: Do you use source control? Can you make a build in one step? Do you make daily builds? Do you...
[ "version-control", "bug-tracking", "dailybuilds" ]
17
19
1,708
14
0
2008-08-18T18:17:49.787000
2008-08-18T18:25:23.437000
15,034
15,055
Visual Studio Error: The "GenerateResource" task failed unexpectedly
When building a VS 2008 solution with 19 projects I sometimes get: The "GenerateResource" task failed unexpectedly. System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown. at System.IO.MemoryStream.set_Capacity(Int32 value) at System.IO.MemoryStream.EnsureCapacity(Int32 value) at System...
I used to hit this now and again with larger solutions. My tactic was to break the larger solution down into smaller solutions. You could also try: http://stevenharman.net/blog/archive/2008/04/29/hacking-visual-studio-to-use-more-than-2gigabytes-of-memory.aspx
Visual Studio Error: The "GenerateResource" task failed unexpectedly When building a VS 2008 solution with 19 projects I sometimes get: The "GenerateResource" task failed unexpectedly. System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown. at System.IO.MemoryStream.set_Capacity(Int32 v...
TITLE: Visual Studio Error: The "GenerateResource" task failed unexpectedly QUESTION: When building a VS 2008 solution with 19 projects I sometimes get: The "GenerateResource" task failed unexpectedly. System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown. at System.IO.MemoryStream.se...
[ "visual-studio", "out-of-memory" ]
7
0
18,908
8
0
2008-08-18T18:25:13.810000
2008-08-18T18:36:45.270000
15,040
15,683
How do you set your LAMP testing server?
I am using xampp on Windows, but I would like to use something closer to my server setup. Federico Cargnelutti tutorial explains how to setup LAMP VMWARE appliance; it is a great introduction to VMware appliances, but one of the commands was not working and it doesn't describe how to change the keyboard layout and the ...
This is my install scrpt, I use it on debian servers, but it will work in Ubuntu (Ubuntu is built on Debian) apt-get -yq update apt-get -yq upgrade apt-get -yq install sudo apt-get -yq install gcc apt-get -yq install g++ apt-get -yq install make apt-get -yq install apache2 apt-get -yq install php5 apt-get -yq install p...
How do you set your LAMP testing server? I am using xampp on Windows, but I would like to use something closer to my server setup. Federico Cargnelutti tutorial explains how to setup LAMP VMWARE appliance; it is a great introduction to VMware appliances, but one of the commands was not working and it doesn't describe h...
TITLE: How do you set your LAMP testing server? QUESTION: I am using xampp on Windows, but I would like to use something closer to my server setup. Federico Cargnelutti tutorial explains how to setup LAMP VMWARE appliance; it is a great introduction to VMware appliances, but one of the commands was not working and it ...
[ "ubuntu", "vmware", "lamp" ]
6
5
2,188
5
0
2008-08-18T18:26:53.603000
2008-08-19T04:18:02.413000
15,047
15,207
Looking for example of Command pattern for UI
I'm working on a WinForm.Net application with the basic UI that includes toolbar buttons, menu items and keystrokes that all initiate the same underlying code. Right now the event handlers for each of these call a common method to perform the function. From what I've read this type of action could be handled by the Com...
Let's first make sure we know what the Command pattern is: Command pattern encapsulates a request as an object and gives it a known public interface. Command Pattern ensures that every object receives its own commands and provides a decoupling between sender and receiver. A sender is an object that invokes an operation...
Looking for example of Command pattern for UI I'm working on a WinForm.Net application with the basic UI that includes toolbar buttons, menu items and keystrokes that all initiate the same underlying code. Right now the event handlers for each of these call a common method to perform the function. From what I've read t...
TITLE: Looking for example of Command pattern for UI QUESTION: I'm working on a WinForm.Net application with the basic UI that includes toolbar buttons, menu items and keystrokes that all initiate the same underlying code. Right now the event handlers for each of these call a common method to perform the function. Fro...
[ ".net", "design-patterns", "command" ]
18
20
9,968
5
0
2008-08-18T18:31:08.730000
2008-08-18T20:51:49.070000
15,062
15,136
How do I do a string replacement in a PowerShell function?
How do I convert function input parameters to the right type? I want to return a string that has part of the URL passed into it removed. This works, but it uses a hard-coded string: function CleanUrl($input) { $x = "http://google.com".Replace("http://", "") return $x } $SiteName = CleanUrl($HostHeader) echo $SiteName ...
The concept here is correct. The problem is with the variable name you have chosen. $input is a reserved variable used by PowerShell to represent an array of pipeline input. If you change your variable name, you should not have any problem. PowerShell does have a replace operator, so you could make your function into f...
How do I do a string replacement in a PowerShell function? How do I convert function input parameters to the right type? I want to return a string that has part of the URL passed into it removed. This works, but it uses a hard-coded string: function CleanUrl($input) { $x = "http://google.com".Replace("http://", "") ret...
TITLE: How do I do a string replacement in a PowerShell function? QUESTION: How do I convert function input parameters to the right type? I want to return a string that has part of the URL passed into it removed. This works, but it uses a hard-coded string: function CleanUrl($input) { $x = "http://google.com".Replace(...
[ "string", "powershell", "function", "replace" ]
18
16
54,649
4
0
2008-08-18T18:40:34.403000
2008-08-18T19:50:39.350000
15,102
16,690
Office VSTO Word 2003 project keeps trying to autoconvert to 2007
I am working on a Office Word add-in for Word 2003. When I reopen the project, the VS2008 auto covert dialog box opens and tries to convert it to the Word 2007 format. How can I reopen this file and keep it in the Word 2003 format?
Got a answer over at MSDN Forums This is the default behavior when you have Office 2007 installed on your development computer. You can modify this behavior under Tools->Options. For more informaiton, see the following threads: http://forums.microsoft.com/Forums/ShowPost.aspx?PostID=3762143&SiteID=1 http://forums.micro...
Office VSTO Word 2003 project keeps trying to autoconvert to 2007 I am working on a Office Word add-in for Word 2003. When I reopen the project, the VS2008 auto covert dialog box opens and tries to convert it to the Word 2007 format. How can I reopen this file and keep it in the Word 2003 format?
TITLE: Office VSTO Word 2003 project keeps trying to autoconvert to 2007 QUESTION: I am working on a Office Word add-in for Word 2003. When I reopen the project, the VS2008 auto covert dialog box opens and tries to convert it to the Word 2007 format. How can I reopen this file and keep it in the Word 2003 format? ANS...
[ "c#", "visual-studio", "ms-word", "vsto" ]
6
3
565
1
0
2008-08-18T19:17:00.447000
2008-08-19T18:31:39.880000
15,109
15,286
Visual Studio 2005 Setup project install crashes over Terminal Server
I have a setup project created by Visual Studio 2005, and consists of both a C#.NET 2.0 project and C++ MFC project, and the C++ run time. It works properly when run from the main console, but when run over a Terminal Server session on a Windows XP target, the install fails in the following way - When the Setup.exe is ...
I had LOTS of issues with developing installers (and software in general) for terminal server. I hate that damn thing. Anyway, VS Setup Projects are just.msi files, and run using the Windows installer framework. This will drop a log file when it errors out, they're called MSIc183.LOG (swap the c183 for some random numb...
Visual Studio 2005 Setup project install crashes over Terminal Server I have a setup project created by Visual Studio 2005, and consists of both a C#.NET 2.0 project and C++ MFC project, and the C++ run time. It works properly when run from the main console, but when run over a Terminal Server session on a Windows XP t...
TITLE: Visual Studio 2005 Setup project install crashes over Terminal Server QUESTION: I have a setup project created by Visual Studio 2005, and consists of both a C#.NET 2.0 project and C++ MFC project, and the C++ run time. It works properly when run from the main console, but when run over a Terminal Server session...
[ "visual-studio", "installation", "projects" ]
4
2
1,379
2
0
2008-08-18T19:24:23.973000
2008-08-18T22:00:58.103000
15,124
15,134
.net Job Interview
I have a job interview tomorrow for a.NET shop. For the past few years I have been developing in languages other than.NET and figure it is probably a good idea to brush up on what is cool and new in the world of.NET. I've been reading about LINQ and WPF but these are more technologies than trends. What else should I lo...
Take this with a grain of salt, but in my experience, LINQ and WPF are still in the realm of "yeah we'd like to get into that someday". Most shops are still on VS2005 and.NET 2.0, so I'd want to make sure I was up to speed on core facilities: generics ADO.NET WinForms / WebForms depending And so forth.
.net Job Interview I have a job interview tomorrow for a.NET shop. For the past few years I have been developing in languages other than.NET and figure it is probably a good idea to brush up on what is cool and new in the world of.NET. I've been reading about LINQ and WPF but these are more technologies than trends. Wh...
TITLE: .net Job Interview QUESTION: I have a job interview tomorrow for a.NET shop. For the past few years I have been developing in languages other than.NET and figure it is probably a good idea to brush up on what is cool and new in the world of.NET. I've been reading about LINQ and WPF but these are more technologi...
[ ".net" ]
6
1
1,863
5
0
2008-08-18T19:41:39.740000
2008-08-18T19:50:18.430000
15,133
16,431
Tool in Visual Studio 2008 for helping with Localization
Does anyone have any recommendations of tools that can be of assistance with moving literal values into resource files for localization? I've used a resharper plugin called RGreatX but was wondering if there is anything else out there. It's one heck of a long manual process for moving the strings across and think there...
Here's one: http://www.codeplex.com/ResourceRefactoring It'a actually a Microsoft "open source" Visual Studio(2005 and up) tool that integrates with the IDE. You can easily replace every occurence of a string with a ressource reference with a few clicks.
Tool in Visual Studio 2008 for helping with Localization Does anyone have any recommendations of tools that can be of assistance with moving literal values into resource files for localization? I've used a resharper plugin called RGreatX but was wondering if there is anything else out there. It's one heck of a long man...
TITLE: Tool in Visual Studio 2008 for helping with Localization QUESTION: Does anyone have any recommendations of tools that can be of assistance with moving literal values into resource files for localization? I've used a resharper plugin called RGreatX but was wondering if there is anything else out there. It's one ...
[ "visual-studio", "winforms", "internationalization", "vsx", "extensibility" ]
15
15
4,342
4
0
2008-08-18T19:49:40.130000
2008-08-19T15:45:17.330000
15,139
15,234
Building Standalone Applications in JavaScript
With the increased power of JavaScript frameworks like YUI, JQuery, and Prototype, and debugging tools like Firebug, doing an application entirely in browser-side JavaScript looks like a great way to make simple applications like puzzle games and specialized calculators. Is there any downside to this other than exposin...
I've written several application in JS including a spreadsheet. Upside: great language short code-run-review cycle DOM manipulation is great for UI design clients on every computer (and phone) Downside: differences between browsers (especially IE) code base scalability (with no intrinsic support for namespaces and clas...
Building Standalone Applications in JavaScript With the increased power of JavaScript frameworks like YUI, JQuery, and Prototype, and debugging tools like Firebug, doing an application entirely in browser-side JavaScript looks like a great way to make simple applications like puzzle games and specialized calculators. I...
TITLE: Building Standalone Applications in JavaScript QUESTION: With the increased power of JavaScript frameworks like YUI, JQuery, and Prototype, and debugging tools like Firebug, doing an application entirely in browser-side JavaScript looks like a great way to make simple applications like puzzle games and speciali...
[ "javascript", "deployment", "web-applications", "browser" ]
23
16
33,758
14
0
2008-08-18T19:52:16.273000
2008-08-18T21:19:27.827000
15,142
15,277
What are the pros and cons to keeping SQL in Stored Procs versus Code
What are the advantages/disadvantages of keeping SQL in your C# source code or in Stored Procs? I've been discussing this with a friend on an open source project that we're working on (C# ASP.NET Forum). At the moment, most of the database access is done by building the SQL inline in C# and calling to the SQL Server DB...
I am not a fan of stored procedures Stored Procedures are MORE maintainable because: * You don't have to recompile your C# app whenever you want to change some SQL You'll end up recompiling it anyway when datatypes change, or you want to return an extra column, or whatever. The number of times you can 'transparently' c...
What are the pros and cons to keeping SQL in Stored Procs versus Code What are the advantages/disadvantages of keeping SQL in your C# source code or in Stored Procs? I've been discussing this with a friend on an open source project that we're working on (C# ASP.NET Forum). At the moment, most of the database access is ...
TITLE: What are the pros and cons to keeping SQL in Stored Procs versus Code QUESTION: What are the advantages/disadvantages of keeping SQL in your C# source code or in Stored Procs? I've been discussing this with a friend on an open source project that we're working on (C# ASP.NET Forum). At the moment, most of the d...
[ "c#", "sql", "sql-server", "stored-procedures" ]
274
179
79,299
47
0
2008-08-18T19:54:39.467000
2008-08-18T21:50:33.757000
15,163
15,591
Prevent a TreeView from firing events in VB6?
In some VB6 code, I have a handler for a TreeView's Collapse event: Private Sub MyTree_Collapse(ByVal Node as MSComCtlLib.Node) This is called whenever a node in the tree is collapsed, whether by the user or programmatically. As it turns out, through some roundabout execution, it may happen that this handler will wind ...
I think that like many events in VB, it can't be switched off. Just set a boolean flag as you've suggested.
Prevent a TreeView from firing events in VB6? In some VB6 code, I have a handler for a TreeView's Collapse event: Private Sub MyTree_Collapse(ByVal Node as MSComCtlLib.Node) This is called whenever a node in the tree is collapsed, whether by the user or programmatically. As it turns out, through some roundabout executi...
TITLE: Prevent a TreeView from firing events in VB6? QUESTION: In some VB6 code, I have a handler for a TreeView's Collapse event: Private Sub MyTree_Collapse(ByVal Node as MSComCtlLib.Node) This is called whenever a node in the tree is collapsed, whether by the user or programmatically. As it turns out, through some ...
[ "events", "vb6", "treeview" ]
3
1
1,347
4
0
2008-08-18T20:11:22.787000
2008-08-19T02:43:58.220000
15,176
15,198
How to gauge the quality of a software product
I have a product, X, which we deliver to a client, C every month, including bugfixes, enhancements, new development etc.) Each month, I am asked to err "guarantee" the quality of the product. For this we use a number of statistics garnered from the tests that we do, such as: reopen rate (number of bugs reopened/number ...
I don't think you can ever really estimate the number of bugs in your app. Unless you use a language and process that allows formal proofs, you can never really be sure. Your time is probably better spent setting up processes to minimize bugs than trying to estimate how many you have. One of the most important things y...
How to gauge the quality of a software product I have a product, X, which we deliver to a client, C every month, including bugfixes, enhancements, new development etc.) Each month, I am asked to err "guarantee" the quality of the product. For this we use a number of statistics garnered from the tests that we do, such a...
TITLE: How to gauge the quality of a software product QUESTION: I have a product, X, which we deliver to a client, C every month, including bugfixes, enhancements, new development etc.) Each month, I am asked to err "guarantee" the quality of the product. For this we use a number of statistics garnered from the tests ...
[ "testing" ]
10
2
1,490
7
0
2008-08-18T20:18:22.257000
2008-08-18T20:43:17.573000
15,203
15,271
Best way to deploy subversion (SVN) in a multisite windows environment
We are planning on moving for MS Source Safe (ouch) to SVN. We are working mostly in a Microsoft environment (windows, Visual Studio,.NET) and we have developers in multiple sites. I heard about VisualSVN and integration with visual studio. On the other hand I can get someone to host SVN for me and use TortoiseSVN. Any...
Hosting subversion is fantastically simple. At the risk of being labeled a brown nose (is there a badge for that?) Jeff Atwood did put up an article on installing subersion http://blog.codinghorror.com/setting-up-subversion-on-windows/ So really you could save yourself some money by running your own subversion server a...
Best way to deploy subversion (SVN) in a multisite windows environment We are planning on moving for MS Source Safe (ouch) to SVN. We are working mostly in a Microsoft environment (windows, Visual Studio,.NET) and we have developers in multiple sites. I heard about VisualSVN and integration with visual studio. On the o...
TITLE: Best way to deploy subversion (SVN) in a multisite windows environment QUESTION: We are planning on moving for MS Source Safe (ouch) to SVN. We are working mostly in a Microsoft environment (windows, Visual Studio,.NET) and we have developers in multiple sites. I heard about VisualSVN and integration with visua...
[ "windows", "svn", "tortoisesvn", "visualsvn-server" ]
5
3
7,154
5
0
2008-08-18T20:46:11.797000
2008-08-18T21:42:25.457000
15,204
15,210
What is the best way to iterate through a strongly-typed generic List<T>?
What is the best way to iterate through a strongly-typed generic List in C#.NET and VB.NET?
For C#: foreach(ObjectType objectItem in objectTypeList) { //...do some stuff } Answer for VB.NET from Purple Ant: For Each objectItem as ObjectType in objectTypeList 'Do some stuff ' Next
What is the best way to iterate through a strongly-typed generic List<T>? What is the best way to iterate through a strongly-typed generic List in C#.NET and VB.NET?
TITLE: What is the best way to iterate through a strongly-typed generic List<T>? QUESTION: What is the best way to iterate through a strongly-typed generic List in C#.NET and VB.NET? ANSWER: For C#: foreach(ObjectType objectItem in objectTypeList) { //...do some stuff } Answer for VB.NET from Purple Ant: For Each obj...
[ "c#", ".net", "vb.net", "generics", "collections" ]
17
32
46,903
7
0
2008-08-18T20:49:22.443000
2008-08-18T20:52:25.980000
15,211
85,541
Subversion Management Tools
we have a lot of users running in different shared and solo-owned repositories in Subversion. As part of our work, we do project-shared code and individual work, and we need to control access, ideally on a group basis. Currenly, we use SVNManager to allow users to manage access and create repositories. However, in orde...
I would recommend SVN Access: http://www.jaj.com/projects/svnaccess/ or http://freshmeat.net/projects/svnaccess/ I have used it as is, and have modified it for an enterprise-wide solution at my day job.
Subversion Management Tools we have a lot of users running in different shared and solo-owned repositories in Subversion. As part of our work, we do project-shared code and individual work, and we need to control access, ideally on a group basis. Currenly, we use SVNManager to allow users to manage access and create re...
TITLE: Subversion Management Tools QUESTION: we have a lot of users running in different shared and solo-owned repositories in Subversion. As part of our work, we do project-shared code and individual work, and we need to control access, ideally on a group basis. Currenly, we use SVNManager to allow users to manage ac...
[ "linux", "svn" ]
13
4
14,215
4
0
2008-08-18T20:53:06.430000
2008-09-17T17:19:23.523000
15,219
18,507
UltraWebGrid: How to use a drop-down list in a column
I'm using the Infragistics grid and I'm having a difficult time using a drop-down list as the value selector for one of my columns. I tried reading the documentation but Infragistics' documentation is not so good. I've also taken a look at this discussion with no luck. What I'm doing so far: col.Type = ColumnType.DropD...
I've found what was wrong. The column must allow updates. uwgMyGrid.Columns.FromKey("colTest").AllowUpdate = AllowUpdate.Yes;
UltraWebGrid: How to use a drop-down list in a column I'm using the Infragistics grid and I'm having a difficult time using a drop-down list as the value selector for one of my columns. I tried reading the documentation but Infragistics' documentation is not so good. I've also taken a look at this discussion with no lu...
TITLE: UltraWebGrid: How to use a drop-down list in a column QUESTION: I'm using the Infragistics grid and I'm having a difficult time using a drop-down list as the value selector for one of my columns. I tried reading the documentation but Infragistics' documentation is not so good. I've also taken a look at this dis...
[ "c#", "asp.net", "grid", "infragistics", "ultrawebgrid" ]
4
1
16,446
3
0
2008-08-18T21:03:18.483000
2008-08-20T18:24:25.567000
15,228
15,239
Setting an ASP.NET Master Page at runtime
I'm working on a site which needs to be able to support two or more looks, changable at runtime. I'd hoped to be able to handle the change with a CSS switch, but it looks like I'll need to use a different masterpage for each design. So, what's the best way to set the masterpage at runtime? Page.MasterPageFile can only ...
I've done this once before, I did exactly what you described (Made all pages inherit from a custom page with an OnPreInit event). Also I had a custom Application_PreRequestHandlerExecute in my Global.asax.cs for setting Page.StyleSheetTheme for doing image/css changes that didn't require a different Master Page.
Setting an ASP.NET Master Page at runtime I'm working on a site which needs to be able to support two or more looks, changable at runtime. I'd hoped to be able to handle the change with a CSS switch, but it looks like I'll need to use a different masterpage for each design. So, what's the best way to set the masterpage...
TITLE: Setting an ASP.NET Master Page at runtime QUESTION: I'm working on a site which needs to be able to support two or more looks, changable at runtime. I'd hoped to be able to handle the change with a CSS switch, but it looks like I'll need to use a different masterpage for each design. So, what's the best way to ...
[ ".net", "asp.net", "master-pages" ]
9
6
8,783
6
0
2008-08-18T21:17:15.523000
2008-08-18T21:22:01.363000
15,240
15,269
How do you create a debug only function that takes a variable argument list? Like printf()
I'd like to make a debug logging function with the same parameters as printf. But one that can be removed by the pre-processor during optimized builds. For example: Debug_Print("Warning: value %d > 3!\n", value); I've looked at variadic macros but those aren't available on all platforms. gcc supports them, msvc does no...
I still do it the old way, by defining a macro (XTRACE, below) which correlates to either a no-op or a function call with a variable argument list. Internally, call vsnprintf so you can keep the printf syntax: #include void XTrace0(LPCTSTR lpszText) {::OutputDebugString(lpszText); } void XTrace(LPCTSTR lpszFormat,...)...
How do you create a debug only function that takes a variable argument list? Like printf() I'd like to make a debug logging function with the same parameters as printf. But one that can be removed by the pre-processor during optimized builds. For example: Debug_Print("Warning: value %d > 3!\n", value); I've looked at v...
TITLE: How do you create a debug only function that takes a variable argument list? Like printf() QUESTION: I'd like to make a debug logging function with the same parameters as printf. But one that can be removed by the pre-processor during optimized builds. For example: Debug_Print("Warning: value %d > 3!\n", value)...
[ "c++", "c", "c-preprocessor" ]
43
25
37,561
14
0
2008-08-18T21:22:20.753000
2008-08-18T21:42:09.857000
15,241
15,323
Does anyone have any real-world experience of CSLA?
The main web application of my company is crying out for a nifty set of libraries to make it in some way maintainable and scalable, and one of my colleagues has suggested CSLA. So I've bought the book but as: programmers don't read books anymore I wanted to gauge the SOFlow community's opinion of it. So here are my que...
Before I specifically answer your question, I'd like to put a few thoughts down. Is CSLA right for your project? It depends. I would personally consider CSLA for desktop based applications that does not value unit testing as a high priority. CSLA is great if you want to easily scale to an n-tier application. CSLA tends...
Does anyone have any real-world experience of CSLA? The main web application of my company is crying out for a nifty set of libraries to make it in some way maintainable and scalable, and one of my colleagues has suggested CSLA. So I've bought the book but as: programmers don't read books anymore I wanted to gauge the ...
TITLE: Does anyone have any real-world experience of CSLA? QUESTION: The main web application of my company is crying out for a nifty set of libraries to make it in some way maintainable and scalable, and one of my colleagues has suggested CSLA. So I've bought the book but as: programmers don't read books anymore I wa...
[ ".net", "frameworks", "csla" ]
51
72
13,121
23
0
2008-08-18T21:23:50.877000
2008-08-18T22:32:10.427000
15,247
17,132
Simplest way to make a Google Map mashup?
Given a list of locations such as El Cerrito, CA Corvallis, OR Morganton, NC New York, NY San Diego, CA What's the easiest way to generate a Google Map with pushpins for each location?
I'm assuming you have the basics for Maps in your code already with your API Key. Everything in Google Maps is based off of latitude (lat) and longitude (lng). So to create a simple marker you will just create a GMarker with the lat and lng. var where = new GLatLng(37.925243,-122.307358); //Lat and Lng for El Cerrito, ...
Simplest way to make a Google Map mashup? Given a list of locations such as El Cerrito, CA Corvallis, OR Morganton, NC New York, NY San Diego, CA What's the easiest way to generate a Google Map with pushpins for each location?
TITLE: Simplest way to make a Google Map mashup? QUESTION: Given a list of locations such as El Cerrito, CA Corvallis, OR Morganton, NC New York, NY San Diego, CA What's the easiest way to generate a Google Map with pushpins for each location? ANSWER: I'm assuming you have the basics for Maps in your code already wit...
[ "html", "google-maps" ]
9
11
4,908
5
0
2008-08-18T21:26:57.750000
2008-08-19T22:50:52.487000
15,254
15,343
Can placement new for arrays be used in a portable way?
Is it possible to actually make use of placement new in portable code when using it for arrays? It appears that the pointer you get back from new[] is not always the same as the address you pass in (5.3.4, note 12 in the standard seems to confirm that this is correct), but I don't see how you can allocate a buffer for ...
Personally I'd go with the option of not using placement new on the array and instead use placement new on each item in the array individually. For example: int main(int argc, char* argv[]) { const int NUMELEMENTS=20; char *pBuffer = new char[NUMELEMENTS*sizeof(A)]; A *pA = (A*)pBuffer; for(int i = 0; i < NUMELEMENTS...
Can placement new for arrays be used in a portable way? Is it possible to actually make use of placement new in portable code when using it for arrays? It appears that the pointer you get back from new[] is not always the same as the address you pass in (5.3.4, note 12 in the standard seems to confirm that this is corr...
TITLE: Can placement new for arrays be used in a portable way? QUESTION: Is it possible to actually make use of placement new in portable code when using it for arrays? It appears that the pointer you get back from new[] is not always the same as the address you pass in (5.3.4, note 12 in the standard seems to confirm...
[ "c++", "arrays", "compiler-construction", "portability", "overhead" ]
49
33
17,831
8
0
2008-08-18T21:33:35.863000
2008-08-18T22:53:05.003000
15,266
2,195,434
Objective-C/Cocoa: How do I accept a bad server certificate?
Using NSURLRequest, I am trying to access a web site that has an expired certificate. When I send the request, my connection:didFailWithError delegate method is invoked with the following info: -1203, NSURLErrorDomain, bad server certificate My searches have only turned up one solution: a hidden class method in NSURLRe...
iPhone OS 3.0 introduced a supported way of doing this that doesn't require the lower-level CFNetwork APIs. More details here: How to use NSURLConnection to connect with SSL for an untrusted cert?
Objective-C/Cocoa: How do I accept a bad server certificate? Using NSURLRequest, I am trying to access a web site that has an expired certificate. When I send the request, my connection:didFailWithError delegate method is invoked with the following info: -1203, NSURLErrorDomain, bad server certificate My searches have ...
TITLE: Objective-C/Cocoa: How do I accept a bad server certificate? QUESTION: Using NSURLRequest, I am trying to access a web site that has an expired certificate. When I send the request, my connection:didFailWithError delegate method is invoked with the following info: -1203, NSURLErrorDomain, bad server certificate...
[ "objective-c", "cocoa", "networking" ]
11
2
9,916
6
0
2008-08-18T21:40:01.657000
2010-02-03T21:05:10.617000
15,272
15,904
Aging Data Structure in C#
I want a data structure that will allow querying how many items in last X minutes. An item may just be a simple identifier or a more complex data structure, preferably the timestamp of the item will be in the item, rather than stored outside (as a hash or similar, wouldn't want to have problems with multiple items havi...
A simple linked list can be used for this. Basically you add new items to the end, and remove too old items from the start, it is a cheap data structure. example-code: list.push_end(new_data) while list.head.age >= age_limit: list.pop_head() If the list will be busy enough to warrant chopping off larger pieces than one...
Aging Data Structure in C# I want a data structure that will allow querying how many items in last X minutes. An item may just be a simple identifier or a more complex data structure, preferably the timestamp of the item will be in the item, rather than stored outside (as a hash or similar, wouldn't want to have proble...
TITLE: Aging Data Structure in C# QUESTION: I want a data structure that will allow querying how many items in last X minutes. An item may just be a simple identifier or a more complex data structure, preferably the timestamp of the item will be in the item, rather than stored outside (as a hash or similar, wouldn't w...
[ "c#", "linq", ".net-3.5", "data-structures" ]
3
3
1,209
3
0
2008-08-18T21:44:07.933000
2008-08-19T08:53:14.697000
15,302
15,324
What do the getUTC* methods on the date object do?
What does it mean when you get or create a date in UTC format in JavaScript?
A date represents a specific point in time. This point in time will be called differently in different places. As I write this, it's 00:27 on Tuesday in Germany, 23:27 on Monday in the UK and 18:27 on Monday in New York. To take an example method: getDay returns the day of the week in the local timezone. Right now, for...
What do the getUTC* methods on the date object do? What does it mean when you get or create a date in UTC format in JavaScript?
TITLE: What do the getUTC* methods on the date object do? QUESTION: What does it mean when you get or create a date in UTC format in JavaScript? ANSWER: A date represents a specific point in time. This point in time will be called differently in different places. As I write this, it's 00:27 on Tuesday in Germany, 23:...
[ "javascript", "date", "utc" ]
13
14
2,179
3
0
2008-08-18T22:14:34.427000
2008-08-18T22:32:34.233000
15,305
15,367
JNI and Java: ant calling make or make calling ant?
I'm just about to make my first trip into the world of JNI (Java Native Interface) to provide file system change notifications from platform specific C/C++ code to Java. That is unless someone suggest some brilliant library for doing this that I've missed. Being new to JNI I've managed to find much documentation on the...
I strongly dislike make because of its implicit ruleset and treatment of whitespace. Personally I would use cpp tasks ( http://ant-contrib.sourceforge.net/cpptasks/index.html ) to do my C compilation. They are not as flexible as make but they are also far less complex and it will mean you don't have to burden your deve...
JNI and Java: ant calling make or make calling ant? I'm just about to make my first trip into the world of JNI (Java Native Interface) to provide file system change notifications from platform specific C/C++ code to Java. That is unless someone suggest some brilliant library for doing this that I've missed. Being new t...
TITLE: JNI and Java: ant calling make or make calling ant? QUESTION: I'm just about to make my first trip into the world of JNI (Java Native Interface) to provide file system change notifications from platform specific C/C++ code to Java. That is unless someone suggest some brilliant library for doing this that I've m...
[ "java", "ant", "makefile", "java-native-interface", "automake" ]
7
3
3,528
5
0
2008-08-18T22:15:39.087000
2008-08-18T23:19:59.910000
15,349
15,450
Which scripting language to support in an existing codebase?
I'm looking at adding scripting functionality to an existing codebase and am weighing up the pros/cons of various packages. Lua is probably the most obvious choice, but I was wondering if people have any other suggestions based on their experience. Scripts will be triggered upon certain events and may stay resident for...
Based on my own experience: Python. IMHO this is a good choice. We have a pretty big code base with a lot of users and they like it a lot. Ruby. There are some really nice apps such as Google Sketchup that use this. I wrote a Sketchup plugin and thought it was pretty nice. Tcl. This is the old-school embeddable scripti...
Which scripting language to support in an existing codebase? I'm looking at adding scripting functionality to an existing codebase and am weighing up the pros/cons of various packages. Lua is probably the most obvious choice, but I was wondering if people have any other suggestions based on their experience. Scripts wi...
TITLE: Which scripting language to support in an existing codebase? QUESTION: I'm looking at adding scripting functionality to an existing codebase and am weighing up the pros/cons of various packages. Lua is probably the most obvious choice, but I was wondering if people have any other suggestions based on their expe...
[ "scripting", "data-driven" ]
7
3
501
9
0
2008-08-18T23:05:04.120000
2008-08-19T00:52:54.027000
15,366
15,368
Only accepting certain ajax requests from authenticated users
What's the best practice for making sure that certain ajax calls to certain pages are only accepted from authenticated users? For example: Let's say that I have a main page called blog.php (I know, creativity abounds). Let's also say that there is a page called delete.php which looks for the parameter post_id and then ...
You were correct in trying to use session variables. Once your user authenticates, you should store that information in their session so that each subsequent page view will see that. Make sure you are calling session_start() on both pages (blog.php and delete.php) before accessing $_SESSION. Also make sure you have coo...
Only accepting certain ajax requests from authenticated users What's the best practice for making sure that certain ajax calls to certain pages are only accepted from authenticated users? For example: Let's say that I have a main page called blog.php (I know, creativity abounds). Let's also say that there is a page cal...
TITLE: Only accepting certain ajax requests from authenticated users QUESTION: What's the best practice for making sure that certain ajax calls to certain pages are only accepted from authenticated users? For example: Let's say that I have a main page called blog.php (I know, creativity abounds). Let's also say that t...
[ "php", "ajax", "authentication" ]
9
7
1,842
2
0
2008-08-18T23:18:02.673000
2008-08-18T23:20:46.600000
15,376
224,568
What's the best UML diagramming tool?
I'm trying to choose a tool for creating UML diagrams of all flavours. Usability is a major criteria for me, but I'd still take more power with a steeper learning curve and be happy. Free (as in beer) would be nice, but I'd be willing to pay if the tool's worth it. What should I be using?
Some context: Recently for graduate school I researched UML tools for usability and UML comprehension in general for an independent project. I also model/architect for a living. The previous posts have too many answers and not enough questions. A common misunderstanding is that UML is about creating diagrams. Sure, dia...
What's the best UML diagramming tool? I'm trying to choose a tool for creating UML diagrams of all flavours. Usability is a major criteria for me, but I'd still take more power with a steeper learning curve and be happy. Free (as in beer) would be nice, but I'd be willing to pay if the tool's worth it. What should I be...
TITLE: What's the best UML diagramming tool? QUESTION: I'm trying to choose a tool for creating UML diagrams of all flavours. Usability is a major criteria for me, but I'd still take more power with a steeper learning curve and be happy. Free (as in beer) would be nice, but I'd be willing to pay if the tool's worth it...
[ "uml", "diagram", "modeling" ]
488
353
1,071,384
50
0
2008-08-18T23:29:17.643000
2008-10-22T05:32:27.497000
15,390
15,402
Best practices for managing and deploying large JavaScript apps
What are some standard practices for managing a medium-large JavaScript application? My concerns are both speed for browser download and ease and maintainability of development. Our JavaScript code is roughly "namespaced" as: var Client = { var1: '', var2: '', accounts: { /* 100's of functions and variables */ }, ord...
The approach that I've found works for me is having seperate JS files for each class (just as you would in Java, C# and others). Alternatively you can group your JS into application functional areas if that's easier for you to navigate. If you put all your JS files into one directory, you can have your server-side envi...
Best practices for managing and deploying large JavaScript apps What are some standard practices for managing a medium-large JavaScript application? My concerns are both speed for browser download and ease and maintainability of development. Our JavaScript code is roughly "namespaced" as: var Client = { var1: '', var2:...
TITLE: Best practices for managing and deploying large JavaScript apps QUESTION: What are some standard practices for managing a medium-large JavaScript application? My concerns are both speed for browser download and ease and maintainability of development. Our JavaScript code is roughly "namespaced" as: var Client =...
[ "javascript", "web-applications", "deployment" ]
30
12
10,226
7
0
2008-08-18T23:45:14.553000
2008-08-19T00:02:42.913000
15,412
15,432
Is Single Responsibility Principle a rule of OOP?
An answer to a Stack Overflow question stated that a particular framework violated a plain and simple OOP rule: Single Responsibility Principle (SRP). Is the Single Responsibility Principle really a rule of OOP? My understanding of the definition of Object Orientated Programming is "a paradigm where objects and their b...
Very few rules, if any, in software development are without exception. Some people think there are no place for goto but they're wrong. As far as OOP goes, there isn't a single definition of object-orientedness so depending on who you ask you'll get a different set of hard and soft principles, patterns, and practices. ...
Is Single Responsibility Principle a rule of OOP? An answer to a Stack Overflow question stated that a particular framework violated a plain and simple OOP rule: Single Responsibility Principle (SRP). Is the Single Responsibility Principle really a rule of OOP? My understanding of the definition of Object Orientated Pr...
TITLE: Is Single Responsibility Principle a rule of OOP? QUESTION: An answer to a Stack Overflow question stated that a particular framework violated a plain and simple OOP rule: Single Responsibility Principle (SRP). Is the Single Responsibility Principle really a rule of OOP? My understanding of the definition of Ob...
[ "oop" ]
21
22
3,790
6
0
2008-08-19T00:11:00.757000
2008-08-19T00:32:41.993000
15,414
15,420
Is it possible to coax Visual Studio 2008 into using italics for comments?
I'm quite used to my IDE setup in Delphi 7, where I have my comments rendered in italics. This doesn't appear to be possible in VS2008. There's only an option for bold font, not italics. Is there some kind of registry hack or font magic I can perform to get it to work? The font I'm using is Consolas, if that makes a di...
If you have a font editor, you can change an italic font to pretend it's bold. Here's an example of it. (For VS 2005, but it should work all the same.)
Is it possible to coax Visual Studio 2008 into using italics for comments? I'm quite used to my IDE setup in Delphi 7, where I have my comments rendered in italics. This doesn't appear to be possible in VS2008. There's only an option for bold font, not italics. Is there some kind of registry hack or font magic I can pe...
TITLE: Is it possible to coax Visual Studio 2008 into using italics for comments? QUESTION: I'm quite used to my IDE setup in Delphi 7, where I have my comments rendered in italics. This doesn't appear to be possible in VS2008. There's only an option for bold font, not italics. Is there some kind of registry hack or f...
[ "visual-studio", "fonts", "consolas" ]
3
3
2,130
8
0
2008-08-19T00:12:01.943000
2008-08-19T00:18:53.097000
15,423
15,437
How to change the icon of .bat file programmatically?
I'd like to know what's the way to actually set the icon of a.bat file to an arbitrary icon. How would I go about doing that programmatically, independently of the language I may be using.
Assuming you're referring to MS-DOS batch files: as it is simply a text file with a special extension, a.bat file doesn't store an icon of its own. You can, however, create a shortcut in the.lnk format that stores an icon.
How to change the icon of .bat file programmatically? I'd like to know what's the way to actually set the icon of a.bat file to an arbitrary icon. How would I go about doing that programmatically, independently of the language I may be using.
TITLE: How to change the icon of .bat file programmatically? QUESTION: I'd like to know what's the way to actually set the icon of a.bat file to an arbitrary icon. How would I go about doing that programmatically, independently of the language I may be using. ANSWER: Assuming you're referring to MS-DOS batch files: a...
[ "windows", "icons", "batch-file" ]
51
49
262,922
11
0
2008-08-19T00:21:12.237000
2008-08-19T00:37:11.500000
15,470
15,474
How do I get rid of Home in ASP.Net MVC?
I know this site is written using ASP.Net MVC and I do not see "/Home" in the url. This proves to me that it can be done. What special route and do I need?
Just change "Home" to an empty string. routes.MapRoute( "Home", "", new { action = Index, controller = Home } );
How do I get rid of Home in ASP.Net MVC? I know this site is written using ASP.Net MVC and I do not see "/Home" in the url. This proves to me that it can be done. What special route and do I need?
TITLE: How do I get rid of Home in ASP.Net MVC? QUESTION: I know this site is written using ASP.Net MVC and I do not see "/Home" in the url. This proves to me that it can be done. What special route and do I need? ANSWER: Just change "Home" to an empty string. routes.MapRoute( "Home", "", new { action = Index, contro...
[ "asp.net-mvc", "asp.net-mvc-routing" ]
15
16
4,545
6
0
2008-08-19T01:02:59.030000
2008-08-19T01:07:34.903000
15,481
15,658
Java Coding standard / best practices - naming convention for break/continue labels
Sometimes a labeled break or continue can make code a lot more readable. OUTERLOOP: for (;/*stuff*/; ) { //...lots of code if ( isEnough() ) break OUTERLOOP; //...more code } I was wondering what the common convention for the labels was. All caps? first cap?
If you have to use them use capitals, this draws attention to them and singles them out from being mistakenly interpreted as "Class" names. Drawing attention to them has the additional benefit of catching someone's eye that will come along and refactor your code and remove them.;)
Java Coding standard / best practices - naming convention for break/continue labels Sometimes a labeled break or continue can make code a lot more readable. OUTERLOOP: for (;/*stuff*/; ) { //...lots of code if ( isEnough() ) break OUTERLOOP; //...more code } I was wondering what the common convention for the labels wa...
TITLE: Java Coding standard / best practices - naming convention for break/continue labels QUESTION: Sometimes a labeled break or continue can make code a lot more readable. OUTERLOOP: for (;/*stuff*/; ) { //...lots of code if ( isEnough() ) break OUTERLOOP; //...more code } I was wondering what the common convention...
[ "java", "label", "convention" ]
24
20
22,647
10
0
2008-08-19T01:18:29.890000
2008-08-19T03:41:53.530000
15,486
15,494
Sorting an IList in C#
So I came across an interesting problem today. We have a WCF web service that returns an IList. Not really a big deal until I wanted to sort it. Turns out the IList interface doesn't have a sort method built in. I ended up using the ArrayList.Adapter(list).Sort(new MyComparer()) method to solve the problem but it just ...
How about using LINQ To Objects to sort for you? Say you have a IList, and the car had an Engine property, I believe you could sort as follows: from c in list orderby c.Engine select c; Edit: You do need to be quick to get answers in here. As I presented a slightly different syntax to the other answers, I will leave my...
Sorting an IList in C# So I came across an interesting problem today. We have a WCF web service that returns an IList. Not really a big deal until I wanted to sort it. Turns out the IList interface doesn't have a sort method built in. I ended up using the ArrayList.Adapter(list).Sort(new MyComparer()) method to solve t...
TITLE: Sorting an IList in C# QUESTION: So I came across an interesting problem today. We have a WCF web service that returns an IList. Not really a big deal until I wanted to sort it. Turns out the IList interface doesn't have a sort method built in. I ended up using the ArrayList.Adapter(list).Sort(new MyComparer())...
[ "c#", "generics", "sorting", "ilist" ]
97
57
128,875
15
0
2008-08-19T01:23:04.340000
2008-08-19T01:34:06.317000
15,513
18,052
How do I track down performance problems with page rendering?
I've been tasked with improving the performance of an ASP.NET 2.0 application. The page I'm currently focused on has many problems but one that I'm having trouble digging into is the render time of the page. Using Trace.axd the duration between Begin Render and End Render is 1.4 seconds. From MSDN I see that All ASP.NE...
Download ANTS PROFILER, this will give you a perfect overview of the lines causing the slowdown. Also when it's about rendering make sure you don't use to much string concats (like string += "value") but use StringBuilders to improve performance.
How do I track down performance problems with page rendering? I've been tasked with improving the performance of an ASP.NET 2.0 application. The page I'm currently focused on has many problems but one that I'm having trouble digging into is the render time of the page. Using Trace.axd the duration between Begin Render ...
TITLE: How do I track down performance problems with page rendering? QUESTION: I've been tasked with improving the performance of an ASP.NET 2.0 application. The page I'm currently focused on has many problems but one that I'm having trouble digging into is the render time of the page. Using Trace.axd the duration bet...
[ "asp.net", "performance" ]
1
2
836
3
0
2008-08-19T01:51:44.113000
2008-08-20T14:08:51.110000
15,514
15,677
Is there anyway to disable the client-side validation for dojo date text box?
In my example below I'm using a dijit.form.DateTextBox: So for example, if the user starts to enter "asdf" into the date the field turns yellow and a popup error message appears saying The value entered is not valid.. Even if I remove the constraints="{datePattern:'MM/dd/yyyy'}" it still validates. Without going into d...
Try overriding the validate method in your markup. This will work (just tested):
Is there anyway to disable the client-side validation for dojo date text box? In my example below I'm using a dijit.form.DateTextBox: So for example, if the user starts to enter "asdf" into the date the field turns yellow and a popup error message appears saying The value entered is not valid.. Even if I remove the con...
TITLE: Is there anyway to disable the client-side validation for dojo date text box? QUESTION: In my example below I'm using a dijit.form.DateTextBox: So for example, if the user starts to enter "asdf" into the date the field turns yellow and a popup error message appears saying The value entered is not valid.. Even i...
[ "javascript", "dojo" ]
4
6
5,453
3
0
2008-08-19T01:51:46.703000
2008-08-19T04:13:01.923000
15,537
15,577
How do I generate ASCII codes 2 and 3 in a Bash command line?
If I press Ctrl + B that ought to give me ASCII code 2, but Ctrl + C is going to be interpreted as a Break. So I figure I've got to redirect a file in. How do I get these characters into a file?
Ctrl - V escapes the next keystoke. That's how you can get a Ctrl - C out: Ctrl - V Ctrl - C
How do I generate ASCII codes 2 and 3 in a Bash command line? If I press Ctrl + B that ought to give me ASCII code 2, but Ctrl + C is going to be interpreted as a Break. So I figure I've got to redirect a file in. How do I get these characters into a file?
TITLE: How do I generate ASCII codes 2 and 3 in a Bash command line? QUESTION: If I press Ctrl + B that ought to give me ASCII code 2, but Ctrl + C is going to be interpreted as a Break. So I figure I've got to redirect a file in. How do I get these characters into a file? ANSWER: Ctrl - V escapes the next keystoke. ...
[ "linux", "bash", "unix", "ascii" ]
3
10
3,744
3
0
2008-08-19T02:05:55.817000
2008-08-19T02:34:46.677000
15,593
15,627
Practical use of System.WeakReference
I understand what System.WeakReference does, but what I can't seem to grasp is a practical example of what it might be useful for. The class itself seems to me to be, well, a hack. It seems to me that there are other, better means of solving a problem where a WeakReference is used in examples I've seen. What's the cano...
One useful example is the guys who run DB4O object oriented database. There, WeakReferences are used as a kind of light cache: it will keep your objects in memory only as long as your application does, allowing you to put a real cache on top. Another use would be in the implementation of weak event handlers. Currently,...
Practical use of System.WeakReference I understand what System.WeakReference does, but what I can't seem to grasp is a practical example of what it might be useful for. The class itself seems to me to be, well, a hack. It seems to me that there are other, better means of solving a problem where a WeakReference is used ...
TITLE: Practical use of System.WeakReference QUESTION: I understand what System.WeakReference does, but what I can't seem to grasp is a practical example of what it might be useful for. The class itself seems to me to be, well, a hack. It seems to me that there are other, better means of solving a problem where a Weak...
[ ".net", "garbage-collection" ]
39
49
7,611
4
0
2008-08-19T02:45:27.747000
2008-08-19T03:07:38.343000
15,621
15,651
Best way to structure a repository in Subversion for Visual Studio projects?
I have a few C#.dll projects which are common to many applications. Currently, I have one big repository. I have each DLL stored as a separate project within the repository and every application project stored as a project within the same repository. I recently switched to Subversion for source control and I fear that ...
using the branch/trunk/tag repository structure is pretty standard, but if I'm understanding you properly, your issue is that you have a set of common dll projects that get used across multiple projects. This can definately become tricky to manage. So the typical scenario here is that you have some class library called...
Best way to structure a repository in Subversion for Visual Studio projects? I have a few C#.dll projects which are common to many applications. Currently, I have one big repository. I have each DLL stored as a separate project within the repository and every application project stored as a project within the same repo...
TITLE: Best way to structure a repository in Subversion for Visual Studio projects? QUESTION: I have a few C#.dll projects which are common to many applications. Currently, I have one big repository. I have each DLL stored as a separate project within the repository and every application project stored as a project wi...
[ "svn" ]
12
4
1,868
6
0
2008-08-19T03:03:30.973000
2008-08-19T03:33:39.977000
15,649
15,667
Can you really build a fast word processor with GoF Design Patterns?
The Gang of Four's Design Patterns uses a word processor as an example for at least a few of their patterns, particularly Composite and Flyweight. Other than by using C or C++, could you really use those patterns and the object-oriented overhead they entail to write a high-performing fully featured word processor? I kn...
Flyweight really is just a way of conserving resources in situations where there are thousands of objects with intrinsic shared state, so it could be useful in higher level languages than C/C++. Maybe the GoF's example using glyphs in a document was not the best choice to illustrate this pattern. I think there's a lot ...
Can you really build a fast word processor with GoF Design Patterns? The Gang of Four's Design Patterns uses a word processor as an example for at least a few of their patterns, particularly Composite and Flyweight. Other than by using C or C++, could you really use those patterns and the object-oriented overhead they ...
TITLE: Can you really build a fast word processor with GoF Design Patterns? QUESTION: The Gang of Four's Design Patterns uses a word processor as an example for at least a few of their patterns, particularly Composite and Flyweight. Other than by using C or C++, could you really use those patterns and the object-orien...
[ "java", "performance", "design-patterns", "ide", "text-processing" ]
7
7
3,671
7
0
2008-08-19T03:31:27.750000
2008-08-19T03:54:14.223000
15,674
230,005
Subversion revision number across multiple projects
When using Subversion (svn) for source control with multiple projects I've noticed that the revision number increases across all of my projects' directories. To illustrate my svn layout (using fictitious project names): /NinjaProg/branches /tags /trunk /StealthApp/branches /tags /trunk /SnailApp/branches /tags /trunk W...
I am surprised no has mentioned that this is discussed in Version Control with Subversion, which is available free online, here. I read up on the issue awhile back and it really seems like a matter of personal choice, there is a good blog post on the subject here. EDIT: Since the blog appears to be down, ( archived ver...
Subversion revision number across multiple projects When using Subversion (svn) for source control with multiple projects I've noticed that the revision number increases across all of my projects' directories. To illustrate my svn layout (using fictitious project names): /NinjaProg/branches /tags /trunk /StealthApp/bra...
TITLE: Subversion revision number across multiple projects QUESTION: When using Subversion (svn) for source control with multiple projects I've noticed that the revision number increases across all of my projects' directories. To illustrate my svn layout (using fictitious project names): /NinjaProg/branches /tags /tru...
[ "svn", "version-control", "repository" ]
24
10
11,786
17
0
2008-08-19T04:08:12.230000
2008-10-23T14:42:40.787000
15,678
15,724
Can I configure VisualStudio 2008 to always build the startup project?
I have a solution with several projects, where the startup project has a post-build event that does all the copying of "plugin" projects and other organizing tasks. After upgrading the solution from VS 2005 to VS 2008, it appears as though the post-build event only fires if I modify the startup project, which means my ...
Why not just add a dependency to the "startup" project for each of the plugins? This will force the project to be rebuilt if any of the others change, and you won't have to mess with any other pre/post-build events.
Can I configure VisualStudio 2008 to always build the startup project? I have a solution with several projects, where the startup project has a post-build event that does all the copying of "plugin" projects and other organizing tasks. After upgrading the solution from VS 2005 to VS 2008, it appears as though the post-...
TITLE: Can I configure VisualStudio 2008 to always build the startup project? QUESTION: I have a solution with several projects, where the startup project has a post-build event that does all the copying of "plugin" projects and other organizing tasks. After upgrading the solution from VS 2005 to VS 2008, it appears a...
[ "visual-studio" ]
2
3
2,487
7
0
2008-08-19T04:13:07.510000
2008-08-19T04:51:16.387000
15,681
15,697
Developer Setup for Starting Out with Cocoa/Mac Programming
I'd like to start experimenting with Cocoa and programming for Mac OSX. I'm not terribly concerned with Objective C syntax/constructs/bheaviors at this point, but more curious as to an efficient setup on in terms of an editor and/or IDE that will get me going quickly. Is there any IDE even remotely similar to Visual St...
I'd suggest you pick a fun little product and dive in. If you're looking for a book I'd suggest Cocoa Programming for Max OSX which is a very good introduction both to Objective-C and Cocoa. XCode is pretty much the de facto IDE and free with OSX. It should be on your original install DVD. It's good but not as good as ...
Developer Setup for Starting Out with Cocoa/Mac Programming I'd like to start experimenting with Cocoa and programming for Mac OSX. I'm not terribly concerned with Objective C syntax/constructs/bheaviors at this point, but more curious as to an efficient setup on in terms of an editor and/or IDE that will get me going ...
TITLE: Developer Setup for Starting Out with Cocoa/Mac Programming QUESTION: I'd like to start experimenting with Cocoa and programming for Mac OSX. I'm not terribly concerned with Objective C syntax/constructs/bheaviors at this point, but more curious as to an efficient setup on in terms of an editor and/or IDE that ...
[ "cocoa", "macos" ]
25
18
3,077
11
0
2008-08-19T04:15:52.993000
2008-08-19T04:30:35.897000
15,687
16,020
How can I convert all line endings to CRLF, LF, or CR during SVN operations
So, you are all ready to do a big SVN Commit and it bombs because you have inconsistent line endings in some of your files. Fun part is, you're looking at 1,000s of files spanning dozens of folders of different depths. What do you do?
I don't think the pre-commit hook can actually change the data that is being committed - it can disallow a commit, but I don't think it can do the conversion for you. It sounds like you want the property 'svn:eol-style' set to 'native' - this will automatically convert newlines to whatever is used on your platform (use...
How can I convert all line endings to CRLF, LF, or CR during SVN operations So, you are all ready to do a big SVN Commit and it bombs because you have inconsistent line endings in some of your files. Fun part is, you're looking at 1,000s of files spanning dozens of folders of different depths. What do you do?
TITLE: How can I convert all line endings to CRLF, LF, or CR during SVN operations QUESTION: So, you are all ready to do a big SVN Commit and it bombs because you have inconsistent line endings in some of your files. Fun part is, you're looking at 1,000s of files spanning dozens of folders of different depths. What do...
[ "svn", "version-control", "eol" ]
24
32
20,276
5
0
2008-08-19T04:22:34.057000
2008-08-19T11:35:09.270000
15,690
15,702
How do you begin designing a large system?
It's been mentioned to me that I'll be the sole developer behind a large new system. Among other things I'll be designing a UI and database schema. I'm sure I'll receive some guidance, but I'd like to be able to knock their socks off. What can I do in the meantime to prepare, and what will I need to keep in mind when I...
Do you know much about OOP? If so, look into Spring and Hibernate to keep your implementation clean and orthogonal. If you get that, you should find TDD a good way to keep your design compact and lean, especially since you have "automated testing" up and running. UPDATE: Looking at the first slew of answers, I couldn't...
How do you begin designing a large system? It's been mentioned to me that I'll be the sole developer behind a large new system. Among other things I'll be designing a UI and database schema. I'm sure I'll receive some guidance, but I'd like to be able to knock their socks off. What can I do in the meantime to prepare, ...
TITLE: How do you begin designing a large system? QUESTION: It's been mentioned to me that I'll be the sole developer behind a large new system. Among other things I'll be designing a UI and database schema. I'm sure I'll receive some guidance, but I'd like to be able to knock their socks off. What can I do in the mea...
[ "java", "oop", "architecture" ]
10
11
5,194
10
0
2008-08-19T04:26:33.347000
2008-08-19T04:32:30.200000
15,694
15,746
Is the .NET Client Profile worth targeting?
I've recently been looking into targeting the.NET Client Profile for a WPF application I am building. However, I was frustrated to notice that the Client Profile is only valid for the following OS configurations: Windows XP SP2+ Windows Server 2003 Edit: Appears the Client Profile will not install on Windows Server 200...
Ultimately, it will not hurt any users if you target the Client Profile. This is because the client profile is a subset of the.net framework v3.5 sp1, and if v3.5 sp1 is already installed you don't need to install anything. The assemblies in the client profile are the same binaries as the full framework, so unless you'...
Is the .NET Client Profile worth targeting? I've recently been looking into targeting the.NET Client Profile for a WPF application I am building. However, I was frustrated to notice that the Client Profile is only valid for the following OS configurations: Windows XP SP2+ Windows Server 2003 Edit: Appears the Client Pr...
TITLE: Is the .NET Client Profile worth targeting? QUESTION: I've recently been looking into targeting the.NET Client Profile for a WPF application I am building. However, I was frustrated to notice that the Client Profile is only valid for the following OS configurations: Windows XP SP2+ Windows Server 2003 Edit: App...
[ ".net", ".net-client-profile" ]
8
5
880
3
0
2008-08-19T04:28:54.310000
2008-08-19T05:16:56.537000
15,695
16,385
Good Stripes tutorials / examples?
The company I just started working for is using Stripes for parts of its web page development these days, and while it seems to be a nice enough web framework it no one really uses it-- it is almost non existent on the 'net. It's not even first in it's google search and the result you do get is for its old home page. S...
I've never used (or even heard of) Stripes. Regardless, there's a book from The Pragmatic Bookshelf called Stripes:...and Java web development is fun again that may be worth checking out. You could also check out the Stripes mailing list archive.
Good Stripes tutorials / examples? The company I just started working for is using Stripes for parts of its web page development these days, and while it seems to be a nice enough web framework it no one really uses it-- it is almost non existent on the 'net. It's not even first in it's google search and the result you...
TITLE: Good Stripes tutorials / examples? QUESTION: The company I just started working for is using Stripes for parts of its web page development these days, and while it seems to be a nice enough web framework it no one really uses it-- it is almost non existent on the 'net. It's not even first in it's google search ...
[ "java", "stripes" ]
8
4
8,192
5
0
2008-08-19T04:29:40.283000
2008-08-19T15:19:16.040000
15,708
15,722
How can I determine whether a specific file is open in Windows?
One of my favourite tools for linux is lsof - a real swiss army knife! Today I found myself wondering which programs on a WinXP system had a specific file open. Is there any equivalent utility to lsof? Additionally, the file in question was over a network share so I'm not sure if that complicates matters.
Use Process Explorer from the Sysinternals Suite, the Find Handle or DLL function will let you search for the process with that file open.
How can I determine whether a specific file is open in Windows? One of my favourite tools for linux is lsof - a real swiss army knife! Today I found myself wondering which programs on a WinXP system had a specific file open. Is there any equivalent utility to lsof? Additionally, the file in question was over a network ...
TITLE: How can I determine whether a specific file is open in Windows? QUESTION: One of my favourite tools for linux is lsof - a real swiss army knife! Today I found myself wondering which programs on a WinXP system had a specific file open. Is there any equivalent utility to lsof? Additionally, the file in question w...
[ "windows", "linux", "command-line", "filesystems" ]
106
88
164,329
10
0
2008-08-19T04:37:35.243000
2008-08-19T04:48:32.587000
15,716
15,803
Design problems with .Net UserControl
I have created a UserControl that has a ListView in it. The ListView is publicly accessible though a property. When I put the UserControl in a form and try to design the ListView though the property, the ListView stays that way until I compile again and it reverts back to the default state. How do I get my design chang...
You need to decorate the ListView property with the DesignerSerializationVisibility attribute, like so: [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)] public ListView MyListView { get { return this.listView1; } } This tells the designer's code generator to output code for it.
Design problems with .Net UserControl I have created a UserControl that has a ListView in it. The ListView is publicly accessible though a property. When I put the UserControl in a form and try to design the ListView though the property, the ListView stays that way until I compile again and it reverts back to the defau...
TITLE: Design problems with .Net UserControl QUESTION: I have created a UserControl that has a ListView in it. The ListView is publicly accessible though a property. When I put the UserControl in a form and try to design the ListView though the property, the ListView stays that way until I compile again and it reverts...
[ "c#", "user-controls", ".net-2.0" ]
3
6
868
3
0
2008-08-19T04:42:31.910000
2008-08-19T06:28:41.603000
15,731
26,865
Looking for a specific FireFox extension / program for Form posting
I am looking for either a FireFox extension, or a similar program, that allows you to craft GET and POST requests. The user would put in a form action, and as many form key/value pairs as desired. It would also send any cookie information (or send the current cookies from any domain the user chooses.) The Web Developer...
Actually I think Poster is what you're looking for. A Screen shot of an older Poster version
Looking for a specific FireFox extension / program for Form posting I am looking for either a FireFox extension, or a similar program, that allows you to craft GET and POST requests. The user would put in a form action, and as many form key/value pairs as desired. It would also send any cookie information (or send the ...
TITLE: Looking for a specific FireFox extension / program for Form posting QUESTION: I am looking for either a FireFox extension, or a similar program, that allows you to craft GET and POST requests. The user would put in a form action, and as many form key/value pairs as desired. It would also send any cookie informa...
[ "javascript", "html" ]
4
4
1,133
8
0
2008-08-19T04:59:03.533000
2008-08-25T20:53:56.150000
15,732
16,054
How to validate an XML file against an XSD file?
I'm generating some xml files that needs to conform to an xsd file that was given to me. How should I verify they conform?
The Java runtime library supports validation. Last time I checked this was the Apache Xerces parser under the covers. You should probably use a javax.xml.validation.Validator. import javax.xml.XMLConstants; import javax.xml.transform.Source; import javax.xml.transform.stream.StreamSource; import javax.xml.validation.*;...
How to validate an XML file against an XSD file? I'm generating some xml files that needs to conform to an xsd file that was given to me. How should I verify they conform?
TITLE: How to validate an XML file against an XSD file? QUESTION: I'm generating some xml files that needs to conform to an xsd file that was given to me. How should I verify they conform? ANSWER: The Java runtime library supports validation. Last time I checked this was the Apache Xerces parser under the covers. You...
[ "java", "xml", "validation", "xsd" ]
287
355
344,221
13
0
2008-08-19T04:59:04.750000
2008-08-19T12:21:16.883000
15,734
775,195
Google Analytics Access with C#
I know that there is no official API for Google Analytics but is there a way to access Google Analytics Reports with C#?
Update: Google launched a Google Analytics API today. Google Analytics Blog - API Launched
Google Analytics Access with C# I know that there is no official API for Google Analytics but is there a way to access Google Analytics Reports with C#?
TITLE: Google Analytics Access with C# QUESTION: I know that there is no official API for Google Analytics but is there a way to access Google Analytics Reports with C#? ANSWER: Update: Google launched a Google Analytics API today. Google Analytics Blog - API Launched
[ "c#", "google-analytics", "google-analytics-api" ]
15
15
14,610
9
0
2008-08-19T05:01:52.183000
2009-04-22T00:00:25.427000
15,744
15,758
How do you use #define?
I'm wondering about instances when it makes sent to use #define and #if statements. I've known about it for a while, but never incorporated it into my way of coding. How exactly does this affect the compilation? Is #define the only thing that determines if the code is included when compiled? If I have #define DEBUGme a...
In C# #define macros, like some of Bernard's examples, are not allowed. The only common use of #define / #if s in C# is for adding optional debug only code. For example: static void Main(string[] args) { #if DEBUG //this only compiles if in DEBUG Console.WriteLine("DEBUG") #endif #if!DEBUG //this only compiles if not i...
How do you use #define? I'm wondering about instances when it makes sent to use #define and #if statements. I've known about it for a while, but never incorporated it into my way of coding. How exactly does this affect the compilation? Is #define the only thing that determines if the code is included when compiled? If ...
TITLE: How do you use #define? QUESTION: I'm wondering about instances when it makes sent to use #define and #if statements. I've known about it for a while, but never incorporated it into my way of coding. How exactly does this affect the compilation? Is #define the only thing that determines if the code is included ...
[ "c#" ]
18
14
44,581
8
0
2008-08-19T05:16:34.980000
2008-08-19T05:33:49.390000
15,774
157,767
How do I automate repetitive tasks post-build?
I run an ASP.NET website solution with a few other projects in it. I've known that MSBuild projects are capable of this, but is it the best way? Are they easy to create? Is nAnt, CruiseControl.NET or any other solution better? When I build the site (using Web Deployment Projects ), can I automate part of the build so t...
Here's an example of a Web Deployment Project scripting this sort of task in the.wdproj file: This would allow you to delete a folder. (I suspect that if you wanted to not have the folder copy over at all, the solution file would be the place to specify that, though I haven't had to use that.)
How do I automate repetitive tasks post-build? I run an ASP.NET website solution with a few other projects in it. I've known that MSBuild projects are capable of this, but is it the best way? Are they easy to create? Is nAnt, CruiseControl.NET or any other solution better? When I build the site (using Web Deployment Pr...
TITLE: How do I automate repetitive tasks post-build? QUESTION: I run an ASP.NET website solution with a few other projects in it. I've known that MSBuild projects are capable of this, but is it the best way? Are they easy to create? Is nAnt, CruiseControl.NET or any other solution better? When I build the site (using...
[ "c#", "asp.net", "visual-studio-2005", "msbuild", "web-deployment-project" ]
4
8
2,479
7
0
2008-08-19T05:54:18.913000
2008-10-01T14:07:15.423000
15,788
15,819
Minimize javascript HTTP calls from AjaxControlToolkit controls?
I love the ease that the ASP.NET Ajax control Toolkit provides to ASP.NET developers. However, I've not found it to be a scalable solution at all. I have a page with 2 date input fields. By putting a TextBox and an CalendarExtendar control attached to it for each date field, I get several (11, in fact) external Javascr...
I always preferred to write my Ajax calls in javascript using JQuery or Prototype. ASP.NET Ajax Toolkit does make things easier, but it never seems to do so elegantly. I personally would make a new Calendar Controller. This way you can control the AJAX (using JQuery/Prototype) calls that are being made.
Minimize javascript HTTP calls from AjaxControlToolkit controls? I love the ease that the ASP.NET Ajax control Toolkit provides to ASP.NET developers. However, I've not found it to be a scalable solution at all. I have a page with 2 date input fields. By putting a TextBox and an CalendarExtendar control attached to it ...
TITLE: Minimize javascript HTTP calls from AjaxControlToolkit controls? QUESTION: I love the ease that the ASP.NET Ajax control Toolkit provides to ASP.NET developers. However, I've not found it to be a scalable solution at all. I have a page with 2 date input fields. By putting a TextBox and an CalendarExtendar contr...
[ "javascript", "asp.net", "ajax", "frontend" ]
4
3
638
2
0
2008-08-19T06:14:42.770000
2008-08-19T07:06:39.903000
15,798
15,931
How do I validate xml against a DTD file in Python
I need to validate an XML string (and not a file) against a DTD description file. How can that be done in python?
Another good option is lxml's validation which I find quite pleasant to use. A simple example taken from the lxml site: from StringIO import StringIO from lxml import etree dtd = etree.DTD(StringIO(""" """)) root = etree.XML(" ") print(dtd.validate(root)) # True root = etree.XML(" bar ") print(dtd.validate(root)) # ...
How do I validate xml against a DTD file in Python I need to validate an XML string (and not a file) against a DTD description file. How can that be done in python?
TITLE: How do I validate xml against a DTD file in Python QUESTION: I need to validate an XML string (and not a file) against a DTD description file. How can that be done in python? ANSWER: Another good option is lxml's validation which I find quite pleasant to use. A simple example taken from the lxml site: from Str...
[ "python", "xml", "validation", "dtd" ]
31
33
10,947
2
0
2008-08-19T06:24:54.217000
2008-08-19T09:39:56.927000
15,805
15,808
Why are my auto-run applications acting weird on Vista?
The product we are working on allows the user to easily set it up to run automatically whenever the computer is started. This is helpful because the product is part of the basic work environment of most of our users. This feature was implemented not so long ago and for a while all was well, but when we started testing ...
This is the effect of a new feature in Vista called "Boxing": Windows has several mechanisms that allow the user/admin to set up applications to automatically run when windows starts. This feature is mostly used for one of these purposes: 1. Programs that are part of the basic work environment of the user, such that th...
Why are my auto-run applications acting weird on Vista? The product we are working on allows the user to easily set it up to run automatically whenever the computer is started. This is helpful because the product is part of the basic work environment of most of our users. This feature was implemented not so long ago an...
TITLE: Why are my auto-run applications acting weird on Vista? QUESTION: The product we are working on allows the user to easily set it up to run automatically whenever the computer is started. This is helpful because the product is part of the basic work environment of most of our users. This feature was implemented ...
[ "windows-vista", "virtual-pc" ]
6
6
648
2
0
2008-08-19T06:36:13.290000
2008-08-19T06:43:55.987000
15,815
15,919
SSRS - Post Publishing Tasks
As part of the publishing "best practices" I came up with my own, I tend to archive report groups and republish the "updated" reports. However, with this stratedgy, I lose users associated with each report or have to rehide reports. Is there an automated process I can use to hide reports or add users, after deploying f...
Paul Stovell posted some examples of Reporting Services automation that might get you going. EDIT: The link to the Subversion repository has been updated and is now working
SSRS - Post Publishing Tasks As part of the publishing "best practices" I came up with my own, I tend to archive report groups and republish the "updated" reports. However, with this stratedgy, I lose users associated with each report or have to rehide reports. Is there an automated process I can use to hide reports or...
TITLE: SSRS - Post Publishing Tasks QUESTION: As part of the publishing "best practices" I came up with my own, I tend to archive report groups and republish the "updated" reports. However, with this stratedgy, I lose users associated with each report or have to rehide reports. Is there an automated process I can use ...
[ "reporting-services", "automation" ]
0
0
183
1
0
2008-08-19T06:56:29.427000
2008-08-19T09:26:49.967000
15,816
1,083,668
Changing the resolution of a VNC session in linux
I use VNC to connect to a Linux workstation at work. At work I have a 20" monitor that runs at 1600x1200, while at home I use my laptop with its resolution of 1440x900. If I set the vncserver to run at 1440x900 I miss out on a lot of space on my monitor, whereas if I set it to run at 1600x1200 it doesn't fit on the lap...
Real VNC server 4.4 includes support for Xrandr, which allows resizing the VNC. Start the server with: vncserver -geometry 1600x1200 -randr 1600x1200,1440x900,1024x768 Then resize with: xrandr -s 1600x1200 xrandr -s 1440x900 xrandr -s 1024x768
Changing the resolution of a VNC session in linux I use VNC to connect to a Linux workstation at work. At work I have a 20" monitor that runs at 1600x1200, while at home I use my laptop with its resolution of 1440x900. If I set the vncserver to run at 1440x900 I miss out on a lot of space on my monitor, whereas if I se...
TITLE: Changing the resolution of a VNC session in linux QUESTION: I use VNC to connect to a Linux workstation at work. At work I have a 20" monitor that runs at 1600x1200, while at home I use my laptop with its resolution of 1440x900. If I set the vncserver to run at 1440x900 I miss out on a lot of space on my monito...
[ "linux", "vnc" ]
176
178
586,049
15
0
2008-08-19T06:56:39.440000
2009-07-05T08:18:58.250000
15,828
16,051
Reading Excel files from C#
Is there a free or open source library to read Excel files (.xls) directly from a C# program? It does not need to be too fancy, just to select a worksheet and read the data as strings. So far, I've been using Export to Unicode text function of Excel, and parsing the resulting (tab-delimited) file, but I'd like to elimi...
var fileName = string.Format("{0}\\fileNameHere", Directory.GetCurrentDirectory()); var connectionString = string.Format("Provider=Microsoft.Jet.OLEDB.4.0; data source={0}; Extended Properties=Excel 8.0;", fileName); var adapter = new OleDbDataAdapter("SELECT * FROM [workSheetNameHere$]", connectionString); var ds = n...
Reading Excel files from C# Is there a free or open source library to read Excel files (.xls) directly from a C# program? It does not need to be too fancy, just to select a worksheet and read the data as strings. So far, I've been using Export to Unicode text function of Excel, and parsing the resulting (tab-delimited)...
TITLE: Reading Excel files from C# QUESTION: Is there a free or open source library to read Excel files (.xls) directly from a C# program? It does not need to be too fancy, just to select a worksheet and read the data as strings. So far, I've been using Export to Unicode text function of Excel, and parsing the resulti...
[ "c#", ".net", "excel", "ms-office" ]
232
152
535,091
32
0
2008-08-19T07:23:46.703000
2008-08-19T12:18:20.197000
15,838
15,846
Optimizing a search algorithm in C
Can the performance of this sequential search algorithm (taken from The Practice of Programming ) be improved using any of C's native utilities, e.g. if I set the i variable to be a register variable? int lookup(char *word, char*array[]) { int i for (i = 0; array[i]!= NULL; i++) if (strcmp(word, array[i]) == 0) return...
Yes, but only very slightly. A much bigger performance improvement can be achieved by using better algorithms (for example keeping the list sorted and doing a binary search). In general optimizing a given algorithm only gets you so far. Choosing a better algorithm (even if it's not completely optimized) can give you a ...
Optimizing a search algorithm in C Can the performance of this sequential search algorithm (taken from The Practice of Programming ) be improved using any of C's native utilities, e.g. if I set the i variable to be a register variable? int lookup(char *word, char*array[]) { int i for (i = 0; array[i]!= NULL; i++) if (...
TITLE: Optimizing a search algorithm in C QUESTION: Can the performance of this sequential search algorithm (taken from The Practice of Programming ) be improved using any of C's native utilities, e.g. if I set the i variable to be a register variable? int lookup(char *word, char*array[]) { int i for (i = 0; array[i]...
[ "c", "performance", "algorithm", "optimization" ]
9
24
3,809
10
0
2008-08-19T07:28:31.967000
2008-08-19T07:33:20.943000
15,851
15,946
Refactoring away labeled loops
After I was convinced that labeled breaks/continues are a total "nono" over here, I need help to remove the label out of my code. I have a square matrix and a vector that has the same length. The vector has already some values in it an depending on the values in the matrix the vector is changed in the loop. I hope, the...
Looking at the solutions presented so far: They all look less readable than the original, in that they involve spending more code on the mechanism of the code rather than on the algorithm itself Some of them are broken, or were before they were edited. Most damning is the fact that people are having to think quite hard...
Refactoring away labeled loops After I was convinced that labeled breaks/continues are a total "nono" over here, I need help to remove the label out of my code. I have a square matrix and a vector that has the same length. The vector has already some values in it an depending on the values in the matrix the vector is c...
TITLE: Refactoring away labeled loops QUESTION: After I was convinced that labeled breaks/continues are a total "nono" over here, I need help to remove the label out of my code. I have a square matrix and a vector that has the same length. The vector has already some values in it an depending on the values in the matr...
[ "java", "refactoring", "label" ]
19
34
2,126
12
0
2008-08-19T07:42:02.407000
2008-08-19T10:14:51.523000
15,871
15,877
Getting developers to use a wiki
I work on a complex application where different teams work on their own modules with a degree of overlap. A while back we got a Mediawiki instance set up, partly at my prompting. I have a hard job getting people to actually use it, let alone contribute. I can see a lot of benefit in sharing information. It may at least...
As I mentioned before, a Wiki is very unorganized. However, if that is the only argument from your developers, then invest some effort to create a simple index page and keep it updated (either do it yourself or ask people to link their contributions to the index). That way, the Wiki might grow into a very nice and quit...
Getting developers to use a wiki I work on a complex application where different teams work on their own modules with a degree of overlap. A while back we got a Mediawiki instance set up, partly at my prompting. I have a hard job getting people to actually use it, let alone contribute. I can see a lot of benefit in sha...
TITLE: Getting developers to use a wiki QUESTION: I work on a complex application where different teams work on their own modules with a degree of overlap. A while back we got a Mediawiki instance set up, partly at my prompting. I have a hard job getting people to actually use it, let alone contribute. I can see a lot...
[ "documentation", "wiki", "mediawiki" ]
17
8
1,692
13
0
2008-08-19T07:57:20.100000
2008-08-19T08:05:53.623000
15,880
19,859
Read from .msg files
I need to read from Outlook.MSG file in.NET without using COM API for Outlook (cos it will not be installed on the machines that my app will run). Are there any free 3rd party libraries to do that? I want to extract From, To, CC and BCC fields. Sent/Receive date fields would be good if they are also stored in MSG files...
Update: I have found a 3rd party COM library called Outlook Redemption which is working fine for me at the moment. If you use it via COM-Interop in.NET, don't forget to release every COM object after you are done with it, otherwise your application crashes randomly.
Read from .msg files I need to read from Outlook.MSG file in.NET without using COM API for Outlook (cos it will not be installed on the machines that my app will run). Are there any free 3rd party libraries to do that? I want to extract From, To, CC and BCC fields. Sent/Receive date fields would be good if they are als...
TITLE: Read from .msg files QUESTION: I need to read from Outlook.MSG file in.NET without using COM API for Outlook (cos it will not be installed on the machines that my app will run). Are there any free 3rd party libraries to do that? I want to extract From, To, CC and BCC fields. Sent/Receive date fields would be go...
[ "c#", "outlook", "email", "message", "msg" ]
18
9
42,868
7
0
2008-08-19T08:07:28.037000
2008-08-21T13:27:06.583000
15,899
16,019
How to insert/replace XML tag in XmlDocument?
I have a XmlDocument in java, created with the Weblogic XmlDocument parser. I want to replace the content of a tag in this XMLDocument with my own data, or insert the tag if it isn't there. mfkdslmlfkm For example I want to insert a URL in the location tag: http://something but otherwise leave the XML as is. Currently ...
How about an XPath based approach? I like this approach as the logic is super-easy to understand. The code is pretty much self-documenting. If your xml document is available to you as an org.w3c.dom.Document object (as most parsers return), then you could do something like the following: // get the list of customdata n...
How to insert/replace XML tag in XmlDocument? I have a XmlDocument in java, created with the Weblogic XmlDocument parser. I want to replace the content of a tag in this XMLDocument with my own data, or insert the tag if it isn't there. mfkdslmlfkm For example I want to insert a URL in the location tag: http://something...
TITLE: How to insert/replace XML tag in XmlDocument? QUESTION: I have a XmlDocument in java, created with the Weblogic XmlDocument parser. I want to replace the content of a tag in this XMLDocument with my own data, or insert the tag if it isn't there. mfkdslmlfkm For example I want to insert a URL in the location tag...
[ "java", "xml", "xquery" ]
6
5
5,327
4
0
2008-08-19T08:46:08.207000
2008-08-19T11:31:10.433000
15,917
142,767
Data Auditing in NHibernate and SqlServer
I'm using NHibernate on a project and I need to do data auditing. I found this article on codeproject which discusses the IInterceptor interface. What is your preferred way of auditing data? Do you use database triggers? Do you use something similar to what's dicussed in the article?
For NHibernate 2.0, you should also look at Event Listeners. These are the evolution of the IInterceptor interface and we use them successfully for auditing.
Data Auditing in NHibernate and SqlServer I'm using NHibernate on a project and I need to do data auditing. I found this article on codeproject which discusses the IInterceptor interface. What is your preferred way of auditing data? Do you use database triggers? Do you use something similar to what's dicussed in the ar...
TITLE: Data Auditing in NHibernate and SqlServer QUESTION: I'm using NHibernate on a project and I need to do data auditing. I found this article on codeproject which discusses the IInterceptor interface. What is your preferred way of auditing data? Do you use database triggers? Do you use something similar to what's ...
[ "sql-server", "nhibernate", "audit" ]
15
14
8,594
6
0
2008-08-19T09:24:08.583000
2008-09-27T02:16:25.247000
15,949
16,168
Java+Tomcat, Dying database connection?
I have a tomcat instance setup but the database connection I have configured in context.xml keeps dying after periods of inactivity. When I check the logs I get the following error: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet successfully received from the server was68051 seconds ago. The l...
Tomcat Documentation DBCP uses the Jakarta-Commons Database Connection Pool. It relies on number of Jakarta-Commons components: * Jakarta-Commons DBCP * Jakarta-Commons Collections * Jakarta-Commons Pool This attribute may help you out. removeAbandonedTimeout="60" I'm using the same connection pooling stuff and I'm set...
Java+Tomcat, Dying database connection? I have a tomcat instance setup but the database connection I have configured in context.xml keeps dying after periods of inactivity. When I check the logs I get the following error: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet successfully received fro...
TITLE: Java+Tomcat, Dying database connection? QUESTION: I have a tomcat instance setup but the database connection I have configured in context.xml keeps dying after periods of inactivity. When I check the logs I get the following error: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: The last packet success...
[ "java", "mysql", "database", "tomcat" ]
17
11
45,001
4
0
2008-08-19T10:17:24.090000
2008-08-19T13:40:10.283000
16,003
16,175
LocationProvider
We need to replace the menu system in our main ASP.NET application. So naturally we're looking at the ASP.NET SiteMapProvider and Menu controls. However we also need enough security to prevent users from directly entering URLs that they shouldn't have access to. We can do this by putting entries in web.config and secur...
Why don't you create rights & profiles to manage wich pages a user can see? I usually create a user class which implements the IPrincipal security interface. On every request to your application, you check the rights of a particular user and output the SiteMap's nodes allowed for this user.
LocationProvider We need to replace the menu system in our main ASP.NET application. So naturally we're looking at the ASP.NET SiteMapProvider and Menu controls. However we also need enough security to prevent users from directly entering URLs that they shouldn't have access to. We can do this by putting entries in web...
TITLE: LocationProvider QUESTION: We need to replace the menu system in our main ASP.NET application. So naturally we're looking at the ASP.NET SiteMapProvider and Menu controls. However we also need enough security to prevent users from directly entering URLs that they shouldn't have access to. We can do this by putt...
[ "asp.net", "security", "sitemap" ]
2
1
182
1
0
2008-08-19T11:22:00.873000
2008-08-19T13:44:31.223000
16,007
16,039
How do I convert a file path to a URL in ASP.NET
Basically I have some code to check a specific directory to see if an image is there and if so I want to assign a URL to the image to an ImageControl. if (System.IO.Directory.Exists(photosLocation)) { string[] files = System.IO.Directory.GetFiles(photosLocation, "*.jpg"); if (files.Length > 0) { // TODO: return the url...
As far as I know, there's no method to do what you want; at least not directly. I'd store the photosLocation as a path relative to the application; for example: "~/Images/". This way, you could use MapPath to get the physical location, and ResolveUrl to get the URL (with a bit of help from System.IO.Path ): string phot...
How do I convert a file path to a URL in ASP.NET Basically I have some code to check a specific directory to see if an image is there and if so I want to assign a URL to the image to an ImageControl. if (System.IO.Directory.Exists(photosLocation)) { string[] files = System.IO.Directory.GetFiles(photosLocation, "*.jpg")...
TITLE: How do I convert a file path to a URL in ASP.NET QUESTION: Basically I have some code to check a specific directory to see if an image is there and if so I want to assign a URL to the image to an ImageControl. if (System.IO.Directory.Exists(photosLocation)) { string[] files = System.IO.Directory.GetFiles(photos...
[ "asp.net", "url", "image" ]
47
14
121,551
10
0
2008-08-19T11:24:55.907000
2008-08-19T12:02:18.700000
16,064
16,095
What IDE to use for developing in Ruby on Rails on Windows?
Possible Duplicate: What Ruby IDE do you prefer? I've generally been doing stuff on Microsoft.NET out of college almost 2 years ago. I just started looking at Ruby on Rails. So what editor should I use? I'm using Notepad++ right now but can I get debugging etc. somehow?
Try both NetBeans and RadRails for maybe a week each, then you can find which works best for you. The best advice is to learn your tool. If you are not checking out something new about your editor, something that could potentially save you time (regexp, etc) then you are doing yourself a huge disservice. I have been us...
What IDE to use for developing in Ruby on Rails on Windows? Possible Duplicate: What Ruby IDE do you prefer? I've generally been doing stuff on Microsoft.NET out of college almost 2 years ago. I just started looking at Ruby on Rails. So what editor should I use? I'm using Notepad++ right now but can I get debugging etc...
TITLE: What IDE to use for developing in Ruby on Rails on Windows? QUESTION: Possible Duplicate: What Ruby IDE do you prefer? I've generally been doing stuff on Microsoft.NET out of college almost 2 years ago. I just started looking at Ruby on Rails. So what editor should I use? I'm using Notepad++ right now but can I...
[ "ruby-on-rails", "ruby", "ide", "editor" ]
9
7
9,233
10
0
2008-08-19T12:30:25.977000
2008-08-19T12:47:25.613000
16,067
1,661,276
Prototyping with Python code before compiling
I have been mulling over writing a peak-fitting library for a while. I know Python fairly well and plan on implementing everything in Python to begin with but envisage that I may have to re-implement some core routines in a compiled language eventually. IIRC, one of Python's original remits was as a prototyping languag...
Finally a question that I can really put a value answer to:). I have investigated f2py, boost.python, swig, cython and pyrex for my work (PhD in optical measurement techniques). I used swig extensively, boost.python some and pyrex and cython a lot. I also used ctypes. This is my breakdown: Disclaimer: This is my person...
Prototyping with Python code before compiling I have been mulling over writing a peak-fitting library for a while. I know Python fairly well and plan on implementing everything in Python to begin with but envisage that I may have to re-implement some core routines in a compiled language eventually. IIRC, one of Python'...
TITLE: Prototyping with Python code before compiling QUESTION: I have been mulling over writing a peak-fitting library for a while. I know Python fairly well and plan on implementing everything in Python to begin with but envisage that I may have to re-implement some core routines in a compiled language eventually. II...
[ "python", "swig", "ctypes", "prototyping", "python-sip" ]
22
36
4,868
7
0
2008-08-19T12:32:38.903000
2009-11-02T13:16:20.447000
16,096
167,308
How to apply multiple styles in WPF
In WPF, how would I apply multiple styles to a FrameworkElement? For instance, I have a control which already has a style. I also have a separate style which I would like to add to it without blowing away the first one. The styles have different TargetTypes, so I can't just extend one with the other.
I think the simple answer is that you can't do (at least in this version of WPF) what you are trying to do. That is, for any particular element only one Style can be applied. However, as others have stated above, maybe you can use BasedOn to help you out. Check out the following piece of loose xaml. In it you will see ...
How to apply multiple styles in WPF In WPF, how would I apply multiple styles to a FrameworkElement? For instance, I have a control which already has a style. I also have a separate style which I would like to add to it without blowing away the first one. The styles have different TargetTypes, so I can't just extend on...
TITLE: How to apply multiple styles in WPF QUESTION: In WPF, how would I apply multiple styles to a FrameworkElement? For instance, I have a control which already has a style. I also have a separate style which I would like to add to it without blowing away the first one. The styles have different TargetTypes, so I ca...
[ ".net", "wpf", "styles" ]
170
174
115,594
12
0
2008-08-19T12:47:44.833000
2008-10-03T15:03:47.363000
16,097
16,101
What is the best way to replicate a version control repository?
Here is the scenario that I have. I have a cvs repository in one location (A) and I want to replicate it and keep it in sync with a repository in another location(B). This would be a single directional sync from A to B. What is the best way to do this? If it is not really feasible in CVS then which source code control ...
When using CVS, I don't know any tools to do that other than files syncing. You can achieve that using tools like rsync (Unix) or xcopy / robocopy (Windows). If you plan on migrating to Subversion, it provides a tool called svnsync that allows to sync a repository from another one.
What is the best way to replicate a version control repository? Here is the scenario that I have. I have a cvs repository in one location (A) and I want to replicate it and keep it in sync with a repository in another location(B). This would be a single directional sync from A to B. What is the best way to do this? If ...
TITLE: What is the best way to replicate a version control repository? QUESTION: Here is the scenario that I have. I have a cvs repository in one location (A) and I want to replicate it and keep it in sync with a repository in another location(B). This would be a single directional sync from A to B. What is the best w...
[ "version-control", "cvs" ]
3
4
1,082
4
0
2008-08-19T12:48:21.477000
2008-08-19T12:52:05.653000
16,100
16,104
Convert a string to an enum in C#
What's the best way to convert a string to an enumeration value in C#? I have an HTML select tag containing the values of an enumeration. When the page is posted, I want to pick up the value (which will be in the form of a string) and convert it to the corresponding enumeration value. In an ideal world, I could do some...
In.NET Core and.NET Framework ≥4.0 there is a generic parse method: Enum.TryParse("Active", out StatusEnum myStatus); This also includes C#7's new inline out variables, so this does the try-parse, conversion to the explicit enum type and initialises+populates the myStatus variable. If you have access to C#7 and the lat...
Convert a string to an enum in C# What's the best way to convert a string to an enumeration value in C#? I have an HTML select tag containing the values of an enumeration. When the page is posted, I want to pick up the value (which will be in the form of a string) and convert it to the corresponding enumeration value. ...
TITLE: Convert a string to an enum in C# QUESTION: What's the best way to convert a string to an enumeration value in C#? I have an HTML select tag containing the values of an enumeration. When the page is posted, I want to pick up the value (which will be in the form of a string) and convert it to the corresponding e...
[ "c#", "string", "enums" ]
1,293
2,120
1,227,900
29
0
2008-08-19T12:51:55.043000
2008-08-19T12:54:28.533000
16,110
16,130
C# Auto Clearing Winform Textbox
I have a user that want to be able to select a textbox and have the current text selected so that he doesn't have to highlight it all in order to change the contents. The contents need to be handle when enter is pushed. That part I think I have figured out but any suggestions would be welcome. The part I need help with...
Hook into the KeyPress event on the TextBox, and when it encounters the Enter key, run your hardware setting code, and then highlight the full text of the textbox again (see below) - Windows will take care of clearing the text with the next keystroke for you. TextBox1.Select(0, TextBox1.Text.Length);
C# Auto Clearing Winform Textbox I have a user that want to be able to select a textbox and have the current text selected so that he doesn't have to highlight it all in order to change the contents. The contents need to be handle when enter is pushed. That part I think I have figured out but any suggestions would be w...
TITLE: C# Auto Clearing Winform Textbox QUESTION: I have a user that want to be able to select a textbox and have the current text selected so that he doesn't have to highlight it all in order to change the contents. The contents need to be handle when enter is pushed. That part I think I have figured out but any sugg...
[ "c#", "winforms", "textbox" ]
5
4
3,817
2
0
2008-08-19T12:55:46.423000
2008-08-19T13:12:51.867000
16,113
16,696
Software for Webserver Log Analysis?
Can I get some recommendations (preferably with some reasons) for good log analysis software for Apache 2.2 access log files? I have heard of Webalizer and AWStats, but have never really used any of them, and would like to know: What they can do Why they are useful Interesting uses for them Any and all comments and tho...
AWStats and Webalizer are both good and free (I think both free speech as well as free beer). I generally prefer the look of AWStats - it has a nice modern look whereas Webalizer looks like something created in about 1992. They both give roughly the same information which includes: Most frequently accessed pages Which ...
Software for Webserver Log Analysis? Can I get some recommendations (preferably with some reasons) for good log analysis software for Apache 2.2 access log files? I have heard of Webalizer and AWStats, but have never really used any of them, and would like to know: What they can do Why they are useful Interesting uses ...
TITLE: Software for Webserver Log Analysis? QUESTION: Can I get some recommendations (preferably with some reasons) for good log analysis software for Apache 2.2 access log files? I have heard of Webalizer and AWStats, but have never really used any of them, and would like to know: What they can do Why they are useful...
[ "apache", "logging", "logfile-analysis" ]
25
13
9,226
10
0
2008-08-19T12:59:40.550000
2008-08-19T18:33:24.933000
16,114
16,134
C# Include Derived Control in Toolbox
This is in reference to my other question Auto Clearing Textbox. If I choose to derive a new TextBox control from TextBox instead of implement a user control just containing my Textbox, how would I include that in the toolbox.
Right-click the toolbox, click "Choose Items" from the context menu, browse to your DLL, and select it. To extend on Greg's answer... Just to clarify, you cannot add a user control to the tool box if the code for it is in the same project that you want to use it in. For some reason MS has never added this ability, whic...
C# Include Derived Control in Toolbox This is in reference to my other question Auto Clearing Textbox. If I choose to derive a new TextBox control from TextBox instead of implement a user control just containing my Textbox, how would I include that in the toolbox.
TITLE: C# Include Derived Control in Toolbox QUESTION: This is in reference to my other question Auto Clearing Textbox. If I choose to derive a new TextBox control from TextBox instead of implement a user control just containing my Textbox, how would I include that in the toolbox. ANSWER: Right-click the toolbox, cli...
[ "c#", "visual-studio", "winforms", "textbox" ]
7
8
3,619
2
0
2008-08-19T12:59:41.690000
2008-08-19T13:16:12.793000
16,140
16,817
What's the best way to get started with OSGI?
What makes a module/service/bit of application functionality a particularly good candidate for an OSGi module? I'm interested in using OSGi in my applications. We're a Java shop and we use Spring pretty extensively, so I'm leaning toward using Spring Dynamic Modules for OSGi(tm) Service Platforms. I'm looking for a goo...
Well, since you can not have one part OSGi and one part non-OSGi you'll need to make your entire app OSGi. In its simplest form you make a single OSGi bundle out of your entire application. Clearly this is not a best practice but it can be useful to get a feel for deploying a bundle in an OSGi container (Equinox, Felix...
What's the best way to get started with OSGI? What makes a module/service/bit of application functionality a particularly good candidate for an OSGi module? I'm interested in using OSGi in my applications. We're a Java shop and we use Spring pretty extensively, so I'm leaning toward using Spring Dynamic Modules for OSG...
TITLE: What's the best way to get started with OSGI? QUESTION: What makes a module/service/bit of application functionality a particularly good candidate for an OSGi module? I'm interested in using OSGi in my applications. We're a Java shop and we use Spring pretty extensively, so I'm leaning toward using Spring Dynam...
[ "java", "spring", "osgi" ]
45
41
12,116
8
0
2008-08-19T13:20:49.010000
2008-08-19T19:51:39.143000
16,142
16,163
What do "branch", "tag" and "trunk" mean in Subversion repositories?
I've seen these words a lot around Subversion (and I guess general repository) discussions. I have been using SVN for my projects for the last few years, but I've never grasped the complete concept of these directories. What do they mean?
Hmm, not sure I agree with Nick re tag being similar to a branch. A tag is just a marker Trunk would be the main body of development, originating from the start of the project until the present. Branch will be a copy of code derived from a certain point in the trunk that is used for applying major changes to the code w...
What do "branch", "tag" and "trunk" mean in Subversion repositories? I've seen these words a lot around Subversion (and I guess general repository) discussions. I have been using SVN for my projects for the last few years, but I've never grasped the complete concept of these directories. What do they mean?
TITLE: What do "branch", "tag" and "trunk" mean in Subversion repositories? QUESTION: I've seen these words a lot around Subversion (and I guess general repository) discussions. I have been using SVN for my projects for the last few years, but I've never grasped the complete concept of these directories. What do they ...
[ "svn", "branch", "terminology", "trunk" ]
1,211
927
462,402
16
0
2008-08-19T13:22:03.750000
2008-08-19T13:35:21.603000
16,155
16,245
Making one interface overwrite a method it inherits from another interface in PHP
Is there a way in PHP to overwrite a method declared by one interface in an interface extending that interface? The Example: I'm probably doing something wrong, but here is what I have: interface iVendor{ public function __construct($vendors_no = null); public function getName(); public function getVendors_no(); public...
@cmcculloh Yeah, in Java you don't define constructors in Interfaces. This allows you to both extend interfaces and also have a class that implements multiple interfaces (both allowed, and very useful in many cases) without worrying about having to satisfy a particular constructor. EDIT: Here's my new model: A. Each in...
Making one interface overwrite a method it inherits from another interface in PHP Is there a way in PHP to overwrite a method declared by one interface in an interface extending that interface? The Example: I'm probably doing something wrong, but here is what I have: interface iVendor{ public function __construct($vend...
TITLE: Making one interface overwrite a method it inherits from another interface in PHP QUESTION: Is there a way in PHP to overwrite a method declared by one interface in an interface extending that interface? The Example: I'm probably doing something wrong, but here is what I have: interface iVendor{ public function...
[ "php", "oop", "interface", "extends" ]
2
6
2,464
2
0
2008-08-19T13:32:12.247000
2008-08-19T14:17:20.923000
16,161
290,184
cvs checkin: Identifying the names of the files checked in
The cvsnt manual provides a detailed list of parameters than can be passed to the postcommand module, but none of them specify the file name. Is anybody aware of an option not listed here that would provide the name of the file being checked in? ColinYounger - The %c command is just the command, e.g. "Commit"
The answer (thanks to an answer to a different question by Sally ) is to not use the postcommand file, but use the loginfo file and provide the arguments ‘%{s}’
cvs checkin: Identifying the names of the files checked in The cvsnt manual provides a detailed list of parameters than can be passed to the postcommand module, but none of them specify the file name. Is anybody aware of an option not listed here that would provide the name of the file being checked in? ColinYounger - ...
TITLE: cvs checkin: Identifying the names of the files checked in QUESTION: The cvsnt manual provides a detailed list of parameters than can be passed to the postcommand module, but none of them specify the file name. Is anybody aware of an option not listed here that would provide the name of the file being checked i...
[ "cvs", "cvsnt" ]
1
1
259
2
0
2008-08-19T13:34:24.710000
2008-11-14T14:10:07.440000
16,164
16,746
RSS/Atom for professional use
I wondered if anyone can give an example of a professional use of RSS/Atom feeds in a company product. Does anyone use feeds for other things than updating news? For example, did you create a product that gives results as RSS/Atom feeds? Like price listings or current inventory, or maybe dates of training lessons? Or a...
Some of my team's new systems generate RSS feeds that the developers syndicate. These feeds push out events that interest the developers at certain times and the information is controlled using different loggers. Thus when debugging you can get the debugging feed, when you want to see completed transactions you go to t...
RSS/Atom for professional use I wondered if anyone can give an example of a professional use of RSS/Atom feeds in a company product. Does anyone use feeds for other things than updating news? For example, did you create a product that gives results as RSS/Atom feeds? Like price listings or current inventory, or maybe d...
TITLE: RSS/Atom for professional use QUESTION: I wondered if anyone can give an example of a professional use of RSS/Atom feeds in a company product. Does anyone use feeds for other things than updating news? For example, did you create a product that gives results as RSS/Atom feeds? Like price listings or current inv...
[ "rss", "use-case", "feed", "atom-feed" ]
6
4
1,179
9
0
2008-08-19T13:36:19.040000
2008-08-19T19:02:29.133000
16,167
16,182
Good refactoring support for C++
The Visual Studio refactoring support for C# is quite good nowadays (though not half as good as some Java IDE's I've seen already) but I'm really missing C++ support. I have seen Refactor! and am currently trying it out, but maybe one of you guys know a better tool or plugin? I've been working with Visual Assist X now ...
Visual Assist X by Whole Tomato software is not free, but it's absolutely worth the money if you use Visual Studio for C++. http://www.wholetomato.com/
Good refactoring support for C++ The Visual Studio refactoring support for C# is quite good nowadays (though not half as good as some Java IDE's I've seen already) but I'm really missing C++ support. I have seen Refactor! and am currently trying it out, but maybe one of you guys know a better tool or plugin? I've been ...
TITLE: Good refactoring support for C++ QUESTION: The Visual Studio refactoring support for C# is quite good nowadays (though not half as good as some Java IDE's I've seen already) but I'm really missing C++ support. I have seen Refactor! and am currently trying it out, but maybe one of you guys know a better tool or ...
[ "c++", "visual-studio", "refactoring" ]
27
37
18,134
6
0
2008-08-19T13:39:29.673000
2008-08-19T13:46:52.420000
16,178
16,229
Best Way To Determine If .NET 3.5 Is Installed
I need to programatically determine whether.NET 3.5 is installed. I thought it would be easy: <% Response.Write(Environment.Version.ToString()); %> Which returns "2.0.50727.1434" so no such luck... In my research I have that there are some rather obscure registry keys I can look at but I'm not sure if that is the route...
You could try: static bool HasNet35() { try { AppDomain.CurrentDomain.Load( "System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"); return true; } catch { return false; } } @ Nick: Good question, I'll try it in a bit. Kev
Best Way To Determine If .NET 3.5 Is Installed I need to programatically determine whether.NET 3.5 is installed. I thought it would be easy: <% Response.Write(Environment.Version.ToString()); %> Which returns "2.0.50727.1434" so no such luck... In my research I have that there are some rather obscure registry keys I ca...
TITLE: Best Way To Determine If .NET 3.5 Is Installed QUESTION: I need to programatically determine whether.NET 3.5 is installed. I thought it would be easy: <% Response.Write(Environment.Version.ToString()); %> Which returns "2.0.50727.1434" so no such luck... In my research I have that there are some rather obscure ...
[ ".net", ".net-3.5", "installation", "registry" ]
15
3
14,500
9
0
2008-08-19T13:45:03.017000
2008-08-19T14:09:42.313000