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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
75,732 | 75,758 | Not using widths & padding/margins on the same element? | I've seen numerous people mentions that you shouldn't use widths and padding or margins on the same element with CSS. Why is that? | Because some browsers treat the width as the total width of the element including the padding and the margins, and others treat the width as the base width to which the padding and margins are added. As a result your design will look different in different browsers. For more information, see the W3C page on Box Model a... | Not using widths & padding/margins on the same element? I've seen numerous people mentions that you shouldn't use widths and padding or margins on the same element with CSS. Why is that? | TITLE:
Not using widths & padding/margins on the same element?
QUESTION:
I've seen numerous people mentions that you shouldn't use widths and padding or margins on the same element with CSS. Why is that?
ANSWER:
Because some browsers treat the width as the total width of the element including the padding and the marg... | [
"html",
"css"
] | 5 | 9 | 769 | 7 | 0 | 2008-09-16T19:00:21.560000 | 2008-09-16T19:02:04.847000 |
75,746 | 75,822 | Conditional operator assignment with Nullable<value> types? | EmployeeNumber = string.IsNullOrEmpty(employeeNumberTextBox.Text)? null: Convert.ToInt32(employeeNumberTextBox.Text), I often find myself wanting to do things like this ( EmployeeNumber is a Nullable as it's a property on a LINQ-to-SQL dbml object where the column allows NULL values). Unfortunately, the compiler feels ... | The problem occurs because the conditional operator doesn't look at how the value is used (assigned in this case) to determine the type of the expression -- just the true/false values. In this case, you have a null and an Int32, and the type can not be determined (there are real reasons it can't just assume Nullable ).... | Conditional operator assignment with Nullable<value> types? EmployeeNumber = string.IsNullOrEmpty(employeeNumberTextBox.Text)? null: Convert.ToInt32(employeeNumberTextBox.Text), I often find myself wanting to do things like this ( EmployeeNumber is a Nullable as it's a property on a LINQ-to-SQL dbml object where the co... | TITLE:
Conditional operator assignment with Nullable<value> types?
QUESTION:
EmployeeNumber = string.IsNullOrEmpty(employeeNumberTextBox.Text)? null: Convert.ToInt32(employeeNumberTextBox.Text), I often find myself wanting to do things like this ( EmployeeNumber is a Nullable as it's a property on a LINQ-to-SQL dbml o... | [
"c#",
"conditional-operator",
"nullable"
] | 66 | 77 | 23,584 | 6 | 0 | 2008-09-16T19:01:27.610000 | 2008-09-16T19:08:05.970000 |
75,747 | 79,624 | Sharepoint: Best way to display lists of non-Sharepoint content with "compatible" UI? | I've built a web part for Sharepoint that retrieves data from an external service. I'd like to display the items in a way that's UI-compatible with Sharepoint (fits in with its surroundings.) I'm aware of the "DataFormWebPart" but was unable to get one working properly. It requires a valid DataSource and I was unable t... | Sharepoint: Best way to display lists of non-Sharepoint content with “compatible” UI? Take a look at the built in sharepoint web controls: Microsoft.SharePoint.WebControls Namespace It contains all the controls used in sharepoint. I'd tell you more, but the documentation is very thorough. | Sharepoint: Best way to display lists of non-Sharepoint content with "compatible" UI? I've built a web part for Sharepoint that retrieves data from an external service. I'd like to display the items in a way that's UI-compatible with Sharepoint (fits in with its surroundings.) I'm aware of the "DataFormWebPart" but was... | TITLE:
Sharepoint: Best way to display lists of non-Sharepoint content with "compatible" UI?
QUESTION:
I've built a web part for Sharepoint that retrieves data from an external service. I'd like to display the items in a way that's UI-compatible with Sharepoint (fits in with its surroundings.) I'm aware of the "DataFo... | [
"sharepoint",
"xslt",
"list",
"web-parts"
] | 1 | 2 | 1,856 | 5 | 0 | 2008-09-16T19:01:29.217000 | 2008-09-17T03:24:02.190000 |
75,752 | 75,928 | What is the most straightforward way to pad empty dates in sql results (on either mysql or perl end)? | I'm building a quick csv from a mysql table with a query like: select DATE(date),count(date) from table group by DATE(date) order by date asc; and just dumping them to a file in perl over a: while(my($date,$sum) = $sth->fetchrow) { print CSV "$date,$sum\n" } There are date gaps in the data, though: | 2008-08-05 | 4 | |... | When you need something like that on server side, you usually create a table which contains all possible dates between two points in time, and then left join this table with query results. Something like this: create procedure sp1(d1 date, d2 date) declare d datetime;
create temporary table foo (d date not null);
set... | What is the most straightforward way to pad empty dates in sql results (on either mysql or perl end)? I'm building a quick csv from a mysql table with a query like: select DATE(date),count(date) from table group by DATE(date) order by date asc; and just dumping them to a file in perl over a: while(my($date,$sum) = $sth... | TITLE:
What is the most straightforward way to pad empty dates in sql results (on either mysql or perl end)?
QUESTION:
I'm building a quick csv from a mysql table with a query like: select DATE(date),count(date) from table group by DATE(date) order by date asc; and just dumping them to a file in perl over a: while(my(... | [
"mysql",
"perl",
"calendar",
"datediff"
] | 34 | 21 | 21,986 | 9 | 0 | 2008-09-16T19:01:43.100000 | 2008-09-16T19:19:20.670000 |
75,759 | 76,046 | How to implement Enums in Ruby? | What's the best way to implement the enum idiom in Ruby? I'm looking for something which I can use (almost) like the Java/C# enums. | Two ways. Symbols (:foo notation) or constants ( FOO notation). Symbols are appropriate when you want to enhance readability without littering code with literal strings. postal_code[:minnesota] = "MN" postal_code[:new_york] = "NY" Constants are appropriate when you have an underlying value that is important. Just decla... | How to implement Enums in Ruby? What's the best way to implement the enum idiom in Ruby? I'm looking for something which I can use (almost) like the Java/C# enums. | TITLE:
How to implement Enums in Ruby?
QUESTION:
What's the best way to implement the enum idiom in Ruby? I'm looking for something which I can use (almost) like the Java/C# enums.
ANSWER:
Two ways. Symbols (:foo notation) or constants ( FOO notation). Symbols are appropriate when you want to enhance readability with... | [
"ruby",
"enums"
] | 371 | 371 | 245,252 | 25 | 0 | 2008-09-16T19:02:09.073000 | 2008-09-16T19:32:30.110000 |
75,777 | 75,850 | What is the .NET Control.Margin property for? | I assumed that the C# margin property had a meaning like in CSS - the spacing around the outside of the control. But Margin values seem to be ignored to matter what values I enter. Then I read on the SDK: Setting the Margin property on a docked control has no effect on the distance of the control from the the edges of ... | The margin property is used by whatever layout engine your control host (Panel, for example) is using, in whatever way that layout engine sees fit. However, it is best used for spacing just as you assume. Just read the documentation for that specific layout engine. It can be very handy when using a FlowLayoutPanel or T... | What is the .NET Control.Margin property for? I assumed that the C# margin property had a meaning like in CSS - the spacing around the outside of the control. But Margin values seem to be ignored to matter what values I enter. Then I read on the SDK: Setting the Margin property on a docked control has no effect on the ... | TITLE:
What is the .NET Control.Margin property for?
QUESTION:
I assumed that the C# margin property had a meaning like in CSS - the spacing around the outside of the control. But Margin values seem to be ignored to matter what values I enter. Then I read on the SDK: Setting the Margin property on a docked control has... | [
"c#",
"controls",
"margin"
] | 11 | 5 | 14,245 | 3 | 0 | 2008-09-16T19:03:49.647000 | 2008-09-16T19:10:11.783000 |
75,785 | 84,987 | How do you do AppBar docking (to screen edge, like WinAmp) in WPF? | Is there any complete guidance on doing AppBar docking (such as locking to the screen edge) in WPF? I understand there are InterOp calls that need to be made, but I'm looking for either a proof of concept based on a simple WPF form, or a componentized version that can be consumed. Related resources: http://www.codeproj... | Please Note: This question gathered a good amount of feedback, and some people below have made great points or fixes. Therefore, while I'll keep the code here (and possibly update it), I've also created a WpfAppBar project on github. Feel free to send pull requests. That same project also builds to a WpfAppBar nuget pa... | How do you do AppBar docking (to screen edge, like WinAmp) in WPF? Is there any complete guidance on doing AppBar docking (such as locking to the screen edge) in WPF? I understand there are InterOp calls that need to be made, but I'm looking for either a proof of concept based on a simple WPF form, or a componentized v... | TITLE:
How do you do AppBar docking (to screen edge, like WinAmp) in WPF?
QUESTION:
Is there any complete guidance on doing AppBar docking (such as locking to the screen edge) in WPF? I understand there are InterOp calls that need to be made, but I'm looking for either a proof of concept based on a simple WPF form, or... | [
"c#",
"wpf",
"dock",
"docking",
"appbar"
] | 64 | 92 | 34,792 | 8 | 0 | 2008-09-16T19:04:39.210000 | 2008-09-17T16:23:06.967000 |
75,786 | 76,205 | Eclipse - How can I change a 'Project Facet' from Tomcat 6 to Tomcat 5.5? | (Eclipse 3.4, Ganymede) I have an existing Dynamic Web Application project in Eclipse. When I created the project, I specified 'Default configuration for Apache Tomcat v6' under the 'Configuration' drop down. It's a month or 2 down the line, and I would now like to change the configuration to Tomcat 'v5.5'. (This will ... | This is kind of hacking eclipse and you can get into trouble doing this but this should work: Open the navigator view and find that there is a.settings folder under your project expand it and then open the file: org.eclipse.wst.common.project.facet.core.xml you should see a line that says: Change that to 2.4 and save. ... | Eclipse - How can I change a 'Project Facet' from Tomcat 6 to Tomcat 5.5? (Eclipse 3.4, Ganymede) I have an existing Dynamic Web Application project in Eclipse. When I created the project, I specified 'Default configuration for Apache Tomcat v6' under the 'Configuration' drop down. It's a month or 2 down the line, and ... | TITLE:
Eclipse - How can I change a 'Project Facet' from Tomcat 6 to Tomcat 5.5?
QUESTION:
(Eclipse 3.4, Ganymede) I have an existing Dynamic Web Application project in Eclipse. When I created the project, I specified 'Default configuration for Apache Tomcat v6' under the 'Configuration' drop down. It's a month or 2 d... | [
"eclipse",
"tomcat",
"tomcat6",
"tomcat5.5",
"ganymede"
] | 56 | 87 | 87,984 | 7 | 0 | 2008-09-16T19:04:43.187000 | 2008-09-16T19:49:49.147000 |
75,798 | 1,955,727 | Django -vs- Grails -vs-? | I'm wondering if there's such a thing as Django-like ease of web app development combined with good deployment, debugging and other tools? Django is a very productive framework for building content-heavy sites; the best I've tried and a breath of fresh air compared to some of the Java monstrosities out there. However i... | You asked for someone who used both Grails and Django. I've done work on both for big projects. Here's my Thoughts: IDE's: Django works really well in Eclipse, Grails works really well in IntelliJ Idea. Debugging: Practically the same (assuming you use IntelliJ for Grails, and Eclipse for Python). Step debugging, inspe... | Django -vs- Grails -vs-? I'm wondering if there's such a thing as Django-like ease of web app development combined with good deployment, debugging and other tools? Django is a very productive framework for building content-heavy sites; the best I've tried and a breath of fresh air compared to some of the Java monstrosi... | TITLE:
Django -vs- Grails -vs-?
QUESTION:
I'm wondering if there's such a thing as Django-like ease of web app development combined with good deployment, debugging and other tools? Django is a very productive framework for building content-heavy sites; the best I've tried and a breath of fresh air compared to some of ... | [
"python",
"django",
"frameworks"
] | 23 | 32 | 19,940 | 9 | 0 | 2008-09-16T19:05:48.660000 | 2009-12-23T22:42:54.923000 |
75,805 | 75,859 | ASP.NET Custom Controls - Alternatives to PostBack? | On my journey into the depths of custom ASP.NET control development I am obviously getting my head around the ASP.NET PostBack model and how it affects control development. I understand that controls have no "lifetime" in ASP.NET, and therefore must be re-initialized on each and every page load. We overcome this by per... | Well, Session State is a server-side solution, with its own pile of cruft to deal with if you want to avoid ViewState altogether. Really though, using ViewState in a custom control is all fine and good - just be picky about what you store - only store deltas from the declared control state, don't store anything you're ... | ASP.NET Custom Controls - Alternatives to PostBack? On my journey into the depths of custom ASP.NET control development I am obviously getting my head around the ASP.NET PostBack model and how it affects control development. I understand that controls have no "lifetime" in ASP.NET, and therefore must be re-initialized ... | TITLE:
ASP.NET Custom Controls - Alternatives to PostBack?
QUESTION:
On my journey into the depths of custom ASP.NET control development I am obviously getting my head around the ASP.NET PostBack model and how it affects control development. I understand that controls have no "lifetime" in ASP.NET, and therefore must ... | [
"asp.net",
"postback",
"viewstate",
"custom-server-controls"
] | 5 | 3 | 3,060 | 5 | 0 | 2008-09-16T19:06:25.337000 | 2008-09-16T19:10:58.180000 |
75,809 | 76,088 | Partial Commits with Subversion | Given the case I made two independent changes in one file: eg. added a new method and changed another method. I often don't want to commit both changes as one commit, but as two independent commits. On a git repository I would use the Interactive Mode of git-add(1) to split the hunk into smaller ones: git add --patch W... | With git-svn you can make a local GIT repository of the remote SVN repository, work with it using the full GIT feature set (including partial commits) and then push it all back to the SVN repository. git-svn (1) | Partial Commits with Subversion Given the case I made two independent changes in one file: eg. added a new method and changed another method. I often don't want to commit both changes as one commit, but as two independent commits. On a git repository I would use the Interactive Mode of git-add(1) to split the hunk into... | TITLE:
Partial Commits with Subversion
QUESTION:
Given the case I made two independent changes in one file: eg. added a new method and changed another method. I often don't want to commit both changes as one commit, but as two independent commits. On a git repository I would use the Interactive Mode of git-add(1) to s... | [
"svn",
"git"
] | 112 | 39 | 30,111 | 11 | 0 | 2008-09-16T19:07:06.830000 | 2008-09-16T19:37:43.747000 |
75,819 | 75,973 | SQL Query - Use Like only if no exact match exists? | I'm having an issue with a query that currently uses LEFT JOIN weblog_data AS pwd ON (pwd.field_id_41!= '' AND pwd.field_id_41 LIKE CONCAT('%', ewd.field_id_32, '%')) However I'm discovering that I need it to only use that if there is no exact match first. What's happening is that the query is double dipping due to the... | It sounds like you want to join the tables aliased as pwd and ewd in your snippet based first on an exact match, and if that fails, then on the like comparison you have now. Try this: LEFT JOIN weblog_data AS pwd1 ON (pwd.field_id_41!= '' AND pwd.field_id_41 = ewd.field_id_32) LEFT JOIN weblog_data AS pwd2 ON (pwd.fiel... | SQL Query - Use Like only if no exact match exists? I'm having an issue with a query that currently uses LEFT JOIN weblog_data AS pwd ON (pwd.field_id_41!= '' AND pwd.field_id_41 LIKE CONCAT('%', ewd.field_id_32, '%')) However I'm discovering that I need it to only use that if there is no exact match first. What's happ... | TITLE:
SQL Query - Use Like only if no exact match exists?
QUESTION:
I'm having an issue with a query that currently uses LEFT JOIN weblog_data AS pwd ON (pwd.field_id_41!= '' AND pwd.field_id_41 LIKE CONCAT('%', ewd.field_id_32, '%')) However I'm discovering that I need it to only use that if there is no exact match ... | [
"sql",
"left-join"
] | 2 | 2 | 4,316 | 4 | 0 | 2008-09-16T19:07:49.823000 | 2008-09-16T19:24:08.537000 |
75,848 | 81,534 | Using Spry inside Java Server Faces framework | I'm trying to insert a Spry accordion into an already existing JSF page using Dreamweaver. Is this possible? I've already tried several things, and only the labels show up. | I'm not a Dreamweaver expert, but all Spry Accordian requires is the correct HTML structure. E.g.: Panel 1 Panel 1 Content Panel 1 Content Panel 1 Content Provided you have the JavaScript library loaded correctly, that should pretty much be all you need to do. | Using Spry inside Java Server Faces framework I'm trying to insert a Spry accordion into an already existing JSF page using Dreamweaver. Is this possible? I've already tried several things, and only the labels show up. | TITLE:
Using Spry inside Java Server Faces framework
QUESTION:
I'm trying to insert a Spry accordion into an already existing JSF page using Dreamweaver. Is this possible? I've already tried several things, and only the labels show up.
ANSWER:
I'm not a Dreamweaver expert, but all Spry Accordian requires is the corre... | [
"java",
"jsf",
"dreamweaver"
] | 0 | 2 | 381 | 2 | 0 | 2008-09-16T19:10:07.120000 | 2008-09-17T09:43:03.777000 |
75,862 | 75,887 | mount rootfs on loopback | I have a rootfs boot image that I want to test by mounting on my local file system. How can I do this? EDIT: The file was a rootfs.img but it turned out I did not have the correct filesystem support in my custom kernel. pjz's answer works once the fs support is there. | Need more info - what kind of image is it? is it a file that's a filesystem? if so you mount it like: mount -o loop rootfs.img /mnt/rootfs if it's a subdir of your filesystem that you'r exporting via nfs, you can simulat ethe environment you've created by chrooting to it: chroot /path/to/nfs/rootdir/ | mount rootfs on loopback I have a rootfs boot image that I want to test by mounting on my local file system. How can I do this? EDIT: The file was a rootfs.img but it turned out I did not have the correct filesystem support in my custom kernel. pjz's answer works once the fs support is there. | TITLE:
mount rootfs on loopback
QUESTION:
I have a rootfs boot image that I want to test by mounting on my local file system. How can I do this? EDIT: The file was a rootfs.img but it turned out I did not have the correct filesystem support in my custom kernel. pjz's answer works once the fs support is there.
ANSWER:... | [
"linux",
"rootfs"
] | 2 | 3 | 14,638 | 1 | 0 | 2008-09-16T19:11:43.077000 | 2008-09-16T19:14:54.817000 |
75,886 | 76,051 | C# driver development? | Before I jump headlong into C#... I've always felt that C, or maybe C++, was best for developing drivers on Windows. I'm not keen on the idea of developing a driver on a.NET machine. But.NET seems to be the way MS is heading for applications development, and so I'm now wondering: Are people are using C# to develop driv... | You can not make kernel-mode device drivers in C# as the runtime can't be safely loaded into ring0 and operate as expected. Additionally, C# doesn't create binaries suitable for loading as device drivers, particularly regarding entry points that drivers need to expose. The dependency on the runtime to jump in and analy... | C# driver development? Before I jump headlong into C#... I've always felt that C, or maybe C++, was best for developing drivers on Windows. I'm not keen on the idea of developing a driver on a.NET machine. But.NET seems to be the way MS is heading for applications development, and so I'm now wondering: Are people are u... | TITLE:
C# driver development?
QUESTION:
Before I jump headlong into C#... I've always felt that C, or maybe C++, was best for developing drivers on Windows. I'm not keen on the idea of developing a driver on a.NET machine. But.NET seems to be the way MS is heading for applications development, and so I'm now wondering... | [
"c#",
"kernel",
"drivers",
"device"
] | 18 | 28 | 28,451 | 8 | 0 | 2008-09-16T19:14:49.153000 | 2008-09-16T19:32:56.583000 |
75,891 | 83,486 | Algorithm for finding similar images | I need an algorithm that can determine whether two images are 'similar' and recognizes similar patterns of color, brightness, shape etc.. I might need some pointers as to what parameters the human brain uses to 'categorize' images... I have looked at hausdorff based matching but that seems mainly for matching transform... | I have done something similar, by decomposing images into signatures using wavelet transform. My approach was to pick the most significant n coefficients from each transformed channel, and recording their location. This was done by sorting the list of (power,location) tuples according to abs(power). Similar images will... | Algorithm for finding similar images I need an algorithm that can determine whether two images are 'similar' and recognizes similar patterns of color, brightness, shape etc.. I might need some pointers as to what parameters the human brain uses to 'categorize' images... I have looked at hausdorff based matching but tha... | TITLE:
Algorithm for finding similar images
QUESTION:
I need an algorithm that can determine whether two images are 'similar' and recognizes similar patterns of color, brightness, shape etc.. I might need some pointers as to what parameters the human brain uses to 'categorize' images... I have looked at hausdorff base... | [
"algorithm",
"math",
"image-comparison"
] | 92 | 63 | 63,978 | 15 | 0 | 2008-09-16T19:15:18.077000 | 2008-09-17T13:56:43.497000 |
75,906 | 75,998 | How to transform a XAML/WPF file to a video (AVI, WMV, etc.) | I have a simple WPF (XAML) file that has some animated shapes and text. The animation has no interactive behavior. I want to record this animation as a video file that I later intend to use as the "intro" screen to a screencast. What I think I need: C# code that takes an input XAML file and spits out a high quality WMV... | Render frames with RenderTargetBitmap, then encode with codec of your choice. Not very fast, but 24 fps are achievable on regular PC. We use similar technique to feed video stream from new WPF indicators to legacy bitmap system. There might be a better solution, but it works. I also heard of a solution with pulling ren... | How to transform a XAML/WPF file to a video (AVI, WMV, etc.) I have a simple WPF (XAML) file that has some animated shapes and text. The animation has no interactive behavior. I want to record this animation as a video file that I later intend to use as the "intro" screen to a screencast. What I think I need: C# code t... | TITLE:
How to transform a XAML/WPF file to a video (AVI, WMV, etc.)
QUESTION:
I have a simple WPF (XAML) file that has some animated shapes and text. The animation has no interactive behavior. I want to record this animation as a video file that I later intend to use as the "intro" screen to a screencast. What I think... | [
"wpf",
"xaml",
"video",
"animation",
"record"
] | 4 | 4 | 3,325 | 1 | 0 | 2008-09-16T19:17:03.423000 | 2008-09-16T19:27:12.133000 |
75,909 | 76,020 | How to stop CAS security demands from a FullTrust assembly | I have a FullTrust assembly, Assembly A, which calls a 3rd party component, Assembly B. Is there any way I can, via A.dll.config or in A's code, prevent any CAS demands from propagating up the stack to Assembly B, which does not have FullTrust? I do not want to alter the machine's security policy, if possible. | You could create a separate appdomain, using the sandboxing API in 2.0. MSDN explains it far better than I can. Of course then you're marshalling over appdomains; but if you want isolation that's the price you have to pay. | How to stop CAS security demands from a FullTrust assembly I have a FullTrust assembly, Assembly A, which calls a 3rd party component, Assembly B. Is there any way I can, via A.dll.config or in A's code, prevent any CAS demands from propagating up the stack to Assembly B, which does not have FullTrust? I do not want to... | TITLE:
How to stop CAS security demands from a FullTrust assembly
QUESTION:
I have a FullTrust assembly, Assembly A, which calls a 3rd party component, Assembly B. Is there any way I can, via A.dll.config or in A's code, prevent any CAS demands from propagating up the stack to Assembly B, which does not have FullTrust... | [
".net",
"cas",
"full-trust"
] | 0 | 0 | 468 | 1 | 0 | 2008-09-16T19:17:29.397000 | 2008-09-16T19:29:09.243000 |
75,924 | 75,969 | Text on a ProgressBar in WPF | This may be a no-brainer for the WPF cognoscenti, but I'd like to know if there's a simple way to put text on the WPF ProgressBar. To me, an empty progress bar looks naked. That's screen real estate that could carry a message about what is in progress, or even just add numbers to the representation. Now, WPF is all abo... | If you are needing to have a reusable method for adding text, you can create a new Style/ControlTemplate that has an additional TextBlock to display the text. You can hijack the TextSearch.Text attached property to set the text on a progress bar. If it doesn't need to be reusable, simply put the progress bar in a Grid ... | Text on a ProgressBar in WPF This may be a no-brainer for the WPF cognoscenti, but I'd like to know if there's a simple way to put text on the WPF ProgressBar. To me, an empty progress bar looks naked. That's screen real estate that could carry a message about what is in progress, or even just add numbers to the repres... | TITLE:
Text on a ProgressBar in WPF
QUESTION:
This may be a no-brainer for the WPF cognoscenti, but I'd like to know if there's a simple way to put text on the WPF ProgressBar. To me, an empty progress bar looks naked. That's screen real estate that could carry a message about what is in progress, or even just add num... | [
".net",
"wpf",
"controls",
"progress-bar"
] | 67 | 30 | 73,224 | 8 | 0 | 2008-09-16T19:18:59.610000 | 2008-09-16T19:23:33.297000 |
75,935 | 76,368 | Using xsd to generate XML in .net | I'm working in a.net application where we need to generate XML files on the fly based on the dataset retrieved from the db. XML schema should be based on a xsd provided. I would like to know is there any way to bind or associate a dataset or each datarow with the xsd. I dont know whether it can be done at all or i may ... | In addition to the solution suggested by Joel Coehoorn -- generate typed datasets or business entities from XSD -- let me add a couple of other approaches: If you use a database that supports XML type like Oracle or MS SQL Server, you can construct XML right in your SQL queries and retrieve XML directly from the databa... | Using xsd to generate XML in .net I'm working in a.net application where we need to generate XML files on the fly based on the dataset retrieved from the db. XML schema should be based on a xsd provided. I would like to know is there any way to bind or associate a dataset or each datarow with the xsd. I dont know wheth... | TITLE:
Using xsd to generate XML in .net
QUESTION:
I'm working in a.net application where we need to generate XML files on the fly based on the dataset retrieved from the db. XML schema should be based on a xsd provided. I would like to know is there any way to bind or associate a dataset or each datarow with the xsd.... | [
".net",
"xml",
"xsd"
] | 6 | 1 | 6,186 | 2 | 0 | 2008-09-16T19:20:18.390000 | 2008-09-16T20:07:35.517000 |
75,937 | 76,010 | How to import homepath into c program using gcc | I am using gcc for windows. The OS is windows XP. How do I import the homepath variable into my c program so I can write to c:\%homepath%\desktop? I would like to use something similar to: fd = fopen("C:\\%%homepath%%\\desktop\\helloworld.txt","w"); | Use getenv() to get the value of an environment variable, then use sprintf or strcat to compose the path. | How to import homepath into c program using gcc I am using gcc for windows. The OS is windows XP. How do I import the homepath variable into my c program so I can write to c:\%homepath%\desktop? I would like to use something similar to: fd = fopen("C:\\%%homepath%%\\desktop\\helloworld.txt","w"); | TITLE:
How to import homepath into c program using gcc
QUESTION:
I am using gcc for windows. The OS is windows XP. How do I import the homepath variable into my c program so I can write to c:\%homepath%\desktop? I would like to use something similar to: fd = fopen("C:\\%%homepath%%\\desktop\\helloworld.txt","w");
ANS... | [
"c",
"gcc"
] | 1 | 1 | 1,970 | 3 | 0 | 2008-09-16T19:20:22.087000 | 2008-09-16T19:28:06.547000 |
75,943 | 76,100 | How do you execute a dynamically loaded JavaScript block? | I'm working on a web page where I'm making an AJAX call that returns a chunk of HTML like: I'm inserting the whole thing into the DOM, but the JavaScript isn't being run. Is there a way to run it? Some details: I can't control what's in the script block (so I can't change it to a function that could be called), I just ... | Script added by setting the innerHTML property of an element doesn't get executed. Try creating a new div, setting its innerHTML, then adding this new div to the DOM. For example: hello world | How do you execute a dynamically loaded JavaScript block? I'm working on a web page where I'm making an AJAX call that returns a chunk of HTML like: I'm inserting the whole thing into the DOM, but the JavaScript isn't being run. Is there a way to run it? Some details: I can't control what's in the script block (so I ca... | TITLE:
How do you execute a dynamically loaded JavaScript block?
QUESTION:
I'm working on a web page where I'm making an AJAX call that returns a chunk of HTML like: I'm inserting the whole thing into the DOM, but the JavaScript isn't being run. Is there a way to run it? Some details: I can't control what's in the scr... | [
"javascript",
"ajax"
] | 41 | 18 | 52,989 | 7 | 0 | 2008-09-16T19:20:45.177000 | 2008-09-16T19:38:57.847000 |
75,947 | 76,009 | How can I make Internet Explorer not change the colors in my PNG images | When using PNG files (made with Paint.NET) as background images on my web site, IE7 is changing the colors and actually displaying a darker version of my images, as seen here. In this image, the dark background and background image should be both #001122, and the medium background and background image #004466. But IE7 ... | IE has a known bug with PNG gamma info, though I thought they had fixed it in version 7:-? I remove the gamma info from PNG files using "PNG Crush". I've created a right-click shortcut in Windows explorer. Further info: using pngcrush in windows | How can I make Internet Explorer not change the colors in my PNG images When using PNG files (made with Paint.NET) as background images on my web site, IE7 is changing the colors and actually displaying a darker version of my images, as seen here. In this image, the dark background and background image should be both #... | TITLE:
How can I make Internet Explorer not change the colors in my PNG images
QUESTION:
When using PNG files (made with Paint.NET) as background images on my web site, IE7 is changing the colors and actually displaying a darker version of my images, as seen here. In this image, the dark background and background imag... | [
"html",
"internet-explorer-7",
"png",
"gamma"
] | 12 | 6 | 2,441 | 4 | 0 | 2008-09-16T19:21:19.510000 | 2008-09-16T19:28:05.550000 |
75,959 | 82,947 | How to Implement Database Independence with Entity Framework | I have used the Entity Framework to start a fairly simple sample project. In the project, I have created a new Entity Data Model from a SQL Server 2000 database. I am able to query the data using LINQ to Entities and display values on the screen. I have an Oracle database with an extremely similar schema (I am trying t... | What is generally understood under the term "Persistence Ignorance" is that your entity classes are not being flooded with framework dependencies (important for N-tier scenarios). This is not the case right now, as entity classes must implement certain EF interfaces ("IPOCO"), as opposed to plain old CLR objects. As an... | How to Implement Database Independence with Entity Framework I have used the Entity Framework to start a fairly simple sample project. In the project, I have created a new Entity Data Model from a SQL Server 2000 database. I am able to query the data using LINQ to Entities and display values on the screen. I have an Or... | TITLE:
How to Implement Database Independence with Entity Framework
QUESTION:
I have used the Entity Framework to start a fairly simple sample project. In the project, I have created a new Entity Data Model from a SQL Server 2000 database. I am able to query the data using LINQ to Entities and display values on the sc... | [
"oracle",
"entity-framework",
"linq-to-entities"
] | 8 | 2 | 3,697 | 2 | 0 | 2008-09-16T19:22:33.690000 | 2008-09-17T13:07:19.777000 |
75,976 | 76,001 | How and when to abandon the use of arrays in C#? | I've always been told that adding an element to an array happens like this: An empty copy of the array+1element is created and then the data from the original array is copied into it then the new data for the new element is then loaded If this is true, then using an array within a scenario that requires a lot of elemen... | Look at the generic List as a replacement for arrays. They support most of the same things arrays do, including allocating an initial storage size if you want. | How and when to abandon the use of arrays in C#? I've always been told that adding an element to an array happens like this: An empty copy of the array+1element is created and then the data from the original array is copied into it then the new data for the new element is then loaded If this is true, then using an arra... | TITLE:
How and when to abandon the use of arrays in C#?
QUESTION:
I've always been told that adding an element to an array happens like this: An empty copy of the array+1element is created and then the data from the original array is copied into it then the new data for the new element is then loaded If this is true, ... | [
"c#",
".net",
"arrays",
"theory"
] | 25 | 26 | 28,754 | 14 | 0 | 2008-09-16T19:24:24.997000 | 2008-09-16T19:27:27.453000 |
75,978 | 76,085 | Accessing App.config in a location different from the binary | In a.NET Win console application, I would like to access an App.config file in a location different from the console application binary. For example, how can C:\bin\Text.exe get its settings from C:\Test.exe.config? | using System.Configuration;
Configuration config = ConfigurationManager.OpenExeConfiguration("C:\Test.exe"); You can then access the app settings, connection strings, etc from the config instance. This assumes of course that the config file is properly formatted and your app has read access to the directory. Notice th... | Accessing App.config in a location different from the binary In a.NET Win console application, I would like to access an App.config file in a location different from the console application binary. For example, how can C:\bin\Text.exe get its settings from C:\Test.exe.config? | TITLE:
Accessing App.config in a location different from the binary
QUESTION:
In a.NET Win console application, I would like to access an App.config file in a location different from the console application binary. For example, how can C:\bin\Text.exe get its settings from C:\Test.exe.config?
ANSWER:
using System.Con... | [
"c#"
] | 6 | 13 | 17,710 | 5 | 0 | 2008-09-16T19:24:31.190000 | 2008-09-16T19:37:39.910000 |
75,980 | 3,608,791 | When are you supposed to use escape instead of encodeURI / encodeURIComponent? | When encoding a query string to be sent to a web server - when do you use escape() and when do you use encodeURI() or encodeURIComponent(): Use escape: escape("% +&="); OR use encodeURI() / encodeURIComponent() encodeURI("http://www.google.com?var1=value1&var2=value2");
encodeURIComponent("var1=value1&var2=value2"); | escape() Don't use it! escape() is defined in section B.2.1.1 escape and the introduction text of Annex B says:... All of the language features and behaviours specified in this annex have one or more undesirable characteristics and in the absence of legacy usage would be removed from this specification....... Programme... | When are you supposed to use escape instead of encodeURI / encodeURIComponent? When encoding a query string to be sent to a web server - when do you use escape() and when do you use encodeURI() or encodeURIComponent(): Use escape: escape("% +&="); OR use encodeURI() / encodeURIComponent() encodeURI("http://www.google.c... | TITLE:
When are you supposed to use escape instead of encodeURI / encodeURIComponent?
QUESTION:
When encoding a query string to be sent to a web server - when do you use escape() and when do you use encodeURI() or encodeURIComponent(): Use escape: escape("% +&="); OR use encodeURI() / encodeURIComponent() encodeURI("h... | [
"javascript",
"encoding",
"query-string"
] | 1,512 | 2,015 | 577,972 | 16 | 0 | 2008-09-16T19:24:34.730000 | 2010-08-31T12:04:17.180000 |
76,002 | 76,030 | Git pack file entry format | My understanding of the Git pack file format is something like: Where the table is 32-bits wide, and the first three 32-bit words are the pack file header. The last row of 32 bits are the first 4 bytes of an entry. As I understand it, the size of the entry is specified by consecutive bytes with the MSB set, followed by... | My reading of the pack file documentation indicates that the last byte of the size (offset 15 in your example) would have the MSB set to 0. | Git pack file entry format My understanding of the Git pack file format is something like: Where the table is 32-bits wide, and the first three 32-bit words are the pack file header. The last row of 32 bits are the first 4 bytes of an entry. As I understand it, the size of the entry is specified by consecutive bytes wi... | TITLE:
Git pack file entry format
QUESTION:
My understanding of the Git pack file format is something like: Where the table is 32-bits wide, and the first three 32-bit words are the pack file header. The last row of 32 bits are the first 4 bytes of an entry. As I understand it, the size of the entry is specified by co... | [
"git",
"file-format"
] | 7 | 10 | 4,377 | 2 | 0 | 2008-09-16T19:27:31.277000 | 2008-09-16T19:30:32.720000 |
76,044 | 202,062 | Is there a way to productively do Silverlight development without buying VS2008? | It seems that Microsoft wants Silverlight to take off, yet I cannot find an easy way to develop in it without buying Visual Studio 2008. Has anyone out there found a way to get the silverlight development environment in the express editions of Visual Studio? Any other tools? | They just released Eclipse tools for Silverlight (eclipse4SL) and I remembered this thread! | Is there a way to productively do Silverlight development without buying VS2008? It seems that Microsoft wants Silverlight to take off, yet I cannot find an easy way to develop in it without buying Visual Studio 2008. Has anyone out there found a way to get the silverlight development environment in the express edition... | TITLE:
Is there a way to productively do Silverlight development without buying VS2008?
QUESTION:
It seems that Microsoft wants Silverlight to take off, yet I cannot find an easy way to develop in it without buying Visual Studio 2008. Has anyone out there found a way to get the silverlight development environment in t... | [
"silverlight",
"visual-studio-express"
] | 2 | 2 | 452 | 6 | 0 | 2008-09-16T19:31:38.737000 | 2008-10-14T17:23:17.813000 |
76,065 | 76,124 | How do I pass a variable to a mysql script? | I know that with mysql you can write SQL statements into a.sql file and run the file from the mysql command line like this: mysql> source script.sql How do I pass a variable to the script? For example, if I want to run a script that retrieves all the employees in a department, I want to be able to pass in the number of... | Like this: set @department:= 'Engineering'; Then, reference @department wherever you need to in script.sql: update employee set salary = salary + 10000 where department = @department; | How do I pass a variable to a mysql script? I know that with mysql you can write SQL statements into a.sql file and run the file from the mysql command line like this: mysql> source script.sql How do I pass a variable to the script? For example, if I want to run a script that retrieves all the employees in a department... | TITLE:
How do I pass a variable to a mysql script?
QUESTION:
I know that with mysql you can write SQL statements into a.sql file and run the file from the mysql command line like this: mysql> source script.sql How do I pass a variable to the script? For example, if I want to run a script that retrieves all the employe... | [
"mysql",
"variables",
"scripting"
] | 25 | 23 | 30,309 | 3 | 0 | 2008-09-16T19:35:34.343000 | 2008-09-16T19:40:53.850000 |
76,074 | 76,127 | How can I delete a service in Windows? | I have a couple old services that I want to completely uninstall. How can I do this? | Use the SC command, like this (you need to be on a command prompt to execute the commands in this post): SC STOP shortservicename SC DELETE shortservicename Note: You need to run the command prompt as an administrator, not just logged in as the administrator, but also with administrative rights. If you get errors above... | How can I delete a service in Windows? I have a couple old services that I want to completely uninstall. How can I do this? | TITLE:
How can I delete a service in Windows?
QUESTION:
I have a couple old services that I want to completely uninstall. How can I do this?
ANSWER:
Use the SC command, like this (you need to be on a command prompt to execute the commands in this post): SC STOP shortservicename SC DELETE shortservicename Note: You ne... | [
"windows-services",
"system-administration",
"administration"
] | 566 | 1,052 | 947,052 | 15 | 0 | 2008-09-16T19:36:41.130000 | 2008-09-16T19:41:17.217000 |
76,076 | 76,185 | Computationally efficient three dimensional arrays in C | I am trying to solve numerically a set of partial differential equations in three dimensions. In each of the equations the next value of the unknown in a point depends on the current value of each unknown in the closest points. To write an efficient code I need to keep the points close in the three dimensions close in ... | Octtrees are the way to go. You subdivide the array into 8 octants: 1 2 3 4
---
5 6 7 8 And then lay them out in memory in the order 1, 2, 3, 4, 5, 6, 7, 8 as above. You repeat this recursively within each octant until you get down to some base size, probably around 128 bytes or so (this is just a guess -- make sure ... | Computationally efficient three dimensional arrays in C I am trying to solve numerically a set of partial differential equations in three dimensions. In each of the equations the next value of the unknown in a point depends on the current value of each unknown in the closest points. To write an efficient code I need to... | TITLE:
Computationally efficient three dimensional arrays in C
QUESTION:
I am trying to solve numerically a set of partial differential equations in three dimensions. In each of the equations the next value of the unknown in a point depends on the current value of each unknown in the closest points. To write an effici... | [
"c",
"arrays",
"multidimensional-array",
"numerical"
] | 7 | 5 | 1,451 | 3 | 0 | 2008-09-16T19:36:50.537000 | 2008-09-16T19:48:12.490000 |
76,079 | 76,120 | how to put an .net application in system tray when minimized? | can anyone please suggest a good code example of vb.net/c# code to put the application in system tray when minized. | Add a NotifyIcon control to your form, then use the following code: private void frm_main_Resize(object sender, EventArgs e) { if (this.WindowState == FormWindowState.Minimized) { this.ShowInTaskbar = false; this.Hide(); notifyIcon1.Visible = true; } }
private void notifyIcon1_MouseDoubleClick(object sender, MouseEven... | how to put an .net application in system tray when minimized? can anyone please suggest a good code example of vb.net/c# code to put the application in system tray when minized. | TITLE:
how to put an .net application in system tray when minimized?
QUESTION:
can anyone please suggest a good code example of vb.net/c# code to put the application in system tray when minized.
ANSWER:
Add a NotifyIcon control to your form, then use the following code: private void frm_main_Resize(object sender, Eve... | [
".net",
"system",
"system-tray"
] | 9 | 18 | 12,881 | 3 | 0 | 2008-09-16T19:37:06.790000 | 2008-09-16T19:40:43.397000 |
76,080 | 76,246 | How do you reliably get the Quick Launch folder in XP and Vista? | We need to reliably get the Quick Launch folder for both All and Current users under both Vista and XP. I'm developing in C++, but this is probably more of a general Windows API question. For reference, here is code to get the Application Data folder under both systems: HRESULT hres; CString basePath; hres = SHGetSpeci... | AppData on vista refers to C:\Users\xxxx\AppData\Roaming not the C:\Users\xxxx\AppData folder it's self. Also this artical http://www.microsoft.com/technet/scriptcenter/resources/qanda/sept05/hey0901.mspx on a microsoft site implies that you simply have to use the path relative to the appdata folder | How do you reliably get the Quick Launch folder in XP and Vista? We need to reliably get the Quick Launch folder for both All and Current users under both Vista and XP. I'm developing in C++, but this is probably more of a general Windows API question. For reference, here is code to get the Application Data folder unde... | TITLE:
How do you reliably get the Quick Launch folder in XP and Vista?
QUESTION:
We need to reliably get the Quick Launch folder for both All and Current users under both Vista and XP. I'm developing in C++, but this is probably more of a general Windows API question. For reference, here is code to get the Applicatio... | [
"windows",
"visual-c++"
] | 1 | 2 | 1,614 | 2 | 0 | 2008-09-16T19:37:07.913000 | 2008-09-16T19:54:15.907000 |
76,096 | 76,453 | Undo with GTK TextView | I'm trying to keep dependencies to a minimum for a program I contribute to, it's a small text editor. GTK Textview doesn't seem to come with a built-in undo function. Is there any reference implementation I've been missing on so far? Is everyone writing their own undo function for their TextView widgets? I'll be happy ... | As far as I know, GTK TextView doesn't include an undo function. So while I am not familiar with Python's GTK library, I would think it doesn't have one. The Ruby-GNOME2 project has a sample text editor that has undo/redo functionality. Basically they are connecting to the insert_text and delete_range signals of the Te... | Undo with GTK TextView I'm trying to keep dependencies to a minimum for a program I contribute to, it's a small text editor. GTK Textview doesn't seem to come with a built-in undo function. Is there any reference implementation I've been missing on so far? Is everyone writing their own undo function for their TextView ... | TITLE:
Undo with GTK TextView
QUESTION:
I'm trying to keep dependencies to a minimum for a program I contribute to, it's a small text editor. GTK Textview doesn't seem to come with a built-in undo function. Is there any reference implementation I've been missing on so far? Is everyone writing their own undo function f... | [
"python",
"gtk",
"text-editor",
"undo"
] | 10 | 4 | 3,682 | 4 | 0 | 2008-09-16T19:38:45.397000 | 2008-09-16T20:15:54.577000 |
76,179 | 76,253 | How to determine if the user's browser can view PDF files | What's the best way for determining whether the user's browser can view PDF files? Ideally, it shouldn't matter on the browser or the operating system. Is there a specific way of doing it in ASP.NET, or would the answer be just JavaScript? | Neither, none, don't try. Re dawnerd: Plug-in detection is not the right answer. I do not have a PDF plugin installed in my browser (Firefox on Ubuntu), yet I am able to view PDF files using the operating system's document viewer (which is not Acrobat Reader). Today, any operating system that can run a web browser can ... | How to determine if the user's browser can view PDF files What's the best way for determining whether the user's browser can view PDF files? Ideally, it shouldn't matter on the browser or the operating system. Is there a specific way of doing it in ASP.NET, or would the answer be just JavaScript? | TITLE:
How to determine if the user's browser can view PDF files
QUESTION:
What's the best way for determining whether the user's browser can view PDF files? Ideally, it shouldn't matter on the browser or the operating system. Is there a specific way of doing it in ASP.NET, or would the answer be just JavaScript?
ANS... | [
"asp.net",
"javascript",
"pdf",
"browser"
] | 10 | 19 | 5,204 | 4 | 0 | 2008-09-16T19:47:36.187000 | 2008-09-16T19:55:10.833000 |
76,194 | 1,546,563 | Should protected attributes always be banned? | I seldom use inheritance, but when I do, I never use protected attributes because I think it breaks the encapsulation of the inherited classes. Do you use protected attributes? what do you use them for? | In this interview on Design by Bill Venners, Joshua Bloch, the author of Effective Java says: Trusting Subclasses Bill Venners: Should I trust subclasses more intimately than non-subclasses? For example, do I make it easier for a subclass implementation to break me than I would for a non-subclass? In particular, how do... | Should protected attributes always be banned? I seldom use inheritance, but when I do, I never use protected attributes because I think it breaks the encapsulation of the inherited classes. Do you use protected attributes? what do you use them for? | TITLE:
Should protected attributes always be banned?
QUESTION:
I seldom use inheritance, but when I do, I never use protected attributes because I think it breaks the encapsulation of the inherited classes. Do you use protected attributes? what do you use them for?
ANSWER:
In this interview on Design by Bill Venners,... | [
"oop",
"inheritance",
"class-design",
"protected"
] | 15 | 20 | 5,897 | 14 | 0 | 2008-09-16T19:48:44.703000 | 2009-10-09T23:41:06.967000 |
76,204 | 76,497 | How do I get an attribute value when using XSLT with unknown namespace? | I am receiving a 3rd party feed of which I cannot be certain of the namespace so I am currently having to use the local-name() function in my XSLT to get the element values. However I need to get an attribute from one such element and I don't know how to do this when the namespaces are unknown (hence need for local-nam... | I don't have an XSLT editor here, but have you tried using *[local-name()='category']/@*[local-name()='term'] | How do I get an attribute value when using XSLT with unknown namespace? I am receiving a 3rd party feed of which I cannot be certain of the namespace so I am currently having to use the local-name() function in my XSLT to get the element values. However I need to get an attribute from one such element and I don't know ... | TITLE:
How do I get an attribute value when using XSLT with unknown namespace?
QUESTION:
I am receiving a 3rd party feed of which I cannot be certain of the namespace so I am currently having to use the local-name() function in my XSLT to get the element values. However I need to get an attribute from one such element... | [
"xml",
"xslt",
"namespaces"
] | 3 | 13 | 14,960 | 3 | 0 | 2008-09-16T19:49:32.720000 | 2008-09-16T20:19:29.620000 |
76,206 | 76,236 | Quick C# prototype program with simple DB | Okay, I've seen but haven't programmed in C# before. You can assume I'm competent in C++, and advanced in C (for what good that'll do me). I understand inheritance, polymorphism, etc so OO concepts aren't going to be a huge problem. Let's say I've been given a task to prototype a quick and dirty program that won't be m... | It sounds like for this app, you could use Microsoft Dynamic Data or Castle Active Record, and have the application working a few minutes after you finished the database. These tools connect to a database and generate forms for inputing data. Take a look at them. Access is probably your best choice for database. MS Sql... | Quick C# prototype program with simple DB Okay, I've seen but haven't programmed in C# before. You can assume I'm competent in C++, and advanced in C (for what good that'll do me). I understand inheritance, polymorphism, etc so OO concepts aren't going to be a huge problem. Let's say I've been given a task to prototype... | TITLE:
Quick C# prototype program with simple DB
QUESTION:
Okay, I've seen but haven't programmed in C# before. You can assume I'm competent in C++, and advanced in C (for what good that'll do me). I understand inheritance, polymorphism, etc so OO concepts aren't going to be a huge problem. Let's say I've been given a... | [
"c#",
"database",
"prototype"
] | 0 | 3 | 1,572 | 8 | 0 | 2008-09-16T19:49:52.283000 | 2008-09-16T19:53:31.383000 |
76,208 | 79,684 | Good way to time SQL queries when using Linq to SQL | Is there a good way to time SQL queries when using Linq to SQL? I really like logging feature, but it would be great if you could somehow also time that query. Any ideas? | SQL Profiler to get the query and the time, and also Execution Path in Query analyzer to see where the bottlenecks are. | Good way to time SQL queries when using Linq to SQL Is there a good way to time SQL queries when using Linq to SQL? I really like logging feature, but it would be great if you could somehow also time that query. Any ideas? | TITLE:
Good way to time SQL queries when using Linq to SQL
QUESTION:
Is there a good way to time SQL queries when using Linq to SQL? I really like logging feature, but it would be great if you could somehow also time that query. Any ideas?
ANSWER:
SQL Profiler to get the query and the time, and also Execution Path in... | [
".net",
"linq",
"linq-to-sql",
"optimization",
"logging"
] | 6 | 5 | 2,477 | 6 | 0 | 2008-09-16T19:50:06.557000 | 2008-09-17T03:33:17.863000 |
76,214 | 78,250 | Windows Mobile 6 J2SE-scale JVM implementation | Does anybody have experience of a decent J2SE (preferably at least Java JDK 1.5-level) Java Virtual Machine for Windows Mobile 6? If you know of any CLDC VMs, I'm also interested because even that would be better than what we currently have for the platform. | Yes, I've tried doing things with Java on Windows Mobile. I tried really hard. The best advise I can give you is: Stop right now, and start using.NET Compact Framework. Anyway, the two 'good' JVMs for WM are IBM-J9 and NSICom Creme, which still are both terribile to work with. You've already seen Creme - IBM-J9 isn't m... | Windows Mobile 6 J2SE-scale JVM implementation Does anybody have experience of a decent J2SE (preferably at least Java JDK 1.5-level) Java Virtual Machine for Windows Mobile 6? If you know of any CLDC VMs, I'm also interested because even that would be better than what we currently have for the platform. | TITLE:
Windows Mobile 6 J2SE-scale JVM implementation
QUESTION:
Does anybody have experience of a decent J2SE (preferably at least Java JDK 1.5-level) Java Virtual Machine for Windows Mobile 6? If you know of any CLDC VMs, I'm also interested because even that would be better than what we currently have for the platfo... | [
"windows-mobile",
"java-me",
"java"
] | 3 | 5 | 7,358 | 5 | 0 | 2008-09-16T19:50:35.510000 | 2008-09-16T23:13:07.473000 |
76,223 | 77,077 | Get Last Friday of Month in Java | I am working on a project where the requirement is to have a date calculated as being the last Friday of a given month. I think I have a solution that only uses standard Java, but I was wondering if anyone knew of anything more concise or efficient. Below is what I tested with for this year: for (int month = 0; month <... | Based on marked23's suggestion: public Date getLastFriday( int month, int year ) { Calendar cal = Calendar.getInstance(); cal.set( year, month + 1, 1 ); cal.add( Calendar.DAY_OF_MONTH, -( cal.get( Calendar.DAY_OF_WEEK ) % 7 + 1 ) ); return cal.getTime(); } | Get Last Friday of Month in Java I am working on a project where the requirement is to have a date calculated as being the last Friday of a given month. I think I have a solution that only uses standard Java, but I was wondering if anyone knew of anything more concise or efficient. Below is what I tested with for this ... | TITLE:
Get Last Friday of Month in Java
QUESTION:
I am working on a project where the requirement is to have a date calculated as being the last Friday of a given month. I think I have a solution that only uses standard Java, but I was wondering if anyone knew of anything more concise or efficient. Below is what I tes... | [
"java",
"date",
"calendar"
] | 19 | 27 | 35,730 | 16 | 0 | 2008-09-16T19:51:21.843000 | 2008-09-16T21:04:14.677000 |
76,254 | 76,348 | Access to auto increment identity field after SQL insert in Java | Any advice on how to read auto-incrementing identity field assigned to newly created record from call through java.sql.Statement.executeUpdate? I know how to do this in SQL for several DB platforms, but would like to know what database independent interfaces exist in java.sql to do this, and any input on people's exper... | The following snibblet of code should do ya': PreparedStatement stmt = conn.prepareStatement(sql, Statement.RETURN_GENERATED_KEYS); //...
ResultSet res = stmt.getGeneratedKeys(); while (res.next()) System.out.println("Generated key: " + res.getInt(1)); This is known to work on the following databases Derby MySQL SQL S... | Access to auto increment identity field after SQL insert in Java Any advice on how to read auto-incrementing identity field assigned to newly created record from call through java.sql.Statement.executeUpdate? I know how to do this in SQL for several DB platforms, but would like to know what database independent interfa... | TITLE:
Access to auto increment identity field after SQL insert in Java
QUESTION:
Any advice on how to read auto-incrementing identity field assigned to newly created record from call through java.sql.Statement.executeUpdate? I know how to do this in SQL for several DB platforms, but would like to know what database i... | [
"java",
"sql"
] | 17 | 24 | 24,659 | 5 | 0 | 2008-09-16T19:55:17.293000 | 2008-09-16T20:04:51.293000 |
76,258 | 76,329 | IIS Authentication across servers | My production environment involves a pair of IIS 6 web servers, one running legacy.NET 1.1 applications and the other running.NET 2.0 applications. We cannot install.NET 2.0 alongside 1.1 on the same machine because it is a tightly-regulated 'Validated System' and would present a bureaucratic nightmare to revalidate. W... | No, because you're not using cookies for authentication in that scenario, so ScaleOvenStove's link won't help. Basic authentication sends the login information in the HTTP headers with every request, but it's the browser that does this, when it sees a new server, new password request. (Or indeed as suggested change the... | IIS Authentication across servers My production environment involves a pair of IIS 6 web servers, one running legacy.NET 1.1 applications and the other running.NET 2.0 applications. We cannot install.NET 2.0 alongside 1.1 on the same machine because it is a tightly-regulated 'Validated System' and would present a burea... | TITLE:
IIS Authentication across servers
QUESTION:
My production environment involves a pair of IIS 6 web servers, one running legacy.NET 1.1 applications and the other running.NET 2.0 applications. We cannot install.NET 2.0 alongside 1.1 on the same machine because it is a tightly-regulated 'Validated System' and wou... | [
"asp.net",
".net-2.0",
"iis-6",
"single-sign-on",
".net-1.1"
] | 0 | 1 | 1,136 | 3 | 0 | 2008-09-16T19:55:34.610000 | 2008-09-16T20:03:19.287000 |
76,274 | 76,320 | Is it possible to indirectly load a value type on the stack | In Microsoft IL, to call a method on a value type you need an indirect reference. Lets say we have an ILGenerator named "il" and that currently we have a Nullable on top of the stack, if we want to check whether it has a value then we could emit the following: var local = il.DeclareLocal(typeof(Nullable )); il.Emit(OpC... | If the variable is already on the stack, you can go ahead and just emit the method call. It seems that the constructor doesn't push the variable on the stack in a typed form. After digging into the IL a bit, it appears there are two ways of using the variable after constructing it. You can load the variable that will s... | Is it possible to indirectly load a value type on the stack In Microsoft IL, to call a method on a value type you need an indirect reference. Lets say we have an ILGenerator named "il" and that currently we have a Nullable on top of the stack, if we want to check whether it has a value then we could emit the following:... | TITLE:
Is it possible to indirectly load a value type on the stack
QUESTION:
In Microsoft IL, to call a method on a value type you need an indirect reference. Lets say we have an ILGenerator named "il" and that currently we have a Nullable on top of the stack, if we want to check whether it has a value then we could e... | [
"cil",
"reflection.emit"
] | 8 | 2 | 3,891 | 4 | 0 | 2008-09-16T19:57:58.800000 | 2008-09-16T20:02:13.673000 |
76,275 | 89,397 | How can I kill a process, using VBScript, started by a particular user | I have multiple users running attachemate on a Windows 2003 server. I want to kill attachemate.exe started by user_1 without killing attachemate.exe started by user_2. I want to use VBScript. | You could use this to find out who the process owner is, then once you have that you can use Win32_Process to kill the process by the process ID. MSDN Win32_Process class details MSDN Terminating a process with Win32_Process There is surely a cleaner way to do this, but here's what I came up with. NOTE: This doesn't de... | How can I kill a process, using VBScript, started by a particular user I have multiple users running attachemate on a Windows 2003 server. I want to kill attachemate.exe started by user_1 without killing attachemate.exe started by user_2. I want to use VBScript. | TITLE:
How can I kill a process, using VBScript, started by a particular user
QUESTION:
I have multiple users running attachemate on a Windows 2003 server. I want to kill attachemate.exe started by user_1 without killing attachemate.exe started by user_2. I want to use VBScript.
ANSWER:
You could use this to find out... | [
"vbscript",
"windows-server-2003",
"kill"
] | 6 | 6 | 17,551 | 2 | 0 | 2008-09-16T19:58:05.320000 | 2008-09-18T02:11:13.230000 |
76,300 | 76,431 | What's the best way to return variables from a syncExec? | In my SWT Java app I often want to return information from inside a Display.syncExec() call. The best way I've found so far to do this is: final ArrayList result = new ArrayList (); GUI.display().syncExec(new Runnable(){ public void run() { MessageBox mb = /*... */; /* set up messagebox */ result.add(mb.open()); }}); i... | ArrayList is not thread-safe. You can obtain a thread-safe List with Collections.synchronizedList. However, it is much simpler to use an AtomicInteger in your case or AtomicReference in a more general case. final AtomicInteger resultAtomicInteger = new AtomicInteger(); Display.getCurrent().syncExec(new Runnable() { pub... | What's the best way to return variables from a syncExec? In my SWT Java app I often want to return information from inside a Display.syncExec() call. The best way I've found so far to do this is: final ArrayList result = new ArrayList (); GUI.display().syncExec(new Runnable(){ public void run() { MessageBox mb = /*... ... | TITLE:
What's the best way to return variables from a syncExec?
QUESTION:
In my SWT Java app I often want to return information from inside a Display.syncExec() call. The best way I've found so far to do this is: final ArrayList result = new ArrayList (); GUI.display().syncExec(new Runnable(){ public void run() { Mess... | [
"java",
"multithreading",
"swt"
] | 2 | 5 | 1,465 | 5 | 0 | 2008-09-16T20:00:16.267000 | 2008-09-16T20:13:55.767000 |
76,314 | 76,410 | How can I open Java .class files in a human-readable way? | I'm trying to figure out what a Java applet's class file is doing under the hood. Opening it up with Notepad or Textpad just shows a bunch of gobbledy-gook. Is there any way to wrangle it back into a somewhat-readable format so I can try to figure out what it's doing? Environment == Windows w/ VS 2008 installed. | jd-gui is the best decompiler at the moment. it can handle newer features in Java, as compared to the getting-dusty JAD. | How can I open Java .class files in a human-readable way? I'm trying to figure out what a Java applet's class file is doing under the hood. Opening it up with Notepad or Textpad just shows a bunch of gobbledy-gook. Is there any way to wrangle it back into a somewhat-readable format so I can try to figure out what it's ... | TITLE:
How can I open Java .class files in a human-readable way?
QUESTION:
I'm trying to figure out what a Java applet's class file is doing under the hood. Opening it up with Notepad or Textpad just shows a bunch of gobbledy-gook. Is there any way to wrangle it back into a somewhat-readable format so I can try to fig... | [
"java",
"windows",
"class",
"applet"
] | 143 | 229 | 641,505 | 17 | 0 | 2008-09-16T20:01:49.743000 | 2008-09-16T20:11:27.020000 |
76,324 | 76,975 | Easy expanation of setting up Openssl on Windows | I really want to get the google Calendar Api up an running. I found a great article about how to get started. I downloaded the Zend GData classes. I have php 5 running on my dev box and all the exetensions should be loading. I cant get openssl running and recieve the following error when I try to run any of the example... | I think this use of SSL is part of the Zend GData library so I assume it is correct. I think not having OpenSSL correctly installed is my main issue. | Easy expanation of setting up Openssl on Windows I really want to get the google Calendar Api up an running. I found a great article about how to get started. I downloaded the Zend GData classes. I have php 5 running on my dev box and all the exetensions should be loading. I cant get openssl running and recieve the fol... | TITLE:
Easy expanation of setting up Openssl on Windows
QUESTION:
I really want to get the google Calendar Api up an running. I found a great article about how to get started. I downloaded the Zend GData classes. I have php 5 running on my dev box and all the exetensions should be loading. I cant get openssl running a... | [
"php",
"openssl",
"gdata-api",
"google-calendar-api"
] | 2 | 1 | 2,376 | 3 | 0 | 2008-09-16T20:02:38.943000 | 2008-09-16T20:56:33.043000 |
76,325 | 85,685 | Move Active Directory Group to Another OU using Powershell | How do I move an active directory group to another organizational unit using Powershell? ie. I would like to move the group "IT Department" from: (CN=IT Department, OU=Technology Department, OU=Departments,DC=Company,DC=ca) to: (CN=IT Department, OU=Temporarily Moved Groups, DC=Company,DC=ca) | Your script was really close to correct (and I really appreciate your response). The following script is what I used to solve my problem.: $from = [ADSI]"LDAP://CN=IT Department, OU=Technology Department, OU=Departments,DC=Company,DC=ca" $to = [ADSI]"LDAP://OU=Temporarily Moved Groups, DC=Company,DC=ca" $from.PSBase.Mo... | Move Active Directory Group to Another OU using Powershell How do I move an active directory group to another organizational unit using Powershell? ie. I would like to move the group "IT Department" from: (CN=IT Department, OU=Technology Department, OU=Departments,DC=Company,DC=ca) to: (CN=IT Department, OU=Temporarily... | TITLE:
Move Active Directory Group to Another OU using Powershell
QUESTION:
How do I move an active directory group to another organizational unit using Powershell? ie. I would like to move the group "IT Department" from: (CN=IT Department, OU=Technology Department, OU=Departments,DC=Company,DC=ca) to: (CN=IT Departme... | [
"powershell",
"active-directory"
] | 7 | 6 | 10,458 | 2 | 0 | 2008-09-16T20:02:42.923000 | 2008-09-17T17:36:25.543000 |
76,327 | 76,423 | How can I prevent Java from creating hsperfdata files? | I'm writing a Java application that runs on Linux (using Sun's JDK). It keeps creating /tmp/hsperfdata_username directories, which I would like to prevent. Is there any way to stop java from creating these files? | Try JVM option -XX:-UsePerfData more info The following might be helpful that is from link https://docs.oracle.com/javase/8/docs/technotes/tools/unix/java.html -XX:+UsePerfData
Enables the perfdata feature. This option is enabled by default to allow JVM monitoring and performance testing. Disabling it suppresses the c... | How can I prevent Java from creating hsperfdata files? I'm writing a Java application that runs on Linux (using Sun's JDK). It keeps creating /tmp/hsperfdata_username directories, which I would like to prevent. Is there any way to stop java from creating these files? | TITLE:
How can I prevent Java from creating hsperfdata files?
QUESTION:
I'm writing a Java application that runs on Linux (using Sun's JDK). It keeps creating /tmp/hsperfdata_username directories, which I would like to prevent. Is there any way to stop java from creating these files?
ANSWER:
Try JVM option -XX:-UsePe... | [
"java",
"performance",
"report"
] | 52 | 40 | 81,636 | 8 | 0 | 2008-09-16T20:03:08.087000 | 2008-09-16T20:13:00.153000 |
76,349 | 76,372 | Edit source code when debugging | I have VS2005 and I am currently trying to debug an ASP.net web application. I want to change some code around in the code behind file, but every time I stop at a break point and try to edit something I get the following error message: "Changes are not allowed when the debugger has been attached to an already running p... | The application is actually running off of a compiled version of your code. If you modify it it will have to recompile it in order for your changes to work, which means that it will need to swap out the running version for the new compiled version. This is a pretty hard problem - which is why I think Microsoft has made... | Edit source code when debugging I have VS2005 and I am currently trying to debug an ASP.net web application. I want to change some code around in the code behind file, but every time I stop at a break point and try to edit something I get the following error message: "Changes are not allowed when the debugger has been ... | TITLE:
Edit source code when debugging
QUESTION:
I have VS2005 and I am currently trying to debug an ASP.net web application. I want to change some code around in the code behind file, but every time I stop at a break point and try to edit something I get the following error message: "Changes are not allowed when the ... | [
"asp.net",
"debugging"
] | 9 | 6 | 13,698 | 7 | 0 | 2008-09-16T20:04:53.620000 | 2008-09-16T20:07:55.827000 |
76,350 | 76,572 | Free/cheap PowerDesigner alternative? | We are using PowerDesigner at work for database modelling. But there is a hell of a price tag on that piece of software. And frankly, all I use is physical diagrams for MS SQL, which is about 1% of what PD knows. Are there any good alternatives? I know about Visio and MS SQL Diagrams, but looking for other options. | I just use SQL Server using the diagrams folder. The designer is pretty simple to use, and can be used to generate tables fairly quickly. Considering it's free with the software, I don't see the issue. | Free/cheap PowerDesigner alternative? We are using PowerDesigner at work for database modelling. But there is a hell of a price tag on that piece of software. And frankly, all I use is physical diagrams for MS SQL, which is about 1% of what PD knows. Are there any good alternatives? I know about Visio and MS SQL Diagra... | TITLE:
Free/cheap PowerDesigner alternative?
QUESTION:
We are using PowerDesigner at work for database modelling. But there is a hell of a price tag on that piece of software. And frankly, all I use is physical diagrams for MS SQL, which is about 1% of what PD knows. Are there any good alternatives? I know about Visio... | [
"sql",
"sql-server",
"database",
"modeling"
] | 19 | 1 | 24,723 | 9 | 0 | 2008-09-16T20:04:59.780000 | 2008-09-16T20:24:23.713000 |
76,359 | 76,565 | Variable binding in PHP ADOdb | Does ADOdb do data sanitation or escaping within the same functionality by default? Or am I just confusing it with Code Igniter's built-in processes? Does binding variables to parameters in ADOdb for PHP prevent SQL injection in any way? | Correct - bound parameters are not vulnerable to SQL injection attacks. | Variable binding in PHP ADOdb Does ADOdb do data sanitation or escaping within the same functionality by default? Or am I just confusing it with Code Igniter's built-in processes? Does binding variables to parameters in ADOdb for PHP prevent SQL injection in any way? | TITLE:
Variable binding in PHP ADOdb
QUESTION:
Does ADOdb do data sanitation or escaping within the same functionality by default? Or am I just confusing it with Code Igniter's built-in processes? Does binding variables to parameters in ADOdb for PHP prevent SQL injection in any way?
ANSWER:
Correct - bound parameter... | [
"php",
"binding",
"parameters",
"sql-injection",
"adodb-php"
] | 4 | 2 | 7,351 | 2 | 0 | 2008-09-16T20:06:18.937000 | 2008-09-16T20:23:48.690000 |
76,395 | 76,810 | Code generators vs. ORMs vs. Stored Procedures | In what domains do each of these software architectures shine or fail? Which key requirements would prompt you to choose one over the other? Please assume that you have developers available who can do good object oriented code as well as good database development. Also, please avoid holy wars:) all three technologies h... | Every one of these tools provides differing layers of abstraction, along with differing points to override behavior. These are architecture choices, and all architectural choices depend on trade-offs between technology, control, and organization, both of the application itself and the environment where it will be deplo... | Code generators vs. ORMs vs. Stored Procedures In what domains do each of these software architectures shine or fail? Which key requirements would prompt you to choose one over the other? Please assume that you have developers available who can do good object oriented code as well as good database development. Also, pl... | TITLE:
Code generators vs. ORMs vs. Stored Procedures
QUESTION:
In what domains do each of these software architectures shine or fail? Which key requirements would prompt you to choose one over the other? Please assume that you have developers available who can do good object oriented code as well as good database dev... | [
"language-agnostic",
"architecture",
"stored-procedures",
"orm",
"code-generation"
] | 15 | 13 | 4,970 | 6 | 0 | 2008-09-16T20:09:58.380000 | 2008-09-16T20:42:10.363000 |
76,403 | 76,688 | How to prevent an Insert query from enrolling into a Distributed Transaction? | I have a SQL Insert query inside a stored proc, for inserting rows into a linked server table. Since the stored proc is getting called within a parent transaction, this Insert statement tries to use a DTC for inserting rows into the linked server. I would like to avoid DTC from getting involved. Is there any way I can ... | My suggestion is that you store whatever you want to insert into a staging table, and once the procedure is over run the cross server insert. To my knowledge there is no way of ignoring the transaction you are in once you are within the SProc execution. In contrast, if you use.NET 2.0's System.Transaction namespace, yo... | How to prevent an Insert query from enrolling into a Distributed Transaction? I have a SQL Insert query inside a stored proc, for inserting rows into a linked server table. Since the stored proc is getting called within a parent transaction, this Insert statement tries to use a DTC for inserting rows into the linked se... | TITLE:
How to prevent an Insert query from enrolling into a Distributed Transaction?
QUESTION:
I have a SQL Insert query inside a stored proc, for inserting rows into a linked server table. Since the stored proc is getting called within a parent transaction, this Insert statement tries to use a DTC for inserting rows ... | [
"sql",
"sql-server",
"transactions",
"linked-server",
"msdtc"
] | 5 | 4 | 2,214 | 2 | 0 | 2008-09-16T20:10:49.923000 | 2008-09-16T20:32:43.583000 |
76,408 | 78,561 | Which of these scripting languages is more appropriate for pen-testing? | First of all, I want to avoid a flame-war on languages. The languages to choose from are Perl, Python and Ruby. I want to mention that I'm comfortable with all of them, but the problem is that I can't focus just on one. If, for example, I see a cool Perl module, I have to try it out. If I see a nice Python app, I have ... | You probably want Ruby, because it's the native language for Metasploit, which is the de facto standard open source penetration testing framework. Ruby's going to give you: Metasploit's framework, opcode and shellcode databases Metasploit's Ruby lorcon bindings for raw 802.11 work. Metasploit's KARMA bindings for 802.1... | Which of these scripting languages is more appropriate for pen-testing? First of all, I want to avoid a flame-war on languages. The languages to choose from are Perl, Python and Ruby. I want to mention that I'm comfortable with all of them, but the problem is that I can't focus just on one. If, for example, I see a coo... | TITLE:
Which of these scripting languages is more appropriate for pen-testing?
QUESTION:
First of all, I want to avoid a flame-war on languages. The languages to choose from are Perl, Python and Ruby. I want to mention that I'm comfortable with all of them, but the problem is that I can't focus just on one. If, for ex... | [
"python",
"ruby",
"perl",
"security",
"penetration-testing"
] | 6 | 28 | 6,515 | 12 | 0 | 2008-09-16T20:11:22.217000 | 2008-09-17T00:11:01.187000 |
76,411 | 76,427 | How to cycle through delimited tokens with a Regular Expression? | How can I create a regular expression that will grab delimited text from a string? For example, given a string like text ###token1### text text ###token2### text text I want a regex that will pull out ###token1###. Yes, I do want the delimiter as well. By adding another group, I can get both: (###(.+?)###) | /###(.+?)###/ if you want the ###'s then you need /(###.+?###)/ the? means non greedy, if you didn't have the?, then it would grab too much. e.g. '###token1### text text ###token2###' would all get grabbed. My initial answer had a * instead of a +. * means 0 or more. + means 1 or more. * was wrong because that would al... | How to cycle through delimited tokens with a Regular Expression? How can I create a regular expression that will grab delimited text from a string? For example, given a string like text ###token1### text text ###token2### text text I want a regex that will pull out ###token1###. Yes, I do want the delimiter as well. By... | TITLE:
How to cycle through delimited tokens with a Regular Expression?
QUESTION:
How can I create a regular expression that will grab delimited text from a string? For example, given a string like text ###token1### text text ###token2### text text I want a regex that will pull out ###token1###. Yes, I do want the del... | [
"regex"
] | 1 | 4 | 3,062 | 5 | 0 | 2008-09-16T20:11:29.470000 | 2008-09-16T20:13:33.740000 |
76,412 | 77,094 | Expose DependencyProperty | When developing WPF UserControls, what is the best way to expose a DependencyProperty of a child control as a DependencyProperty of the UserControl? The following example shows how I would currently expose the Text property of a TextBox inside a UserControl. Surely there is a better / simpler way to accomplish this? us... | That is how we're doing it in our team, without the RelativeSource search, rather by naming the UserControl and referencing properties by the UserControl's name. Sometimes we've found ourselves making too many things UserControl's though, and have often times scaled back our usage. I'd also follow the tradition of nami... | Expose DependencyProperty When developing WPF UserControls, what is the best way to expose a DependencyProperty of a child control as a DependencyProperty of the UserControl? The following example shows how I would currently expose the Text property of a TextBox inside a UserControl. Surely there is a better / simpler ... | TITLE:
Expose DependencyProperty
QUESTION:
When developing WPF UserControls, what is the best way to expose a DependencyProperty of a child control as a DependencyProperty of the UserControl? The following example shows how I would currently expose the Text property of a TextBox inside a UserControl. Surely there is a... | [
"wpf",
"data-binding",
"user-controls"
] | 18 | 18 | 8,303 | 2 | 0 | 2008-09-16T20:11:42.120000 | 2008-09-16T21:06:29.710000 |
76,424 | 76,929 | How to remove xmlns attribute with .NET XML API | XmlElement.Attributes.Remove* methods are working fine for arbitrary attributes resulting in the removed attributes being removed from XmlDocument.OuterXml property. Xmlns attribute however is different. Here is an example: XmlDocument doc = new XmlDocument(); doc.InnerXml = @" "; doc.DocumentElement.Attributes.RemoveN... | .NET DOM API doesn't support modifying element's namespace which is what you are essentially trying to do. So, in order to solve your problem you have to construct a new document one way or another. You can use the same.NET DOM API and create a new element without specifying its namespace. Alternatively, you can create... | How to remove xmlns attribute with .NET XML API XmlElement.Attributes.Remove* methods are working fine for arbitrary attributes resulting in the removed attributes being removed from XmlDocument.OuterXml property. Xmlns attribute however is different. Here is an example: XmlDocument doc = new XmlDocument(); doc.InnerXm... | TITLE:
How to remove xmlns attribute with .NET XML API
QUESTION:
XmlElement.Attributes.Remove* methods are working fine for arbitrary attributes resulting in the removed attributes being removed from XmlDocument.OuterXml property. Xmlns attribute however is different. Here is an example: XmlDocument doc = new XmlDocum... | [
".net",
"xml",
"api",
"xml-namespaces"
] | 8 | 2 | 27,174 | 9 | 0 | 2008-09-16T20:13:04.833000 | 2008-09-16T20:51:51.417000 |
76,455 | 5,827,166 | How do you change the color of the border on a group box? | In C#.NET I am trying to programmatically change the color of the border in a group box. Update: This question was asked when I was working on a winforms system before we switched to.NET. | Building on the previous answer, a better solution that includes the label for the group box: groupBox1.Paint += PaintBorderlessGroupBox;
private void PaintBorderlessGroupBox(object sender, PaintEventArgs p) { GroupBox box = (GroupBox)sender; p.Graphics.Clear(SystemColors.Control); p.Graphics.DrawString(box.Text, box.... | How do you change the color of the border on a group box? In C#.NET I am trying to programmatically change the color of the border in a group box. Update: This question was asked when I was working on a winforms system before we switched to.NET. | TITLE:
How do you change the color of the border on a group box?
QUESTION:
In C#.NET I am trying to programmatically change the color of the border in a group box. Update: This question was asked when I was working on a winforms system before we switched to.NET.
ANSWER:
Building on the previous answer, a better solut... | [
"c#",
"winforms",
"user-interface",
"controls",
"groupbox"
] | 37 | 26 | 117,151 | 7 | 0 | 2008-09-16T20:16:02.593000 | 2011-04-29T02:12:52.813000 |
76,464 | 80,315 | Creating a DNN Module that uses a end-user modifyable template | I'd like to create a module in DNN that, similar to the Announcements control, offers a template that the portal admin can modify for formatting. I have a control that currently uses a Repeater control with templates. Is there a way to override the contents of the repeater ItemTemplate, HeaderTemplate, and FooterTempla... | That are many different ways that you can accomplish this, typically the best/easiest manner is to simply put a literal control in for Header, Footer, and Item templates. Then handle the ItemDataBound event, you can look at the item type and take a specific action on it there to load the needed data. If you want to see... | Creating a DNN Module that uses a end-user modifyable template I'd like to create a module in DNN that, similar to the Announcements control, offers a template that the portal admin can modify for formatting. I have a control that currently uses a Repeater control with templates. Is there a way to override the contents... | TITLE:
Creating a DNN Module that uses a end-user modifyable template
QUESTION:
I'd like to create a module in DNN that, similar to the Announcements control, offers a template that the portal admin can modify for formatting. I have a control that currently uses a Repeater control with templates. Is there a way to ove... | [
"asp.net",
"module",
"dotnetnuke"
] | 1 | 1 | 506 | 2 | 0 | 2008-09-16T20:16:39.097000 | 2008-09-17T05:34:37.243000 |
76,482 | 76,808 | Powershell: Setting Encoding for Get-Content Pipeline | I have a file saved as UCS-2 Little Endian I want to change the encoding so I ran the following code: cat tmp.log -encoding UTF8 > new.log The resulting file is still in UCS-2 Little Endian. Is this because the pipeline is always in that format? Is there an easy way to pipe this to a new file as UTF8? | As suggested here: Get-Content tmp.log | Out-File -Encoding UTF8 new.log | Powershell: Setting Encoding for Get-Content Pipeline I have a file saved as UCS-2 Little Endian I want to change the encoding so I ran the following code: cat tmp.log -encoding UTF8 > new.log The resulting file is still in UCS-2 Little Endian. Is this because the pipeline is always in that format? Is there an easy way... | TITLE:
Powershell: Setting Encoding for Get-Content Pipeline
QUESTION:
I have a file saved as UCS-2 Little Endian I want to change the encoding so I ran the following code: cat tmp.log -encoding UTF8 > new.log The resulting file is still in UCS-2 Little Endian. Is this because the pipeline is always in that format? Is... | [
"encoding",
"powershell"
] | 50 | 60 | 105,232 | 5 | 0 | 2008-09-16T20:18:26.973000 | 2008-09-16T20:41:58.397000 |
76,484 | 76,828 | How to tell if a process is running on a mobile device | I have the handle of process 'A' on a Pocket PC 2003 device. I need to determine if that process is still running from process 'B'. Process 'B' is written in Embedded Visual C++ 4.0. | GetExitCodeProcess will return STILL_ACTIVE if the process was running when the function was called. | How to tell if a process is running on a mobile device I have the handle of process 'A' on a Pocket PC 2003 device. I need to determine if that process is still running from process 'B'. Process 'B' is written in Embedded Visual C++ 4.0. | TITLE:
How to tell if a process is running on a mobile device
QUESTION:
I have the handle of process 'A' on a Pocket PC 2003 device. I need to determine if that process is still running from process 'B'. Process 'B' is written in Embedded Visual C++ 4.0.
ANSWER:
GetExitCodeProcess will return STILL_ACTIVE if the proc... | [
"mobile",
"process",
"native",
"pocketpc",
"evc"
] | 0 | 1 | 486 | 2 | 0 | 2008-09-16T20:18:35.223000 | 2008-09-16T20:43:26.833000 |
76,522 | 76,575 | Should my C# .NET team migrate to Windows Presentation Foundation? | We make infrastructure services (data retrieval and storage) and small smart client applications (fancy reporting mostly) for a commercial bank. Our team is large, 40 odd contractual employees that are C#.NET programmers. We support 50 odd applications and systems that we have developed. A few members of the team began... | WPF UI's are easier to design implement and maintain than the current C# alternatives, so if a lot of your codebase is responsible for handling UI, migrating may serve beneficial-- as in, you'll find your team will save time in dealing with their UI layer. If most of your code is business logic, it won't help all that ... | Should my C# .NET team migrate to Windows Presentation Foundation? We make infrastructure services (data retrieval and storage) and small smart client applications (fancy reporting mostly) for a commercial bank. Our team is large, 40 odd contractual employees that are C#.NET programmers. We support 50 odd applications ... | TITLE:
Should my C# .NET team migrate to Windows Presentation Foundation?
QUESTION:
We make infrastructure services (data retrieval and storage) and small smart client applications (fancy reporting mostly) for a commercial bank. Our team is large, 40 odd contractual employees that are C#.NET programmers. We support 50... | [
".net",
"wpf"
] | 15 | 15 | 1,754 | 9 | 0 | 2008-09-16T20:21:10.943000 | 2008-09-16T20:24:43.960000 |
76,526 | 77,442 | I need this baby in a month - send me nine women! | Under what circumstances - if any - does adding programmers to a team actually speed development of an already late project? | The exact circumstances are obviously very specific to your project ( e.g. development team, management style, process maturity, difficulty of the subject matter, etc.). In order to scope this a bit better so we can speak about it in anything but sweeping oversimplifications, I'm going to restate your question: Under w... | I need this baby in a month - send me nine women! Under what circumstances - if any - does adding programmers to a team actually speed development of an already late project? | TITLE:
I need this baby in a month - send me nine women!
QUESTION:
Under what circumstances - if any - does adding programmers to a team actually speed development of an already late project?
ANSWER:
The exact circumstances are obviously very specific to your project ( e.g. development team, management style, process... | [
"project-management"
] | 184 | 87 | 12,148 | 16 | 0 | 2008-09-16T20:21:25.157000 | 2008-09-16T21:41:13.793000 |
76,534 | 91,623 | How does the Multiview control handle its Viewstate? | Does the Multiview control contain the viewstate information for each of its views regardless of whether or not the view is currently visible? | Yes it does, all the views are still there, just the inactive ones are hidden/disabled. http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.multiview_properties.aspx | How does the Multiview control handle its Viewstate? Does the Multiview control contain the viewstate information for each of its views regardless of whether or not the view is currently visible? | TITLE:
How does the Multiview control handle its Viewstate?
QUESTION:
Does the Multiview control contain the viewstate information for each of its views regardless of whether or not the view is currently visible?
ANSWER:
Yes it does, all the views are still there, just the inactive ones are hidden/disabled. http://ms... | [
".net",
"asp.net",
".net-2.0"
] | 2 | 3 | 2,759 | 3 | 0 | 2008-09-16T20:21:54.750000 | 2008-09-18T11:00:31.320000 |
76,549 | 80,718 | How are Integer arrays stored internally, in the JVM? | An array of ints in java is stored as a block of 32-bit values in memory. How is an array of Integer objects stored? i.e. int[] vs. Integer[] I'd imagine that each element in the Integer array is a reference to an Integer object, and that the Integer object has object storage overheads, just like any other object. I'm ... | No VM I know of will store an Integer[] array like an int[] array for the following reasons: There can be null Integer objects in the array and you have no bits left for indicating this in an int array. The VM could store this 1-bit information per array slot in a hiden bit-array though. You can synchronize in the elem... | How are Integer arrays stored internally, in the JVM? An array of ints in java is stored as a block of 32-bit values in memory. How is an array of Integer objects stored? i.e. int[] vs. Integer[] I'd imagine that each element in the Integer array is a reference to an Integer object, and that the Integer object has obje... | TITLE:
How are Integer arrays stored internally, in the JVM?
QUESTION:
An array of ints in java is stored as a block of 32-bit values in memory. How is an array of Integer objects stored? i.e. int[] vs. Integer[] I'd imagine that each element in the Integer array is a reference to an Integer object, and that the Integ... | [
"java",
"jvm"
] | 5 | 13 | 4,656 | 5 | 0 | 2008-09-16T20:23:02.187000 | 2008-09-17T07:12:47.117000 |
76,564 | 76,626 | Change the color of a bullet in a html list? | All I want is to be able to change the color of a bullet in a list to a light gray. It defaults to black, and I can't figure out how to change it. I know I could just use an image; I'd rather not do that if I can help it. | The bullet gets its color from the text. So if you want to have a different color bullet than text in your list you'll have to add some markup. Wrap the list text in a span: item #1 item #2 item #3 Then modify your style rules slightly: li { color: red; /* bullet color */ } li span { color: black; /* text color */ } | Change the color of a bullet in a html list? All I want is to be able to change the color of a bullet in a list to a light gray. It defaults to black, and I can't figure out how to change it. I know I could just use an image; I'd rather not do that if I can help it. | TITLE:
Change the color of a bullet in a html list?
QUESTION:
All I want is to be able to change the color of a bullet in a list to a light gray. It defaults to black, and I can't figure out how to change it. I know I could just use an image; I'd rather not do that if I can help it.
ANSWER:
The bullet gets its color ... | [
"html",
"css",
"html-lists"
] | 91 | 163 | 204,985 | 17 | 0 | 2008-09-16T20:23:47.210000 | 2008-09-16T20:28:38.367000 |
76,571 | 86,084 | Prototype's Enumerable#pluck in F#? | In JavaScript, using the Prototype library, the following functional construction is possible: var words = ["aqueous", "strength", "hated", "sesquicentennial", "area"]; words.pluck('length'); //-> [7, 8, 5, 16, 4] Note that this example code is equivalent to words.map( function(word) { return word.length; } ); I wonder... | I saw your request on the F# mailing list. Hope I can help. You could use type extension and reflection to allow this. We simple extend the generic list type with the pluck function. Then we can use pluck() on any list. An unknown property will return a list with the error string as its only contents. type Microsoft.FS... | Prototype's Enumerable#pluck in F#? In JavaScript, using the Prototype library, the following functional construction is possible: var words = ["aqueous", "strength", "hated", "sesquicentennial", "area"]; words.pluck('length'); //-> [7, 8, 5, 16, 4] Note that this example code is equivalent to words.map( function(word)... | TITLE:
Prototype's Enumerable#pluck in F#?
QUESTION:
In JavaScript, using the Prototype library, the following functional construction is possible: var words = ["aqueous", "strength", "hated", "sesquicentennial", "area"]; words.pluck('length'); //-> [7, 8, 5, 16, 4] Note that this example code is equivalent to words.m... | [
"javascript",
"f#",
"functional-programming",
"prototypejs"
] | 2 | 2 | 764 | 2 | 0 | 2008-09-16T20:24:23.557000 | 2008-09-17T18:19:21.930000 |
76,581 | 78,537 | I have P & G-- how do I use the Wincrypt API to generate a Diffie-Hellman keypair? | There's an MSDN article here, but I'm not getting very far: p = 139; g = 5;
CRYPT_DATA_BLOB pblob; pblob.cbData = sizeof( ULONG ); pblob.pbData = ( LPBYTE ) &p
CRYPT_DATA_BLOB gblob; gblob.cbData = sizeof( ULONG ); gblob.pbData = ( LPBYTE ) &g
HCRYPTKEY hKey; if (::CryptGenKey( m_hCryptoProvider, CALG_DH_SF, CRYPT_P... | It may be that it just doesn't like the very short keys you're using. I found the desktop version of that article which may help, as it has a full example. EDIT: The OP realised from the example that you have to tell CryptGenKey how long the keys are, which you do by setting the top 16-bits of the flags to the number o... | I have P & G-- how do I use the Wincrypt API to generate a Diffie-Hellman keypair? There's an MSDN article here, but I'm not getting very far: p = 139; g = 5;
CRYPT_DATA_BLOB pblob; pblob.cbData = sizeof( ULONG ); pblob.pbData = ( LPBYTE ) &p
CRYPT_DATA_BLOB gblob; gblob.cbData = sizeof( ULONG ); gblob.pbData = ( LPB... | TITLE:
I have P & G-- how do I use the Wincrypt API to generate a Diffie-Hellman keypair?
QUESTION:
There's an MSDN article here, but I'm not getting very far: p = 139; g = 5;
CRYPT_DATA_BLOB pblob; pblob.cbData = sizeof( ULONG ); pblob.pbData = ( LPBYTE ) &p
CRYPT_DATA_BLOB gblob; gblob.cbData = sizeof( ULONG ); gb... | [
"cryptography",
"cryptoapi",
"diffie-hellman"
] | 0 | 2 | 1,216 | 2 | 0 | 2008-09-16T20:25:21.807000 | 2008-09-17T00:06:37.890000 |
76,584 | 76,944 | Rhino Mocks: Is there any way to verify a constraint on an object property's property? | If I have class ObjA { public ObjB B; } class ObjB { public bool Val; } and class ObjectToMock { public DoSomething(ObjA obj){...} } Is there any way to define an expectation that not only will DoSomething get called but that obj.B.Val == true? I have tried Expect.Call(delegate { mockObj.DoSomething(null); }).Constrain... | You can try using Is.Matching() and providing a predicate constraint (moved out-of line for clarity): Predicate nestedBValIsTrue = delegate(ObjA a) { return a.B.Val == true;}; Expect.Call( delegate {mockobj.DoSomething(null);}).Constraints( Is.Matching(nestedBValIsTrue)); | Rhino Mocks: Is there any way to verify a constraint on an object property's property? If I have class ObjA { public ObjB B; } class ObjB { public bool Val; } and class ObjectToMock { public DoSomething(ObjA obj){...} } Is there any way to define an expectation that not only will DoSomething get called but that obj.B.V... | TITLE:
Rhino Mocks: Is there any way to verify a constraint on an object property's property?
QUESTION:
If I have class ObjA { public ObjB B; } class ObjB { public bool Val; } and class ObjectToMock { public DoSomething(ObjA obj){...} } Is there any way to define an expectation that not only will DoSomething get calle... | [
".net",
"rhino-mocks"
] | 3 | 2 | 1,488 | 1 | 0 | 2008-09-16T20:25:27.203000 | 2008-09-16T20:53:39.180000 |
76,601 | 76,687 | Page can not be displayed | I've got a client that sees the "Page can not be displayed" (nothing else) whenever they perform a certain action in their website. I don't get the error, ever. I've tried IE, FF, Chrome, and I do not see the error. The client sees the error on IE. The error occurs when they press a form submit button that has only hid... | In IE, go to the "Anvanced" section of "Internet Options" and uncheck "Show friendly HTTP errors". This should give you the real error. | Page can not be displayed I've got a client that sees the "Page can not be displayed" (nothing else) whenever they perform a certain action in their website. I don't get the error, ever. I've tried IE, FF, Chrome, and I do not see the error. The client sees the error on IE. The error occurs when they press a form submi... | TITLE:
Page can not be displayed
QUESTION:
I've got a client that sees the "Page can not be displayed" (nothing else) whenever they perform a certain action in their website. I don't get the error, ever. I've tried IE, FF, Chrome, and I do not see the error. The client sees the error on IE. The error occurs when they ... | [
"html"
] | 1 | 4 | 664 | 6 | 0 | 2008-09-16T20:26:44.550000 | 2008-09-16T20:32:33.757000 |
76,624 | 76,683 | 64 bit enum in C++? | Is there a way to have a 64 bit enum in C++? Whilst refactoring some code I came across bunch of #defines which would be better as an enum, but being greater than 32 bit causes the compiler to error. For some reason I thought the following might work: enum MY_ENUM: unsigned __int64 { LARGE_VALUE = 0x1000000000000000, }... | I don't think that's possible with C++98. The underlying representation of enums is up to the compiler. In that case, you are better off using: const __int64 LARGE_VALUE = 0x1000000000000000L; As of C++11, it is possible to use enum classes to specify the base type of the enum: enum class MY_ENUM: unsigned __int64 { LA... | 64 bit enum in C++? Is there a way to have a 64 bit enum in C++? Whilst refactoring some code I came across bunch of #defines which would be better as an enum, but being greater than 32 bit causes the compiler to error. For some reason I thought the following might work: enum MY_ENUM: unsigned __int64 { LARGE_VALUE = 0... | TITLE:
64 bit enum in C++?
QUESTION:
Is there a way to have a 64 bit enum in C++? Whilst refactoring some code I came across bunch of #defines which would be better as an enum, but being greater than 32 bit causes the compiler to error. For some reason I thought the following might work: enum MY_ENUM: unsigned __int64... | [
"c++",
"enums",
"64-bit"
] | 20 | 18 | 33,509 | 10 | 0 | 2008-09-16T20:28:33.233000 | 2008-09-16T20:32:14.020000 |
76,629 | 77,348 | Mixing C# Code and umanaged C++ code on Windows with Visual Studio | I would like to call my unmanaged C++ libraries from my C# code. What are the potential pitfalls and precautions that need to be taken? Thank you for your time. | This question is too broad. The only reasonable answer is P/Invoke, but that's kind of like saying that if you want to program for Windows you need to know the Win32 API. Pretty much entire books have been written about P/Invoke ( http://www.amazon.com/NET-COM-Complete-Interoperability-Guide/dp/067232170X ), and of cou... | Mixing C# Code and umanaged C++ code on Windows with Visual Studio I would like to call my unmanaged C++ libraries from my C# code. What are the potential pitfalls and precautions that need to be taken? Thank you for your time. | TITLE:
Mixing C# Code and umanaged C++ code on Windows with Visual Studio
QUESTION:
I would like to call my unmanaged C++ libraries from my C# code. What are the potential pitfalls and precautions that need to be taken? Thank you for your time.
ANSWER:
This question is too broad. The only reasonable answer is P/Invok... | [
"c#",
"windows",
"visual-c++",
"unmanaged"
] | 6 | 1 | 5,523 | 8 | 0 | 2008-09-16T20:28:49.147000 | 2008-09-16T21:32:27.653000 |
76,680 | 78,715 | Fetch unread messages, by user | I want to maintain a list of global messages that will be displayed to all users of a web app. I want each user to be able to mark these messages as read individually. I've created 2 tables; messages (id, body) and messages_read (user_id, message_id). Can you provide an sql statement that selects the unread messages fo... | If the table definitions you mentioned are complete, you might want to include a date for each message, so you can order them by date. Also, this might be a slightly more efficient way to do the select: SELECT id, message FROM messages LEFT JOIN messages_read ON messages_read.message_id = messages.id AND messages_read.... | Fetch unread messages, by user I want to maintain a list of global messages that will be displayed to all users of a web app. I want each user to be able to mark these messages as read individually. I've created 2 tables; messages (id, body) and messages_read (user_id, message_id). Can you provide an sql statement that... | TITLE:
Fetch unread messages, by user
QUESTION:
I want to maintain a list of global messages that will be displayed to all users of a web app. I want each user to be able to mark these messages as read individually. I've created 2 tables; messages (id, body) and messages_read (user_id, message_id). Can you provide an ... | [
"sql",
"mysql",
"database"
] | 0 | 2 | 837 | 3 | 0 | 2008-09-16T20:32:10.807000 | 2008-09-17T00:43:47.957000 |
76,689 | 81,056 | Advice on building a distributed CMS? | I'm in the process of designing a PHP-based content management system for personal use and eventually to be distributed. I know there are a lot of CMS's already out there, but I really haven't found one that meets my all of my needs and I also would like to have the learning experience. Security is a large focus, as ar... | Well, building your own CMS actually implies that it is not an enterprise-level product. What this means is that you will not be able to actually implement all features that make CMS users happy. Not even most features. I want to clarify that by CMS I actually mean a platform for creating web applications or web sites,... | Advice on building a distributed CMS? I'm in the process of designing a PHP-based content management system for personal use and eventually to be distributed. I know there are a lot of CMS's already out there, but I really haven't found one that meets my all of my needs and I also would like to have the learning experi... | TITLE:
Advice on building a distributed CMS?
QUESTION:
I'm in the process of designing a PHP-based content management system for personal use and eventually to be distributed. I know there are a lot of CMS's already out there, but I really haven't found one that meets my all of my needs and I also would like to have t... | [
"php",
"content-management-system"
] | 3 | 4 | 1,272 | 8 | 0 | 2008-09-16T20:32:54.677000 | 2008-09-17T08:17:13.030000 |
76,712 | 76,881 | What is the best way to handle sessions for a PHP site on multiple hosts? | PHP stores its session information on the file system of the host of the server establishing that session. In a multiple-host PHP environment, where load is unintelligently distributed amongst each host, PHP session variables are not available to each request (unless by chance the request is assigned to the same host -... | Database, or Database+Memcache. Generally speaking sessions should not be written to very often. Start with a database solution that only writes to the db when the session data has changed. Memcache should be added later as a performance enhancement. A db solution will be very fast because you are only ever looking up ... | What is the best way to handle sessions for a PHP site on multiple hosts? PHP stores its session information on the file system of the host of the server establishing that session. In a multiple-host PHP environment, where load is unintelligently distributed amongst each host, PHP session variables are not available to... | TITLE:
What is the best way to handle sessions for a PHP site on multiple hosts?
QUESTION:
PHP stores its session information on the file system of the host of the server establishing that session. In a multiple-host PHP environment, where load is unintelligently distributed amongst each host, PHP session variables ar... | [
"php",
"mysql",
"session",
"load-balancing",
"memcached"
] | 22 | 15 | 8,196 | 4 | 0 | 2008-09-16T20:34:39.460000 | 2008-09-16T20:48:00.723000 |
76,760 | 159,451 | VS2008 Setup Project: Shared (By All Users) Application Data Files? | fellow anthropoids and lily pads and paddlewheels! I'm developing a Windows desktop app in C#/.NET/WPF, using VS 2008. The app is required to install and run on Vista and XP machines. I'm working on a Setup/Windows Installer Project to install the app. My app requires read/modify/write access to a SQLCE database file (... | I have learned the answer to my question through other sources, yes, yes! Sadly, it didn't fix my problem! What's that make me -- a fixer-upper? Yes, yes! To put stuff in a sub-directory of the Common Application Data folder from a VS2008 Setup project, here's what you do: Right-click your setup project in the Solution... | VS2008 Setup Project: Shared (By All Users) Application Data Files? fellow anthropoids and lily pads and paddlewheels! I'm developing a Windows desktop app in C#/.NET/WPF, using VS 2008. The app is required to install and run on Vista and XP machines. I'm working on a Setup/Windows Installer Project to install the app.... | TITLE:
VS2008 Setup Project: Shared (By All Users) Application Data Files?
QUESTION:
fellow anthropoids and lily pads and paddlewheels! I'm developing a Windows desktop app in C#/.NET/WPF, using VS 2008. The app is required to install and run on Vista and XP machines. I'm working on a Setup/Windows Installer Project t... | [
"visual-studio-2008",
"deployment",
"installation",
"desktop",
"projects-and-solutions"
] | 31 | 21 | 32,604 | 7 | 0 | 2008-09-16T20:38:21.510000 | 2008-10-01T20:02:58.470000 |
76,762 | 76,873 | Scaling cheaply: MySQL and MS SQL | How cheap can MySQL be compared to MS SQL when you have tons of data (and joins/search)? Consider a site like stackoverflow full of Q&As already and after getting dugg. My ASP.NET sites are currently on SQL Server Express so I don't have any idea how cost compares in the long run. Although after a quick research, I'm s... | MSSQL Standard Edition (32 or 64 bit) will cost around $5K per CPU socket. 64 bit will allow you to use as much RAM as you need. Enterprise Edition is not really necessary for most deployments, so don't worry about the $20K you would need for that license. MySQL is only free if you forego a lot of the useful tools offe... | Scaling cheaply: MySQL and MS SQL How cheap can MySQL be compared to MS SQL when you have tons of data (and joins/search)? Consider a site like stackoverflow full of Q&As already and after getting dugg. My ASP.NET sites are currently on SQL Server Express so I don't have any idea how cost compares in the long run. Alth... | TITLE:
Scaling cheaply: MySQL and MS SQL
QUESTION:
How cheap can MySQL be compared to MS SQL when you have tons of data (and joins/search)? Consider a site like stackoverflow full of Q&As already and after getting dugg. My ASP.NET sites are currently on SQL Server Express so I don't have any idea how cost compares in ... | [
"sql",
"mysql",
"sql-server",
"scalability",
"scaling"
] | 2 | 5 | 1,521 | 4 | 0 | 2008-09-16T20:38:25.380000 | 2008-09-16T20:47:44.670000 |
76,781 | 243,844 | How do I TDD a custom membership provider and custom membership user? | I need to create a custom membership user and provider for an ASP.NET mvc app and I'm looking to use TDD. I have created a User class which inherits from the MembershipUser class, but when I try to test it I get an error that I can't figure out. How do I give it a valid provider name? Do I just need to add it to web.co... | The configuration to add to your unit test project configuration file would look something like this: | How do I TDD a custom membership provider and custom membership user? I need to create a custom membership user and provider for an ASP.NET mvc app and I'm looking to use TDD. I have created a User class which inherits from the MembershipUser class, but when I try to test it I get an error that I can't figure out. How ... | TITLE:
How do I TDD a custom membership provider and custom membership user?
QUESTION:
I need to create a custom membership user and provider for an ASP.NET mvc app and I'm looking to use TDD. I have created a User class which inherits from the MembershipUser class, but when I try to test it I get an error that I can'... | [
"c#",
"asp.net",
"authentication"
] | 4 | 7 | 3,198 | 2 | 0 | 2008-09-16T20:40:05.890000 | 2008-10-28T16:01:18.853000 |
76,793 | 76,826 | .NET XML Seralization | I'm working on a set of classes that will be used to serialize to XML. The XML is not controlled by me and is organized rather well. Unfortunately, there are several sets of nested nodes, the purpose of some of them is just to hold a collection of their children. Based on my current knowledge of XML Serialization, thos... | Are you not using the XmlSerializer? It's pretty damn good and makes doing things like this real easy (I use it quite a lot!). You can simply decorate your class properties with some attributes and the rest is all done for you.. Have you considered using XmlSerializer or is there a particular reason why not? Heres a co... | .NET XML Seralization I'm working on a set of classes that will be used to serialize to XML. The XML is not controlled by me and is organized rather well. Unfortunately, there are several sets of nested nodes, the purpose of some of them is just to hold a collection of their children. Based on my current knowledge of X... | TITLE:
.NET XML Seralization
QUESTION:
I'm working on a set of classes that will be used to serialize to XML. The XML is not controlled by me and is organized rather well. Unfortunately, there are several sets of nested nodes, the purpose of some of them is just to hold a collection of their children. Based on my curr... | [
".net",
"xml",
"serialization",
"xml-serialization"
] | 0 | 6 | 421 | 3 | 0 | 2008-09-16T20:41:01.380000 | 2008-09-16T20:43:18.677000 |
76,796 | 76,844 | General guidelines to avoid memory leaks in C++ | What are some general tips to make sure I don't leak memory in C++ programs? How do I figure out who should free memory that has been dynamically allocated? | Instead of managing memory manually, try to use smart pointers where applicable. Take a look at the Boost lib, TR1, and smart pointers. Also smart pointers are now a part of C++ standard called C++11. | General guidelines to avoid memory leaks in C++ What are some general tips to make sure I don't leak memory in C++ programs? How do I figure out who should free memory that has been dynamically allocated? | TITLE:
General guidelines to avoid memory leaks in C++
QUESTION:
What are some general tips to make sure I don't leak memory in C++ programs? How do I figure out who should free memory that has been dynamically allocated?
ANSWER:
Instead of managing memory manually, try to use smart pointers where applicable. Take a ... | [
"c++",
"memory",
"memory-management",
"raii"
] | 132 | 41 | 125,497 | 29 | 0 | 2008-09-16T20:41:14.670000 | 2008-09-16T20:45:17.203000 |
76,812 | 76,977 | DoSomethingToThing(Thing n) vs Thing.DoSomething() | What factors determine which approach is more appropriate? | I think both have their places. You shouldn't simply use DoSomethingToThing(Thing n) just because you think "Functional programming is good". Likewise you shouldn't simply use Thing.DoSomething() because "Object Oriented programming is good". I think it comes down to what you are trying to convey. Stop thinking about y... | DoSomethingToThing(Thing n) vs Thing.DoSomething() What factors determine which approach is more appropriate? | TITLE:
DoSomethingToThing(Thing n) vs Thing.DoSomething()
QUESTION:
What factors determine which approach is more appropriate?
ANSWER:
I think both have their places. You shouldn't simply use DoSomethingToThing(Thing n) just because you think "Functional programming is good". Likewise you shouldn't simply use Thing.D... | [
"language-agnostic",
"oop",
"coding-style"
] | 12 | 14 | 958 | 16 | 0 | 2008-09-16T20:42:12.563000 | 2008-09-16T20:56:35.117000 |
76,817 | 80,749 | How to send SOAP requests in ISO-8859-1 with Flex? | Flex uses by default UTF-8. I have not fount a way to specify a different encoding/charset on the actionscript WebService class. | Ummm, look here: http://www.adobe.com/devnet/flex/articles/struts_06.html I think that sample implies that declaring your mxml file as iso-8859-1 might do the trick, but I really don't think so. I might be wrong but as far as I know the Flash player only handles UTF-8 encoding. I've searched for a link to an official p... | How to send SOAP requests in ISO-8859-1 with Flex? Flex uses by default UTF-8. I have not fount a way to specify a different encoding/charset on the actionscript WebService class. | TITLE:
How to send SOAP requests in ISO-8859-1 with Flex?
QUESTION:
Flex uses by default UTF-8. I have not fount a way to specify a different encoding/charset on the actionscript WebService class.
ANSWER:
Ummm, look here: http://www.adobe.com/devnet/flex/articles/struts_06.html I think that sample implies that declar... | [
"apache-flex",
"actionscript",
"soap",
"encoding",
"character-encoding"
] | 1 | 1 | 1,564 | 2 | 0 | 2008-09-16T20:42:30.503000 | 2008-09-17T07:18:36.137000 |
76,855 | 82,594 | What is the best way to remotely reset the server cache in a web farm? | Each of our production web servers maintains its own cache for separate web sites (ASP.NET Web Applications). Currently to clear a cache we log into the server and "touch" the web.config file. Does anyone have an example of a safe/secure way to remotely reset the cache for a specific web application? Ideally we'd be ab... | Found a DevX article regarding a touch utility that look useful. I'm going to try combining that with either a table in the database (add a record and the touch utility finds it and updates the appropriate web.config file) or a web service (make a call and the touch utility gets called to update the appropriate web.con... | What is the best way to remotely reset the server cache in a web farm? Each of our production web servers maintains its own cache for separate web sites (ASP.NET Web Applications). Currently to clear a cache we log into the server and "touch" the web.config file. Does anyone have an example of a safe/secure way to remo... | TITLE:
What is the best way to remotely reset the server cache in a web farm?
QUESTION:
Each of our production web servers maintains its own cache for separate web sites (ASP.NET Web Applications). Currently to clear a cache we log into the server and "touch" the web.config file. Does anyone have an example of a safe/... | [
"caching"
] | 1 | 1 | 3,333 | 3 | 0 | 2008-09-16T20:46:21.210000 | 2008-09-17T12:30:07.883000 |
76,864 | 76,912 | Can I alter how types are resolved and instantiated in .NET? | In some languages you can override the "new" keyword to control how types are instantiated. You can't do this directly in.NET. However, I was wondering if there is a way to, say, handle a "Type not found" exception and manually resolve a type before whoever "new"ed up that type blows up? I'm using a serializer that rea... | You can attach an event handler to AppDomain.CurrentDomain.AssemblyResolve to take part in the process. Your EventHandler should return the assembly that is responsible for the type passed in the ResolveEventArgs. You can read more about it at MSDN | Can I alter how types are resolved and instantiated in .NET? In some languages you can override the "new" keyword to control how types are instantiated. You can't do this directly in.NET. However, I was wondering if there is a way to, say, handle a "Type not found" exception and manually resolve a type before whoever "... | TITLE:
Can I alter how types are resolved and instantiated in .NET?
QUESTION:
In some languages you can override the "new" keyword to control how types are instantiated. You can't do this directly in.NET. However, I was wondering if there is a way to, say, handle a "Type not found" exception and manually resolve a typ... | [
".net",
"new-operator"
] | 0 | 5 | 172 | 4 | 0 | 2008-09-16T20:47:05.077000 | 2008-09-16T20:50:26.897000 |
76,870 | 87,752 | Is there a way to dynamically load a properties file in NAnt? | I want to load a different properties file based upon one variable. Basically, if doing a dev build use this properties file, if doing a test build use this other properties file, and if doing a production build use yet a third properties file. | Step 1: Define a property in your NAnt script to track the environment you're building for (local, test, production, etc.). Step 2: If you don't already have a configuration or initialization target that all targets depends on, then create a configuration target, and make sure your other targets depend on it. Step 3: U... | Is there a way to dynamically load a properties file in NAnt? I want to load a different properties file based upon one variable. Basically, if doing a dev build use this properties file, if doing a test build use this other properties file, and if doing a production build use yet a third properties file. | TITLE:
Is there a way to dynamically load a properties file in NAnt?
QUESTION:
I want to load a different properties file based upon one variable. Basically, if doing a dev build use this properties file, if doing a test build use this other properties file, and if doing a production build use yet a third properties f... | [
".net",
"build",
"automation",
"nant"
] | 20 | 26 | 6,329 | 4 | 0 | 2008-09-16T20:47:26.280000 | 2008-09-17T21:16:05.500000 |
76,891 | 78,698 | Troubleshooting Timeout SqlExceptions | I have some curious behavior that I'm having trouble figuring out why is occurring. I'm seeing intermittent timeout exceptions. I'm pretty sure it's related to volume because it's not reproducible in our development environment. As a bandaid solution, I tried upping the sql command timeout to sixty seconds, but as I've... | SQL commands time out because the query you're using takes longer than that to execute. Execute it in Query Analyzer or Management Studio, with a representative amount of data in the database, and look at the execution plan to find out what's slow. If something is taking a large percentage of the time and is described ... | Troubleshooting Timeout SqlExceptions I have some curious behavior that I'm having trouble figuring out why is occurring. I'm seeing intermittent timeout exceptions. I'm pretty sure it's related to volume because it's not reproducible in our development environment. As a bandaid solution, I tried upping the sql command... | TITLE:
Troubleshooting Timeout SqlExceptions
QUESTION:
I have some curious behavior that I'm having trouble figuring out why is occurring. I'm seeing intermittent timeout exceptions. I'm pretty sure it's related to volume because it's not reproducible in our development environment. As a bandaid solution, I tried uppi... | [
"sql-server",
"ado.net",
"sqlexception"
] | 4 | 4 | 2,414 | 5 | 0 | 2008-09-16T20:48:30.287000 | 2008-09-17T00:39:03.523000 |
76,925 | 78,907 | How do I format the message used to perform an HTTP post from VBScript / ASP to a WCF service and get a response? | DOING THE POST IS NOT THE PROBLEM! Formatting the message so that I get a response is the problem. Ideally I'd be able to construct a message and use WinHTTP to perform a post to a WCF service (hosted in IIS) and get a response, but so far I've been unable to construct something that works properly. Does anyone have an... | You don't specify one thing: What binding are you exposing your service as? If you're using WsHttpBinding or BasicHttpBinding, then there's no simple "http post" you can do, because you need to include at the very least the entire SOAP envelope (with the right SOAP version and potentially security headers and so forth)... | How do I format the message used to perform an HTTP post from VBScript / ASP to a WCF service and get a response? DOING THE POST IS NOT THE PROBLEM! Formatting the message so that I get a response is the problem. Ideally I'd be able to construct a message and use WinHTTP to perform a post to a WCF service (hosted in II... | TITLE:
How do I format the message used to perform an HTTP post from VBScript / ASP to a WCF service and get a response?
QUESTION:
DOING THE POST IS NOT THE PROBLEM! Formatting the message so that I get a response is the problem. Ideally I'd be able to construct a message and use WinHTTP to perform a post to a WCF ser... | [
"wcf",
"asp-classic",
"vbscript"
] | 1 | 1 | 4,634 | 3 | 0 | 2008-09-16T20:51:35.723000 | 2008-09-17T01:24:01.793000 |
76,930 | 87,093 | What is the easiest way to adjust EXIF timestamps on photos from multiple cameras in Windows Vista? | Scenario: Several people go on holiday together, armed with digital cameras, and snap away. Some people remembered to adjust their camera clocks to local time, some left them at their home time, some left them at local time of the country they were born in, and some left their cameras on factory time. The Problem: Time... | Windows Live Photo Gallery Wave 3 Beta includes this feature. From the help: If you change the date and time settings for more than one photo at the same time, each photo's time stamp is changed by the same amount, so that the time stamps of all the selected photos remain in their original chronological order. Instruct... | What is the easiest way to adjust EXIF timestamps on photos from multiple cameras in Windows Vista? Scenario: Several people go on holiday together, armed with digital cameras, and snap away. Some people remembered to adjust their camera clocks to local time, some left them at their home time, some left them at local t... | TITLE:
What is the easiest way to adjust EXIF timestamps on photos from multiple cameras in Windows Vista?
QUESTION:
Scenario: Several people go on holiday together, armed with digital cameras, and snap away. Some people remembered to adjust their camera clocks to local time, some left them at their home time, some le... | [
"exif",
"photo-management"
] | 3 | 2 | 3,994 | 4 | 0 | 2008-09-16T20:52:02.133000 | 2008-09-17T20:09:31.540000 |
76,933 | 77,366 | App referencing Microsoft.SqlServer.Smo requires additional assemblies to be included on Target Machine? | I have a small app which references the Microsoft.SqlServer.Smo assembly (so I can display to the user a list of servers & databases to which they can connect). My application originally referenced Microsoft.SqlServer.Smo and Microsoft.SqlServer.ConnectionInfo. Things worked as expected on my dev box. When I installed ... | Yes, they do need to be included. On the development machine you probably have SQL Server installed, which places those assemblies into the Global Assembly Cache. Whenever you build, Visual Studio just pulls from them from the GAC. It also assumes that the GAC of whatever computer it will be deployed on will also have ... | App referencing Microsoft.SqlServer.Smo requires additional assemblies to be included on Target Machine? I have a small app which references the Microsoft.SqlServer.Smo assembly (so I can display to the user a list of servers & databases to which they can connect). My application originally referenced Microsoft.SqlServ... | TITLE:
App referencing Microsoft.SqlServer.Smo requires additional assemblies to be included on Target Machine?
QUESTION:
I have a small app which references the Microsoft.SqlServer.Smo assembly (so I can display to the user a list of servers & databases to which they can connect). My application originally referenced... | [
".net",
"reference"
] | 5 | 2 | 10,708 | 4 | 0 | 2008-09-16T20:52:13.710000 | 2008-09-16T21:34:15.230000 |
76,939 | 445,514 | x86 Remote Debugger Service on x64 | Is it possible to install the x86 Remote Debugger as a Service on a 64bit machine? I need to attach a debugger to managed code in a Session 0 process. The process runs 32bit but the debugger service that gets installed is 64bit and wont attach to the 32bit process. I tried creating the Service using the SC command, and... | This works on my machine(TM) after installing rdbgsetup_x64.exe and going through the configuration wizard: sc stop msvsmon90 sc config msvsmon90 binPath= "C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\Remote Debugger\x86\msvsmon.exe /service msvsmon90" sc start msvsmon90 | x86 Remote Debugger Service on x64 Is it possible to install the x86 Remote Debugger as a Service on a 64bit machine? I need to attach a debugger to managed code in a Session 0 process. The process runs 32bit but the debugger service that gets installed is 64bit and wont attach to the 32bit process. I tried creating th... | TITLE:
x86 Remote Debugger Service on x64
QUESTION:
Is it possible to install the x86 Remote Debugger as a Service on a 64bit machine? I need to attach a debugger to managed code in a Session 0 process. The process runs 32bit but the debugger service that gets installed is 64bit and wont attach to the 32bit process. I... | [
"visual-studio",
"debugging",
"remote-debugging"
] | 10 | 16 | 25,616 | 7 | 0 | 2008-09-16T20:52:58.933000 | 2009-01-15T03:12:37.013000 |
76,945 | 92,025 | Which library should I use to generate RSS in Common Lisp? | What's the best library to use to generate RSS for a webserver written in Common Lisp? | Most anything will probably do. Personally, I've been using xml-emitter for my blog's Atom feed, which has worked out well so far. Just choose whichever XML generation library you like and hack away, I'd say. As others have remarked, RSS is simple; it's little work to generate it manually. That said, I recommend not ge... | Which library should I use to generate RSS in Common Lisp? What's the best library to use to generate RSS for a webserver written in Common Lisp? | TITLE:
Which library should I use to generate RSS in Common Lisp?
QUESTION:
What's the best library to use to generate RSS for a webserver written in Common Lisp?
ANSWER:
Most anything will probably do. Personally, I've been using xml-emitter for my blog's Atom feed, which has worked out well so far. Just choose whic... | [
"rss",
"common-lisp"
] | 5 | 3 | 817 | 5 | 0 | 2008-09-16T20:53:45.890000 | 2008-09-18T12:22:38.613000 |
76,963 | 77,008 | Looking for a simple C# numeric edit control | I am a MFC programmer who is new to C# and am looking for a simple control that will allow number entry and range validation. | Look at the "NumericUpDown" control. It has range validation, the input will always be numeric, and it has those nifty increment/decrement buttons. | Looking for a simple C# numeric edit control I am a MFC programmer who is new to C# and am looking for a simple control that will allow number entry and range validation. | TITLE:
Looking for a simple C# numeric edit control
QUESTION:
I am a MFC programmer who is new to C# and am looking for a simple control that will allow number entry and range validation.
ANSWER:
Look at the "NumericUpDown" control. It has range validation, the input will always be numeric, and it has those nifty inc... | [
"c#",
"edit",
"numeric"
] | 1 | 9 | 7,856 | 5 | 0 | 2008-09-16T20:55:24.810000 | 2008-09-16T20:58:49.433000 |
76,964 | 77,186 | Using Outlook API to get to a specific folder | I'm trying to write some C# code to get to a specific folder in an Outlook mailbox. I have the following code: Outlook.Application oApp = new Outlook.Application(); Outlook.NameSpace oNS = oApp.GetNamespace("mapi"); Outlook.Recipient oRecip = oNS.CreateRecipient("AccountNameHere"); oRecip.Resolve(); if (oRecip.Resolved... | You can use the Folders collection member of the Outlook.NameSpace object. That way you can iterate through the collection and find your folder by it's name. In case you still want to use GetFolderFromID, you can use OutlookSpy tool to get the EntryID and StoreID values. | Using Outlook API to get to a specific folder I'm trying to write some C# code to get to a specific folder in an Outlook mailbox. I have the following code: Outlook.Application oApp = new Outlook.Application(); Outlook.NameSpace oNS = oApp.GetNamespace("mapi"); Outlook.Recipient oRecip = oNS.CreateRecipient("AccountNam... | TITLE:
Using Outlook API to get to a specific folder
QUESTION:
I'm trying to write some C# code to get to a specific folder in an Outlook mailbox. I have the following code: Outlook.Application oApp = new Outlook.Application(); Outlook.NameSpace oNS = oApp.GetNamespace("mapi"); Outlook.Recipient oRecip = oNS.CreateRec... | [
"c#",
"api",
"outlook"
] | 3 | 5 | 8,948 | 1 | 0 | 2008-09-16T20:55:34.153000 | 2008-09-16T21:13:41.393000 |
76,967 | 77,028 | Mending bad BAD database design once data is in the system | I know that that is not a question... erm anyway HERE is the question. I have inherited a database that has 1(one) table in that looks much like this. Its aim is to record what species are found in the various (200 odd) countries. ID Species Afghanistan Albania Algeria American Samoa Andorra Angola.... Western Sahara Y... | I would use a script to generate all the individual queries, since this is a one-off import process. Some programs such as Excel are good at mixing different dimensions of data (comparing column names to data inside rows) but relational databases rarely are. However, you might find that some systems (such as Microsoft ... | Mending bad BAD database design once data is in the system I know that that is not a question... erm anyway HERE is the question. I have inherited a database that has 1(one) table in that looks much like this. Its aim is to record what species are found in the various (200 odd) countries. ID Species Afghanistan Albania... | TITLE:
Mending bad BAD database design once data is in the system
QUESTION:
I know that that is not a question... erm anyway HERE is the question. I have inherited a database that has 1(one) table in that looks much like this. Its aim is to record what species are found in the various (200 odd) countries. ID Species A... | [
"sql",
"ms-access",
"database-design"
] | 7 | 8 | 1,110 | 20 | 0 | 2008-09-16T20:55:50.393000 | 2008-09-16T21:00:37.480000 |
76,983 | 77,063 | How to Setup a Low cost cluster | At my house I have about 10 computers all different processors and speeds (all x86 compatible). I would like to cluster these. I have looked at openMosix but since they stopped development on it I am deciding against using it. I would prefer to use the latest or next to latest version of a mainstream distribution of Li... | I recently set up an OpenMPI cluster using Ubuntu. Some existing write up is at https://wiki.ubuntu.com/MpichCluster. | How to Setup a Low cost cluster At my house I have about 10 computers all different processors and speeds (all x86 compatible). I would like to cluster these. I have looked at openMosix but since they stopped development on it I am deciding against using it. I would prefer to use the latest or next to latest version of... | TITLE:
How to Setup a Low cost cluster
QUESTION:
At my house I have about 10 computers all different processors and speeds (all x86 compatible). I would like to cluster these. I have looked at openMosix but since they stopped development on it I am deciding against using it. I would prefer to use the latest or next to... | [
"cluster-computing"
] | 7 | 2 | 5,114 | 7 | 0 | 2008-09-16T20:56:53.433000 | 2008-09-16T21:03:26.897000 |
76,993 | 77,233 | How to double buffer .NET controls on a form? | How can I set the protected DoubleBuffered property of the controls on a form that are suffering from flicker? | Here's a more generic version of Dummy's solution. We can use reflection to get at the protected DoubleBuffered property, and then it can be set to true. Note: You should pay your developer taxes and not use double-buffering if the user is running in a terminal services session (e.g. Remote Desktop) This helper method ... | How to double buffer .NET controls on a form? How can I set the protected DoubleBuffered property of the controls on a form that are suffering from flicker? | TITLE:
How to double buffer .NET controls on a form?
QUESTION:
How can I set the protected DoubleBuffered property of the controls on a form that are suffering from flicker?
ANSWER:
Here's a more generic version of Dummy's solution. We can use reflection to get at the protected DoubleBuffered property, and then it ca... | [
"c#",
"winforms",
"flicker",
"doublebuffered"
] | 60 | 95 | 76,673 | 14 | 0 | 2008-09-16T20:57:43.353000 | 2008-09-16T21:17:28.110000 |
77,005 | 77,336 | How to automatically generate a stacktrace when my program crashes | I am working on Linux with the GCC compiler. When my C++ program crashes I would like it to automatically generate a stacktrace. My program is being run by many different users and it also runs on Linux, Windows and Macintosh (all versions are compiled using gcc ). I would like my program to be able to generate a stack... | For Linux and I believe Mac OS X, if you're using gcc, or any compiler that uses glibc, you can use the backtrace() functions in execinfo.h to print a stacktrace and exit gracefully when you get a segmentation fault. Documentation can be found in the libc manual. Here's an example program that installs a SIGSEGV handle... | How to automatically generate a stacktrace when my program crashes I am working on Linux with the GCC compiler. When my C++ program crashes I would like it to automatically generate a stacktrace. My program is being run by many different users and it also runs on Linux, Windows and Macintosh (all versions are compiled ... | TITLE:
How to automatically generate a stacktrace when my program crashes
QUESTION:
I am working on Linux with the GCC compiler. When my C++ program crashes I would like it to automatically generate a stacktrace. My program is being run by many different users and it also runs on Linux, Windows and Macintosh (all vers... | [
"c++",
"gcc",
"crash",
"stack-trace",
"assert"
] | 694 | 597 | 501,782 | 31 | 0 | 2008-09-16T20:58:35.487000 | 2008-09-16T21:30:26.377000 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.