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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
148,540 | 149,207 | Creating my own Iterators | I'm trying to learn C++ so forgive me if this question demonstrates a lack of basic knowledge, you see, the fact is, I have a lack of basic knowledge. I want some help working out how to create an iterator for a class I have created. I have a class 'Shape' which has a container of Points. I have a class 'Piece' which r... | You should use Boost.Iterators. It contains a number of templates and concepts to implement new iterators and adapters for existing iterators. I have written an article about this very topic; it's in the December 2008 ACCU magazine. It discusses an (IMO) elegant solution for exactly your problem: exposing member collec... | Creating my own Iterators I'm trying to learn C++ so forgive me if this question demonstrates a lack of basic knowledge, you see, the fact is, I have a lack of basic knowledge. I want some help working out how to create an iterator for a class I have created. I have a class 'Shape' which has a container of Points. I ha... | TITLE:
Creating my own Iterators
QUESTION:
I'm trying to learn C++ so forgive me if this question demonstrates a lack of basic knowledge, you see, the fact is, I have a lack of basic knowledge. I want some help working out how to create an iterator for a class I have created. I have a class 'Shape' which has a contain... | [
"c++",
"iterator"
] | 147 | 42 | 105,421 | 6 | 0 | 2008-09-29T12:54:06.163000 | 2008-09-29T15:34:12.457000 |
148,556 | 151,559 | Access a 2nd project in the same solution with MSBuild | I'm new to MSBuild, and am learning as I need to know how to do things. Currently, I am working form the MSBuild file that is generated from the Web Deployment Project extension for Visual Studio. I have been ab;e to access and manipulate files which are directly in my Web project by creating properties form this block... | Sayed Ibrahim Hashimi answers this question very well, and he includes sample source code. Basically, you create an MSBuild project that executes other MSBuild projects. | Access a 2nd project in the same solution with MSBuild I'm new to MSBuild, and am learning as I need to know how to do things. Currently, I am working form the MSBuild file that is generated from the Web Deployment Project extension for Visual Studio. I have been ab;e to access and manipulate files which are directly i... | TITLE:
Access a 2nd project in the same solution with MSBuild
QUESTION:
I'm new to MSBuild, and am learning as I need to know how to do things. Currently, I am working form the MSBuild file that is generated from the Web Deployment Project extension for Visual Studio. I have been ab;e to access and manipulate files wh... | [
"msbuild"
] | 0 | 1 | 276 | 1 | 0 | 2008-09-29T13:03:10.290000 | 2008-09-30T02:33:46.287000 |
148,594 | 148,649 | .NET Timers: Whats is the best way to be notified in X seconds? | Suppose I have a non-recurring event that needs to be raised X seconds from now such as a timeout. Intuitively it would make sense to create a System.Timers.Timer, set its interval to X*1000, wire its tick up to the event and start it. Since this is a non-recurring event and you only want it raised once you would then ... | This constructor for the System.Threading.Timer allows you to specify a period. If you set this parameter to -1, it will disable periodic signaling and only execute once. public Timer( TimerCallback callback, Object state, TimeSpan dueTime, TimeSpan period ) | .NET Timers: Whats is the best way to be notified in X seconds? Suppose I have a non-recurring event that needs to be raised X seconds from now such as a timeout. Intuitively it would make sense to create a System.Timers.Timer, set its interval to X*1000, wire its tick up to the event and start it. Since this is a non-... | TITLE:
.NET Timers: Whats is the best way to be notified in X seconds?
QUESTION:
Suppose I have a non-recurring event that needs to be raised X seconds from now such as a timeout. Intuitively it would make sense to create a System.Timers.Timer, set its interval to X*1000, wire its tick up to the event and start it. Si... | [
".net",
"asynchronous",
"timer"
] | 5 | 10 | 2,377 | 6 | 0 | 2008-09-29T13:12:54.777000 | 2008-09-29T13:31:21.393000 |
148,601 | 214,011 | Accessing constant values from an Apache Velocity template? | Is it possible to access a constant value (i.e. a public static final variable defined in a Java class) from a Velocity template? I would like to be able to write something like this: #if ($a lt Long.MAX_VALUE) but this is apparently not the right syntax. | There are a number of ways. 1) You can put the values directly in the context. 2) You can use the FieldMethodizer to make all public static fields in a class available. 3) You can use a custom Uberspect implementation that includes public static fields in the lookup order. 4) You can use the FieldTool from VelocityTool... | Accessing constant values from an Apache Velocity template? Is it possible to access a constant value (i.e. a public static final variable defined in a Java class) from a Velocity template? I would like to be able to write something like this: #if ($a lt Long.MAX_VALUE) but this is apparently not the right syntax. | TITLE:
Accessing constant values from an Apache Velocity template?
QUESTION:
Is it possible to access a constant value (i.e. a public static final variable defined in a Java class) from a Velocity template? I would like to be able to write something like this: #if ($a lt Long.MAX_VALUE) but this is apparently not the ... | [
"java",
"velocity"
] | 16 | 12 | 11,832 | 2 | 0 | 2008-09-29T13:14:32.760000 | 2008-10-17T22:11:44.610000 |
148,625 | 148,741 | How to get master-master replication with Subversion? | Seems like a simple problem: I have an SVN repo inside our firewall. I have an SVN repo outside our firewall. I have users inside, and outside, the firewall. (no VPN isn't an option:( that'd be too easy) machines inside the firewall CAN talk to the outside SVN server. But not the other way. the outside SVN is a tempora... | I'd recommend SVK or git-svn. Both of these let you create an external mirror of your svn repository, and allow the external devs to make commits directly to the external mirror. You can then pull and push changes from this external mirror to your internal master repo. git-svn would (I think) require the external devel... | How to get master-master replication with Subversion? Seems like a simple problem: I have an SVN repo inside our firewall. I have an SVN repo outside our firewall. I have users inside, and outside, the firewall. (no VPN isn't an option:( that'd be too easy) machines inside the firewall CAN talk to the outside SVN serve... | TITLE:
How to get master-master replication with Subversion?
QUESTION:
Seems like a simple problem: I have an SVN repo inside our firewall. I have an SVN repo outside our firewall. I have users inside, and outside, the firewall. (no VPN isn't an option:( that'd be too easy) machines inside the firewall CAN talk to the... | [
"svn",
"replication",
"git-svn"
] | 13 | 6 | 18,806 | 6 | 0 | 2008-09-29T13:21:35.737000 | 2008-09-29T13:55:44.080000 |
148,641 | 148,911 | Customizing AntRunner output | I'm using Eclipse's AntRunner to build a set of plugins, but I'm having trouble in configuring the logging behavior. Specifically, I'd like AntRunner not to display empty tasks. Anybody knows how to do this? | The solution is to pass the following JVM options: java -jar... -logger org.apache.tools.ant.NoBannerLogger | Customizing AntRunner output I'm using Eclipse's AntRunner to build a set of plugins, but I'm having trouble in configuring the logging behavior. Specifically, I'd like AntRunner not to display empty tasks. Anybody knows how to do this? | TITLE:
Customizing AntRunner output
QUESTION:
I'm using Eclipse's AntRunner to build a set of plugins, but I'm having trouble in configuring the logging behavior. Specifically, I'd like AntRunner not to display empty tasks. Anybody knows how to do this?
ANSWER:
The solution is to pass the following JVM options: java ... | [
"eclipse",
"ant",
"eclipse-pde",
"antrunner"
] | 1 | 2 | 600 | 1 | 0 | 2008-09-29T13:29:20.947000 | 2008-09-29T14:29:05.733000 |
148,662 | 148,716 | What is the least amount of code needed to update one list with another list? | Suppose I have one list: IList originalList = new List (); originalList.add(1); originalList.add(5); originalList.add(10); And another list... IList newList = new List (); newList.add(1); newList.add(5); newList.add(7); newList.add(11); How can I update originalList so that: If the int appears in newList, keep If the i... | Sorry, wrote my first response before I saw your last paragraph. for(int i = originalList.length-1; i >=0; --i) { if (!newList.Contains(originalList[i]) originalList.RemoveAt(i); }
foreach(int n in newList) { if (!originaList.Contains(n)) originalList.Add(n); } | What is the least amount of code needed to update one list with another list? Suppose I have one list: IList originalList = new List (); originalList.add(1); originalList.add(5); originalList.add(10); And another list... IList newList = new List (); newList.add(1); newList.add(5); newList.add(7); newList.add(11); How c... | TITLE:
What is the least amount of code needed to update one list with another list?
QUESTION:
Suppose I have one list: IList originalList = new List (); originalList.add(1); originalList.add(5); originalList.add(10); And another list... IList newList = new List (); newList.add(1); newList.add(5); newList.add(7); newL... | [
"c#",
"generics",
"merge",
"generic-list"
] | 2 | 1 | 475 | 10 | 0 | 2008-09-29T13:35:31.773000 | 2008-09-29T13:49:16.937000 |
148,669 | 148,688 | Local variables with Delegates | This is clearly not appears like it wouldn't be a best practice. Can someone explain why it would not be a best practice or how this works? Any books or articles providing an explanation would be appreciated. //The constructor public Page_Index() {
//create a local value string currentValue = "This is the FIRST value"... | currentValue is no longer a local variable: it is a captured variable. This compiles to something like: class Foo { public string currentValue; // yes, it is a field
public void SomeMethod(object sender, EventArgs e) { Response.Write(currentValue); } }... public Page_Index() { Foo foo = new Foo(); foo.currentValue = "... | Local variables with Delegates This is clearly not appears like it wouldn't be a best practice. Can someone explain why it would not be a best practice or how this works? Any books or articles providing an explanation would be appreciated. //The constructor public Page_Index() {
//create a local value string currentVa... | TITLE:
Local variables with Delegates
QUESTION:
This is clearly not appears like it wouldn't be a best practice. Can someone explain why it would not be a best practice or how this works? Any books or articles providing an explanation would be appreciated. //The constructor public Page_Index() {
//create a local valu... | [
"c#",
"delegates",
"closures",
"heap-memory"
] | 25 | 32 | 13,109 | 3 | 0 | 2008-09-29T13:38:14.560000 | 2008-09-29T13:42:57.247000 |
148,670 | 148,683 | Why is the fact that Microsoft decided to support jQuery such a big deal? | I don't see what all this fuss is about Microsoft's decision to support JQuery within ASP.NET MVC. There were signs that open-minded people are starting to have some say in the matters of marketing for a while now. And even the way MS does business has started to change. But at it's core it's still acting in response t... | Its the first time MS is shipping an open source component they didn't write with one of their products. This doesn't seem like a big deal, but its almost nuclear in its implications. Think about it... They are saying "we support this." In an OSS product, MS has no control over the code. So, they are putting their live... | Why is the fact that Microsoft decided to support jQuery such a big deal? I don't see what all this fuss is about Microsoft's decision to support JQuery within ASP.NET MVC. There were signs that open-minded people are starting to have some say in the matters of marketing for a while now. And even the way MS does busine... | TITLE:
Why is the fact that Microsoft decided to support jQuery such a big deal?
QUESTION:
I don't see what all this fuss is about Microsoft's decision to support JQuery within ASP.NET MVC. There were signs that open-minded people are starting to have some say in the matters of marketing for a while now. And even the ... | [
"jquery",
"asp.net"
] | 30 | 54 | 2,695 | 12 | 0 | 2008-09-29T13:38:28.537000 | 2008-09-29T13:41:45.503000 |
148,676 | 148,695 | Play a sound, wait for it to finish and then do something? | I'm writing a Windows Forms application which is supposed to play three sound files and at the end of each sound file, it's to change the source of an image. I can get it to play the sounds using System.Media.SoundPlayer. However, it seems to play the sound in a different thread, continuing on. The net effect of this i... | Did you try SoundPlayer.PlaySync Method? From the help: The PlaySync method uses the current thread to play a.wav file, preventing the thread from handling other messages until the load is complete. | Play a sound, wait for it to finish and then do something? I'm writing a Windows Forms application which is supposed to play three sound files and at the end of each sound file, it's to change the source of an image. I can get it to play the sounds using System.Media.SoundPlayer. However, it seems to play the sound in ... | TITLE:
Play a sound, wait for it to finish and then do something?
QUESTION:
I'm writing a Windows Forms application which is supposed to play three sound files and at the end of each sound file, it's to change the source of an image. I can get it to play the sounds using System.Media.SoundPlayer. However, it seems to ... | [
"c#",
"multithreading",
"audio",
"synchronization"
] | 5 | 13 | 15,037 | 5 | 0 | 2008-09-29T13:40:04.600000 | 2008-09-29T13:44:20.253000 |
148,678 | 148,700 | Tool Comparison: Visual Assist X and Resharper | .NET developers out there! Need your opinion here! I am now using Visual Assist X, a decent piece of software, indeed. But the.NET bloggers seem to prefer Resharper more. I might want to consider a switch over, but before that I want your guys opinion first. | Resharper is much better for C# code (and supposedly VB.Net, but I haven't tried that). Unfortunately there is no support for C/C++, so if you need that, you might want to keep Visual Assist around. They don't coexist very well, unfortunately, so you may need to unload one, then load the other, when switching between C... | Tool Comparison: Visual Assist X and Resharper .NET developers out there! Need your opinion here! I am now using Visual Assist X, a decent piece of software, indeed. But the.NET bloggers seem to prefer Resharper more. I might want to consider a switch over, but before that I want your guys opinion first. | TITLE:
Tool Comparison: Visual Assist X and Resharper
QUESTION:
.NET developers out there! Need your opinion here! I am now using Visual Assist X, a decent piece of software, indeed. But the.NET bloggers seem to prefer Resharper more. I might want to consider a switch over, but before that I want your guys opinion fir... | [
".net",
"resharper",
"visual-studio-addins",
"visual-assist"
] | 23 | 29 | 26,593 | 3 | 0 | 2008-09-29T13:40:20.077000 | 2008-09-29T13:45:36.443000 |
148,681 | 148,707 | Unloading classes in java? | I have a custom class loader so that a desktop application can dynamically start loading classes from an AppServer I need to talk to. We did this since the amount of jars that are required to do this are ridiculous (if we wanted to ship them). We also have version problems if we don't load the classes dynamically at ru... | The only way that a Class can be unloaded is if the Classloader used is garbage collected. This means, references to every single class and to the classloader itself need to go the way of the dodo. One possible solution to your problem is to have a Classloader for every jar file, and a Classloader for each of the AppSe... | Unloading classes in java? I have a custom class loader so that a desktop application can dynamically start loading classes from an AppServer I need to talk to. We did this since the amount of jars that are required to do this are ridiculous (if we wanted to ship them). We also have version problems if we don't load th... | TITLE:
Unloading classes in java?
QUESTION:
I have a custom class loader so that a desktop application can dynamically start loading classes from an AppServer I need to talk to. We did this since the amount of jars that are required to do this are ridiculous (if we wanted to ship them). We also have version problems i... | [
"java",
"classloader"
] | 198 | 209 | 158,126 | 7 | 0 | 2008-09-29T13:40:59.187000 | 2008-09-29T13:46:52.463000 |
148,689 | 154,130 | iSeries Export to CSV | Is there an iSeries command to export the data in a table to CSV format? I know about the Windows utilities, but since this needs to be run automatically I need to run this from a CL program. | You can use CPYTOIMPF and specify the TOSTMF option to place a CSV file on the IFS. Example: CPYTOIMPF FROMFILE(DBFILE) TOSTMF('/outputfile.csv') STMFCODPAG(*PCASCII) RCDDLM(*CRLF) | iSeries Export to CSV Is there an iSeries command to export the data in a table to CSV format? I know about the Windows utilities, but since this needs to be run automatically I need to run this from a CL program. | TITLE:
iSeries Export to CSV
QUESTION:
Is there an iSeries command to export the data in a table to CSV format? I know about the Windows utilities, but since this needs to be run automatically I need to run this from a CL program.
ANSWER:
You can use CPYTOIMPF and specify the TOSTMF option to place a CSV file on the ... | [
"csv",
"ibm-midrange",
"control-language"
] | 4 | 13 | 11,789 | 5 | 0 | 2008-09-29T13:43:02.567000 | 2008-09-30T17:35:26.417000 |
148,725 | 148,890 | ASP.NET MVC input validation | I'm currently working on a blog application in ASP.NET MVC. I can't quite figure out how to handle my input validation! As far as I understand the view itself cannot know about input validation!? So how am I going to do this? | Scott Guthrie has written something about ASP.NET MVC Preview 5, and form posting: ASP.NET MVC Preview 5 and Form Posting Scenarios It's a big post, but it walks you through a Form posting validation thingy. Remark that this is not the only way to do it, but it is a way. | ASP.NET MVC input validation I'm currently working on a blog application in ASP.NET MVC. I can't quite figure out how to handle my input validation! As far as I understand the view itself cannot know about input validation!? So how am I going to do this? | TITLE:
ASP.NET MVC input validation
QUESTION:
I'm currently working on a blog application in ASP.NET MVC. I can't quite figure out how to handle my input validation! As far as I understand the view itself cannot know about input validation!? So how am I going to do this?
ANSWER:
Scott Guthrie has written something ab... | [
"c#",
"asp.net-mvc"
] | 7 | 9 | 9,850 | 1 | 0 | 2008-09-29T13:51:04.577000 | 2008-09-29T14:24:59.767000 |
148,742 | 148,811 | How to detect if any specific drive is a hard drive? | In C# how do you detect is a specific drive is a Hard Drive, Network Drive, CDRom, or floppy? | The method GetDrives() returns a DriveInfo class which has a property DriveType that corresponds to the enumeration of System.IO.DriveType: public enum DriveType { Unknown, // The type of drive is unknown. NoRootDirectory, // The drive does not have a root directory. Removable, // The drive is a removable storage devic... | How to detect if any specific drive is a hard drive? In C# how do you detect is a specific drive is a Hard Drive, Network Drive, CDRom, or floppy? | TITLE:
How to detect if any specific drive is a hard drive?
QUESTION:
In C# how do you detect is a specific drive is a Hard Drive, Network Drive, CDRom, or floppy?
ANSWER:
The method GetDrives() returns a DriveInfo class which has a property DriveType that corresponds to the enumeration of System.IO.DriveType: public... | [
"c#",
"hardware",
"hard-drive"
] | 13 | 18 | 5,183 | 3 | 0 | 2008-09-29T13:55:56.733000 | 2008-09-29T14:09:34.500000 |
148,752 | 148,884 | Silverlight and Rails | Hopefully this will not spark a religious war... We have a web based app in RoR based on an earlier version we build in.net 2.0. So we currently have both.net and RoR skills in house. We want to add a RIA app that interfaces with the rails web app. This should be capable of running offine, with some (perhaps relational... | A choice between Flex/Silverlight should depend on your skills and what you want the RIA to do. There's a fair comparison here: http://extremeblue.wordpress.com/2008/04/28/flex-vs-silverlight-my-views/ But I think you should also look at "pure" javascript solutions like ExtJS or JQuery. We've had good experiences with ... | Silverlight and Rails Hopefully this will not spark a religious war... We have a web based app in RoR based on an earlier version we build in.net 2.0. So we currently have both.net and RoR skills in house. We want to add a RIA app that interfaces with the rails web app. This should be capable of running offine, with so... | TITLE:
Silverlight and Rails
QUESTION:
Hopefully this will not spark a religious war... We have a web based app in RoR based on an earlier version we build in.net 2.0. So we currently have both.net and RoR skills in house. We want to add a RIA app that interfaces with the rails web app. This should be capable of runni... | [
"ruby-on-rails",
"silverlight"
] | 2 | 1 | 697 | 3 | 0 | 2008-09-29T13:57:21.410000 | 2008-09-29T14:23:12.500000 |
148,764 | 809,782 | Is there a list of the common show routines in Vxworks? | In the vxWorks shell, there are a number of routines you can use to display information about the system. These routines are usually referred to as show routines because they tend to have the form of "xxxShow". Is there a list of these routines available? | I work with VxWorks 5.5 and use the symbol lookup function "lkup" to find functions and/or variables that I may be interested in. Execute the following command where ">" is the VxWorks shell prompt. > lkup "Show" This will output a list of symbols that include the "Show" in their name, including all of the "Show" funct... | Is there a list of the common show routines in Vxworks? In the vxWorks shell, there are a number of routines you can use to display information about the system. These routines are usually referred to as show routines because they tend to have the form of "xxxShow". Is there a list of these routines available? | TITLE:
Is there a list of the common show routines in Vxworks?
QUESTION:
In the vxWorks shell, there are a number of routines you can use to display information about the system. These routines are usually referred to as show routines because they tend to have the form of "xxxShow". Is there a list of these routines a... | [
"vxworks"
] | 2 | 8 | 22,261 | 2 | 0 | 2008-09-29T13:59:49.907000 | 2009-05-01T00:49:03.257000 |
148,786 | 148,801 | How to shift items in an array? | I have an array of items that are time sensitive. After an amount of time, the last item needs to fall off and a new item is put at the beginning. What is the best way to do this? | I would suggest using a queue, just a special instance of an array or list. When your timed event occurs, pop the last item from the queue, and then push your new item on. | How to shift items in an array? I have an array of items that are time sensitive. After an amount of time, the last item needs to fall off and a new item is put at the beginning. What is the best way to do this? | TITLE:
How to shift items in an array?
QUESTION:
I have an array of items that are time sensitive. After an amount of time, the last item needs to fall off and a new item is put at the beginning. What is the best way to do this?
ANSWER:
I would suggest using a queue, just a special instance of an array or list. When ... | [
"c#",
"data-structures"
] | 1 | 10 | 15,597 | 11 | 0 | 2008-09-29T14:05:33.107000 | 2008-09-29T14:08:22.427000 |
148,790 | 148,836 | What is the impact of having namespaces in multiple DLLs? | I've inherited a VB.net project that generates 2 DLLS: one for the web app, and another for the "business layer". This is for a sub-app of a larger web site. (Using VS2005). The problem is that that something doesn't smell right with the DLL & namespace structure, and I'd like to know if there are any performance impac... | When your program is compiled the full type name is included along with "evidence". This evidence includes the name of the assembly and versioning information. Otherwise it wouldn't know if you wanted the 1.0 or the 1.1 or the 2.0 version of the class. This same system allows it to find different classes in the same na... | What is the impact of having namespaces in multiple DLLs? I've inherited a VB.net project that generates 2 DLLS: one for the web app, and another for the "business layer". This is for a sub-app of a larger web site. (Using VS2005). The problem is that that something doesn't smell right with the DLL & namespace structur... | TITLE:
What is the impact of having namespaces in multiple DLLs?
QUESTION:
I've inherited a VB.net project that generates 2 DLLS: one for the web app, and another for the "business layer". This is for a sub-app of a larger web site. (Using VS2005). The problem is that that something doesn't smell right with the DLL & ... | [
".net",
"asp.net",
"namespaces"
] | 2 | 1 | 1,305 | 5 | 0 | 2008-09-29T14:06:32.337000 | 2008-09-29T14:13:25.880000 |
148,798 | 149,589 | How to deploy complex SQL solutions through an installer? | Part of the setup routine for the product I'm working on installs a database update utility. The utility checks the current version of the users database and (if necessary) executes a series of SQL statements that upgrade the database to the current version. Two key features of this routine: Once initiated, it runs wit... | You never throw a users data out. One possible option is to try and create the unique index. If the index creation fails, let them know it failed, tell them what they need to research, and provide them a script they can run if they find they have a data error that they choose to fix up. | How to deploy complex SQL solutions through an installer? Part of the setup routine for the product I'm working on installs a database update utility. The utility checks the current version of the users database and (if necessary) executes a series of SQL statements that upgrade the database to the current version. Two... | TITLE:
How to deploy complex SQL solutions through an installer?
QUESTION:
Part of the setup routine for the product I'm working on installs a database update utility. The utility checks the current version of the users database and (if necessary) executes a series of SQL statements that upgrade the database to the cu... | [
"sql",
"database",
"installation"
] | 2 | 0 | 200 | 2 | 0 | 2008-09-29T14:08:07.483000 | 2008-09-29T16:50:33.550000 |
148,807 | 152,642 | How to find unused attributes/methods in Visual C++ 2008 | Is there a way to identify unused attributes/methods in Visual C++ 2008 Professional? If it's not possible by default, recommendations of 3rd-party tools are also much appreciated. Thanks, Florian Edit: nDepend only works for.NET assemblies. I'm looking for something that can be used with native C++ applications. | Try PC-Lint. It's pretty good at finding redundant code. I haven't tried version 9 yet. Version 8 does take some time to configure. Try the online interactive demo. | How to find unused attributes/methods in Visual C++ 2008 Is there a way to identify unused attributes/methods in Visual C++ 2008 Professional? If it's not possible by default, recommendations of 3rd-party tools are also much appreciated. Thanks, Florian Edit: nDepend only works for.NET assemblies. I'm looking for somet... | TITLE:
How to find unused attributes/methods in Visual C++ 2008
QUESTION:
Is there a way to identify unused attributes/methods in Visual C++ 2008 Professional? If it's not possible by default, recommendations of 3rd-party tools are also much appreciated. Thanks, Florian Edit: nDepend only works for.NET assemblies. I'm... | [
"c++",
"visual-studio",
"visual-studio-2008",
"visual-c++",
"static-analysis"
] | 8 | 6 | 3,621 | 6 | 0 | 2008-09-29T14:09:24.017000 | 2008-09-30T11:28:52.833000 |
148,828 | 148,949 | How to emulate C# as-operator in Java | There are situations, where it is practical to have a type-cast return a null value instead of throwing a ClassCastException. C# has the as operator to do this. Is there something equivalent available in Java so you don't have to explicitly check for the ClassCastException? | Here's an implementation of as, as suggested by @Omar Kooheji: public static T as(Class clazz, Object o){ if(clazz.isInstance(o)){ return clazz.cast(o); } return null; }
as(A.class, new Object()) --> null as(B.class, new B()) --> B | How to emulate C# as-operator in Java There are situations, where it is practical to have a type-cast return a null value instead of throwing a ClassCastException. C# has the as operator to do this. Is there something equivalent available in Java so you don't have to explicitly check for the ClassCastException? | TITLE:
How to emulate C# as-operator in Java
QUESTION:
There are situations, where it is practical to have a type-cast return a null value instead of throwing a ClassCastException. C# has the as operator to do this. Is there something equivalent available in Java so you don't have to explicitly check for the ClassCast... | [
"java",
"casting"
] | 57 | 62 | 27,995 | 6 | 0 | 2008-09-29T14:11:56.647000 | 2008-09-29T14:36:16.167000 |
148,833 | 148,850 | Will .Net 4.0 include a new CLR or keep with version 2.0 | Will.Net 4.0 use a new version of the CLR (v2.1, 3.0) or will it stick with the existing v2.0? Supplementary: Is it possibly going to keep with CLR v2.0 and add DLR v1.0? Update: Whilst this might look like a speculative question which cannot be answered, the VS team appear to be releasing more and more info on VS10 an... | 4.0 is going to be another side by side release from what I have read. http://blogs.msdn.com/wenlong/archive/2008/09/07/net-4-0-wf-wcf-and-oslo.aspx | Will .Net 4.0 include a new CLR or keep with version 2.0 Will.Net 4.0 use a new version of the CLR (v2.1, 3.0) or will it stick with the existing v2.0? Supplementary: Is it possibly going to keep with CLR v2.0 and add DLR v1.0? Update: Whilst this might look like a speculative question which cannot be answered, the VS ... | TITLE:
Will .Net 4.0 include a new CLR or keep with version 2.0
QUESTION:
Will.Net 4.0 use a new version of the CLR (v2.1, 3.0) or will it stick with the existing v2.0? Supplementary: Is it possibly going to keep with CLR v2.0 and add DLR v1.0? Update: Whilst this might look like a speculative question which cannot be... | [
"clr",
".net-4.0",
"versioning",
"dynamic-language-runtime"
] | 14 | 5 | 5,343 | 3 | 0 | 2008-09-29T14:12:53.040000 | 2008-09-29T14:16:41.503000 |
148,838 | 148,947 | How do I configure Apache 2.2 for Ruby on Rails in Windows? | I'm trying to get started writing some Ruby on Rails apps and have been successful with Mongrel but, I'd like to deploy my apps to my Apache 2.2 instance on Windows? All the tutorials I've found seem out of date and are for older versions of Apache/Rails. Does anyone know of a good, current tutorial for configuring Apa... | EDIT: At least until there's a Phusion Passenger for Win, Apache + Mongrel is the way to go. You can use Apache + FastCGI without Mongrel, but under real loads you will get (more) zombie processes and (more) memory leaks. You could also look at proxying to Thin in the same way as detailed below. However, I've had some ... | How do I configure Apache 2.2 for Ruby on Rails in Windows? I'm trying to get started writing some Ruby on Rails apps and have been successful with Mongrel but, I'd like to deploy my apps to my Apache 2.2 instance on Windows? All the tutorials I've found seem out of date and are for older versions of Apache/Rails. Does... | TITLE:
How do I configure Apache 2.2 for Ruby on Rails in Windows?
QUESTION:
I'm trying to get started writing some Ruby on Rails apps and have been successful with Mongrel but, I'd like to deploy my apps to my Apache 2.2 instance on Windows? All the tutorials I've found seem out of date and are for older versions of ... | [
"ruby-on-rails",
"ruby",
"apache"
] | 10 | 13 | 31,705 | 5 | 0 | 2008-09-29T14:13:48.890000 | 2008-09-29T14:35:54.687000 |
148,839 | 148,887 | ASP.net MVC with Ajax | Does anybody know of an up to date tutorial on using Ajax with ASP.net MVC? Most of what I can find seems to talk about older versions of MVC and I suspect that this is an area where there has been a lot of change of late. | Stephen Walter just blogged about this: http://weblogs.asp.net/stephenwalther/archive/2008/09/22/asp-net-mvc-application-building-forums-6-ajax.aspx | ASP.net MVC with Ajax Does anybody know of an up to date tutorial on using Ajax with ASP.net MVC? Most of what I can find seems to talk about older versions of MVC and I suspect that this is an area where there has been a lot of change of late. | TITLE:
ASP.net MVC with Ajax
QUESTION:
Does anybody know of an up to date tutorial on using Ajax with ASP.net MVC? Most of what I can find seems to talk about older versions of MVC and I suspect that this is an area where there has been a lot of change of late.
ANSWER:
Stephen Walter just blogged about this: http://w... | [
"asp.net-mvc",
"ajax"
] | 4 | 2 | 1,174 | 3 | 0 | 2008-09-29T14:14:03.053000 | 2008-09-29T14:23:50.190000 |
148,853 | 149,917 | Caching in urllib2? | Is there an easy way to cache things when using urllib2 that I am over-looking, or do I have to roll my own? | You could use a decorator function such as: class cache(object): def __init__(self, fun): self.fun = fun self.cache = {}
def __call__(self, *args, **kwargs): key = str(args) + str(kwargs) try: return self.cache[key] except KeyError: self.cache[key] = rval = self.fun(*args, **kwargs) return rval except TypeError: # inc... | Caching in urllib2? Is there an easy way to cache things when using urllib2 that I am over-looking, or do I have to roll my own? | TITLE:
Caching in urllib2?
QUESTION:
Is there an easy way to cache things when using urllib2 that I am over-looking, or do I have to roll my own?
ANSWER:
You could use a decorator function such as: class cache(object): def __init__(self, fun): self.fun = fun self.cache = {}
def __call__(self, *args, **kwargs): key =... | [
"python",
"caching",
"urllib2"
] | 13 | 7 | 8,873 | 7 | 0 | 2008-09-29T14:17:13.530000 | 2008-09-29T18:03:38.260000 |
148,856 | 150,019 | Using P/Invoke correctly | I need to call an external dll from c#. This is the header definition: enum WatchMode { WATCH_MODE_SYSTEM = 0, WATCH_MODE_APPLICATION = 1 };
LONG ADS_API WDT_GetMode ( LONG i_hHandle, WatchMode * o_pWatchMode ); I've added the enum and the call in C#: public enum WatchMode { WATCH_MODE_SYSTEM = 0, WATCH_MODE_APPLICATI... | You're running into a parameter size problem difference between C# and C++. In the C++/windows world LONG is a 4 byte signed integer. In the C# world long is a 8 byte signed integer. You should change your C# signature to take an int. ffpf is wrong in saying that you should use an IntPtr here. It will fix this particul... | Using P/Invoke correctly I need to call an external dll from c#. This is the header definition: enum WatchMode { WATCH_MODE_SYSTEM = 0, WATCH_MODE_APPLICATION = 1 };
LONG ADS_API WDT_GetMode ( LONG i_hHandle, WatchMode * o_pWatchMode ); I've added the enum and the call in C#: public enum WatchMode { WATCH_MODE_SYSTEM ... | TITLE:
Using P/Invoke correctly
QUESTION:
I need to call an external dll from c#. This is the header definition: enum WatchMode { WATCH_MODE_SYSTEM = 0, WATCH_MODE_APPLICATION = 1 };
LONG ADS_API WDT_GetMode ( LONG i_hHandle, WatchMode * o_pWatchMode ); I've added the enum and the call in C#: public enum WatchMode { ... | [
"c#",
"windows",
"interop",
"pinvoke"
] | 1 | 9 | 2,507 | 2 | 0 | 2008-09-29T14:18:17.177000 | 2008-09-29T18:33:13.273000 |
148,875 | 148,897 | How to exclude a certain member from a MDX call that gets all descendants of a member at a higher level | In an OLAP database I work with there is a 'Location' hierarchy consisting of the levels Company -> Region -> Area -> Site -> Room. I am using the following MDX to get all the descendants of a particular member at company level. DESCENDANTS([Location].[Test Company],[Location].[Site], SELF_AND_BEFORE) I now have a requ... | The EXCEPT function will take a set, and remove the members you dont want. In your case you need to say: EXCEPT( {DESCENDANTS([Location].[Test Company],[Location].[Site], SELF_AND_BEFORE)}, {DESCENDANTS([Location].[Whatever].[Redundant],[Location].[Site], SELF_AND_BEFORE)} ) This gives you everything in the first set e... | How to exclude a certain member from a MDX call that gets all descendants of a member at a higher level In an OLAP database I work with there is a 'Location' hierarchy consisting of the levels Company -> Region -> Area -> Site -> Room. I am using the following MDX to get all the descendants of a particular member at co... | TITLE:
How to exclude a certain member from a MDX call that gets all descendants of a member at a higher level
QUESTION:
In an OLAP database I work with there is a 'Location' hierarchy consisting of the levels Company -> Region -> Area -> Site -> Room. I am using the following MDX to get all the descendants of a parti... | [
"mdx"
] | 15 | 26 | 38,717 | 2 | 0 | 2008-09-29T14:20:22.633000 | 2008-09-29T14:26:12.807000 |
148,879 | 148,900 | Why does my .NET application crash when run from a network drive? | My.NET application fails when run from a network drive even when the very same executable runs perfectly fine from a local hard drive? I tried checking for "Full trust" like so: try { // Demand full trust permissions PermissionSet fullTrust = new PermissionSet( PermissionState.Unrestricted ); fullTrust.Demand();
// Pe... | It indeed has to do with the fact the apps on a network location are less trusted then on your local hdd (due to the default policy of the.NET framework). If I'm not mistaken Microsoft finally corrected this annoyance in.NET 3.5 SP1 (after a lot of developers complaining). I google'd it:.NET Framework 3.5 SP1 Allows ma... | Why does my .NET application crash when run from a network drive? My.NET application fails when run from a network drive even when the very same executable runs perfectly fine from a local hard drive? I tried checking for "Full trust" like so: try { // Demand full trust permissions PermissionSet fullTrust = new Permiss... | TITLE:
Why does my .NET application crash when run from a network drive?
QUESTION:
My.NET application fails when run from a network drive even when the very same executable runs perfectly fine from a local hard drive? I tried checking for "Full trust" like so: try { // Demand full trust permissions PermissionSet fullT... | [
"c#",
".net",
"networking",
"securityexception",
"permissionset"
] | 31 | 22 | 17,028 | 6 | 0 | 2008-09-29T14:21:28.167000 | 2008-09-29T14:26:38.920000 |
148,881 | 1,617,173 | How do I append a large amount of rich content (images, formatting) quickly to a control without using tons of CPU? | I am using wxWidgets and Visual C++ to create functionality similar to using Unix "tail -f" with rich formatting (colors, fonts, images) in a GUI. I am targeting both wxMSW and wxMAC. The obvious answer is to use wxTextCtrl with wxTE_RICH, using calls to wxTextCtrl::SetDefaultStyle() and wxTextCtrl::WriteText(). Howeve... | Derive from wxVListBox. From the docs: wxVListBox is a listbox-like control with the following two main differences from a regular listbox: it can have an arbitrarily huge number of items because it doesn't store them itself but uses OnDrawItem() callback to draw them (so it is a Virtual listbox) and its items can have... | How do I append a large amount of rich content (images, formatting) quickly to a control without using tons of CPU? I am using wxWidgets and Visual C++ to create functionality similar to using Unix "tail -f" with rich formatting (colors, fonts, images) in a GUI. I am targeting both wxMSW and wxMAC. The obvious answer i... | TITLE:
How do I append a large amount of rich content (images, formatting) quickly to a control without using tons of CPU?
QUESTION:
I am using wxWidgets and Visual C++ to create functionality similar to using Unix "tail -f" with rich formatting (colors, fonts, images) in a GUI. I am targeting both wxMSW and wxMAC. Th... | [
"c++",
"performance",
"wxwidgets"
] | 2 | 0 | 530 | 3 | 0 | 2008-09-29T14:22:17.963000 | 2009-10-24T06:27:38.323000 |
148,882 | 149,023 | Using events rather than exceptions to implement error handling | I'm working on some code that uses a pattern in its business and data tiers that uses events to signal errors e.g. resource = AllocateLotsOfMemory(); if (SomeCondition()) { OnOddError(new OddErrorEventArgs(resource.StatusProperty)); resource.FreeLotsOfMemory(); return; } This looked superficially rather odd, especially... | Take a look at this post by Udi Dahan. Its an elegant approach for dispatching domain events. The previous poster is correct in saying that you should not be using an event mechanism to recover from fatal errors, but it is a very useful pattern for notification in loosely coupled systems: public class DomainEventStorag... | Using events rather than exceptions to implement error handling I'm working on some code that uses a pattern in its business and data tiers that uses events to signal errors e.g. resource = AllocateLotsOfMemory(); if (SomeCondition()) { OnOddError(new OddErrorEventArgs(resource.StatusProperty)); resource.FreeLotsOfMemo... | TITLE:
Using events rather than exceptions to implement error handling
QUESTION:
I'm working on some code that uses a pattern in its business and data tiers that uses events to signal errors e.g. resource = AllocateLotsOfMemory(); if (SomeCondition()) { OnOddError(new OddErrorEventArgs(resource.StatusProperty)); resou... | [
"c#",
"design-patterns",
"exception",
"events"
] | 10 | 3 | 4,492 | 9 | 0 | 2008-09-29T14:22:27.120000 | 2008-09-29T14:49:14.577000 |
148,901 | 148,918 | Is there a better way to do optional function parameters in JavaScript? | I've always handled optional parameters in JavaScript like this: function myFunc(requiredArg, optionalArg){ optionalArg = optionalArg || 'defaultValue';
// Do stuff } Is there a better way to do it? Are there any cases where using || like that is going to fail? | Your logic fails if optionalArg is passed, but evaluates as false - try this as an alternative if (typeof optionalArg === 'undefined') { optionalArg = 'default'; } Or an alternative idiom: optionalArg = (typeof optionalArg === 'undefined')? 'default': optionalArg; Use whichever idiom communicates the intent best to you... | Is there a better way to do optional function parameters in JavaScript? I've always handled optional parameters in JavaScript like this: function myFunc(requiredArg, optionalArg){ optionalArg = optionalArg || 'defaultValue';
// Do stuff } Is there a better way to do it? Are there any cases where using || like that is ... | TITLE:
Is there a better way to do optional function parameters in JavaScript?
QUESTION:
I've always handled optional parameters in JavaScript like this: function myFunc(requiredArg, optionalArg){ optionalArg = optionalArg || 'defaultValue';
// Do stuff } Is there a better way to do it? Are there any cases where usin... | [
"javascript",
"function",
"arguments"
] | 863 | 1,102 | 496,314 | 28 | 0 | 2008-09-29T14:27:08.543000 | 2008-09-29T14:30:34.013000 |
148,902 | 150,098 | How do I properly branch post-commit and revert the trunk in svn? | I have some commits that I've decided, after the fact, are going to be more branch work then trunk work. How do I create the branch and revert the trunk while still ensuring merging isn't painful later? Is it as simple as copying the current trunk to a branch and reverting the trunk? Or will this create headaches later... | I think Philips method would be something like the following, assuming the last "good" revision was at 100 and you are now at 130, to create the new branch: svn copy -r100 svn://repos/trunk svn://repos/branches/newbranch svn merge -r 100:130 svn://repos/trunk svn://repos/branches/newbranch Note the idea is to preserve ... | How do I properly branch post-commit and revert the trunk in svn? I have some commits that I've decided, after the fact, are going to be more branch work then trunk work. How do I create the branch and revert the trunk while still ensuring merging isn't painful later? Is it as simple as copying the current trunk to a b... | TITLE:
How do I properly branch post-commit and revert the trunk in svn?
QUESTION:
I have some commits that I've decided, after the fact, are going to be more branch work then trunk work. How do I create the branch and revert the trunk while still ensuring merging isn't painful later? Is it as simple as copying the cu... | [
"svn",
"branch"
] | 9 | 18 | 3,382 | 4 | 0 | 2008-09-29T14:27:36.437000 | 2008-09-29T18:49:26.870000 |
148,903 | 149,015 | Is the DLR going to be capable of compiling client-side code? | Is the DLR intended to be used to compile code exclusively prior to distribution or will it potentially be used to compile client-side Javascript in a JIT fashion? | The CLR already compiles and JITs code, and from what I gather the DLR will be built entirely on top of the CLR. So I guess the answer is 'neither'. | Is the DLR going to be capable of compiling client-side code? Is the DLR intended to be used to compile code exclusively prior to distribution or will it potentially be used to compile client-side Javascript in a JIT fashion? | TITLE:
Is the DLR going to be capable of compiling client-side code?
QUESTION:
Is the DLR intended to be used to compile code exclusively prior to distribution or will it potentially be used to compile client-side Javascript in a JIT fashion?
ANSWER:
The CLR already compiles and JITs code, and from what I gather the ... | [
".net",
"dynamic-language-runtime"
] | 2 | 1 | 245 | 1 | 0 | 2008-09-29T14:27:59.417000 | 2008-09-29T14:46:51.447000 |
148,908 | 151,921 | Which Dependency Injection Tool Should I Use? | I am thinking about using Microsoft Unity for my Dependency Injection tool in our User Interface. Our Middle Tier already uses Castle Windsor, but I am thinking I should stick with Microsoft. Does anyone have any thoughts about what the best Dependency Injection tool is? Autofac Castle MicroKernel/Windsor PicoContainer... | Sticking to one container is not really important, if your system has been designed with the IoC/DI in mind. With the proper approach you can easily change the IoC library down the road. And, of course, the container has to provide enough flexibility to support common widely used scenarios (lifecycle management, proper... | Which Dependency Injection Tool Should I Use? I am thinking about using Microsoft Unity for my Dependency Injection tool in our User Interface. Our Middle Tier already uses Castle Windsor, but I am thinking I should stick with Microsoft. Does anyone have any thoughts about what the best Dependency Injection tool is? Au... | TITLE:
Which Dependency Injection Tool Should I Use?
QUESTION:
I am thinking about using Microsoft Unity for my Dependency Injection tool in our User Interface. Our Middle Tier already uses Castle Windsor, but I am thinking I should stick with Microsoft. Does anyone have any thoughts about what the best Dependency Inj... | [
".net",
"dependency-injection",
"inversion-of-control",
"castle-windsor",
"ioc-container"
] | 39 | 12 | 15,437 | 9 | 0 | 2008-09-29T14:28:52.800000 | 2008-09-30T06:00:01.500000 |
148,945 | 148,962 | Send query results to Excel from ASP.NET website | We let users create ad-hoc queries in our website. We would like to have the user select their criteria, then click submit and have the results streamed automatically to Excel. I have the application populating a DataTable, then using the datatable to create a tab delimited string. The problem is getting that to excel.... | Change the page's file type to excel, and only stream the HTML necessary to build a table to the page. code from here //for demo purpose, lets create a small datatable & populate it with dummy data System.Data.DataTable workTable = new System.Data.DataTable();
//The tablename specified here will be set as the workshee... | Send query results to Excel from ASP.NET website We let users create ad-hoc queries in our website. We would like to have the user select their criteria, then click submit and have the results streamed automatically to Excel. I have the application populating a DataTable, then using the datatable to create a tab delimi... | TITLE:
Send query results to Excel from ASP.NET website
QUESTION:
We let users create ad-hoc queries in our website. We would like to have the user select their criteria, then click submit and have the results streamed automatically to Excel. I have the application populating a DataTable, then using the datatable to c... | [
"asp.net",
"excel"
] | 5 | 10 | 9,612 | 7 | 0 | 2008-09-29T14:35:23.360000 | 2008-09-29T14:37:21.983000 |
148,951 | 148,984 | Does mysqldump --password really do what it says? | I'm trying to use mysqldump to dump a schema, and it mostly works but I ran into one curiosity: the -p or --password option seems like it is doing something other than setting the password (as the man page and --help output say it should). Specifically, it looks like it's doing what is indicated here: http://snippets.d... | From man mysqldump: --password[=password], -p[password] The password to use when connecting to the server. If you use the short option form (-p), you cannot have a space between the option and the password. If you omit the password value following the --password or -p option on the command line, you are prompted for on... | Does mysqldump --password really do what it says? I'm trying to use mysqldump to dump a schema, and it mostly works but I ran into one curiosity: the -p or --password option seems like it is doing something other than setting the password (as the man page and --help output say it should). Specifically, it looks like it... | TITLE:
Does mysqldump --password really do what it says?
QUESTION:
I'm trying to use mysqldump to dump a schema, and it mostly works but I ran into one curiosity: the -p or --password option seems like it is doing something other than setting the password (as the man page and --help output say it should). Specifically... | [
"mysql",
"mysql-error-1044"
] | 37 | 81 | 62,168 | 10 | 0 | 2008-09-29T14:36:25.760000 | 2008-09-29T14:41:13.970000 |
148,963 | 148,979 | Keeping GUIs responsive during long-running tasks | Keeping the GUI responsive while the application does some CPU-heavy processing is one of the challenges of effective GUI programming. Here's a good discussion of how to do this in wxPython. To summarize, there are 3 ways: Use threads Use wxYield Chunk the work and do it in the IDLE event handler Which method have you ... | Threads. They're what I always go for because you can do it in every framework you need. And once you're used to multi-threading and parallel processing in one language/framework, you're good on all frameworks. | Keeping GUIs responsive during long-running tasks Keeping the GUI responsive while the application does some CPU-heavy processing is one of the challenges of effective GUI programming. Here's a good discussion of how to do this in wxPython. To summarize, there are 3 ways: Use threads Use wxYield Chunk the work and do i... | TITLE:
Keeping GUIs responsive during long-running tasks
QUESTION:
Keeping the GUI responsive while the application does some CPU-heavy processing is one of the challenges of effective GUI programming. Here's a good discussion of how to do this in wxPython. To summarize, there are 3 ways: Use threads Use wxYield Chunk... | [
"python",
"user-interface",
"wxpython"
] | 12 | 15 | 5,143 | 9 | 0 | 2008-09-29T14:37:32.140000 | 2008-09-29T14:40:08.217000 |
148,964 | 148,983 | Encrypting Salary value in ASP .NET 2.0 and SQL Server 2005 | I have an ASP.NET 2.0 website connected to a SQL Server 2005 database. The site is pretty simple and stores information about staff, including salary. What is the best way to encrypt the salary value so no-one (including myself) can ever see what it is, except for the authorised staff using the web-app? I don't want to... | SSL is probably your best bet to keep someone from sniffing, but be aware that it is still possible. As for the other bit, SQL Server 2005 supports table-level encryption out of the box. Here's an article on it. You could create a SALARY table that is linked to an employee and keep that table encrypted. | Encrypting Salary value in ASP .NET 2.0 and SQL Server 2005 I have an ASP.NET 2.0 website connected to a SQL Server 2005 database. The site is pretty simple and stores information about staff, including salary. What is the best way to encrypt the salary value so no-one (including myself) can ever see what it is, except... | TITLE:
Encrypting Salary value in ASP .NET 2.0 and SQL Server 2005
QUESTION:
I have an ASP.NET 2.0 website connected to a SQL Server 2005 database. The site is pretty simple and stores information about staff, including salary. What is the best way to encrypt the salary value so no-one (including myself) can ever see ... | [
"asp.net",
"sql-server",
"encryption"
] | 7 | 4 | 2,234 | 5 | 0 | 2008-09-29T14:37:49.097000 | 2008-09-29T14:41:08.450000 |
148,968 | 148,991 | Windows batch files: .bat vs .cmd? | As I understand it,.bat is the old 16-bit naming convention, and.cmd is for 32-bit Windows, i.e., starting with NT. But I continue to see.bat files everywhere, and they seem to work exactly the same using either suffix. Assuming that my code will never need to run on anything older than NT, does it really matter which ... | From this news group posting by Mark Zbikowski himself: The differences between.CMD and.BAT as far as CMD.EXE is concerned are: With extensions enabled, PATH/APPEND/PROMPT/SET/ASSOC in.CMD files will set ERRORLEVEL regardless of error..BAT sets ERRORLEVEL only on errors. In other words, if ERRORLEVEL is set to non-0 an... | Windows batch files: .bat vs .cmd? As I understand it,.bat is the old 16-bit naming convention, and.cmd is for 32-bit Windows, i.e., starting with NT. But I continue to see.bat files everywhere, and they seem to work exactly the same using either suffix. Assuming that my code will never need to run on anything older th... | TITLE:
Windows batch files: .bat vs .cmd?
QUESTION:
As I understand it,.bat is the old 16-bit naming convention, and.cmd is for 32-bit Windows, i.e., starting with NT. But I continue to see.bat files everywhere, and they seem to work exactly the same using either suffix. Assuming that my code will never need to run on... | [
"windows",
"batch-file",
"cmd"
] | 895 | 545 | 566,040 | 12 | 0 | 2008-09-29T14:39:07.190000 | 2008-09-29T14:41:55.700000 |
148,977 | 148,996 | Visual Studio keyboard-shortcut for automatically adding the 'using' statement | What is the keyboard-shortcut that expands the menu, from the little red line, and offers the option to have the necessary using statement appended to the top of the file? | Ctrl +. shows the menu. I find this easier to type than the alternative, Alt + Shift + F10. This can be re-bound to something more familiar by going to Tools > Options > Environment > Keyboard > Visual C# > View.QuickActions | Visual Studio keyboard-shortcut for automatically adding the 'using' statement What is the keyboard-shortcut that expands the menu, from the little red line, and offers the option to have the necessary using statement appended to the top of the file? | TITLE:
Visual Studio keyboard-shortcut for automatically adding the 'using' statement
QUESTION:
What is the keyboard-shortcut that expands the menu, from the little red line, and offers the option to have the necessary using statement appended to the top of the file?
ANSWER:
Ctrl +. shows the menu. I find this easier... | [
"visual-studio",
"keyboard-shortcuts"
] | 260 | 412 | 124,374 | 6 | 0 | 2008-09-29T14:40:04.177000 | 2008-09-29T14:42:42.563000 |
148,988 | 149,010 | Recursion in an XML schema? | I need to create an XML schema that validates a tree structure of an XML document. I don't know exactly the occurrences or depth level of the tree. XML example: Which is the best way to validate it? Recursion? | if you need a recursive type declaration, here is an example that might help: As you can see, this defines a recursive schema with only one node named "node" which can be as deep as desired. | Recursion in an XML schema? I need to create an XML schema that validates a tree structure of an XML document. I don't know exactly the occurrences or depth level of the tree. XML example: Which is the best way to validate it? Recursion? | TITLE:
Recursion in an XML schema?
QUESTION:
I need to create an XML schema that validates a tree structure of an XML document. I don't know exactly the occurrences or depth level of the tree. XML example: Which is the best way to validate it? Recursion?
ANSWER:
if you need a recursive type declaration, here is an ex... | [
"xsd"
] | 48 | 72 | 44,175 | 3 | 0 | 2008-09-29T14:41:37.900000 | 2008-09-29T14:45:42.323000 |
148,999 | 149,059 | Archiving VMware images on ESXi | Is there a way to compress a VMWare image on a ESXi server for archival purposes? | What is wrong with simply using your faviourite archiver/compressor utility? | Archiving VMware images on ESXi Is there a way to compress a VMWare image on a ESXi server for archival purposes? | TITLE:
Archiving VMware images on ESXi
QUESTION:
Is there a way to compress a VMWare image on a ESXi server for archival purposes?
ANSWER:
What is wrong with simply using your faviourite archiver/compressor utility? | [
"vmware",
"archive",
"esxi"
] | 1 | 2 | 935 | 3 | 0 | 2008-09-29T14:43:20.627000 | 2008-09-29T15:02:19.380000 |
149,021 | 149,175 | NSCoder vs NSDictionary, when do you use what? | I'm trying to figure out how to decide when to use NSDictionary or NSCoder/NSCoding? It seems that for general property lists and such that NSDictionary is the easy way to go that generates XML files that are easily editable outside of the application. When dealing with custom classes that holds data or possibly other ... | Apple's documentation on object graphs has this to say: Mac OS X serializations store a simple hierarchy of value objects, such as dictionaries, arrays, strings, and binary data. The serialization only preserves the values of the objects and their position in the hierarchy. Multiple references to the same value object ... | NSCoder vs NSDictionary, when do you use what? I'm trying to figure out how to decide when to use NSDictionary or NSCoder/NSCoding? It seems that for general property lists and such that NSDictionary is the easy way to go that generates XML files that are easily editable outside of the application. When dealing with cu... | TITLE:
NSCoder vs NSDictionary, when do you use what?
QUESTION:
I'm trying to figure out how to decide when to use NSDictionary or NSCoder/NSCoding? It seems that for general property lists and such that NSDictionary is the easy way to go that generates XML files that are easily editable outside of the application. Wh... | [
"cocoa"
] | 9 | 9 | 8,513 | 4 | 0 | 2008-09-29T14:48:06.700000 | 2008-09-29T15:27:49.897000 |
149,024 | 149,035 | What does the POP3 CAPA UIDL command do? | What does the POP3 CAPA UIDL command do? | The UIDL capability indicates that the optional UIDL command is supported. POP3 servers may assign a unique number to each incoming mail message. This allows mail to be left on the server after it has been downloaded to the user. Both the mail client and the POP server must support this feature. | What does the POP3 CAPA UIDL command do? What does the POP3 CAPA UIDL command do? | TITLE:
What does the POP3 CAPA UIDL command do?
QUESTION:
What does the POP3 CAPA UIDL command do?
ANSWER:
The UIDL capability indicates that the optional UIDL command is supported. POP3 servers may assign a unique number to each incoming mail message. This allows mail to be left on the server after it has been downl... | [
"pop3"
] | 11 | 8 | 32,908 | 6 | 0 | 2008-09-29T14:49:32.283000 | 2008-09-29T14:53:46.437000 |
149,037 | 149,167 | JMS message receiver filtering by JMSCorrelationID | How can I instantiate a JMS queue listener in java (JRE /JDK / J2EE 1.4) that only receives messages that match a given JMSCorrelationID? The messages that I'm looking to pick up have been published to a queue and not a topic, although that can change if needed. Here's the code that I'm currently using to put the messa... | The queue connection setup is the same, but once you have the QueueSession, you set the selector when creating a receiver. QueueReceiver receiver = session.createReceiver(myQueue, "JMSCorrelationID='theid'"); then receiver.receive() or receiver.setListener(myListener); | JMS message receiver filtering by JMSCorrelationID How can I instantiate a JMS queue listener in java (JRE /JDK / J2EE 1.4) that only receives messages that match a given JMSCorrelationID? The messages that I'm looking to pick up have been published to a queue and not a topic, although that can change if needed. Here's... | TITLE:
JMS message receiver filtering by JMSCorrelationID
QUESTION:
How can I instantiate a JMS queue listener in java (JRE /JDK / J2EE 1.4) that only receives messages that match a given JMSCorrelationID? The messages that I'm looking to pick up have been published to a queue and not a topic, although that can change... | [
"jakarta-ee",
"queue",
"jms"
] | 10 | 11 | 39,240 | 4 | 0 | 2008-09-29T14:54:04.143000 | 2008-09-29T15:25:14.443000 |
149,040 | 149,295 | Is there a way to define which fields in the model are editable in the admin app? | Assume the following: models.py class Entry(models.Model): title = models.CharField(max_length=50) slug = models.CharField(max_length=50, unique=True) body = models.CharField(max_length=200) admin.py class EntryAdmin(admin.ModelAdmin): prepopulated_fields = {'slug':('title',)} I want the slug to be pre-populated by the... | For this particular case you can override your save method to slugify (it's built-in method, look at django source) the title and store it in slug field. Also from there you can easily check if this slug is indeed unique and change it somehow if it's not. Consider this example: def save(self): from django.template.defa... | Is there a way to define which fields in the model are editable in the admin app? Assume the following: models.py class Entry(models.Model): title = models.CharField(max_length=50) slug = models.CharField(max_length=50, unique=True) body = models.CharField(max_length=200) admin.py class EntryAdmin(admin.ModelAdmin): pr... | TITLE:
Is there a way to define which fields in the model are editable in the admin app?
QUESTION:
Assume the following: models.py class Entry(models.Model): title = models.CharField(max_length=50) slug = models.CharField(max_length=50, unique=True) body = models.CharField(max_length=200) admin.py class EntryAdmin(adm... | [
"python",
"django"
] | 5 | 4 | 353 | 5 | 0 | 2008-09-29T14:55:55.823000 | 2008-09-29T15:47:49.380000 |
149,042 | 149,323 | Would you start learning Smalltalk? | My questions is simple! Would you start learning Smalltalk if you had the time? Why? Why not? Do you already know Smalltalk? Why would you recommend Smalltalk? Why not? Personally I'm a Ruby on Rails programmer and I really like it. However, I'm thinking about Smalltalk because I read various blogs and some people are ... | If you like Ruby you'll probably like Smalltalk. IIRC Seaside has been ported to the Gemstone VM, which is part of their Gemstone/S OODBMS. This has much better thread support than Ruby, so it is a better back-end for a high-volume system. This might be a good reason to take a close look at it. Reasons to learn Smallta... | Would you start learning Smalltalk? My questions is simple! Would you start learning Smalltalk if you had the time? Why? Why not? Do you already know Smalltalk? Why would you recommend Smalltalk? Why not? Personally I'm a Ruby on Rails programmer and I really like it. However, I'm thinking about Smalltalk because I rea... | TITLE:
Would you start learning Smalltalk?
QUESTION:
My questions is simple! Would you start learning Smalltalk if you had the time? Why? Why not? Do you already know Smalltalk? Why would you recommend Smalltalk? Why not? Personally I'm a Ruby on Rails programmer and I really like it. However, I'm thinking about Small... | [
"smalltalk",
"seaside"
] | 85 | 64 | 13,439 | 20 | 0 | 2008-09-29T14:57:25.290000 | 2008-09-29T15:51:53.630000 |
149,054 | 179,445 | In SQL Server Management Studio can I search for assets across multiple databases? | My everyday IDE is Eclipse which has a wonderful Open Resource feature (CTRL+SHIFT+R or Navigate > Open Resource) which allows the user to search for files/resources across multiple projects. I can't find a similar feature in SQL Server Management Studio, is there one? | You can search for objects in a sql database using the Information Schema Views http://msdn.microsoft.com/en-us/library/ms186778.aspx There's one for tables, columns, functions, sprocs, etc. select * from INFORMATION_SCHEMA.routines where ROUTINE_DEFINITION like '%xp%_' | In SQL Server Management Studio can I search for assets across multiple databases? My everyday IDE is Eclipse which has a wonderful Open Resource feature (CTRL+SHIFT+R or Navigate > Open Resource) which allows the user to search for files/resources across multiple projects. I can't find a similar feature in SQL Server ... | TITLE:
In SQL Server Management Studio can I search for assets across multiple databases?
QUESTION:
My everyday IDE is Eclipse which has a wonderful Open Resource feature (CTRL+SHIFT+R or Navigate > Open Resource) which allows the user to search for files/resources across multiple projects. I can't find a similar feat... | [
"sql-server",
"ssms"
] | 5 | 3 | 8,249 | 6 | 0 | 2008-09-29T15:00:28.870000 | 2008-10-07T17:06:19.923000 |
149,055 | 149,150 | How to format numbers as currency strings | I would like to format a price in JavaScript. I'd like a function which takes a float as an argument and returns a string formatted like this: "$ 2,500.00" How can I do this? | Ok, based on what you said, I'm using this: var DecimalSeparator = Number("1.2").toLocaleString().substr(1,1);
var AmountWithCommas = Amount.toLocaleString(); var arParts = String(AmountWithCommas).split(DecimalSeparator); var intPart = arParts[0]; var decPart = (arParts.length > 1? arParts[1]: ''); decPart = (decPart... | How to format numbers as currency strings I would like to format a price in JavaScript. I'd like a function which takes a float as an argument and returns a string formatted like this: "$ 2,500.00" How can I do this? | TITLE:
How to format numbers as currency strings
QUESTION:
I would like to format a price in JavaScript. I'd like a function which takes a float as an argument and returns a string formatted like this: "$ 2,500.00" How can I do this?
ANSWER:
Ok, based on what you said, I'm using this: var DecimalSeparator = Number("1... | [
"javascript",
"formatting",
"currency"
] | 2,491 | 30 | 2,853,548 | 66 | 0 | 2008-09-29T15:00:28.963000 | 2008-09-29T15:22:33.140000 |
149,058 | 149,128 | How to display a non-ascii filename in the file download box in browsers? | There doesn't seem to be an accepted way of sending down a header parameter in non ascii format. The header for file download usually looks like Content-disposition: attachment; filename="theasciifilename.doc" Except if you smash a utf8 encoded string in the filename parameter, Firefox will handle it fine, whereas IE w... | Answer to question #1: You are confusing Unicode and UTF-8. The hex value of 'ả' is 0xA31E however that is not a UTF-8 character. In UTF-8 that character requries three bytes, 0xE1 0xBA 0xA3. URL encoding is poorly defined for non-ascii encodings but %e1%ba%a3 is the valid UTF-8 encoding to use for that character. | How to display a non-ascii filename in the file download box in browsers? There doesn't seem to be an accepted way of sending down a header parameter in non ascii format. The header for file download usually looks like Content-disposition: attachment; filename="theasciifilename.doc" Except if you smash a utf8 encoded s... | TITLE:
How to display a non-ascii filename in the file download box in browsers?
QUESTION:
There doesn't seem to be an accepted way of sending down a header parameter in non ascii format. The header for file download usually looks like Content-disposition: attachment; filename="theasciifilename.doc" Except if you smas... | [
"encoding",
"utf-8"
] | 8 | 3 | 8,113 | 6 | 0 | 2008-09-29T15:02:09.927000 | 2008-09-29T15:18:06.020000 |
149,073 | 149,188 | StackTrace in Flash / ActionScript 3.0 | I want to see the stack trace in any function of my code, so i made somthing like this to call it and print the stack trace: public function PrintStackTrace() { try { throw new Error('StackTrace'); } catch (e:Error) { trace(e.getStackTrace()); } } I like to know if there are other way to do this. In some place, the Err... | As far as I know, the only way to make the stack trace available to your own code is via the getStackTrace() method in the Error class, just like you're already doing. In response to the example in your question, though, I would mention that you don't actually have to throw the Error -- you can just create it and call ... | StackTrace in Flash / ActionScript 3.0 I want to see the stack trace in any function of my code, so i made somthing like this to call it and print the stack trace: public function PrintStackTrace() { try { throw new Error('StackTrace'); } catch (e:Error) { trace(e.getStackTrace()); } } I like to know if there are other... | TITLE:
StackTrace in Flash / ActionScript 3.0
QUESTION:
I want to see the stack trace in any function of my code, so i made somthing like this to call it and print the stack trace: public function PrintStackTrace() { try { throw new Error('StackTrace'); } catch (e:Error) { trace(e.getStackTrace()); } } I like to know ... | [
"flash",
"actionscript-3",
"stack-trace"
] | 37 | 51 | 22,696 | 8 | 0 | 2008-09-29T15:05:12.867000 | 2008-09-29T15:29:53.993000 |
149,078 | 149,168 | Can Multiple Indexes Work Together? | Suppose I have a database table with two fields, "foo" and "bar". Neither of them are unique, but each of them are indexed. However, rather than being indexed together, they each have a separate index. Now suppose I perform a query such as SELECT * FROM sometable WHERE foo='hello' AND bar='world'; My table a huge numbe... | Oracle will almost certainly use the most selective index to drive the query, and you can check that with the explain plan. Furthermore, Oracle can combine the use of both indexes in a couple of ways -- it can convert btree indexes to bitmaps and perform a bitmap ANd operation on them, or it can perform a hash join on ... | Can Multiple Indexes Work Together? Suppose I have a database table with two fields, "foo" and "bar". Neither of them are unique, but each of them are indexed. However, rather than being indexed together, they each have a separate index. Now suppose I perform a query such as SELECT * FROM sometable WHERE foo='hello' AN... | TITLE:
Can Multiple Indexes Work Together?
QUESTION:
Suppose I have a database table with two fields, "foo" and "bar". Neither of them are unique, but each of them are indexed. However, rather than being indexed together, they each have a separate index. Now suppose I perform a query such as SELECT * FROM sometable WH... | [
"database",
"oracle",
"optimization",
"indexing"
] | 15 | 12 | 14,702 | 9 | 0 | 2008-09-29T15:05:48.937000 | 2008-09-29T15:26:03.207000 |
149,092 | 552,596 | Recovery from optical media ignoring read errors | I have backups of files archived in optical media (CDs and DVDs). These all have par2 recovery files, stored on separate media. Even in cases where there are no par2 files, minor errors when reading on one optical drive can be read fine on another drive. The thing is, when reading faulty media, the read time is very, v... | man readom, a program that comes with cdrecord: -noerror Do not abort if the high level error checking in readom found an uncorrectable error in the data stream.
-nocorr Switch the drive into a mode where it ignores read errors in data sectors that are a result of uncorrectable ECC/EDC errors before reading. If readom... | Recovery from optical media ignoring read errors I have backups of files archived in optical media (CDs and DVDs). These all have par2 recovery files, stored on separate media. Even in cases where there are no par2 files, minor errors when reading on one optical drive can be read fine on another drive. The thing is, wh... | TITLE:
Recovery from optical media ignoring read errors
QUESTION:
I have backups of files archived in optical media (CDs and DVDs). These all have par2 recovery files, stored on separate media. Even in cases where there are no par2 files, minor errors when reading on one optical drive can be read fine on another drive... | [
"windows",
"linux",
"recovery",
"system-calls",
"optical-drive"
] | 7 | 7 | 4,646 | 7 | 0 | 2008-09-29T15:10:37.223000 | 2009-02-16T08:24:07.397000 |
149,102 | 149,121 | Capturing the Click event in an Excel spreadsheet | How can I capture the event in Excel when a user clicks on a cell. I want to be able to use this event to trigger some code to count how many times the user clicks on several different cells in a column. | Check out the Worksheet_SelectionChange event. In that event you could use Intersect() with named ranges to figure out if a specific range were clicked. Here's some code that might help you get started. Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range) If Not Intersect(Target, Range("SomeNamedRange")) ... | Capturing the Click event in an Excel spreadsheet How can I capture the event in Excel when a user clicks on a cell. I want to be able to use this event to trigger some code to count how many times the user clicks on several different cells in a column. | TITLE:
Capturing the Click event in an Excel spreadsheet
QUESTION:
How can I capture the event in Excel when a user clicks on a cell. I want to be able to use this event to trigger some code to count how many times the user clicks on several different cells in a column.
ANSWER:
Check out the Worksheet_SelectionChange... | [
"excel",
"user-interface",
"spreadsheet",
"event-driven",
"vba"
] | 1 | 2 | 4,758 | 3 | 0 | 2008-09-29T15:13:08.573000 | 2008-09-29T15:17:08.127000 |
149,118 | 149,202 | Crystal Reports vs ReportViewer Pros/Cons? | We have been designing our reports around Crystal Reports in VS2008 for our web application and I just discovered the Microsoft provided ReportViewer control. I've searched around a bit but cannot find a good breakdown of the pros and cons of each method of producing reports. I'm looking for pros and cons regarding: Ea... | Well, I can answer for one side. I have used ReportViewer aka Client Side Reporting. I can tell you its easy to use, easy to deploy and easy to develop. If you can create SQL Reporting Services reports, you can create these. They can take any kind of datasource so you have full control. Here is an excellent book on Cli... | Crystal Reports vs ReportViewer Pros/Cons? We have been designing our reports around Crystal Reports in VS2008 for our web application and I just discovered the Microsoft provided ReportViewer control. I've searched around a bit but cannot find a good breakdown of the pros and cons of each method of producing reports. ... | TITLE:
Crystal Reports vs ReportViewer Pros/Cons?
QUESTION:
We have been designing our reports around Crystal Reports in VS2008 for our web application and I just discovered the Microsoft provided ReportViewer control. I've searched around a bit but cannot find a good breakdown of the pros and cons of each method of p... | [
"crystal-reports",
"reporting"
] | 16 | 14 | 23,992 | 3 | 0 | 2008-09-29T15:16:35.557000 | 2008-09-29T15:32:41.180000 |
149,124 | 149,137 | SQL Server 2000: "subquery returned more than one value" on an update statement | I'm trying to do a simple update. I've done this kind of thing thousands of times. update articles set department = 60 where type = 'Top Story' Today I get a strange error. Describe Error: Failed to retrieve execution plan: Subquery returned more than 1 value. This is not permitted when the subquery follows =,!=, <, <=... | Most likely there is a trigger on the table, and the error is occurring in the trigger, not in your actual SQL statement. I would further bet that the trigger assumes the insert or delete special tables will only ever have a single row (which is in fact not the case in mass updates, like the one you're executing), caus... | SQL Server 2000: "subquery returned more than one value" on an update statement I'm trying to do a simple update. I've done this kind of thing thousands of times. update articles set department = 60 where type = 'Top Story' Today I get a strange error. Describe Error: Failed to retrieve execution plan: Subquery returne... | TITLE:
SQL Server 2000: "subquery returned more than one value" on an update statement
QUESTION:
I'm trying to do a simple update. I've done this kind of thing thousands of times. update articles set department = 60 where type = 'Top Story' Today I get a strange error. Describe Error: Failed to retrieve execution plan... | [
"sql-server"
] | 2 | 18 | 7,529 | 1 | 0 | 2008-09-29T15:17:45.617000 | 2008-09-29T15:19:56.187000 |
149,130 | 149,146 | Request.UrlReferrer null? | In an aspx C#.NET page (I am running framework v3.5), I need to know where the user came from since they cannot view pages without logging in. If I have page A (the page the user wants to view) redirect to page B (the login page), the Request.UrlReferrer object is null. Background: If a user isn't logged in, I redirect... | If you use the standard Membership provider, and set the Authorization for the directory/page, the code will automatically set a query parameter of ReturnUrl and redirect after a successfull login. If you don't want to use the Membership provider pattern, I would suggest manually doing the query string parameter thing ... | Request.UrlReferrer null? In an aspx C#.NET page (I am running framework v3.5), I need to know where the user came from since they cannot view pages without logging in. If I have page A (the page the user wants to view) redirect to page B (the login page), the Request.UrlReferrer object is null. Background: If a user i... | TITLE:
Request.UrlReferrer null?
QUESTION:
In an aspx C#.NET page (I am running framework v3.5), I need to know where the user came from since they cannot view pages without logging in. If I have page A (the page the user wants to view) redirect to page B (the login page), the Request.UrlReferrer object is null. Backg... | [
"c#",
".net",
"visual-studio",
"visual-studio-2008"
] | 24 | 11 | 47,299 | 4 | 0 | 2008-09-29T15:18:11.933000 | 2008-09-29T15:22:07.040000 |
149,131 | 149,281 | Is there a way to update VS' CSS validation to 3.0? | I'm getting warnings about CSS3.0 properties like text-overflow. Is there a way to validate against 3.0? HTML5 and CSS3 support is coming to VS2010 in SP1. Link And now its here. http://visualstudiogallery.msdn.microsoft.com/7211bcac-091b-4a32-be2d-e797be0db210/view/Reviews/0?showReviewForm=True | Apparently, you can define your own Visual Studio Intellisense schema for CSS. I’m not sure if VS will then validate against that, or only use it for code completion. Might be worth making a minimal one and seeing if it gets used for validation. Custom CSS Intellisense Schema in Visual Studio 2005 and 2008 I don’t know... | Is there a way to update VS' CSS validation to 3.0? I'm getting warnings about CSS3.0 properties like text-overflow. Is there a way to validate against 3.0? HTML5 and CSS3 support is coming to VS2010 in SP1. Link And now its here. http://visualstudiogallery.msdn.microsoft.com/7211bcac-091b-4a32-be2d-e797be0db210/view/R... | TITLE:
Is there a way to update VS' CSS validation to 3.0?
QUESTION:
I'm getting warnings about CSS3.0 properties like text-overflow. Is there a way to validate against 3.0? HTML5 and CSS3 support is coming to VS2010 in SP1. Link And now its here. http://visualstudiogallery.msdn.microsoft.com/7211bcac-091b-4a32-be2d-e... | [
"visual-studio-2008",
"validation",
"css"
] | 18 | 10 | 12,738 | 4 | 0 | 2008-09-29T15:18:55.923000 | 2008-09-29T15:45:47.310000 |
149,132 | 149,152 | How can one iterate over stored procedure results from within another stored procedure....without cursors? | I'm not sure if this is something I should do in T-SQL or not, and I'm pretty sure using the word 'iterate' was wrong in this context, since you should never iterate anything in sql. It should be a set based operation, correct? Anyway, here's the scenario: I have a stored proc that returns many uniqueidentifiers (singl... | This may not be the most efficient, but I would create a temp table to hold the results of the stored proc and then use that in a join against the target table. For example: CREATE TABLE #t (uniqueid int) INSERT INTO #t EXEC p_YourStoredProc
UPDATE TargetTable SET a.FlagColumn = 1 FROM TargetTable a JOIN #t b ON a.uni... | How can one iterate over stored procedure results from within another stored procedure....without cursors? I'm not sure if this is something I should do in T-SQL or not, and I'm pretty sure using the word 'iterate' was wrong in this context, since you should never iterate anything in sql. It should be a set based opera... | TITLE:
How can one iterate over stored procedure results from within another stored procedure....without cursors?
QUESTION:
I'm not sure if this is something I should do in T-SQL or not, and I'm pretty sure using the word 'iterate' was wrong in this context, since you should never iterate anything in sql. It should be... | [
"sql",
"sql-server",
"sql-server-2005",
"t-sql"
] | 8 | 15 | 9,871 | 7 | 0 | 2008-09-29T15:19:20.697000 | 2008-09-29T15:22:59.517000 |
149,163 | 149,237 | Patterns for Multithreaded Network Server in C# | Are there any templates/patterns/guides I can follow for designing a multithreaded server? I can't find anything terribly useful online through my google searches. My program will start a thread to listen for connections using TcpListener. Every client connection will be handled by it's own IClientHandler thread. The s... | Oddly enough you may find something on a Computer Science Assignment, CSC 512 Programming Assignment 4: Multi-Threaded Server With Patterns. Altough it's C++ voodoo but the theory is quite understandable for someone who can do C#. Acceptor/ Connector Monitor Object Thread Safe Interface Wrapper Facade Scoped Locking St... | Patterns for Multithreaded Network Server in C# Are there any templates/patterns/guides I can follow for designing a multithreaded server? I can't find anything terribly useful online through my google searches. My program will start a thread to listen for connections using TcpListener. Every client connection will be ... | TITLE:
Patterns for Multithreaded Network Server in C#
QUESTION:
Are there any templates/patterns/guides I can follow for designing a multithreaded server? I can't find anything terribly useful online through my google searches. My program will start a thread to listen for connections using TcpListener. Every client c... | [
"c#",
"multithreading",
"asynchronous",
"network-programming"
] | 11 | 12 | 10,128 | 2 | 0 | 2008-09-29T15:24:48.343000 | 2008-09-29T15:38:38.013000 |
149,189 | 149,217 | How can I limit the maximum number of running processes within Microsoft Windows? | I'm looking for a way to limit the maximum number of running processes in Windows Server 2003. Is there a registry key somewhere that controls it? If so, which one is it? | if you are talking about processes as in the items listed in task manager, then there is no way to do it natively, and you can do it with a program, but there should be no real valid reason to do so. If you are talking about making your application only ever launch one EXE no matter how many times it is called, then yo... | How can I limit the maximum number of running processes within Microsoft Windows? I'm looking for a way to limit the maximum number of running processes in Windows Server 2003. Is there a registry key somewhere that controls it? If so, which one is it? | TITLE:
How can I limit the maximum number of running processes within Microsoft Windows?
QUESTION:
I'm looking for a way to limit the maximum number of running processes in Windows Server 2003. Is there a registry key somewhere that controls it? If so, which one is it?
ANSWER:
if you are talking about processes as in... | [
"windows",
"process",
"registry"
] | 2 | 1 | 4,541 | 2 | 0 | 2008-09-29T15:30:37.487000 | 2008-09-29T15:35:24.013000 |
149,191 | 149,376 | PowerShell functions return behavior | I am seeing some rather weird behavior with PowerShell, it looks like custom functions might need a "parenthesis wrapper" to evaluate as you might expect them. Given a simple PowerShell function: function Return-True { return $true } and then some sample code to invoke it: PS C:\> Return-True True PS C:\> Return-True -... | When PowerShell sees the token Return-True it identifies it as a command and until evaluation or end of the statement, everything else is an argument which is passed to the function Return-True. You can see this in action if you do: PS > function Return-True { "The arguments are: $args"; return $true } PS > Return-True... | PowerShell functions return behavior I am seeing some rather weird behavior with PowerShell, it looks like custom functions might need a "parenthesis wrapper" to evaluate as you might expect them. Given a simple PowerShell function: function Return-True { return $true } and then some sample code to invoke it: PS C:\> R... | TITLE:
PowerShell functions return behavior
QUESTION:
I am seeing some rather weird behavior with PowerShell, it looks like custom functions might need a "parenthesis wrapper" to evaluate as you might expect them. Given a simple PowerShell function: function Return-True { return $true } and then some sample code to in... | [
"powershell"
] | 17 | 35 | 29,390 | 3 | 0 | 2008-09-29T15:30:53.073000 | 2008-09-29T16:03:28.703000 |
149,195 | 149,215 | sane backup strategy for webapps | I'm doing a webapp and need a backup plan. Here's what I've got so far: nightly encrypted backup of the SQL database to Amazon S3 and my external drive (incremental if possible, not overly familiar with PostgreSQL yet, but that's another thread) nightly backup of my Mercurial repo (which includes Apache configs, deploy... | Weekly full backup of your database as well as nightly incremental ones as well perhaps? It means that if one of your old incremental backups gets corrupted then you have lost less than a week of data. Also, ensure you have a backup test plan to ensure your backups work. There are a lot of horror stories going around a... | sane backup strategy for webapps I'm doing a webapp and need a backup plan. Here's what I've got so far: nightly encrypted backup of the SQL database to Amazon S3 and my external drive (incremental if possible, not overly familiar with PostgreSQL yet, but that's another thread) nightly backup of my Mercurial repo (whic... | TITLE:
sane backup strategy for webapps
QUESTION:
I'm doing a webapp and need a backup plan. Here's what I've got so far: nightly encrypted backup of the SQL database to Amazon S3 and my external drive (incremental if possible, not overly familiar with PostgreSQL yet, but that's another thread) nightly backup of my Me... | [
"backup",
"web-applications"
] | 2 | 3 | 1,107 | 3 | 0 | 2008-09-29T15:31:50.900000 | 2008-09-29T15:34:45.637000 |
149,198 | 149,270 | Can I commit only parts of my code using SVN or Mercurial? | I use Tortoise SVN usuallly, but I have been looking into Mercurial since it is a distributed revision control system. What I am looking for, in both systems, is a tool that let me pick only parts of a file and commit them. If I want to do this now, I have to copy to a temp version of the file and keep only the changes... | Mercurial can do this with the record extension. It'll prompt you for each file and each diff hunk. For example: % hg record diff --git a/prelim.tex b/prelim.tex 2 hunks, 4 lines changed examine changes to 'prelim.tex'? [Ynsfdaq?] @@ -12,7 +12,7 @@ \setmonofont[Scale=0.88]{Consolas} % missing from xunicode.sty \Declare... | Can I commit only parts of my code using SVN or Mercurial? I use Tortoise SVN usuallly, but I have been looking into Mercurial since it is a distributed revision control system. What I am looking for, in both systems, is a tool that let me pick only parts of a file and commit them. If I want to do this now, I have to c... | TITLE:
Can I commit only parts of my code using SVN or Mercurial?
QUESTION:
I use Tortoise SVN usuallly, but I have been looking into Mercurial since it is a distributed revision control system. What I am looking for, in both systems, is a tool that let me pick only parts of a file and commit them. If I want to do thi... | [
"git",
"svn",
"version-control",
"mercurial",
"tortoisesvn"
] | 37 | 40 | 10,291 | 6 | 0 | 2008-09-29T15:32:10.557000 | 2008-09-29T15:43:48.423000 |
149,210 | 161,671 | AVI Animations for GUI | I need to get some AVI animations for use with the Borland VCL TAnimate component, to display during operations such as 'online update', 'burning cd' and a few others. I have only come across the glyFX Animation Pack so far. Can anybody recomend other places to get nice avi animations? | You could consider using GIF animations instead of AVIs. There are a lots of them on the Web. There are also some free Delphi components working with animated GIFs, look TGIFImage for Delphi for example. | AVI Animations for GUI I need to get some AVI animations for use with the Borland VCL TAnimate component, to display during operations such as 'online update', 'burning cd' and a few others. I have only come across the glyFX Animation Pack so far. Can anybody recomend other places to get nice avi animations? | TITLE:
AVI Animations for GUI
QUESTION:
I need to get some AVI animations for use with the Borland VCL TAnimate component, to display during operations such as 'online update', 'burning cd' and a few others. I have only come across the glyFX Animation Pack so far. Can anybody recomend other places to get nice avi anim... | [
"delphi",
"user-interface",
"animation",
"vcl",
"avi"
] | 2 | 2 | 1,443 | 1 | 0 | 2008-09-29T15:34:24.997000 | 2008-10-02T10:24:55.387000 |
149,211 | 149,234 | Determining available bandwidth | What is the best way to determine available bandwidth in.NET? We have users that access business applications from various remote access points, wired and wireless and at times the bandwidth can be very low based on where the user is. When the applications appear to be running slow, the issue could be due to low bandwi... | Not beyond the obvious of downloading a file of a known size and timing how long it takes. the disadvantage of that is that you'd need to waste a lot of bandwidth to do it. Also, if you wanted to alert when throughput drops below a threshold, you'll have to run the test more-or-less continuously. IMHO, I'd live with po... | Determining available bandwidth What is the best way to determine available bandwidth in.NET? We have users that access business applications from various remote access points, wired and wireless and at times the bandwidth can be very low based on where the user is. When the applications appear to be running slow, the ... | TITLE:
Determining available bandwidth
QUESTION:
What is the best way to determine available bandwidth in.NET? We have users that access business applications from various remote access points, wired and wireless and at times the bandwidth can be very low based on where the user is. When the applications appear to be ... | [
"c#",
".net"
] | 1 | 4 | 1,875 | 4 | 0 | 2008-09-29T15:34:26.760000 | 2008-09-29T15:38:11.150000 |
149,213 | 149,248 | What are hypothetical indexes? | Does anybody know what hypothetical indexes are used for in sql server 2000? I have a table with 15+ such indexes, but have no idea what they were created for. Can they slow down deletes/inserts? | hypothetical indexes are usually created when you run index tuning wizard, and are suggestions, under normal circumstances they will be removed if the wizard runs OK. If some are left around they can cause some issues, see this link for ways to remove them. | What are hypothetical indexes? Does anybody know what hypothetical indexes are used for in sql server 2000? I have a table with 15+ such indexes, but have no idea what they were created for. Can they slow down deletes/inserts? | TITLE:
What are hypothetical indexes?
QUESTION:
Does anybody know what hypothetical indexes are used for in sql server 2000? I have a table with 15+ such indexes, but have no idea what they were created for. Can they slow down deletes/inserts?
ANSWER:
hypothetical indexes are usually created when you run index tuning... | [
"sql-server",
"indexing"
] | 6 | 3 | 5,718 | 5 | 0 | 2008-09-29T15:34:36.027000 | 2008-09-29T15:40:22.427000 |
149,227 | 149,279 | How to move asp.net/ajax control BEFORE page loading? | I have an Panel control that I need to maintain position across postbacks. I am able to do this by maintaining a cookie which is read each time the page is loaded to get the position of the Panel before the page is loaded. The problem is, the page is loaded, then repositioned which causes this brief flash where the con... | Could you register the function that positions the panel in the pageLoad event of the ASP.NET client-side library? This link may be helpful: ASP.NET AJAX Client Life-Cycle Events | How to move asp.net/ajax control BEFORE page loading? I have an Panel control that I need to maintain position across postbacks. I am able to do this by maintaining a cookie which is read each time the page is loaded to get the position of the Panel before the page is loaded. The problem is, the page is loaded, then re... | TITLE:
How to move asp.net/ajax control BEFORE page loading?
QUESTION:
I have an Panel control that I need to maintain position across postbacks. I am able to do this by maintaining a cookie which is read each time the page is loaded to get the position of the Panel before the page is loaded. The problem is, the page ... | [
"asp.net",
"asp.net-ajax"
] | 1 | 1 | 1,189 | 3 | 0 | 2008-09-29T15:37:23.680000 | 2008-09-29T15:45:31.243000 |
149,233 | 149,385 | Merging big files in C# | I have 7-8 xml files. Each one is approximately 50 MB in size. What is the best way to merge files programmatically in C# without getting System.OutOfMemory Exception? So far I have tried reading each file in a StringBuilder and than putting it in an array of string builder but I still get system.outofmemoery exception... | Personally, when I have to deal with XML files (forced by threat of physical violence usually), I do this: Load each file into a.NET DataSet via DataSet.ReadXML() Combine the information (via DataSet queries). Write out the combined DataSet to XML via DataSet.WriteXML() Then I aggressively delete the orginal XML file a... | Merging big files in C# I have 7-8 xml files. Each one is approximately 50 MB in size. What is the best way to merge files programmatically in C# without getting System.OutOfMemory Exception? So far I have tried reading each file in a StringBuilder and than putting it in an array of string builder but I still get syste... | TITLE:
Merging big files in C#
QUESTION:
I have 7-8 xml files. Each one is approximately 50 MB in size. What is the best way to merge files programmatically in C# without getting System.OutOfMemory Exception? So far I have tried reading each file in a StringBuilder and than putting it in an array of string builder but... | [
"c#"
] | 1 | 1 | 2,065 | 7 | 0 | 2008-09-29T15:38:08.030000 | 2008-09-29T16:05:49.103000 |
149,236 | 149,252 | Edit php.ini with .htaccess | I'm slowly getting back into PHP, and now I run into a problem, I want to install some web software on our host and I need to have either the latest Zend (which they don't have) or IonCube on the server and IonCube requires enable_dl to be on in the php.ini. Now a colleague of mine thinks I can update this via an.htacc... | The documentation says that this can only be set in the php.ini (not in.htaccess). You can see this by looking at the table where it says "PHP_INI_SYSTEM", which means - "Entry can be set in php.ini or httpd.conf". | Edit php.ini with .htaccess I'm slowly getting back into PHP, and now I run into a problem, I want to install some web software on our host and I need to have either the latest Zend (which they don't have) or IonCube on the server and IonCube requires enable_dl to be on in the php.ini. Now a colleague of mine thinks I ... | TITLE:
Edit php.ini with .htaccess
QUESTION:
I'm slowly getting back into PHP, and now I run into a problem, I want to install some web software on our host and I need to have either the latest Zend (which they don't have) or IonCube on the server and IonCube requires enable_dl to be on in the php.ini. Now a colleague... | [
".htaccess",
"php"
] | 1 | 3 | 3,253 | 2 | 0 | 2008-09-29T15:38:26.970000 | 2008-09-29T15:41:12.610000 |
149,262 | 149,351 | Not Nil shortcut in Delphi | What delphi function asserts that an object is not nil? | Like knight_killer pointed out above, you use the Assert() function, asserting that Assigned(obj) is true. Of course, like in most compiled languages, assertions are not executed (or even included in the compiler output) unless you've specifically enabled them, so you should not rely on assertions for release mode buil... | Not Nil shortcut in Delphi What delphi function asserts that an object is not nil? | TITLE:
Not Nil shortcut in Delphi
QUESTION:
What delphi function asserts that an object is not nil?
ANSWER:
Like knight_killer pointed out above, you use the Assert() function, asserting that Assigned(obj) is true. Of course, like in most compiled languages, assertions are not executed (or even included in the compil... | [
"delphi"
] | 7 | 14 | 2,853 | 4 | 0 | 2008-09-29T15:43:03.293000 | 2008-09-29T15:58:13.397000 |
149,268 | 149,305 | Benefits and portability of Boost Library | Since I have started using this site, I keep hearing about the Boost library. I am wondering what are some of the major benefits of the Boost library (hence why should I use it) and how portable is the Boost library? | Boost is organized by several members of the standard committee. So it is a breeding ground for libraries that will be in the next standard. It is an extension to the STL (it fills in the bits left out) It is well documented. It is well peer-reviewed. It has high activity so bugs are found and fixed quickly. It is plat... | Benefits and portability of Boost Library Since I have started using this site, I keep hearing about the Boost library. I am wondering what are some of the major benefits of the Boost library (hence why should I use it) and how portable is the Boost library? | TITLE:
Benefits and portability of Boost Library
QUESTION:
Since I have started using this site, I keep hearing about the Boost library. I am wondering what are some of the major benefits of the Boost library (hence why should I use it) and how portable is the Boost library?
ANSWER:
Boost is organized by several memb... | [
"c++",
"boost"
] | 53 | 69 | 12,211 | 12 | 0 | 2008-09-29T15:43:28.503000 | 2008-09-29T15:48:33.140000 |
149,274 | 149,397 | HTTP vs HTTPS performance | Are there any major differences in performance between http and https? I seem to recall reading that HTTPS can be a fifth as fast as HTTP. Is this valid with the current generation webservers/browsers? If so, are there any whitepapers to support it? | There's a very simple answer to this: Profile the performance of your web server to see what the performance penalty is for your particular situation. There are several tools out there to compare the performance of an HTTP vs HTTPS server (JMeter and Visual Studio come to mind) and they are quite easy to use. No one ca... | HTTP vs HTTPS performance Are there any major differences in performance between http and https? I seem to recall reading that HTTPS can be a fifth as fast as HTTP. Is this valid with the current generation webservers/browsers? If so, are there any whitepapers to support it? | TITLE:
HTTP vs HTTPS performance
QUESTION:
Are there any major differences in performance between http and https? I seem to recall reading that HTTPS can be a fifth as fast as HTTP. Is this valid with the current generation webservers/browsers? If so, are there any whitepapers to support it?
ANSWER:
There's a very si... | [
"performance",
"http",
"https"
] | 389 | 242 | 248,242 | 22 | 0 | 2008-09-29T15:44:41.963000 | 2008-09-29T16:09:50.543000 |
149,294 | 149,554 | Restrict dependencies between Java packages | What are the possibilities to enforce restrictions on the package dependencies in a Java build system? For example, the myapp.server.bl.Customer class should not be allowed to refer to the myapp.client.ui.customlayout package. I'm interested in either Ant-based or IDE-specific solutions. I'd like to get an error messag... | I believe Checkstyle has a check for that. It's called Import Control | Restrict dependencies between Java packages What are the possibilities to enforce restrictions on the package dependencies in a Java build system? For example, the myapp.server.bl.Customer class should not be allowed to refer to the myapp.client.ui.customlayout package. I'm interested in either Ant-based or IDE-specifi... | TITLE:
Restrict dependencies between Java packages
QUESTION:
What are the possibilities to enforce restrictions on the package dependencies in a Java build system? For example, the myapp.server.bl.Customer class should not be allowed to refer to the myapp.client.ui.customlayout package. I'm interested in either Ant-ba... | [
"java",
"build-process",
"dependency-management"
] | 10 | 7 | 3,034 | 7 | 0 | 2008-09-29T15:47:48.163000 | 2008-09-29T16:43:31.213000 |
149,300 | 149,355 | Prevent Text Wrap in DataGrid | I have a problem with a data-bound DataGrid control, in that despite each column having its Wrap property set to false, the text still wraps. It seems to only do this on IE, and not FF. | It appears that Microsoft is aware of this issue and they have provided a workaround... I don't know if this was addressed in IE8 B2... you might try it and see. Good luck! | Prevent Text Wrap in DataGrid I have a problem with a data-bound DataGrid control, in that despite each column having its Wrap property set to false, the text still wraps. It seems to only do this on IE, and not FF. | TITLE:
Prevent Text Wrap in DataGrid
QUESTION:
I have a problem with a data-bound DataGrid control, in that despite each column having its Wrap property set to false, the text still wraps. It seems to only do this on IE, and not FF.
ANSWER:
It appears that Microsoft is aware of this issue and they have provided a wor... | [
"asp.net"
] | 1 | 3 | 451 | 1 | 0 | 2008-09-29T15:48:09.660000 | 2008-09-29T15:58:33.100000 |
149,311 | 149,398 | ASP.NET GridView postback not setting posted controls' values | When adding an EditItemTemplate of some complexity (mulitple fields in one template), and then parsing the controls from the RowUpdating event, the controls that were manually entered by the user have no values. My guess is there is something going on with when the data is bound, but I've had instances where simply add... | Did you turn off ViewState? Did you add control programmatically in the template? If so, did you create them at the correct stage? | ASP.NET GridView postback not setting posted controls' values When adding an EditItemTemplate of some complexity (mulitple fields in one template), and then parsing the controls from the RowUpdating event, the controls that were manually entered by the user have no values. My guess is there is something going on with w... | TITLE:
ASP.NET GridView postback not setting posted controls' values
QUESTION:
When adding an EditItemTemplate of some complexity (mulitple fields in one template), and then parsing the controls from the RowUpdating event, the controls that were manually entered by the user have no values. My guess is there is somethi... | [
"asp.net",
"gridview",
"web-controls"
] | 1 | 1 | 1,996 | 3 | 0 | 2008-09-29T15:49:55.880000 | 2008-09-29T16:10:16.300000 |
149,318 | 149,381 | Virtualized SQL Server: Why not? | The IT department where I work is trying to move to 100% virtualized servers, with all the data stored on a SAN. They haven't done it yet, but the plan eventually calls for moving the existing physical SQL Server machines to virtual servers as well. A few months ago I attended the Heroes Happen Here launch event, and i... | I can say this from personal experience because I am dealing with this very problem as we speak. The place I am currently working as a contractor has this type of environment for their SQL Server development systems. I am trying to develop a fairly modest B.I. system on this environment and really struggling with the p... | Virtualized SQL Server: Why not? The IT department where I work is trying to move to 100% virtualized servers, with all the data stored on a SAN. They haven't done it yet, but the plan eventually calls for moving the existing physical SQL Server machines to virtual servers as well. A few months ago I attended the Heroe... | TITLE:
Virtualized SQL Server: Why not?
QUESTION:
The IT department where I work is trying to move to 100% virtualized servers, with all the data stored on a SAN. They haven't done it yet, but the plan eventually calls for moving the existing physical SQL Server machines to virtual servers as well. A few months ago I ... | [
"sql-server",
"performance",
"virtualization"
] | 34 | 37 | 26,012 | 14 | 0 | 2008-09-29T15:51:17.813000 | 2008-09-29T16:04:28.327000 |
149,324 | 201,418 | Setting per-file flags with automake | Is there a way set flags on a per-file basis with automake? In particular, if I have a c++ project and want to compile with -WAll all the files except one for which I want to disable a particular warning, what could I do? I tried something like: CXXFLAGS = -WAll... bin_PROGRAMS = test test_SOURCES = main.cpp utility.cp... | Automake only supports per-target flags, while you want per-object flags. One way around is to create a small library that contains your object: CXXFLAGS = -Wall... bin_PROGRAMS = test test_SOURCES = main.cpp test_LDADD = libutility.a noinst_LIBRARIES = libutility.a libutility_a_SOURCES = utility.cpp libutility_a_CXXFL... | Setting per-file flags with automake Is there a way set flags on a per-file basis with automake? In particular, if I have a c++ project and want to compile with -WAll all the files except one for which I want to disable a particular warning, what could I do? I tried something like: CXXFLAGS = -WAll... bin_PROGRAMS = te... | TITLE:
Setting per-file flags with automake
QUESTION:
Is there a way set flags on a per-file basis with automake? In particular, if I have a c++ project and want to compile with -WAll all the files except one for which I want to disable a particular warning, what could I do? I tried something like: CXXFLAGS = -WAll...... | [
"linux",
"gcc",
"automake"
] | 8 | 8 | 4,429 | 4 | 0 | 2008-09-29T15:52:21.617000 | 2008-10-14T14:34:54.270000 |
149,336 | 149,377 | Practical Uses for the "Curiously Recurring Template Pattern" | What are some practical uses for the " Curiously Recurring Template Pattern "? The " counted class " example commonly shown just isn't a convincing example to me. | Simulated dynamic binding. Avoiding the cost of virtual function calls while retaining some of the hierarchical benefits is an enormous win for the subsystems where it can be done in the project I am currently working on. | Practical Uses for the "Curiously Recurring Template Pattern" What are some practical uses for the " Curiously Recurring Template Pattern "? The " counted class " example commonly shown just isn't a convincing example to me. | TITLE:
Practical Uses for the "Curiously Recurring Template Pattern"
QUESTION:
What are some practical uses for the " Curiously Recurring Template Pattern "? The " counted class " example commonly shown just isn't a convincing example to me.
ANSWER:
Simulated dynamic binding. Avoiding the cost of virtual function cal... | [
"c++",
"templates",
"design-patterns",
"crtp",
"f-bounded-polymorphism"
] | 47 | 24 | 16,794 | 5 | 0 | 2008-09-29T15:54:49.567000 | 2008-09-29T16:03:32.353000 |
149,339 | 149,512 | SQL Server 2000 and System.Transactions.TransactionScope() | Is it possible to create LIGHTWEIGHT transactions using TransactionScope() with SQL2000? Or if not, is there a workaround using CommitableTransaction and/or something similar? So the answer is, basically, "If you want local-to-1-server-transactions on SQL2000, don't use TransactionScope()". | Lightweight transactions require support for "promotable" transactions. SQL Server 2000 simply does not have support for this. Promotable transactions were added in SQL Server 2005. Florin Lazar posted an adapter that can be used in specific scenarios. You'll have to judge for yourself if this adapter is appropriate fo... | SQL Server 2000 and System.Transactions.TransactionScope() Is it possible to create LIGHTWEIGHT transactions using TransactionScope() with SQL2000? Or if not, is there a workaround using CommitableTransaction and/or something similar? So the answer is, basically, "If you want local-to-1-server-transactions on SQL2000, ... | TITLE:
SQL Server 2000 and System.Transactions.TransactionScope()
QUESTION:
Is it possible to create LIGHTWEIGHT transactions using TransactionScope() with SQL2000? Or if not, is there a workaround using CommitableTransaction and/or something similar? So the answer is, basically, "If you want local-to-1-server-transac... | [
"transactions",
"sql-server-2000",
"transactionscope"
] | 3 | 2 | 689 | 1 | 0 | 2008-09-29T15:55:04.557000 | 2008-09-29T16:34:39.080000 |
149,346 | 149,453 | New Date/Time data types in SQL 2008 | I am trying to use the new DATETIMEOFFSET data type in SQL 2008 but I can't figure out how to get the DATETIMEOFFSET '2008-09-27 21:28:17.2930000 -07:00' to show as '2008-09-27 14:28:17.2930000' (basically applying the offset to show the local time). Does anyone know how to do this? | The following MSDN articles appear to cover this: http://msdn.microsoft.com/en-us/library/bb384267.aspx http://msdn.microsoft.com/en-us/library/bb630289.aspx http://msdn.microsoft.com/en-us/library/ms187928.aspx It appears that you need to cast the datetimeoffset into another format, such as datetime, but the sample co... | New Date/Time data types in SQL 2008 I am trying to use the new DATETIMEOFFSET data type in SQL 2008 but I can't figure out how to get the DATETIMEOFFSET '2008-09-27 21:28:17.2930000 -07:00' to show as '2008-09-27 14:28:17.2930000' (basically applying the offset to show the local time). Does anyone know how to do this? | TITLE:
New Date/Time data types in SQL 2008
QUESTION:
I am trying to use the new DATETIMEOFFSET data type in SQL 2008 but I can't figure out how to get the DATETIMEOFFSET '2008-09-27 21:28:17.2930000 -07:00' to show as '2008-09-27 14:28:17.2930000' (basically applying the offset to show the local time). Does anyone kn... | [
"sql-server-2008"
] | 2 | 1 | 501 | 1 | 0 | 2008-09-29T15:56:57.003000 | 2008-09-29T16:23:02.527000 |
149,375 | 273,214 | How do you add a superscript character into a Powerbuilder textbox? | Is there any way to do this in the Powerbuilder properties window for a datawindow's textbox? | Actually I stumbled across a simpler solution. I copied and pasted a portion of the text from a pdf into the text property of a datawindow text contol. The superscript character simply pasted in. So I'm guessing that Dougman's solution would work too. Example: "™Trademark used under..." Note: I'm using PB 9.0.1 Thanks ... | How do you add a superscript character into a Powerbuilder textbox? Is there any way to do this in the Powerbuilder properties window for a datawindow's textbox? | TITLE:
How do you add a superscript character into a Powerbuilder textbox?
QUESTION:
Is there any way to do this in the Powerbuilder properties window for a datawindow's textbox?
ANSWER:
Actually I stumbled across a simpler solution. I copied and pasted a portion of the text from a pdf into the text property of a dat... | [
"textbox",
"powerbuilder",
"datawindow"
] | 2 | 0 | 2,998 | 5 | 0 | 2008-09-29T16:03:28.563000 | 2008-11-07T19:03:42.163000 |
149,379 | 156,784 | How to generate Code39 barcodes in vb.net | I want to create Code39 encoded barcodes from my application. I know I can use a font for this, but I'd prefer not to as I'd have to register the font on the server and I've had some pretty bad experiences with that. An example of what I've produced after asking this question is in the answers | This is my current codebehind, with lots of comments: Option Explicit On Option Strict On
Imports System.Drawing Imports System.Drawing.Imaging Imports System.Drawing.Bitmap Imports System.Drawing.Graphics Imports System.IO
Partial Public Class Barcode Inherits System.Web.UI.Page 'Sebastiaan Janssen - 20081001 - TINT... | How to generate Code39 barcodes in vb.net I want to create Code39 encoded barcodes from my application. I know I can use a font for this, but I'd prefer not to as I'd have to register the font on the server and I've had some pretty bad experiences with that. An example of what I've produced after asking this question i... | TITLE:
How to generate Code39 barcodes in vb.net
QUESTION:
I want to create Code39 encoded barcodes from my application. I know I can use a font for this, but I'd prefer not to as I'd have to register the font on the server and I've had some pretty bad experiences with that. An example of what I've produced after aski... | [
".net",
"vb.net",
"barcode"
] | 10 | 11 | 35,355 | 10 | 0 | 2008-09-29T16:03:59.153000 | 2008-10-01T09:03:26.030000 |
149,388 | 620,284 | Low-level details of the implementation of performSelectorOnMainThread: | Was wondering if anyone knows, or has pointers to good documentation that discusses, the low-level implementation details of Cocoa's 'performSelectorOnMainThread:' method. My best guess, and one I think is probably pretty close, is that it uses mach ports or an abstraction on top of them to provide intra-thread communi... | Yes, it does use Mach ports. What happens is this: A block of data encapsulating the perform info (the target object, the selector, the optional object argument to the selector, etc.) is enqueued in the thread's run loop info. This is done using @synchronized, which ultimately uses pthread_mutex_lock. CFRunLoopSourceSi... | Low-level details of the implementation of performSelectorOnMainThread: Was wondering if anyone knows, or has pointers to good documentation that discusses, the low-level implementation details of Cocoa's 'performSelectorOnMainThread:' method. My best guess, and one I think is probably pretty close, is that it uses mac... | TITLE:
Low-level details of the implementation of performSelectorOnMainThread:
QUESTION:
Was wondering if anyone knows, or has pointers to good documentation that discusses, the low-level implementation details of Cocoa's 'performSelectorOnMainThread:' method. My best guess, and one I think is probably pretty close, i... | [
"objective-c",
"cocoa"
] | 8 | 10 | 3,065 | 4 | 0 | 2008-09-29T16:06:29.180000 | 2009-03-06T20:30:09.390000 |
149,395 | 149,418 | What are some ways of accessing Microsoft SQL Server from Linux? | We have a Windows machine running SQL Server 2005, and we need to be able to run some database queries on it from a Linux box. What are some of the recommended ways of doing this? Ideally, we would want a command-line utility similar to sqlcmd on Windows. | FreeTDS + unixODBC or iODBC Install first FreeTDS, then configure one of the two ODBC engines to use FreeTDS as its ODBC driver. Then use the commandline interface of the ODBC engine. unixODBC has isql, iODBC has iodbctest You can also use your favorite programming language (I've successfully used Perl, C, Python and R... | What are some ways of accessing Microsoft SQL Server from Linux? We have a Windows machine running SQL Server 2005, and we need to be able to run some database queries on it from a Linux box. What are some of the recommended ways of doing this? Ideally, we would want a command-line utility similar to sqlcmd on Windows. | TITLE:
What are some ways of accessing Microsoft SQL Server from Linux?
QUESTION:
We have a Windows machine running SQL Server 2005, and we need to be able to run some database queries on it from a Linux box. What are some of the recommended ways of doing this? Ideally, we would want a command-line utility similar to ... | [
"sql-server"
] | 57 | 34 | 129,857 | 15 | 0 | 2008-09-29T16:09:25.367000 | 2008-09-29T16:14:23.343000 |
149,416 | 149,483 | Manipulate Results in GridView RowDataBound or Directly in SQL? | I have a curious question about efficiency. Say I have a field on a database that is just a numeric digit that represents something else. Like, a value of 1 means the term is 30 days. Would it be better (more efficient) to code a SELECT statement like this... SELECT CASE TermId WHEN 1 THEN '30 days' WHEN 2 THEN '60 day... | Efficiency probably wouldn't matter here - code maintainability does though. Ask yourself - will these values change? What if they do? What would I need to do after 2 years of use if these values change? If it becomes evident that scripting them in SQL would mean better maintainability (easier to change), then do it in... | Manipulate Results in GridView RowDataBound or Directly in SQL? I have a curious question about efficiency. Say I have a field on a database that is just a numeric digit that represents something else. Like, a value of 1 means the term is 30 days. Would it be better (more efficient) to code a SELECT statement like this... | TITLE:
Manipulate Results in GridView RowDataBound or Directly in SQL?
QUESTION:
I have a curious question about efficiency. Say I have a field on a database that is just a numeric digit that represents something else. Like, a value of 1 means the term is 30 days. Would it be better (more efficient) to code a SELECT s... | [
"asp.net",
"sql",
"optimization"
] | 0 | 1 | 1,263 | 3 | 0 | 2008-09-29T16:14:16.633000 | 2008-09-29T16:29:03.277000 |
149,421 | 149,480 | Implementing a resizable textarea? | How does Stackoverflow implement the resizable textarea? Is that something they rolled themselves or is it a publicly available component that I can easily attach to textareas on my sites? I found this question and it doesn't quite do what I want. autosizing-textarea That talks more about automatically resizing textare... | StackOverflow uses a jQuery plugin to accomplish this: TextAreaResizer. It's easy enough to verify this - just pull the JS files from the site. Historical note: when this answer was originally written, WMD and TextAreaResizer were two separate plugins, neither one of which was authored by the SO Dev Team (see also: mic... | Implementing a resizable textarea? How does Stackoverflow implement the resizable textarea? Is that something they rolled themselves or is it a publicly available component that I can easily attach to textareas on my sites? I found this question and it doesn't quite do what I want. autosizing-textarea That talks more a... | TITLE:
Implementing a resizable textarea?
QUESTION:
How does Stackoverflow implement the resizable textarea? Is that something they rolled themselves or is it a publicly available component that I can easily attach to textareas on my sites? I found this question and it doesn't quite do what I want. autosizing-textarea... | [
"html",
"resize",
"textarea"
] | 22 | 25 | 31,788 | 6 | 0 | 2008-09-29T16:14:57.863000 | 2008-09-29T16:28:34.557000 |
149,439 | 149,457 | How can circular dependencies be avoided when callbacks are used? | How can you avoid circular dependencies when you're designing two classes with a producer/consumer relationship? Here ListenerImpl needs a reference to Broadcaster in order to register/unregister itself, and Broadcaster needs a reference back to the Listeners in order to send messages. This example is in Java but it ca... | I don't see that being a circular dependency. Listener depends on nothing. ListenerImpl depends on Listener and Broadcaster Broadcaster depends on Listener. Listener ^ ^ / \ / \ Broadcaster <-- ListenerImpl All arrows end at Listener. There's no cycle. So, I think you're OK. | How can circular dependencies be avoided when callbacks are used? How can you avoid circular dependencies when you're designing two classes with a producer/consumer relationship? Here ListenerImpl needs a reference to Broadcaster in order to register/unregister itself, and Broadcaster needs a reference back to the List... | TITLE:
How can circular dependencies be avoided when callbacks are used?
QUESTION:
How can you avoid circular dependencies when you're designing two classes with a producer/consumer relationship? Here ListenerImpl needs a reference to Broadcaster in order to register/unregister itself, and Broadcaster needs a referenc... | [
"oop",
"inversion-of-control",
"callback"
] | 10 | 9 | 4,324 | 6 | 0 | 2008-09-29T16:19:34.907000 | 2008-09-29T16:23:50.900000 |
149,458 | 622,327 | IIS 6, Wildcard Application Mapping, and FrontPage | While I'd love to get rid of requiring FrontPage Extensions on a heavy traffic site I host, the client requires it to administrate the site. Having just implemented Wildcard Application Mapping in IIS 6 on this site in order to provide integrated Forms Authentication security between ASP and ASP.NET resources, this bre... | The issue here sounds like the wildcard mapping is taking precedence over the frontpage extensions ISAPI handler and/or messing up the request/response for that. I'd try creating a handler that does nothing and mapping it to fpadmdll.dll. Something like this: namespace YourNamespace { public IgnoreRequestHandler: IHttp... | IIS 6, Wildcard Application Mapping, and FrontPage While I'd love to get rid of requiring FrontPage Extensions on a heavy traffic site I host, the client requires it to administrate the site. Having just implemented Wildcard Application Mapping in IIS 6 on this site in order to provide integrated Forms Authentication s... | TITLE:
IIS 6, Wildcard Application Mapping, and FrontPage
QUESTION:
While I'd love to get rid of requiring FrontPage Extensions on a heavy traffic site I host, the client requires it to administrate the site. Having just implemented Wildcard Application Mapping in IIS 6 on this site in order to provide integrated Form... | [
"asp.net",
"iis",
"asp-classic",
"frontpage"
] | 1 | 0 | 1,199 | 1 | 0 | 2008-09-29T16:23:55.190000 | 2009-03-07T19:13:16.837000 |
149,474 | 149,524 | I have a 100+MB XML file (sans-DTD/Schema). XSLT won't have it. Strategies for transforming/parsing? | This XML file contained archived news stories for all of last year. I was asked to sort these stories by story categor[y|ies] into new XML files. big_story_export.xml turns into lifestyles.xml food.xml nascar.xml...and so on. I got the job done using a one-off python script, however, I originally attempted this using X... | This sounds like a bug in the large XML file or the XSLT processor. There are two things you should check on your file. Is the file well-formed XML? That is, are all tags and attributes properly terminated and matched? An XML processor, like xmlstarlet, can tell you that. Does the file contain valid XML? For this you n... | I have a 100+MB XML file (sans-DTD/Schema). XSLT won't have it. Strategies for transforming/parsing? This XML file contained archived news stories for all of last year. I was asked to sort these stories by story categor[y|ies] into new XML files. big_story_export.xml turns into lifestyles.xml food.xml nascar.xml...and ... | TITLE:
I have a 100+MB XML file (sans-DTD/Schema). XSLT won't have it. Strategies for transforming/parsing?
QUESTION:
This XML file contained archived news stories for all of last year. I was asked to sort these stories by story categor[y|ies] into new XML files. big_story_export.xml turns into lifestyles.xml food.xml... | [
"xml",
"xslt",
"parsing"
] | 1 | 3 | 1,947 | 5 | 0 | 2008-09-29T16:27:39.410000 | 2008-09-29T16:36:22.167000 |
149,479 | 149,677 | Adding a caption to an equation in LaTeX | Well, it seems simple enough, but I can't find a way to add a caption to an equation. The caption is needed to explain the variables used in the equation, so some kind of table-like structure to keep it all aligned and pretty would be great. | The \caption command is restricted to floats: you will need to place the equation in a figure or table environment (or a new kind of floating environment). For example: \begin{figure} \[ E = m c^2 \] \caption{A famous equation} \end{figure} The point of floats is that you let LaTeX determine their placement. If you wan... | Adding a caption to an equation in LaTeX Well, it seems simple enough, but I can't find a way to add a caption to an equation. The caption is needed to explain the variables used in the equation, so some kind of table-like structure to keep it all aligned and pretty would be great. | TITLE:
Adding a caption to an equation in LaTeX
QUESTION:
Well, it seems simple enough, but I can't find a way to add a caption to an equation. The caption is needed to explain the variables used in the equation, so some kind of table-like structure to keep it all aligned and pretty would be great.
ANSWER:
The \capti... | [
"latex"
] | 63 | 65 | 184,306 | 3 | 0 | 2008-09-29T16:28:31.810000 | 2008-09-29T17:05:25.420000 |
149,488 | 151,612 | Disk-backed STL container classes? | I enjoy developing algorithms using the STL, however, I have this recurring problem where my data sets are too large for the heap. I have been searching for drop-in replacements for STL containers and algorithms which are disk-backed, i.e. the data structures on stored on disk rather than the heap. A friend recently po... | I have implemented some thing very similar. Implementing the iterators is the most challenging. I used boost::iterator_facade to implement the iterators. Using boost::iterator_facade you can easy adapt any cached on disk data structures to have a STL container interface. | Disk-backed STL container classes? I enjoy developing algorithms using the STL, however, I have this recurring problem where my data sets are too large for the heap. I have been searching for drop-in replacements for STL containers and algorithms which are disk-backed, i.e. the data structures on stored on disk rather ... | TITLE:
Disk-backed STL container classes?
QUESTION:
I enjoy developing algorithms using the STL, however, I have this recurring problem where my data sets are too large for the heap. I have been searching for drop-in replacements for STL containers and algorithms which are disk-backed, i.e. the data structures on stor... | [
"c++",
"algorithm",
"data-structures",
"stl",
"on-disk"
] | 41 | 10 | 6,396 | 4 | 0 | 2008-09-29T16:29:55.397000 | 2008-09-30T03:06:36.380000 |
149,491 | 149,516 | Pascal casing or Camel Casing for C# code? | I've been arguing with my coworkers about Pascal casing (upper camel case) vs. lower CamelCasing. They are used to lower camel casing for everything from table names in SQL databases to property naming in C# code but I like Pascal casing better, lower camel casing for variables and Pascal casing for properties: string ... | I use what the Framework uses, as it's the de-facto best practice. However, so long as the code in your company is consistently using their style, then you're much better off getting used to it. If every developer has their own standard, then there's no standard at all. | Pascal casing or Camel Casing for C# code? I've been arguing with my coworkers about Pascal casing (upper camel case) vs. lower CamelCasing. They are used to lower camel casing for everything from table names in SQL databases to property naming in C# code but I like Pascal casing better, lower camel casing for variable... | TITLE:
Pascal casing or Camel Casing for C# code?
QUESTION:
I've been arguing with my coworkers about Pascal casing (upper camel case) vs. lower CamelCasing. They are used to lower camel casing for everything from table names in SQL databases to property naming in C# code but I like Pascal casing better, lower camel c... | [
"c#",
".net",
"naming-conventions",
"standards"
] | 41 | 39 | 88,687 | 14 | 0 | 2008-09-29T16:30:20.777000 | 2008-09-29T16:35:27.613000 |
149,500 | 149,514 | What does the comma operator do? | What does the following code do in C/C++? if (blah(), 5) { //do something } | Comma operator is applied and the value 5 is used to determine the conditional's true/false. It will execute blah() and get something back (presumably), then the comma operator is employed and 5 will be the only thing that is used to determine the true/false value for the expression. Note that the, operator could be ov... | What does the comma operator do? What does the following code do in C/C++? if (blah(), 5) { //do something } | TITLE:
What does the comma operator do?
QUESTION:
What does the following code do in C/C++? if (blah(), 5) { //do something }
ANSWER:
Comma operator is applied and the value 5 is used to determine the conditional's true/false. It will execute blah() and get something back (presumably), then the comma operator is empl... | [
"c++",
"c",
"operators",
"comma-operator"
] | 40 | 66 | 2,648 | 8 | 0 | 2008-09-29T16:33:05.777000 | 2008-09-29T16:35:20.763000 |
149,506 | 176,039 | annotation based Spring bean validation | I'm investigating an annotation-based approach to validating Spring beans using spring modules. In this tutorial, the following bean (getters and setters omitted) is used as an example: public final class User {
@NotBlank @Length(max = 80) private String name;
@NotBlank @Email @Length(max = 80) private String email;
... | I took a quick look at the BeanValidator API, and it looks like you might want to try the errorCodeConverter property. You would need to implement your own ErrorCodeConverter, or use one of the provided implementations?........ Note: configurationLoader is another bean defined in the config XML used in the tutorial Exa... | annotation based Spring bean validation I'm investigating an annotation-based approach to validating Spring beans using spring modules. In this tutorial, the following bean (getters and setters omitted) is used as an example: public final class User {
@NotBlank @Length(max = 80) private String name;
@NotBlank @Email ... | TITLE:
annotation based Spring bean validation
QUESTION:
I'm investigating an annotation-based approach to validating Spring beans using spring modules. In this tutorial, the following bean (getters and setters omitted) is used as an example: public final class User {
@NotBlank @Length(max = 80) private String name;
... | [
"java",
"validation",
"spring-modules"
] | 14 | 6 | 14,014 | 3 | 0 | 2008-09-29T16:33:55.433000 | 2008-10-06T20:23:55.923000 |
149,551 | 149,872 | What is StringBuilder's RAM consumption like? | We have a few operations where we are doing a large number of large string concatenations, and have recently encountered an out of memory exception. Unfortunately, debugging the code is not an option, as this is occurring at a customer site. So, before looking into a overhaul of our code, I would like to ask: what is t... | Here is a nice study about String Concatenation vs Memory Allocation. If you can avoid concatenating, do it! This is a no brainer, if you don't have to concatenate but want your source code to look nice, use the first method. It will get optimized as if it was a single string. Don't use += concatenating ever. Too much ... | What is StringBuilder's RAM consumption like? We have a few operations where we are doing a large number of large string concatenations, and have recently encountered an out of memory exception. Unfortunately, debugging the code is not an option, as this is occurring at a customer site. So, before looking into a overha... | TITLE:
What is StringBuilder's RAM consumption like?
QUESTION:
We have a few operations where we are doing a large number of large string concatenations, and have recently encountered an out of memory exception. Unfortunately, debugging the code is not an option, as this is occurring at a customer site. So, before loo... | [
".net",
"stringbuilder",
"ram"
] | 6 | 6 | 2,909 | 5 | 0 | 2008-09-29T16:42:23.353000 | 2008-09-29T17:54:34.380000 |
149,557 | 149,601 | Using Subsonic for potentially heavily accessed ASPNET MVC Application | I am about to start a project for a potentially heavily accessed ASPNET MVC application and I was thinking to use Subsonic for my DAL. I have some concern about the ability of Subsonic to handle thousands of concurrent requests. Can anyone give me some examples of popular web sites using Subsonic? Also if you have any ... | Thousands of concurrent requests? Are you sure that's likely? For what it's worth, DotNetKicks uses SubSonic, and never seems to have performance issues. | Using Subsonic for potentially heavily accessed ASPNET MVC Application I am about to start a project for a potentially heavily accessed ASPNET MVC application and I was thinking to use Subsonic for my DAL. I have some concern about the ability of Subsonic to handle thousands of concurrent requests. Can anyone give me s... | TITLE:
Using Subsonic for potentially heavily accessed ASPNET MVC Application
QUESTION:
I am about to start a project for a potentially heavily accessed ASPNET MVC application and I was thinking to use Subsonic for my DAL. I have some concern about the ability of Subsonic to handle thousands of concurrent requests. Ca... | [
"orm",
"subsonic",
"scalability"
] | 3 | 7 | 1,465 | 4 | 0 | 2008-09-29T16:44:10.383000 | 2008-09-29T16:53:59.127000 |
149,570 | 149,699 | Continuations in Ruby | Has anyone ever done work to get Ruby to do continuations (like Seaside on Smalltalk)? | Yes, in most cases. MRI (1.8) have supported them as far as my memory reaches, Ruby 1.9 (YARV) does it, too, so does Rubinius. JRuby and IronRuby don't have continuations, and it's quite unlikely they will get them (JVM and CLR use stack-instrospection for security) Ruby as a language supports continuations via callcc ... | Continuations in Ruby Has anyone ever done work to get Ruby to do continuations (like Seaside on Smalltalk)? | TITLE:
Continuations in Ruby
QUESTION:
Has anyone ever done work to get Ruby to do continuations (like Seaside on Smalltalk)?
ANSWER:
Yes, in most cases. MRI (1.8) have supported them as far as my memory reaches, Ruby 1.9 (YARV) does it, too, so does Rubinius. JRuby and IronRuby don't have continuations, and it's qui... | [
"ruby",
"continuations"
] | 12 | 12 | 3,730 | 4 | 0 | 2008-09-29T16:47:06.960000 | 2008-09-29T17:11:22.643000 |
149,573 | 149,820 | Check if option is selected with jQuery, if not select a default | Using jQuery, how do you check if there is an option selected in a select menu, and if not, assign one of the options as selected. (The select is generated with a maze of PHP functions in an app I just inherited, so this is a quick fix while I get my head around those:) | While I'm not sure about exactly what you want to accomplish, this bit of code worked for me. First Second Third Fourth | Check if option is selected with jQuery, if not select a default Using jQuery, how do you check if there is an option selected in a select menu, and if not, assign one of the options as selected. (The select is generated with a maze of PHP functions in an app I just inherited, so this is a quick fix while I get my head... | TITLE:
Check if option is selected with jQuery, if not select a default
QUESTION:
Using jQuery, how do you check if there is an option selected in a select menu, and if not, assign one of the options as selected. (The select is generated with a maze of PHP functions in an app I just inherited, so this is a quick fix w... | [
"javascript",
"jquery",
"forms",
"dom",
"html-select"
] | 212 | 274 | 523,020 | 18 | 0 | 2008-09-29T16:47:31.610000 | 2008-09-29T17:42:11.273000 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.