text
stringlengths
8
267k
meta
dict
Q: Is there a good library for dealing with the Modbus protocol in .NET? Does anyone know of a good (preferably open source) library for dealing with the Modbus protocol? I have seen a few libraries, but I am looking for some people's personal experiences, not just the top ten Google hits. I figure there has to be at l...
{ "language": "en", "url": "https://stackoverflow.com/questions/54837", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: What are some best practices for creating my own custom exception? In a follow-up to a previous question regarding exceptions, what are best practices for creating a custom exception in .NET? More specifically should you inherit from System.Exception, System.ApplicationException or some other base exception? A: T...
{ "language": "en", "url": "https://stackoverflow.com/questions/54851", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "24" }
Q: Better way of opening a Document from Java? I've been using the following code to open Office Documents, PDF, etc. on my windows machines using Java and it's working fine, except for some reason when a filename has embedded it within it multiple contiguous spaces like "File[SPACE][SPACE]Test.doc". How can I make thi...
{ "language": "en", "url": "https://stackoverflow.com/questions/54861", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How well does .NET scale? (I'll begin by making it clear, I am not a .NET developer and am not tied to any other environment.) Recently, I heard that the London Stock Exchange went down for an entire day. I've also heard that the software was written in .NET. Up to this point they would experience performance hits o...
{ "language": "en", "url": "https://stackoverflow.com/questions/54864", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: Best way to parse Space Separated Text I have string like this /c SomeText\MoreText "Some Text\More Text\Lol" SomeText I want to tokenize it, however I can't just split on the spaces. I've come up with somewhat ugly parser that works, but I'm wondering if anyone has a more elegant design. This is in C# btw. EDIT: ...
{ "language": "en", "url": "https://stackoverflow.com/questions/54866", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: What is the difference between old style and new style classes in Python? What is the difference between old style and new style classes in Python? When should I use one or the other? A: New style classes may use super(Foo, self) where Foo is a class and self is the instance. super(type[, object-or-type]) Return ...
{ "language": "en", "url": "https://stackoverflow.com/questions/54867", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1117" }
Q: How to use JQuery "after" selector I can't seem to figure out a good way to do this, but it seems like it should be simple. I have an element that I want to append a div to. Then I have another element that I want to clone and shove into that intermediate div. Here's what I was hoping to do: $("#somediv > ul").af...
{ "language": "en", "url": "https://stackoverflow.com/questions/54877", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: How do I in java add a stacktrace to my debugging printout What's the easiest way to print a stacktrace from a debugging printout? Often during testing you would like to know the callstack leading up to the situation provoking a debug message. A: If you want to save the stack trace into a String you can do this; St...
{ "language": "en", "url": "https://stackoverflow.com/questions/54882", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Hidden features of Eclipse Alright it can be a lame question, but everybody uses these things differently. What's some of the best time savers out there for this IDE. Tom A: Ctrl+Alt+UP or Ctrl+Alt+DOWN to copy lines A: Ctrl+Alt+H on a method to get the call hierarchy for it. Fast way to see where it is called fr...
{ "language": "en", "url": "https://stackoverflow.com/questions/54886", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "97" }
Q: As a ASP.NET programmer, do I need to be concerned about email injection attacks? There are lots of PHP articles about the subject so is this a PHP only problem. I am sending emails using System.Net.Mail after some regular expression checks of course. Similar to http://weblogs.asp.net/scottgu/archive/2005/12/10/4328...
{ "language": "en", "url": "https://stackoverflow.com/questions/54889", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How do I clone a generic List in Java? I have an ArrayList<String> that I'd like to return a copy of. ArrayList has a clone method which has the following signature: public Object clone() After I call this method, how do I cast the returned Object back to ArrayList<String>? A: List<String> shallowClonedList = new...
{ "language": "en", "url": "https://stackoverflow.com/questions/54909", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "175" }
Q: Make a JPanel not draw its background (Transparent) Is it possible, in Java, to make a JPanel skip drawing its background thus being transparent except for the components on it? A: This article seems to have some handy info on how to create shaped and transparent windows in Java: https://docs.oracle.com/javase/tuto...
{ "language": "en", "url": "https://stackoverflow.com/questions/54926", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "26" }
Q: Hidden Features of ASP.NET This question exists because it has historical significance, but it is not considered a good, on-topic question for this site, so please do not use it as evidence that you can ask similar questions here. More info: https://stackoverflow.com/faq There are always features that ...
{ "language": "en", "url": "https://stackoverflow.com/questions/54929", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "292" }
Q: How do I know when to use state based testing versus mock testing? Which scenarios, areas of an application/system, etc. are best suited for 'classic' state based testing versus using mock objects? A: You should be using mocks for dependencies. I don't think that its an either-or; Usually you will create mocks for...
{ "language": "en", "url": "https://stackoverflow.com/questions/54943", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Java, UTF-8, and Windows console We try to use Java and UTF-8 on Windows. The application writes logs on the console, and we would like to use UTF-8 for the logs as our application has internationalized logs. It is possible to configure the JVM so it generates UTF-8, using -Dfile.encoding=UTF-8 as arguments to the J...
{ "language": "en", "url": "https://stackoverflow.com/questions/54952", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: Count the number of nodes that match a given XPath expression in XmlSpy I am using XmlSpy to analyze an xml file, and I want to get a quick count of the number of nodes that match a given xpath. I know how to enter the XPathand get the list of nodes, but I am really just interested in the count. Is it possible to ...
{ "language": "en", "url": "https://stackoverflow.com/questions/54953", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: What is a prepared statement? I see a bunch of lines in the .log files in the postgres pg_log directory that say something like: ERROR: prepared statement "pdo_pgsql_stmt_09e097f4" does not exist What are prepared statements, and what kinds of things can cause these error messages to be displayed? A: From the d...
{ "language": "en", "url": "https://stackoverflow.com/questions/54955", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: What is a good platform (environment/language/reuseable component) for data visualization? I have lots and lots of data in various structures. Are there any better platforms other than Excel charts which can help me. thanks A: http://services.alphaworks.ibm.com/manyeyes/browse/visualizations Here you can upload da...
{ "language": "en", "url": "https://stackoverflow.com/questions/54957", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How would you refactor this LINQ code? I've got a lot of ugly code that looks like this: if (!string.IsNullOrEmpty(ddlFileName.SelectedItem.Text)) results = results.Where(x => x.FileName.Contains(ddlFileName.SelectedValue)); if (chkFileName.Checked) results = results.Where(x => x.FileName == null); if (!str...
{ "language": "en", "url": "https://stackoverflow.com/questions/54963", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Replacing Windows Explorer With Third Party Tool How would I go about replacing Windows Explorer with a third party tool such as TotalCommander, explorer++, etc? I would like to have one of those load instead of win explorer when I type "C:\directoryName" into the run window. Is this possible? A: From a comment on ...
{ "language": "en", "url": "https://stackoverflow.com/questions/54966", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Profiling visualization tools? I need to display profiling information pulled from a deeply embedded CPU, presenting it in a way which other developers on my team will be able to act upon. The profiling data is a snapshot of a cycle counter at the entry and exit of every function, so we have a call graph annotated w...
{ "language": "en", "url": "https://stackoverflow.com/questions/54971", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: How to Prevent the "Please tell Microsoft about this problem" Dialog Boxes We have an error that we can't seem to find and don't have the need/resources to try and track it down. What we do need to do is just keep the freaking "Please tell Microsoft about this problem" dialog boxes from cluttering up the server. It...
{ "language": "en", "url": "https://stackoverflow.com/questions/54972", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Adopting standard libraries My team has a command parsing library for console apps. Each team around us has their own as well. There isn't anything in the BCL so I suppose this is natural. I've looked at the the module in Mono, which seems solid, and the one on CodePlex looks fine as well. There are probably others ...
{ "language": "en", "url": "https://stackoverflow.com/questions/54978", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do prepared statements work? I'm writing some DB routines and I'm using prepared statements. My environment is PDO with PHP5. I understand prepared statements primarily provide a performance benefit, as well as some auxiliary bonuses such as not having to manually SQL-escape input data. My question is about the...
{ "language": "en", "url": "https://stackoverflow.com/questions/54980", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Change windows hostname from command line Is it possible to change the hostname in Windows 2003 from the command line with out-of-the-box tools? A: The previously mentioned wmic command is the way to go, as it is installed by default in recent versions of Windows. Here is my small improvement to generalize it, by...
{ "language": "en", "url": "https://stackoverflow.com/questions/54989", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "34" }
Q: Generating Random Passwords When a user on our site loses his password and heads off to the Lost Password page we need to give him a new temporary password. I don't really mind how random this is, or if it matches all the "needed" strong password rules, all I want to do is give them a password that they can change l...
{ "language": "en", "url": "https://stackoverflow.com/questions/54991", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "278" }
Q: How Scalable is SQLite? I recently read this Question about SQLite vs MySQL and the answer pointed out that SQLite doesn't scale well and the official website sort-of confirms this, however. How scalable is SQLite and what are its upper most limits? A: Sqlite is scalable in terms of single-user, I have multi-gigaby...
{ "language": "en", "url": "https://stackoverflow.com/questions/54998", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "188" }
Q: What's a clean/simple way to ensure the security of a page? Supposing you have a form that collects and submits sensitive information and you want to ensure it is never accessed via insecure (non-HTTPS) means, how might you best go about enforcing that policy? A: If you're running Apache, you can put a RewriteRule ...
{ "language": "en", "url": "https://stackoverflow.com/questions/55010", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Should I always use the AndAlso and OrElse operators? Is there ever a circumstance in which I would not want to use the AndAlso operator rather than the And operator? …or in which I would not want to use the OrElse operator rather than the Or operator? A: From MSDN: Short-Circuiting Trade-Offs Short-circuiting can...
{ "language": "en", "url": "https://stackoverflow.com/questions/55013", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "50" }
Q: Application to Stress Test in a Windows .NET Application I am developing a Windows .NET application (WinForms) and I need to simulate a stress test of the database and the application ( more than 100 conections). What tools do you recommend? A: Tools like AutomatedQA TestComplete allow you to make a script which s...
{ "language": "en", "url": "https://stackoverflow.com/questions/55035", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Rehsarper 4.0 - Renaming a class does not rename the file Rehsarper 4.0 - Renaming a class does not rename the file… I probably set something on accident in the options, but I can't find it. Any ideas? A: When I do a rename in Resharper there's a checkbox below the textbox where you type the new name that says "Syn...
{ "language": "en", "url": "https://stackoverflow.com/questions/55039", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How can I program a simple chat bot AI? I want to build a bot that asks someone a few simple questions and branches based on the answer. I realize parsing meaning from the human responses will be challenging, but how do you setup the program to deal with the "state" of the conversation? It will be a one-to-one conv...
{ "language": "en", "url": "https://stackoverflow.com/questions/55042", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "33" }
Q: How to capitalize the first letter of each word in a string in SQL Server What’s the best way to capitalize the first letter of each word in a string in SQL Server. A: From http://www.sql-server-helper.com/functions/initcap.aspx CREATE FUNCTION [dbo].[InitCap] ( @InputString varchar(4000) ) RETURNS VARCHAR(4000) A...
{ "language": "en", "url": "https://stackoverflow.com/questions/55054", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "62" }
Q: What's the best Django search app? I'm building a Django project that needs search functionality, and until there's a django.contrib.search, I have to choose a search app. So, which is the best? By "best" I mean... * *easy to install / set up *has a Django- or at least Python-friendly API *can perform reasonabl...
{ "language": "en", "url": "https://stackoverflow.com/questions/55056", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "114" }
Q: Php function argument error suppression, empty() isset() emulation I'm pretty sure the answer to this question is no, but in case there's some PHP guru is it possible to write a function in a way where invalid arguments or non existent variables can be passed in and php will not error without the use of '@' Much lik...
{ "language": "en", "url": "https://stackoverflow.com/questions/55060", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: How to jump to a class definition in CodeRush Just downloaded the CodeRush trial version and I can't easily find the one feature that I really wanted. I would like to be able to start typing a class name and to jump to its definition, sort of like the quick navigator but I want it to search in closed files within m...
{ "language": "en", "url": "https://stackoverflow.com/questions/55061", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Display a PDF in WPF Application Any ideas how to display a PDF file in a WPF Windows Application? I am using the following code to run the browser but the Browser.Navigate method does not do anything! WebBrowser browser = new WebBrowser(); browser.Navigate("http://www.google.com"); this.AddChild(browser); // this...
{ "language": "en", "url": "https://stackoverflow.com/questions/55083", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "28" }
Q: How to deal with arrays (declared on the stack) in C++? I have a class to parse a matrix that keeps the result in an array member: class Parser { ... double matrix_[4][4]; }; The user of this class needs to call an API function (as in, a function I have no control over, so I can't just change its interface to m...
{ "language": "en", "url": "https://stackoverflow.com/questions/55093", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: Is there a good WPF pivot control? Does anyone have any experience with a good wpf pivot table control? A: DevExpress Grid control has good pivot functionality. Used it for Winforms a lot. I think the WPF version is also available. A: The Xceed WPF Grid looks like it has a lot of great capabilities. We use their ...
{ "language": "en", "url": "https://stackoverflow.com/questions/55096", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: Find checkout history for SVN working folder We have an intranet site backed by SVN, such that the site is a checkout out copy of the repository (working folder used only by IIS). Something on the site has been causing problems today, and I want to know how to find out what was checked out to that working folder in...
{ "language": "en", "url": "https://stackoverflow.com/questions/55099", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How can I return an anonymous type from a method? I have a Linq query that I want to call from multiple places: var myData = from a in db.MyTable where a.MyValue == "A" select new { a.Key, a.MyValue }; How c...
{ "language": "en", "url": "https://stackoverflow.com/questions/55101", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: How do I convert a .docx to html using asp.net? Word 2007 saves its documents in .docx format which is really a zip file with a bunch of stuff in it including an xml file with the document. I want to be able to take a .docx file and drop it into a folder in my asp.net web app and have the code open the .docx file an...
{ "language": "en", "url": "https://stackoverflow.com/questions/55113", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Where does RegexBuddy store its working data between uses? Ok, so I'm an idiot. So I was working on a regex that took way to long to craft. After perfecting it, I upgraded my work machine with a blazing fast hard drive and realized that I never saved the regex anywhere and simply used RegexBuddy's autosave to sto...
{ "language": "en", "url": "https://stackoverflow.com/questions/55114", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: NullReferenceException on instantiated object? This is a segment of code from an app I've inherited, a user got a Yellow screen of death: Object reference not set to an instance of an object on the line: bool l_Success ... Now I'm 95% sure the faulty argument is ref l_Monitor which is very weird considering the...
{ "language": "en", "url": "https://stackoverflow.com/questions/55130", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Database engines Comparison - Windows Mobile What are the different database options on Windows Mobile available? I have used CEDB and EDB for linear dataset needs. I have heard of SQL server 2005 Mobile edition. But what are the advantages over others (if there is any) A: Also take a look at SQLite for Windows CE....
{ "language": "en", "url": "https://stackoverflow.com/questions/55140", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Embed a File Chooser in a UserControl / Form I've inherited a desktop application which has a custom .NET file chooser that is embedded in a control, but it has some issues. I'd like to replace it with a non-custom File Chooser (like the OpenFileDialog). However, for a variety of reasons it needs to be embedded in...
{ "language": "en", "url": "https://stackoverflow.com/questions/55147", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: In SQL Server is it possible to get "id" of a record when Insert is executed? In SQL Server 2005 I have an "id" field in a table that has the "Is Identity" property set to 'Yes'. So, when an Insert is executed on that table the "id" gets set automatically to the next incrementing integer. Is there an easy way when t...
{ "language": "en", "url": "https://stackoverflow.com/questions/55159", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Why all the Linq To Entities Hate? I've noticed that there seems to be quite a bit of hostility towards Linq To Entities particularly from the Alt.Net folks. I understand the resistance to more "drag and drop" programming, but from my understanding, Linq To Entities doesn't require it. We're currently using Linq ...
{ "language": "en", "url": "https://stackoverflow.com/questions/55179", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: In Python, how can you easily retrieve sorted items from a dictionary? Dictionaries unlike lists are not ordered (and do not have the 'sort' attribute). Therefore, you can not rely on getting the items in the same order when first added. What is the easiest way to loop through a dictionary containing strings as the...
{ "language": "en", "url": "https://stackoverflow.com/questions/55180", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: How do I insert text into a textbox after popping up another window to request information? I have an asp.net web page written in C#. Using some javascript I popup another .aspx page which has a few controls that are filled in and from which I create a small snippet of text. When the user clicks OK on that dialog bo...
{ "language": "en", "url": "https://stackoverflow.com/questions/55203", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What is the operator precedence order in Visual Basic 6.0? What is the operator precedence order in Visual Basic 6.0 (VB6)? In particular, for the logical operators. A: Use parentheses EDIT: That's my advice for new code! But Oscar is reading someone else's code, so must figure it out somehow. I suggest the VBA m...
{ "language": "en", "url": "https://stackoverflow.com/questions/55206", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: Algorithm to generate anagrams What would be the best strategy to generate anagrams. An anagram is a type of word play, the result of rearranging the letters of a word or phrase to produce a new word or phrase, using all the original letters exactly once; ex. * *Eleven plus two is anagram of Twelve plus...
{ "language": "en", "url": "https://stackoverflow.com/questions/55210", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "56" }
Q: Unique key generation I looking for a way, specifically in PHP that I will be guaranteed to always get a unique key. I have done the following: strtolower(substr(crypt(time()), 0, 7)); But I have found that once in a while I end up with a duplicate key (rarely, but often enough). I have also thought of doing: strto...
{ "language": "en", "url": "https://stackoverflow.com/questions/55218", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: How do I implement a HTML cache for a PHP site? What is the best way of implementing a cache for a PHP site? Obviously, there are some things that shouldn't be cached (for example search queries), but I want to find a good solution that will make sure that I avoid the 'digg effect'. I know there is WP-Cache for Word...
{ "language": "en", "url": "https://stackoverflow.com/questions/55223", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Files on Windows and Contiguous Sectors Is there a way to guarantee that a file on Windows (using the NTFS file system) will use contiguous sectors on the hard disk? In other words, the first chunk of the file will be stored in a certain sector, the second chunk of the file will be stored in the next sector, and so ...
{ "language": "en", "url": "https://stackoverflow.com/questions/55256", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Refresh all update panels on the page? I have some code that modifies a value that several controls in other update panels are bound to. When this event handler fires, I'd like it to force the other update panels to refresh as well, so they can rebind. Is this possible? Edit: To clarify, I have an update panel in o...
{ "language": "en", "url": "https://stackoverflow.com/questions/55270", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: What are the advantages of VistaDB I have seen the references to VistaDB over the years and with tools like SQLite, Firebird, MS SQL et. al. I have never had a reason to consider it. What are the benefits of paying for VistaDB vs using another technology? Things I have thought of: 1. Compact Framework Support. SQL...
{ "language": "en", "url": "https://stackoverflow.com/questions/55273", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Kill a specific PHP script running on FastCGI / IIS? I'm a PHP developer, but honestly my knowledge of server management is somewhat lacking. I fired off a script today that took a regrettably long time to run, and because it had an embedded call to ignore_user_abort(), pressing "stop" in the browser was obviously ...
{ "language": "en", "url": "https://stackoverflow.com/questions/55279", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How exactly do you configure httpOnly Cookies in ASP Classic? I'm looking to implement httpOnly in my legacy ASP classic sites. Anyone knows how to do it? A: If you run your Classic ASP web pages on IIS 7/7.5, then you can use the IIS URL Rewrite module to write a rule to make your cookies HTTPOnly. Paste the follo...
{ "language": "en", "url": "https://stackoverflow.com/questions/55296", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: asp consuming a web service, what do do with recordset object? Currently I run an classic (old) ASP webpage with recordset object used directly in bad old spagethi code fasion. I'm thinking of implementing a data layer in asp.net as web serivce to improve manageability. This is also a first step towards upgrading th...
{ "language": "en", "url": "https://stackoverflow.com/questions/55297", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Automatic code quality tool for Ruby? One thing I really miss about Java is the tool support. FindBugs, Checkstyle and PMD made for a holy trinity of code quality metrics and automatic bug checking. Is there anything that will check for simple bugs and / or style violations of Ruby code? Bonus points if I can ad...
{ "language": "en", "url": "https://stackoverflow.com/questions/55313", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "37" }
Q: OpenGl And Flickering When objects from a CallList intersect the near plane I get a flicker..., what can I do? Im using OpenGL and SDL. Yes it is double buffered. A: It sounds like you're getting z-fighting. "Z-fighting is a phenomenon in 3D rendering that occurs when two or more primitives have similar values in t...
{ "language": "en", "url": "https://stackoverflow.com/questions/55317", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: JVM choices on Windows Mobile What are the JVM implementations available on Windows Mobile? Esmertec JBed is the one on my WinMo phone. Wondering how many other JVM vendors are in this zone. Are there any comparison or benchmarking data available? A: JVM Choices for Windows CE in general (including Pocket PC and Wi...
{ "language": "en", "url": "https://stackoverflow.com/questions/55322", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: ASP.NET Web Application Build Output - How do I include all deployment files? When I build my ASP.NET web application I get a .dll file with the code for the website in it (which is great) but the website also needs all the .aspx files and friends, and these need to be placed in the correct directory structure. How ...
{ "language": "en", "url": "https://stackoverflow.com/questions/55323", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How do I maintain position of a DragPanelExtender across postbacks? I already found this article: http://www.dotnetcurry.com/ShowArticle.aspx?ID=181&AspxAutoDetectCookieSupport=1 But I've got a different situation. I am embedding some hiddenFields inside of the master page and trying to store the position of the dra...
{ "language": "en", "url": "https://stackoverflow.com/questions/55330", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Bespoke SQL Server 'encoding' sproc - is there a neater way of doing this? I'm just wondering if there's a better way of doing this in SQL Server 2005. Effectively, I'm taking an originator_id (a number between 0 and 99) and a 'next_element' (it's really just a sequential counter between 1 and 999,999). We are tryin...
{ "language": "en", "url": "https://stackoverflow.com/questions/55340", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How can I kill all sessions connecting to my oracle database? I need to quickly (and forcibly) kill off all external sessions connecting to my oracle database without the supervision of and administrator. I don't want to just lock the database and let the users quit gracefully. How would I script this? A: Before ki...
{ "language": "en", "url": "https://stackoverflow.com/questions/55342", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "30" }
Q: "Background" task in palm OS I'm trying to create a Palm OS app to check a web site every X minutes or hours, and provide a notification when a piece of data is available. I know that this kind of thing can be done on the new Palm's - for example, my Centro can have email or web sites download when the application ...
{ "language": "en", "url": "https://stackoverflow.com/questions/55350", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: __doPostBack is not working in firefox The __doPostBack is not working in firefox 3 (have not checked 2). Everything is working great in IE 6&7 and it even works in Chrome?? It's a simple asp:LinkButton with an OnClick event <asp:LinkButton ID="DeleteAllPicturesLinkButton" Enabled="False" OnClientClick="javascript:...
{ "language": "en", "url": "https://stackoverflow.com/questions/55360", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How can I get Emacs' key bindings in Python's IDLE? I use Emacs primarily for coding Python but sometimes I use IDLE. Is there a way to change the key bindings easily in IDLE to match Emacs? A: IDLE provides Emacs keybindings without having to install other software. * *Open up the menu item Options -> Configur...
{ "language": "en", "url": "https://stackoverflow.com/questions/55365", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Reading VC++ CArchive Binary Format (or Java reading (CObArray)) Is there any clear documentation on the binary formats used to serialize the various MFC data structures? I've been able to view some of my own classes in a hex editor and use Java's ByteBuffer class to read them in (with automatic endianness conversi...
{ "language": "en", "url": "https://stackoverflow.com/questions/55369", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Extending an enum via inheritance I know this rather goes against the idea of enums, but is it possible to extend enums in C#/Java? I mean "extend" in both the sense of adding new values to an enum, but also in the OO sense of inheriting from an existing enum. I assume it's not possible in Java, as it only got th...
{ "language": "en", "url": "https://stackoverflow.com/questions/55375", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "98" }
Q: ant build.xml windows white space in path I'm using Windows and I'm trying to get ANT to work. When I do an ant build from the command line, I get: C:\dev\Projects\springapp\${%ANT_HOME%}\lib not found. I look into the build.xml file and I find: appserver.home=${user.home}/apache-tomcat-6.0.14 (which I just copied a...
{ "language": "en", "url": "https://stackoverflow.com/questions/55386", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: Python regular expression for HTML parsing I want to grab the value of a hidden input field in HTML. <input type="hidden" name="fooId" value="12-3456789-1111111111" /> I want to write a regular expression in Python that will return the value of fooId, given that I know the line in the HTML follows the format <input...
{ "language": "en", "url": "https://stackoverflow.com/questions/55391", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Have you successfully used a GPGPU? I am interested to know whether anyone has written an application that takes advantage of a GPGPU by using, for example, nVidia CUDA. If so, what issues did you find and what performance gains did you achieve compared with a standard CPU? A: I have been using GPGPU for motion de...
{ "language": "en", "url": "https://stackoverflow.com/questions/55403", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: Path.GetTempFileName -- Directory name is invalid Running into a problem where on certain servers we get an error that the directory name is invalid when using Path.GetTempFileName. Further investigation shows that it is trying to write a file to c:\Documents and Setting\computername\aspnet\local settings\temp (fou...
{ "language": "en", "url": "https://stackoverflow.com/questions/55411", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: ASP.NET MVC versus the Zeitgeist ASP.NET MVC seems to be making a pretty big entrance. Can anyone summarize how its MVC implementation stacks up against popular MVC frameworks for other languages? (I'm thinking specifically of Rails and Zend Framework, though there are obviously lots.) Observations on learning cur...
{ "language": "en", "url": "https://stackoverflow.com/questions/55414", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Do you actively manage technical debt? Do you actively manage technical debt debt on your software development projects and if so, how do you do it? A: On our teams we actively manage technical debt. We do Scrum, so we spawn a technical debt card for either the current iteration or the next iteration depending on ...
{ "language": "en", "url": "https://stackoverflow.com/questions/55421", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "25" }
Q: How to parse relative time? This question is the other side of the question asking, "How do I calculate relative time?". Given some human input for a relative time, how can you parse it? By default you would offset from DateTime.Now(), but could optionally offset from another DateTime. (Prefer answers in C#) Exampl...
{ "language": "en", "url": "https://stackoverflow.com/questions/55434", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Using Microsoft's Application Blocks I haven't done a lot of .NET programming, but I've examined a few of the application blocks published by Microsoft's Patterns and Practices group. I was wondering how these are typically used: * *Linked directly into applications *Source added into applications and built with...
{ "language": "en", "url": "https://stackoverflow.com/questions/55437", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Checking Inheritance with templates in C++ I've a class which is a wrapper class(serves as a common interface) around another class implementing the functionality required. So my code looks like this. template<typename ImplemenationClass> class WrapperClass { // the code goes here } Now, how do I make sure that Imp...
{ "language": "en", "url": "https://stackoverflow.com/questions/55440", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What’s the best approach when migrating legacy projects across versions of visual studio? I've been thinking about the number of projects we have in-house that are still being developed using visual studio 6 and how best to migrate them forward onto visual studio 2008. The projects range in flavours of C/C++ and VB....
{ "language": "en", "url": "https://stackoverflow.com/questions/55448", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Can you "ignore" a file in Perforce? I sometimes use the feature 'Reconcile Offline Work...' found in Perforce's P4V IDE to sync up any files that I have been working on while disconnected from the P4 depot. It launches another window that performs a 'Folder Diff'. I have files I never want to check in to source con...
{ "language": "en", "url": "https://stackoverflow.com/questions/55449", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "103" }
Q: Which C# project type would you use to redevelop a MFC C++ activex control? Looking at the C# project templates in VS2008 and the offerings are WPF User Control Library, WPF Custom Control Library and Windows Forms Control Library. Which of these would you use if you wanted to move a legacy active control written in...
{ "language": "en", "url": "https://stackoverflow.com/questions/55451", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What is the possible mimetype hierarchy of an email message? I'm working with a snippet of code that recursively calls itself and tries to pull out a MIME Type part of text/html from an email (if it exists) for further processing. The "text/html" could exist inside other content such as multipart/alternative, so I'm...
{ "language": "en", "url": "https://stackoverflow.com/questions/55460", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Should I use one big SQL Select statement or several small ones? I'm building a PHP page with data sent from MySQL. Is it better to have * *1 SELECT query with 4 table joins, or *4 small SELECT queries with no table join; I do select from an ID Which is faster and what is the pro/con of each method? I only nee...
{ "language": "en", "url": "https://stackoverflow.com/questions/55463", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: Uninstall Command Fails Only in Release Mode I'm able to successfully uninstall a third-party application via the command line and via a custom Inno Setup installer. Command line Execution: MSIEXEC.exe /x {14D74337-01C2-4F8F-B44B-67FC613E5B1F} /qn Inno Setup Command: [Run] Filename: msiexec.exe; Flags: runhidden w...
{ "language": "en", "url": "https://stackoverflow.com/questions/55482", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Find the settings JNDI is using for error reporting I've got a J2SE application that I am maintaining uses JNDI. (It uses JNDI to find it's J2EE application server.) It has pretty poor error reporting of failure to find the JNDI server. I've been looking around fora way to display which server the InitialContext is ...
{ "language": "en", "url": "https://stackoverflow.com/questions/55487", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Return collection as read-only I have an object in a multi-threaded environment that maintains a collection of information, e.g.: public IList<string> Data { get { return data; } } I currently have return data; wrapped by a ReaderWriterLockSlim to protect the collection from sharing violations...
{ "language": "en", "url": "https://stackoverflow.com/questions/55502", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "22" }
Q: How do I logout of multiple asp.net applications? I have a main asp.net app, which is written in asp.net 1.1. Runnning underneath the application are several 2.0 apps. To completely logout a user can I just logout of the 1.1 app with FormsAuthentication.SignOut or is it more complicated than that? A: What you are l...
{ "language": "en", "url": "https://stackoverflow.com/questions/55503", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How do I conditionally create a stored procedure in SQL Server? As part of my integration strategy, I have a few SQL scripts that run in order to update the database. The first thing all of these scripts do is check to see if they need to run, e.g.: if @version <> @expects begin declare @error varchar(10...
{ "language": "en", "url": "https://stackoverflow.com/questions/55506", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "25" }
Q: When do function-level static variables get allocated/initialized? I'm quite confident that globally declared variables get allocated (and initialized, if applicable) at program start time. int globalgarbage; unsigned int anumber = 42; But what about static ones defined within a function? void doSomething() { sta...
{ "language": "en", "url": "https://stackoverflow.com/questions/55510", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "103" }
Q: Very slow compile times on Visual Studio 2005 We are getting very slow compile times, which can take upwards of 20+ minutes on dual core 2GHz, 2G Ram machines. A lot of this is due to the size of our solution which has grown to 70+ projects, as well as VSS which is a bottle neck in itself when you have a lot of fi...
{ "language": "en", "url": "https://stackoverflow.com/questions/55517", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "133" }
Q: How do I calculate the "cost" of a crash? Background: Some time ago, I built a system for recording and categorizing application crashes for one of our internal programs. At the time, I used a combination of frequency and aggregated lost time (the time between the program launch and the crash) for prioritizing types...
{ "language": "en", "url": "https://stackoverflow.com/questions/55531", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Casting between multi- and single-dimentional arrays This came up from this answer to a previous question of mine. Is it guaranteed for the compiler to treat array[4][4] the same as array[16]? For instance, would either of the below calls to api_func() be safe? void api_func(const double matrix[4][4]); // ... { ...
{ "language": "en", "url": "https://stackoverflow.com/questions/55532", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Characters to avoid in automatically generated passwords I need to generate some passwords, I want to avoid characters that can be confused for each other. Is there a definitive list of characters I should avoid? my current list is il10o8B3Evu![]{} Are there any other pairs of characters that are easy to confuse? fo...
{ "language": "en", "url": "https://stackoverflow.com/questions/55556", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "30" }
Q: live asp.net web.config settings I've only recently started working with asp.net and c#. Is there a standard practice set of web.config settings for a live final website? There seem to be a ton of options available and I'm looking to streamline performance, close possible security holes and other unnecessary options...
{ "language": "en", "url": "https://stackoverflow.com/questions/55572", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Learning Ruby on Rails As it stands now, I'm a Java and C# developer. The more and more I look at Ruby on Rails, the more I really want to learn it. What have you found to be the best route to learn RoR? Would it be easier to develop on Windows, or should I just run a virtual machine with Linux? Is there an IDE...
{ "language": "en", "url": "https://stackoverflow.com/questions/55574", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "241" }
Q: ASP.Net: If I have the Session ID, Can I get the Session object? This question is related to this one, though I think I was a little too long-winded there to really get a good answer. I'll keep this brief. I'm working on a web handler (ashx) that accepts a form post from an aspx page. When the handler receives this ...
{ "language": "en", "url": "https://stackoverflow.com/questions/55576", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: How can I test my web pages in Microsoft Internet Explorer on a Mac? I want to test the web pages I create in all the modern versions of Internet Explorer (6, 7 and 8 beta) but I work mainly on a Mac and often don't have direct access to a PC. A: There's three different methods that I recommend: Cloud-based interac...
{ "language": "en", "url": "https://stackoverflow.com/questions/55577", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "35" }