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
110,431
110,643
Advice on mixing legacy ASP site with .NET 2.0
We've just been tasked with updating an e-commerce application to use PayPal's PayFlow product. The site was originally written in classic ASP except for the credit card processing portion which was a COM component. Our plan is to replace the COM component with a.NET 2.0 component. I'm looking for tips, gotcha, etc. be...
I think Dan Bartels' blog post about Replacing Old Classic ASP COM Componenets With.NET Assemblies is the right starting point for you. Implementing the details described in the blog post, you should be able to instantiate your objects in classic asp and execute code like this: Dim myObject Set myObject = Server.Create...
Advice on mixing legacy ASP site with .NET 2.0 We've just been tasked with updating an e-commerce application to use PayPal's PayFlow product. The site was originally written in classic ASP except for the credit card processing portion which was a COM component. Our plan is to replace the COM component with a.NET 2.0 c...
TITLE: Advice on mixing legacy ASP site with .NET 2.0 QUESTION: We've just been tasked with updating an e-commerce application to use PayPal's PayFlow product. The site was originally written in classic ASP except for the credit card processing portion which was a COM component. Our plan is to replace the COM componen...
[ "asp.net", "com", "asp-classic", "e-commerce", "paypal" ]
2
1
169
1
0
2008-09-21T06:59:21.287000
2008-09-21T09:43:04.203000
110,433
115,898
Are there any Common Lisp implementations for .Net?
Are there any Common Lisp implementations for.Net?
I haven't looked at it recently, but at least in the past there were some problems with fully implementing common lisp on the CLR, and I'd be a little surprised if this has changed. The issues come up with things like the handling of floats where.net/clr has a way to do it that is a) subtly incorrect b) disagrees with ...
Are there any Common Lisp implementations for .Net? Are there any Common Lisp implementations for.Net?
TITLE: Are there any Common Lisp implementations for .Net? QUESTION: Are there any Common Lisp implementations for.Net? ANSWER: I haven't looked at it recently, but at least in the past there were some problems with fully implementing common lisp on the CLR, and I'd be a little surprised if this has changed. The issu...
[ ".net", "lisp", "common-lisp", "language-implementation" ]
48
29
18,891
9
0
2008-09-21T07:00:30.957000
2008-09-22T16:26:30.980000
110,436
110,608
Cleaning up Legacy Code "header spaghetti"
Any recommended practices for cleaning up "header spaghetti" which is causing extremely slow compilation times (Linux/Unix)? Is there any equvalent to "#pragma once" with GCC? (found conflicting messages regarding this) Thanks.
Assuming you're familiar with "include guards" (#ifdef at the begining of the header..), an additional way of speeding up build time is by using external include guards. It was discussed in " Large Scale C++ Software Design ". The idea is that classic include guards, unlike #pragma once, do not spare you the preprocess...
Cleaning up Legacy Code "header spaghetti" Any recommended practices for cleaning up "header spaghetti" which is causing extremely slow compilation times (Linux/Unix)? Is there any equvalent to "#pragma once" with GCC? (found conflicting messages regarding this) Thanks.
TITLE: Cleaning up Legacy Code "header spaghetti" QUESTION: Any recommended practices for cleaning up "header spaghetti" which is causing extremely slow compilation times (Linux/Unix)? Is there any equvalent to "#pragma once" with GCC? (found conflicting messages regarding this) Thanks. ANSWER: Assuming you're famili...
[ "c++", "legacy-code" ]
5
9
2,667
11
0
2008-09-21T07:02:26.490000
2008-09-21T09:15:27.483000
110,451
676,745
How to add WCF templates to Visual Studio Express?
I am working through the book Learning WCF by Michele Bustamante, and trying to do it using Visual Studio C# Express 2008. The instructions say to use WCF project and item templates, which are not included with VS C# Express. There are templates for these types included with Visual Studio Web Developer Express, and I'v...
If you have both Visual Web Developer (VWD) 2008 and Visual C# (VC#) 2008 installed you can copy templates between them. The VWD template files live in (by default): C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\VWDExpress The VC# templates live in: C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\VC...
How to add WCF templates to Visual Studio Express? I am working through the book Learning WCF by Michele Bustamante, and trying to do it using Visual Studio C# Express 2008. The instructions say to use WCF project and item templates, which are not included with VS C# Express. There are templates for these types include...
TITLE: How to add WCF templates to Visual Studio Express? QUESTION: I am working through the book Learning WCF by Michele Bustamante, and trying to do it using Visual Studio C# Express 2008. The instructions say to use WCF project and item templates, which are not included with VS C# Express. There are templates for t...
[ "c#", "visual-studio", "visual-studio-2008", "wcf", "visual-studio-express" ]
8
17
31,826
4
0
2008-09-21T07:08:36.383000
2009-03-24T10:03:48.917000
110,477
110,484
Anyone know of any (free / open source) VI integration for Visual Studio?
vi is for cool kids.
ViEmu - Not Free but great Vim emulation. Visual_Studio.vim - Allows you to manage visual studio from Vim. Using GVim as the Visual Studio Editor
Anyone know of any (free / open source) VI integration for Visual Studio? vi is for cool kids.
TITLE: Anyone know of any (free / open source) VI integration for Visual Studio? QUESTION: vi is for cool kids. ANSWER: ViEmu - Not Free but great Vim emulation. Visual_Studio.vim - Allows you to manage visual studio from Vim. Using GVim as the Visual Studio Editor
[ "visual-studio", "vim", "add-in", "vi" ]
38
21
6,867
6
0
2008-09-21T07:27:07.010000
2008-09-21T07:32:25.467000
110,488
110,500
What is the best way to collect/report unexpected errors in .NET Window Applications?
I am looking for a better solution than what we currently have to deal with unexpected production errors, without reinventing the wheel. A larger number of our products are WinForm and WPF applications that are installed at remote sites. Inevitably unexpected errors occur, from NullReferenceExceptions to 'General netwo...
I'd suggest Jeff Atwood's article on User Friendly Exception Handling, which does most of what you ask already (Application Info, Screenshot, Exception Details, OS, Logging to text files and Emailing), and contains the source code so you add the extra stuff you need.
What is the best way to collect/report unexpected errors in .NET Window Applications? I am looking for a better solution than what we currently have to deal with unexpected production errors, without reinventing the wheel. A larger number of our products are WinForm and WPF applications that are installed at remote sit...
TITLE: What is the best way to collect/report unexpected errors in .NET Window Applications? QUESTION: I am looking for a better solution than what we currently have to deal with unexpected production errors, without reinventing the wheel. A larger number of our products are WinForm and WPF applications that are insta...
[ "c#", ".net", "error-handling", "reporting" ]
6
5
2,568
3
0
2008-09-21T07:39:13.593000
2008-09-21T07:50:18.013000
110,512
110,799
Mod_rails and mongrel running on the same server?
I'm currently running mongrel clusters with monit watching over them for 8 Rails applications on one server. I'd like to move 7 of these applications to mod_rails, with one remaining on mongrel. The 7 smaller applications are low-volume, while the one I'd like to remain on mongrel is a high volume, app. As I understand...
I would probably just move all the apps to mod_rails, as the performance seems comparable to Mongrel and there's less administration overhead. With regards to configuration gotchas, just make sure that you allow your public directory, or you'll find static assets failing: Options FollowSymLinks AllowOverride None Order...
Mod_rails and mongrel running on the same server? I'm currently running mongrel clusters with monit watching over them for 8 Rails applications on one server. I'd like to move 7 of these applications to mod_rails, with one remaining on mongrel. The 7 smaller applications are low-volume, while the one I'd like to remain...
TITLE: Mod_rails and mongrel running on the same server? QUESTION: I'm currently running mongrel clusters with monit watching over them for 8 Rails applications on one server. I'd like to move 7 of these applications to mod_rails, with one remaining on mongrel. The 7 smaller applications are low-volume, while the one ...
[ "ruby-on-rails", "ruby", "apache", "mongrel", "mod-rails" ]
4
4
399
2
0
2008-09-21T07:57:28.513000
2008-09-21T11:23:36.440000
110,536
110,639
Prevent .NET from "lifting" local variables
I have the following code: string prefix = "OLD:"; Func prependAction = (x => prefix + x); prefix = "NEW:"; Console.WriteLine(prependAction("brownie")); Because the compiler replaces the prefix variable with a closure "NEW:brownie" is printed to the console. Is there an easy way to prevent the compiler from lifting the...
I see the underlying problem now. It is deeper than I first thought. Basically the solution is to modify the expression tree before serializing it, by replacing all subtrees that do not depend on the parameters with constant nodes. This is apparently called "funcletization". There is an explanation of it here.
Prevent .NET from "lifting" local variables I have the following code: string prefix = "OLD:"; Func prependAction = (x => prefix + x); prefix = "NEW:"; Console.WriteLine(prependAction("brownie")); Because the compiler replaces the prefix variable with a closure "NEW:brownie" is printed to the console. Is there an easy ...
TITLE: Prevent .NET from "lifting" local variables QUESTION: I have the following code: string prefix = "OLD:"; Func prependAction = (x => prefix + x); prefix = "NEW:"; Console.WriteLine(prependAction("brownie")); Because the compiler replaces the prefix variable with a closure "NEW:brownie" is printed to the console....
[ "c#", ".net", "lambda" ]
7
8
1,355
9
0
2008-09-21T08:24:04.703000
2008-09-21T09:39:54.803000
110,554
110,602
Anyone familiar with a good "sticky windows" library for Winforms?
I want to recreate the stickiness and snapping of windows, like it is implemented in Winamp. The basic premise is, when you drag a window and it comes close to another one, it will snap to it and will stick. When you move it the two will move together. I need it for a MDI application.
You could read this article and try to adopt it for your program: Sticky Windows - How to make your (top-level) forms to stick one to the other or to the screen The class presented in the article inherits from System.Windows.Forms.NativeWindow, thus no inheritance is required in order to make your class "Stick-able".
Anyone familiar with a good "sticky windows" library for Winforms? I want to recreate the stickiness and snapping of windows, like it is implemented in Winamp. The basic premise is, when you drag a window and it comes close to another one, it will snap to it and will stick. When you move it the two will move together. ...
TITLE: Anyone familiar with a good "sticky windows" library for Winforms? QUESTION: I want to recreate the stickiness and snapping of windows, like it is implemented in Winamp. The basic premise is, when you drag a window and it comes close to another one, it will snap to it and will stick. When you move it the two wi...
[ "c#", ".net", "winforms", "user-interface" ]
1
3
2,557
3
0
2008-09-21T08:38:25.527000
2008-09-21T09:13:00.467000
110,558
110,595
Can you recommend a good FLEX online resource or book?
Are there any favorite online references or good introductory and intermediate/advanced books on this topic that you could recommend to me? I'm a java developer, so I'm looking for something which would be familiar as possible as to me.
Essential ActionScript 3.0, by Colin Moock Programming Flex 3: The Comprehensive Guide to Creating Rich Internet Applications with Adobe Flex, by Chafic Kazoun, Joey Lott Also check the books section on Flex.org There are some good video tutorials on lynda.com http://www.flex.org http://www.adobe.com/devnet/flex
Can you recommend a good FLEX online resource or book? Are there any favorite online references or good introductory and intermediate/advanced books on this topic that you could recommend to me? I'm a java developer, so I'm looking for something which would be familiar as possible as to me.
TITLE: Can you recommend a good FLEX online resource or book? QUESTION: Are there any favorite online references or good introductory and intermediate/advanced books on this topic that you could recommend to me? I'm a java developer, so I'm looking for something which would be familiar as possible as to me. ANSWER: E...
[ "apache-flex", "flexbuilder" ]
7
9
1,501
10
0
2008-09-21T08:44:09.477000
2008-09-21T09:09:38.573000
110,562
110,621
How to pass a generic property as a parameter to a function?
I need to write a function that receives a property as a parameter and execute its getter. If I needed to pass a function/delegate I would have used: delegate RET FunctionDelegate (T t); void func (FunctionDelegate function, T param,...) {... return function.Invoke(param); } Is there a similar way to define a property...
You can use reflection, you can get a MethodInfo object for the get/set accessors and call it's Invoke method. The code example assumes you have both a get and set accessors and you really have to add error handling if you want to use this in production code: For example to get the value of property Foo of object obj y...
How to pass a generic property as a parameter to a function? I need to write a function that receives a property as a parameter and execute its getter. If I needed to pass a function/delegate I would have used: delegate RET FunctionDelegate (T t); void func (FunctionDelegate function, T param,...) {... return function...
TITLE: How to pass a generic property as a parameter to a function? QUESTION: I need to write a function that receives a property as a parameter and execute its getter. If I needed to pass a function/delegate I would have used: delegate RET FunctionDelegate (T t); void func (FunctionDelegate function, T param,...) {....
[ "c#", "generics" ]
7
10
13,392
5
0
2008-09-21T08:47:03.727000
2008-09-21T09:22:02.537000
110,574
438,895
Does anybody know of a tabbed FTP client?
Am I the only person who has the need to view multiple directories at once (usually on the same remote server, but sometimes other ones too)? Disconnecting and reconnecting is driving me crazy. Preferably a free tool, but I'm getting to the stage where I'll try anything! Can you have multiple FireFTP tabs in Firefox? A...
FireFTP in Firefox does the job nicely. I've been using it about 2 hours and it's fast on the way to consigning FileZilla to the bin!
Does anybody know of a tabbed FTP client? Am I the only person who has the need to view multiple directories at once (usually on the same remote server, but sometimes other ones too)? Disconnecting and reconnecting is driving me crazy. Preferably a free tool, but I'm getting to the stage where I'll try anything! Can yo...
TITLE: Does anybody know of a tabbed FTP client? QUESTION: Am I the only person who has the need to view multiple directories at once (usually on the same remote server, but sometimes other ones too)? Disconnecting and reconnecting is driving me crazy. Preferably a free tool, but I'm getting to the stage where I'll tr...
[ "tabs", "ftp-client" ]
0
2
1,158
5
0
2008-09-21T08:58:01.033000
2009-01-13T13:13:59.843000
110,575
110,576
Do htmlspecialchars and mysql_real_escape_string keep my PHP code safe from injection?
Earlier today a question was asked regarding input validation strategies in web apps. The top answer, at time of writing, suggests in PHP just using htmlspecialchars and mysql_real_escape_string. My question is: Is this always enough? Is there more we should know? Where do these functions break down?
When it comes to database queries, always try and use prepared parameterised queries. The mysqli and PDO libraries support this. This is infinitely safer than using escaping functions such as mysql_real_escape_string. Yes, mysql_real_escape_string is effectively just a string escaping function. It is not a magic bullet...
Do htmlspecialchars and mysql_real_escape_string keep my PHP code safe from injection? Earlier today a question was asked regarding input validation strategies in web apps. The top answer, at time of writing, suggests in PHP just using htmlspecialchars and mysql_real_escape_string. My question is: Is this always enough...
TITLE: Do htmlspecialchars and mysql_real_escape_string keep my PHP code safe from injection? QUESTION: Earlier today a question was asked regarding input validation strategies in web apps. The top answer, at time of writing, suggests in PHP just using htmlspecialchars and mysql_real_escape_string. My question is: Is ...
[ "php", "security", "xss", "sql-injection" ]
116
243
72,319
6
0
2008-09-21T08:58:26.370000
2008-09-21T08:58:43.497000
110,592
110,762
How to unit test a DAO that is extending SqlMapClientDaoSupport
Spring DA helps in writing DAOs. When using iBATIS as the persistence framework, and extending SqlMapClientDaoSupport, a SqlMapClient mock should be set for the DAO, but I can't do it. SqlMapClientTemplate is not an interface and EasyMock cannot creates a mock for it.
DAO and unit tests do not get along well! That does not make sense to mock anything in a component that does not hold any business logic and is focused on database access. You should try instead to write an integration test. Take a look at the spring reference documentation, chapter 8.3: http://static.springframework.o...
How to unit test a DAO that is extending SqlMapClientDaoSupport Spring DA helps in writing DAOs. When using iBATIS as the persistence framework, and extending SqlMapClientDaoSupport, a SqlMapClient mock should be set for the DAO, but I can't do it. SqlMapClientTemplate is not an interface and EasyMock cannot creates a ...
TITLE: How to unit test a DAO that is extending SqlMapClientDaoSupport QUESTION: Spring DA helps in writing DAOs. When using iBATIS as the persistence framework, and extending SqlMapClientDaoSupport, a SqlMapClient mock should be set for the DAO, but I can't do it. SqlMapClientTemplate is not an interface and EasyMock...
[ "java", "spring", "ibatis", "easymock" ]
5
1
5,036
4
0
2008-09-21T09:06:52.947000
2008-09-21T10:57:43.243000
110,632
110,670
How do you change the http header information sent in IIS 6
Currently IIS sends an expires http header of yesterday minus 1 hour on ASP.NET pages. How do I change this to 60 seconds in the further instead?
You can also add a content-expires page directive to your ASP.NET page (for different expire schedules): @Outputcache Or you can set the header inside your code (perhaps a base page class): Response.Cache.SetExpires(DateTime.Now.AddSeconds(60)); A good article on caching can be found on MSDN: http://support.microsoft.c...
How do you change the http header information sent in IIS 6 Currently IIS sends an expires http header of yesterday minus 1 hour on ASP.NET pages. How do I change this to 60 seconds in the further instead?
TITLE: How do you change the http header information sent in IIS 6 QUESTION: Currently IIS sends an expires http header of yesterday minus 1 hour on ASP.NET pages. How do I change this to 60 seconds in the further instead? ANSWER: You can also add a content-expires page directive to your ASP.NET page (for different e...
[ "asp.net", "iis" ]
1
3
2,509
2
0
2008-09-21T09:32:15.087000
2008-09-21T09:57:15.680000
110,674
1,734,156
GCC optimization flags for Intel Atom
I'm developing a performance critical application for Intel Atom processor. What are the best gcc optimization flags for this CPU?
GCC 4.5 will contain the -march=atom and -mtune=atom options. Source: http://gcc.gnu.org/gcc-4.5/changes.html
GCC optimization flags for Intel Atom I'm developing a performance critical application for Intel Atom processor. What are the best gcc optimization flags for this CPU?
TITLE: GCC optimization flags for Intel Atom QUESTION: I'm developing a performance critical application for Intel Atom processor. What are the best gcc optimization flags for this CPU? ANSWER: GCC 4.5 will contain the -march=atom and -mtune=atom options. Source: http://gcc.gnu.org/gcc-4.5/changes.html
[ "optimization", "gcc", "intel-atom" ]
28
33
44,447
9
0
2008-09-21T09:59:31.463000
2009-11-14T12:51:30.710000
110,712
110,738
Which Continuous Integration library to use?
I've worked with Cruise Control as the CI framework in my last project. Any recommendations on some other tools? (Not that i found CruiseControl lacking, just wanted to know if someone did some comparisons)
We have had great success with Hudson. It is easy to install and configure, has a great range of plugins and a good web user interface. The checkstyle and cobertura code coverage plugins are two that we use.
Which Continuous Integration library to use? I've worked with Cruise Control as the CI framework in my last project. Any recommendations on some other tools? (Not that i found CruiseControl lacking, just wanted to know if someone did some comparisons)
TITLE: Which Continuous Integration library to use? QUESTION: I've worked with Cruise Control as the CI framework in my last project. Any recommendations on some other tools? (Not that i found CruiseControl lacking, just wanted to know if someone did some comparisons) ANSWER: We have had great success with Hudson. It...
[ "java", "comparison", "continuous-integration", "agile", "cruisecontrol" ]
6
12
1,380
9
0
2008-09-21T10:20:31.537000
2008-09-21T10:33:38.620000
110,736
110,743
What are some good microcontroller development boards to learn the .Net micro framework?
Excluding the Micro Framework Emulator;)
A well known one is Tahoe. Others are http://www.sjjmicro.com/EDK.html http://www.ghielectronics.com/details.php?id=107&sid=108
What are some good microcontroller development boards to learn the .Net micro framework? Excluding the Micro Framework Emulator;)
TITLE: What are some good microcontroller development boards to learn the .Net micro framework? QUESTION: Excluding the Micro Framework Emulator;) ANSWER: A well known one is Tahoe. Others are http://www.sjjmicro.com/EDK.html http://www.ghielectronics.com/details.php?id=107&sid=108
[ ".net", "embedded", ".net-micro-framework" ]
4
3
1,000
3
0
2008-09-21T10:32:00.573000
2008-09-21T10:36:18.723000
110,749
110,769
Regular expression to convert mark down to HTML
How would you write a regular expression to convert mark down into HTML? For example, you would type in the following: This would be *italicized* text and this would be **bold** text This would then need to be converted to: This would be italicized text and this would be bold text Very similar to the mark down edit con...
The best way is to find a version of the Markdown library ported to whatever language you are using (you did not specify in your question). Now that you have clarified that you only want STRONG and EM to be processed, and that you are using C#, I recommend you take a look at Markdown.NET to see how those tags are imple...
Regular expression to convert mark down to HTML How would you write a regular expression to convert mark down into HTML? For example, you would type in the following: This would be *italicized* text and this would be **bold** text This would then need to be converted to: This would be italicized text and this would be ...
TITLE: Regular expression to convert mark down to HTML QUESTION: How would you write a regular expression to convert mark down into HTML? For example, you would type in the following: This would be *italicized* text and this would be **bold** text This would then need to be converted to: This would be italicized text ...
[ "c#", "html", "regex", "markdown" ]
7
6
6,252
4
0
2008-09-21T10:40:42.487000
2008-09-21T11:02:22.233000
110,760
110,936
Report generation
I am writing a web app using TurboGears, and in that app the users must be able to generate different reports. The data the reports need is stored in a database (MySQL). The reports must be returned either as a easily printable html document, or a pdf file. I have previously used jasper and iReport for creating the doc...
You can build some fancy PDFs from Python with the ReportLab toolkit.
Report generation I am writing a web app using TurboGears, and in that app the users must be able to generate different reports. The data the reports need is stored in a database (MySQL). The reports must be returned either as a easily printable html document, or a pdf file. I have previously used jasper and iReport fo...
TITLE: Report generation QUESTION: I am writing a web app using TurboGears, and in that app the users must be able to generate different reports. The data the reports need is stored in a database (MySQL). The reports must be returned either as a easily printable html document, or a pdf file. I have previously used jas...
[ "python", "report" ]
3
2
14,709
3
0
2008-09-21T10:55:46.243000
2008-09-21T12:45:46.277000
110,774
111,084
Re-ordering entries in a model using drag-and-drop
Say I have a blogging app in Django. How can i re-order the posts using a draggable table in the default admin? It would be best if i didn't have to add any extra fields to the model, but if i really have to i can.
For working code to do this, check out snippet 1053 at djangosnippets.org.
Re-ordering entries in a model using drag-and-drop Say I have a blogging app in Django. How can i re-order the posts using a draggable table in the default admin? It would be best if i didn't have to add any extra fields to the model, but if i really have to i can.
TITLE: Re-ordering entries in a model using drag-and-drop QUESTION: Say I have a blogging app in Django. How can i re-order the posts using a draggable table in the default admin? It would be best if i didn't have to add any extra fields to the model, but if i really have to i can. ANSWER: For working code to do this...
[ "javascript", "python", "django" ]
11
6
6,295
6
0
2008-09-21T11:05:29.403000
2008-09-21T13:59:59.357000
110,803
111,091
Dirty fields in django
In my app i need to save changed values (old and new) when model gets saved. Any examples or working code? I need this for premoderation of content. For example, if user changes something in model, then administrator can see all changes in separate table and then decide to apply them or not.
You haven't said very much about your specific use case or needs. In particular, it would be helpful to know what you need to do with the change information (how long do you need to store it?). If you only need to store it for transient purposes, @S.Lott's session solution may be best. If you want a full audit trail of...
Dirty fields in django In my app i need to save changed values (old and new) when model gets saved. Any examples or working code? I need this for premoderation of content. For example, if user changes something in model, then administrator can see all changes in separate table and then decide to apply them or not.
TITLE: Dirty fields in django QUESTION: In my app i need to save changed values (old and new) when model gets saved. Any examples or working code? I need this for premoderation of content. For example, if user changes something in model, then administrator can see all changes in separate table and then decide to apply...
[ "python", "django" ]
39
14
31,145
10
0
2008-09-21T11:27:24.967000
2008-09-21T14:04:00.800000
110,804
984,366
Integrating gyro and accelerometer readings
Possible Duplicate: Combine Gyroscope and Accelerometer Data I have read a number of papers on Kalman filters, but there seem to be few good publically accessible worked examples of getting from mathematical paper to actual working code. I have a system containing a three-axis accelerometer and a single gyro measuring ...
nBot, a two wheel balancing robot Quite a bit of info and links about how this author chose to solve the balance problem for his two wheeled robot.
Integrating gyro and accelerometer readings Possible Duplicate: Combine Gyroscope and Accelerometer Data I have read a number of papers on Kalman filters, but there seem to be few good publically accessible worked examples of getting from mathematical paper to actual working code. I have a system containing a three-axi...
TITLE: Integrating gyro and accelerometer readings QUESTION: Possible Duplicate: Combine Gyroscope and Accelerometer Data I have read a number of papers on Kalman filters, but there seem to be few good publically accessible worked examples of getting from mathematical paper to actual working code. I have a system cont...
[ "signal-processing", "robotics", "gyroscope", "kalman-filter" ]
14
3
18,055
6
0
2008-09-21T11:27:44.967000
2009-06-11T23:45:25.607000
110,814
110,818
Best graphic library for .NET/Mono
I am looking for a high-performance graphic library for.NET and Mono. I have taken a look at Tao framework and, while it is very complete, it's quite lacking in terms of usability. It should be cross-platform compatible. What other alternatives worked for you?
OpenGL would be my choice,.NET bindings exist from many open source wrappers, with OpenGL you're set for cross platform.
Best graphic library for .NET/Mono I am looking for a high-performance graphic library for.NET and Mono. I have taken a look at Tao framework and, while it is very complete, it's quite lacking in terms of usability. It should be cross-platform compatible. What other alternatives worked for you?
TITLE: Best graphic library for .NET/Mono QUESTION: I am looking for a high-performance graphic library for.NET and Mono. I have taken a look at Tao framework and, while it is very complete, it's quite lacking in terms of usability. It should be cross-platform compatible. What other alternatives worked for you? ANSWE...
[ ".net", "graphics", "mono", "cross-platform" ]
6
4
1,744
3
0
2008-09-21T11:37:36.110000
2008-09-21T11:42:26.693000
110,825
110,865
Saving information in "sub" model in CakePHP
I've got a simple CakePHP site (1.2). I've got a page where you can edit and save a Person. So I have a Person model and controller. Each Person has none or more comments, in the comment table. So I have a Comment model, and I have a hasMany association on my Person model to the Comment model. View is working great. My...
I'm not a CakePHP expert, but I still think it would make sense to have your own controller. From what I remember from doing one of those CakePHP blog tutorials is, that you need to link the comments and the post in the comment model. This is some of the code I have from it: class Comment extends AppModel { var $name =...
Saving information in "sub" model in CakePHP I've got a simple CakePHP site (1.2). I've got a page where you can edit and save a Person. So I have a Person model and controller. Each Person has none or more comments, in the comment table. So I have a Comment model, and I have a hasMany association on my Person model to...
TITLE: Saving information in "sub" model in CakePHP QUESTION: I've got a simple CakePHP site (1.2). I've got a page where you can edit and save a Person. So I have a Person model and controller. Each Person has none or more comments, in the comment table. So I have a Comment model, and I have a hasMany association on ...
[ "php", "cakephp", "cakephp-1.2" ]
2
1
1,041
1
0
2008-09-21T11:44:44.597000
2008-09-21T12:12:44.497000
110,833
110,856
Dynamically importing a C++ class from a DLL
What is the correct way to import a C++ class from a DLL? We're using Visual C++. There's the dllexport/exports.def+LoadLibrary+GetProcAddress trifecta, but it doesn't work on C++ classes, only C functions. Is this due to C++ name-mangling? How do I make this work?
Found the solution at http://www.codeproject.com/KB/DLL/XDllPt4.aspx Thanks for your efforts guys & girls
Dynamically importing a C++ class from a DLL What is the correct way to import a C++ class from a DLL? We're using Visual C++. There's the dllexport/exports.def+LoadLibrary+GetProcAddress trifecta, but it doesn't work on C++ classes, only C functions. Is this due to C++ name-mangling? How do I make this work?
TITLE: Dynamically importing a C++ class from a DLL QUESTION: What is the correct way to import a C++ class from a DLL? We're using Visual C++. There's the dllexport/exports.def+LoadLibrary+GetProcAddress trifecta, but it doesn't work on C++ classes, only C functions. Is this due to C++ name-mangling? How do I make th...
[ "c++", "windows", "dll", "import" ]
16
6
30,570
5
0
2008-09-21T11:52:00.290000
2008-09-21T12:06:31.970000
110,855
110,900
Never do anything until you ready to use it, in software too? [Toyota principle]
I was listening to a podcast. Where they talked about principles Toyota was using: Never do anything until you are ready to use it. I think this tells us to look in other places, to learn what other practices have been known for years.
It may apply to software construction, but I am not sure it does apply If we consider the five elements in a " toyota-way of decision making ", based on the principle that "how you arrive at the decision is just as important as the quality of the decision": [mode humour ON] Finding out what is really going on, includin...
Never do anything until you ready to use it, in software too? [Toyota principle] I was listening to a podcast. Where they talked about principles Toyota was using: Never do anything until you are ready to use it. I think this tells us to look in other places, to learn what other practices have been known for years.
TITLE: Never do anything until you ready to use it, in software too? [Toyota principle] QUESTION: I was listening to a podcast. Where they talked about principles Toyota was using: Never do anything until you are ready to use it. I think this tells us to look in other places, to learn what other practices have been kn...
[ "design-patterns", "process", "process-management", "principles" ]
0
3
573
4
0
2008-09-21T12:05:45.357000
2008-09-21T12:28:57.673000
110,858
111,246
In need for a site that explains how to use PHPUnit
I am searching for a tutorial (optimally with Zend Framework) on how to use PHPUnit. I have found a couple on google but have not quiet understood it yet.
What your are looking for is the Pocket Guide. It explaines how to work with PHPUnit from A to Z in several languages. You can read it online or offline, for free, and it's regularly updated.
In need for a site that explains how to use PHPUnit I am searching for a tutorial (optimally with Zend Framework) on how to use PHPUnit. I have found a couple on google but have not quiet understood it yet.
TITLE: In need for a site that explains how to use PHPUnit QUESTION: I am searching for a tutorial (optimally with Zend Framework) on how to use PHPUnit. I have found a couple on google but have not quiet understood it yet. ANSWER: What your are looking for is the Pocket Guide. It explaines how to work with PHPUnit f...
[ "php", "unit-testing", "zend-framework", "phpunit" ]
9
22
6,497
6
0
2008-09-21T12:08:26.850000
2008-09-21T15:41:11.503000
110,867
111,278
Debugging Designer processing in VS 2008
I have a public property set in my form of type ListE where: public class ListE: IList, ICollection, IEnumerable, IList, ICollection, IEnumerable Yeah, it's a mouthful, but that's what the Designer requires for it to show up as an editable collection in the Properties window. Which it does! So, I click the little [..] ...
I can't understand what's motivating you to attempt to reinvent the List wheel in that way, but to answer your question: I would add a line "System.Diagnostics.Debugger.Break()" to the constructor of your class. Then try to use it in the designer, and you'll get a popup asking you if you want to attach a debugger. Atta...
Debugging Designer processing in VS 2008 I have a public property set in my form of type ListE where: public class ListE: IList, ICollection, IEnumerable, IList, ICollection, IEnumerable Yeah, it's a mouthful, but that's what the Designer requires for it to show up as an editable collection in the Properties window. Wh...
TITLE: Debugging Designer processing in VS 2008 QUESTION: I have a public property set in my form of type ListE where: public class ListE: IList, ICollection, IEnumerable, IList, ICollection, IEnumerable Yeah, it's a mouthful, but that's what the Designer requires for it to show up as an editable collection in the Pro...
[ ".net", "winforms", "visual-studio-2008", "designer" ]
2
3
607
3
0
2008-09-21T12:13:44.013000
2008-09-21T15:54:18.210000
110,868
110,967
Never produce to an unknown pathway, in software too? [Toyota principle]
In Toyota manufacturing lines they always know what path a part have traveled. Just so they can be sure they can fix it of something goes wrong. Is this applicable in software too? All error messages should tell me exactly what path they traveled. Some do, the error messages with stack trace. Is this a correct interpre...
A good idea where practicable. Unfortunately, it is usually prohibitively difficult to keep track of the entire history of the state of the machine. You just can't tag each data structure with where you got it from, and the entire state of that object. You might be able to store just the external events and in that way...
Never produce to an unknown pathway, in software too? [Toyota principle] In Toyota manufacturing lines they always know what path a part have traveled. Just so they can be sure they can fix it of something goes wrong. Is this applicable in software too? All error messages should tell me exactly what path they traveled....
TITLE: Never produce to an unknown pathway, in software too? [Toyota principle] QUESTION: In Toyota manufacturing lines they always know what path a part have traveled. Just so they can be sure they can fix it of something goes wrong. Is this applicable in software too? All error messages should tell me exactly what p...
[ "design-patterns", "error-handling", "process", "principles" ]
5
5
449
4
0
2008-09-21T12:13:44.167000
2008-09-21T12:57:24.047000
110,881
120,367
Does Microsoft Robotics Developer Studio work on CE 6?
I have a DSS service I created (For Microsoft Robotics Studio). I then followed the documentation to make it a compact framework service and created a deployment package. I then deploy it to a CE 6 device... Does a MSRS service work on CE 6? The documentation talks about CE 5. What should I see if I run it? I expect to...
Applications can also run directly on PC-based robots running Windows® Vista, Window® XP, Windows® XP Embedded, Windows® Embedded CE 6.0 and Windows Mobile® 6, enabling fully autonomous operation. Taken from this document
Does Microsoft Robotics Developer Studio work on CE 6? I have a DSS service I created (For Microsoft Robotics Studio). I then followed the documentation to make it a compact framework service and created a deployment package. I then deploy it to a CE 6 device... Does a MSRS service work on CE 6? The documentation talks...
TITLE: Does Microsoft Robotics Developer Studio work on CE 6? QUESTION: I have a DSS service I created (For Microsoft Robotics Studio). I then followed the documentation to make it a compact framework service and created a deployment package. I then deploy it to a CE 6 device... Does a MSRS service work on CE 6? The d...
[ "windows-ce", "robotics", "robotics-studio" ]
1
1
333
1
0
2008-09-21T12:20:02.937000
2008-09-23T11:13:58.693000
110,887
110,907
PHP parse configuration ini files
Is there a way to read a module's configuration ini file? For example I installed php-eaccelerator ( http://eaccelerator.net ) and it put a eaccelerator.ini file in /etc/php.d. My PHP installation wont read this.ini file because the --with-config-file-scan-dir option wasn't used when compiling PHP. Is there a way to ma...
This is just a wild guess, but try to add all the directives from eaccelerator.ini to php.ini. First create a and check where it's located. For example, try this: [eAccelerator] extension="eaccelerator.so" eaccelerator.shm_size="32" eaccelerator.cache_dir="/tmp" eaccelerator.enable="1" eaccelerator.optimizer="1" eaccel...
PHP parse configuration ini files Is there a way to read a module's configuration ini file? For example I installed php-eaccelerator ( http://eaccelerator.net ) and it put a eaccelerator.ini file in /etc/php.d. My PHP installation wont read this.ini file because the --with-config-file-scan-dir option wasn't used when c...
TITLE: PHP parse configuration ini files QUESTION: Is there a way to read a module's configuration ini file? For example I installed php-eaccelerator ( http://eaccelerator.net ) and it put a eaccelerator.ini file in /etc/php.d. My PHP installation wont read this.ini file because the --with-config-file-scan-dir option ...
[ "php", "apache" ]
5
4
2,318
3
0
2008-09-21T12:23:40.820000
2008-09-21T12:31:56.730000
110,894
110,955
MySQL transaction with thousands of Inserts - how many "round trips" does it take?
I've got C# code that accesses MySQL through ODBC. It creates a transaction, does a few thousand insert commands, and then commits. Now my question is how many "round trips", so to speak, happen against the DB server? I mean, does it simply transmit every insert command to the DB server, or does it cache/buffer them an...
MySQL has an extended SQL style that can be used, where mass inserts are put in several at a time: INSERT INTO `table` (`id`, `event`) VALUES (1, 94263), (2, 75015), (3, 75015); I will usually collect a few hundred insert-parts into a string before running the SQL query itself. This will reduce the overhead of parsing ...
MySQL transaction with thousands of Inserts - how many "round trips" does it take? I've got C# code that accesses MySQL through ODBC. It creates a transaction, does a few thousand insert commands, and then commits. Now my question is how many "round trips", so to speak, happen against the DB server? I mean, does it sim...
TITLE: MySQL transaction with thousands of Inserts - how many "round trips" does it take? QUESTION: I've got C# code that accesses MySQL through ODBC. It creates a transaction, does a few thousand insert commands, and then commits. Now my question is how many "round trips", so to speak, happen against the DB server? I...
[ "sql", "mysql", "database" ]
12
20
10,549
8
0
2008-09-21T12:26:21.627000
2008-09-21T12:53:21.547000
110,911
129,009
What is the closest thing to Slime for Scheme?
I do most of my development in Common Lisp, but there are some moments when I want to switch to Scheme (while reading Lisp in Small Pieces, when I want to play with continuations, or when I want to do some scripting in Gauche, for example). In such situations, my main source of discomfort is that I don't have Slime (ye...
You also might consider Scheme Complete: http://www.emacswiki.org/cgi-bin/wiki/SchemeComplete It basically provides tab-completion.
What is the closest thing to Slime for Scheme? I do most of my development in Common Lisp, but there are some moments when I want to switch to Scheme (while reading Lisp in Small Pieces, when I want to play with continuations, or when I want to do some scripting in Gauche, for example). In such situations, my main sour...
TITLE: What is the closest thing to Slime for Scheme? QUESTION: I do most of my development in Common Lisp, but there are some moments when I want to switch to Scheme (while reading Lisp in Small Pieces, when I want to play with continuations, or when I want to do some scripting in Gauche, for example). In such situat...
[ "emacs", "lisp", "scheme", "common-lisp", "slime" ]
45
9
14,862
9
0
2008-09-21T12:34:20.890000
2008-09-24T18:41:54.053000
110,920
111,005
Changing Hostname / IP Address of Windows System Mounted as an Image
I'm looking for a way to change the hostname and IP address of a Windows XP system that is mounted via a loop-back image on a Linux system. So basically I have access to the Windows XP system on a file level, but I cannot execute any programs on it. A way similar to editing the /etc/hostname and whatever network config...
You can use chntpw tool to edit Windows registry offline. Here's an example of how to use it. The keys you're looking for are these: HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\ComputerName\ComputerName HKEY_LOCAL_MACHINE\SYSTEM\Current Control Set\ Services\Tcpip\Parameters\Interfaces\{ } Under your interface's G...
Changing Hostname / IP Address of Windows System Mounted as an Image I'm looking for a way to change the hostname and IP address of a Windows XP system that is mounted via a loop-back image on a Linux system. So basically I have access to the Windows XP system on a file level, but I cannot execute any programs on it. A...
TITLE: Changing Hostname / IP Address of Windows System Mounted as an Image QUESTION: I'm looking for a way to change the hostname and IP address of a Windows XP system that is mounted via a loop-back image on a Linux system. So basically I have access to the Windows XP system on a file level, but I cannot execute any...
[ "windows", "system-administration" ]
3
5
3,072
1
0
2008-09-21T12:37:59.040000
2008-09-21T13:19:41.887000
110,924
110,962
XNA Game Studio 3D model editor suggestions
I want to create basic low-poly 3D models to use in XNA Game Studio games. What cheap/free tools do people recommend? And does anyone have any links or snippets of code that show how to load 3D models of some sort into XNA and then draw them on the screen?
Take a look at trueSpace also, its just become free - but as Evil Activity stated; Blender is also a good sugestion i just never really got use to its interface and how to do stuff. trueSpace is a little more easy in that way, but i think that blender is more powerful. I guess you know http://creators.xna.com/, there i...
XNA Game Studio 3D model editor suggestions I want to create basic low-poly 3D models to use in XNA Game Studio games. What cheap/free tools do people recommend? And does anyone have any links or snippets of code that show how to load 3D models of some sort into XNA and then draw them on the screen?
TITLE: XNA Game Studio 3D model editor suggestions QUESTION: I want to create basic low-poly 3D models to use in XNA Game Studio games. What cheap/free tools do people recommend? And does anyone have any links or snippets of code that show how to load 3D models of some sort into XNA and then draw them on the screen? ...
[ "3d", "xna", "modeling" ]
10
7
8,502
6
0
2008-09-21T12:40:06.693000
2008-09-21T12:55:18.703000
110,926
111,004
Read divert sockets in java?
If I was to create a ipfw divert rule to forward all FTP traffic to a specific socket, is it possible to use Java to connect to the socekt and read the packet information? If so, how would i go about reading/writing to the scoket?
not sure what you mean. If you're using a divert rule, then all you have to do is listen on that ip:port combination in your java app and you're all set. If you want to read the actual destination endpoint information, you'll need to use JNI for that.
Read divert sockets in java? If I was to create a ipfw divert rule to forward all FTP traffic to a specific socket, is it possible to use Java to connect to the socekt and read the packet information? If so, how would i go about reading/writing to the scoket?
TITLE: Read divert sockets in java? QUESTION: If I was to create a ipfw divert rule to forward all FTP traffic to a specific socket, is it possible to use Java to connect to the socekt and read the packet information? If so, how would i go about reading/writing to the scoket? ANSWER: not sure what you mean. If you're...
[ "java", "ftp", "tcp", "ipfw" ]
0
0
333
3
0
2008-09-21T12:41:08.813000
2008-09-21T13:19:29.533000
110,928
111,009
Is there a valid reason for enforcing a maximum width of 80 characters in a code file, this day and age?
Seriously. On a 22" monitor, it only covers maybe a quarter of the screen. I need some ammo to axe down this rule. I'm not saying that there shouldn't be a limit; I'm just saying, 80 characters is very small.
I think the practice of keeping code to 80 (or 79) columns was originally created to support people editing code on 80-column dumb terminals or on 80-column printouts. Those requirement have mostly gone away now, but there are still valid reasons to keep the 80 column rule: To avoid wrapping when copying code into emai...
Is there a valid reason for enforcing a maximum width of 80 characters in a code file, this day and age? Seriously. On a 22" monitor, it only covers maybe a quarter of the screen. I need some ammo to axe down this rule. I'm not saying that there shouldn't be a limit; I'm just saying, 80 characters is very small.
TITLE: Is there a valid reason for enforcing a maximum width of 80 characters in a code file, this day and age? QUESTION: Seriously. On a 22" monitor, it only covers maybe a quarter of the screen. I need some ammo to axe down this rule. I'm not saying that there shouldn't be a limit; I'm just saying, 80 characters is ...
[ "text-editor", "coding-style", "policy" ]
183
291
62,409
32
0
2008-09-21T12:43:03.973000
2008-09-21T13:21:48.187000
110,933
110,939
How should I choose between GET and POST methods in HTML forms?
I wish to know all the pros and cons about using these two methods. In particular the implications on web security. Thanks.
To choose between them I use this simple rule: GET for reads. (reading data and displaying it) POST for anything that writes (i.e updating a database table, deleting an entry, etc.) The other consideration is that GET is subjected to the maximum URI length and of course can't handle file uploads. This page has a good s...
How should I choose between GET and POST methods in HTML forms? I wish to know all the pros and cons about using these two methods. In particular the implications on web security. Thanks.
TITLE: How should I choose between GET and POST methods in HTML forms? QUESTION: I wish to know all the pros and cons about using these two methods. In particular the implications on web security. Thanks. ANSWER: To choose between them I use this simple rule: GET for reads. (reading data and displaying it) POST for a...
[ "html", "http" ]
23
41
8,434
17
0
2008-09-21T12:45:04.607000
2008-09-21T12:48:01.747000
110,973
110,978
ZX Spectrum AY-3-8912 playback in XNA Game Studio
Are there any libraries, pieces of code or suchlike that'll let me play ZX Spectrum.ay files in my XNA Game Studio games?
If you need sound in XNA, and want XBOX 360 support you need to use the supported file formats. You are properbly better of by trying to convert the.ay files to a format that XNA natively support. If you only want to support Windows, then search for a.NET Library that can play them, it will work in XNA on windows if it...
ZX Spectrum AY-3-8912 playback in XNA Game Studio Are there any libraries, pieces of code or suchlike that'll let me play ZX Spectrum.ay files in my XNA Game Studio games?
TITLE: ZX Spectrum AY-3-8912 playback in XNA Game Studio QUESTION: Are there any libraries, pieces of code or suchlike that'll let me play ZX Spectrum.ay files in my XNA Game Studio games? ANSWER: If you need sound in XNA, and want XBOX 360 support you need to use the supported file formats. You are properbly better ...
[ "xna", "sinclair", "zxspectrum" ]
3
0
674
3
0
2008-09-21T13:01:48.750000
2008-09-21T13:05:26.010000
111,007
305,934
flex webservice client
Has anybody any useful links that can be used to consume a web service using flex? The easier the solution the better Thanks
Try http://livedocs.adobe.com/flex/3/langref/mx/rpc/soap/mxml/WebService.html for SOAP services. You just have to specify the WSDL location and the event handlers and call the service. Flex Builder 3 also contains code generation capabilities for creating proxies for web services. http://livedocs.adobe.com/flex/3/html/...
flex webservice client Has anybody any useful links that can be used to consume a web service using flex? The easier the solution the better Thanks
TITLE: flex webservice client QUESTION: Has anybody any useful links that can be used to consume a web service using flex? The easier the solution the better Thanks ANSWER: Try http://livedocs.adobe.com/flex/3/langref/mx/rpc/soap/mxml/WebService.html for SOAP services. You just have to specify the WSDL location and t...
[ "apache-flex", "web-services" ]
3
2
3,166
4
0
2008-09-21T13:19:50.373000
2008-11-20T16:32:20.630000
111,023
111,078
How to get a full call stack in Visual Studio 2005?
How can I get a full call stack for a c++ application developed with Visual Studio 2005? I would like to have a full call stack including the code in the system libraries. Do I have to change some settings in Visual Studio, or do I have to install additional software?
Get debug information for all project dependencies. This is specified under the "Configuration Properties -> C/C++ -> General" section of the project properties. On the menu, go to "Tools -> Options" then select "Debugging -> Symbols". Add a new symbol location (the folder icon) that points to Microsoft's free symbol s...
How to get a full call stack in Visual Studio 2005? How can I get a full call stack for a c++ application developed with Visual Studio 2005? I would like to have a full call stack including the code in the system libraries. Do I have to change some settings in Visual Studio, or do I have to install additional software?
TITLE: How to get a full call stack in Visual Studio 2005? QUESTION: How can I get a full call stack for a c++ application developed with Visual Studio 2005? I would like to have a full call stack including the code in the system libraries. Do I have to change some settings in Visual Studio, or do I have to install ad...
[ "c++", "visual-studio", "debugging", "callstack", "visual-c++-2005" ]
4
6
3,070
3
0
2008-09-21T13:32:12.310000
2008-09-21T13:56:27.790000
111,031
111,076
Comparison between Centralized and Distributed Version Control Systems
What are the benefits and drawbacks with using Centralized versus Distributed Version Control Systems (DVCS)? Have you run into any problems in DVCS and how did you safeguard against these problems? Keep the discussion tool agnostic and flaming to minimum. For those wondering what DVCS tools are available, here is a li...
From my answer to a different question: Distributed version control systems (DVCSs) solve different problems than Centralized VCSs. Comparing them is like comparing hammers and screwdrivers. Centralized VCS systems are designed with the intent that there is One True Source that is Blessed, and therefore Good. All devel...
Comparison between Centralized and Distributed Version Control Systems What are the benefits and drawbacks with using Centralized versus Distributed Version Control Systems (DVCS)? Have you run into any problems in DVCS and how did you safeguard against these problems? Keep the discussion tool agnostic and flaming to m...
TITLE: Comparison between Centralized and Distributed Version Control Systems QUESTION: What are the benefits and drawbacks with using Centralized versus Distributed Version Control Systems (DVCS)? Have you run into any problems in DVCS and how did you safeguard against these problems? Keep the discussion tool agnosti...
[ "version-control", "comparison", "dvcs" ]
79
58
67,681
15
0
2008-09-21T13:36:45.700000
2008-09-21T13:55:21.117000
111,071
4,519,445
How do I convert legacy ASP applications to ASP.NET?
We have a large ASP (classic ASP) application and we would like to convert it to.NET in order to work on further releases. It makes no sense continuing to use ASP as it is obsolete, and we don't want to rewrite it from scratch (Joel Spolsky tells you why ). Is there a way to convert it from ASP to ASP.NET automatically...
Well, I used to work for the company where all web apps were classic ASP. When decision was made to move to.NET we had to find a way to transform 168(!) web apps into this new framework. I tried all the tools available at the time to do this and all failed. Best way is to build a new web server and start there from scr...
How do I convert legacy ASP applications to ASP.NET? We have a large ASP (classic ASP) application and we would like to convert it to.NET in order to work on further releases. It makes no sense continuing to use ASP as it is obsolete, and we don't want to rewrite it from scratch (Joel Spolsky tells you why ). Is there ...
TITLE: How do I convert legacy ASP applications to ASP.NET? QUESTION: We have a large ASP (classic ASP) application and we would like to convert it to.NET in order to work on further releases. It makes no sense continuing to use ASP as it is obsolete, and we don't want to rewrite it from scratch (Joel Spolsky tells yo...
[ "asp.net", "asp-classic", "code-conversion" ]
18
13
52,586
4
0
2008-09-21T13:53:30.933000
2010-12-23T14:07:22.420000
111,097
111,137
Shut-down script on Windows to delete a registry key?
EDIT: This was formerly more explicitly titled: - " Best solution to stop Kontiki's KHOST.EXE from loading automatically at start-up on Windows XP? " Essentially, whenever the 40D application is run it sets up khost.exe to automatically start-up with Windows. This is annoying as it increases my boot up time by a couple...
for the vb script you would use something like this: Dim WSHShell Set WSHShell = WScript.CreateObject("WScript.Shell") 'repeat the line below for each key to delete WSHShell.RegDelete "[Location of Key]" Just drop the code into a text file and re-name it something like shutdown,vbs. As for when to run it, if you are in...
Shut-down script on Windows to delete a registry key? EDIT: This was formerly more explicitly titled: - " Best solution to stop Kontiki's KHOST.EXE from loading automatically at start-up on Windows XP? " Essentially, whenever the 40D application is run it sets up khost.exe to automatically start-up with Windows. This i...
TITLE: Shut-down script on Windows to delete a registry key? QUESTION: EDIT: This was formerly more explicitly titled: - " Best solution to stop Kontiki's KHOST.EXE from loading automatically at start-up on Windows XP? " Essentially, whenever the 40D application is run it sets up khost.exe to automatically start-up wi...
[ "windows", "batch-file", "scripting", "registry" ]
3
1
6,753
5
0
2008-09-21T14:07:24.253000
2008-09-21T14:37:49.003000
111,102
111,111
How do JavaScript closures work?
How would you explain JavaScript closures to someone with a knowledge of the concepts they consist of (for example functions, variables and the like), but does not understand closures themselves? I have seen the Scheme example given on Wikipedia, but unfortunately it did not help.
A closure is a pairing of: A function and A reference to that function's outer scope (lexical environment) A lexical environment is part of every execution context (stack frame) and is a map between identifiers (i.e. local variable names) and values. Every function in JavaScript maintains a reference to its outer lexic...
How do JavaScript closures work? How would you explain JavaScript closures to someone with a knowledge of the concepts they consist of (for example functions, variables and the like), but does not understand closures themselves? I have seen the Scheme example given on Wikipedia, but unfortunately it did not help.
TITLE: How do JavaScript closures work? QUESTION: How would you explain JavaScript closures to someone with a knowledge of the concepts they consist of (for example functions, variables and the like), but does not understand closures themselves? I have seen the Scheme example given on Wikipedia, but unfortunately it d...
[ "javascript", "function", "variables", "scope", "closures" ]
7,619
8,339
1,622,580
86
0
2008-09-21T14:12:07.003000
2008-09-21T14:18:18.347000
111,129
111,179
Is querying the MySQL information_schema database a good way to find related tables?
I have a table which is referenced by foreign keys on many other tables. In my program if I want to delete one of these rows I need to first search for dependencies and present them to the user - "This object depends on x from table y, z from table q, etc". I also expect the number of tables which have foreign keys to ...
Dvorak is right, INFORMATION_SCHEMA is intended for that. Concerning your performance concerns, there are several ways you can improve the performance Easy way, but not much improvement will come from it: Store the info in a static variable. At least the query will occur only once per page Use persistent caching: The a...
Is querying the MySQL information_schema database a good way to find related tables? I have a table which is referenced by foreign keys on many other tables. In my program if I want to delete one of these rows I need to first search for dependencies and present them to the user - "This object depends on x from table y,...
TITLE: Is querying the MySQL information_schema database a good way to find related tables? QUESTION: I have a table which is referenced by foreign keys on many other tables. In my program if I want to delete one of these rows I need to first search for dependencies and present them to the user - "This object depends ...
[ "mysql" ]
8
4
3,083
6
0
2008-09-21T14:33:59.650000
2008-09-21T15:01:25.840000
111,135
111,153
Can .Net 3.5 apps run on machines that have .Net 2.0 runtime installed?
I write my app in VS 2008 and so use all the fanciful stuffs such as LINQ, object initializers etc. Now can my app run on machines that have only.Net 2.0 runtime, but no.Net 3.5 runtime?.Net 3.5 runtime is a huge download, as all of you might know.
What you can use is for example the var keyword, auto-getters and auto-setters, object initializers. I.e. syntactic sugar that is compiled to 2.0 code. What you can't use is functionality that resides in.Net framework 3.0 and 3.5 library. For example LINQ. You can try for yourself what you can and can't use by setting ...
Can .Net 3.5 apps run on machines that have .Net 2.0 runtime installed? I write my app in VS 2008 and so use all the fanciful stuffs such as LINQ, object initializers etc. Now can my app run on machines that have only.Net 2.0 runtime, but no.Net 3.5 runtime?.Net 3.5 runtime is a huge download, as all of you might know.
TITLE: Can .Net 3.5 apps run on machines that have .Net 2.0 runtime installed? QUESTION: I write my app in VS 2008 and so use all the fanciful stuffs such as LINQ, object initializers etc. Now can my app run on machines that have only.Net 2.0 runtime, but no.Net 3.5 runtime?.Net 3.5 runtime is a huge download, as all ...
[ ".net" ]
3
9
3,481
8
0
2008-09-21T14:37:10.203000
2008-09-21T14:42:31.517000
111,181
111,185
Is there a tool to monitor the SQL statements being executed by an .EXE?
I'd like to be able to hook into a 3rd party application to see what SQL Statements are being executed. Specifically, it is a VB6 application running on SQL Server 2005. For example, when the application fills out a grid, I'd like to be able to see exactly what query produced that data.
If you have the appropriate rights (sysadmin or ALTER TRACE permission) on the DB you could watch using SQL Profiler.
Is there a tool to monitor the SQL statements being executed by an .EXE? I'd like to be able to hook into a 3rd party application to see what SQL Statements are being executed. Specifically, it is a VB6 application running on SQL Server 2005. For example, when the application fills out a grid, I'd like to be able to se...
TITLE: Is there a tool to monitor the SQL statements being executed by an .EXE? QUESTION: I'd like to be able to hook into a 3rd party application to see what SQL Statements are being executed. Specifically, it is a VB6 application running on SQL Server 2005. For example, when the application fills out a grid, I'd lik...
[ "sql-server", "sql-server-2005", "vb6", "monitoring" ]
5
12
820
4
0
2008-09-21T15:03:18.643000
2008-09-21T15:05:28.407000
111,194
111,221
How do I determine when there is no more data to read in a NetworkStream?
I have a web app which connects to a server using a TCP connection and reads a binary document which it then writes to its response object. In other words it's transferring a file from a backend server using a custom protocol and returning that file to its client through HTTP. The server sends a status code and a mime ...
I would use the OutputStream directly with a general-purpose function. With the Stream, you can control Flush. public void WriteDocument(HttpResponse response) { StreamCopy(response.OutputStream, stream_); response.End(); } public static void StreamCopy(Stream dest, Stream src) { byte[] buffer = new byte[4 * 1024]; in...
How do I determine when there is no more data to read in a NetworkStream? I have a web app which connects to a server using a TCP connection and reads a binary document which it then writes to its response object. In other words it's transferring a file from a backend server using a custom protocol and returning that f...
TITLE: How do I determine when there is no more data to read in a NetworkStream? QUESTION: I have a web app which connects to a server using a TCP connection and reads a binary document which it then writes to its response object. In other words it's transferring a file from a backend server using a custom protocol an...
[ "c#", "networkstream" ]
3
3
3,486
4
0
2008-09-21T15:10:21.140000
2008-09-21T15:24:12.290000
111,203
207,043
How can I make a Enso style application in C#
The background should be transparent, but the text should not.
Enso is open source too. You can directly peek at they source code. http://code.google.com/p/enso/ Let us know how they do it when you find out!. UPDATE It looks like they use something called Cairo. If you can link it from C# you're done.
How can I make a Enso style application in C# The background should be transparent, but the text should not.
TITLE: How can I make a Enso style application in C# QUESTION: The background should be transparent, but the text should not. ANSWER: Enso is open source too. You can directly peek at they source code. http://code.google.com/p/enso/ Let us know how they do it when you find out!. UPDATE It looks like they use somethin...
[ "c#", "winforms", "windows-xp" ]
0
0
429
3
0
2008-09-21T15:18:33.507000
2008-10-16T00:48:39.553000
111,234
111,255
What is a "callable"?
Now that it's clear what a metaclass is, there is an associated concept that I use all the time without knowing what it really means. I suppose everybody made once a mistake with parenthesis, resulting in an "object is not callable" exception. What's more, using __init__ and __new__ lead to wonder what this bloody __ca...
A callable is anything that can be called. The built-in callable (PyCallable_Check in objects.c) checks if the argument is either: an instance of a class with a __call__ method or is of a type that has a non null tp_call (c struct) member which indicates callability otherwise (such as in functions, methods etc.) The me...
What is a "callable"? Now that it's clear what a metaclass is, there is an associated concept that I use all the time without knowing what it really means. I suppose everybody made once a mistake with parenthesis, resulting in an "object is not callable" exception. What's more, using __init__ and __new__ lead to wonder...
TITLE: What is a "callable"? QUESTION: Now that it's clear what a metaclass is, there is an associated concept that I use all the time without knowing what it really means. I suppose everybody made once a mistake with parenthesis, resulting in an "object is not callable" exception. What's more, using __init__ and __ne...
[ "python", "callable" ]
368
360
348,832
13
0
2008-09-21T15:34:32.720000
2008-09-21T15:44:22.697000
111,263
111,443
Where can I find an .xsd file to provide intellisense for Castle Windsor?
I'm looking for an.xsd schema file to drop into my Visual Studio directory to provide intellisense for the xml configuration file for the Castle Windsor IoC container. I've looked in the downloaded code for Windsor, as well as googled several different ways. I see many people asking the same question, but no answers. A...
Perhaps this is what you are looking for: http://jimblogdog.blogspot.com/2008/05/castlewindsor-schema-enables-visual.html Here is the link to download the castle windsor schema: http://www.projectdistributor.net/Releases/Release.aspx?releaseId=427 Good Luck!
Where can I find an .xsd file to provide intellisense for Castle Windsor? I'm looking for an.xsd schema file to drop into my Visual Studio directory to provide intellisense for the xml configuration file for the Castle Windsor IoC container. I've looked in the downloaded code for Windsor, as well as googled several dif...
TITLE: Where can I find an .xsd file to provide intellisense for Castle Windsor? QUESTION: I'm looking for an.xsd schema file to drop into my Visual Studio directory to provide intellisense for the xml configuration file for the Castle Windsor IoC container. I've looked in the downloaded code for Windsor, as well as g...
[ ".net", "visual-studio", "inversion-of-control", "castle-windsor" ]
10
2
1,496
2
0
2008-09-21T15:47:46.383000
2008-09-21T17:15:57.063000
111,281
151,123
VMware server 1.0.7 modules incompatible with kernel 2.6.26 -- patched, where to submit?
VMware server 1.0.7 installed with vmware-package Debian GNU/Linux testing (lenny) Kernel 2.6.26-1-686 There were several compile problems when trying to build the binary kernel modules from the vmware-server-kernel-source package made by vmware-package from the VMware server tarball. Recently VMware has updated their ...
I wrote a support request to VMware, and they assured me that my patch will reach the VMware server team.
VMware server 1.0.7 modules incompatible with kernel 2.6.26 -- patched, where to submit? VMware server 1.0.7 installed with vmware-package Debian GNU/Linux testing (lenny) Kernel 2.6.26-1-686 There were several compile problems when trying to build the binary kernel modules from the vmware-server-kernel-source package ...
TITLE: VMware server 1.0.7 modules incompatible with kernel 2.6.26 -- patched, where to submit? QUESTION: VMware server 1.0.7 installed with vmware-package Debian GNU/Linux testing (lenny) Kernel 2.6.26-1-686 There were several compile problems when trying to build the binary kernel modules from the vmware-server-kern...
[ "linux", "vmware", "kernel", "debian" ]
0
0
1,496
6
0
2008-09-21T15:56:00.577000
2008-09-29T23:07:34.800000
111,285
111,338
Using SQLITE with VB6
I am currently using an MSAccess mdb file for a redistributable app. A while ago I found out about SQLite, as an alternative to my solution, but the binaries they provide do not offer the possiblilty of using them as an object in VB6. (Or at least I couldn't figure it out how). Does anyone has a link, or could write a ...
Here is a link with code examples: http://www.freevbcode.com/ShowCode.asp?ID=6893
Using SQLITE with VB6 I am currently using an MSAccess mdb file for a redistributable app. A while ago I found out about SQLite, as an alternative to my solution, but the binaries they provide do not offer the possiblilty of using them as an object in VB6. (Or at least I couldn't figure it out how). Does anyone has a l...
TITLE: Using SQLITE with VB6 QUESTION: I am currently using an MSAccess mdb file for a redistributable app. A while ago I found out about SQLite, as an alternative to my solution, but the binaries they provide do not offer the possiblilty of using them as an object in VB6. (Or at least I couldn't figure it out how). D...
[ "database", "sqlite", "vb6", "ado" ]
12
4
34,011
7
0
2008-09-21T15:57:56
2008-09-21T16:18:24.797000
111,287
111,305
Multiple Tables in a TClientDataset?
Is it possible to put the results from more than one query on more than one table into a TClientDataset? Just something like SELECT * from t1; SELECT * from t2; SELECT * from t3; I can't seem to figure out a way to get a data provider (SetProvider) to pull in results from more than one table at a time.
There is not a way to have multiple table data in the same TClientDataSet like you referenced. The TClientDataSet holds a single cursor for a single dataset.
Multiple Tables in a TClientDataset? Is it possible to put the results from more than one query on more than one table into a TClientDataset? Just something like SELECT * from t1; SELECT * from t2; SELECT * from t3; I can't seem to figure out a way to get a data provider (SetProvider) to pull in results from more than ...
TITLE: Multiple Tables in a TClientDataset? QUESTION: Is it possible to put the results from more than one query on more than one table into a TClientDataset? Just something like SELECT * from t1; SELECT * from t2; SELECT * from t3; I can't seem to figure out a way to get a data provider (SetProvider) to pull in resul...
[ "database", "delphi", "sqlite", "tclientdataset" ]
1
0
5,108
3
0
2008-09-21T15:59:07.543000
2008-09-21T16:05:47.433000
111,302
111,306
Best content type to serve JSONP?
I have a webservice that when called without specifying a callback will return a JSON string using application/json as the content type. When a callback is specified it will wrap the JSON string in a callback function, so it's not really valid JSON anymore. My question is, should I serve it as application/javascript in...
Use application/javascript. In that way, clients can rely on the content-type without having to manually check whether a response has padding or not.
Best content type to serve JSONP? I have a webservice that when called without specifying a callback will return a JSON string using application/json as the content type. When a callback is specified it will wrap the JSON string in a callback function, so it's not really valid JSON anymore. My question is, should I ser...
TITLE: Best content type to serve JSONP? QUESTION: I have a webservice that when called without specifying a callback will return a JSON string using application/json as the content type. When a callback is specified it will wrap the JSON string in a callback function, so it's not really valid JSON anymore. My questio...
[ "javascript", "json", "jsonp" ]
122
147
52,435
2
0
2008-09-21T16:04:53.007000
2008-09-21T16:06:43.453000
111,307
127,831
What's "P=NP?", and why is it such a famous question?
The question of whether P=NP is perhaps the most famous in all of Computer Science. What does it mean? And why is it so interesting? Oh, and for extra credit, please post a proof of the statement's truth or falsehood.:)
P stands for polynomial time. NP stands for non-deterministic polynomial time. Definitions: Polynomial time means that the complexity of the algorithm is O(n^k), where n is the size of your data (e. g. number of elements in a list to be sorted), and k is a constant. Complexity is time measured in the number of operatio...
What's "P=NP?", and why is it such a famous question? The question of whether P=NP is perhaps the most famous in all of Computer Science. What does it mean? And why is it so interesting? Oh, and for extra credit, please post a proof of the statement's truth or falsehood.:)
TITLE: What's "P=NP?", and why is it such a famous question? QUESTION: The question of whether P=NP is perhaps the most famous in all of Computer Science. What does it mean? And why is it so interesting? Oh, and for extra credit, please post a proof of the statement's truth or falsehood.:) ANSWER: P stands for polyno...
[ "computer-science", "theory", "complexity-theory", "np-complete", "p-np" ]
272
418
175,040
6
0
2008-09-21T16:07:07.960000
2008-09-24T15:20:00.857000
111,318
111,354
How to convert legacy Interbase DB to SQL Server?
I have an Interbase DB. How can I convert it to SQL Server?
You could use SQL Server built in Data Transformation Services (DTS) in SQL Server 2000 or SQL Server Integration Services (SSIS) in SQL Server 2005. Try setting up an ODBC DSN for Interbase. Then in DTS / SSIS use the Other (ODBC Data Source) and the DSN. If that does not work then see if Interbase has a utility to ex...
How to convert legacy Interbase DB to SQL Server? I have an Interbase DB. How can I convert it to SQL Server?
TITLE: How to convert legacy Interbase DB to SQL Server? QUESTION: I have an Interbase DB. How can I convert it to SQL Server? ANSWER: You could use SQL Server built in Data Transformation Services (DTS) in SQL Server 2000 or SQL Server Integration Services (SSIS) in SQL Server 2005. Try setting up an ODBC DSN for In...
[ "sql-server", "database", "interbase" ]
3
4
9,244
4
0
2008-09-21T16:10:00.950000
2008-09-21T16:25:21.257000
111,330
111,564
What are some ADFS alternatives for doing single sign on for an ASP.NET app with users in active directory?
Needs to be secure and able to handle thousands of users.
Check out ADAM and AzMan. ADAM is Active Directory Application Mode. There is a how-to guide at: http://msdn.microsoft.com/en-us/library/ms998331.aspx AzMan is Authorization Manager. There is a how-to guide at: http://msdn.microsoft.com/en-us/library/ms998336.aspx
What are some ADFS alternatives for doing single sign on for an ASP.NET app with users in active directory? Needs to be secure and able to handle thousands of users.
TITLE: What are some ADFS alternatives for doing single sign on for an ASP.NET app with users in active directory? QUESTION: Needs to be secure and able to handle thousands of users. ANSWER: Check out ADAM and AzMan. ADAM is Active Directory Application Mode. There is a how-to guide at: http://msdn.microsoft.com/en-u...
[ "asp.net", "active-directory", "single-sign-on" ]
1
2
4,360
2
0
2008-09-21T16:14:48.287000
2008-09-21T18:06:20.343000
111,331
111,917
Getting Arduino LilyPad to switch BlueSmirf v2.11 to/from command mode
A battery powered (2 x AA) Arduino LilyPad should switch a BlueSmirf v2.11 Bluetooth modem to/from command mode (see source code below). The BlueSmirf has been set to 9600 baud. If the PC connects via Bluetooth (see source code below), the Arduino program runs fine at the beginning (sending multiple "ping\n"). After so...
From the datasheet, page 6: NOTE1: You can enter command mode locally over the serial port at any time when not connected. Once a connection is made, you can only enter command mode if the config timer has not expired. To enable continuous configuration, set the config timer to 255. Also, if the device is in Auto Maste...
Getting Arduino LilyPad to switch BlueSmirf v2.11 to/from command mode A battery powered (2 x AA) Arduino LilyPad should switch a BlueSmirf v2.11 Bluetooth modem to/from command mode (see source code below). The BlueSmirf has been set to 9600 baud. If the PC connects via Bluetooth (see source code below), the Arduino p...
TITLE: Getting Arduino LilyPad to switch BlueSmirf v2.11 to/from command mode QUESTION: A battery powered (2 x AA) Arduino LilyPad should switch a BlueSmirf v2.11 Bluetooth modem to/from command mode (see source code below). The BlueSmirf has been set to 9600 baud. If the PC connects via Bluetooth (see source code bel...
[ "bluetooth", "arduino" ]
2
1
2,058
1
0
2008-09-21T16:14:59.860000
2008-09-21T20:00:23.097000
111,341
111,413
Combine multiple results in a subquery into a single comma-separated value
I've got two tables: TableA ------ ID, Name TableB ------ ID, SomeColumn, TableA_ID (FK for TableA) The relationship is one row of TableA - many of TableB. Now, I want to see a result like this: ID Name SomeColumn 1. ABC X, Y, Z (these are three different rows) 2. MNO R, S This won't work (multiple results in a subqu...
1. Create the UDF: CREATE FUNCTION CombineValues ( @FK_ID INT -- The foreign key from TableA which is used -- to fetch corresponding records ) RETURNS VARCHAR(8000) AS BEGIN DECLARE @SomeColumnList VARCHAR(8000); SELECT @SomeColumnList = COALESCE(@SomeColumnList + ', ', '') + CAST(SomeColumn AS varchar(20)) FROM Table...
Combine multiple results in a subquery into a single comma-separated value I've got two tables: TableA ------ ID, Name TableB ------ ID, SomeColumn, TableA_ID (FK for TableA) The relationship is one row of TableA - many of TableB. Now, I want to see a result like this: ID Name SomeColumn 1. ABC X, Y, Z (these are thr...
TITLE: Combine multiple results in a subquery into a single comma-separated value QUESTION: I've got two tables: TableA ------ ID, Name TableB ------ ID, SomeColumn, TableA_ID (FK for TableA) The relationship is one row of TableA - many of TableB. Now, I want to see a result like this: ID Name SomeColumn 1. ABC X, Y...
[ "sql-server", "t-sql", "join" ]
85
45
154,470
10
0
2008-09-21T16:19:50.007000
2008-09-21T17:02:14.943000
111,345
112,711
Getting image dimensions without reading the entire file
Is there a cheap way to get the dimensions of an image (jpg, png,...)? Preferably, I would like to achieve this using only the standard class library (because of hosting restrictions). I know that it should be relatively easy to read the image header and parse it myself, but it seems that something like this should be ...
Your best bet as always is to find a well tested library. However, you said that is difficult, so here is some dodgy largely untested code that should work for a fair number of cases: using System; using System.Collections.Generic; using System.Drawing; using System.IO; using System.Linq; namespace ImageDimensions { p...
Getting image dimensions without reading the entire file Is there a cheap way to get the dimensions of an image (jpg, png,...)? Preferably, I would like to achieve this using only the standard class library (because of hosting restrictions). I know that it should be relatively easy to read the image header and parse it...
TITLE: Getting image dimensions without reading the entire file QUESTION: Is there a cheap way to get the dimensions of an image (jpg, png,...)? Preferably, I would like to achieve this using only the standard class library (because of hosting restrictions). I know that it should be relatively easy to read the image h...
[ "c#", ".net", "image", "image-manipulation" ]
119
117
92,077
10
0
2008-09-21T16:21:20.580000
2008-09-22T00:55:05.320000
111,348
111,408
What XNA based 3D terrain and physics libraries exist?
I'm planning on creating a game that contains a landscape with objects on it. The landscape will be defined using a heightfield, and the objects will move about on top of, and fly over the terrain. If you've ever played the old games Marble Madness and Virus/Zarch, that's the kind of complexity and style I'm trying to ...
Here is a more complete list, Xbox, Zune and Windows... Farseer - 2d only. JigLibX Bullet BulletX XBAP Oops! 3D Physics Framework Bepu physics Jello Physics Physics2D.Net Windows Only... PhysX MS Robotics Studio wrapper PhysXdotNet Wrapper ODE (Open Dyamics Engine) XPA (XNA Physics lib) Newton Game Dynamics Newton Phys...
What XNA based 3D terrain and physics libraries exist? I'm planning on creating a game that contains a landscape with objects on it. The landscape will be defined using a heightfield, and the objects will move about on top of, and fly over the terrain. If you've ever played the old games Marble Madness and Virus/Zarch,...
TITLE: What XNA based 3D terrain and physics libraries exist? QUESTION: I'm planning on creating a game that contains a landscape with objects on it. The landscape will be defined using a heightfield, and the objects will move about on top of, and fly over the terrain. If you've ever played the old games Marble Madnes...
[ "c#", "xna", "physics" ]
9
8
8,546
4
0
2008-09-21T16:23:28.343000
2008-09-21T16:59:45.900000
111,363
111,550
Redirect to different controller
I have some code in an IAuthorizationFilter which redirects the user to a login page but I'm having trouble changing the controller which is used. So I might do public void OnAuthorization(AuthorizationContext context) { UserController u = new UserController(); context.Result = u.Login(); context.Cancel = true; } But t...
Agree with ddc0660, you should be redirecting. Don't run u.Login(), but rather set context.Result to a RedirectResult.
Redirect to different controller I have some code in an IAuthorizationFilter which redirects the user to a login page but I'm having trouble changing the controller which is used. So I might do public void OnAuthorization(AuthorizationContext context) { UserController u = new UserController(); context.Result = u.Login(...
TITLE: Redirect to different controller QUESTION: I have some code in an IAuthorizationFilter which redirects the user to a login page but I'm having trouble changing the controller which is used. So I might do public void OnAuthorization(AuthorizationContext context) { UserController u = new UserController(); context...
[ "asp.net-mvc" ]
4
2
10,807
1
0
2008-09-21T16:33:09.833000
2008-09-21T17:57:24.997000
111,387
111,400
How to stream binary data to standard output in .NET?
I'm trying to stream binary data to the standard output in.NET. However you can only write char using the Console class. I want to use it with redirection. Is there a way to do this?
You can access the output stream using Console.OpenStandardOutput. static void Main(string[] args) { MemoryStream data = new MemoryStream(Encoding.UTF8.GetBytes("Some data")); using (Stream console = Console.OpenStandardOutput()) { data.CopyTo(console); } }
How to stream binary data to standard output in .NET? I'm trying to stream binary data to the standard output in.NET. However you can only write char using the Console class. I want to use it with redirection. Is there a way to do this?
TITLE: How to stream binary data to standard output in .NET? QUESTION: I'm trying to stream binary data to the standard output in.NET. However you can only write char using the Console class. I want to use it with redirection. Is there a way to do this? ANSWER: You can access the output stream using Console.OpenStand...
[ ".net", "interop" ]
4
6
2,579
1
0
2008-09-21T16:45:17.150000
2008-09-21T16:52:28.070000
111,388
258,629
Recommendations for a google finance-like interactive chart control
I need some sort of interactive chart control for my.NET-based web app. I have some wide XY charts, and the user should be able to interactively scroll and zoom into a specific window on the x axis. Something that acts similar to the google finance control would be nice, but without the need for the date labels or the ...
You could try out Flotr, a nice javascript library. It has pretty decent mouse controls and is free to use.
Recommendations for a google finance-like interactive chart control I need some sort of interactive chart control for my.NET-based web app. I have some wide XY charts, and the user should be able to interactively scroll and zoom into a specific window on the x axis. Something that acts similar to the google finance con...
TITLE: Recommendations for a google finance-like interactive chart control QUESTION: I need some sort of interactive chart control for my.NET-based web app. I have some wide XY charts, and the user should be able to interactively scroll and zoom into a specific window on the x axis. Something that acts similar to the ...
[ ".net", "charts", "google-finance" ]
12
5
18,440
12
0
2008-09-21T16:45:20.990000
2008-11-03T13:34:44.243000
111,389
111,518
Best way to add tests to an existing Rails project?
I have a Rails project which I neglected to build tests for (for shame!) and the code base has gotten pretty large. A friend of mine said that RSpec was a pain to use unless you use it from the beginning. Is this true? What would make him say that? So, considering the available tests suites and the fact that the code b...
This question came up recently on the RSpec mailing list, and the advice we generally gave was: Don't bother trying to retro-fit specs to existing, working, code unless you're going to change it - it's exhausting and, unless the code needs to be changed, rather pointless. Start writing specs for any changes you make fr...
Best way to add tests to an existing Rails project? I have a Rails project which I neglected to build tests for (for shame!) and the code base has gotten pretty large. A friend of mine said that RSpec was a pain to use unless you use it from the beginning. Is this true? What would make him say that? So, considering the...
TITLE: Best way to add tests to an existing Rails project? QUESTION: I have a Rails project which I neglected to build tests for (for shame!) and the code base has gotten pretty large. A friend of mine said that RSpec was a pain to use unless you use it from the beginning. Is this true? What would make him say that? S...
[ "ruby-on-rails", "ruby", "testing" ]
17
23
2,887
6
0
2008-09-21T16:46:29.037000
2008-09-21T17:43:33.267000
111,390
111,649
Should domain objects and simple JavaBeans be unit tested?
Should simple JavaBeans that have only simple getters and setters be unit tested?? What about Beans with some logic in getters and setters?
You should not write tests which: Test the language or the IDE (i.e. automatically generated getters and setters) Add no value to your test harness and kill your enthusiasm for Unit Testing The same applies for.NET objects which only have properties (sometimes called 'Info' objects). In an ideal world you would have 10...
Should domain objects and simple JavaBeans be unit tested? Should simple JavaBeans that have only simple getters and setters be unit tested?? What about Beans with some logic in getters and setters?
TITLE: Should domain objects and simple JavaBeans be unit tested? QUESTION: Should simple JavaBeans that have only simple getters and setters be unit tested?? What about Beans with some logic in getters and setters? ANSWER: You should not write tests which: Test the language or the IDE (i.e. automatically generated g...
[ "java", "unit-testing" ]
12
25
5,147
11
0
2008-09-21T16:46:50.783000
2008-09-21T18:33:34.647000
111,391
111,399
Is it a problem if multiple different accepting sockets use the same OpenSSL context?
Is it OK if the same OpenSSL context is used by several different accepting sockets? In particular I'm using the same boost::asio::ssl::context with 2 different listening sockets.
Yep, SSL_CTX--which I believe is the underlying data structure--is just a global data structure used by your program. From ssl(3): SSL_CTX (SSL Context) That's the global context structure which is created by a server or client once per program life-time and which holds mainly default values for the SSL structures whic...
Is it a problem if multiple different accepting sockets use the same OpenSSL context? Is it OK if the same OpenSSL context is used by several different accepting sockets? In particular I'm using the same boost::asio::ssl::context with 2 different listening sockets.
TITLE: Is it a problem if multiple different accepting sockets use the same OpenSSL context? QUESTION: Is it OK if the same OpenSSL context is used by several different accepting sockets? In particular I'm using the same boost::asio::ssl::context with 2 different listening sockets. ANSWER: Yep, SSL_CTX--which I belie...
[ "c++", "ssl", "openssl", "boost-asio" ]
1
2
723
2
0
2008-09-21T16:47:18.207000
2008-09-21T16:51:31.613000
111,405
111,506
Miktex on Windows Vista
I have some problems with Miktex installed on Windows Vista Business SP1/32 bit. I use miktex 2.7, ghostscript, and texniccenter 1 beta 7.50. When I compile a document with the following profiles: Latex=>DVI, Latex=>PDF everything works fine; the system crashes when I compile with profiles Latex=>PS and Latex=>PS=>PDF....
If everything you need is images, you could still compile directly to PDF. You only need to have an image in PNG or JPG format, and use the following code: %in the document preamble \usepackage{graphicx} %in the document, in the place where you want to put your image \includegraphics{image_filename_without_extension} ...
Miktex on Windows Vista I have some problems with Miktex installed on Windows Vista Business SP1/32 bit. I use miktex 2.7, ghostscript, and texniccenter 1 beta 7.50. When I compile a document with the following profiles: Latex=>DVI, Latex=>PDF everything works fine; the system crashes when I compile with profiles Latex...
TITLE: Miktex on Windows Vista QUESTION: I have some problems with Miktex installed on Windows Vista Business SP1/32 bit. I use miktex 2.7, ghostscript, and texniccenter 1 beta 7.50. When I compile a document with the following profiles: Latex=>DVI, Latex=>PDF everything works fine; the system crashes when I compile w...
[ "windows-vista", "crash", "miktex" ]
0
1
1,368
2
0
2008-09-21T16:57:07.763000
2008-09-21T17:35:57.077000
111,407
1,157,294
How do you fix the flickering that occurs when you use slideToggle in jQuery?
I have a simple unordered list that I want to show and hide on click using the jQuery slideUp and slideDown effect. Everything seems to work fine, however in IE6 the list will slide up, flicker for a split second, and then disappear. Does anyone know of a fix for this? Thanks!
Apologies for the extra comment (I can't upvote or comment on Pavel's answer), but adding a DOCTYPE fixed this issue for me, and the slideUp/Down/Toggle effects now work correctly in IE7. See A List Apart for more information on DOCTYPES, or you can try specifying the fairly lenient 4/Transitional:
How do you fix the flickering that occurs when you use slideToggle in jQuery? I have a simple unordered list that I want to show and hide on click using the jQuery slideUp and slideDown effect. Everything seems to work fine, however in IE6 the list will slide up, flicker for a split second, and then disappear. Does any...
TITLE: How do you fix the flickering that occurs when you use slideToggle in jQuery? QUESTION: I have a simple unordered list that I want to show and hide on click using the jQuery slideUp and slideDown effect. Everything seems to work fine, however in IE6 the list will slide up, flicker for a split second, and then d...
[ "javascript", "jquery" ]
12
22
26,255
10
0
2008-09-21T16:57:53.160000
2009-07-21T04:20:40.020000
111,410
111,423
How to configure asp.net process to run under a domain account?
I would like to configure asp.net process to run under an account with domain credentials. My requirement is to access some files on a network share. What are the steps for this? Is there any built-in account I can use?
Check this article from MSDN. How To: Create a Service Account for an ASP.NET 2.0 Application This How To shows you how to create and configure a custom least-privileged service account to run an ASP.NET Web application. By default, an ASP.NET application on Microsoft Windows Server 2003 and IIS 6.0 runs using the buil...
How to configure asp.net process to run under a domain account? I would like to configure asp.net process to run under an account with domain credentials. My requirement is to access some files on a network share. What are the steps for this? Is there any built-in account I can use?
TITLE: How to configure asp.net process to run under a domain account? QUESTION: I would like to configure asp.net process to run under an account with domain credentials. My requirement is to access some files on a network share. What are the steps for this? Is there any built-in account I can use? ANSWER: Check thi...
[ ".net", "asp.net", "iis-6" ]
6
9
3,918
1
0
2008-09-21T17:00:27.037000
2008-09-21T17:06:16.103000
111,411
111,438
"Information Not Found" page in Visual Studio 2008, VB.NET Express Edition
I'm experimenting with VS 2008 Express edition and when I hit f1 on a keyword or class name I seem to get the Information Not Found page more than 90% of the time. Is this a configuration problem? Is it because this is the "free-as-in-beer" Express edition? Did Microsoft move their online documentation since the versio...
Keep in mind that the full MSDN Library for Visual Studio is massive - at the current time it is 2GB - so for this reason it's offered as a separate download. There appears to be an abriged version which is 300MB, although I would suggest that you'd see the "Information Not Available" message every now and then with th...
"Information Not Found" page in Visual Studio 2008, VB.NET Express Edition I'm experimenting with VS 2008 Express edition and when I hit f1 on a keyword or class name I seem to get the Information Not Found page more than 90% of the time. Is this a configuration problem? Is it because this is the "free-as-in-beer" Expr...
TITLE: "Information Not Found" page in Visual Studio 2008, VB.NET Express Edition QUESTION: I'm experimenting with VS 2008 Express edition and when I hit f1 on a keyword or class name I seem to get the Information Not Found page more than 90% of the time. Is this a configuration problem? Is it because this is the "fre...
[ "vb.net", "visual-studio", "documentation" ]
0
2
1,382
3
0
2008-09-21T17:00:32.967000
2008-09-21T17:13:59.547000
111,415
111,479
Strange call stack, could it be problem in asio's usage of openssl?
I have this strange call stack and I am stumped to understand why. It seems to me that asio calls open ssl's read and then gets a negative return value (-37). Asio seems to then try to use it inside the memcpy function. The function that causes this call stack is used hunderds of thousands of times without this error. ...
A quick look at evp_lib.c shows that it tries to pull a length from the cipher context, and in your case gets a Very Bad Value(tm). It then uses this value to copy a string (which does the memcpy). My guess is something is trashing your cipher, be it a thread safety problem, or a reading more bytes into a buffer than a...
Strange call stack, could it be problem in asio's usage of openssl? I have this strange call stack and I am stumped to understand why. It seems to me that asio calls open ssl's read and then gets a negative return value (-37). Asio seems to then try to use it inside the memcpy function. The function that causes this ca...
TITLE: Strange call stack, could it be problem in asio's usage of openssl? QUESTION: I have this strange call stack and I am stumped to understand why. It seems to me that asio calls open ssl's read and then gets a negative return value (-37). Asio seems to then try to use it inside the memcpy function. The function t...
[ "c++", "boost", "ssl", "openssl", "boost-asio" ]
1
2
618
1
0
2008-09-21T17:02:35.863000
2008-09-21T17:27:34.117000
111,426
111,861
Did you apply computational complexity theory in real life?
I'm taking a course in computational complexity and have so far had an impression that it won't be of much help to a developer. I might be wrong but if you have gone down this path before, could you please provide an example of how the complexity theory helped you in your work? Tons of thanks.
O(1): Plain code without loops. Just flows through. Lookups in a lookup table are O(1), too. O(log(n)): efficiently optimized algorithms. Example: binary tree algorithms and binary search. Usually doesn't hurt. You're lucky if you have such an algorithm at hand. O(n): a single loop over data. Hurts for very large n. O(...
Did you apply computational complexity theory in real life? I'm taking a course in computational complexity and have so far had an impression that it won't be of much help to a developer. I might be wrong but if you have gone down this path before, could you please provide an example of how the complexity theory helped...
TITLE: Did you apply computational complexity theory in real life? QUESTION: I'm taking a course in computational complexity and have so far had an impression that it won't be of much help to a developer. I might be wrong but if you have gone down this path before, could you please provide an example of how the comple...
[ "theory", "complexity-theory" ]
25
51
5,146
14
0
2008-09-21T17:08:28
2008-09-21T19:41:53.577000
111,436
116,010
How can I get the Subversion revision number in PHP?
I want to have my PHP application labeled with the revision number which it uses, but I don't want to use CruiseControl or update a file and upload it every time. How should I do it?
SVN keywords is not a good solution. As others pointed out adding $Revision$ in a file only affects the specific file, which may not change for a long time. Remembering to "edit" a file (by adding or removing a blank line) before every commit is pointless. You could as well just type the revision by hand. One good way ...
How can I get the Subversion revision number in PHP? I want to have my PHP application labeled with the revision number which it uses, but I don't want to use CruiseControl or update a file and upload it every time. How should I do it?
TITLE: How can I get the Subversion revision number in PHP? QUESTION: I want to have my PHP application labeled with the revision number which it uses, but I don't want to use CruiseControl or update a file and upload it every time. How should I do it? ANSWER: SVN keywords is not a good solution. As others pointed ou...
[ "php", "svn", "revision" ]
31
53
32,748
13
0
2008-09-21T17:13:35.163000
2008-09-22T16:44:40.390000
111,440
111,482
How can I detect, using php, if the machine has oracle (oci8 and/or pdo_oci) installed?
How can I detect, using php, if the machine has oracle (oci8 and/or pdo_oci) installed? I'm working on a PHP project where some developers, such as myself, have it installed, but there's little need for the themers to have it. How can I write a quick function to use in the code so that my themers are able to work on th...
if the oci extension isn't installed, then you'll get a fatal error with farside.myopenid.com's answer, you can use function_exists('oci_connect') or extension_loaded('oci8') (or whatever the extension's actually called)
How can I detect, using php, if the machine has oracle (oci8 and/or pdo_oci) installed? How can I detect, using php, if the machine has oracle (oci8 and/or pdo_oci) installed? I'm working on a PHP project where some developers, such as myself, have it installed, but there's little need for the themers to have it. How c...
TITLE: How can I detect, using php, if the machine has oracle (oci8 and/or pdo_oci) installed? QUESTION: How can I detect, using php, if the machine has oracle (oci8 and/or pdo_oci) installed? I'm working on a PHP project where some developers, such as myself, have it installed, but there's little need for the themers...
[ "php", "oracle" ]
6
5
9,290
4
0
2008-09-21T17:14:17.143000
2008-09-21T17:28:06.567000
111,460
111,549
.Net 8-bit Encoding
I'm working on serial port, transmitting and receiving data to some hardware at 8bit data. I would like to store it as string to facilitate comparison, and preset data are stored as string or hex format in xml file. I found out that only when using Encoding.Default which is ANSI encoding then the 8bit data is converted...
Latin-1 aka ISO-8859-1 aka codepage 28591 is a useful codepage for this scenario, as it maps values in the range 128-255 unchanged. The following are interchangeable: Encoding.GetEncoding(28591) Encoding.GetEncoding("Latin1") Encoding.GetEncoding("iso-8859-1") The following code illustrates the fact that for Latin1, un...
.Net 8-bit Encoding I'm working on serial port, transmitting and receiving data to some hardware at 8bit data. I would like to store it as string to facilitate comparison, and preset data are stored as string or hex format in xml file. I found out that only when using Encoding.Default which is ANSI encoding then the 8b...
TITLE: .Net 8-bit Encoding QUESTION: I'm working on serial port, transmitting and receiving data to some hardware at 8bit data. I would like to store it as string to facilitate comparison, and preset data are stored as string or hex format in xml file. I found out that only when using Encoding.Default which is ANSI en...
[ ".net", "encoding" ]
8
19
8,125
5
0
2008-09-21T17:21:19.623000
2008-09-21T17:56:18.370000
111,461
111,493
Auto-implemented getters and setters vs. public fields
I see a lot of example code for C# classes that does this: public class Point { public int x { get; set; } public int y { get; set; } } Or, in older code, the same with an explicit private backing value and without the new auto-implemented properties: public class Point { private int _x; private int _y; public int x {...
I tend to agree (that it seems needlessly verbose), although this has been an issue our team hasn't yet resolved and so our coding standards still insist on verbose properties for all classes. Jeff Atwood dealt with this a few years ago. The most important point he retrospectively noted is that changing from a field to...
Auto-implemented getters and setters vs. public fields I see a lot of example code for C# classes that does this: public class Point { public int x { get; set; } public int y { get; set; } } Or, in older code, the same with an explicit private backing value and without the new auto-implemented properties: public class ...
TITLE: Auto-implemented getters and setters vs. public fields QUESTION: I see a lot of example code for C# classes that does this: public class Point { public int x { get; set; } public int y { get; set; } } Or, in older code, the same with an explicit private backing value and without the new auto-implemented propert...
[ "c#", "oop", "properties", "field" ]
80
53
41,618
17
0
2008-09-21T17:22:23.490000
2008-09-21T17:29:26.907000
111,478
111,531
Why is it wrong to use std::auto_ptr<> with standard containers?
Why is it wrong to use std::auto_ptr<> with standard containers?
The C++ Standard says that an STL element must be "copy-constructible" and "assignable." In other words, an element must be able to be assigned or copied and the two elements are logically independent. std::auto_ptr does not fulfill this requirement. Take for example this code: class X { }; std::vector > vecX; vecX.pu...
Why is it wrong to use std::auto_ptr<> with standard containers? Why is it wrong to use std::auto_ptr<> with standard containers?
TITLE: Why is it wrong to use std::auto_ptr<> with standard containers? QUESTION: Why is it wrong to use std::auto_ptr<> with standard containers? ANSWER: The C++ Standard says that an STL element must be "copy-constructible" and "assignable." In other words, an element must be able to be assigned or copied and the t...
[ "c++", "stl", "raii", "auto-ptr", "c++-faq" ]
227
126
49,799
6
0
2008-09-21T17:27:28.360000
2008-09-21T17:47:35.863000
111,504
111,592
Error creating UDF in SQL Server 2005
I'm trying to create a UDF in SQL Server 2005 Express as below: CREATE FUNCTION [CombineValues] () RETURNS VARCHAR(8000) AS BEGIN DECLARE @CuisineList VARCHAR(8000); RETURN ( SELECT @CuisineList = COALESCE(@CuisineList + ', ', '') + CAST(Cuisine AS varchar(20)) FROM Cuisines ) END Cuisines has the structure: CuisineI...
This answer is from the original poster, Wild Thing. Please do not vote it up or down. CREATE FUNCTION [CombineValues] () RETURNS VARCHAR(8000) AS BEGIN DECLARE @CuisineList VARCHAR(8000); SELECT @CuisineList = COALESCE(@CuisineList + ', ', '') + CAST(Cuisine AS varchar(20)) FROM Cuisines; RETURN ( SELECT @CuisineLi...
Error creating UDF in SQL Server 2005 I'm trying to create a UDF in SQL Server 2005 Express as below: CREATE FUNCTION [CombineValues] () RETURNS VARCHAR(8000) AS BEGIN DECLARE @CuisineList VARCHAR(8000); RETURN ( SELECT @CuisineList = COALESCE(@CuisineList + ', ', '') + CAST(Cuisine AS varchar(20)) FROM Cuisines ) EN...
TITLE: Error creating UDF in SQL Server 2005 QUESTION: I'm trying to create a UDF in SQL Server 2005 Express as below: CREATE FUNCTION [CombineValues] () RETURNS VARCHAR(8000) AS BEGIN DECLARE @CuisineList VARCHAR(8000); RETURN ( SELECT @CuisineList = COALESCE(@CuisineList + ', ', '') + CAST(Cuisine AS varchar(20)) ...
[ "sql-server", "user-defined-functions", "coalesce" ]
0
0
467
4
0
2008-09-21T17:35:52.100000
2008-09-21T18:17:49.083000
111,517
111,582
How can I automatically add properties in Objective-C?
When adding new properties to classes, I find myself typing the same things over and over in xcode: add TYPE *NAME; (in.h interface) add @property (nonatomic, retain) TYPE *NAME; (in.h) add @synthesize NAME; (in.m) add [NAME release]; (in.m dealloc) (I'm in a non-garbage collected environment.) How can I do this automa...
That sounds about right. IIRC, the Objective-C 2.0 doc says you might be able to leave out step #1, but otherwise I don't know of any shortcuts. You could probably write a user script to do so within Xcode. See http://www.mactech.com/articles/mactech/Vol.23/23.01/2301XCode/index.html.
How can I automatically add properties in Objective-C? When adding new properties to classes, I find myself typing the same things over and over in xcode: add TYPE *NAME; (in.h interface) add @property (nonatomic, retain) TYPE *NAME; (in.h) add @synthesize NAME; (in.m) add [NAME release]; (in.m dealloc) (I'm in a non-g...
TITLE: How can I automatically add properties in Objective-C? QUESTION: When adding new properties to classes, I find myself typing the same things over and over in xcode: add TYPE *NAME; (in.h interface) add @property (nonatomic, retain) TYPE *NAME; (in.h) add @synthesize NAME; (in.m) add [NAME release]; (in.m deallo...
[ "objective-c", "properties" ]
2
1
632
5
0
2008-09-21T17:42:44.097000
2008-09-21T18:15:20.633000
111,529
111,545
How to create query parameters in Javascript?
Is there any way to create the query parameters for doing a GET request in JavaScript? Just like in Python you have urllib.urlencode(), which takes in a dictionary (or list of two tuples) and creates a string like 'var1=value1&var2=value2'.
Here you go: function encodeQueryData(data) { const ret = []; for (let d in data) ret.push(encodeURIComponent(d) + '=' + encodeURIComponent(data[d])); return ret.join('&'); } Usage: const data = { 'first name': 'George', 'last name': 'Jetson', 'age': 110 }; const querystring = encodeQueryData(data);
How to create query parameters in Javascript? Is there any way to create the query parameters for doing a GET request in JavaScript? Just like in Python you have urllib.urlencode(), which takes in a dictionary (or list of two tuples) and creates a string like 'var1=value1&var2=value2'.
TITLE: How to create query parameters in Javascript? QUESTION: Is there any way to create the query parameters for doing a GET request in JavaScript? Just like in Python you have urllib.urlencode(), which takes in a dictionary (or list of two tuples) and creates a string like 'var1=value1&var2=value2'. ANSWER: Here y...
[ "javascript", "url", "urlencode" ]
220
232
254,720
18
0
2008-09-21T17:46:39.423000
2008-09-21T17:53:45.457000
111,551
111,692
Listview icons show up blurry (C#)
I'm attempting to display a "LargeIcon" view in a listview control, however the images I specify are blurry. This is what I have so far: alt text http://img220.imageshack.us/img220/1005/blurryiconsql3.jpg The.png files are 48x48 and that's what I have it set to display at in the ImageList properties. There's one thing ...
When adding a.PNG Icon format size the editor tends to pick the first entry size in that file, so it picks up the 16x16 entry and it's stretching that out. That's why you see the 16x16 in the properties there. As suggested, the support for PNG is poor, I'm often found myself rolling over to another format as well to av...
Listview icons show up blurry (C#) I'm attempting to display a "LargeIcon" view in a listview control, however the images I specify are blurry. This is what I have so far: alt text http://img220.imageshack.us/img220/1005/blurryiconsql3.jpg The.png files are 48x48 and that's what I have it set to display at in the Image...
TITLE: Listview icons show up blurry (C#) QUESTION: I'm attempting to display a "LargeIcon" view in a listview control, however the images I specify are blurry. This is what I have so far: alt text http://img220.imageshack.us/img220/1005/blurryiconsql3.jpg The.png files are 48x48 and that's what I have it set to displ...
[ "c#", "listview", "imagelist", "blurry" ]
4
3
7,232
5
0
2008-09-21T17:57:45.043000
2008-09-21T18:47:22.350000
111,558
111,816
Lots of unnecessary frameworks load into my iPhone app - can I prevent this?
There appear to be a lot of unnecessary frameworks loading into my iPhone app. I didn't link against them in Xcode, and I don't need them. When I run "lsof -p" against them on the iPhone, I see these (and others) that I can't explain: CoreVideo AddressBookUI JavaScriptCore MobileSync EAP8021X BluetoothManager MusicLibr...
This is normal, but that doesn't mean it's ideal. It probably only has a small impact on app startup time, but it'll have a slightly greater impact than that on memory usage. If you'd like this to be improved, the best thing to do is to head on over to Apple's bug reporter and file a bug about it. Attach a copy of your...
Lots of unnecessary frameworks load into my iPhone app - can I prevent this? There appear to be a lot of unnecessary frameworks loading into my iPhone app. I didn't link against them in Xcode, and I don't need them. When I run "lsof -p" against them on the iPhone, I see these (and others) that I can't explain: CoreVide...
TITLE: Lots of unnecessary frameworks load into my iPhone app - can I prevent this? QUESTION: There appear to be a lot of unnecessary frameworks loading into my iPhone app. I didn't link against them in Xcode, and I don't need them. When I run "lsof -p" against them on the iPhone, I see these (and others) that I can't...
[ "iphone", "objective-c" ]
1
2
640
2
0
2008-09-21T18:04:32
2008-09-21T19:26:56.547000
111,568
111,637
YouTube embeds not working in WordPress after import from Blogger
I imported a series of blogger posts (via xml) into WordPress, and the YouTube embed tags were removed. YouTube URLs in posts are not identified. Instead, just the text of the url is left. Possibly as opposed to full embed tags. I'm trying to restore the embed codes so it's seen. Another fact that is notable in the XML...
This all really depends on HOW you imported the blog posts. What was your method? When you view the raw source of the posts in wordpress (plain text view) - what does the post look like (a copy of the HTML would be nice) -- Note - edit your original post to give the answers, a reply doesn't really work if other people ...
YouTube embeds not working in WordPress after import from Blogger I imported a series of blogger posts (via xml) into WordPress, and the YouTube embed tags were removed. YouTube URLs in posts are not identified. Instead, just the text of the url is left. Possibly as opposed to full embed tags. I'm trying to restore the...
TITLE: YouTube embeds not working in WordPress after import from Blogger QUESTION: I imported a series of blogger posts (via xml) into WordPress, and the YouTube embed tags were removed. YouTube URLs in posts are not identified. Instead, just the text of the url is left. Possibly as opposed to full embed tags. I'm try...
[ "xml", "wordpress", "import", "youtube", "blogs" ]
2
0
3,241
5
0
2008-09-21T18:09:24.627000
2008-09-21T18:29:57.383000
111,576
111,598
When the bots attack!
What are some popular spam prevention methods besides CAPTCHA?
I have tried doing 'honeypots' where you put a field and then hide it with CSS (marking it as 'leave blank' for anyone with stylesheets disabled) but I have found that a lot of bots are able to get past it very quickly. There are also techniques like setting fields to a certain value and changing them with JS, calculat...
When the bots attack! What are some popular spam prevention methods besides CAPTCHA?
TITLE: When the bots attack! QUESTION: What are some popular spam prevention methods besides CAPTCHA? ANSWER: I have tried doing 'honeypots' where you put a field and then hide it with CSS (marking it as 'leave blank' for anyone with stylesheets disabled) but I have found that a lot of bots are able to get past it ve...
[ "security", "captcha", "spam-prevention", "bots" ]
26
23
4,394
27
0
2008-09-21T18:13:11.713000
2008-09-21T18:18:53.620000
111,578
111,581
What are some GUI clients available for Mercurial?
Also, where would I find them?
Tortoise HG. All the tortoise goodness, now for Mercurial. UPDATE july 2020: The original official website linked above is abandoned. The project moved to: https://foss.heptapod.net/mercurial/tortoisehg/thg
What are some GUI clients available for Mercurial? Also, where would I find them?
TITLE: What are some GUI clients available for Mercurial? QUESTION: Also, where would I find them? ANSWER: Tortoise HG. All the tortoise goodness, now for Mercurial. UPDATE july 2020: The original official website linked above is abandoned. The project moved to: https://foss.heptapod.net/mercurial/tortoisehg/thg
[ "version-control", "mercurial" ]
33
31
35,294
9
0
2008-09-21T18:13:46.317000
2008-09-21T18:14:37.453000
111,597
111,617
Conditions when finally does not execute in a .NET try-finally block
Basically I’ve heard that certain conditions will cause.NET to blow past the finally block. Does anyone know what those conditions are?
Two possibilities: StackOverflowException ExecutionEngineException The finally block will not be executed when there's a StackOverflowException since there's no room on the stack to even execute any more code. It will also not be called when there's an ExecutionEngineException, which may arise from a call to Environmen...
Conditions when finally does not execute in a .NET try-finally block Basically I’ve heard that certain conditions will cause.NET to blow past the finally block. Does anyone know what those conditions are?
TITLE: Conditions when finally does not execute in a .NET try-finally block QUESTION: Basically I’ve heard that certain conditions will cause.NET to blow past the finally block. Does anyone know what those conditions are? ANSWER: Two possibilities: StackOverflowException ExecutionEngineException The finally block wil...
[ ".net", "exception" ]
53
57
16,138
7
0
2008-09-21T18:18:36.693000
2008-09-21T18:23:38.617000
111,603
111,865
How to capture PCM data from Wave Out
How would it be possible to capture the audio programmatically? I am implementing an application that streams in real time the desktop on the network. The video part is finished. I need to implement the audio part. I need a way to get PCM data from the sound card to feed to my encoder (implemented using Windows Media F...
I don't think there is a direct way to do this using the OS - it's a feature that may (or may not) be present on the sound card. Some sound cards have a loopback interface - Creative calls it "What U Hear". You simply select this as the input rather than the microphone, and record from it using the normal waveInOpen() ...
How to capture PCM data from Wave Out How would it be possible to capture the audio programmatically? I am implementing an application that streams in real time the desktop on the network. The video part is finished. I need to implement the audio part. I need a way to get PCM data from the sound card to feed to my enco...
TITLE: How to capture PCM data from Wave Out QUESTION: How would it be possible to capture the audio programmatically? I am implementing an application that streams in real time the desktop on the network. The video part is finished. I need to implement the audio part. I need a way to get PCM data from the sound card ...
[ "windows", "winapi", "audio", "directshow" ]
4
4
2,963
2
0
2008-09-21T18:19:30.543000
2008-09-21T19:43:16.677000
111,605
111,625
What kind of prefix do you use for member variables?
No doubt, it's essential for understanding code to give member variables a prefix so that they can easily be distinguished from "normal" variables. But what kind of prefix do you use? I have been working on projects where we used m_ as prefix, on other projects we used an underscore only (which I personally don't like,...
No doubt, it's essential for understanding code to give member variables a prefix so that they can easily be distinguished from "normal" variables. I dispute this claim. It's not the least bit necessary if you have half-decent syntax highlighting. A good IDE can let you write your code in readable English, and can show...
What kind of prefix do you use for member variables? No doubt, it's essential for understanding code to give member variables a prefix so that they can easily be distinguished from "normal" variables. But what kind of prefix do you use? I have been working on projects where we used m_ as prefix, on other projects we us...
TITLE: What kind of prefix do you use for member variables? QUESTION: No doubt, it's essential for understanding code to give member variables a prefix so that they can easily be distinguished from "normal" variables. But what kind of prefix do you use? I have been working on projects where we used m_ as prefix, on ot...
[ "coding-style", "naming-conventions", "member", "naming", "prefix" ]
36
56
31,745
33
0
2008-09-21T18:19:58.670000
2008-09-21T18:25:28.987000
111,629
111,660
How do you store your code and files for use across machines
I am interested to know what strategies people have to keep their code AND work versioned across multiple machines. For example I have a desktop PC running XP, a macbook running OSX and VMWare running XP as well as a sales laptop for running product demos. I want to know how I can always have these in sync. Subversion ...
Like others have said, subversion is your best bet for code. For binary files/non-code, I find DropBox to be very convenient. It stores revisions, has undelete, easy sharing, etc. basically an automagic, web-friendly SVN. Not having to think about it is the biggest plus for me.
How do you store your code and files for use across machines I am interested to know what strategies people have to keep their code AND work versioned across multiple machines. For example I have a desktop PC running XP, a macbook running OSX and VMWare running XP as well as a sales laptop for running product demos. I ...
TITLE: How do you store your code and files for use across machines QUESTION: I am interested to know what strategies people have to keep their code AND work versioned across multiple machines. For example I have a desktop PC running XP, a macbook running OSX and VMWare running XP as well as a sales laptop for running...
[ "operating-system", "versioning" ]
7
8
500
10
0
2008-09-21T18:27:36.110000
2008-09-21T18:38:16.490000
111,630
111,661
Using the Window API, how do I ensure controls retain a native appearance?
Some of the controls I've created seem to default to the old Windows 95 theme, how do I prevent this? Here's an example of a button that does not retain the Operating System's native appearance (I'm using Vista as my development environment): HWND button = CreateWindowEx(NULL, L"BUTTON", L"OK", WS_VISIBLE | WS_CHILD | ...
I believe it has got nothing to do with your code, but you need to set up a proper manifest file to get the themed controls. Some info here: @msdn.com and here: @blogs.msdn.com You can see a difference between application with and without manifest here: heaventools.com
Using the Window API, how do I ensure controls retain a native appearance? Some of the controls I've created seem to default to the old Windows 95 theme, how do I prevent this? Here's an example of a button that does not retain the Operating System's native appearance (I'm using Vista as my development environment): HW...
TITLE: Using the Window API, how do I ensure controls retain a native appearance? QUESTION: Some of the controls I've created seem to default to the old Windows 95 theme, how do I prevent this? Here's an example of a button that does not retain the Operating System's native appearance (I'm using Vista as my developmen...
[ "c++", "winapi", "user-interface", "appearance" ]
4
4
725
2
0
2008-09-21T18:27:49.697000
2008-09-21T18:39:05.193000
111,631
111,648
Visual Studio Solutions / Multiple project : How to effectively propagate project properties amongst several C++ projects
I am working with a Visual Studio 2005 C++ solution that includes multiple projects (about 30). Based upon my experience, it often becomes annoying to maintain all the properties of the projects (i.e include path, lib path, linked libs, code generation options,...), as you often have to click each and every project in ...
I think you need to investigate properties files, i.e. *.vsprops (older) or *.props (latest) You do need to add the properties file manually to each project, but once that's done, you have multiple projects, but one.[vs]props file. If you change the properties, all projects inherit the new settings.
Visual Studio Solutions / Multiple project : How to effectively propagate project properties amongst several C++ projects I am working with a Visual Studio 2005 C++ solution that includes multiple projects (about 30). Based upon my experience, it often becomes annoying to maintain all the properties of the projects (i....
TITLE: Visual Studio Solutions / Multiple project : How to effectively propagate project properties amongst several C++ projects QUESTION: I am working with a Visual Studio 2005 C++ solution that includes multiple projects (about 30). Based upon my experience, it often becomes annoying to maintain all the properties o...
[ "visual-studio", "projects-and-solutions" ]
41
32
20,517
5
0
2008-09-21T18:28:21.583000
2008-09-21T18:32:40.373000
111,643
111,646
What happens on deserialization with this?
I'm currently convering my ASP.NET v2 application to serialize/deserialize it's objects because I want to shift from inproc session state to stateserver. This is because my host, webhost4life, has a nasty tendency to recycle the worker process frequently thus causing session timeouts. Anyway... the question... I'm tryi...
It will be nothing. The CLR serialization logic will create the object uninitialized by way of FormatterServices.GetSafeUnitializedObject without running any construction logic. If you need to ensure the field has a value I would recommend moving such initialization into an Initialize() method that is called both from ...
What happens on deserialization with this? I'm currently convering my ASP.NET v2 application to serialize/deserialize it's objects because I want to shift from inproc session state to stateserver. This is because my host, webhost4life, has a nasty tendency to recycle the worker process frequently thus causing session t...
TITLE: What happens on deserialization with this? QUESTION: I'm currently convering my ASP.NET v2 application to serialize/deserialize it's objects because I want to shift from inproc session state to stateserver. This is because my host, webhost4life, has a nasty tendency to recycle the worker process frequently thus...
[ ".net", "serialization" ]
2
3
232
2
0
2008-09-21T18:30:58.647000
2008-09-21T18:32:12.403000
111,652
111,751
Locking Row in SQL 2005-2008
Is there a way to lock a row in the SQL 2005-2008 database without starting a transaction, so other processes cannot update the row until it is unlocked?
You can use RowLock or other hints but you should be careful.. The HOLDLOCK hint will instruct SQL Server to hold the lock until you commit the transaction. The ROWLOCK hint will lock only this record and not issue a page or table lock. The lock will also be released if you close your connection or it times out. I'd be...
Locking Row in SQL 2005-2008 Is there a way to lock a row in the SQL 2005-2008 database without starting a transaction, so other processes cannot update the row until it is unlocked?
TITLE: Locking Row in SQL 2005-2008 QUESTION: Is there a way to lock a row in the SQL 2005-2008 database without starting a transaction, so other processes cannot update the row until it is unlocked? ANSWER: You can use RowLock or other hints but you should be careful.. The HOLDLOCK hint will instruct SQL Server to h...
[ "sql", "sql-server", "locking" ]
8
4
19,596
3
0
2008-09-21T18:33:57.843000
2008-09-21T19:02:42.017000
111,653
111,821
"Cocoa Touch Application" Template from Xcode 3.1.1
Just installed the latest SDK for iPhone 2.1. When I go to File -> New Project in Xcode, under the iPhone OS Application selection, I don't see a template icon for "Cocoa Touch Application". Am I missing something? Anything else I need to download other than the iPhone SDK? If not, how do I add it to the "iPhone OS App...
You shouldn't need to add any templates, this is what happens by default. The closest thing to a normal Cocoa Touch application would be the Window-Based application as it gives you a window and a delegate... The others, like Martin said, have different styles already applied to them... OpenGL, Navigation Controllers, ...
"Cocoa Touch Application" Template from Xcode 3.1.1 Just installed the latest SDK for iPhone 2.1. When I go to File -> New Project in Xcode, under the iPhone OS Application selection, I don't see a template icon for "Cocoa Touch Application". Am I missing something? Anything else I need to download other than the iPhon...
TITLE: "Cocoa Touch Application" Template from Xcode 3.1.1 QUESTION: Just installed the latest SDK for iPhone 2.1. When I go to File -> New Project in Xcode, under the iPhone OS Application selection, I don't see a template icon for "Cocoa Touch Application". Am I missing something? Anything else I need to download ot...
[ "iphone", "xcode", "cocoa-touch", "xcode-template" ]
5
1
4,970
3
0
2008-09-21T18:34:05.050000
2008-09-21T19:29:16.557000
111,665
111,773
How do "spikes" figure in the schedule / estimation game?
Might be subjective and/or discussion.. but here goes. I've been asked to estimate a feature for the next big thing at work. I break it down.. use story points come up with a estimate. The feature however calls for interfacing with GoDiagrams a third party diagramming component in addition to various other company init...
I guess you are constantly underestimating what you do already know about the 3rd party component how long it takes you to create usable/helpful spikes for unknown areas 1. Get better at estimating those two things. So, it's all about experience. No matter what methodology you use, they will help you to use your experi...
How do "spikes" figure in the schedule / estimation game? Might be subjective and/or discussion.. but here goes. I've been asked to estimate a feature for the next big thing at work. I break it down.. use story points come up with a estimate. The feature however calls for interfacing with GoDiagrams a third party diagr...
TITLE: How do "spikes" figure in the schedule / estimation game? QUESTION: Might be subjective and/or discussion.. but here goes. I've been asked to estimate a feature for the next big thing at work. I break it down.. use story points come up with a estimate. The feature however calls for interfacing with GoDiagrams a...
[ "project-management", "agile", "estimation" ]
2
6
438
4
0
2008-09-21T18:40:18.310000
2008-09-21T19:08:38.087000
111,676
111,787
Unit testing a multithreaded application?
Does anyone have any advice for a consistent way to unit test a multithreaded application? I have done one application where our mock "worker threads" had a thread.sleep with a time that was specified by a public member variable. We would use this so we could set how long a particular thread would take to complete its ...
My advice would be not to rely on unit tests to detect concurrency issues for several reasons: Lack of reproducibility: the tests will fail only once in a while, and won't be really helpful to pinpoint the problems. Erratic failing build will annoy everybody in the team - because the last commit will always be wrongly ...
Unit testing a multithreaded application? Does anyone have any advice for a consistent way to unit test a multithreaded application? I have done one application where our mock "worker threads" had a thread.sleep with a time that was specified by a public member variable. We would use this so we could set how long a par...
TITLE: Unit testing a multithreaded application? QUESTION: Does anyone have any advice for a consistent way to unit test a multithreaded application? I have done one application where our mock "worker threads" had a thread.sleep with a time that was specified by a public member variable. We would use this so we could ...
[ ".net", "multithreading", "unit-testing" ]
33
24
11,447
9
0
2008-09-21T18:43:19.833000
2008-09-21T19:17:33.587000