content stringlengths 86 88.9k | title stringlengths 0 150 | question stringlengths 1 35.8k | answers list | answers_scores list | non_answers list | non_answers_scores list | tags list | name stringlengths 30 130 |
|---|---|---|---|---|---|---|---|---|
Q:
How can I pass data from an aspx page to an ascx modal popup?
I'm fairly new to ASP.NET and trying to learn how things are done. I come from a C# background so the code-behind portion is easy, but thinking like a web developer is unfamiliar.
I have an aspx page that contains a grid of checkboxes. I have a button t... | How can I pass data from an aspx page to an ascx modal popup? | I'm fairly new to ASP.NET and trying to learn how things are done. I come from a C# background so the code-behind portion is easy, but thinking like a web developer is unfamiliar.
I have an aspx page that contains a grid of checkboxes. I have a button that is coded via a Button_Click event to collect a list of which ro... | [
"All a usercontrol(.ascx) file is is a set of controls that you have grouped together to provide some reusable functionality. The controls defined in it are still added to the page's control collection (.aspx) durring the page lifecylce. The ModalPopupExtender uses javascript and dhtml to show and hide the contro... | [
3,
1,
0
] | [] | [] | [
"asp.net",
"asp.net_ajax",
"c#"
] | stackoverflow_0000012671_asp.net_asp.net_ajax_c#.txt |
Q:
What is a good way to denormalize a mysql database?
I have a large database of normalized order data that is becoming very slow to query for reporting. Many of the queries that I use in reports join five or six tables and are having to examine tens or hundreds of thousands of lines.
There are lots of queries and ... | What is a good way to denormalize a mysql database? | I have a large database of normalized order data that is becoming very slow to query for reporting. Many of the queries that I use in reports join five or six tables and are having to examine tens or hundreds of thousands of lines.
There are lots of queries and most have been optimized as much as possible to reduce se... | [
"I know more about mssql that mysql, but I don't think the number of joins or number of rows you are talking about should cause you too many problems with the correct indexes in place. Have you analyzed the query plan to see if you are missing any?\nhttp://dev.mysql.com/doc/refman/5.0/en/explain.html\nThat being s... | [
12,
2,
1,
1,
1,
0,
0,
0
] | [] | [] | [
"database",
"denormalization",
"mysql"
] | stackoverflow_0000012890_database_denormalization_mysql.txt |
Q:
How can I stop MATLAB from returning until after a command-line script completes?
I see in the MATLAB help (matlab -h) that I can use the -r flag to specify an m-file to run. I notice when I do this, MATLAB seems to start the script, but immediately return. The script processes fine, but the main app has already r... | How can I stop MATLAB from returning until after a command-line script completes? | I see in the MATLAB help (matlab -h) that I can use the -r flag to specify an m-file to run. I notice when I do this, MATLAB seems to start the script, but immediately return. The script processes fine, but the main app has already returned.
Is there any way to get MATLAB to only return once the command is finished? If... | [
"Quick answer:\nmatlab -wait -nosplash -nodesktop -r waitHello\n\nIn Matlab 7.1 (the version I have) there is an undocumented command line option -wait in matlab.bat. If it doesn't work for your version, you could probably add it in. Here's what I found. The command at the bottom that finally launches matlab is (li... | [
25
] | [] | [] | [
"command_line",
"matlab"
] | stackoverflow_0000014495_command_line_matlab.txt |
Q:
Is "include file" in shtml the best method to keep non-database changing data
We have a website that uses #include file command to roll info into some web pages. The authors can access the text files to update things like the occasional class or contact information for the department.
My question is this, I don't... | Is "include file" in shtml the best method to keep non-database changing data | We have a website that uses #include file command to roll info into some web pages. The authors can access the text files to update things like the occasional class or contact information for the department.
My question is this, I don't see anyone using this method and wonder if it is a good idea to keep using it. If... | [
"If you are using ASP.NET then you could bundle that code into a nice little UserControl that will display all of the important information. \nOther platforms should allow you to bundle the logic into a class object, and display it using that. \nIt really depends on the platform that you are using to deploy the app... | [
1,
1
] | [] | [] | [
"html",
"include",
"shtml"
] | stackoverflow_0000014791_html_include_shtml.txt |
Q:
Best way to let users download a file from my website: http or ftp
We have some files on our website that users of our software can download. Some of the files are in virtual folders on the website while others are on our ftp. The files on the ftp are generally accessed by clicking on an ftp:// link in a browser -... | Best way to let users download a file from my website: http or ftp | We have some files on our website that users of our software can download. Some of the files are in virtual folders on the website while others are on our ftp. The files on the ftp are generally accessed by clicking on an ftp:// link in a browser - most of our customers do not have an ftp client. The other files are ac... | [
"HTTP has many advantages over FTP:\n\nit is available in more places (think workplaces which block anything other than HTTP/S)\nit works nicely with proxies (FTP requires extra settings for the proxy - like making sure that it allows the CONNECT method)\nit provides built-in compression (with GZIP) which almost al... | [
6,
4,
3,
2,
1
] | [] | [] | [
"download",
"ftp",
"http"
] | stackoverflow_0000014263_download_ftp_http.txt |
Q:
Web page field validation
I need to validate a date/time field on a webpage but want it to do it without reloading the page and would like 'instant' feedback for the users.
What's the best/easiest solution.
BTW: easiest scores 65% of total points
Edit:
What if best was 65% of total points?
A:
If you would like t... | Web page field validation | I need to validate a date/time field on a webpage but want it to do it without reloading the page and would like 'instant' feedback for the users.
What's the best/easiest solution.
BTW: easiest scores 65% of total points
Edit:
What if best was 65% of total points?
| [
"If you would like to use JavaScript then it has built in date validation functions. However, if you do not want to go the JavaScript route, you could change the UI to dropdown controls which would limit the users ability to enter invalid data. You would still need to check server side to ensure nobody submits Feb ... | [
3,
2,
2,
1,
1,
0,
0,
0,
0,
0
] | [] | [] | [
"webpage"
] | stackoverflow_0000010599_webpage.txt |
Q:
What program can I use to generate diagrams of SQL view/table structure?
I've been tasked with redesigning part of a ms-sql database structure which currently involves a lot of views, some of which contain joins to other views.
Anyway, I wonder if anyone here could recommend a utility to automatically generate di... | What program can I use to generate diagrams of SQL view/table structure? | I've been tasked with redesigning part of a ms-sql database structure which currently involves a lot of views, some of which contain joins to other views.
Anyway, I wonder if anyone here could recommend a utility to automatically generate diagrams to help me visualise the whole structure.
What's the best program you'v... | [
"I am a big fan of Embarcadero's ER/Studio. It is very powerful and produces excellent on-screen as well as printed results. They have a free trial as well, so you should be able to get in and give it a shot without too much strife.\nGood luck!\n",
"Toad Data Modeller from Quest does a nice job on this and is r... | [
4,
2,
1,
0,
0
] | [] | [] | [
"database",
"diagram",
"sql",
"sql_server"
] | stackoverflow_0000004110_database_diagram_sql_sql_server.txt |
Q:
Identifying SQL Server Performance Problems
We're having sporadic, random query timeouts on our SQL Server 2005 cluster. I own a few apps that use it, so I'm helping out in the investigation. When watching the % CPU time in regular ol' Perfmon, you can certainly see it pegging out. However, SQL activity monitor on... | Identifying SQL Server Performance Problems | We're having sporadic, random query timeouts on our SQL Server 2005 cluster. I own a few apps that use it, so I'm helping out in the investigation. When watching the % CPU time in regular ol' Perfmon, you can certainly see it pegging out. However, SQL activity monitor only gives cumulative CPU and IO time used by a pro... | [
"This will give you the top 50 statements by average CPU time, check here for other scripts: http://www.microsoft.com/technet/scriptcenter/scripts/sql/sql2005/default.mspx?mfr=true\nSELECT TOP 50\n qs.total_worker_time/qs.execution_count as [Avg CPU Time],\n SUBSTRING(qt.text,qs.statement_start_offset... | [
12,
4,
3,
3,
2,
2,
2
] | [] | [] | [
"performance",
"sql_server",
"sql_server_2005"
] | stackoverflow_0000014717_performance_sql_server_sql_server_2005.txt |
Q:
Mixed C++/CLI TypeLoadException Internal limitation: too many fields
On a quest to migrate some new UI into Managed/C# land, I have recently turned on Common Language Runtime Support (/clr) on a large legacy project, which uses MFC in a Shared DLL and relies on about a dozen other projects within our overall solut... | Mixed C++/CLI TypeLoadException Internal limitation: too many fields | On a quest to migrate some new UI into Managed/C# land, I have recently turned on Common Language Runtime Support (/clr) on a large legacy project, which uses MFC in a Shared DLL and relies on about a dozen other projects within our overall solution. This project is the core of our application, and would drive any mana... | [
"Make sure the Enable String Pooling option under C/C++ Code Generation is turned on.\nThat usually fixes this issue, which is one of those \"huh?\" MS limitations like the 64k limit on Excel spreadsheets. Only this one affects the number of symbols that may appear in an assembly.\n",
"I have done this with very ... | [
15,
3,
3
] | [] | [] | [
"c++_cli",
"clr",
"compiler_construction"
] | stackoverflow_0000014843_c++_cli_clr_compiler_construction.txt |
Q:
Parameter Binding: What happens under the hood?
.NET, Java and other high level database API's in various language often provide techniques known as prepared statements and parameter binding as opposed to sending plain text commands to the Database server. What I would like to know is what happens when you execute... | Parameter Binding: What happens under the hood? | .NET, Java and other high level database API's in various language often provide techniques known as prepared statements and parameter binding as opposed to sending plain text commands to the Database server. What I would like to know is what happens when you execute a statement like this:
SqlCommand cmd = new SqlComma... | [
"The MySQL manual page on prepared statements provides lots of information (which should apply to any other RDBMS).\nBasically, your statement is parsed and processed ahead of time, and the parameters are sent separately instead of being handled along with the SQL code. This eliminates SQL-injection attacks becaus... | [
6,
0,
0
] | [] | [] | [
".net",
"api",
"c#",
"database",
"sql"
] | stackoverflow_0000014934_.net_api_c#_database_sql.txt |
Q:
What version of .Net framework ships with SQL Server 2008?
Does SQL Server 2008 ship with the .NET 3.5 CLR, so that stored procedures written in CLR can use 3.5 features?
A:
Actually it ships with .NET 3.5 SP1. So yes, the stored procs can use 3.5 features and libraries.
A:
I swear this isn't being pedantic, ... | What version of .Net framework ships with SQL Server 2008? | Does SQL Server 2008 ship with the .NET 3.5 CLR, so that stored procedures written in CLR can use 3.5 features?
| [
"Actually it ships with .NET 3.5 SP1. So yes, the stored procs can use 3.5 features and libraries.\n",
"I swear this isn't being pedantic, but is an important distinction -- I don't know what specifically you need when you say \".NET 3.5 CLR\" -- probably the .NET 3.5 Framework? Possibly C# 3.0 language feature... | [
10,
3
] | [] | [] | [
"sql_server",
"sql_server_2008"
] | stackoverflow_0000011430_sql_server_sql_server_2008.txt |
Q:
.NET 3.5 Service Pack 1 causes 404 pages on ASP.NET Web App
I have a problem with IIS 6.0 ceasing to work for an ASP.NET application after installing Service Pack 1 for .NET 3.5.
I have 2 identical virtual dedicated servers. Installing SP1 on the first had no adverse effect. Installing it on the second caused ASP.... | .NET 3.5 Service Pack 1 causes 404 pages on ASP.NET Web App | I have a problem with IIS 6.0 ceasing to work for an ASP.NET application after installing Service Pack 1 for .NET 3.5.
I have 2 identical virtual dedicated servers. Installing SP1 on the first had no adverse effect. Installing it on the second caused ASP.NET pages to start returning 404 page not found.
Static .html pag... | [
"This is broad problem, so let's start by asking some troubleshooting questions:\n\n\nBased on your description, the ASP.NET runtime is not catching your request and processing the aspx files. You may need to register the asp.net pipeline with IIS again using ASPNET_REGIIS -i.\nHave you made sure that the app_offl... | [
4,
2,
0,
0,
0
] | [
"No-one did before, so I'll point to the trivial solution:\nHave you already de-installed the Service Pack and re-installed it again (or the whole framework)?\nEdit: @Kev:\nEasy explanation: He said the update works on one machine, but not on the other. I had similar problems in the past and re-installing helped to... | [
-1
] | [
".net_3.5",
"iis",
"servicepacks"
] | stackoverflow_0000014963_.net_3.5_iis_servicepacks.txt |
Q:
.net Job Interview
I have a job interview tomorrow for a .NET shop. For the past few years I have been developing in languages other than .NET and figure it is probably a good idea to brush up on what is cool and new in the world of .NET. I've been reading about LINQ and WPF but these are more technologies than ... | .net Job Interview | I have a job interview tomorrow for a .NET shop. For the past few years I have been developing in languages other than .NET and figure it is probably a good idea to brush up on what is cool and new in the world of .NET. I've been reading about LINQ and WPF but these are more technologies than trends. What else shoul... | [
"This is completely language agnostic so you may want to skip over it, but I've based a lot of my practice and preparation for job interviews around Steve Yegge's getting a job at google post.\nI use a lot of the topics there not only as an interview preparedness guide, but also as a list of things that I SHOULD kn... | [
4,
1,
1,
1,
0
] | [] | [] | [
".net"
] | stackoverflow_0000015124_.net.txt |
Q:
How can I override an EJB 3 session bean method with a generic argument - if possible at all?
Suppose you have the following EJB 3 interfaces/classes:
public interface Repository<E>
{
public void delete(E entity);
}
public abstract class AbstractRepository<E> implements Repository<E>
{
public void delete(E... | How can I override an EJB 3 session bean method with a generic argument - if possible at all? | Suppose you have the following EJB 3 interfaces/classes:
public interface Repository<E>
{
public void delete(E entity);
}
public abstract class AbstractRepository<E> implements Repository<E>
{
public void delete(E entity){
//...
}
}
public interface FooRepository<Foo>
{
//other methods
}
@Local(Fo... | [
"I tried it with a pojo and it seems to work. I had to modify your code a bit.\nI think your interfaces were a bit off, but I'm not sure.\nI assumed \"Foo\" was a concrete type, but if not I can do some more testing for you.\nI just wrote a main method to test this.\nI hope this helps!\npublic static void main(Stri... | [
2,
1
] | [] | [] | [
"ejb_3.0",
"generics",
"inheritance",
"jakarta_ee",
"java"
] | stackoverflow_0000014801_ejb_3.0_generics_inheritance_jakarta_ee_java.txt |
Q:
Is it possible to disable command input in the toolbar search box?
In the Visual Studio toolbar, you can enter commands into the search box by prefixing them with a > symbol. Is there any way to disable this? I've never used the feature, and it's slightly annoying when trying to actually search for something that ... | Is it possible to disable command input in the toolbar search box? | In the Visual Studio toolbar, you can enter commands into the search box by prefixing them with a > symbol. Is there any way to disable this? I've never used the feature, and it's slightly annoying when trying to actually search for something that you know is prefixed by greater-than in the code. It's particularly anno... | [
"This is a really cool feature. I've poked through the feature documentation, and the accompanying command list, and not a heck of a lot is showing up in terms of turning it off.\nIf you want to search for >exit, you could always type >Edit.Find >exit in the search box; that seems to do the trick. A bit verbose, th... | [
2,
1,
0
] | [] | [] | [
"visual_studio"
] | stackoverflow_0000014760_visual_studio.txt |
Q:
What do the getUTC* methods on the date object do?
What does it mean when you get or create a date in UTC format in JavaScript?
A:
A date represents a specific point in time. This point in time will be called differently in different places. As I write this, it's 00:27 on Tuesday in Germany, 23:27 on Monday in... | What do the getUTC* methods on the date object do? | What does it mean when you get or create a date in UTC format in JavaScript?
| [
"A date represents a specific point in time. This point in time will be called differently in different places. As I write this, it's 00:27 on Tuesday in Germany, 23:27 on Monday in the UK and 18:27 on Monday in New York.\nTo take an example method: getDay returns the day of the week in the local timezone. Right... | [
14,
0,
0
] | [] | [] | [
"date",
"javascript",
"utc"
] | stackoverflow_0000015302_date_javascript_utc.txt |
Q:
Printers not available unless shared
We are using classic asp to call a C# dll and in the C# dll we are using System.Drawing.Printing.PrinterSettings.InstalledPrinters to get a list of availabe printers. If the printers are not shared they will not show up when a user trys to print. The Local System account can se... | Printers not available unless shared | We are using classic asp to call a C# dll and in the C# dll we are using System.Drawing.Printing.PrinterSettings.InstalledPrinters to get a list of availabe printers. If the printers are not shared they will not show up when a user trys to print. The Local System account can see and print to them from a VB6 dll and Adm... | [
"As I recall, running a website uses the Network User account, which may not have permission to view local printers.\nThere was a page on MSDN that said how you can impersonate another user that might have access to the printers, but I've not been able to find it.\nEdit: I posted too soon. Here's the page.\nHTH\n",... | [
4,
3
] | [] | [] | [
"asp.net",
"c#",
"printing",
"windows_server_2003"
] | stackoverflow_0000014756_asp.net_c#_printing_windows_server_2003.txt |
Q:
Sending emails without looking like spam
I want so send every week an update by email. But Im afraid that if there are too many emails sent, they will be marked as spam. Any of you has experience sending many emails (thousands) weekly? What techniques do you use?
A:
A good answer for this question would
be a r... | Sending emails without looking like spam | I want so send every week an update by email. But Im afraid that if there are too many emails sent, they will be marked as spam. Any of you has experience sending many emails (thousands) weekly? What techniques do you use?
| [
"\nA good answer for this question would\n be a real gold mine for a motivated\n spammer :)\n\nNot really -- as you'll see in that other thread, answers center on showing that you are the authorative sender of the email, and various aspects that are useless to spammers and useful to non-spammers who send a lot of... | [
2
] | [] | [] | [
"asp.net",
"email"
] | stackoverflow_0000009751_asp.net_email.txt |
Q:
Use SVN instead of CVS on SourceForge
I've just setup a new project on SourceForge and the admins set it up with CVS as the SCM, however, I want to use SVN. There is NO code in this project yet - empty directory.
How do I change this project from using CVS to SVN?
A:
It's under the options.
| Use SVN instead of CVS on SourceForge | I've just setup a new project on SourceForge and the admins set it up with CVS as the SCM, however, I want to use SVN. There is NO code in this project yet - empty directory.
How do I change this project from using CVS to SVN?
| [
"It's under the options.\n"
] | [
2
] | [] | [] | [
"cvs",
"sourceforge",
"svn"
] | stackoverflow_0000015504_cvs_sourceforge_svn.txt |
Q:
What is the best way to iterate through a strongly-typed generic List?
What is the best way to iterate through a strongly-typed generic List in C#.NET and VB.NET?
A:
For C#:
foreach(ObjectType objectItem in objectTypeList)
{
// ...do some stuff
}
Answer for VB.NET from Purple Ant:
For Each objectItem as Obj... | What is the best way to iterate through a strongly-typed generic List? | What is the best way to iterate through a strongly-typed generic List in C#.NET and VB.NET?
| [
"For C#:\nforeach(ObjectType objectItem in objectTypeList)\n{\n // ...do some stuff\n}\n\nAnswer for VB.NET from Purple Ant:\nFor Each objectItem as ObjectType in objectTypeList\n 'Do some stuff '\nNext\n\n",
"With any generic implementation of IEnumerable the best way is:\n//C#\nforeach( var item in listVa... | [
32,
21,
5,
4,
2,
2,
1
] | [] | [] | [
".net",
"c#",
"collections",
"generics",
"vb.net"
] | stackoverflow_0000015204_.net_c#_collections_generics_vb.net.txt |
Q:
How do I generate ASCII codes 2 and 3 in a Bash command line?
If I press Ctrl+B that ought to give me ASCII code 2, but Ctrl+C is going to be interpreted as a Break.
So I figure I've got to redirect a file in. How do I get these characters into a file?
A:
Ctrl-V escapes the next keystoke. That's how you can ge... | How do I generate ASCII codes 2 and 3 in a Bash command line? | If I press Ctrl+B that ought to give me ASCII code 2, but Ctrl+C is going to be interpreted as a Break.
So I figure I've got to redirect a file in. How do I get these characters into a file?
| [
"Ctrl-V escapes the next keystoke. That's how you can get a Ctrl-C out: Ctrl-V Ctrl-C\n",
"echo $'\\002\\003' > ./myfile\n\n",
"perl -e 'print \"\\xFF\"'\n\nwhere FF is the hex code of the ACSII code you want to print. So for ACSII code 2, it would be \\x02.\n\n"
] | [
10,
6,
2
] | [] | [] | [
"ascii",
"bash",
"linux",
"unix"
] | stackoverflow_0000015537_ascii_bash_linux_unix.txt |
Q:
Resharper and TortoiseSVN
Is there any good way to deal with the class renaming refactor from Resharper when the file is under source control and TortoiseSVN is the client. I have am trying VisualSVN right now but I haven't had the need to rename anything recently. I don't want to change our repository just to t... | Resharper and TortoiseSVN | Is there any good way to deal with the class renaming refactor from Resharper when the file is under source control and TortoiseSVN is the client. I have am trying VisualSVN right now but I haven't had the need to rename anything recently. I don't want to change our repository just to try this out.
Also not sure if t... | [
"TortoiseSVN 1.5 has a neat hidden feature on the check in window:\nSelect a missing file and a new file and right-click. One of the options will be \"fix move\".\nI tend to refactor away, and then use this to fix any files where the name has changed.\n",
"You should really check the Free as in Beer option of Ank... | [
12,
12,
5
] | [
"Time to branch your repository. That's the nice part about version control, you can create new branches without totaling the old ones.\n"
] | [
-1
] | [
"ankhsvn",
"resharper",
"svn",
"tortoisesvn",
"visualsvn"
] | stackoverflow_0000013745_ankhsvn_resharper_svn_tortoisesvn_visualsvn.txt |
Q:
Is there an easy way to convert C# classes to PHP?
I am used to writing C# Windows applications. However, I have some free hosted PHP webspace that I would like to make use of. I have a basic understanding of PHP but have never used its object-oriented capabilities.
Is there an easy way to convert C# classes to PH... | Is there an easy way to convert C# classes to PHP? | I am used to writing C# Windows applications. However, I have some free hosted PHP webspace that I would like to make use of. I have a basic understanding of PHP but have never used its object-oriented capabilities.
Is there an easy way to convert C# classes to PHP classes or is it just not possible to write a fully ob... | [
"PHP doesn't support enums, which might be one area of mismatch.\nAlso, watch out for collection types, PHP despite it's OO features, tends to have no alternative to over-using the array datatype. Check out the sections on the PHP manual on iterators if you would like to see beyond this.\nPublic, protected, private... | [
5,
3,
2,
0,
0
] | [] | [] | [
"c#",
"php"
] | stackoverflow_0000013647_c#_php.txt |
Q:
Design problems with .Net UserControl
I have created a UserControl that has a ListView in it. The ListView is publicly accessible though a property. When I put the UserControl in a form and try to design the ListView though the property, the ListView stays that way until I compile again and it reverts back to the ... | Design problems with .Net UserControl | I have created a UserControl that has a ListView in it. The ListView is publicly accessible though a property. When I put the UserControl in a form and try to design the ListView though the property, the ListView stays that way until I compile again and it reverts back to the default state.
How do I get my design chan... | [
"You need to decorate the ListView property with the DesignerSerializationVisibility attribute, like so:\n[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]\npublic ListView MyListView { get { return this.listView1; } }\n\nThis tells the designer's code generator to output code for it.\n",
... | [
6,
1,
0
] | [] | [] | [
".net_2.0",
"c#",
"user_controls"
] | stackoverflow_0000015716_.net_2.0_c#_user_controls.txt |
Q:
Minimize javascript HTTP calls from AjaxControlToolkit controls?
I love the ease that the ASP.NET Ajax control Toolkit provides to ASP.NET developers. However, I've not found it to be a scalable solution at all. I have a page with 2 date input fields. By putting a TextBox and an CalendarExtendar control attached t... | Minimize javascript HTTP calls from AjaxControlToolkit controls? | I love the ease that the ASP.NET Ajax control Toolkit provides to ASP.NET developers. However, I've not found it to be a scalable solution at all. I have a page with 2 date input fields. By putting a TextBox and an CalendarExtendar control attached to it for each date field, I get several (11, in fact) external Javascr... | [
"I always preferred to write my Ajax calls in javascript using JQuery or Prototype. ASP.NET Ajax Toolkit does make things easier, but it never seems to do so elegantly.\nI personally would make a new Calendar Controller. This way you can control the AJAX (using JQuery/Prototype) calls that are being made.\n",
"AS... | [
2,
0
] | [] | [] | [
"ajax",
"asp.net",
"frontend",
"javascript"
] | stackoverflow_0000015788_ajax_asp.net_frontend_javascript.txt |
Q:
SSRS - Post Publishing Tasks
As part of the publishing "best practices" I came up with my own, I tend to archive report groups and republish the "updated" reports. However, with this stratedgy, I lose users associated with each report or have to rehide reports.
Is there an automated process I can use to hide repo... | SSRS - Post Publishing Tasks | As part of the publishing "best practices" I came up with my own, I tend to archive report groups and republish the "updated" reports. However, with this stratedgy, I lose users associated with each report or have to rehide reports.
Is there an automated process I can use to hide reports or add users, after deploying ... | [
"Paul Stovell posted some examples of Reporting Services automation that might get you going.\nEDIT: The link to the Subversion repository has been updated and is now working\n"
] | [
0
] | [] | [] | [
"automation",
"reporting_services"
] | stackoverflow_0000015815_automation_reporting_services.txt |
Q:
How do you use #define?
I'm wondering about instances when it makes sent to use #define and #if statements. I've known about it for a while, but never incorporated it into my way of coding. How exactly does this affect the compilation?
Is #define the only thing that determines if the code is included when compile... | How do you use #define? | I'm wondering about instances when it makes sent to use #define and #if statements. I've known about it for a while, but never incorporated it into my way of coding. How exactly does this affect the compilation?
Is #define the only thing that determines if the code is included when compiled? If I have #define DEBUGme ... | [
"In C# #define macros, like some of Bernard's examples, are not allowed. The only common use of #define/#ifs in C# is for adding optional debug only code. For example:\n static void Main(string[] args)\n {\n#if DEBUG\n //this only compiles if in DEBUG\n Console.WriteLine(\"DEBUG\... | [
14,
8,
3,
1,
1,
1,
0,
0
] | [] | [] | [
"c#"
] | stackoverflow_0000015744_c#.txt |
Q:
Entity diagrams in ASP.NET MVC
What's the best way/tool to display nice diagrams with entity relationships in ASP MVC views?
i.e. servers and and applications, or servers with other servers.
Are there any third party tools out there that can do this?
I've been searching around things like Telerik, but it's rea... | Entity diagrams in ASP.NET MVC | What's the best way/tool to display nice diagrams with entity relationships in ASP MVC views?
i.e. servers and and applications, or servers with other servers.
Are there any third party tools out there that can do this?
I've been searching around things like Telerik, but it's really hard to google for this!
| [
"Here are some 3rd-party diagramming tools:\n\nhttp://www.nevron.com/Products.DiagramFor.NET.Overview.aspx\nhttp://www.nwoods.com/GO/dotnet.htm\nhttp://www.syncfusion.com/products/diagram/web/default.aspx\n\n"
] | [
3
] | [] | [] | [
".net_3.5",
"asp.net",
"asp.net_mvc",
"diagram",
"graphics"
] | stackoverflow_0000015900_.net_3.5_asp.net_asp.net_mvc_diagram_graphics.txt |
Q:
What is the best way to replicate a version control repository?
Here is the scenario that I have. I have a cvs repository in one location (A) and I want to replicate it and keep it in sync with a repository in another location(B). This would be a single directional sync from A to B. What is the best way to do this... | What is the best way to replicate a version control repository? | Here is the scenario that I have. I have a cvs repository in one location (A) and I want to replicate it and keep it in sync with a repository in another location(B). This would be a single directional sync from A to B. What is the best way to do this? If it is not really feasible in CVS then which source code control ... | [
"When using CVS, I don't know any tools to do that other than files syncing. You can achieve that using tools like rsync (Unix) or xcopy/robocopy (Windows).\nIf you plan on migrating to Subversion, it provides a tool called svnsync that allows to sync a repository from another one.\n",
"I would recommend you migr... | [
4,
2,
2,
0
] | [] | [] | [
"cvs",
"version_control"
] | stackoverflow_0000016097_cvs_version_control.txt |
Q:
C# Auto Clearing Winform Textbox
I have a user that want to be able to select a textbox and have the current text selected so that he doesn't have to highlight it all in order to change the contents.
The contents need to be handle when enter is pushed. That part I think I have figured out but any suggestions wo... | C# Auto Clearing Winform Textbox | I have a user that want to be able to select a textbox and have the current text selected so that he doesn't have to highlight it all in order to change the contents.
The contents need to be handle when enter is pushed. That part I think I have figured out but any suggestions would be welcome.
The part I need help ... | [
"Hook into the KeyPress event on the TextBox, and when it encounters the Enter key, run your hardware setting code, and then highlight the full text of the textbox again (see below) - Windows will take care of clearing the text with the next keystroke for you.\nTextBox1.Select(0, TextBox1.Text.Length);\n\n",
"OK,... | [
4,
1
] | [] | [] | [
"c#",
"textbox",
"winforms"
] | stackoverflow_0000016110_c#_textbox_winforms.txt |
Q:
C# Include Derived Control in Toolbox
This is in reference to my other question Auto Clearing Textbox.
If I choose to derive a new TextBox control from TextBox instead of implement a user control just containing my Textbox, how would I include that in the toolbox.
A:
Right-click the toolbox, click "Choose
Item... | C# Include Derived Control in Toolbox | This is in reference to my other question Auto Clearing Textbox.
If I choose to derive a new TextBox control from TextBox instead of implement a user control just containing my Textbox, how would I include that in the toolbox.
| [
"\nRight-click the toolbox, click \"Choose\n Items\" from the context menu, browse\n to your DLL, and select it.\n\nTo extend on Greg's answer...\nJust to clarify, you cannot add a user control to the tool box if the code for it is in the same project that you want to use it in. For some reason MS has never adde... | [
8,
0
] | [] | [] | [
"c#",
"textbox",
"visual_studio",
"winforms"
] | stackoverflow_0000016114_c#_textbox_visual_studio_winforms.txt |
Q:
LocationProvider
We need to replace the menu system in our main ASP.NET application. So naturally we're looking at the ASP.NET SiteMapProvider and Menu controls. However we also need enough security to prevent users from directly entering URLs that they shouldn't have access to. We can do this by putting <location... | LocationProvider | We need to replace the menu system in our main ASP.NET application. So naturally we're looking at the ASP.NET SiteMapProvider and Menu controls. However we also need enough security to prevent users from directly entering URLs that they shouldn't have access to. We can do this by putting <location> entries in web.confi... | [
"Why don't you create rights & profiles to manage wich pages a user can see?\nI usually create a user class which implements the IPrincipal security interface. On every request to your application, you check the rights of a particular user and output the SiteMap's nodes allowed for this user.\n"
] | [
1
] | [] | [] | [
"asp.net",
"security",
"sitemap"
] | stackoverflow_0000016003_asp.net_security_sitemap.txt |
Q:
How do I use T-SQL Group By
I know I need to have (although I don't know why) a GROUP BY clause on the end of a SQL query that uses any aggregate functions like count, sum, avg, etc:
SELECT count(userID), userName
FROM users
GROUP BY userName
When else would GROUP BY be useful, and what are the performance ramifi... | How do I use T-SQL Group By | I know I need to have (although I don't know why) a GROUP BY clause on the end of a SQL query that uses any aggregate functions like count, sum, avg, etc:
SELECT count(userID), userName
FROM users
GROUP BY userName
When else would GROUP BY be useful, and what are the performance ramifications?
| [
"To retrieve the number of widgets from each widget category that has more than 5 widgets, you could do this:\nSELECT WidgetCategory, count(*)\nFROM Widgets\nGROUP BY WidgetCategory\nHAVING count(*) > 5\n\nThe \"having\" clause is something people often forget about, instead opting to retrieve all their data to the... | [
36,
15,
4,
2,
0
] | [] | [] | [
"group_by",
"sql",
"sql_server"
] | stackoverflow_0000002702_group_by_sql_sql_server.txt |
Q:
Displaying Version Information in a Web Service
Can anyone suggest a way of getting version information into a Web Service? (VB.NET)
I would like to dynamically use the assembly version in the title or description, but the attributes require constants.
Is manually writing the version info as a string the only way... | Displaying Version Information in a Web Service | Can anyone suggest a way of getting version information into a Web Service? (VB.NET)
I would like to dynamically use the assembly version in the title or description, but the attributes require constants.
Is manually writing the version info as a string the only way of displaying the information on the .asmx page?
| [
"You need to pick a type in your assembly and then do the following:\ntypeof(Some.Object.In.My.Assembly).Assembly.GetName().Version;\n\n",
"via reflection you can get the Assembly object which contains the assembly version.\n",
"Yeah, attributes cannot have anything but constants in them, so you cannot use refl... | [
0,
0,
0
] | [] | [] | [
"vb.net",
"versions",
"web_services"
] | stackoverflow_0000016209_vb.net_versions_web_services.txt |
Q:
Load an XmlNodeList into an XmlDocument without looping?
I originally asked this question on RefactorMyCode, but got no responses there...
Basically I'm just try to load an XmlNodeList into an XmlDocument and I was wondering if there's a more efficient method than looping.
Private Function GetPreviousMonthsXml(By... | Load an XmlNodeList into an XmlDocument without looping? | I originally asked this question on RefactorMyCode, but got no responses there...
Basically I'm just try to load an XmlNodeList into an XmlDocument and I was wondering if there's a more efficient method than looping.
Private Function GetPreviousMonthsXml(ByVal months As Integer, ByVal startDate As Date, ByVal xDoc As ... | [
"Dim returnXDoc As New XmlDocument(xDoc.NameTable)\nreturnXDoc = xDoc.Clone()\n\nThe first line here is redundant - you are creating an instance of an XmlDocument, then reassigning the variable:\nDim returnXDoc As XmlDocument = xDoc.Clone()\n\nThis does the same.\nSeeing as you appear to be inserting each XmlNode f... | [
2
] | [] | [] | [
"vb.net",
"xml",
"xmldocument",
"xmlnode",
"xmlnodelist"
] | stackoverflow_0000012709_vb.net_xml_xmldocument_xmlnode_xmlnodelist.txt |
Q:
Why are my auto-run applications acting weird on Vista?
The product we are working on allows the user to easily set it up to run automatically whenever the computer is started. This is helpful because the product is part of the basic work environment of most of our users.
This feature was implemented not so long a... | Why are my auto-run applications acting weird on Vista? | The product we are working on allows the user to easily set it up to run automatically whenever the computer is started. This is helpful because the product is part of the basic work environment of most of our users.
This feature was implemented not so long ago and for a while all was well, but when we started testing ... | [
"This is the effect of a new feature in Vista called \"Boxing\":\nWindows has several mechanisms that allow the user/admin to set up applications to automatically run when windows starts. This feature is mostly used for one of these purposes:\n1. Programs that are part of the basic work environment of the user, suc... | [
6,
0
] | [] | [] | [
"virtual_pc",
"windows_vista"
] | stackoverflow_0000015805_virtual_pc_windows_vista.txt |
Q:
How to get only directory name from SaveFileDialog.FileName
What would be the easiest way to separate the directory name from the file name when dealing with SaveFileDialog.FileName in C#?
A:
Use:
System.IO.Path.GetDirectoryName(saveDialog.FileName)
(and the corresponding System.IO.Path.GetFileName). The Path c... | How to get only directory name from SaveFileDialog.FileName | What would be the easiest way to separate the directory name from the file name when dealing with SaveFileDialog.FileName in C#?
| [
"Use:\nSystem.IO.Path.GetDirectoryName(saveDialog.FileName)\n\n(and the corresponding System.IO.Path.GetFileName). The Path class is really rather useful.\n",
"You could construct a FileInfo object. It has a Name, FullName, and DirectoryName property.\nvar file = new FileInfo(saveFileDialog.FileName);\nConsole.W... | [
15,
2,
1,
0
] | [] | [] | [
"c#",
"parsing",
"string"
] | stackoverflow_0000016306_c#_parsing_string.txt |
Q:
Runtime Configuration in .Net (specifically the EntLib)
I'm looking for a way to configure a DB connection at runtime; specifically using the Enterprise Library. I see that there's a *.Data.Configuration (or something close to this ... don't recall off the top of my head) assembly but am finding not much on the i... | Runtime Configuration in .Net (specifically the EntLib) | I'm looking for a way to configure a DB connection at runtime; specifically using the Enterprise Library. I see that there's a *.Data.Configuration (or something close to this ... don't recall off the top of my head) assembly but am finding not much on the interwebs. Complicating matters is the fact that the API help... | [
"If you're using a winforms app you could try using UserProperties to store this info. Another possible solution could be custom configuration sections.\n",
"If you don't want it saved, you do not need to execute the cfg.Save command. \nThe Configuration object will store your changes until it isn't needed anymor... | [
1,
0,
0
] | [] | [] | [
".net",
"connection_string",
"enterprise_library"
] | stackoverflow_0000015700_.net_connection_string_enterprise_library.txt |
Q:
How to insert/replace XML tag in XmlDocument?
I have a XmlDocument in java, created with the Weblogic XmlDocument parser.
I want to replace the content of a tag in this XMLDocument with my own data, or insert the tag if it isn't there.
<customdata>
<tag1 />
<tag2>mfkdslmlfkm</tag2>
<location />
<tag3 /... | How to insert/replace XML tag in XmlDocument? | I have a XmlDocument in java, created with the Weblogic XmlDocument parser.
I want to replace the content of a tag in this XMLDocument with my own data, or insert the tag if it isn't there.
<customdata>
<tag1 />
<tag2>mfkdslmlfkm</tag2>
<location />
<tag3 />
</customdata>
For example I want to insert a URL... | [
"How about an XPath based approach? I like this approach as the logic is super-easy to understand. The code is pretty much self-documenting.\nIf your xml document is available to you as an org.w3c.dom.Document object (as most parsers return), then you could do something like the following:\n// get the list of custo... | [
5,
2,
1,
0
] | [] | [] | [
"java",
"xml",
"xquery"
] | stackoverflow_0000015899_java_xml_xquery.txt |
Q:
How do you use a variable in xsl when trying to select a node?
I would have thought this would be an easy one to Google, but I've been unsucessful.
I want to assign a variable the value out of an attribute (easy so far) then use that variable to select another node based on the value of that attribute.
Example:
<x... | How do you use a variable in xsl when trying to select a node? | I would have thought this would be an easy one to Google, but I've been unsucessful.
I want to assign a variable the value out of an attribute (easy so far) then use that variable to select another node based on the value of that attribute.
Example:
<xsl:variable name="myId" select="@id" />
<xsl value-of select="//Root... | [
"Ok, I finally figured it out. Silly problem really, I simply needed to leave out the quotes and the braces. One of those times when I thought that I'd already tried that. :D Oh, and I mistyped @myId in the first example, the code was actually $myId.\n<xsl:variable name=\"myId\" select=\"@id\" />\n<xsl value-of... | [
17,
5
] | [] | [] | [
"xslt"
] | stackoverflow_0000005374_xslt.txt |
Q:
Making one interface overwrite a method it inherits from another interface in PHP
Is there a way in PHP to overwrite a method declared by one interface in an interface extending that interface?
The Example:
I'm probably doing something wrong, but here is what I have:
interface iVendor{
public function __constr... | Making one interface overwrite a method it inherits from another interface in PHP | Is there a way in PHP to overwrite a method declared by one interface in an interface extending that interface?
The Example:
I'm probably doing something wrong, but here is what I have:
interface iVendor{
public function __construct($vendors_no = null);
public function getName();
public function getVendors_... | [
"@cmcculloh Yeah, in Java you don't define constructors in Interfaces. This allows you to both extend interfaces and also have a class that implements multiple interfaces (both allowed, and very useful in many cases) without worrying about having to satisfy a particular constructor.\nEDIT:\nHere's my new model:\nA... | [
6,
0
] | [] | [] | [
"extends",
"interface",
"oop",
"php"
] | stackoverflow_0000016155_extends_interface_oop_php.txt |
Q:
Easy installation method for windows/ Batch Reference needed?
I have a bunch of files that I need to be able to transport and install quickly. My current method for doing so is moving a flash drive with a readme file of where stuff goes whenever I need to move stuff, which is rather inelegant and cumbersome.
My id... | Easy installation method for windows/ Batch Reference needed? | I have a bunch of files that I need to be able to transport and install quickly. My current method for doing so is moving a flash drive with a readme file of where stuff goes whenever I need to move stuff, which is rather inelegant and cumbersome.
My idea for a solution would be to write up a quick script to move files... | [
"Sounds like robocopy tool is exactly what you need.\nVery powerful replication command-line tool.\n\nMS TechNet reference,\nWikipedia article about robocopy,\nFull command switch guide,\nBatch scripting guide.\n\n",
"I like to use VBscript for this kind of thing. The VBS engine is on every recent windows machin... | [
2,
0
] | [] | [] | [
"batch_file",
"installation",
"windows"
] | stackoverflow_0000016402_batch_file_installation_windows.txt |
Q:
Select Query on 2 tables, on different database servers
I am trying to generate a report by querying 2 databases (Sybase) in classic ASP.
I have created 2 connection strings:
connA for databaseA
connB for databaseB
Both databases are present on the same server (don't know if this matters)
Queries:
q1 = SELECT co... | Select Query on 2 tables, on different database servers | I am trying to generate a report by querying 2 databases (Sybase) in classic ASP.
I have created 2 connection strings:
connA for databaseA
connB for databaseB
Both databases are present on the same server (don't know if this matters)
Queries:
q1 = SELECT column1 INTO #temp FROM databaseA..table1 WHERE xyz="A"
q2 = SE... | [
"your temp table is out of scope, it is only 'alive' during the first connection and will not be available in the 2nd connection\nJust move all of it in one block of code and execute it inside one conection\n",
"With both queries, it looks like you are trying to insert into #temp. #temp is located on one of the d... | [
4,
4,
2
] | [] | [] | [
"asp_classic",
"sql",
"sybase",
"vbscript"
] | stackoverflow_0000016447_asp_classic_sql_sybase_vbscript.txt |
Q:
Removing N items from a list conditionally
I was writing some ASP.NET control when I came to the scenario where I needed to remove items from a list, only when they matched a certain condition.
The RemoveAll method of the generic List class does a good job, but removes all items that match the condition, specified... | Removing N items from a list conditionally | I was writing some ASP.NET control when I came to the scenario where I needed to remove items from a list, only when they matched a certain condition.
The RemoveAll method of the generic List class does a good job, but removes all items that match the condition, specified by the predicate.
What if I want to only remove... | [
"If you want to specify both a limit for number of items to remove and a condition to select the items to remove, you can use this approach:\nint limit = 30; // Suppose you want to remove 30 items at most\nlist.RemoveAll(item => ShouldIRemoveThis(item) && limit-- > 0);\n\n",
"@buyutec\nInstead of\nlist.RemoveAll(... | [
8,
5,
1,
1,
0,
0
] | [] | [] | [
".net"
] | stackoverflow_0000016460_.net.txt |
Q:
Can using lambdas as event handlers cause a memory leak?
Say we have the following method:
private MyObject foo = new MyObject();
// and later in the class
public void PotentialMemoryLeaker(){
int firedCount = 0;
foo.AnEvent += (o,e) => { firedCount++;Console.Write(firedCount);};
foo.MethodThatFiresAnEvent... | Can using lambdas as event handlers cause a memory leak? | Say we have the following method:
private MyObject foo = new MyObject();
// and later in the class
public void PotentialMemoryLeaker(){
int firedCount = 0;
foo.AnEvent += (o,e) => { firedCount++;Console.Write(firedCount);};
foo.MethodThatFiresAnEvent();
}
If the class with this method is instantiated and the P... | [
"Yes, save it to a variable and unhook it.\nDelegateType evt = (o, e) => { firedCount++; Console.Write(firedCount); };\nfoo.AnEvent += evt;\nfoo.MethodThatFiresAnEvent();\nfoo.AnEvent -= evt;\n\nAnd yes, if you don't, you'll leak memory, as you'll hook up a new delegate object each time. You'll also notice this bec... | [
16,
4,
3,
2,
0
] | [] | [] | [
"event_handling",
"lambda",
"memory_leaks"
] | stackoverflow_0000016473_event_handling_lambda_memory_leaks.txt |
Q:
Image size for BannerBitmap property in Windows Installer
I'm working on a quick setup program in Visual Studio and wanted to change the banner bitmap. Anyone know off-hand what the ideal (or the required) dimensions are for the new banner image? Thanks.
A:
Found it on MSDN docs for BannerBitmap Property:
For b... | Image size for BannerBitmap property in Windows Installer | I'm working on a quick setup program in Visual Studio and wanted to change the banner bitmap. Anyone know off-hand what the ideal (or the required) dimensions are for the new banner image? Thanks.
| [
"Found it on MSDN docs for BannerBitmap Property:\n\nFor best results, you should use a bitmap with dimensions of 500 pixels wide by 70 pixels high.\n\n"
] | [
76
] | [] | [] | [
"windows_installer"
] | stackoverflow_0000016517_windows_installer.txt |
Q:
Convince Firefox to send an If-Modified-Since header over HTTPS
How can I convince Firefox (3.0.1, if it matters) to send an If-Modified-Since header in an HTTPS request? It sends the header if the request uses plain HTTP and my server dutifully honors it. But when I request the same resource from the same serve... | Convince Firefox to send an If-Modified-Since header over HTTPS | How can I convince Firefox (3.0.1, if it matters) to send an If-Modified-Since header in an HTTPS request? It sends the header if the request uses plain HTTP and my server dutifully honors it. But when I request the same resource from the same server using HTTPS instead (i.e., simply changing the http:// in the URL t... | [
"\nHTTPS requests are not cached so sending an If-Modified-Since doesn't make any sense. The not caching is a security precaution.\n\nThe not caching on disk is a security pre-caution, but it seems it indeed affects the If-Modified-Since behavior (glancing over the code).\nTry setting the Firefox preference (in abo... | [
14,
2
] | [] | [] | [
"firefox",
"https"
] | stackoverflow_0000016483_firefox_https.txt |
Q:
Communication between Javascript and the server
I've been developing a "Form Builder" in Javascript, and coming up to the part where I'll be sending the spec for the form back to the server to be stored. The builder maintains an internal data structure that represents the fields, label, options (for select/checkbo... | Communication between Javascript and the server | I've been developing a "Form Builder" in Javascript, and coming up to the part where I'll be sending the spec for the form back to the server to be stored. The builder maintains an internal data structure that represents the fields, label, options (for select/checkbox/radio), mandatory status, and the general sorting o... | [
"When making and processing requests with JavaScript, I live and breath JSON. It's easy to build on the client side and there are tons of parsers for the server side, so both ends get to use their native tongue as much as possible. \n",
"This seems like a perfect scenario for using JSON as a serialization format... | [
5,
3,
1,
0,
0
] | [] | [] | [
"javascript",
"server"
] | stackoverflow_0000016529_javascript_server.txt |
Q:
ArgumentNullException for Integer
In .NET, is it more appropriate to throw an argument null exception for an Integer if the value is Integer.MinValue or Integer = 0 (assuming that 0 is not a valid value)?
A:
Throwing an ArgumentNullException isn't appropriate unless the argument is actually null. Throw an Argume... | ArgumentNullException for Integer | In .NET, is it more appropriate to throw an argument null exception for an Integer if the value is Integer.MinValue or Integer = 0 (assuming that 0 is not a valid value)?
| [
"Throwing an ArgumentNullException isn't appropriate unless the argument is actually null. Throw an ArgumentOutOfRangeException instead (preferably with a message informing the user what values of int are actually acceptable).\n\nArgumentOutOfRangeException is thrown when a method is invoked and at least one of the... | [
8,
2,
0
] | [] | [] | [
".net"
] | stackoverflow_0000016616_.net.txt |
Q:
ICE Faces fileInput file path and file name properties
I'd like to utilize an ICE Faces fileInput control to fill in the file path & file name for the input to an input field on a web page based on file that the user selects. How can I capture these properties without actually performing any file transfer operatio... | ICE Faces fileInput file path and file name properties | I'd like to utilize an ICE Faces fileInput control to fill in the file path & file name for the input to an input field on a web page based on file that the user selects. How can I capture these properties without actually performing any file transfer operations?
| [
"I believe that the real answer is that you can't. The file path won't be sent by the browser for security reasons. The file name will be sent, however I don't believe it gets sent without an actual upload.\nThe closest you could come, afaik, would be to forcibly kill the connection just when the upload starts. ... | [
0
] | [] | [] | [
"ajax",
"icefaces",
"java",
"jsf"
] | stackoverflow_0000009361_ajax_icefaces_java_jsf.txt |
Q:
GUI system development resources?
Could someone recommend any good resources for creating Graphics User Interfaces, preferably in C/C++?
Currently my biggest influence is 3DBuzz.com's C++/OpenGL VTMs (Video Training Modules). While they are very good, they cover a large area of graphics programming, so only skim t... | GUI system development resources? | Could someone recommend any good resources for creating Graphics User Interfaces, preferably in C/C++?
Currently my biggest influence is 3DBuzz.com's C++/OpenGL VTMs (Video Training Modules). While they are very good, they cover a large area of graphics programming, so only skim the surface of GUI programming.
This que... | [
"I wouldn't use OpenGL for the GUI unless you are planning for hardware accelerated and/or 3D effects that you don't think you would get with a more traditional GUI toolkit (e.g Qt, wxWidgets, GTK, etc). If you just need a quick simple GUI for hosting your OpenGL graphics then FLTK is a nice choice. Otherwise, for ... | [
2,
1,
1,
1,
1,
1,
0,
0,
0
] | [] | [] | [
"c++",
"playstation_portable",
"user_interface"
] | stackoverflow_0000013607_c++_playstation_portable_user_interface.txt |
Q:
Office VSTO Word 2003 project keeps trying to autoconvert to 2007
I am working on a Office Word add-in for Word 2003. When I reopen the project, the VS2008 auto covert dialog box opens and tries to convert it to the Word 2007 format.
How can I reopen this file and keep it in the Word 2003 format?
A:
Got a answer... | Office VSTO Word 2003 project keeps trying to autoconvert to 2007 | I am working on a Office Word add-in for Word 2003. When I reopen the project, the VS2008 auto covert dialog box opens and tries to convert it to the Word 2007 format.
How can I reopen this file and keep it in the Word 2003 format?
| [
"Got a answer over at MSDN Forums\n\nThis is the default behavior when you have Office 2007 installed on your\n development computer. You can modify\n this behavior under Tools->Options.\n For more informaiton, see the\n following threads:\nhttp://forums.microsoft.com/Forums/ShowPost.aspx?PostID=3762143&SiteID=... | [
3
] | [] | [] | [
"c#",
"ms_word",
"visual_studio",
"vsto"
] | stackoverflow_0000015102_c#_ms_word_visual_studio_vsto.txt |
Q:
How to intercept and cancel auto play from an application?
I am developing an application to install a large number of data files from multiple DVDs. The application will prompt the user to insert the next disk, however Windows will automatically try to open that disk either in an explorer window or ask the user ... | How to intercept and cancel auto play from an application? | I am developing an application to install a large number of data files from multiple DVDs. The application will prompt the user to insert the next disk, however Windows will automatically try to open that disk either in an explorer window or ask the user what to do with the new disk.
How can I intercept and cancel aut... | [
"There are two approaches that I know of. The first and simplest is to register the special Windows message \"QueryCancelAutoPlay\" and simply return 1 when the message is handled. This only works for the current window, and not a background application.\nThe second approach requires inserting an object that impl... | [
3,
0
] | [] | [] | [
"disk",
"windows"
] | stackoverflow_0000011734_disk_windows.txt |
Q:
Validation Patterns for Custom XML Documents
I have a web application that generates a medium sized XML dataset to be consumed by a third party.
I thought it would be a good idea to provide some form of schema document for the XML that I generate so I pasted the XML into Visual Studio and got it to generate an XSD... | Validation Patterns for Custom XML Documents | I have a web application that generates a medium sized XML dataset to be consumed by a third party.
I thought it would be a good idea to provide some form of schema document for the XML that I generate so I pasted the XML into Visual Studio and got it to generate an XSD.
The annoying thing is that my XML doesn't valida... | [
"Whether you choose XSD and/or Schematron depends on what you are trying to validate. XSD is probably the most common validation strategy, but there are limits on what it can validate. If all you want to do is ensure that the right type of data is in each field, XSD should work for you. If you need to assert, for e... | [
5,
0
] | [] | [] | [
"c#",
"schema",
"visual_studio",
"xml"
] | stackoverflow_0000016611_c#_schema_visual_studio_xml.txt |
Q:
Problem databinding an ASP.Net AJAX toolkit MaskedEditExtender
I have a database that contains a date and we are using the MaskedEditExtender (MEE) and MaskedEditValidator to make sure the dates are appropriate. However, we want the Admins to be able to go in and change the data (specifically the date) if necessa... | Problem databinding an ASP.Net AJAX toolkit MaskedEditExtender | I have a database that contains a date and we are using the MaskedEditExtender (MEE) and MaskedEditValidator to make sure the dates are appropriate. However, we want the Admins to be able to go in and change the data (specifically the date) if necessary.
How can I have the MEE field pre-populate with the database va... | [
"We found out this morning why our code was mishandling the extender. Since the db was handling the date as a date/time it was returning the date in this format 99/99/9999 99:99:99 but we had the extender mask looking for this format 99/99/9999 99:99 \nMask=\"99/99/9999 99:99:99\"\nthe above code fixed the problem... | [
1,
0
] | [] | [] | [
"asp.net",
"asp.net_ajax",
"validation"
] | stackoverflow_0000012225_asp.net_asp.net_ajax_validation.txt |
Q:
Best way to implement a dirty flag in EF
You can easily use the PropertyChanges events to set the flag. But how do you easily reset it after a save to the ObjectContext?
A:
what about the ObjectContext.SavingChanges event? See also http://www.thedatafarm.com/blog/2008/07/13/OverridingObjectContextSaveChanges.asp... | Best way to implement a dirty flag in EF | You can easily use the PropertyChanges events to set the flag. But how do you easily reset it after a save to the ObjectContext?
| [
"what about the ObjectContext.SavingChanges event? See also http://www.thedatafarm.com/blog/2008/07/13/OverridingObjectContextSaveChanges.aspx.\n",
"The above method calls for using the SavingChanges event which is called before the changes are persisted. If there is an error during the save, you have already cl... | [
1,
1
] | [] | [] | [
"entity",
"frameworks"
] | stackoverflow_0000016406_entity_frameworks.txt |
Q:
Internationalization in SSRS
What's the best way to handle translations for stock text in a SSRS. For instance - if I have a report that shows a grid of contents what's the best way to have the correct translation for the header of that grid show up, assuming the culture of the report is set correctly.
Put another... | Internationalization in SSRS | What's the best way to handle translations for stock text in a SSRS. For instance - if I have a report that shows a grid of contents what's the best way to have the correct translation for the header of that grid show up, assuming the culture of the report is set correctly.
Put another way - is it possible to do resour... | [
"AS far as I know, there is no way to localize a report (meaning automating the translation of string litterals)...\nLike you said,you basically have to use the User!Language global variable to catch the user's settings and then use that to retrieve the appropriate strings from the DB...\nHowever, you can adapt the... | [
5
] | [] | [] | [
"internationalization",
"reporting_services"
] | stackoverflow_0000016660_internationalization_reporting_services.txt |
Q:
How do you handle white space in your HTML
One of my biggest typographical frustrations about HTML is the way that it mangles conjoined whitespace. For example if I have:
<span>Following punctuation rules. With two spaces after the period. </span>
One of the two spaces following the period will be considered t... | How do you handle white space in your HTML | One of my biggest typographical frustrations about HTML is the way that it mangles conjoined whitespace. For example if I have:
<span>Following punctuation rules. With two spaces after the period. </span>
One of the two spaces following the period will be considered to be insignificant whitespace and be removed. I... | [
"If you really want your white space to be preserved, try the css property: white-space: pre;\nOr, you could just use a <pre> tag in your markup.\nBy the way, it's a good thing that HTML browsers ignore white space in general, it allows us to have clearly formatted source code, without affecting the output.\n",
"... | [
7,
6,
2,
1,
1,
0,
0,
0
] | [] | [] | [
"html",
"whitespace"
] | stackoverflow_0000016403_html_whitespace.txt |
Q:
How do you use back-references to PCREs in PHP?
I read this PHP RegEx page, but either I'm missing something, misreading something, or it doesn't work the way they say. I'm guessing it's one of the first two.
$str = preg_replace("([|]\d*)", "\1;", $str);
A:
Your regular expression should follow Perl syntax, mean... | How do you use back-references to PCREs in PHP? | I read this PHP RegEx page, but either I'm missing something, misreading something, or it doesn't work the way they say. I'm guessing it's one of the first two.
$str = preg_replace("([|]\d*)", "\1;", $str);
| [
"Your regular expression should follow Perl syntax, meaning it has to start and end with the same character (with some exceptions). Also, the back reference should start with a double slash, to get around PHPs double escaping. This should work (with a quick test):\n$str = \"asdfasdf |123123 asdf iakds |302 asdf |11... | [
4
] | [] | [] | [
"php",
"regex"
] | stackoverflow_0000016759_php_regex.txt |
Q:
Choosing a multiplier for a (string) hash function
Do you have any advice/rules on selecting a multiplier to use in a (multiplicative) hash function. The function is computing the hash value of a string.
A:
You want to use something that is relatively prime to the size of your set. That way, when you loop around... | Choosing a multiplier for a (string) hash function | Do you have any advice/rules on selecting a multiplier to use in a (multiplicative) hash function. The function is computing the hash value of a string.
| [
"You want to use something that is relatively prime to the size of your set. That way, when you loop around, you won't end up on the same numbers you just tried.\n",
"I had an interesting discussion with a coworker about hash function recently. Our conclusions were as follows:\nIf you really need to write a good... | [
3,
2,
1
] | [] | [] | [
"algorithm",
"performance"
] | stackoverflow_0000016873_algorithm_performance.txt |
Q:
.Net drawing clipping bug
GDI+ DrawLines function has a clipping bug that can be reproduced by running the following c# code. When running the code, two line paths appear, that should be identical, because both of them are inside the clipping region. But when the clipping region is set, one of the line segment is... | .Net drawing clipping bug | GDI+ DrawLines function has a clipping bug that can be reproduced by running the following c# code. When running the code, two line paths appear, that should be identical, because both of them are inside the clipping region. But when the clipping region is set, one of the line segment is not drawn.
protected override... | [
"It appears that this is a known bug...\nThe following code appears to function as you requested:\nprotected override void OnPaint(PaintEventArgs e)\n {\n PointF[] points = new PointF[] { new PointF(73.36f, 196), \n new PointF(75.44f, 32), \n new PointF(77.52f, 32), \n new PointF(7... | [
3,
0,
0
] | [] | [] | [
"gdi+",
"graphics",
"system.drawing",
"winforms"
] | stackoverflow_0000015478_gdi+_graphics_system.drawing_winforms.txt |
Q:
Overriding the equals method vs creating a new method
I have always thought that the .equals() method in java should be overridden to be made specific to the class you have created. In other words to look for equivalence of two different instances rather than two references to the same instance. However I have enc... | Overriding the equals method vs creating a new method | I have always thought that the .equals() method in java should be overridden to be made specific to the class you have created. In other words to look for equivalence of two different instances rather than two references to the same instance. However I have encountered other programmers who seem to think that the defau... | [
"Overriding the equals method is necessary if you want to test equivalence in standard library classes (for example, ensuring a java.util.Set contains unique elements or using objects as keys in java.util.Map objects).\nNote, if you override equals, ensure you honour the API contract as described in the documentati... | [
19,
8,
4,
2,
0,
0,
0
] | [] | [] | [
"java",
"oop"
] | stackoverflow_0000016557_java_oop.txt |
Q:
Only accepting certain ajax requests from authenticated users
What's the best practice for making sure that certain ajax calls to certain pages are only accepted from authenticated users?
For example:
Let's say that I have a main page called blog.php (I know, creativity abounds). Let's also say that there is a pa... | Only accepting certain ajax requests from authenticated users | What's the best practice for making sure that certain ajax calls to certain pages are only accepted from authenticated users?
For example:
Let's say that I have a main page called blog.php (I know, creativity abounds). Let's also say that there is a page called delete.php which looks for the parameter post_id and then... | [
"You were correct in trying to use session variables. Once your user authenticates, you should store that information in their session so that each subsequent page view will see that. Make sure you are calling session_start() on both pages (blog.php and delete.php) before accessing $_SESSION. Also make sure you ... | [
7,
2
] | [] | [] | [
"ajax",
"authentication",
"php"
] | stackoverflow_0000015366_ajax_authentication_php.txt |
Q:
Difference between a byte array and MemoryStream
I am reading a binary file into a parsing program. I will need to iterate through the file and look for certain markers so I can split the file up and pass those parts into their respective object’s constructors.
Is there an advantage to holding the file as a strea... | Difference between a byte array and MemoryStream | I am reading a binary file into a parsing program. I will need to iterate through the file and look for certain markers so I can split the file up and pass those parts into their respective object’s constructors.
Is there an advantage to holding the file as a stream, either MemoryStream or FileStream, or should it be ... | [
"A byte[] or MemoryStream will both require bringing the entire file into memory. A MemoryStream is really a wrapper around an underlying byte array. The best approach is to have two FileStream (one for input and one for output). Read from the input stream looking for the pattern used to indicate the file should be... | [
27,
11
] | [] | [] | [
"comparison",
"performance"
] | stackoverflow_0000016939_comparison_performance.txt |
Q:
Google Maps API - Problems with class GLatLngBounds
I am having some trouble with the Google Maps API. I have an array which holds a ojbect I created to store points.
My array and class:
var tPoints = [];
function tPoint(name) {
var id = name;
var points = [];
var pointsCount = 0;
... | Google Maps API - Problems with class GLatLngBounds | I am having some trouble with the Google Maps API. I have an array which holds a ojbect I created to store points.
My array and class:
var tPoints = [];
function tPoint(name) {
var id = name;
var points = [];
var pointsCount = 0;
...
this.getHeadPoint = function() { return po... | [
"The google maps sample is using this code...\nvar bounds = map.getBounds();\nvar southWest = bounds.getSouthWest();\nvar northEast = bounds.getNorthEast();\nvar lngSpan = northEast.lng() - southWest.lng();\nvar latSpan = northEast.lat() - southWest.lat();\n\n...which is putting the SouthWest/NorthEast bounds into ... | [
1,
1
] | [] | [] | [
"google_maps",
"javascript"
] | stackoverflow_0000016638_google_maps_javascript.txt |
Q:
Can placement new for arrays be used in a portable way?
Is it possible to actually make use of placement new in portable code when using it for arrays?
It appears that the pointer you get back from new[] is not always the same as the address you pass in (5.3.4, note 12 in the standard seems to confirm that this is... | Can placement new for arrays be used in a portable way? | Is it possible to actually make use of placement new in portable code when using it for arrays?
It appears that the pointer you get back from new[] is not always the same as the address you pass in (5.3.4, note 12 in the standard seems to confirm that this is correct), but I don't see how you can allocate a buffer for ... | [
"Personally I'd go with the option of not using placement new on the array and instead use placement new on each item in the array individually. For example:\nint main(int argc, char* argv[])\n{\n const int NUMELEMENTS=20;\n\n char *pBuffer = new char[NUMELEMENTS*sizeof(A)];\n A *pA = (A*)pBuffer;\n\n for(int i... | [
34,
5,
4,
3,
3,
2,
1
] | [] | [] | [
"arrays",
"c++",
"compiler_construction",
"overhead",
"portability"
] | stackoverflow_0000015254_arrays_c++_compiler_construction_overhead_portability.txt |
Q:
How do I reset an increment identity's starting value in SQL Server
I would like to have a nice template for doing this in development. How do I reset an increment identity's starting value in SQL Server?
A:
DBCC CHECKIDENT('TableName', RESEED, 0)
A:
Just a word of warning with:
DBCC CHECKIDENT (MyTable, RESEE... | How do I reset an increment identity's starting value in SQL Server | I would like to have a nice template for doing this in development. How do I reset an increment identity's starting value in SQL Server?
| [
"DBCC CHECKIDENT('TableName', RESEED, 0)\n\n",
"Just a word of warning with:\nDBCC CHECKIDENT (MyTable, RESEED, 0)\nIf you did not truncate the table, and the identity column is the PK, you will get an error when reaching pre-existing identites.\nFor example, you have identities (3,4,5) in the table already. You... | [
127,
34,
17
] | [] | [] | [
"identity",
"sql_server"
] | stackoverflow_0000016971_identity_sql_server.txt |
Q:
What is the best way to rename (move) file system branches in .NET?
I would like to rename files and folders recursively by applying a string replacement operation.
E.g. The word "shark" in files and folders should be replaced by the word "orca".
C:\Program Files\Shark Tools\Wire Shark\Sharky 10\Shark.exe
should ... | What is the best way to rename (move) file system branches in .NET? | I would like to rename files and folders recursively by applying a string replacement operation.
E.g. The word "shark" in files and folders should be replaced by the word "orca".
C:\Program Files\Shark Tools\Wire Shark\Sharky 10\Shark.exe
should be moved to:
C:\Program Files\Orca Tools\Wire Orca\Orcay 10\Orca.exe
The ... | [
"So you would use recursion. Here is a powershell example that should be easy to convert to C#:\nfunction Move-Stuff($folder)\n{\n foreach($sub in [System.IO.Directory]::GetDirectories($folder))\n {\n Move-Stuff $sub\n }\n $new = $folder.Replace(\"Shark\", \"Orca\")\n if(!(Test-Path($new)))\... | [
1,
0
] | [] | [] | [
"directory",
"file",
"system.io.fileinfo"
] | stackoverflow_0000016945_directory_file_system.io.fileinfo.txt |
Q:
SSRS - Uninstall Trial Version of VS Business Intelligence
I want to know how to fully uninstall MSSQL 2005.
I've been using the Trial version of SQL Server Reporting Services for a while now. My company finally purchased the software from an online distributor, and for support of Oracle, we needed to upgrade t... | SSRS - Uninstall Trial Version of VS Business Intelligence | I want to know how to fully uninstall MSSQL 2005.
I've been using the Trial version of SQL Server Reporting Services for a while now. My company finally purchased the software from an online distributor, and for support of Oracle, we needed to upgrade to MSSQL 2005 SP2. Anyway, the "full" version of the software w... | [
"@Mark Struzinski\nI actually discovered that it was a problem with the installer, when installing the \"Full Version\". I discovered, since the product was downloaded, instead of delivered on CD/DVD, that the installer was looking for information in a path that was not correct. There was a MS Knowledge Base a... | [
1,
0
] | [] | [] | [
"reporting_services",
"sql_server",
"visual_studio"
] | stackoverflow_0000015632_reporting_services_sql_server_visual_studio.txt |
Q:
Accessing html parameter in PHP
I'm trying to do a simple test php script for sessions. Basically it increments a counter (stored in $_SESSION) every time you refresh that page. That works, but I'm trying to have a link to destroy the session which reloads the page with the ?destroy=1 parameter. I've tried a coupl... | Accessing html parameter in PHP | I'm trying to do a simple test php script for sessions. Basically it increments a counter (stored in $_SESSION) every time you refresh that page. That works, but I'm trying to have a link to destroy the session which reloads the page with the ?destroy=1 parameter. I've tried a couple of if statements to see if that par... | [
"I think you put\n$_POST['destroy']\n\nInstead of\n$_GET['destroy']\n\nYou need to use a form if you'd like to use a $_POST variable. $_GET variables are stored in the URL.\n",
"By the way you can use \n\n$_REQUEST['destroy'] \n\nwhich would work regardless if the data is passed in a POST or a GET request.\n",
... | [
7,
4,
2,
1,
0
] | [] | [] | [
"php",
"session"
] | stackoverflow_0000016815_php_session.txt |
Q:
Simplest way to make a Google Map mashup?
Given a list of locations such as
<td>El Cerrito, CA</td>
<td>Corvallis, OR</td>
<td>Morganton, NC</td>
<td>New York, NY</td>
<td>San Diego, CA</td>
What's the easiest way to generate a Google Map with pushpins for each location?
A:
I'm assuming you ... | Simplest way to make a Google Map mashup? | Given a list of locations such as
<td>El Cerrito, CA</td>
<td>Corvallis, OR</td>
<td>Morganton, NC</td>
<td>New York, NY</td>
<td>San Diego, CA</td>
What's the easiest way to generate a Google Map with pushpins for each location?
| [
"I'm assuming you have the basics for Maps in your code already with your API Key.\n<head>\n <script \n type=\"text/javascript\"\n href=\"http://maps.google.com/maps?\n file=api&v=2&key=xxxxx\">\n function createMap() {\n var map = new GMap2(document.getElementById(\"map\"));\n map.setCenter(new... | [
11,
8,
1,
1,
1
] | [] | [] | [
"google_maps",
"html"
] | stackoverflow_0000015247_google_maps_html.txt |
Q:
Hyperlinks displaced on IE7
Browse to a webpage with hyperlinks using IE (I am using IE7) Once on the page, enlarge the fonts using ctl + mouse wheel. Now when you try to hover over the hyperlinks, they are laterally displaced to the right. To click on the link, i have to move the mouse to the right till the cur... | Hyperlinks displaced on IE7 | Browse to a webpage with hyperlinks using IE (I am using IE7) Once on the page, enlarge the fonts using ctl + mouse wheel. Now when you try to hover over the hyperlinks, they are laterally displaced to the right. To click on the link, i have to move the mouse to the right till the cursor turns into a hand.
Anyone ha... | [
"IE7 doesn't handle Zoom correctly, You can see this error on this page (I mean the page you're reading right now) if you zoom large enough, view the logout | about link at the top, hover over it, hover off to the right, back over.\n",
"All of the links on that page are displaced to the right on my copy of IE7 (7... | [
1,
0
] | [] | [] | [
"browser"
] | stackoverflow_0000017269_browser.txt |
Q:
iFrame Best Practices
I have a large, hi-def JavaScript-intensive image banner for a site I'm designing. What is everyone's opinion of using iframes so that you incur the load time only once? Is there a CSS alternative to the iframe?
Feel free to preview the site.
It is very much a work in progress.
... | iFrame Best Practices | I have a large, hi-def JavaScript-intensive image banner for a site I'm designing. What is everyone's opinion of using iframes so that you incur the load time only once? Is there a CSS alternative to the iframe?
Feel free to preview the site.
It is very much a work in progress.
| [
"\nI should also have mentioned that I would like the banner rotation to keep moving. When the visitor clicks on a link, the banner rotation starts over. It would be nice if the \"animation\" kept rotating, regardless of the page the user visits.Blockquote\n\nWell, in that case I would strongly recommend not doing ... | [
1,
0,
0,
0,
0,
0
] | [] | [] | [
"css",
"html",
"iframe"
] | stackoverflow_0000017289_css_html_iframe.txt |
Q:
Unload a COM control when working in VB6 IDE
Part of my everyday work is maintaining and extending legacy VB6 applications. A common engine is written in C/C++ and VB6 uses these functions in order to improve performance.
When it comes to asynchronous programming, a C interface is not enough and we rely on COM co... | Unload a COM control when working in VB6 IDE | Part of my everyday work is maintaining and extending legacy VB6 applications. A common engine is written in C/C++ and VB6 uses these functions in order to improve performance.
When it comes to asynchronous programming, a C interface is not enough and we rely on COM controls to fire events to VB6.
My problem is that w... | [
"I'm pretty sure there's no good way to force VB6 to unload the control.\nHere's what I do... instead of running Visual C and Visual Basic side-by-side, run VB6 under VC :\n\nLoad up VC\nOpen the project containing your COM objects\nEdit, change, etc.\nIn VC, set the Output Executable to be VB6.EXE with appropriate... | [
27
] | [] | [] | [
"com",
"vb6"
] | stackoverflow_0000000419_com_vb6.txt |
Q:
Refactoring away labeled loops
After I was convinced that labeled breaks/continues are a total "nono" over here, I need help to remove the label out of my code.
I have a square matrix and a vector that has the same length. The vector has already some values in it an depending on the values in the matrix the vector... | Refactoring away labeled loops | After I was convinced that labeled breaks/continues are a total "nono" over here, I need help to remove the label out of my code.
I have a square matrix and a vector that has the same length. The vector has already some values in it an depending on the values in the matrix the vector is changed in the loop.
I hope, the... | [
"Looking at the solutions presented so far:\n\nThey all look less readable than the original, in that they involve spending more code on the mechanism of the code rather than on the algorithm itself\nSome of them are broken, or were before they were edited. Most damning is the fact that people are having to think q... | [
34,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0
] | [] | [] | [
"java",
"label",
"refactoring"
] | stackoverflow_0000015851_java_label_refactoring.txt |
Q:
How to get list of installed BitmapEncoders/Decoders (the WPF world)?
In WindowsForms world you can get a list of available image encoders/decoders with
System.Drawing.ImageCodecInfo.GetImageDecoders() / GetImageEncoders()
My question is, is there a way to do something analogous for the WPF world that would allow... | How to get list of installed BitmapEncoders/Decoders (the WPF world)? | In WindowsForms world you can get a list of available image encoders/decoders with
System.Drawing.ImageCodecInfo.GetImageDecoders() / GetImageEncoders()
My question is, is there a way to do something analogous for the WPF world that would allow me to get a list of available
System.Windows.Media.Imaging.BitmapDecoder ... | [
"You've got to love .NET reflection. I worked on the WPF team and can't quite think of anything better off the top of my head. The following code produces this list on my machine:\nBitmap Encoders:\nSystem.Windows.Media.Imaging.BmpBitmapEncoder\nSystem.Windows.Media.Imaging.GifBitmapEncoder\nSystem.Windows.Media.Im... | [
4,
1
] | [] | [] | [
"bitmap",
"c#",
"wpf"
] | stackoverflow_0000015023_bitmap_c#_wpf.txt |
Q:
IE6 - can't load a normal JPG
Try loading this normal .jpg file in Internet Explorer 6.0. I get an error saying the picture won't load. Try it in any other browser and it works fine. What's wrong? The .jpg file is just a normal picture sitting on the web server. I can even create a simple web page:
<a href="http:/... | IE6 - can't load a normal JPG | Try loading this normal .jpg file in Internet Explorer 6.0. I get an error saying the picture won't load. Try it in any other browser and it works fine. What's wrong? The .jpg file is just a normal picture sitting on the web server. I can even create a simple web page:
<a href="http://www.zodiacwheels.com/images/wheels... | [
"The JPG you uploaded is in CMYK, IE and Firefox versions before 3 can't read these. Open it using Photoshop (or anything similar, I'm sure GIMP would work too) and resave it in RGB.\nedit: Further Googling makes me suspect that CMYK isn't really a part of the jpeg standard, but can be shoehorned in there. That's w... | [
29,
3,
2,
1,
1,
0
] | [] | [] | [
"cmyk",
"image",
"internet_explorer",
"jpeg",
"rgb"
] | stackoverflow_0000017469_cmyk_image_internet_explorer_jpeg_rgb.txt |
Q:
How do you place a file in recycle bin instead of delete?
Programmatic solution of course...
A:
http://www.daveamenta.com/2008-05/c-delete-a-file-to-the-recycle-bin/
From above:
using Microsoft.VisualBasic;
string path = @"c:\myfile.txt";
FileIO.FileSystem.DeleteDirectory(path,
FileIO.UIOption.OnlyErrorDia... | How do you place a file in recycle bin instead of delete? | Programmatic solution of course...
| [
"http://www.daveamenta.com/2008-05/c-delete-a-file-to-the-recycle-bin/\nFrom above:\nusing Microsoft.VisualBasic;\n\nstring path = @\"c:\\myfile.txt\";\nFileIO.FileSystem.DeleteDirectory(path, \n FileIO.UIOption.OnlyErrorDialogs, \n RecycleOption.SendToRecycleBin);\n\n",
"You need to delve into unmanaged co... | [
38,
18,
13
] | [] | [] | [
".net",
"c#",
"c++",
"io",
"windows"
] | stackoverflow_0000017612_.net_c#_c++_io_windows.txt |
Q:
Differences between unix and windows files
Am I correct in assuming that the only difference between "windows files" and "unix files" is the linebreak?
We have a system that has been moved from a windows machine to a unix machine and are having troubles with the format.
I need to automate the translation between u... | Differences between unix and windows files | Am I correct in assuming that the only difference between "windows files" and "unix files" is the linebreak?
We have a system that has been moved from a windows machine to a unix machine and are having troubles with the format.
I need to automate the translation between unix/windows before the files get delivered to th... | [
"This is only a difference in text files, where UNIX uses a single Line Feed (LF) to signify a new line, Windows uses a Carriage Return/Line Feed (CRLF) and Mac uses just a CR.\nBinary files there should be no difference (i.e. a JPEG on a windows machine will be byte for byte the same as the same JPEG on a unix box... | [
13,
4,
2,
2,
1,
1
] | [] | [] | [
"file",
"java",
"unix",
"windows"
] | stackoverflow_0000017645_file_java_unix_windows.txt |
Q:
Retrieving the PC Name of a Client? (Windows Auth)
I have an ASP.net Application that runs on the internal network (well, actually it's running on Sharepoint 2007).
I just wonder:
Can I somehow retrieve the name of the PC the Client is using? I would have access to Active Directory if that helps. The thing is, p... | Retrieving the PC Name of a Client? (Windows Auth) | I have an ASP.net Application that runs on the internal network (well, actually it's running on Sharepoint 2007).
I just wonder:
Can I somehow retrieve the name of the PC the Client is using? I would have access to Active Directory if that helps. The thing is, people use multiple PCs. So, I cannot use any manual/stat... | [
"System.Web.HttpRequest.UserHostname as suggested in this answer just returns the IP :-(\nBut I just found this:\nSystem.Net.Dns.GetHostEntry(Page.Request.UserHostAddress).HostName\n\nThat only works if there is actually a DNS Server to resolve the name, which is the case for my network.\n",
"Does System.Web.Http... | [
4,
3
] | [] | [] | [
"asp.net",
"authentication",
"sharepoint"
] | stackoverflow_0000017664_asp.net_authentication_sharepoint.txt |
Q:
Language Conversion Testing
We created a tool which converts a language called P2, a language similar to assembly which I think exists only in Japan, to C#. There are at least a hundred modules written in P2 and we want to verify if the conversion to C# is right? How can we test this?
A:
You don't test the conve... | Language Conversion Testing | We created a tool which converts a language called P2, a language similar to assembly which I think exists only in Japan, to C#. There are at least a hundred modules written in P2 and we want to verify if the conversion to C# is right? How can we test this?
| [
"You don't test the converter, you test the final code. \nIf the code doesn't compile, clearly your converter is failing. If the code compiles and your functionality tests fail, then you can tweak the code so that it passes the test. If you are fairly successful you should see that you only need to fix the modules ... | [
2,
1
] | [] | [] | [
"c#",
"testing"
] | stackoverflow_0000017430_c#_testing.txt |
Q:
When is a file just a file?
So, you're writing a web application and you have several areas of the site where the user can upload files. My basic working method for this is to store the actual file on the server, and have a database table that connects the stored filename to the record it relates to.
My question i... | When is a file just a file? | So, you're writing a web application and you have several areas of the site where the user can upload files. My basic working method for this is to store the actual file on the server, and have a database table that connects the stored filename to the record it relates to.
My question is this: Should there be a differe... | [
"From your example, there is an argument for two tables, as you have files that can be associated with two different things.\n\nCVs, photos are associated with a user.\nattachments are associated with a CMS page.\n\nIf you put these in one table, (and you want to allow users to have more than one photo or cv) then ... | [
3,
2,
2,
2
] | [] | [] | [
"database_design"
] | stackoverflow_0000017715_database_design.txt |
Q:
Unix subsystem for windows
One of the bullet point features for Windows Vista Enterprize and Ultimate is the Unix subsystem for windows, which allows you to write posix... stuff? Anyway I'm outa my league talking about it... Anyone use this feature? Or explain it...
I know next to nothing about Unix programming.... | Unix subsystem for windows | One of the bullet point features for Windows Vista Enterprize and Ultimate is the Unix subsystem for windows, which allows you to write posix... stuff? Anyway I'm outa my league talking about it... Anyone use this feature? Or explain it...
I know next to nothing about Unix programming.
| [
"It's probably best not to try to use the Posix subsystem for Windows. It was never really complete and is just a useless marketing tick box.\nIf you're truly interested in programming stuff for Unix, download one of the many Linux distributions (ie. Ubuntu) and VirtualBox. Install and start playing.\n",
"You mig... | [
4,
4,
1,
0,
0
] | [] | [] | [
"posix",
"windows"
] | stackoverflow_0000017704_posix_windows.txt |
Q:
Delphi resources for existing .NET developer
Can anyone recommend some decent resources for a .NET developer who wishes to get a high level overview of the Delphi language?
We are about acquire a small business whose main product is developed in Delphi and I am wanting to build up enough knowledge to be able to ta... | Delphi resources for existing .NET developer | Can anyone recommend some decent resources for a .NET developer who wishes to get a high level overview of the Delphi language?
We are about acquire a small business whose main product is developed in Delphi and I am wanting to build up enough knowledge to be able to talk the talk with them.
Books, websites etc all app... | [
"\nDelphiBasics gives a good overview of basic syntax, library functions etc.\nEssential Delphi is a free e-book by Marco Cantu that should give a good overview, also of the VCL\n\nFeel free to ask around here as well, or in the Delphi newsgroups, if you encounter specific issues :)\n\n[edit] @Martin:\n\nThere's a ... | [
4,
3,
2,
1,
0
] | [] | [] | [
"delphi"
] | stackoverflow_0000013086_delphi.txt |
Q:
Suitable alternative to CryptEncrypt
We have a situation in our product where for a long time some data has been stored in the application's database as SQL string (choice of MS SQL server or sybase SQL anywhere) which was encrypted via the Windows API function CryptEncrypt. (direct and de-cryptable)
The problem ... | Suitable alternative to CryptEncrypt | We have a situation in our product where for a long time some data has been stored in the application's database as SQL string (choice of MS SQL server or sybase SQL anywhere) which was encrypted via the Windows API function CryptEncrypt. (direct and de-cryptable)
The problem is that CryptEncrypt can produce NULL's in... | [
"Any semi-decent algorithm will end up with a strong chance of generating a NULL value somewhere in the resulting ciphertext.\nWhy not do something like base-64 encode your resulting binary blob before persisting to the DB? (sample implementation in C++).\n",
"Storing a hash is a good idea. However, please defini... | [
3,
1,
0,
0
] | [] | [] | [
"c++",
"encryption",
"winapi"
] | stackoverflow_0000017670_c++_encryption_winapi.txt |
Q:
Java Coding standard / best practices - naming convention for break/continue labels
Sometimes a labeled break or continue can make code a lot more readable.
OUTERLOOP: for ( ;/*stuff*/; ) {
//...lots of code
if ( isEnough() ) break OUTERLOOP;
//...more code
}
I was wondering what the common conventi... | Java Coding standard / best practices - naming convention for break/continue labels | Sometimes a labeled break or continue can make code a lot more readable.
OUTERLOOP: for ( ;/*stuff*/; ) {
//...lots of code
if ( isEnough() ) break OUTERLOOP;
//...more code
}
I was wondering what the common convention for the labels was. All caps? first cap?
| [
"I don't understand where this \"don't use labels\" rule comes from. When doing non-trivial looping logic, the test to break or continue isn't always neatly at the end of the surrounding block.\nouter_loop:\nfor (...) {\n // some code\n for (...) {\n // some code\n if (...)\n continue outer_loop;\n ... | [
41,
20,
15,
10,
2,
1,
1,
0,
0,
0
] | [] | [] | [
"convention",
"java",
"label"
] | stackoverflow_0000015481_convention_java_label.txt |
Q:
Repository organisation
When I first started using revision control systems like CVS and SVN, I didn't really understand the concepts of the "trunk", branching, merging and tagging. I'm now starting to understand these concepts, and really get the importance and power behind them.
So, I'm starting to do it properl... | Repository organisation | When I first started using revision control systems like CVS and SVN, I didn't really understand the concepts of the "trunk", branching, merging and tagging. I'm now starting to understand these concepts, and really get the importance and power behind them.
So, I'm starting to do it properly. Or so I think... This is w... | [
"See these two questions on SO for more information:\n\nWhat does branch, tag and trunk really mean?\nSubversion question\n\n",
"What I do and normally see as a standard is:\nThe trunk should contain your main line of development, your unstable version.\nYou should create release branches for your releases.\nSome... | [
5,
5,
1,
1
] | [] | [] | [
"versioning"
] | stackoverflow_0000017735_versioning.txt |
Q:
Default Internet connection on Dual LAN Workstation
I know this is not programming directly, but it's regarding a development workstation I'm setting up.
I've got a Windows Server 2003 machine that needs to be on two LAN segments at the same time. One of them is a 10.17.x.x LAN and the other is 10.16.x.x
The prob... | Default Internet connection on Dual LAN Workstation | I know this is not programming directly, but it's regarding a development workstation I'm setting up.
I've got a Windows Server 2003 machine that needs to be on two LAN segments at the same time. One of them is a 10.17.x.x LAN and the other is 10.16.x.x
The problem is that I don't want to be using up the bandwidth on ... | [
"I'm no network expert but I have fiddled with the route command a number of times...\nroute add 0.0.0.0 MASK 0.0.0.0 <address of gateway on 10.17.x.x net>\n\nWill route all default traffic through the 10.17.x.x gateway, if you find that it still routes through the other interface, you should make sure that the new... | [
2,
0
] | [] | [] | [
"networking",
"windows_server_2003"
] | stackoverflow_0000017785_networking_windows_server_2003.txt |
Q:
Getting the Remote Name Address (not IP)
I wanted to show the users Name Address (see www.ipchicken.com), but the only thing I can find is the IP Address. I tried a reverse lookup, but didn't work either:
IPAddress ip = IPAddress.Parse(this.lblIp.Text);
string hostName = Dns.GetHostByAddress(ip).HostName;
this.lbl... | Getting the Remote Name Address (not IP) | I wanted to show the users Name Address (see www.ipchicken.com), but the only thing I can find is the IP Address. I tried a reverse lookup, but didn't work either:
IPAddress ip = IPAddress.Parse(this.lblIp.Text);
string hostName = Dns.GetHostByAddress(ip).HostName;
this.lblHost.Text = hostName;
But HostName is the sam... | [
"Edit of my previous answer. \nTry (in vb.net): \n Dim sTmp As String\n Dim ip As IPHostEntry\n\n sTmp = MaskedTextBox1.Text\n Dim ipAddr As IPAddress = IPAddress.Parse(sTmp)\n ip = Dns.GetHostEntry(ipAddr)\n MaskedTextBox2.Text = ip.HostName\n\nDns.resolve appears to be obsolete in later versions... | [
3,
2,
2,
1,
0,
0
] | [] | [] | [
".net",
"asp.net"
] | stackoverflow_0000017795_.net_asp.net.txt |
Q:
Recommendation for javascript form validation library
Any recommendations for a javascript form validation library. I could try and roll my own (but I'm not very good at javascript). Needs to support checking for required fields, and preferably regexp validation of fields.
A:
I am about to start implementing jav... | Recommendation for javascript form validation library | Any recommendations for a javascript form validation library. I could try and roll my own (but I'm not very good at javascript). Needs to support checking for required fields, and preferably regexp validation of fields.
| [
"I am about to start implementing javascript validation in my forms using jQuery Validation.\nI think that StackOverflow users this jQuery plugin as well. It seems to be a very mature validation library, however it does build on top of jQuery, so it might not fit for you.\nLike Tom said, don't forget that server si... | [
7,
3,
1
] | [] | [] | [
"forms",
"javascript",
"validation"
] | stackoverflow_0000017817_forms_javascript_validation.txt |
Q:
Anyone know a quick way to get to custom attributes on an enum value?
This is probably best shown with an example. I have an enum with attributes:
public enum MyEnum {
[CustomInfo("This is a custom attrib")]
None = 0,
[CustomInfo("This is another attrib")]
ValueA,
[CustomInfo("This has an ex... | Anyone know a quick way to get to custom attributes on an enum value? | This is probably best shown with an example. I have an enum with attributes:
public enum MyEnum {
[CustomInfo("This is a custom attrib")]
None = 0,
[CustomInfo("This is another attrib")]
ValueA,
[CustomInfo("This has an extra flag", AllowSomething = true)]
ValueB,
}
I want to get to those at... | [
"This is probably the easiest way.\nA quicker way would be to Statically Emit the IL code using Dynamic Method and ILGenerator. Although I've only used this to GetPropertyInfo, but can't see why you couldn't emit CustomAttributeInfo as well. \nFor example code to emit a getter from a property\npublic delegate objec... | [
11,
7
] | [] | [] | [
".net",
"attributes",
"c#",
"enums",
"reflection"
] | stackoverflow_0000017772_.net_attributes_c#_enums_reflection.txt |
Q:
Convert an asp.net application to IIS7 integrated mode
What steps I need to perform in order to convert asp.net 2 application from IIS7 classic to integrated mode?
A:
Here is a process:
Rick Strahl's blog
| Convert an asp.net application to IIS7 integrated mode | What steps I need to perform in order to convert asp.net 2 application from IIS7 classic to integrated mode?
| [
"Here is a process:\nRick Strahl's blog\n"
] | [
5
] | [
"Nothing really. ASP.NET 2.0 applications will run just as they have in IIS 6.0. If you want to take advantage of any of the new features then you just need to update your code. But unless you are changing the structure of the header of the response or intercepting requests for other applications you probably wi... | [
-3
] | [
".net_2.0",
"asp.net",
"iis_7"
] | stackoverflow_0000010782_.net_2.0_asp.net_iis_7.txt |
Q:
Large, Complex Objects as a Web Service Result
Hello again ladies and gents!
OK, following on from my other question on ASP.NET Web Service Results, Proxy Classes and Type Conversion. I've come to a part in my project where I need to get my thinking cap on.
Basically, we have a large, complex custom object that ne... | Large, Complex Objects as a Web Service Result | Hello again ladies and gents!
OK, following on from my other question on ASP.NET Web Service Results, Proxy Classes and Type Conversion. I've come to a part in my project where I need to get my thinking cap on.
Basically, we have a large, complex custom object that needs to be returned from a Web Service and consumed i... | [
"The .Net XML (de)serialisation is pretty nicely implemented. At first thought, I don't think this is a bad idea at all.\nIf the two applications import the same C# class(es) definition(s), then this is a relatively nice way of getting copy-constructor behaviour for free. If the class structure changes, then everyt... | [
5,
4,
1,
1
] | [] | [] | [
"asp.net",
"c#",
"serialization",
"web_services",
"xml"
] | stackoverflow_0000017725_asp.net_c#_serialization_web_services_xml.txt |
Q:
How to wait for thread complete before continuing?
I have some code for starting a thread on the .NET CF 2.0:
ThreadStart tStart = new ThreadStart(MyMethod);
Thread t = new Thread(tStart);
t.Start();
If I call this inside a loop the items completely out of order. How do introduce a wait after t.Start(), so that t... | How to wait for thread complete before continuing? | I have some code for starting a thread on the .NET CF 2.0:
ThreadStart tStart = new ThreadStart(MyMethod);
Thread t = new Thread(tStart);
t.Start();
If I call this inside a loop the items completely out of order. How do introduce a wait after t.Start(), so that the work on the thread completes before the code continue... | [
"How much order do you need to impose on the threads? If you just need all of the work started in the loop to finish before the code continues, but you don't care about the order the work within the loop finishes, then calling Join is the answer. To add more detail to Kevin Kenny's answer, you should call Join outs... | [
15,
5,
4
] | [] | [] | [
"c#",
"compact_framework",
"multithreading"
] | stackoverflow_0000006890_c#_compact_framework_multithreading.txt |
Q:
Why does Guid.ToString() reverse the byte order?
We're storing some Guid's in a MS SQL database. There's some legacy code that does Guid.ToString() and then passes them in to a varchar(64) and there's some newer code that passes them in using a unique identifier parameter. When you look at the results using MS SQL... | Why does Guid.ToString() reverse the byte order? | We're storing some Guid's in a MS SQL database. There's some legacy code that does Guid.ToString() and then passes them in to a varchar(64) and there's some newer code that passes them in using a unique identifier parameter. When you look at the results using MS SQL Management studio they look different. The byte order... | [
"Uniqueidentifier fields in Sql server can be indexed, and so are 'backwards'.\nGuids can be generated from both machine specific info and 'event-time' information.\nThe default Guid in .Net is random, but you can get sequential Guids from it with an extern call:\n[DllImport( \"rpcrt4.dll\", SetLastError = true )]\... | [
9
] | [] | [] | [
".net",
"sql_server"
] | stackoverflow_0000017679_.net_sql_server.txt |
Q:
Block user access to internals of a site using HTTP_REFERER
I have control over the HttpServer but not over the ApplicationServer or the Java Applications sitting there but I need to block direct access to certain pages on those applications. Precisely, I don't want users automating access to forms issuing direct ... | Block user access to internals of a site using HTTP_REFERER | I have control over the HttpServer but not over the ApplicationServer or the Java Applications sitting there but I need to block direct access to certain pages on those applications. Precisely, I don't want users automating access to forms issuing direct GET/POST HTTP requests to the appropriate servlet.
So, I decided... | [
"I'm not sure if I can solve this in one go, but we can go back and forth as necessary.\nFirst, I want to repeat what I think you are saying and make sure I'm clear. You want to disallow requests to servlet1 and servlet2 is the request doesn't have the proper referer and it does have a query string? I'm not sure ... | [
2,
1,
1,
1,
1,
0,
0,
0,
0
] | [] | [] | [
"apache",
"http_referer",
"mod_rewrite",
"security"
] | stackoverflow_0000003486_apache_http_referer_mod_rewrite_security.txt |
Q:
What's the best way to distribute python command-line tools?
My current setup.py script works okay, but it installs tvnamer.py (the tool) as tvnamer.py into site-packages or somewhere similar..
Can I make setup.py install tvnamer.py as tvnamer, and/or is there a better way of installing command-line applications?
... | What's the best way to distribute python command-line tools? | My current setup.py script works okay, but it installs tvnamer.py (the tool) as tvnamer.py into site-packages or somewhere similar..
Can I make setup.py install tvnamer.py as tvnamer, and/or is there a better way of installing command-line applications?
| [
"Try the entry_points.console_scripts parameter in the setup() call. As described in the setuptools docs, this should do what I think you want.\nTo reproduce here:\nfrom setuptools import setup\n\nsetup(\n # other arguments here...\n entry_points = {\n 'console_scripts': [\n 'foo = package.m... | [
38
] | [] | [] | [
"command_line",
"packaging",
"python"
] | stackoverflow_0000017893_command_line_packaging_python.txt |
Q:
Productivity gains of using CASE tools for development
I was using a CASE called MAGIC for a system I'm developing, I've never used this kind of tool before and at first sight I liked, a month later I had a lot of the application generated, I felt very productive and ... I would say ... satisfied.
In some way a fe... | Productivity gains of using CASE tools for development | I was using a CASE called MAGIC for a system I'm developing, I've never used this kind of tool before and at first sight I liked, a month later I had a lot of the application generated, I felt very productive and ... I would say ... satisfied.
In some way a felt uncomfortable, cause, there is no code and everything I w... | [
"We use a CASE tool at my current company for code generation and we are trying to move away from it.\nThe benefits that it brings - a graphical representation of the code making components 'easier' to pick up for new developers - are outweighed by the disadvantges in my opinion.\nThose main disadvantages are:\n\nW... | [
1,
0,
0,
0
] | [] | [] | [
"case_tools"
] | stackoverflow_0000013550_case_tools.txt |
Q:
best practice for releasing Microsoft dll's in setup
I'm working on a setup which wants to include the Microsoft.Web.Services3 (WSE 3.0) DLL. However, I typically do not like including Microsoft DLL's in our installs except by way of Microsoft's redistributables. There is both a developer and a redist install pack... | best practice for releasing Microsoft dll's in setup | I'm working on a setup which wants to include the Microsoft.Web.Services3 (WSE 3.0) DLL. However, I typically do not like including Microsoft DLL's in our installs except by way of Microsoft's redistributables. There is both a developer and a redist install package available from Microsoft.
So, as a best practice, shou... | [
"Usually, redistributing any of Microsoft DLLs outside of the redistributable package is forbidden by their EULA, so you might first want to check the appropriate EULA for that DLL.\nGenerally, I would prefer the redist package since that makes sure that it's correctly \"registered\" into the system, i.e. if you in... | [
5,
2,
2,
0,
0
] | [] | [] | [
"installation",
"redistributable",
"windows_installer"
] | stackoverflow_0000017825_installation_redistributable_windows_installer.txt |
Q:
What areas of specialization within programming would you recommend to a beginner
I am a student studying software development, and I feel programming, in general, is too broad of a subject to try to know everything. To be proficient, you have to decide which areas to focus your learning and understanding. Certain... | What areas of specialization within programming would you recommend to a beginner | I am a student studying software development, and I feel programming, in general, is too broad of a subject to try to know everything. To be proficient, you have to decide which areas to focus your learning and understanding. Certain skill sets synergize with each other, like data-driven web development and SQL experie... | [
"Ben, Almost all seasoned programmers are still students in programming. You never stops learning anything when you are a developer. But if you are really starting off on your career then you should be least worried about the specialization thing. All APIs, frameworks and skills that you expect that gives you a lon... | [
21,
5,
3,
3,
1,
1
] | [] | [] | [
"language_agnostic"
] | stackoverflow_0000017320_language_agnostic.txt |