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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
20,233 | 25,760 | Audio player on Windows Mobile | I'm trying to develop specialized audio player for windows mobile devices (Professional ones). And I've ran into the problem an once. There no compressed audio APIs on WM or I was unable to found house in documentation. Yes there are WM6 Sound API but it cannot even pause playback or seek to specified position. There a... | I've found quite a sufficient compressed audio playback library FMOD. There are WM version of it. And I've found sample application on CodeProject to start with. | Audio player on Windows Mobile I'm trying to develop specialized audio player for windows mobile devices (Professional ones). And I've ran into the problem an once. There no compressed audio APIs on WM or I was unable to found house in documentation. Yes there are WM6 Sound API but it cannot even pause playback or seek... | TITLE:
Audio player on Windows Mobile
QUESTION:
I'm trying to develop specialized audio player for windows mobile devices (Professional ones). And I've ran into the problem an once. There no compressed audio APIs on WM or I was unable to found house in documentation. Yes there are WM6 Sound API but it cannot even paus... | [
"windows-mobile"
] | 1 | 0 | 889 | 2 | 0 | 2008-08-21T15:27:23.377000 | 2008-08-25T08:08:26.380000 |
20,245 | 20,274 | Process raw HTTP request content | I am doing an e-commerce solution in ASP.NET which uses PayPal's Website Payments Standard service. Together with that I use a service they offer ( Payment Data Transfer ) that sends you back order information after a user has completed a payment. The final thing I need to do is to parse the POST request from them and ... | Something like this placed in your onload event. if (Request.RequestType == "POST") { using (StreamReader sr = new StreamReader(Request.InputStream)) { if (sr.ReadLine() == "SUCCESS") { /* Do your parsing here */ } } } Mind you that they might want some special sort of response to (ie; not your full webpage), so you mi... | Process raw HTTP request content I am doing an e-commerce solution in ASP.NET which uses PayPal's Website Payments Standard service. Together with that I use a service they offer ( Payment Data Transfer ) that sends you back order information after a user has completed a payment. The final thing I need to do is to pars... | TITLE:
Process raw HTTP request content
QUESTION:
I am doing an e-commerce solution in ASP.NET which uses PayPal's Website Payments Standard service. Together with that I use a service they offer ( Payment Data Transfer ) that sends you back order information after a user has completed a payment. The final thing I nee... | [
"asp.net",
"http",
"e-commerce"
] | 7 | 14 | 10,760 | 5 | 0 | 2008-08-21T15:30:28.457000 | 2008-08-21T15:39:32.053000 |
20,249 | 20,380 | ILMerge and Web Resources | We're attemtping to merge our DLL's into one for deployment, thus ILMerge. Almost everything seems to work great. We have a couple web controls that use ClientScript.RegisterClientScriptResource and these are 404-ing after the merge (These worked before the merge). For example one of our controls would look like namesp... | OK - I got this working. It looks like the primary assembly was the only one whose assembly attributes were being copied. With copyattrs set, the last one in would win, not a merge (as far as I can tell). I created a dummy project to reference the other DLL's and included all the web resources from those projects in th... | ILMerge and Web Resources We're attemtping to merge our DLL's into one for deployment, thus ILMerge. Almost everything seems to work great. We have a couple web controls that use ClientScript.RegisterClientScriptResource and these are 404-ing after the merge (These worked before the merge). For example one of our contr... | TITLE:
ILMerge and Web Resources
QUESTION:
We're attemtping to merge our DLL's into one for deployment, thus ILMerge. Almost everything seems to work great. We have a couple web controls that use ClientScript.RegisterClientScriptResource and these are 404-ing after the merge (These worked before the merge). For exampl... | [
"c#",
"asp.net",
"ilmerge",
"webresource"
] | 4 | 4 | 1,791 | 2 | 0 | 2008-08-21T15:31:45.007000 | 2008-08-21T16:09:36.070000 |
20,262 | 20,271 | Refactoring for Testability on an existing system | I've joined a team that works on a product. This product has been around for ~5 years or so, and uses ASP.NET WebForms. Its original architecture has faded over time, and things have become relatively disorganized throughout the solution. It's by no means terrible, but definitely can use some work; you all know what I ... | Your PM's concerns are valid - make sure you get your system under test before making any major refactorings. I would strongly recommend getting a copy of Michael Feather's book Working Effectively With Legacy Code (by "Legacy Code" Feathers means any system that isn't adequately covered by unit tests). This is chock f... | Refactoring for Testability on an existing system I've joined a team that works on a product. This product has been around for ~5 years or so, and uses ASP.NET WebForms. Its original architecture has faded over time, and things have become relatively disorganized throughout the solution. It's by no means terrible, but ... | TITLE:
Refactoring for Testability on an existing system
QUESTION:
I've joined a team that works on a product. This product has been around for ~5 years or so, and uses ASP.NET WebForms. Its original architecture has faded over time, and things have become relatively disorganized throughout the solution. It's by no me... | [
"asp.net",
"refactoring",
"automated-tests"
] | 5 | 5 | 767 | 5 | 0 | 2008-08-21T15:34:46.200000 | 2008-08-21T15:38:51.463000 |
20,263 | 20,438 | Is there a Profiler equivalent for MySql? | "Microsoft SQL Server Profiler is a graphical user interface to SQL Trace for monitoring an instance of the Database Engine or Analysis Services." I find using SQL Server Profiler extremely useful during development, testing and when I am debugging database application problems. Does anybody know if there is an equival... | Something cool that is in version 5.0.37 of the community server is MySQL's new profiler. This may give you what info you are looking for. | Is there a Profiler equivalent for MySql? "Microsoft SQL Server Profiler is a graphical user interface to SQL Trace for monitoring an instance of the Database Engine or Analysis Services." I find using SQL Server Profiler extremely useful during development, testing and when I am debugging database application problems... | TITLE:
Is there a Profiler equivalent for MySql?
QUESTION:
"Microsoft SQL Server Profiler is a graphical user interface to SQL Trace for monitoring an instance of the Database Engine or Analysis Services." I find using SQL Server Profiler extremely useful during development, testing and when I am debugging database ap... | [
"mysql",
"sql-server",
"database"
] | 79 | 39 | 88,708 | 9 | 0 | 2008-08-21T15:34:55.467000 | 2008-08-21T16:24:12.587000 |
20,267 | 20,270 | Best way to replace tokens in a large text template | I have a large text template which needs tokenized sections replaced by other text. The tokens look something like this: ##USERNAME##. My first instinct is just to use String.Replace(), but is there a better, more efficient way or is Replace() already optimized for this? | System.Text.RegularExpressions.Regex.Replace() is what you seek - IF your tokens are odd enough that you need a regex to find them. Some kind soul did some performance testing, and between Regex.Replace(), String.Replace(), and StringBuilder.Replace(), String.Replace() actually came out on top. | Best way to replace tokens in a large text template I have a large text template which needs tokenized sections replaced by other text. The tokens look something like this: ##USERNAME##. My first instinct is just to use String.Replace(), but is there a better, more efficient way or is Replace() already optimized for th... | TITLE:
Best way to replace tokens in a large text template
QUESTION:
I have a large text template which needs tokenized sections replaced by other text. The tokens look something like this: ##USERNAME##. My first instinct is just to use String.Replace(), but is there a better, more efficient way or is Replace() alread... | [
"c#",
".net"
] | 13 | 14 | 17,159 | 10 | 0 | 2008-08-21T15:36:24.590000 | 2008-08-21T15:38:33.897000 |
20,272 | 29,042 | Why doesn't 'shell' work in VBscript in VS6? | In a macro for Visual Studio 6, I wanted to run an external program, so I typed: shell("p4 open " + ActiveDocument.FullName) Which gave me a type mismatch runtime error. What I ended up having to type was this: Dim wshShell Set wshShell = CreateObject("WScript.Shell") strResult = wshShell.Run("p4 open " + ActiveDocumen... | As lassevk pointed out, VBScript is not Visual Basic. I believe the only built in object in VBScript is the WScript object. WScript.Echo "Hello, World!" From the docs The WScript object is the root object of the Windows Script Host object model hierarchy. It never needs to be instantiated before invoking its properties... | Why doesn't 'shell' work in VBscript in VS6? In a macro for Visual Studio 6, I wanted to run an external program, so I typed: shell("p4 open " + ActiveDocument.FullName) Which gave me a type mismatch runtime error. What I ended up having to type was this: Dim wshShell Set wshShell = CreateObject("WScript.Shell") strRes... | TITLE:
Why doesn't 'shell' work in VBscript in VS6?
QUESTION:
In a macro for Visual Studio 6, I wanted to run an external program, so I typed: shell("p4 open " + ActiveDocument.FullName) Which gave me a type mismatch runtime error. What I ended up having to type was this: Dim wshShell Set wshShell = CreateObject("WScr... | [
"visual-studio",
"vbscript"
] | 1 | 1 | 2,146 | 4 | 0 | 2008-08-21T15:39:07.953000 | 2008-08-26T21:57:10.593000 |
20,286 | 20,293 | Associating source and search keywords with account creation | As a part of the signup process for my online application, I'm thinking of tracking the source and/or search keywords used to get to my site. This would allow me to see what advertising is working and from where with a somewhat finer grain than Google Analytics would. I assume I could set some kind of cookie with this ... | Your best bet IMO would be to use javascript to look for a cookie named "origReferrer" or something like that and if that cookie doesn't exist you should create one (with an expiry of ~24hours) and fill it with the current referrer. That way you'll have preserved the original referrer all the way from your users first ... | Associating source and search keywords with account creation As a part of the signup process for my online application, I'm thinking of tracking the source and/or search keywords used to get to my site. This would allow me to see what advertising is working and from where with a somewhat finer grain than Google Analyti... | TITLE:
Associating source and search keywords with account creation
QUESTION:
As a part of the signup process for my online application, I'm thinking of tracking the source and/or search keywords used to get to my site. This would allow me to see what advertising is working and from where with a somewhat finer grain t... | [
"ruby-on-rails",
"cookies",
"seo"
] | 2 | 3 | 264 | 1 | 0 | 2008-08-21T15:42:20.330000 | 2008-08-21T15:44:32.823000 |
20,298 | 20,306 | How to stop an animation in C# / WPF? | I have something like this: barProgress.BeginAnimation(RangeBase.ValueProperty, new DoubleAnimation( barProgress.Value, dNextProgressValue, new Duration(TimeSpan.FromSeconds(dDuration))); Now, how would you stop that animation (the DoubleAnimation )? The reason I want to do this, is because I would like to start new an... | To stop it, call BeginAnimation again with the second argument set to null. | How to stop an animation in C# / WPF? I have something like this: barProgress.BeginAnimation(RangeBase.ValueProperty, new DoubleAnimation( barProgress.Value, dNextProgressValue, new Duration(TimeSpan.FromSeconds(dDuration))); Now, how would you stop that animation (the DoubleAnimation )? The reason I want to do this, i... | TITLE:
How to stop an animation in C# / WPF?
QUESTION:
I have something like this: barProgress.BeginAnimation(RangeBase.ValueProperty, new DoubleAnimation( barProgress.Value, dNextProgressValue, new Duration(TimeSpan.FromSeconds(dDuration))); Now, how would you stop that animation (the DoubleAnimation )? The reason I ... | [
"c#",
"wpf"
] | 54 | 92 | 68,869 | 8 | 0 | 2008-08-21T15:45:24.800000 | 2008-08-21T15:47:49.053000 |
20,322 | 20,364 | How do I log uncaught exceptions in PHP? | I've found out how to convert errors into exceptions, and I display them nicely if they aren't caught, but I don't know how to log them in a useful way. Simply writing them to a file won't be useful, will it? And would you risk accessing a database, when you don't know what caused the exception yet? | I really like log4php for logging, even though it's not yet out of the incubator. I use log4net in just about everything, and have found the style quite natural for me. With regard to system crashes, you can log the error to multiple destinations (e.g., have appenders whose threshold is CRITICAL or ERROR that only come... | How do I log uncaught exceptions in PHP? I've found out how to convert errors into exceptions, and I display them nicely if they aren't caught, but I don't know how to log them in a useful way. Simply writing them to a file won't be useful, will it? And would you risk accessing a database, when you don't know what caus... | TITLE:
How do I log uncaught exceptions in PHP?
QUESTION:
I've found out how to convert errors into exceptions, and I display them nicely if they aren't caught, but I don't know how to log them in a useful way. Simply writing them to a file won't be useful, will it? And would you risk accessing a database, when you do... | [
"php",
"exception",
"error-handling",
"error-logging"
] | 12 | 6 | 6,990 | 7 | 0 | 2008-08-21T15:54:14.513000 | 2008-08-21T16:04:43.133000 |
20,326 | 20,649 | Double postback issue | I have a ASP.NET 1.1 application, and I'm trying to find out why when I change a ComboBox which value is used to fill another one (parent-child relation), two postbacks are produced. I have checked and checked the code, and I can't find the cause. Here are both call stacks which end in a page_load First postback (gener... | It's a very specific problem with this code, I doubt it will be useful for someone else, but here it goes: A check was added to the combo's onchange with an if, if the condition was met, an explicit call to the postback function was made. If the combo was set to AutoPostback, asp.net added the postback call again, prod... | Double postback issue I have a ASP.NET 1.1 application, and I'm trying to find out why when I change a ComboBox which value is used to fill another one (parent-child relation), two postbacks are produced. I have checked and checked the code, and I can't find the cause. Here are both call stacks which end in a page_load... | TITLE:
Double postback issue
QUESTION:
I have a ASP.NET 1.1 application, and I'm trying to find out why when I change a ComboBox which value is used to fill another one (parent-child relation), two postbacks are produced. I have checked and checked the code, and I can't find the cause. Here are both call stacks which ... | [
"asp.net",
".net-1.1"
] | 6 | 5 | 6,676 | 5 | 0 | 2008-08-21T15:55:12.517000 | 2008-08-21T17:45:30.893000 |
20,336 | 20,368 | State of Registers After Bootup | I'm working on a boot loader on an x86 machine. When the BIOS copies the contents of the MBR to 0x7c00 and jumps to that address, is there a standard meaning to the contents of the registers? Do the registers have standard values? I know that the segment registers are typically set to 0, but will sometimes be 0x7c0. Wh... | This early execution environment is highly implementation defined, meaning the implementation of your particular BIOS. Never make any assumptions on the contents of registers. They might be initialized to 0, but they might contain a random value just as well. from the OS dev Wiki, which is where I get information when ... | State of Registers After Bootup I'm working on a boot loader on an x86 machine. When the BIOS copies the contents of the MBR to 0x7c00 and jumps to that address, is there a standard meaning to the contents of the registers? Do the registers have standard values? I know that the segment registers are typically set to 0,... | TITLE:
State of Registers After Bootup
QUESTION:
I'm working on a boot loader on an x86 machine. When the BIOS copies the contents of the MBR to 0x7c00 and jumps to that address, is there a standard meaning to the contents of the registers? Do the registers have standard values? I know that the segment registers are t... | [
"boot",
"bios"
] | 7 | 8 | 294 | 7 | 0 | 2008-08-21T15:57:36.363000 | 2008-08-21T16:06:07.857000 |
20,346 | 20,418 | What are attributes in .NET? | What are attributes in.NET, what are they good for, and how do I create my own attributes? | Metadata. Data about your objects/methods/properties. For example I might declare an Attribute called: DisplayOrder so I can easily control in what order properties should appear in the UI. I could then append it to a class and write some GUI components that extract the attributes and order the UI elements appropriatel... | What are attributes in .NET? What are attributes in.NET, what are they good for, and how do I create my own attributes? | TITLE:
What are attributes in .NET?
QUESTION:
What are attributes in.NET, what are they good for, and how do I create my own attributes?
ANSWER:
Metadata. Data about your objects/methods/properties. For example I might declare an Attribute called: DisplayOrder so I can easily control in what order properties should a... | [
"c#",
".net",
"glossary",
".net-attributes"
] | 211 | 150 | 69,026 | 11 | 0 | 2008-08-21T15:59:39.773000 | 2008-08-21T16:18:26.767000 |
20,386 | 24,079 | Memory leaks in .NET | What are all the possible ways in which we can get memory leaks in.NET? I know of two: Not properly un-registering Event Handlers/Delegates. Not disposing dynamic child controls in Windows Forms: Example: // Causes Leaks Label label = new Label(); this.Controls.Add(label); this.Controls.Remove(label);
// Correct Code ... | Block the finalizer thread. No other objects will be garbage collected until the finalizer thread is unblocked. Thus the amount of memory used will grow and grow. Further reading: http://dotnetdebug.net/2005/06/22/blocked-finalizer-thread/ | Memory leaks in .NET What are all the possible ways in which we can get memory leaks in.NET? I know of two: Not properly un-registering Event Handlers/Delegates. Not disposing dynamic child controls in Windows Forms: Example: // Causes Leaks Label label = new Label(); this.Controls.Add(label); this.Controls.Remove(labe... | TITLE:
Memory leaks in .NET
QUESTION:
What are all the possible ways in which we can get memory leaks in.NET? I know of two: Not properly un-registering Event Handlers/Delegates. Not disposing dynamic child controls in Windows Forms: Example: // Causes Leaks Label label = new Label(); this.Controls.Add(label); this.Co... | [
".net",
"optimization",
"memory-leaks"
] | 20 | 5 | 14,740 | 14 | 0 | 2008-08-21T16:11:34.520000 | 2008-08-23T08:17:01.867000 |
20,389 | 33,052 | Deploying InfoPath forms to different SharePoint servers | How do you manage deploying InfoPath forms to different sharepoint servers? Is there a better way to deal all the data connections being site-specific without opening the forms, editing the data connections and republishing for each environment? | If I understand your scenario correctly: You have an InfoPath form, with data connections that submit your data. You wish to deploy this form on multiple SharePoint Servers and have those data connections submit data to the currently deployed server. You can't really get around needing to do work on every SharePoint se... | Deploying InfoPath forms to different SharePoint servers How do you manage deploying InfoPath forms to different sharepoint servers? Is there a better way to deal all the data connections being site-specific without opening the forms, editing the data connections and republishing for each environment? | TITLE:
Deploying InfoPath forms to different SharePoint servers
QUESTION:
How do you manage deploying InfoPath forms to different sharepoint servers? Is there a better way to deal all the data connections being site-specific without opening the forms, editing the data connections and republishing for each environment?... | [
"sharepoint",
"moss",
"infopath"
] | 6 | 2 | 11,868 | 7 | 0 | 2008-08-21T16:12:45.220000 | 2008-08-28T18:42:29.327000 |
20,391 | 20,453 | Script to backup svn repository to network share | I have a svn repo on my machine (Windows). Anyone have a script to back it up to a network share? I'm using the repo locally since I'm disconnected a lot. The network share is on a server with a backup strategy. I'm a perfect candidate for git/hg but I don't want to give up my VS integration just yet. | I wrote a batch file to do this for a bunch of repos, you could just hook that batch file up to windows scheduler and run it on a schedule. svnadmin hotcopy m:\Source\Q4Press\Repo m:\SvnOut\Q4Press I use the hotcopy but the svn dump would work just as well. | Script to backup svn repository to network share I have a svn repo on my machine (Windows). Anyone have a script to back it up to a network share? I'm using the repo locally since I'm disconnected a lot. The network share is on a server with a backup strategy. I'm a perfect candidate for git/hg but I don't want to give... | TITLE:
Script to backup svn repository to network share
QUESTION:
I have a svn repo on my machine (Windows). Anyone have a script to back it up to a network share? I'm using the repo locally since I'm disconnected a lot. The network share is on a server with a backup strategy. I'm a perfect candidate for git/hg but I ... | [
"svn"
] | 5 | 3 | 3,193 | 3 | 0 | 2008-08-21T16:12:53.707000 | 2008-08-21T16:32:44.063000 |
20,392 | 20,486 | Is it OK to drop sql statistics? | We've been trying to alter a lot of columns from nullable to not nullable, which involves dropping all the associated objects, making the change, and recreating the associated objects. We've been using SQL Compare to generate the scripts, but I noticed that SQL Compare doesn't script statistic objects. Does this mean i... | It is considered best practice to auto create and auto update statistics. Sql Server will create them if it needs them. You will often see the tuning wizard generate lots of these, and you will also see people advise that you update statistics as a part of your maintenance plan, but this is not necessary and might actu... | Is it OK to drop sql statistics? We've been trying to alter a lot of columns from nullable to not nullable, which involves dropping all the associated objects, making the change, and recreating the associated objects. We've been using SQL Compare to generate the scripts, but I noticed that SQL Compare doesn't script st... | TITLE:
Is it OK to drop sql statistics?
QUESTION:
We've been trying to alter a lot of columns from nullable to not nullable, which involves dropping all the associated objects, making the change, and recreating the associated objects. We've been using SQL Compare to generate the scripts, but I noticed that SQL Compare... | [
"sql",
"sql-server",
"scripting",
"statistics"
] | 5 | 2 | 6,538 | 4 | 0 | 2008-08-21T16:12:58.540000 | 2008-08-21T16:46:25.513000 |
20,420 | 21,106 | Any ReSharper equivalent for Xcode? | I'm a complete Xcode/Objective-C/Cocoa newbie but I'm learning fast and really starting to enjoy getting to grips with a new language, platform and paradigm. One thing is though, having been using Visual Studio with R# for so long I've kind of been spoiled with the coding tools such as refactorings and completion etc a... | You sound as if you're looking for three major things: code templates, refactoring tools, and auto-completion. The good news is that Xcode 3 and later come with superb auto-completion and template support. By default, you have to explicitly request completion by hitting the escape key. (This actually works in all NSTex... | Any ReSharper equivalent for Xcode? I'm a complete Xcode/Objective-C/Cocoa newbie but I'm learning fast and really starting to enjoy getting to grips with a new language, platform and paradigm. One thing is though, having been using Visual Studio with R# for so long I've kind of been spoiled with the coding tools such ... | TITLE:
Any ReSharper equivalent for Xcode?
QUESTION:
I'm a complete Xcode/Objective-C/Cocoa newbie but I'm learning fast and really starting to enjoy getting to grips with a new language, platform and paradigm. One thing is though, having been using Visual Studio with R# for so long I've kind of been spoiled with the ... | [
"objective-c",
"xcode",
"macos",
"refactoring"
] | 40 | 40 | 12,781 | 5 | 0 | 2008-08-21T16:18:41.460000 | 2008-08-21T20:33:18.150000 |
20,426 | 21,636 | How to maintain a recursive invariant in a MySQL database? | I have a tree encoded in a MySQL database as edges: CREATE TABLE items ( num INT, tot INT, PRIMARY KEY (num) ); CREATE TABLE tree ( orig INT, term INT FOREIGN KEY (orig,term) REFERENCES items (num,num) ) For each leaf in the tree, items.tot is set by someone. For interior nodes, items.tot needs to be the sum of it's ch... | The problem you are having is clear, recursion in SQL. You need to get the parent of the parent... of the leaf and updates it's total (either subtracting the old and adding the new, or recomputing). You need some form of identifier to see the structure of the tree, and grab all of a nodes children and a list of the par... | How to maintain a recursive invariant in a MySQL database? I have a tree encoded in a MySQL database as edges: CREATE TABLE items ( num INT, tot INT, PRIMARY KEY (num) ); CREATE TABLE tree ( orig INT, term INT FOREIGN KEY (orig,term) REFERENCES items (num,num) ) For each leaf in the tree, items.tot is set by someone. F... | TITLE:
How to maintain a recursive invariant in a MySQL database?
QUESTION:
I have a tree encoded in a MySQL database as edges: CREATE TABLE items ( num INT, tot INT, PRIMARY KEY (num) ); CREATE TABLE tree ( orig INT, term INT FOREIGN KEY (orig,term) REFERENCES items (num,num) ) For each leaf in the tree, items.tot is... | [
"mysql",
"algorithm",
"data-structures",
"invariants"
] | 2 | 1 | 1,242 | 2 | 0 | 2008-08-21T16:20:12.563000 | 2008-08-22T02:14:04.820000 |
20,450 | 20,628 | Cleaning up RTF text | I'd like to take some RTF input and clean it to remove all RTF formatting except \ul \b \i to paste it into Word with minor format information. The command used to paste into Word will be something like: oWord.ActiveDocument.ActiveWindow.Selection.PasteAndFormat(0) (with some RTF text already in the Clipboard) {\rtf1\a... | I would use a hidden RichTextBox, set the Rtf member, then retrieve the Text member to sanitize the RTF in a well-supported way. Then I would use manually inject the desired formatting afterwards. | Cleaning up RTF text I'd like to take some RTF input and clean it to remove all RTF formatting except \ul \b \i to paste it into Word with minor format information. The command used to paste into Word will be something like: oWord.ActiveDocument.ActiveWindow.Selection.PasteAndFormat(0) (with some RTF text already in th... | TITLE:
Cleaning up RTF text
QUESTION:
I'd like to take some RTF input and clean it to remove all RTF formatting except \ul \b \i to paste it into Word with minor format information. The command used to paste into Word will be something like: oWord.ActiveDocument.ActiveWindow.Selection.PasteAndFormat(0) (with some RTF ... | [
".net",
"vb.net",
"ms-word",
"rtf"
] | 12 | 6 | 20,154 | 4 | 0 | 2008-08-21T16:30:49.980000 | 2008-08-21T17:39:40.503000 |
20,463 | 20,485 | What is the point of interfaces in PHP? | Interfaces allow you to create code that defines the methods of classes that implement it. You cannot however add any code to those methods. Abstract classes allow you to do the same thing, along with adding code to the method. Now if you can achieve the same goal with abstract classes, why do we even need the concept ... | The entire point of interfaces is to give you the flexibility to have your class be forced to implement multiple interfaces, but still not allow multiple inheritance. The issues with inheriting from multiple classes are many and varied and the wikipedia page on it sums them up pretty well. Interfaces are a compromise. ... | What is the point of interfaces in PHP? Interfaces allow you to create code that defines the methods of classes that implement it. You cannot however add any code to those methods. Abstract classes allow you to do the same thing, along with adding code to the method. Now if you can achieve the same goal with abstract c... | TITLE:
What is the point of interfaces in PHP?
QUESTION:
Interfaces allow you to create code that defines the methods of classes that implement it. You cannot however add any code to those methods. Abstract classes allow you to do the same thing, along with adding code to the method. Now if you can achieve the same go... | [
"php",
"oop",
"interface",
"theory"
] | 244 | 148 | 102,239 | 15 | 0 | 2008-08-21T16:35:20.657000 | 2008-08-21T16:45:54.390000 |
20,465 | 26,691 | .NET - Excel ListObject autosizing on databind | I'm developing an Excel 2007 add-in using Visual Studio Tools for Office (2008). I have one sheet with several ListObjects on it, which are being bound to datatables on startup. When they are bound, they autosize correctly. The problem comes when they are re-bound. I have a custom button on the ribbon bar which goes ba... | If anyone else is having this problem, I have found the cause of this exception. ListObjects will automatically re-size on binding, as long as they do not affect any other objects on the sheet. Keep in mind that ListObjects can only affect the Ranges which they wrap around. In my case, the list object which was above t... | .NET - Excel ListObject autosizing on databind I'm developing an Excel 2007 add-in using Visual Studio Tools for Office (2008). I have one sheet with several ListObjects on it, which are being bound to datatables on startup. When they are bound, they autosize correctly. The problem comes when they are re-bound. I have ... | TITLE:
.NET - Excel ListObject autosizing on databind
QUESTION:
I'm developing an Excel 2007 add-in using Visual Studio Tools for Office (2008). I have one sheet with several ListObjects on it, which are being bound to datatables on startup. When they are bound, they autosize correctly. The problem comes when they are... | [
"c#",
".net",
"excel",
"data-binding",
"vsto"
] | 7 | 5 | 3,319 | 3 | 0 | 2008-08-21T16:36:12.027000 | 2008-08-25T19:30:44.243000 |
20,467 | 20,495 | Path Display in Label | Are there any automatic methods for trimming a path string in.NET? For example: C:\Documents and Settings\nick\My Documents\Tests\demo data\demo data.emx becomes C:\Documents...\demo data.emx It would be particularly cool if this were built into the Label class, and I seem to recall it is--can't find it though! | Use TextRenderer.DrawText with TextFormatFlags.PathEllipsis flag void label_Paint(object sender, PaintEventArgs e) { Label label = (Label)sender; TextRenderer.DrawText(e.Graphics, label.Text, label.Font, label.ClientRectangle, label.ForeColor, TextFormatFlags.PathEllipsis); } Your code is 95% there. The only problem is... | Path Display in Label Are there any automatic methods for trimming a path string in.NET? For example: C:\Documents and Settings\nick\My Documents\Tests\demo data\demo data.emx becomes C:\Documents...\demo data.emx It would be particularly cool if this were built into the Label class, and I seem to recall it is--can't f... | TITLE:
Path Display in Label
QUESTION:
Are there any automatic methods for trimming a path string in.NET? For example: C:\Documents and Settings\nick\My Documents\Tests\demo data\demo data.emx becomes C:\Documents...\demo data.emx It would be particularly cool if this were built into the Label class, and I seem to rec... | [
"c#",
".net",
"winforms",
"path"
] | 6 | 9 | 3,567 | 6 | 0 | 2008-08-21T16:38:29.807000 | 2008-08-21T16:49:29.640000 |
20,484 | 20,538 | Use a LIKE clause in part of an INNER JOIN | Can/Should I use a LIKE criteria as part of an INNER JOIN when building a stored procedure/query? I'm not sure I'm asking the right thing, so let me explain. I'm creating a procedure that is going to take a list of keywords to be searched for in a column that contains text. If I was sitting at the console, I'd execute ... | Your first query will work but will require a full table scan because any index on that column will be ignored. You will also have to do some dynamic SQL to generate all your LIKE clauses. Try a full text search if your using SQL Server or check out one of the Lucene implementations. Joel talked about his success with ... | Use a LIKE clause in part of an INNER JOIN Can/Should I use a LIKE criteria as part of an INNER JOIN when building a stored procedure/query? I'm not sure I'm asking the right thing, so let me explain. I'm creating a procedure that is going to take a list of keywords to be searched for in a column that contains text. If... | TITLE:
Use a LIKE clause in part of an INNER JOIN
QUESTION:
Can/Should I use a LIKE criteria as part of an INNER JOIN when building a stored procedure/query? I'm not sure I'm asking the right thing, so let me explain. I'm creating a procedure that is going to take a list of keywords to be searched for in a column that... | [
"sql",
"sql-server",
"design-patterns"
] | 20 | 5 | 107,644 | 10 | 0 | 2008-08-21T16:45:48.183000 | 2008-08-21T17:06:11.050000 |
20,510 | 20,645 | Executing JavaScript from Flex: Is this javascript function dangerous? | I have a flex application that needs the ability to generate and execute JavaScript. When I say this, I mean I need to execute raw JavaScript that I create in my Flex application (not just an existing JavaScript method) I am currently doing this by exposing the following JavaScript method: function doScript(js){ eval(j... | There's no need for the JavaScript function, the first argument to ExternalInterface can be any JavaScript code, it doesn't have to be a function name (the documentation says so, but it is wrong). Try this: ExternalInterface.call("alert('hello')"); | Executing JavaScript from Flex: Is this javascript function dangerous? I have a flex application that needs the ability to generate and execute JavaScript. When I say this, I mean I need to execute raw JavaScript that I create in my Flex application (not just an existing JavaScript method) I am currently doing this by ... | TITLE:
Executing JavaScript from Flex: Is this javascript function dangerous?
QUESTION:
I have a flex application that needs the ability to generate and execute JavaScript. When I say this, I mean I need to execute raw JavaScript that I create in my Flex application (not just an existing JavaScript method) I am curren... | [
"javascript",
"apache-flex",
"exploit"
] | 6 | 8 | 3,167 | 6 | 0 | 2008-08-21T16:55:09.813000 | 2008-08-21T17:43:48.543000 |
20,529 | 20,631 | Useful Eclipse features? | I have been using Eclipse as an IDE for a short amount of time (about 3 months of full use) and almost every day I learn about some shortcut or feature that I had absolutely no idea about. For instance, just today I learned that Ctrl + 3 was the shortcut for a Quick Access window. I was wondering what your most useful/... | My most commonly used features are ctrl + 1 quick-fix / spell-checker opening files ctrl + shift + t load class file by classname ctrl + shift + r load any file by filename matches are made on the start of the class/filename. start your search pattern with a * to search anywhere within the filename/classname. Formattin... | Useful Eclipse features? I have been using Eclipse as an IDE for a short amount of time (about 3 months of full use) and almost every day I learn about some shortcut or feature that I had absolutely no idea about. For instance, just today I learned that Ctrl + 3 was the shortcut for a Quick Access window. I was wonderi... | TITLE:
Useful Eclipse features?
QUESTION:
I have been using Eclipse as an IDE for a short amount of time (about 3 months of full use) and almost every day I learn about some shortcut or feature that I had absolutely no idea about. For instance, just today I learned that Ctrl + 3 was the shortcut for a Quick Access win... | [
"eclipse"
] | 68 | 73 | 23,884 | 23 | 0 | 2008-08-21T17:01:20 | 2008-08-21T17:39:52.110000 |
20,533 | 20,543 | List of macOS text editors and code editors | I searched for this and found Maudite's question about text editors but they were all for Windows. As you have no doubt guessed, I am trying to find out if there are any text/code editors for the Mac besides what I know of. I'll edit my post to include editors listed. Free Textwrangler Xcode Mac Vim Aquamacs and closer... | I haven't used it myself, but another free one that I've heard good thing about is Smultron. In my own research on this, I found this interesting article: Faceoff: Which Is The Best Mac Text Editor Ever? | List of macOS text editors and code editors I searched for this and found Maudite's question about text editors but they were all for Windows. As you have no doubt guessed, I am trying to find out if there are any text/code editors for the Mac besides what I know of. I'll edit my post to include editors listed. Free Te... | TITLE:
List of macOS text editors and code editors
QUESTION:
I searched for this and found Maudite's question about text editors but they were all for Windows. As you have no doubt guessed, I am trying to find out if there are any text/code editors for the Mac besides what I know of. I'll edit my post to include edito... | [
"macos",
"editor"
] | 176 | 18 | 253,314 | 39 | 0 | 2008-08-21T17:03:25.487000 | 2008-08-21T17:07:53.060000 |
20,575 | 20,589 | Link from ASP.NET yellow error page directly to VS source code | When an ASP.NET application errors out and generates the yellow-screen display, I'd like to create some kind of link from the error page which would jump directly to the correct line of code in Visual Studio. I'm not sure how to approach this, or if there are any tools already in existence which accomplish it - but I'd... | You would probably need to embed an ActiveX control in the page for something like that to be possible. | Link from ASP.NET yellow error page directly to VS source code When an ASP.NET application errors out and generates the yellow-screen display, I'd like to create some kind of link from the error page which would jump directly to the correct line of code in Visual Studio. I'm not sure how to approach this, or if there a... | TITLE:
Link from ASP.NET yellow error page directly to VS source code
QUESTION:
When an ASP.NET application errors out and generates the yellow-screen display, I'd like to create some kind of link from the error page which would jump directly to the correct line of code in Visual Studio. I'm not sure how to approach t... | [
"asp.net",
"yellow-screen-of-death"
] | 1 | 1 | 404 | 6 | 0 | 2008-08-21T17:17:51.273000 | 2008-08-21T17:22:03.477000 |
20,586 | 20,737 | Image UriSource and Data Binding | I'm trying to bind a list of custom objects to a WPF Image like this: But it doesn't work. This is the error I'm getting: "Property 'UriSource' or property 'StreamSource' must be set." What am I missing? | WPF has built-in converters for certain types. If you bind the Image's Source property to a string or Uri value, under the hood WPF will use an ImageSourceConverter to convert the value to an ImageSource. So would work if the ImageSource property was a string representation of a valid URI to an image. You can of course... | Image UriSource and Data Binding I'm trying to bind a list of custom objects to a WPF Image like this: But it doesn't work. This is the error I'm getting: "Property 'UriSource' or property 'StreamSource' must be set." What am I missing? | TITLE:
Image UriSource and Data Binding
QUESTION:
I'm trying to bind a list of custom objects to a WPF Image like this: But it doesn't work. This is the error I'm getting: "Property 'UriSource' or property 'StreamSource' must be set." What am I missing?
ANSWER:
WPF has built-in converters for certain types. If you bi... | [
".net",
"wpf",
"data-binding",
"xaml"
] | 69 | 85 | 142,706 | 6 | 0 | 2008-08-21T17:21:01.170000 | 2008-08-21T18:38:50.580000 |
20,597 | 20,622 | FTP in NetBeans 6.1 | Is there an FTP browser hiding away in NetBeans 6.1? The help manual doesn't even suggest FTP exists. All I've been able to find so far is a tree viewer in the Services panel (no edit controls) and the ability to upload projects, folders and specific files from the Projects/Files views. Is there anywhere to delete or r... | It looks like something was recently added to netbeans for php... http://blogs.oracle.com/netbeansphp/entry/ftp_support_added don't know if you can make use of that... | FTP in NetBeans 6.1 Is there an FTP browser hiding away in NetBeans 6.1? The help manual doesn't even suggest FTP exists. All I've been able to find so far is a tree viewer in the Services panel (no edit controls) and the ability to upload projects, folders and specific files from the Projects/Files views. Is there any... | TITLE:
FTP in NetBeans 6.1
QUESTION:
Is there an FTP browser hiding away in NetBeans 6.1? The help manual doesn't even suggest FTP exists. All I've been able to find so far is a tree viewer in the Services panel (no edit controls) and the ability to upload projects, folders and specific files from the Projects/Files v... | [
"netbeans",
"ftp"
] | 1 | 4 | 11,792 | 3 | 0 | 2008-08-21T17:26:18.803000 | 2008-08-21T17:37:48.150000 |
20,598 | 20,605 | If I have a PHP string in the format YYYY-DD-MM and a timestamp in MySQL, is there a good way to convert between them? | I'm interested in doing comparisons between the date string and the MySQL timestamp. However, I'm not seeing an easy conversion. Am I overlooking something obvious? | Converting from timestamp to format: date('Y-m-d', $timestamp); Converting from formatted to timestamp: mktime(0, 0, 0, $month, $day, $year, $is_dst); See date and mktime for further documentation. When it comes to storing it's up to you whether to use the MySQL DATE format for stroing as a formatted date; as an intege... | If I have a PHP string in the format YYYY-DD-MM and a timestamp in MySQL, is there a good way to convert between them? I'm interested in doing comparisons between the date string and the MySQL timestamp. However, I'm not seeing an easy conversion. Am I overlooking something obvious? | TITLE:
If I have a PHP string in the format YYYY-DD-MM and a timestamp in MySQL, is there a good way to convert between them?
QUESTION:
I'm interested in doing comparisons between the date string and the MySQL timestamp. However, I'm not seeing an easy conversion. Am I overlooking something obvious?
ANSWER:
Convertin... | [
"php",
"mysql",
"time",
"timestamp",
"date"
] | 6 | 14 | 13,891 | 6 | 0 | 2008-08-21T17:26:23.060000 | 2008-08-21T17:29:34.113000 |
20,611 | 20,625 | Removing nodes from an XmlDocument | The following code should find the appropriate project tag and remove it from the XmlDocument, however when I test it, it says: The node to be removed is not a child of this node. Does anyone know the proper way to do this? public void DeleteProject (string projectName) { string ccConfigPath = ConfigurationManager.AppS... | Instead of configDoc.RemoveChild(projectNodes[i]); try projectNodes[i].parentNode.RemoveChild(projectNodes[i]); | Removing nodes from an XmlDocument The following code should find the appropriate project tag and remove it from the XmlDocument, however when I test it, it says: The node to be removed is not a child of this node. Does anyone know the proper way to do this? public void DeleteProject (string projectName) { string ccCon... | TITLE:
Removing nodes from an XmlDocument
QUESTION:
The following code should find the appropriate project tag and remove it from the XmlDocument, however when I test it, it says: The node to be removed is not a child of this node. Does anyone know the proper way to do this? public void DeleteProject (string projectNa... | [
"c#",
".net",
"xml",
"xmldocument"
] | 51 | 74 | 99,263 | 6 | 0 | 2008-08-21T17:31:27.247000 | 2008-08-21T17:38:54.670000 |
20,627 | 20,637 | why are downloads sometimes tagged md5, sha1 and other hash indicators? | I've seen this all over the place: Download here! SHA1 = 8e1ed2ce9e7e473d38a9dc7824a384a9ac34d7d0 What does it mean? How does a hash come into play as far as downloads and... What use can I make of it? Is this a legacy item where you used to have to verify some checksum after you downloaded the whole file? | It's a security measure. It allows you to verify that the file you just downloaded is the one that the author posted to the site. Note that using hashes from the same website you're getting the files from is not especially secure. Often a good place to get them from is a mailing list announcement where a PGP-signed ema... | why are downloads sometimes tagged md5, sha1 and other hash indicators? I've seen this all over the place: Download here! SHA1 = 8e1ed2ce9e7e473d38a9dc7824a384a9ac34d7d0 What does it mean? How does a hash come into play as far as downloads and... What use can I make of it? Is this a legacy item where you used to have t... | TITLE:
why are downloads sometimes tagged md5, sha1 and other hash indicators?
QUESTION:
I've seen this all over the place: Download here! SHA1 = 8e1ed2ce9e7e473d38a9dc7824a384a9ac34d7d0 What does it mean? How does a hash come into play as far as downloads and... What use can I make of it? Is this a legacy item where ... | [
"hash",
"checksum",
"download"
] | 7 | 21 | 3,052 | 7 | 0 | 2008-08-21T17:39:03.390000 | 2008-08-21T17:41:36.347000 |
20,658 | 20,679 | Determine if my PC supports HW Virtualization | How, in general, does one determine if a PC supports hardware virtualization? I use VirtualPC to set up parallel test environments and I'd enjoy a bit of a speed boost. | Download this: http://www.cpuid.com/cpuz.php Also check, http://en.wikipedia.org/wiki/X86_virtualization Edit: Additional, I know it's for XEN but the instructions are the same for all VMs that want hardware support. http://wiki.xensource.com/xenwiki/HVM_Compatible_Processors I can't try it from work, but I'm sure it c... | Determine if my PC supports HW Virtualization How, in general, does one determine if a PC supports hardware virtualization? I use VirtualPC to set up parallel test environments and I'd enjoy a bit of a speed boost. | TITLE:
Determine if my PC supports HW Virtualization
QUESTION:
How, in general, does one determine if a PC supports hardware virtualization? I use VirtualPC to set up parallel test environments and I'd enjoy a bit of a speed boost.
ANSWER:
Download this: http://www.cpuid.com/cpuz.php Also check, http://en.wikipedia.o... | [
"virtualization",
"virtual-pc"
] | 6 | 11 | 14,439 | 8 | 0 | 2008-08-21T17:52:09.723000 | 2008-08-21T18:05:10.283000 |
20,663 | 20,698 | Do you use AOP (Aspect Oriented Programming) in production software? | AOP is an interesting programming paradigm in my opinion. However, there haven't been discussions about it yet here on stackoverflow (at least I couldn't find them). What do you think about it in general? Do you use AOP in your projects? Or do you think it's rather a niche technology that won't be around for a long tim... | Yes. Orthogonal concerns, like security, are best done with AOP-style interception. Whether that is done automatically (through something like a dependency injection container) or manually is unimportant to the end goal. One example: the "before/after" attributes in xUnit.net (an open source project I run) are a form o... | Do you use AOP (Aspect Oriented Programming) in production software? AOP is an interesting programming paradigm in my opinion. However, there haven't been discussions about it yet here on stackoverflow (at least I couldn't find them). What do you think about it in general? Do you use AOP in your projects? Or do you thi... | TITLE:
Do you use AOP (Aspect Oriented Programming) in production software?
QUESTION:
AOP is an interesting programming paradigm in my opinion. However, there haven't been discussions about it yet here on stackoverflow (at least I couldn't find them). What do you think about it in general? Do you use AOP in your proje... | [
"aop",
"paradigms"
] | 38 | 15 | 9,759 | 11 | 0 | 2008-08-21T17:56:10.307000 | 2008-08-21T18:14:55.037000 |
20,674 | 20,746 | Is there a way to call a private Class method from an instance in Ruby? | Other than self.class.send:method, args..., of course. I'd like to make a rather complex method available at both the class and instance level without duplicating the code. UPDATE: @Jonathan Branam: that was my assumption, but I wanted to make sure nobody else had found a way around. Visibility in Ruby is very differen... | Here is a code snippet to go along with the question. Using "private" in a class definition does not apply to class methods. You need to use "private_class_method" as in the following example. class Foo def self.private_bar # Complex logic goes here puts "hi" end private_class_method:private_bar class < I don't see a w... | Is there a way to call a private Class method from an instance in Ruby? Other than self.class.send:method, args..., of course. I'd like to make a rather complex method available at both the class and instance level without duplicating the code. UPDATE: @Jonathan Branam: that was my assumption, but I wanted to make sure... | TITLE:
Is there a way to call a private Class method from an instance in Ruby?
QUESTION:
Other than self.class.send:method, args..., of course. I'd like to make a rather complex method available at both the class and instance level without duplicating the code. UPDATE: @Jonathan Branam: that was my assumption, but I w... | [
"ruby",
"scope",
"visibility",
"class-method",
"access-specifier"
] | 18 | 12 | 20,125 | 8 | 0 | 2008-08-21T18:02:04.973000 | 2008-08-21T18:42:39.663000 |
20,675 | 20,678 | ASP/VBScript - Int() vs CInt() | What is the difference in ASP/VBScript between Int() and CInt()? | Int() The Int function returns the integer part of a specified number. CInt() The CInt function converts an expression to type Integer. And the best answer comes from MSDN CInt differs from the Fix and Int functions, which truncate, rather than round, the fractional part of a number. When the fractional part is exactly... | ASP/VBScript - Int() vs CInt() What is the difference in ASP/VBScript between Int() and CInt()? | TITLE:
ASP/VBScript - Int() vs CInt()
QUESTION:
What is the difference in ASP/VBScript between Int() and CInt()?
ANSWER:
Int() The Int function returns the integer part of a specified number. CInt() The CInt function converts an expression to type Integer. And the best answer comes from MSDN CInt differs from the Fix... | [
"asp-classic",
"vbscript"
] | 25 | 40 | 60,576 | 4 | 0 | 2008-08-21T18:02:48.263000 | 2008-08-21T18:04:43.407000 |
20,684 | 20,694 | Linq to SQL - Underlying Column Length | I've been using Linq to SQL for some time now and I find it to be really helpful and easy to use. With other ORM tools I've used in the past, the entity object filled from the database normally has a property indicating the length of the underlying data column in the database. This is helpful in databinding situations ... | Using the LINQ ColumnAttribute to Get Field Lengths from your Database: http://www.codeproject.com/KB/cs/LinqColumnAttributeTricks.aspx | Linq to SQL - Underlying Column Length I've been using Linq to SQL for some time now and I find it to be really helpful and easy to use. With other ORM tools I've used in the past, the entity object filled from the database normally has a property indicating the length of the underlying data column in the database. Thi... | TITLE:
Linq to SQL - Underlying Column Length
QUESTION:
I've been using Linq to SQL for some time now and I find it to be really helpful and easy to use. With other ORM tools I've used in the past, the entity object filled from the database normally has a property indicating the length of the underlying data column in... | [
"linq-to-sql"
] | 8 | 7 | 5,624 | 3 | 0 | 2008-08-21T18:07:33.710000 | 2008-08-21T18:11:20.003000 |
20,696 | 37,438 | How do I declare a list of fixed length in specman? | In E (specman) I want to declare variables that are lists, and I want to fix their lengths. It's easy to do for a member of a struct: thread[2]: list of thread_t; while for a "regular" variable in a function the above doesn't work, and I have to do something like: var warned: list of bool; gen warned keeping { it.size(... | A hard keep like you have is only going to fix the size at initialization but elements could still be added or dropped later, are you trying to guard against this condition? The only way I can think of to guarantee that elements aren't added or dropped later is emitting an event synced on the size!= the predetermined a... | How do I declare a list of fixed length in specman? In E (specman) I want to declare variables that are lists, and I want to fix their lengths. It's easy to do for a member of a struct: thread[2]: list of thread_t; while for a "regular" variable in a function the above doesn't work, and I have to do something like: var... | TITLE:
How do I declare a list of fixed length in specman?
QUESTION:
In E (specman) I want to declare variables that are lists, and I want to fix their lengths. It's easy to do for a member of a struct: thread[2]: list of thread_t; while for a "regular" variable in a function the above doesn't work, and I have to do s... | [
"specman"
] | 1 | 4 | 2,075 | 2 | 0 | 2008-08-21T18:13:01.157000 | 2008-09-01T04:05:48.810000 |
20,718 | 20,904 | Testing .NET code in partial trust environments | I want to test the behavior of a certain piece of.NET code in partial trust environments. What's the fastest way to set this up? Feel free to assume that I (and other readers) are total CAS noobs. @Nick: Thanks for the reply. Alas, the tool in question is explicitly for unmanaged code. I didn't say "managed" in my ques... | This is an excellent question, especially from a TDD point of view and validating code under different trust scenarios. I think the way I'd approach this would be something along the lines of - Create an AppDomain in my TDD code using the AppDomain.CreateDomain() overload that allows you to pass in a PermissionSet. The... | Testing .NET code in partial trust environments I want to test the behavior of a certain piece of.NET code in partial trust environments. What's the fastest way to set this up? Feel free to assume that I (and other readers) are total CAS noobs. @Nick: Thanks for the reply. Alas, the tool in question is explicitly for u... | TITLE:
Testing .NET code in partial trust environments
QUESTION:
I want to test the behavior of a certain piece of.NET code in partial trust environments. What's the fastest way to set this up? Feel free to assume that I (and other readers) are total CAS noobs. @Nick: Thanks for the reply. Alas, the tool in question i... | [
".net",
"code-access-security"
] | 5 | 3 | 828 | 5 | 0 | 2008-08-21T18:29:42.847000 | 2008-08-21T19:31:28.097000 |
20,722 | 26,956 | Version detection with Silverlight | How can I efficiently and effectively detect the version and, for that matter, any available information about the instance of Silverlight currently running on the browser? | The Silverlight control only has an IsVersionSupported function, which returns true / false when you give it a version number, e.g.: if(slPlugin.isVersionSupported("2.0")) { alert("I haz some flavour of Silverlight 2"); You can be as specific as you want when checking the build, since the version string can include all... | Version detection with Silverlight How can I efficiently and effectively detect the version and, for that matter, any available information about the instance of Silverlight currently running on the browser? | TITLE:
Version detection with Silverlight
QUESTION:
How can I efficiently and effectively detect the version and, for that matter, any available information about the instance of Silverlight currently running on the browser?
ANSWER:
The Silverlight control only has an IsVersionSupported function, which returns true /... | [
"silverlight",
"browser",
"ria"
] | 11 | 7 | 8,889 | 6 | 0 | 2008-08-21T18:30:49.863000 | 2008-08-25T21:31:54.170000 |
20,728 | 20,806 | What's the best way to create ClickOnce deployments | Our team develops distributed winform apps. We use ClickOnce for deployment and are very pleased with it. However, we've found the pain point with ClickOnce is in creating the deployments. We have the standard dev/test/production environments and need to be able to create deployments for each of these that install and ... | I would look at using msbuild. It has built in tasks for handling clickonce deployments. I included some references which will help you get started, if you want to go down this path. It is what I use and I have found it to fit my needs. With a good build process using msbuild, you should be able to accomplish squashing... | What's the best way to create ClickOnce deployments Our team develops distributed winform apps. We use ClickOnce for deployment and are very pleased with it. However, we've found the pain point with ClickOnce is in creating the deployments. We have the standard dev/test/production environments and need to be able to cr... | TITLE:
What's the best way to create ClickOnce deployments
QUESTION:
Our team develops distributed winform apps. We use ClickOnce for deployment and are very pleased with it. However, we've found the pain point with ClickOnce is in creating the deployments. We have the standard dev/test/production environments and nee... | [
"winforms",
"deployment",
"clickonce"
] | 14 | 14 | 2,828 | 2 | 0 | 2008-08-21T18:35:04.410000 | 2008-08-21T19:03:27.523000 |
20,731 | 20,792 | How do you clear a stringstream variable? | I've tried several things already, std::stringstream m; m.empty(); m.clear(); both of which don't work. | For all the standard library types the member function empty() is a query, not a command, i.e. it means "are you empty?" not "please throw away your contents". The clear() member function is inherited from ios and is used to clear the error state of the stream, e.g. if a file stream has the error state set to eofbit (e... | How do you clear a stringstream variable? I've tried several things already, std::stringstream m; m.empty(); m.clear(); both of which don't work. | TITLE:
How do you clear a stringstream variable?
QUESTION:
I've tried several things already, std::stringstream m; m.empty(); m.clear(); both of which don't work.
ANSWER:
For all the standard library types the member function empty() is a query, not a command, i.e. it means "are you empty?" not "please throw away you... | [
"c++",
"stringstream"
] | 593 | 933 | 523,064 | 10 | 0 | 2008-08-21T18:35:57.997000 | 2008-08-21T19:00:25.143000 |
20,734 | 20,784 | Red-Black Trees | I've seen binary trees and binary searching mentioned in several books I've read lately, but as I'm still at the beginning of my studies in Computer Science, I've yet to take a class that's really dealt with algorithms and data structures in a serious way. I've checked around the typical sources (Wikipedia, Google) and... | Red Black trees are good for creating well-balanced trees. The major problem with binary search trees is that you can make them unbalanced very easily. Imagine your first number is a 15. Then all the numbers after that are increasingly smaller than 15. You'll have a tree that is very heavy on the left side and has noth... | Red-Black Trees I've seen binary trees and binary searching mentioned in several books I've read lately, but as I'm still at the beginning of my studies in Computer Science, I've yet to take a class that's really dealt with algorithms and data structures in a serious way. I've checked around the typical sources (Wikipe... | TITLE:
Red-Black Trees
QUESTION:
I've seen binary trees and binary searching mentioned in several books I've read lately, but as I'm still at the beginning of my studies in Computer Science, I've yet to take a class that's really dealt with algorithms and data structures in a serious way. I've checked around the typic... | [
"algorithm",
"binary-tree",
"red-black-tree"
] | 57 | 57 | 16,000 | 12 | 0 | 2008-08-21T18:37:15.620000 | 2008-08-21T18:56:16.917000 |
20,744 | 886,149 | SQL Reporting Services viewer for webpage - can you move the View Report button? | Using the viewer control for display of SQL Reporting Services reports on web page (Microsoft.ReportViewer.WebForms), can you move the View Report button? It defaults to the very right side of the report, which means you have to scroll all the way across before the button is visible. Not a problem for reports that fit ... | It's kind of a hack, but you can move it in JavaScript. Just see what HTML the ReportViewer generates, and write the appropriate JavaScript code to move the button. I used JavaScript to hide the button (because we wanted our own View Report button). Any JavaScript code that manipulates the generated ReportViewer's HTML... | SQL Reporting Services viewer for webpage - can you move the View Report button? Using the viewer control for display of SQL Reporting Services reports on web page (Microsoft.ReportViewer.WebForms), can you move the View Report button? It defaults to the very right side of the report, which means you have to scroll all... | TITLE:
SQL Reporting Services viewer for webpage - can you move the View Report button?
QUESTION:
Using the viewer control for display of SQL Reporting Services reports on web page (Microsoft.ReportViewer.WebForms), can you move the View Report button? It defaults to the very right side of the report, which means you ... | [
"asp.net",
"reporting-services",
"reportviewer"
] | 6 | 2 | 12,025 | 5 | 0 | 2008-08-21T18:42:14.377000 | 2009-05-20T04:37:34.663000 |
20,762 | 20,777 | How do you remove invalid hexadecimal characters from an XML-based data source prior to constructing an XmlReader or XPathDocument that uses the data? | Is there any easy/general way to clean an XML based data source prior to using it in an XmlReader so that I can gracefully consume XML data that is non-conformant to the hexadecimal character restrictions placed on XML? Note: The solution needs to handle XML data sources that use character encodings other than UTF-8, e... | It may not be perfect (emphasis added since people missing this disclaimer), but what I've done in that case is below. You can adjust to use with a stream. /// /// Removes control characters and other non-UTF-8 characters /// /// The string to process /// A string with no control characters or entities above 0x00FD pub... | How do you remove invalid hexadecimal characters from an XML-based data source prior to constructing an XmlReader or XPathDocument that uses the data? Is there any easy/general way to clean an XML based data source prior to using it in an XmlReader so that I can gracefully consume XML data that is non-conformant to the... | TITLE:
How do you remove invalid hexadecimal characters from an XML-based data source prior to constructing an XmlReader or XPathDocument that uses the data?
QUESTION:
Is there any easy/general way to clean an XML based data source prior to using it in an XmlReader so that I can gracefully consume XML data that is non... | [
"c#",
"xml",
"validation",
"encoding"
] | 75 | 78 | 106,226 | 14 | 0 | 2008-08-21T18:47:49.263000 | 2008-08-21T18:50:58.553000 |
20,765 | 20,793 | XRef Relationships in dbml | So I have a database schema like this: Users UserId RoleUserXRef RoleUserId RoleId UserId Roles RoleId Name With foreign keys defined between User & RoleUserXRef and RoleUserXRef & Role. Basically, I have a one to many relationship between users and roles. How would I model this in dbml, such that the generated User cl... | Creating a many-to-many releationship via simple DBML manipulation is not supported currently. You can extend the partial class to manually create properties, if you really want that sort of functionality "built in". | XRef Relationships in dbml So I have a database schema like this: Users UserId RoleUserXRef RoleUserId RoleId UserId Roles RoleId Name With foreign keys defined between User & RoleUserXRef and RoleUserXRef & Role. Basically, I have a one to many relationship between users and roles. How would I model this in dbml, such... | TITLE:
XRef Relationships in dbml
QUESTION:
So I have a database schema like this: Users UserId RoleUserXRef RoleUserId RoleId UserId Roles RoleId Name With foreign keys defined between User & RoleUserXRef and RoleUserXRef & Role. Basically, I have a one to many relationship between users and roles. How would I model ... | [
"oop",
"linq-to-sql",
"many-to-many"
] | 1 | 1 | 422 | 1 | 0 | 2008-08-21T18:49:01.990000 | 2008-08-21T19:00:29.777000 |
20,778 | 20,779 | How do you convert binary data to Strings and back in Java? | I have binary data in a file that I can read into a byte array and process with no problem. Now I need to send parts of the data over a network connection as elements in an XML document. My problem is that when I convert the data from an array of bytes to a String and back to an array of bytes, the data is getting corr... | If you encode it in base64, this will turn any data into ascii safe text, but base64 encoded data is larger than the orignal data | How do you convert binary data to Strings and back in Java? I have binary data in a file that I can read into a byte array and process with no problem. Now I need to send parts of the data over a network connection as elements in an XML document. My problem is that when I convert the data from an array of bytes to a St... | TITLE:
How do you convert binary data to Strings and back in Java?
QUESTION:
I have binary data in a file that I can read into a byte array and process with no problem. Now I need to send parts of the data over a network connection as elements in an XML document. My problem is that when I convert the data from an arra... | [
"java",
"serialization"
] | 29 | 21 | 105,948 | 4 | 0 | 2008-08-21T18:51:52.933000 | 2008-08-21T18:54:06.487000 |
20,782 | 23,056 | Call Project Server Interface web method from an msi installer | I'm using a Visual Studio web setup project to install an application that extends the functionality of Project Server. I want to call a method from the PSI ( Project Server Interface ) from one of the custom actions of my setup project, but every time a get a "401 Unauthorized access" error. What should I do to be abl... | It sounds like in the console situation you are running with your current user credentials, which have access to the PSI. When running from the web, it's running with the creds of the IIS application instance. I think you'd either need to set up delegation to pass the session creds to the IIS application, or use some s... | Call Project Server Interface web method from an msi installer I'm using a Visual Studio web setup project to install an application that extends the functionality of Project Server. I want to call a method from the PSI ( Project Server Interface ) from one of the custom actions of my setup project, but every time a ge... | TITLE:
Call Project Server Interface web method from an msi installer
QUESTION:
I'm using a Visual Studio web setup project to install an application that extends the functionality of Project Server. I want to call a method from the PSI ( Project Server Interface ) from one of the custom actions of my setup project, b... | [
"windows-installer",
"methods",
"action"
] | 2 | 3 | 532 | 2 | 0 | 2008-08-21T18:55:15.907000 | 2008-08-22T18:04:40.247000 |
20,787 | 20,813 | When to use STL bitsets instead of separate variables? | In what situation would it be more appropriate for me to use a bitset (STL container) to manage a set of flags rather than having them declared as a number of separate (bool) variables? Will I get a significant performance gain if I used a bitset for 50 flags rather than using 50 separate bool variables? | Well, 50 bools as a bitset will take 7 bytes, while 50 bools as bools will take 50 bytes. These days that's not really a big deal, so using bools is probably fine. However, one place a bitset might be useful is if you need to pass those bools around a lot, especially if you need to return the set from a function. Using... | When to use STL bitsets instead of separate variables? In what situation would it be more appropriate for me to use a bitset (STL container) to manage a set of flags rather than having them declared as a number of separate (bool) variables? Will I get a significant performance gain if I used a bitset for 50 flags rathe... | TITLE:
When to use STL bitsets instead of separate variables?
QUESTION:
In what situation would it be more appropriate for me to use a bitset (STL container) to manage a set of flags rather than having them declared as a number of separate (bool) variables? Will I get a significant performance gain if I used a bitset ... | [
"c++",
"performance",
"bitsets"
] | 16 | 10 | 10,206 | 4 | 0 | 2008-08-21T18:57:59.830000 | 2008-08-21T19:05:30.763000 |
20,791 | 22,173 | How do I set up a test cert for an SSL connection in .NET? | I would like to create an SSL connection for generic TCP communication. I think I figured out how to do it in the code, using the info here: http://msdn.microsoft.com/en-us/library/system.net.security.sslstream.aspx What I'm having trouble with is creating a cert so I can test this out. I tried makecert.exe testCert, a... | I haven't found a simple way to do this yet, but I found this site helpful a few months back. O'Reilly also published a book called Network Security Hacks (available on Safari) that has a section starting at Hack #45 on creating your own certificate authority. | How do I set up a test cert for an SSL connection in .NET? I would like to create an SSL connection for generic TCP communication. I think I figured out how to do it in the code, using the info here: http://msdn.microsoft.com/en-us/library/system.net.security.sslstream.aspx What I'm having trouble with is creating a ce... | TITLE:
How do I set up a test cert for an SSL connection in .NET?
QUESTION:
I would like to create an SSL connection for generic TCP communication. I think I figured out how to do it in the code, using the info here: http://msdn.microsoft.com/en-us/library/system.net.security.sslstream.aspx What I'm having trouble wit... | [
".net"
] | 5 | 2 | 378 | 3 | 0 | 2008-08-21T19:00:04.287000 | 2008-08-22T12:11:27.273000 |
20,794 | 26,957 | Find broken symlinks with Python | If I call os.stat() on a broken symlink, python throws an OSError exception. This makes it useful for finding them. However, there are a few other reasons that os.stat() might throw a similar exception. Is there a more precise way of detecting broken symlinks with Python under Linux? | A common Python saying is that it's easier to ask forgiveness than permission. While I'm not a fan of this statement in real life, it does apply in a lot of cases. Usually you want to avoid code that chains two system calls on the same file, because you never know what will happen to the file in between your two calls ... | Find broken symlinks with Python If I call os.stat() on a broken symlink, python throws an OSError exception. This makes it useful for finding them. However, there are a few other reasons that os.stat() might throw a similar exception. Is there a more precise way of detecting broken symlinks with Python under Linux? | TITLE:
Find broken symlinks with Python
QUESTION:
If I call os.stat() on a broken symlink, python throws an OSError exception. This makes it useful for finding them. However, there are a few other reasons that os.stat() might throw a similar exception. Is there a more precise way of detecting broken symlinks with Pyth... | [
"python",
"linux",
"symlink"
] | 34 | 34 | 30,709 | 9 | 0 | 2008-08-21T19:00:52.053000 | 2008-08-25T21:32:20.550000 |
20,797 | 20,949 | How to split a byte array | I have a byte array in memory, read from a file. I would like to split the byte array at a certain point (index) without having to just create a new byte array and copy each byte at a time, increasing the in memory foot print of the operation. What I would like is something like this: byte[] largeBytes = [1,2,3,4,5,6,7... | This is how I would do that: using System; using System.Collections; using System.Collections.Generic;
class ArrayView: IEnumerable { private readonly T[] array; private readonly int offset, count;
public ArrayView(T[] array, int offset, int count) { this.array = array; this.offset = offset; this.count = count; }
pu... | How to split a byte array I have a byte array in memory, read from a file. I would like to split the byte array at a certain point (index) without having to just create a new byte array and copy each byte at a time, increasing the in memory foot print of the operation. What I would like is something like this: byte[] l... | TITLE:
How to split a byte array
QUESTION:
I have a byte array in memory, read from a file. I would like to split the byte array at a certain point (index) without having to just create a new byte array and copy each byte at a time, increasing the in memory foot print of the operation. What I would like is something l... | [
"c#",
"arrays",
"split"
] | 38 | 15 | 77,920 | 8 | 0 | 2008-08-21T19:01:28.043000 | 2008-08-21T19:47:39.070000 |
20,811 | 36,983 | Automate Syncing Oracle Tables With MySQL Tables | The university I work at uses Oracle for the database system. We currently have programs we run at night to download what we need into some local Access tables for our testing needs. Access is getting to small for this now and we need something bigger. Also, the nightly jobs require constant maintance to keep working (... | I don't think there is really anything that is going to do this. If you could setup a local Oracle database, then most likely you could as oracle has various means of keeping two databases "in sync", provided they are both Oracle. If you must use mysql, then likely you are going to just have to write something to sync ... | Automate Syncing Oracle Tables With MySQL Tables The university I work at uses Oracle for the database system. We currently have programs we run at night to download what we need into some local Access tables for our testing needs. Access is getting to small for this now and we need something bigger. Also, the nightly ... | TITLE:
Automate Syncing Oracle Tables With MySQL Tables
QUESTION:
The university I work at uses Oracle for the database system. We currently have programs we run at night to download what we need into some local Access tables for our testing needs. Access is getting to small for this now and we need something bigger. ... | [
"mysql",
"database",
"oracle"
] | 0 | 1 | 7,037 | 4 | 0 | 2008-08-21T19:05:20.890000 | 2008-08-31T17:24:19.227000 |
20,821 | 97,553 | SQL 2005 Reporting Services custom report item (CRI) - what are the limits? | Reading MSDN (and other sources) about custom report items (CRI) for reporting services 2005. It looks like I'm limited to generating a bitmap. Not even with some mapping overlay for detecting mouse clicks on it. Is there away to go around this? There are two things I would like to do: Embed HTML directly into the repo... | You didn't missing anything. For me, like you mentioned, the main disadvantage is, that with a CRI you can only render images. You don't get any scalable text or something similar. If you want include swf, you need to render it as static image. | SQL 2005 Reporting Services custom report item (CRI) - what are the limits? Reading MSDN (and other sources) about custom report items (CRI) for reporting services 2005. It looks like I'm limited to generating a bitmap. Not even with some mapping overlay for detecting mouse clicks on it. Is there away to go around this... | TITLE:
SQL 2005 Reporting Services custom report item (CRI) - what are the limits?
QUESTION:
Reading MSDN (and other sources) about custom report items (CRI) for reporting services 2005. It looks like I'm limited to generating a bitmap. Not even with some mapping overlay for detecting mouse clicks on it. Is there away... | [
"reporting-services",
"reportingservices-2005"
] | 4 | 1 | 2,724 | 3 | 0 | 2008-08-21T19:08:01.430000 | 2008-09-18T22:14:09.813000 |
20,840 | 20,890 | SQL Server - Dirty Reads Pros & Cons | Why should I or shouldn't I use dirty reads: set transaction isolation level read uncommitted in SQL Server? | From MSDN: When this option is set, it is possible to read uncommitted or dirty data; values in the data can be changed and rows can appear or disappear in the data set before the end of the transaction. Simply put, when you are using this isolation level, and you are performing multiple queries on an active table as p... | SQL Server - Dirty Reads Pros & Cons Why should I or shouldn't I use dirty reads: set transaction isolation level read uncommitted in SQL Server? | TITLE:
SQL Server - Dirty Reads Pros & Cons
QUESTION:
Why should I or shouldn't I use dirty reads: set transaction isolation level read uncommitted in SQL Server?
ANSWER:
From MSDN: When this option is set, it is possible to read uncommitted or dirty data; values in the data can be changed and rows can appear or disa... | [
"sql",
"sql-server"
] | 9 | 15 | 34,054 | 4 | 0 | 2008-08-21T19:12:59.013000 | 2008-08-21T19:28:31.847000 |
20,850 | 36,907 | How to stop NTFS volume auto-mounting on OS X? | I'm a bit newbieish when it comes to the deeper parts of OSX configuration and am having to put up with a fairly irritating niggle which while I can put up with it, I know under Windows I could have sorted in minutes. Basically, I have an external disk with two volumes: One is an HFS+ volume which I use for TimeMachine... | The following entry in /etc/fstab will do what you want, even on 10.5 (Leopard): LABEL=VolumeName none ntfs noauto If the file is not already there, just create it. Do not use /etc/fstab.hd! No reloading of diskarbitrationd needed. If this still doesn't work for you, maybe you can find a hint in the syslog. | How to stop NTFS volume auto-mounting on OS X? I'm a bit newbieish when it comes to the deeper parts of OSX configuration and am having to put up with a fairly irritating niggle which while I can put up with it, I know under Windows I could have sorted in minutes. Basically, I have an external disk with two volumes: On... | TITLE:
How to stop NTFS volume auto-mounting on OS X?
QUESTION:
I'm a bit newbieish when it comes to the deeper parts of OSX configuration and am having to put up with a fairly irritating niggle which while I can put up with it, I know under Windows I could have sorted in minutes. Basically, I have an external disk wi... | [
"macos",
"hardware"
] | 2 | 3 | 5,604 | 2 | 0 | 2008-08-21T19:16:27.803000 | 2008-08-31T15:17:14.290000 |
20,856 | 20,871 | Recommended SQL database design for tags or tagging | I've heard of a few ways to implement tagging; using a mapping table between TagID and ItemID (makes sense to me, but does it scale?), adding a fixed number of possible TagID columns to ItemID (seems like a bad idea), Keeping tags in a text column that's comma separated (sounds crazy but could work). I've even heard so... | Three tables (one for storing all items, one for all tags, and one for the relation between the two), properly indexed, with foreign keys set running on a proper database, should work well and scale properly. Table: Item Columns: ItemID, Title, Content
Table: Tag Columns: TagID, Title
Table: ItemTag Columns: ItemID, ... | Recommended SQL database design for tags or tagging I've heard of a few ways to implement tagging; using a mapping table between TagID and ItemID (makes sense to me, but does it scale?), adding a fixed number of possible TagID columns to ItemID (seems like a bad idea), Keeping tags in a text column that's comma separat... | TITLE:
Recommended SQL database design for tags or tagging
QUESTION:
I've heard of a few ways to implement tagging; using a mapping table between TagID and ItemID (makes sense to me, but does it scale?), adding a fixed number of possible TagID columns to ItemID (seems like a bad idea), Keeping tags in a text column th... | [
"sql",
"database-design",
"tags",
"data-modeling",
"tagging"
] | 343 | 476 | 141,337 | 6 | 1 | 2008-08-21T19:18:05.773000 | 2008-08-21T19:22:44.013000 |
20,861 | 20,982 | Automated Web Service Testing | I would like to do some integration testing of a web service from within NUnit or MBUnit. I haven't delved into this too deeply yet, but I am pretty sure I will need to spin up WebDev.WebServer.exe within the "unit test" to do this. (I know it's not really a unit test). Yes, I can test the underlying objects the web se... | I found this post and this one which have some solutions on how to start up WebDev.WebServer.exe from within a unit test. Looks like I'll need to do something along these lines. Until I get that going, I found that what works is to simply run the web service project within VS, let the WebDev server start up that way, a... | Automated Web Service Testing I would like to do some integration testing of a web service from within NUnit or MBUnit. I haven't delved into this too deeply yet, but I am pretty sure I will need to spin up WebDev.WebServer.exe within the "unit test" to do this. (I know it's not really a unit test). Yes, I can test the... | TITLE:
Automated Web Service Testing
QUESTION:
I would like to do some integration testing of a web service from within NUnit or MBUnit. I haven't delved into this too deeply yet, but I am pretty sure I will need to spin up WebDev.WebServer.exe within the "unit test" to do this. (I know it's not really a unit test). Y... | [
"web-services",
"unit-testing",
"integration-testing"
] | 5 | 1 | 6,620 | 6 | 0 | 2008-08-21T19:19:47.173000 | 2008-08-21T19:57:33.963000 |
20,876 | 20,895 | Best way to perform dynamic subquery in MS Reporting Services? | I'm new to SQL Server Reporting Services, and was wondering the best way to do the following: Query to get a list of popular IDs Subquery on each item to get properties from another table Ideally, the final report columns would look like this: [ID] [property1] [property2] [SELECT COUNT(*) FROM AnotherTable WHERE Foreig... | I would recommend using a SubReport. You would place the SubReport in a table cell. | Best way to perform dynamic subquery in MS Reporting Services? I'm new to SQL Server Reporting Services, and was wondering the best way to do the following: Query to get a list of popular IDs Subquery on each item to get properties from another table Ideally, the final report columns would look like this: [ID] [propert... | TITLE:
Best way to perform dynamic subquery in MS Reporting Services?
QUESTION:
I'm new to SQL Server Reporting Services, and was wondering the best way to do the following: Query to get a list of popular IDs Subquery on each item to get properties from another table Ideally, the final report columns would look like t... | [
"sql",
"sql-server",
"reporting-services",
"service",
"reporting"
] | 0 | 2 | 10,915 | 3 | 0 | 2008-08-21T19:25:33.680000 | 2008-08-21T19:28:49.757000 |
20,880 | 20,901 | Java JPanel redraw issues | I have a Java swing application with a panel that contains three JComboBoxe s that do not draw properly. The combox boxes just show up as the down arrow on the right side, but without the label of the currently selected value. The boxes will redraw correctly if the window is resized either bigger or smaller by even one... | Can you give us some more information on how you add the combo boxes to the JPanel? This is a pretty common thing to do in Swing so I doubt that it's a JVM issue but I guess anything is possible. Specifically, I would double check to make sure you're not accessing the GUI from any background threads. In this case, mayb... | Java JPanel redraw issues I have a Java swing application with a panel that contains three JComboBoxe s that do not draw properly. The combox boxes just show up as the down arrow on the right side, but without the label of the currently selected value. The boxes will redraw correctly if the window is resized either big... | TITLE:
Java JPanel redraw issues
QUESTION:
I have a Java swing application with a panel that contains three JComboBoxe s that do not draw properly. The combox boxes just show up as the down arrow on the right side, but without the label of the currently selected value. The boxes will redraw correctly if the window is ... | [
"java",
"swing",
"jpanel"
] | 8 | 6 | 3,448 | 1 | 0 | 2008-08-21T19:26:44.003000 | 2008-08-21T19:30:02.547000 |
20,882 | 20,894 | How do I interpret 'netstat -a' output | Some things look strange to me: What is the distinction between 0.0.0.0, 127.0.0.1, and [::]? How should each part of the foreign address be read (part1:part2)? What does a state Time_Wait, Close_Wait mean? etc. Could someone give a quick overview of how to interpret these results? | 0.0.0.0 usually refers to stuff listening on all interfaces. 127.0.0.1 = localhost (only your local interface) I'm not sure about [::] TIME_WAIT means both sides have agreed to close and TCP must now wait a prescribed time before taking the connection down. CLOSE_WAIT means the remote system has finished sending and yo... | How do I interpret 'netstat -a' output Some things look strange to me: What is the distinction between 0.0.0.0, 127.0.0.1, and [::]? How should each part of the foreign address be read (part1:part2)? What does a state Time_Wait, Close_Wait mean? etc. Could someone give a quick overview of how to interpret these results... | TITLE:
How do I interpret 'netstat -a' output
QUESTION:
Some things look strange to me: What is the distinction between 0.0.0.0, 127.0.0.1, and [::]? How should each part of the foreign address be read (part1:part2)? What does a state Time_Wait, Close_Wait mean? etc. Could someone give a quick overview of how to inter... | [
"networking",
"netstat"
] | 30 | 19 | 70,023 | 7 | 0 | 2008-08-21T19:26:48.967000 | 2008-08-21T19:28:47.400000 |
20,899 | 25,178 | My VMware ESX server console volume went readonly. How can I save my VMs? | Two RAID volumes, VMware kernel/console running on a RAID1, vmdks live on a RAID5. Entering a login at the console just results in SCSI errors, no password prompt. Praise be, the VMs are actually still running. We're thinking, though, that upon reboot the kernel may not start again and the VMs will be down. We have dat... | It was the backplane. Both drives of the RAID1 and one drive of the RAID5 were inaccessible. Incredibly, the VMware hypervisor continued to run for three days from memory with no access to its host disk, keeping the VMs it managed alive. At step 3 above we diagnosed the hardware problem and replaced the RAID controller... | My VMware ESX server console volume went readonly. How can I save my VMs? Two RAID volumes, VMware kernel/console running on a RAID1, vmdks live on a RAID5. Entering a login at the console just results in SCSI errors, no password prompt. Praise be, the VMs are actually still running. We're thinking, though, that upon r... | TITLE:
My VMware ESX server console volume went readonly. How can I save my VMs?
QUESTION:
Two RAID volumes, VMware kernel/console running on a RAID1, vmdks live on a RAID5. Entering a login at the console just results in SCSI errors, no password prompt. Praise be, the VMs are actually still running. We're thinking, t... | [
"vmware",
"recovery",
"esx"
] | 0 | 1 | 1,165 | 1 | 0 | 2008-08-21T19:29:47.600000 | 2008-08-24T16:49:19.787000 |
20,910 | 21,035 | Silverlight vs Flex | My company develops several types of applications. A lot of our business comes from doing multimedia-type apps, typically done in Flash. However, now that side of the house is starting to migrate towards doing Flex development. Most of our other development is done using.NET. I'm trying to make a push towards doing Sil... | I think you should look at Silverlight as a long-term play, just as Microsoft seems to be doing. There's an obvious balance on when to use Silverlight vs. Flash when you're concerned about reach and install base, but here are some reasons Silverlight is a good direction to move in: Second mover advantage - Just as Micr... | Silverlight vs Flex My company develops several types of applications. A lot of our business comes from doing multimedia-type apps, typically done in Flash. However, now that side of the house is starting to migrate towards doing Flex development. Most of our other development is done using.NET. I'm trying to make a pu... | TITLE:
Silverlight vs Flex
QUESTION:
My company develops several types of applications. A lot of our business comes from doing multimedia-type apps, typically done in Flash. However, now that side of the house is starting to migrate towards doing Flex development. Most of our other development is done using.NET. I'm t... | [
".net",
"apache-flex",
"flash",
"silverlight"
] | 70 | 52 | 15,491 | 22 | 0 | 2008-08-21T19:34:00.010000 | 2008-08-21T20:11:17.267000 |
20,912 | 20,994 | Symantec Backup Exec 11d RALUS Communications Error | I'm trying to do a file system backup of a RedHat Enterprise Linux v4 server using Symantec Backup Exec 11d (Rev 7170). The backup server is Windows Server 2003. I can browse the target server to create a selection list, and when I do a test run it completes successfully. However, when I run a real backup, the job fail... | Sure sounds like firewall issues. Try stopping iptables, and running again. Also, RALUS can dump a log file - which may give some more to go on. I use the older UNIX agent myself, which uses port 6101 IIRC - but I believe that the newer client uses tcp/10000 for control and 1024-65535 for transfer. Last resort is to fi... | Symantec Backup Exec 11d RALUS Communications Error I'm trying to do a file system backup of a RedHat Enterprise Linux v4 server using Symantec Backup Exec 11d (Rev 7170). The backup server is Windows Server 2003. I can browse the target server to create a selection list, and when I do a test run it completes successfu... | TITLE:
Symantec Backup Exec 11d RALUS Communications Error
QUESTION:
I'm trying to do a file system backup of a RedHat Enterprise Linux v4 server using Symantec Backup Exec 11d (Rev 7170). The backup server is Windows Server 2003. I can browse the target server to create a selection list, and when I do a test run it c... | [
"backup",
"redhat",
"backupexec",
"symantec"
] | 0 | 1 | 1,719 | 2 | 0 | 2008-08-21T19:34:47.060000 | 2008-08-21T19:59:57.280000 |
20,923 | 21,001 | VBScript/IIS - How do I automatically set ASP.NET version for a particular website | I need to script the creation of app pools and websites on IIS 6.0. I have been able to create these using adsutil.vbs and iisweb.vbs, but don't know how to set the version of ASP.NET for the sites I have just created to 2.0.50727.0. Ideally I would like to adsutil.vbs to update the metabase. How do I do this? | @ Chris beat me to the punch on the ADSI way You can do this using the aspnet_regiis.exe tool. There is one of these tools per version of ASP.NET installed on the machine. You could shell out to - This configures ASP.NET 1.1 %windir%\microsoft.net\framework\v1.1.4322\aspnet_regiis -s W3SVC/[iisnumber]/ROOT This configu... | VBScript/IIS - How do I automatically set ASP.NET version for a particular website I need to script the creation of app pools and websites on IIS 6.0. I have been able to create these using adsutil.vbs and iisweb.vbs, but don't know how to set the version of ASP.NET for the sites I have just created to 2.0.50727.0. Ide... | TITLE:
VBScript/IIS - How do I automatically set ASP.NET version for a particular website
QUESTION:
I need to script the creation of app pools and websites on IIS 6.0. I have been able to create these using adsutil.vbs and iisweb.vbs, but don't know how to set the version of ASP.NET for the sites I have just created t... | [
"asp.net",
"iis",
"vbscript",
"system-administration",
"administration"
] | 2 | 6 | 5,561 | 2 | 0 | 2008-08-21T19:39:44.130000 | 2008-08-21T20:01:43.327000 |
20,926 | 20,944 | Nesting HTML- anchor tags | Today I was working on a tab navigation for a webpage. I tried the Sliding Doors approach which worked fine. Then I realized that I must include an option to delete a tab (usually a small X in the right corner of each tab). I wanted to use a nested anchor, which didn't work because it is not allowed. Then I saw the tab... | They must be doing some really crazy stuff with JavaScript to get it to work (notice how neither the parent nor the nested anchor tags have a name or href attribute - all functionality is done through the class name and JS). Here is what the html looks like: Click & Type Page Name X | Nesting HTML- anchor tags Today I was working on a tab navigation for a webpage. I tried the Sliding Doors approach which worked fine. Then I realized that I must include an option to delete a tab (usually a small X in the right corner of each tab). I wanted to use a nested anchor, which didn't work because it is not a... | TITLE:
Nesting HTML- anchor tags
QUESTION:
Today I was working on a tab navigation for a webpage. I tried the Sliding Doors approach which worked fine. Then I realized that I must include an option to delete a tab (usually a small X in the right corner of each tab). I wanted to use a nested anchor, which didn't work b... | [
"html",
"tabs",
"anchor"
] | 12 | 9 | 15,894 | 5 | 0 | 2008-08-21T19:41:07.217000 | 2008-08-21T19:46:12.197000 |
20,927 | 20,983 | Updating an auto_now DateTimeField in a parent model in Django | I've got two models: Message and Attachment. Each attachment is attached to a specific message, using a ForeignKey on the Attachment model. Both models have an auto_now DateTimeField called updated. I'm trying to make it so that when any attachment is saved, it also sets the updated field on the associated message to n... | You would also need to then save the message. Then it that should work. | Updating an auto_now DateTimeField in a parent model in Django I've got two models: Message and Attachment. Each attachment is attached to a specific message, using a ForeignKey on the Attachment model. Both models have an auto_now DateTimeField called updated. I'm trying to make it so that when any attachment is saved... | TITLE:
Updating an auto_now DateTimeField in a parent model in Django
QUESTION:
I've got two models: Message and Attachment. Each attachment is attached to a specific message, using a ForeignKey on the Attachment model. Both models have an auto_now DateTimeField called updated. I'm trying to make it so that when any a... | [
"python",
"database",
"django",
"orm"
] | 14 | 12 | 2,636 | 3 | 0 | 2008-08-21T19:41:57.870000 | 2008-08-21T19:57:36.410000 |
20,952 | 704,817 | Is there a way to get a System.Configuration.Configuration instance based on arbitrary xml? | I'm trying to unit test a custom ConfigurationSection I've written, and I'd like to load some arbitrary configuration XML into a System.Configuration.Configuration for each test (rather than put the test configuration xml in the Tests.dll.config file. That is, I'd like to do something like this: Configuration testConfi... | There is actually a way I've discovered.... You need to define a new class inheriting from your original configuration section as follows: public class MyXmlCustomConfigSection: MyCustomConfigSection { public MyXmlCustomConfigSection (string configXml) { XmlTextReader reader = new XmlTextReader(new StringReader(configX... | Is there a way to get a System.Configuration.Configuration instance based on arbitrary xml? I'm trying to unit test a custom ConfigurationSection I've written, and I'd like to load some arbitrary configuration XML into a System.Configuration.Configuration for each test (rather than put the test configuration xml in the... | TITLE:
Is there a way to get a System.Configuration.Configuration instance based on arbitrary xml?
QUESTION:
I'm trying to unit test a custom ConfigurationSection I've written, and I'd like to load some arbitrary configuration XML into a System.Configuration.Configuration for each test (rather than put the test config... | [
"c#",
".net",
"testing",
"configuration",
"configurationmanager"
] | 14 | 18 | 4,319 | 3 | 0 | 2008-08-21T19:49:31.050000 | 2009-04-01T09:47:59.623000 |
20,959 | 20,974 | Determine Loaded Assemblies | How can I determine all of the assemblies that my.NET desktop application has loaded? I'd like to put them in the about box so I can query customers over the phone to determine what version of XYZ they have on their PC. It would be nice to see both managed and unmanaged assemblies. I realize the list will get long but ... | using System; using System.Reflection; using System.Windows.Forms;
public class MyAppDomain { public static void Main(string[] args) { AppDomain ad = AppDomain.CurrentDomain; Assembly[] loadedAssemblies = ad.GetAssemblies();
Console.WriteLine("Here are the assemblies loaded in this appdomain\n"); foreach(Assembly a i... | Determine Loaded Assemblies How can I determine all of the assemblies that my.NET desktop application has loaded? I'd like to put them in the about box so I can query customers over the phone to determine what version of XYZ they have on their PC. It would be nice to see both managed and unmanaged assemblies. I realize... | TITLE:
Determine Loaded Assemblies
QUESTION:
How can I determine all of the assemblies that my.NET desktop application has loaded? I'd like to put them in the about box so I can query customers over the phone to determine what version of XYZ they have on their PC. It would be nice to see both managed and unmanaged ass... | [
".net",
"winforms",
"dll",
"assemblies"
] | 10 | 12 | 4,872 | 5 | 0 | 2008-08-21T19:50:44.167000 | 2008-08-21T19:55:15.573000 |
20,993 | 21,031 | Storing logged in user details | When creating a web application, and lets say you have a User object denoting a single user, what do you think is the best way to store that the user has logged in? Two ways I've thought about have been: Stored the user database id in a session variable Stored the entire user object in a session variable Any better sug... | I recommend storing the id rather than the object. The downside is that you have to hit the database every time you want to get that user's information. However, unless every millisecond counts in your page, the performance shouldn't be an issue. Here are two advantages: If the user's information changes somehow, then ... | Storing logged in user details When creating a web application, and lets say you have a User object denoting a single user, what do you think is the best way to store that the user has logged in? Two ways I've thought about have been: Stored the user database id in a session variable Stored the entire user object in a ... | TITLE:
Storing logged in user details
QUESTION:
When creating a web application, and lets say you have a User object denoting a single user, what do you think is the best way to store that the user has logged in? Two ways I've thought about have been: Stored the user database id in a session variable Stored the entire... | [
"web-applications"
] | 9 | 12 | 4,135 | 8 | 0 | 2008-08-21T19:59:57.217000 | 2008-08-21T20:09:47.333000 |
20,998 | 21,074 | Cannot Add a Sql Server Login | When I try to create a SQL Server Login by saying CREATE LOGIN [ourdomain\SQLAccessGroup] FROM WINDOWS; I get this error The server principal 'ourdomain\SQLAccessGroup' already exists. However, when I try this code DROP LOGIN [ourdomain\SQLAccessGroup] I get this error Cannot drop the login 'ourdomain\SQLAccessGroup', ... | We are still struggling to understand the HOW of this issue, but it seems that [ourdomain\SQLAccessGroup] was aliased by a consultant to a different user name (this is part of an MS CRM installation). We finally were able to use some logic and some good old SID comparisons to determine who was playing the imposter game... | Cannot Add a Sql Server Login When I try to create a SQL Server Login by saying CREATE LOGIN [ourdomain\SQLAccessGroup] FROM WINDOWS; I get this error The server principal 'ourdomain\SQLAccessGroup' already exists. However, when I try this code DROP LOGIN [ourdomain\SQLAccessGroup] I get this error Cannot drop the logi... | TITLE:
Cannot Add a Sql Server Login
QUESTION:
When I try to create a SQL Server Login by saying CREATE LOGIN [ourdomain\SQLAccessGroup] FROM WINDOWS; I get this error The server principal 'ourdomain\SQLAccessGroup' already exists. However, when I try this code DROP LOGIN [ourdomain\SQLAccessGroup] I get this error Ca... | [
"sql-server",
"sql-server-2005",
"administration"
] | 11 | 8 | 23,969 | 5 | 0 | 2008-08-21T20:00:59.430000 | 2008-08-21T20:27:04.047000 |
21,052 | 21,056 | "using" namespace equivalent in ASP.NET markup | When I'm working with DataBound controls in ASP.NET 2.0 such as a Repeater, I know the fastest way to retrieve a property of a bound object (instead of using Reflection with the Eval() function) is to cast the DataItem object to the type it is and then use that object natively, like the following: <%#((MyType)Container... | I believe you can add something like: <%@ Import Namespace="RootNamespace.SubNamespace1" %> At the top of the page. | "using" namespace equivalent in ASP.NET markup When I'm working with DataBound controls in ASP.NET 2.0 such as a Repeater, I know the fastest way to retrieve a property of a bound object (instead of using Reflection with the Eval() function) is to cast the DataItem object to the type it is and then use that object nati... | TITLE:
"using" namespace equivalent in ASP.NET markup
QUESTION:
When I'm working with DataBound controls in ASP.NET 2.0 such as a Repeater, I know the fastest way to retrieve a property of a bound object (instead of using Reflection with the Eval() function) is to cast the DataItem object to the type it is and then us... | [
"asp.net"
] | 27 | 65 | 17,909 | 2 | 0 | 2008-08-21T20:20:22.393000 | 2008-08-21T20:21:58.803000 |
21,060 | 21,466 | Is there any way to configure windows to not change the focus? | I'm tired of being in the middle of typing something, having a pop-up with a question appear, and hitting enter before reading it... (it also happens with some windows that are not pop-ups) Do you know if there's some setting I could touch for this not to happen? | It suppose to be a registry change that helps with this type of situations (mentioned in this Coding Horror post about the subject of "focus stealing"). I try it, it doesn't work with all popups but helps with some of them, causing the offending application to flash in the taskbar instead of gain focus. | Is there any way to configure windows to not change the focus? I'm tired of being in the middle of typing something, having a pop-up with a question appear, and hitting enter before reading it... (it also happens with some windows that are not pop-ups) Do you know if there's some setting I could touch for this not to h... | TITLE:
Is there any way to configure windows to not change the focus?
QUESTION:
I'm tired of being in the middle of typing something, having a pop-up with a question appear, and hitting enter before reading it... (it also happens with some windows that are not pop-ups) Do you know if there's some setting I could touch... | [
"windows",
"configuration"
] | 1 | 0 | 148 | 3 | 0 | 2008-08-21T20:22:50.283000 | 2008-08-21T23:54:07.730000 |
21,078 | 21,093 | Most efficient way to concatenate strings? | What's the most efficient way to concatenate strings? | The StringBuilder.Append() method is much better than using the + operator. But I've found that, when executing 1000 concatenations or less, String.Join() is even more efficient than StringBuilder. StringBuilder sb = new StringBuilder(); sb.Append(someString); The only problem with String.Join is that you have to conca... | Most efficient way to concatenate strings? What's the most efficient way to concatenate strings? | TITLE:
Most efficient way to concatenate strings?
QUESTION:
What's the most efficient way to concatenate strings?
ANSWER:
The StringBuilder.Append() method is much better than using the + operator. But I've found that, when executing 1000 concatenations or less, String.Join() is even more efficient than StringBuilder... | [
"c#",
".net",
"string",
"performance",
"optimization"
] | 351 | 174 | 274,700 | 18 | 0 | 2008-08-21T20:27:15.497000 | 2008-08-21T20:30:36.677000 |
21,091 | 96,690 | Do you use MDA/MDD/MDSD, any kind of model-driven approach? Will it be the future? | Programming languages had several (r)evolutionary steps in their history. Some people argue that model-driven approaches will be The Next Big Thing. There are tools like openArchitectureWare, AndroMDA, Sculptor/Fornax Platform etc. that promise incredible productivity boosts. However, I made the experience that it is e... | I think, it will take time, till the tools get more refined, more people gain experience with MDD. At the moment if you want to get something out of MDD you have to invest quite a lot, so its use remains limited. Looking at openArchitectureWare for example: While it is quite robust and basic documentation exists, docum... | Do you use MDA/MDD/MDSD, any kind of model-driven approach? Will it be the future? Programming languages had several (r)evolutionary steps in their history. Some people argue that model-driven approaches will be The Next Big Thing. There are tools like openArchitectureWare, AndroMDA, Sculptor/Fornax Platform etc. that ... | TITLE:
Do you use MDA/MDD/MDSD, any kind of model-driven approach? Will it be the future?
QUESTION:
Programming languages had several (r)evolutionary steps in their history. Some people argue that model-driven approaches will be The Next Big Thing. There are tools like openArchitectureWare, AndroMDA, Sculptor/Fornax P... | [
"paradigms",
"model-driven"
] | 7 | 3 | 1,428 | 9 | 0 | 2008-08-21T20:29:48.143000 | 2008-09-18T20:39:25.220000 |
21,133 | 21,189 | Simplest way to profile a PHP script | What's the easiest way to profile a PHP script? I'd love tacking something on that shows me a dump of all function calls and how long they took but I'm also OK with putting something around specific functions. I tried experimenting with the microtime function: $then = microtime(); myFunc(); $now = microtime();
echo sp... | The PECL APD extension is used as follows: After, parse the generated file using pprofp. Example output: Trace for /home/dan/testapd.php Total Elapsed Time = 0.00 Total System Time = 0.00 Total User Time = 0.00
Real User System secs/ cumm %Time (excl/cumm) (excl/cumm) (excl/cumm) Calls call s/call Memory Usage Name --... | Simplest way to profile a PHP script What's the easiest way to profile a PHP script? I'd love tacking something on that shows me a dump of all function calls and how long they took but I'm also OK with putting something around specific functions. I tried experimenting with the microtime function: $then = microtime(); m... | TITLE:
Simplest way to profile a PHP script
QUESTION:
What's the easiest way to profile a PHP script? I'd love tacking something on that shows me a dump of all function calls and how long they took but I'm also OK with putting something around specific functions. I tried experimenting with the microtime function: $the... | [
"php",
"profiling"
] | 323 | 108 | 218,463 | 14 | 0 | 2008-08-21T20:40:38.117000 | 2008-08-21T21:04:17.157000 |
21,137 | 23,481 | Adding NUnit to the options for ASP.NET MVC test framework | I have nUnit installed. I have VS2008 Team Edition installed. I have ASP.Net MVC Preview 4 (Codeplex) installed. How do I make Visual Studio show me nUnit as a testing framework when creating a new MVC project? At this point I still only have the Microsoft Testing Framework as a choice. Update: I installed nUnit 2.5, b... | After a bunch of research and experimentation, I've found the answer. For the record, the current release of nUnit 2.5 Alpha does not seem to contain templates for test projects in Visual Studio 2008. I followed the directions here which describe how to create your own project templates and then add appropriate registr... | Adding NUnit to the options for ASP.NET MVC test framework I have nUnit installed. I have VS2008 Team Edition installed. I have ASP.Net MVC Preview 4 (Codeplex) installed. How do I make Visual Studio show me nUnit as a testing framework when creating a new MVC project? At this point I still only have the Microsoft Test... | TITLE:
Adding NUnit to the options for ASP.NET MVC test framework
QUESTION:
I have nUnit installed. I have VS2008 Team Edition installed. I have ASP.Net MVC Preview 4 (Codeplex) installed. How do I make Visual Studio show me nUnit as a testing framework when creating a new MVC project? At this point I still only have ... | [
"asp.net",
"asp.net-mvc",
"visual-studio",
"unit-testing",
"nunit"
] | 31 | 19 | 8,114 | 4 | 0 | 2008-08-21T20:43:29.220000 | 2008-08-22T21:02:27.777000 |
21,184 | 21,389 | How do I use Linq for paging a generic collection? | I've got a System.Generic.Collections.List(Of MyCustomClass) type object. Given integer varaibles pagesize and pagenumber, how can I query only any single page of MyCustomClass objects? | If you have your linq-query that contains all the rows you want to display, this code can be used: var pageNum = 3; var pageSize = 20; query = query.Skip((pageNum - 1) * pageSize).Take(pageSize); You can also make an extension method on the object to be able to write query.Page(2,50) to get the first 50 records of page... | How do I use Linq for paging a generic collection? I've got a System.Generic.Collections.List(Of MyCustomClass) type object. Given integer varaibles pagesize and pagenumber, how can I query only any single page of MyCustomClass objects? | TITLE:
How do I use Linq for paging a generic collection?
QUESTION:
I've got a System.Generic.Collections.List(Of MyCustomClass) type object. Given integer varaibles pagesize and pagenumber, how can I query only any single page of MyCustomClass objects?
ANSWER:
If you have your linq-query that contains all the rows y... | [
".net",
"linq",
".net-3.5",
"paging"
] | 15 | 30 | 8,375 | 2 | 0 | 2008-08-21T21:03:39.920000 | 2008-08-21T23:02:29.273000 |
21,207 | 24,499 | db4o experiences? | I'm currently trying out db4o (the java version) and I pretty much like what I see. But I cannot help wondering how it does perform in a real live (web-)environment. Does anyone have any experiences (good or bad) to share about running db4o? | We run DB40.NET version in a large client/server project. Our experiences is that you can potentially get much better performance than typical relational databases. However, you really have to tweak your objects to get this kind of performance. For example, if you've got a list containing a lot of objects, DB4O activat... | db4o experiences? I'm currently trying out db4o (the java version) and I pretty much like what I see. But I cannot help wondering how it does perform in a real live (web-)environment. Does anyone have any experiences (good or bad) to share about running db4o? | TITLE:
db4o experiences?
QUESTION:
I'm currently trying out db4o (the java version) and I pretty much like what I see. But I cannot help wondering how it does perform in a real live (web-)environment. Does anyone have any experiences (good or bad) to share about running db4o?
ANSWER:
We run DB40.NET version in a larg... | [
"java",
"db4o"
] | 32 | 56 | 6,837 | 4 | 0 | 2008-08-21T21:12:01.600000 | 2008-08-23T19:03:18.913000 |
21,229 | 21,414 | Visual Web Developer (Express): Setting Document Root for Dev Environment | I'm developing a site in Visual Web Dev Express, and when I run/debug, I'd like to be able to set my application's document root so that I can use safer paths, like "/css/style.css' instead of "css/style.css". How would I accomplish this? | Click on the web site node in the solution explorer. Press F4 to see the properties window. Change the virtual path from /projectname to / Bear in mind that this has an impact on how you expect the application/web site to be deployed. If it is ever used outside the root of a web server, the URL paths will be incorrect. | Visual Web Developer (Express): Setting Document Root for Dev Environment I'm developing a site in Visual Web Dev Express, and when I run/debug, I'd like to be able to set my application's document root so that I can use safer paths, like "/css/style.css' instead of "css/style.css". How would I accomplish this? | TITLE:
Visual Web Developer (Express): Setting Document Root for Dev Environment
QUESTION:
I'm developing a site in Visual Web Dev Express, and when I run/debug, I'd like to be able to set my application's document root so that I can use safer paths, like "/css/style.css' instead of "css/style.css". How would I accomp... | [
"c#",
"asp.net",
"visual-web-developer",
"server-configuration"
] | 1 | 5 | 1,329 | 3 | 0 | 2008-08-21T21:28:20.123000 | 2008-08-21T23:18:56.317000 |
21,243 | 21,434 | Anyone have a link to a technical discussion of anything akin to the Facebook news feed system? | I'm looking for a presentation, PDF, blog post, or whitepaper discussing the technical details of how to filter down and display massive amounts of information for individual users in an intelligent (possibly machine learning) kind of way. I've had coworkers hear presentations on the Facebook news feed but I can't find... | Are you looking for something along the lines of distributed pub/sub with content based filtering? If so, you may want to look into Siena and some of the associated papers such as Design and Evaluation of a Wide-Area Event Notification Service | Anyone have a link to a technical discussion of anything akin to the Facebook news feed system? I'm looking for a presentation, PDF, blog post, or whitepaper discussing the technical details of how to filter down and display massive amounts of information for individual users in an intelligent (possibly machine learnin... | TITLE:
Anyone have a link to a technical discussion of anything akin to the Facebook news feed system?
QUESTION:
I'm looking for a presentation, PDF, blog post, or whitepaper discussing the technical details of how to filter down and display massive amounts of information for individual users in an intelligent (possib... | [
"facebook"
] | 0 | 4 | 285 | 1 | 0 | 2008-08-21T21:38:43.190000 | 2008-08-21T23:33:31.103000 |
21,262 | 21,270 | How do I create a mapping table in SQL Server Management Studio? | I'm learning about table design in SQL and I'm wonder how to create a mapping table in order to establish a many-to-many relationship between two other tables? I think the mapping table needs two primary keys - but I can't see how to create that as it appears there can only be 1 primary key column? I'm using the Databa... | The easiest way is to simply select both fields by selecting the first field, and then while holding down the Ctrl key selecting the second field. Then clicking the key icon to set them both as the primary key. | How do I create a mapping table in SQL Server Management Studio? I'm learning about table design in SQL and I'm wonder how to create a mapping table in order to establish a many-to-many relationship between two other tables? I think the mapping table needs two primary keys - but I can't see how to create that as it app... | TITLE:
How do I create a mapping table in SQL Server Management Studio?
QUESTION:
I'm learning about table design in SQL and I'm wonder how to create a mapping table in order to establish a many-to-many relationship between two other tables? I think the mapping table needs two primary keys - but I can't see how to cre... | [
"sql-server",
"sql-server-2005",
"entity-relationship"
] | 3 | 6 | 6,931 | 1 | 0 | 2008-08-21T21:46:07.413000 | 2008-08-21T21:49:38.840000 |
21,265 | 21,277 | Comparing IEEE floats and doubles for equality | What is the best method for comparing IEEE floats and doubles for equality? I have heard of several methods, but I wanted to see what the community thought. | The best approach I think is to compare ULPs. bool is_nan(float f) { return (*reinterpret_cast (&f) & 0x7f800000) == 0x7f800000 && (*reinterpret_cast (&f) & 0x007fffff)!= 0; }
bool is_finite(float f) { return (*reinterpret_cast (&f) & 0x7f800000)!= 0x7f800000; }
// if this symbol is defined, NaNs are never equal to a... | Comparing IEEE floats and doubles for equality What is the best method for comparing IEEE floats and doubles for equality? I have heard of several methods, but I wanted to see what the community thought. | TITLE:
Comparing IEEE floats and doubles for equality
QUESTION:
What is the best method for comparing IEEE floats and doubles for equality? I have heard of several methods, but I wanted to see what the community thought.
ANSWER:
The best approach I think is to compare ULPs. bool is_nan(float f) { return (*reinterpret... | [
"variables",
"floating-point",
"inequality"
] | 9 | 7 | 5,877 | 15 | 0 | 2008-08-21T21:47:24.230000 | 2008-08-21T21:53:18.350000 |
21,274 | 21,285 | What is the easiest-to-use web "rich text editor" | I am looking for a text editor to be used in a web page. Where users can format the text and get a WYSIWYG experience. Doesn't need to be too fancy. But has to be easy to use and integrate into the page. Has to generate HTML as output. Support AJAX (one I checked works only with standard form submit) and has to be smal... | Well it depends what platform you are on if you are looking for server-side functionality as well, but the defacto badass WYSIWYg in my opinion is FCKeditor. I have worked with this personally in numerous environments (both professional and hobby level) and have always been impressed. It's certainly worth a look. I bel... | What is the easiest-to-use web "rich text editor" I am looking for a text editor to be used in a web page. Where users can format the text and get a WYSIWYG experience. Doesn't need to be too fancy. But has to be easy to use and integrate into the page. Has to generate HTML as output. Support AJAX (one I checked works ... | TITLE:
What is the easiest-to-use web "rich text editor"
QUESTION:
I am looking for a text editor to be used in a web page. Where users can format the text and get a WYSIWYG experience. Doesn't need to be too fancy. But has to be easy to use and integrate into the page. Has to generate HTML as output. Support AJAX (on... | [
"html",
"editor"
] | 14 | 11 | 1,750 | 9 | 0 | 2008-08-21T21:52:17.820000 | 2008-08-21T21:55:59.607000 |
21,280 | 21,292 | Am I missing something about LINQ? | I seem to be missing something about LINQ. To me, it looks like it's taking some of the elements of SQL that I like the least and moving them into the C# language and using them for other things. I mean, I could see the benefit of using SQL-like statements on things other than databases. But if I wanted to write SQL, w... | LINQ is not about SQL. LINQ is about being apply functional programming paradigmns on objects. LINQ to SQL is an ORM built ontop of the LINQ foundation, but LINQ is much more. I don't use LINQ to SQL, yet I use LINQ all the time. Take the task of finding the intersection of two lists: Before LINQ, this tasks requires w... | Am I missing something about LINQ? I seem to be missing something about LINQ. To me, it looks like it's taking some of the elements of SQL that I like the least and moving them into the C# language and using them for other things. I mean, I could see the benefit of using SQL-like statements on things other than databas... | TITLE:
Am I missing something about LINQ?
QUESTION:
I seem to be missing something about LINQ. To me, it looks like it's taking some of the elements of SQL that I like the least and moving them into the C# language and using them for other things. I mean, I could see the benefit of using SQL-like statements on things ... | [
"c#",
"sql",
"linq"
] | 20 | 40 | 1,916 | 6 | 0 | 2008-08-21T21:54:56.317000 | 2008-08-21T21:59:00.457000 |
21,288 | 21,348 | Which .NET Dependency Injection frameworks are worth looking into? | Which C#/.NET Dependency Injection frameworks are worth looking into? And what can you say about their complexity and speed. | edit (not by the author): There is a comprehensive list of IoC frameworks available at https://github.com/quozd/awesome-dotnet/blob/master/README.md#ioc: Castle Windsor - Castle Windsor is best of breed, mature Inversion of Control container available for.NET and Silverlight Unity - Lightweight extensible dependency in... | Which .NET Dependency Injection frameworks are worth looking into? Which C#/.NET Dependency Injection frameworks are worth looking into? And what can you say about their complexity and speed. | TITLE:
Which .NET Dependency Injection frameworks are worth looking into?
QUESTION:
Which C#/.NET Dependency Injection frameworks are worth looking into? And what can you say about their complexity and speed.
ANSWER:
edit (not by the author): There is a comprehensive list of IoC frameworks available at https://github... | [
"c#",
".net",
"dependency-injection",
"inversion-of-control"
] | 405 | 359 | 178,925 | 12 | 0 | 2008-08-21T21:56:23.210000 | 2008-08-21T22:29:16 |
21,294 | 242,607 | Dynamically load a JavaScript file | How can you reliably and dynamically load a JavaScript file? This will can be used to implement a module or component that when 'initialized' the component will dynamically load all needed JavaScript library scripts on demand. The client that uses the component isn't required to load all the library script files (and m... | You may create a script element dynamically, using Prototypes: new Element("script", {src: "myBigCodeLibrary.js", type: "text/javascript"}); The problem here is that we do not know when the external script file is fully loaded. We often want our dependant code on the very next line and like to write something like: if ... | Dynamically load a JavaScript file How can you reliably and dynamically load a JavaScript file? This will can be used to implement a module or component that when 'initialized' the component will dynamically load all needed JavaScript library scripts on demand. The client that uses the component isn't required to load ... | TITLE:
Dynamically load a JavaScript file
QUESTION:
How can you reliably and dynamically load a JavaScript file? This will can be used to implement a module or component that when 'initialized' the component will dynamically load all needed JavaScript library scripts on demand. The client that uses the component isn't... | [
"javascript",
"file",
"import",
"include"
] | 195 | 89 | 220,811 | 29 | 0 | 2008-08-21T21:59:31.080000 | 2008-10-28T09:02:37.437000 |
21,303 | 21,322 | In C++ can constructor and destructor be inline functions? | VC++ makes functions which are implemented within the class declaration inline functions. If I declare a class Foo as follows, then are the CONSTRUCTOR and DESTRUCTOR inline functions? class Foo { int* p; public: Foo() { p = new char[0x00100000]; } ~Foo() { delete [] p; } };
{ Foo f; (f); } | Defining the body of the constructor INSIDE the class has the same effect as placing the function OUTSIDE the class with the "inline" keyword. In both cases it's a hint to the compiler. An "inline" function doesn't necessarily mean the function will be inlined. That depends on the complexity of the function and other r... | In C++ can constructor and destructor be inline functions? VC++ makes functions which are implemented within the class declaration inline functions. If I declare a class Foo as follows, then are the CONSTRUCTOR and DESTRUCTOR inline functions? class Foo { int* p; public: Foo() { p = new char[0x00100000]; } ~Foo() { del... | TITLE:
In C++ can constructor and destructor be inline functions?
QUESTION:
VC++ makes functions which are implemented within the class declaration inline functions. If I declare a class Foo as follows, then are the CONSTRUCTOR and DESTRUCTOR inline functions? class Foo { int* p; public: Foo() { p = new char[0x0010000... | [
"c++",
"constructor",
"destructor"
] | 87 | 92 | 101,689 | 5 | 0 | 2008-08-21T22:02:58.310000 | 2008-08-21T22:10:59.647000 |
21,353 | 21,366 | Batch file to "Script" a Database | Is it possible to somehow use a.bat file to script the schema and/or content of a SQL Server database? I can do this via the wizard, but would like to streamline the creation of this file for source control purposes. I would like to avoid the use of 3rd party tools, just limiting myself to the tools that come with SQL ... | There is a free tool called SubCommander that is a part of the open source SubSonic software. I have successfully used this tool myself to create both schema and data "dumps" each night. You can script out your schema and data (and then version it in your favorite source control system) using SubCommander. Simply use t... | Batch file to "Script" a Database Is it possible to somehow use a.bat file to script the schema and/or content of a SQL Server database? I can do this via the wizard, but would like to streamline the creation of this file for source control purposes. I would like to avoid the use of 3rd party tools, just limiting mysel... | TITLE:
Batch file to "Script" a Database
QUESTION:
Is it possible to somehow use a.bat file to script the schema and/or content of a SQL Server database? I can do this via the wizard, but would like to streamline the creation of this file for source control purposes. I would like to avoid the use of 3rd party tools, j... | [
"sql-server",
"batch-file",
"command-line",
"scripting",
"batch-processing"
] | 4 | 6 | 1,754 | 1 | 0 | 2008-08-21T22:36:15.750000 | 2008-08-21T22:45:02.903000 |
21,355 | 21,637 | Mocking and IQueryable<T> | I've ran into a problem while trying to test following IRepository based on NHibernate: public class NHibernateRepository: Disposable, IRepository where T: IdentifiableObject {...
public IQueryable Query() { return NHibernateSession.Linq (); } } How on the Hell to mock returning IQueryable out in the way that it retur... | In Moq it would be: mockRepository.Expect( r => r.Query() ).Returns( myEnumerable.AsQueriable() ); In RhinoMocks it would be: Expect.Call( repository.Query() ).Return( myEnumerable.AsQueriable() ); | Mocking and IQueryable<T> I've ran into a problem while trying to test following IRepository based on NHibernate: public class NHibernateRepository: Disposable, IRepository where T: IdentifiableObject {...
public IQueryable Query() { return NHibernateSession.Linq (); } } How on the Hell to mock returning IQueryable ou... | TITLE:
Mocking and IQueryable<T>
QUESTION:
I've ran into a problem while trying to test following IRepository based on NHibernate: public class NHibernateRepository: Disposable, IRepository where T: IdentifiableObject {...
public IQueryable Query() { return NHibernateSession.Linq (); } } How on the Hell to mock retur... | [
"linq"
] | 4 | 7 | 603 | 1 | 0 | 2008-08-21T22:38:06.137000 | 2008-08-22T02:15:07.127000 |
21,388 | 694,735 | Represent Ordering in a Relational Database | I have a collection of objects in a database. Images in a photo gallery, products in a catalog, chapters in a book, etc. Each object is represented as a row. I want to be able to arbitrarily order these images, storing that ordering in the database so when I display the objects, they will be in the right order. For exa... | Since I've mostly run into this with Django, I've found this solution to be the most workable. It seems that there isn't any "right way" to do this in a relational database. | Represent Ordering in a Relational Database I have a collection of objects in a database. Images in a photo gallery, products in a catalog, chapters in a book, etc. Each object is represented as a row. I want to be able to arbitrarily order these images, storing that ordering in the database so when I display the objec... | TITLE:
Represent Ordering in a Relational Database
QUESTION:
I have a collection of objects in a database. Images in a photo gallery, products in a catalog, chapters in a book, etc. Each object is represented as a row. I want to be able to arbitrarily order these images, storing that ordering in the database so when I... | [
"sql",
"database",
"django",
"django-models"
] | 36 | 2 | 5,963 | 11 | 0 | 2008-08-21T23:01:30.400000 | 2009-03-29T14:47:15.043000 |
21,404 | 511,006 | Source Control in Visual Studio Isolated Shell | I am developing an Isolated Shell that caters to " designers/special content creators " performing specific tasks, using the Shell. As they operate on files, they need to be able to use TFS for source control. This is mainly due to the fact that Developers will also operate on the same files from TFS but using Visual s... | Just stumbled on this question, it might still be relevant to you. You have the option of including the AnkhSVN ( http://ankhsvn.open.collab.net/ ) packages and load it into your Isolated Shell. While there are some issues around it, with Subversion support, you could use SvnBridge to access TFS repositories. This migh... | Source Control in Visual Studio Isolated Shell I am developing an Isolated Shell that caters to " designers/special content creators " performing specific tasks, using the Shell. As they operate on files, they need to be able to use TFS for source control. This is mainly due to the fact that Developers will also operat... | TITLE:
Source Control in Visual Studio Isolated Shell
QUESTION:
I am developing an Isolated Shell that caters to " designers/special content creators " performing specific tasks, using the Shell. As they operate on files, they need to be able to use TFS for source control. This is mainly due to the fact that Developer... | [
"visual-studio",
"vsx",
"extensibility"
] | 1 | 1 | 2,095 | 2 | 0 | 2008-08-21T23:13:05.007000 | 2009-02-04T11:46:45.737000 |
21,437 | 21,440 | Preventing a visitor from saving an image from my site | What are some effective strategies for preventing the use of my proprietary images? I'm talking about saving them, direct linking to them etc... Presently I have a watermark on the image, but I'd rather not..NET platform preferred, but if there's a strategy that's on another platform that integrates with my existing ap... | It's not possible to make it "impossible" to download. When a user visits your site you're sending them the pictures. The user will have a copy of that image in the browsers cache and he'd be able to access it even after he leaves the site ( depending on the browser, of course ). Your only real option is to watermark t... | Preventing a visitor from saving an image from my site What are some effective strategies for preventing the use of my proprietary images? I'm talking about saving them, direct linking to them etc... Presently I have a watermark on the image, but I'd rather not..NET platform preferred, but if there's a strategy that's ... | TITLE:
Preventing a visitor from saving an image from my site
QUESTION:
What are some effective strategies for preventing the use of my proprietary images? I'm talking about saving them, direct linking to them etc... Presently I have a watermark on the image, but I'd rather not..NET platform preferred, but if there's ... | [
"image"
] | 4 | 30 | 2,001 | 15 | 0 | 2008-08-21T23:36:14.577000 | 2008-08-21T23:38:43.463000 |
21,461 | 21,479 | What Predefined #if symbos does c# have? | #if SYMBOL //code #endif what values does C# predefine for use? | To add to what Nick said, the MSDN documentation does not list any pre-defined names. It would seem that all need to come from #define and /define. #if on MSDN | What Predefined #if symbos does c# have? #if SYMBOL //code #endif what values does C# predefine for use? | TITLE:
What Predefined #if symbos does c# have?
QUESTION:
#if SYMBOL //code #endif what values does C# predefine for use?
ANSWER:
To add to what Nick said, the MSDN documentation does not list any pre-defined names. It would seem that all need to come from #define and /define. #if on MSDN | [
"c#"
] | 9 | 4 | 888 | 3 | 0 | 2008-08-21T23:51:23.777000 | 2008-08-22T00:06:12.337000 |
21,464 | 21,494 | Recommended iPhone Development Resources | This is my first post here and I wanted to get some input from people doing iPhone development. Other than the Apple DevCenter, where are there good sites to learn iPhone developement? I know Apple has a tough NDA but there has to be people talking about writing applications for the iPhone. | This site covers some of the basics with little regard for the NDA. Start at the bottom and work up. | Recommended iPhone Development Resources This is my first post here and I wanted to get some input from people doing iPhone development. Other than the Apple DevCenter, where are there good sites to learn iPhone developement? I know Apple has a tough NDA but there has to be people talking about writing applications for... | TITLE:
Recommended iPhone Development Resources
QUESTION:
This is my first post here and I wanted to get some input from people doing iPhone development. Other than the Apple DevCenter, where are there good sites to learn iPhone developement? I know Apple has a tough NDA but there has to be people talking about writin... | [
"ios"
] | 8 | 2 | 1,670 | 7 | 0 | 2008-08-21T23:53:36.797000 | 2008-08-22T00:16:32.577000 |
21,489 | 21,545 | Grouping runs of data | SQL Experts, Is there an efficient way to group runs of data together using SQL? Or is it going to be more efficient to process the data in code. For example if I have the following data: ID|Name 01|Harry Johns 02|Adam Taylor 03|John Smith 04|John Smith 05|Bill Manning 06|John Smith I need to display this: Harry Johns ... | Try this: select n.name, (select count(*) from myTable n1 where n1.name = n.name and n1.id >= n.id and (n1.id <= ( select isnull(min(nn.id), (select max(id) + 1 from myTable)) from myTable nn where nn.id > n.id and nn.name <> n.name ) )) from myTable n where not exists ( select 1 from myTable n3 where n3.name = n.name ... | Grouping runs of data SQL Experts, Is there an efficient way to group runs of data together using SQL? Or is it going to be more efficient to process the data in code. For example if I have the following data: ID|Name 01|Harry Johns 02|Adam Taylor 03|John Smith 04|John Smith 05|Bill Manning 06|John Smith I need to disp... | TITLE:
Grouping runs of data
QUESTION:
SQL Experts, Is there an efficient way to group runs of data together using SQL? Or is it going to be more efficient to process the data in code. For example if I have the following data: ID|Name 01|Harry Johns 02|Adam Taylor 03|John Smith 04|John Smith 05|Bill Manning 06|John Sm... | [
"sql"
] | 7 | 2 | 280 | 6 | 0 | 2008-08-22T00:13:06 | 2008-08-22T00:57:08.157000 |
21,514 | 21,546 | Enumerate Windows user group members on remote system using c# | Within c#, I need to be able to Connect to a remote system, specifying username/password as appropriate List the members of a localgroup on that system Fetch the results back to the executing computer So for example I would connect to \SOMESYSTEM with appropriate creds, and fetch back a list of local administrators inc... | This should be easy to do using WMI. Here you have a pointer to some docs: WMI Documentation for Win32_UserAccount Even if you have no previous experience with WMI, it should be quite easy to turn that VB Script code at the bottom of the page into some.NET code. Hope this helped! | Enumerate Windows user group members on remote system using c# Within c#, I need to be able to Connect to a remote system, specifying username/password as appropriate List the members of a localgroup on that system Fetch the results back to the executing computer So for example I would connect to \SOMESYSTEM with appro... | TITLE:
Enumerate Windows user group members on remote system using c#
QUESTION:
Within c#, I need to be able to Connect to a remote system, specifying username/password as appropriate List the members of a localgroup on that system Fetch the results back to the executing computer So for example I would connect to \SOM... | [
"c#",
"windows",
"user-management",
"usergroups"
] | 7 | 1 | 24,909 | 5 | 0 | 2008-08-22T00:29:05.837000 | 2008-08-22T00:57:21.463000 |
21,547 | 317,864 | In SQL Server, how do I generate a CREATE TABLE statement for a given table? | I've spent a good amount of time coming up with solution to this problem, so in the spirit of this post, I'm posting it here, since I think it might be useful to others. If anyone has a better script, or anything to add, please post it. Edit: Yes guys, I know how to do it in Management Studio - but I needed to be able ... | I've modified the version above to run for all tables and support new SQL 2005 data types. It also retains the primary key names. Works only on SQL 2005 (using cross apply). select 'create table [' + so.name + '] (' + o.list + ')' + CASE WHEN tc.Constraint_Name IS NULL THEN '' ELSE 'ALTER TABLE ' + so.Name + ' ADD CONS... | In SQL Server, how do I generate a CREATE TABLE statement for a given table? I've spent a good amount of time coming up with solution to this problem, so in the spirit of this post, I'm posting it here, since I think it might be useful to others. If anyone has a better script, or anything to add, please post it. Edit: ... | TITLE:
In SQL Server, how do I generate a CREATE TABLE statement for a given table?
QUESTION:
I've spent a good amount of time coming up with solution to this problem, so in the spirit of this post, I'm posting it here, since I think it might be useful to others. If anyone has a better script, or anything to add, plea... | [
"sql-server",
"scripting",
"dynamic-sql"
] | 88 | 119 | 130,726 | 16 | 0 | 2008-08-22T00:58:55.173000 | 2008-11-25T16:04:33.443000 |
21,558 | 21,607 | In C++, what is a virtual base class? | I want to know what a " virtual base class " is and what it means. Let me show an example: class Foo { public: void DoSomething() { /*... */ } };
class Bar: public virtual Foo { public: void DoSpecific() { /*... */ } }; | Virtual base classes, used in virtual inheritance, is a way of preventing multiple "instances" of a given class appearing in an inheritance hierarchy when using multiple inheritance. Consider the following scenario: class A { public: void Foo() {} }; class B: public A {}; class C: public A {}; class D: public B, public... | In C++, what is a virtual base class? I want to know what a " virtual base class " is and what it means. Let me show an example: class Foo { public: void DoSomething() { /*... */ } };
class Bar: public virtual Foo { public: void DoSpecific() { /*... */ } }; | TITLE:
In C++, what is a virtual base class?
QUESTION:
I want to know what a " virtual base class " is and what it means. Let me show an example: class Foo { public: void DoSomething() { /*... */ } };
class Bar: public virtual Foo { public: void DoSpecific() { /*... */ } };
ANSWER:
Virtual base classes, used in virt... | [
"c++",
"virtual-inheritance"
] | 473 | 590 | 357,684 | 11 | 0 | 2008-08-22T01:13:15.357000 | 2008-08-22T01:45:02.770000 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.