text
stringlengths
8
267k
meta
dict
Q: Locate and add project reference for .Net assembly containing a given type? I'm working with a large (270+ project) VS.Net solution. Yes, I know this is pushing the friendship with VS but it's inherited and blah blah. Anyway, to speed up the solution load and compile time I've removed all projects that I'm not cur...
{ "language": "en", "url": "https://stackoverflow.com/questions/53961", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What is wrong with this PHP regular expression? $output = preg_replace("|(/D)(/s+)(/d+)(;)|", "//1,//3;", $output); I'm trying to replace all alphabetical character followed by one or more whitespace characters (tabs and/or spaces) followed by one or more numerical characters followed by a semicolon with the alphab...
{ "language": "en", "url": "https://stackoverflow.com/questions/53965", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How would you implement the IEnumerator interface? I have a class that map objects to objects, but unlike dictionary it maps them both ways. I am now trying to implement a custom IEnumerator interface that iterates through the values. public class Mapper<K,T> : IEnumerable<T>, IEnumerator<T> { C5.TreeDictionary...
{ "language": "en", "url": "https://stackoverflow.com/questions/53967", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Linking directly to a SWF, what are the downsides? Usually Flash and Flex applications are embedded on in HTML using either a combination of object and embed tags, or more commonly using JavaScript. However, if you link directly to a SWF file it will open in the browser window and without looking in the address bar ...
{ "language": "en", "url": "https://stackoverflow.com/questions/53989", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Any good AJAX framework for Google App Engine apps? I am trying to implement AJAX in my Google App Engine application, and so I am looking for a good AJAX framework that will help me. Anyone has any idea? I am thinking about Google Web Toolkit, how good it is in terms of creating AJAX for Google App Engine? A: A ni...
{ "language": "en", "url": "https://stackoverflow.com/questions/53997", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: Could not load type 'XXX.Global' Migrating a project from ASP.NET 1.1 to ASP.NET 2.0 and I keep hitting this error. I don't actually need Global because I am not adding anything to it, but after I remove it I get more errors. A: The reason I encounter this issue is because I change the build configuration. When I ...
{ "language": "en", "url": "https://stackoverflow.com/questions/54001", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "62" }
Q: Returning an element from a List in Scala I've recently been working on a beginner's project in Scala, and have a beginner question about Scala's Lists. Say I have a list of tuples ( List[Tuple2[String, String]], for example). Is there a convenience method to return the first occurence of a specified tuple from the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/54010", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: Programmatically access browser history how can i create an application to read all my browser (firefox) history? i noticed that i have in C:\Users\user.name\AppData\Local\Mozilla\Firefox\Profiles\646vwtnu.default what looks like a sqlite database (urlclassifier3.sqlite) but i don't know if its really what is used...
{ "language": "en", "url": "https://stackoverflow.com/questions/54036", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Credit card expiration dates - Inclusive or exclusive? Say you've got a credit card number with an expiration date of 05/08 - i.e. May 2008. Does that mean the card expires on the morning of the 1st of May 2008, or the night of the 31st of May 2008? A: In my experience, it has expired at the end of that month. Tha...
{ "language": "en", "url": "https://stackoverflow.com/questions/54037", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "131" }
Q: Running a scheduled task in a Wordpress plug-in I'm trying to write a Wordpress plug-in that automatically posts a blog post at a certain time of day. For example, read a bunch of RSS feeds and post a daily digest of all new entries. There are plug-ins that do something similar to what I want, but many of them rely...
{ "language": "en", "url": "https://stackoverflow.com/questions/54038", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Does anyone know a library for working with quantity/unit of measure pairs? I would like to be able to do such things as var m1 = new UnitOfMeasureQuantityPair(123.00, UnitOfMeasure.Pounds); var m2 = new UnitOfMeasureQuantityPair(123.00, UnitOfMeasure.Liters); m1.ToKilograms(); m2.ToPounds(new Density(7.0, DensityT...
{ "language": "en", "url": "https://stackoverflow.com/questions/54043", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Regex's For Developers I've been trying to figure out a regex to allow me to search for a particular string while automatically skipping comments. Anyone have an RE like this or know of one? It doesn't even need to be sophisticated enough to skip #if 0 blocks; I just want it to skip over // and /* blocks. The con...
{ "language": "en", "url": "https://stackoverflow.com/questions/54047", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How do you get the logged in Windows domain account from an ASP.NET application? We have an ASP.NET application that manages it's own User, Roles and Permission database and we have recently added a field to the User table to hold the Windows domain account. I would like to make it so that the user doesn't have to...
{ "language": "en", "url": "https://stackoverflow.com/questions/54050", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Tool to view the contents of the Solution User Options file (.suo) Are there any free tools available to view the contents of the solution user options file (the .suo file that accompanies solution files)? I know it's basically formatted as a file system within the file, but I'd like to be able to view the contents ...
{ "language": "en", "url": "https://stackoverflow.com/questions/54052", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "27" }
Q: Efficiently selecting a set of random elements from a linked list Say I have a linked list of numbers of length N. N is very large and I don’t know in advance the exact value of N. How can I most efficiently write a function that will return k completely random numbers from the list? A: There's a very nice and eff...
{ "language": "en", "url": "https://stackoverflow.com/questions/54059", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "40" }
Q: Any restrictions on development in Vista I'm looking at a new computer which will probably have vista on it. But there are so many editions of vista; are there any weird restrictions on what you can run on the various editions? For instance you couldn't run IIS on Windows ME. Can you still run IIS on the home edi...
{ "language": "en", "url": "https://stackoverflow.com/questions/54068", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to send MMS with C# I need to send MMS thought a C# application. I have already found 2 interesting components: http://www.winwap.com http://www.nowsms.com Does anyone have experience with other third party components? Could someone explain what kind of server I need to send those MMS? Is it a classic SMTP Serv...
{ "language": "en", "url": "https://stackoverflow.com/questions/54092", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Secure session cookies in ASP.NET over HTTPS I got a little curious after reading this /. article over hijacking HTTPS cookies. I tracked it down a bit, and a good resource I stumbled across lists a few ways to secure cookies here. Must I use adsutil, or will setting requireSSL in the httpCookies section of web.conf...
{ "language": "en", "url": "https://stackoverflow.com/questions/54096", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: Is there any way to enable code completion for Perl in vim? Surprisingly as you get good at vim, you can code even faster than standard IDEs such as Eclipse. But one thing I really miss is code completion, especially for long variable names and functions. Is there any way to enable code completion for Perl in vim? ...
{ "language": "en", "url": "https://stackoverflow.com/questions/54104", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "26" }
Q: What is the best way to populate a menu control on a Master Page? Database? Page variables? Enum? I'm looking for opinions here. A: The ASP.NET Sitemap feature is built for that and works well in a lot of cases. If you get in a spot where you want your Menu to look different from your Sitemap, here are some workar...
{ "language": "en", "url": "https://stackoverflow.com/questions/54118", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Using jQuery to beautify someone else's html I have a third-party app that creates HTML-based reports that I need to display. I have some control over how they look, but in general it's pretty primitive. I can inject some javascript, though. I'd like to try to inject some jQuery goodness into it to tidy it up som...
{ "language": "en", "url": "https://stackoverflow.com/questions/54138", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How does the Comma Operator work How does the comma operator work in C++? For instance, if I do: a = b, c; Does a end up equaling b or c? (Yes, I know this is easy to test - just documenting on here for someone to find the answer quickly.) Update: This question has exposed a nuance when using the comma operator...
{ "language": "en", "url": "https://stackoverflow.com/questions/54142", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "193" }
Q: How do I insert a character at the caret with javascript? I want to insert some special characters at the caret inside textboxes using javascript on a button. How can this be done? The script needs to find the active textbox and insert the character at the caret in that textbox. The script also needs to work in IE a...
{ "language": "en", "url": "https://stackoverflow.com/questions/54147", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: What do you think will be the level of usage of Silverlight 1 year from now? There is a lot of buzz about Microsoft Silverlight, especially after the Olympics. Also H264 will be supported in a future version. Where do you think Silverlight will be 1 year from now? A: They were saying they were getting 1.5 million d...
{ "language": "en", "url": "https://stackoverflow.com/questions/54169", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What are the advantages/disadvantages of using a CTE? I'm looking at improving the performance of some SQL, currently CTEs are being used and referenced multiple times in the script. Would I get improvements using a table variable instead? (Can't use a temporary table as the code is within functions). A: You'll rea...
{ "language": "en", "url": "https://stackoverflow.com/questions/54176", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: What should be considered when building a Recommendation Engine? I've read the book Programming Collective Intelligence and found it fascinating. I'd recently heard about a challenge amazon had posted to the world to come up with a better recommendation engine for their system. The winner apparently produced the be...
{ "language": "en", "url": "https://stackoverflow.com/questions/54179", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: Best tool to monitor network connection bandwidth I'm looking for a very simple tool to monitor the bandwidth of all my applications. No need for extra features like traffic spying, I'm just interested by bandwidth. I already know Wireshark (which is great), but what I'm looking for is more something like TcpView (...
{ "language": "en", "url": "https://stackoverflow.com/questions/54184", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Are C++ Reads and Writes of an int Atomic? I have two threads, one updating an int and one reading it. This is a statistic value where the order of the reads and writes is irrelevant. My question is, do I need to synchronize access to this multi-byte value anyway? Or, put another way, can part of the write be compl...
{ "language": "en", "url": "https://stackoverflow.com/questions/54188", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "91" }
Q: How to implement Repository pattern withe LinqToEntities? How to implement Repository pattern withe LinqToEntities how to implement the interface A: I do the following: A service layer contains my business objects. It is passed the repository via an Inversion of Control (Castle Windor is my usual choice). The repo...
{ "language": "en", "url": "https://stackoverflow.com/questions/54199", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Encrypting appSettings in web.config I am developing a web app which requires a username and password to be stored in the web.Config, it also refers to some URLs which will be requested by the web app itself and never the client. I know the .Net framework will not allow a web.config file to be served, however I stil...
{ "language": "en", "url": "https://stackoverflow.com/questions/54200", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: Soap logging in .net I have an internal enterprise app that currently consumes 10 different web services. They're consumed via old style "Web References" instead of using WCF. The problem I'm having is trying to work with the other teams in the company who are authoring the services I'm consuming. I found I needed t...
{ "language": "en", "url": "https://stackoverflow.com/questions/54207", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Ajax XMLHttpRequest object limit Is there a security limit to the number of Ajax XMLHttpRequest objects you can create on a single page? If so, does this vary from one browser to another? A: I don't think so, but there's a limit of two simultaneous HTTP connections per domain per client (you can override this in Fi...
{ "language": "en", "url": "https://stackoverflow.com/questions/54217", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How should I handle a situation where I need to store several unrelated types but provide specific types on demand? I'm working on an editor for files that are used by an important internal testing tool we use. The tool itself is large, complicated, and refactoring or rewriting would take more resources than we are...
{ "language": "en", "url": "https://stackoverflow.com/questions/54219", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How would I allow a user to stream video to a web application for storage? I'd like to add some functionality to a site that would allow users to record video using their webcam and easily store it online. I don't even know if this is possible right now, but I think flash has access to local webcams running through ...
{ "language": "en", "url": "https://stackoverflow.com/questions/54221", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Accessing System Databases/Tables using LINQ to SQL? Right now I have an SSIS package that runs every morning and gives me a report on the number of packages that failed or succeeded from the day before. The information for these packages is contained partly within the sysjobs table (a system table) within the msdb ...
{ "language": "en", "url": "https://stackoverflow.com/questions/54222", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Asp.net path compaction I have an asp.net url path which is being generated in a web form, and is coming out something like "/foo/bar/../bar/path.aspx", and is coming out in the generated html like this too. It should be shortened to "/foo/bar/path.aspx". Path.Combine didn't fix it. Is there a function to clean thi...
{ "language": "en", "url": "https://stackoverflow.com/questions/54227", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: CakePHP ACL Database Setup: ARO / ACO structure? I'm struggling to implement ACL in CakePHP. After reading the documentation in the cake manual as well as several other tutorials, blog posts etc, I found Aran Johnson's excellent tutorial which has helped fill in many of the gaps. His examples seem to conflict with...
{ "language": "en", "url": "https://stackoverflow.com/questions/54230", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "21" }
Q: Is there a way to highlight the target of a bookmark? (www.site.com/page.htm#bookmark)? I want to link to bookmark on a page (mysite.com/mypage.htm#bookmark) AND visually highlight the item that was bookmarked (maybe having a red border). Naturally, there would be multiple items bookmarked. So that if someone click...
{ "language": "en", "url": "https://stackoverflow.com/questions/54237", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: In Vim is there a way to delete without putting text in the register? Using Vim I often want to replace a block of code with a block that I just yanked. But when I delete the block of code that is to be replaced, that block itself goes into the register which erases the block I just yanked. So I've got in the habit ...
{ "language": "en", "url": "https://stackoverflow.com/questions/54255", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "525" }
Q: Tracking Refactorings in a Bug Database Let's say you work someplace where every change to source code must be associated with a bug-report or feature-request, and there is no way to get that policy reformed. In such an environment, what is the best way to deal with code refactorings (that is, changes that improve ...
{ "language": "en", "url": "https://stackoverflow.com/questions/54264", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: What do you use to create a website architecture? Sure, we can use a simple bulleted list or a mindmap. But, there must be a better, more interactive way. What do you use when starting your website architecture? A: From a physical and logical architecture standpoint, nothing beats the whiteboard, drawing up the l...
{ "language": "en", "url": "https://stackoverflow.com/questions/54277", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to write java.util.Properties to XML with sorted keys? I'd like to store a properties file as XML. Is there a way to sort the keys when doing this so that the generated XML file will be in alphabetical order? String propFile = "/path/to/file"; Properties props = new Properties(); /*set some properties here*/ ...
{ "language": "en", "url": "https://stackoverflow.com/questions/54295", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: Is it possible to over OO? My question is simple; is it possible to over object-orient your code? How much is too much? At what point are you giving up readability and maintainability for the sake of OO? I am a huge OO person but sometimes I wonder if I am over-complicating my code.... Thoughts? A: If you think ...
{ "language": "en", "url": "https://stackoverflow.com/questions/54299", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Any tools to get code churn metrics for a Subversion repository? I'm looking for any tools that can give you code churn metrics (graphs and charts would be even better) for a Subversion repository. One tool I know of is statsvn - a Java tool that creates some HTML reports and some code churn metrics. Statsvn report...
{ "language": "en", "url": "https://stackoverflow.com/questions/54318", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "29" }
Q: How do I concatenate text in a query in sql server? The following SQL: SELECT notes + 'SomeText' FROM NotesTable a Give the error: The data types nvarchar and text are incompatible in the add operator. A: The only way would be to convert your text field into an nvarchar field. Select Cast(notes as nvarchar(4000...
{ "language": "en", "url": "https://stackoverflow.com/questions/54334", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "81" }
Q: How can you find out where the style for a ASP .Net web page element came from? I have a quandary. My web application (C#, .Net 3.0, etc) has Themes, CSS sheets and, of course, inline style definitions. Now that's alot of chefs adding stuff to the soup. All of this results, not surprisingly, in my pages having bi...
{ "language": "en", "url": "https://stackoverflow.com/questions/54337", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Using ActiveDirectoryMembershipProvider with two domain controllers We have an ASP.NET application running at a customer site that uses ActiveDirectory for user login via the ActiveDirectoryMembershipProvider. Their primary domain controller that we were pointing to went down this morning, and in getting everything ...
{ "language": "en", "url": "https://stackoverflow.com/questions/54364", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Shell one liner to prepend to a file This is probably a complex solution. I am looking for a simple operator like ">>", but for prepending. I am afraid it does not exist. I'll have to do something like mv myfile tmp cat myheader tmp > myfile Anything smarter? A: When you start trying to do things that become d...
{ "language": "en", "url": "https://stackoverflow.com/questions/54365", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "140" }
Q: Problem rolling out ADO.Net Data Service application to IIS I am adding a ADO.Net Data Service lookup feature to an existing web page. Everything works great when running from visual studio, but when I roll it out to IIS, I get the following error: Request ErrorThe server encountered an error processing the reques...
{ "language": "en", "url": "https://stackoverflow.com/questions/54380", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: Exposing .net methods as Excel functions? I have a set of calculation methods sitting in a .Net DLL. I would like to make those methods available to Excel (2003+) users so they can use them in their spreadsheets. For example, my .net method: public double CalculateSomethingReallyComplex(double a, double b) {...} I...
{ "language": "en", "url": "https://stackoverflow.com/questions/54387", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: What is the best strategy for code chunks and macros in vim? As I develop more with vim, I find myself wanting to copy in blocks of useful code, similar to "templates" in Eclipse. I was thinking of making a separate file for each code chunk and just reading them in with :r code-fornext but that just seems kind of ...
{ "language": "en", "url": "https://stackoverflow.com/questions/54401", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How do I (or can I) SELECT DISTINCT on multiple columns? I need to retrieve all rows from a table where 2 columns combined are all different. So I want all the sales that do not have any other sales that happened on the same day for the same price. The sales that are unique based on day and price will get updated to...
{ "language": "en", "url": "https://stackoverflow.com/questions/54418", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "527" }
Q: How to host 2 WCF services in 1 Windows Service? I have a WCF application that has two Services that I am trying to host in a single Windows Service using net.tcp. I can run either of the services just fine, but as soon as I try to put them both in the Windows Service only the first one loads up. I have determined t...
{ "language": "en", "url": "https://stackoverflow.com/questions/54419", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: What is the design pattern for processing command line arguments If you are writing a program that is executable from the command line, you often want to offer the user several options or flags, along with possibly more than one argument. I have stumbled my way through this many times, but is there some sort of desi...
{ "language": "en", "url": "https://stackoverflow.com/questions/54421", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "50" }
Q: What's cleanest, shortest Javascript to submit a URL the user is at to another process via URL? Like the Delicious submission bookmark-let, I'd like to have some standard JavaScript I can use to submit any visited URL to a 3rd party site when that's possible by URL. Suggestions? For example, I've been using javasc...
{ "language": "en", "url": "https://stackoverflow.com/questions/54426", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Adding Items Using DataBinding from TreeView to ListBox WPF I want to add the selected item from the TreeView to the ListBox control using DataBinding (If it can work with DataBinding). <TreeView HorizontalAlignment="Left" Margin="30,32,0,83" Name="treeView1" Width="133" > </TreeVi...
{ "language": "en", "url": "https://stackoverflow.com/questions/54440", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Aggressive JavaScript caching I've run into a problem where I make changes to a few JavaScript files that are referenced in an HTML file, but the browser doesn't see the changes. It holds onto the copy cached in the browser, even though the web server has a newer version. Not until I force the browser to clear the c...
{ "language": "en", "url": "https://stackoverflow.com/questions/54475", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "21" }
Q: How do I list user defined types in a SQL Server database? I need to enumerate all the user defined types created in a SQL Server database with CREATE TYPE, and/or find out whether they have already been defined. With tables or stored procedures I'd do something like this: if exists (select * from dbo.sysobjects whe...
{ "language": "en", "url": "https://stackoverflow.com/questions/54482", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "43" }
Q: Conditional Number Formatting In Java How can I format Floats in Java so that the float component is displayed only if it's not zero? For example: 123.45 -> 123.45 99.0 -> 99 23.2 -> 23.2 45.0 -> 45 Edit: I forgot to mention - I'm still on Java 1.4 - sorry! A: If you use DecimalFormat and specify # in the p...
{ "language": "en", "url": "https://stackoverflow.com/questions/54487", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Storing Images in PostgreSQL Alright, so I'm working on an application which will use a Linux back-end running PostgreSQL to serve up images to a Windows box with the front end written in C#.NET, though the front-end should hardly matter. My question is: * *What is the best way to deal with storing images in Pos...
{ "language": "en", "url": "https://stackoverflow.com/questions/54500", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "143" }
Q: Problem with .net app under linux, doesn't work from shell script I'm working on a .net post-commit hook to feed data into OnTime via their Soap SDK. My hook works on Windows fine, but on our production RHEL4 subversion server, it won't work when called from a shell script. #!/bin/sh /usr/bin/mono $1/hooks/post-com...
{ "language": "en", "url": "https://stackoverflow.com/questions/54503", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What is the best practice for writing Registry calls/File Sytem calls/Process creation filter for WinXP, Vista? We needed to monitor all processes Registry calls/File Sytem calls/Process creations in the system (for the antivirus hips module) . Also time by time it will be needed to delay some calls or decline them....
{ "language": "en", "url": "https://stackoverflow.com/questions/54504", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How should I store short text strings into a SQL Server database? varchar(255), varchar(256), nvarchar(255), nvarchar(256), nvarchar(max), etc? 256 seems like a nice, round, space-efficient number. But I've seen 255 used a lot. Why? What's the difference between varchar and nvarchar? A: There are a couple of othe...
{ "language": "en", "url": "https://stackoverflow.com/questions/54512", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: Printing data into a preprinted form in C# .Net 3.5 SP1 I need to print out data into a pre-printed A6 form (1/4 the size of a landsacpe A4). I do not need to print paragraphs of text, just short lines scattered about on the page. All the stuff on MSDN is about priting paragraphs of text. Thanks for any help you ca...
{ "language": "en", "url": "https://stackoverflow.com/questions/54522", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: win32 GUI app that writes usage text to stdout when invoked as "app.exe --help" How do I create a windows application that does the following: * *it's a regular GUI app when invoked with no command line arguments *specifying the optional "--help" command line argument causes the app to write usage text to stdout...
{ "language": "en", "url": "https://stackoverflow.com/questions/54536", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "24" }
Q: Prevent Use of the Back Button (in IE) So the SMEs at my current place of employment want to try and disable the back button for certain pages. We have a page where the user makes some selections and submits them to be processed. In some instances they have to enter a comment on another page. What the users have...
{ "language": "en", "url": "https://stackoverflow.com/questions/54539", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: How can I indicate that multiple versions of a dependent assembly are okay? Assemblies A and B are privately deployed and strongly named. Assembly A contains references to Assembly B. There are two versions of Assembly B: B1 and B2. I want to be able to indicate for Assembly A that it may bind to either B1 or B2 ...
{ "language": "en", "url": "https://stackoverflow.com/questions/54546", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Call to a member function on a non-object So I'm refactoring my code to implement more OOP. I set up a class to hold page attributes. class PageAtrributes { private $db_connection; private $page_title; public function __construct($db_connection) { $this->db_connection = $db_connection; ...
{ "language": "en", "url": "https://stackoverflow.com/questions/54566", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "80" }
Q: How do I get InputVerifier to work with an editable JComboBox I've got an JComboBox with a custom inputVerifyer set to limit MaxLength when it's set to editable. The verify method never seems to get called. The same verifyer gets invoked on a JTextField fine. What might I be doing wrong? A: I found a workaround. I ...
{ "language": "en", "url": "https://stackoverflow.com/questions/54567", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How to capture output of "pnputil.exe -e" How do I capture the output of "%windir%/system32/pnputil.exe -e"? (assume windows vista 32-bit) Bonus for technical explanation of why the app normally writes output to the cmd shell, but when stdout and/or stderr are redirected then the app writes nothing to the console or...
{ "language": "en", "url": "https://stackoverflow.com/questions/54578", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: WCF Configuration without a config file Does anyone know of a good example of how to expose a WCF service programatically without the use of a configuration file? I know the service object model is much richer now with WCF, so I know it's possible. I just have not seen an example of how to do so. Conversely, I would...
{ "language": "en", "url": "https://stackoverflow.com/questions/54579", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "90" }
Q: When should you use a class vs a struct in C++? In what scenarios is it better to use a struct vs a class in C++? A: As others have pointed out * *both are equivalent apart from default visibility *there may be reasons to be forced to use the one or the other for whatever reason There's a clear recommendation...
{ "language": "en", "url": "https://stackoverflow.com/questions/54585", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1238" }
Q: Solid Config for webdev in emacs under linux AND windows? I have a windows laptop (thinkpad) and somewhat recently rediscovered emacs and the benefit that all those wacky shortcuts can be when the arrow keys are located somewhere near you right armpit. I was discouraged after php-mode, css-mode, etc, under mmm-mode ...
{ "language": "en", "url": "https://stackoverflow.com/questions/54586", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Fast Disk Cloning Is there a way to have Linux read ahead when cloning a disk? I use the program named "dd" to clone disks. The last time I did this it seemed as though the OS was reading then writing but never at the same time. Ideally, the destination disk would be constantly writing without waiting that's of c...
{ "language": "en", "url": "https://stackoverflow.com/questions/54612", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How do I get an XML file as XML (and not a string) with Ajax in Prototype.js? This code is from Prototype.js. I've looked at probably 20 different tutorials, and I can't figure out why this is not working. The response I get is null. new Ajax.Request(/path/to / xml / file.xml, { method: "get", contentType: "ap...
{ "language": "en", "url": "https://stackoverflow.com/questions/54626", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Is there a ClientScriptManager.RegisterClientScriptInclude equivalent for CSS The ClientScriptManager.RegisterClientScriptInclude method allows you to register a JavaScript reference with the Page object (checking for duplicates). Is there an equivalent of this method for CSS references? Similar questions apply for ...
{ "language": "en", "url": "https://stackoverflow.com/questions/54658", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: Apache Download: Make sure that page was viewed before download The job at hand: I want to make sure that my website's users view a page before they start a download. If they have not looked at the page but try to hotlink to the files directly they should go to the webpage before the download is allowed. Any suggest...
{ "language": "en", "url": "https://stackoverflow.com/questions/54669", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Any good building tools for a C++ project, which can replace make? i'm wondering if there is any nice and neat tool to replace the GNU Autotools or Make to build a very large C++ project, which are such a complicated thing to use. It is simple to generate all the files that de Autotools require if the project is sm...
{ "language": "en", "url": "https://stackoverflow.com/questions/54674", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "22" }
Q: How Do You Insert XML Into an existing XML node I'm not even sure if it's possible but say I have some XML: <source> <list> <element id="1"/> </list> </source> And I would like to insert into list: <element id="2"/> Can I write an XSLT to do this? A: Add these 2 template definit...
{ "language": "en", "url": "https://stackoverflow.com/questions/54683", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "23" }
Q: How to get a list of current open windows/process with Java? Does any one know how do I get the current open windows or process of a local machine using Java? What I'm trying to do is: list the current open task, windows or process open, like in Windows Taskmanager, but using a multi-platform approach - using onl...
{ "language": "en", "url": "https://stackoverflow.com/questions/54686", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "107" }
Q: Modifying the AJAX Control Toolkit Dropdown extender I am using the example on the AJAX website for the DropDownExtender. I'm looking to make the target control (the label) have the DropDown image appear always, instead of just when I hover over it. Is there any way to do this? A: This can be done using the foll...
{ "language": "en", "url": "https://stackoverflow.com/questions/54702", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Should I choose scripting or compiled code for small tasks? I'm a Java programmer, and I like my compiler, static analysis tools and unit testing frameworks as tools that help me quickly deliver robust and efficient code. The JRE is pretty much everywhere I would work, too. Given that situation, I can't see a reason...
{ "language": "en", "url": "https://stackoverflow.com/questions/54703", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Programmatically accessing Data in an ASP.NET 2.0 Repeater This is an ASP.Net 2.0 web app. The Item template looks like this, for reference: <ItemTemplate> <tr> <td class="class1" align=center><a href='url'><img src="img.gif"></a></td> <td class="class1"><%# DataBinder.Eval(Container.DataItem,"field1") %><...
{ "language": "en", "url": "https://stackoverflow.com/questions/54708", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: What is the best style/syntax to use with Rhino Mocks? Multiple approaches exist to write your unit tests when using Rhino Mocks: * *The Standard Syntax *Record/Replay Syntax *The Fluent Syntax What is the ideal and most frictionless way? A: For .NET 2.0, I recommend the record/playback model. We like this b...
{ "language": "en", "url": "https://stackoverflow.com/questions/54709", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Change the "From:" address in Unix "mail" Sending a message from the Unix command line using mail TO_ADDR results in an email from $USER@$HOSTNAME. Is there a way to change the "From:" address inserted by mail? For the record, I'm using GNU Mailutils 1.1/1.2 on Ubuntu (but I've seen the same behavior with Fedora and...
{ "language": "en", "url": "https://stackoverflow.com/questions/54725", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "99" }
Q: Quality vs. ROI - When is Good Enough, good enough? UPDATED: I'm asking this from a development perspective, however to illustrate, a canoical non-development example that comes to mind is that if it costs, say, $10,000 to keep a uptime rate of 99%, then it theoretically can cost $100,000 to keep a rate of 99.9%, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/54737", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Tool for debugging makefiles I have a large legacy codebase with very complicated makefiles, with lots of variables. Sometimes I need to change them, and I find that it's very difficult to figure out why the change isn't working the way I expect. What I'd like to find is a tool that basically does step-through-deb...
{ "language": "en", "url": "https://stackoverflow.com/questions/54753", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "87" }
Q: How can you do paging with NHibernate? For example, I want to populate a gridview control in an ASP.NET web page with only the data necessary for the # of rows displayed. How can NHibernate support this? A: You can also take advantage of the Futures feature in NHibernate to execute the query to get the total record...
{ "language": "en", "url": "https://stackoverflow.com/questions/54754", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "109" }
Q: Getting the back/fwd history of the WebBrowser Control In C# WinForms, what's the proper way to get the backward/forward history stacks for the System.Windows.Forms.WebBrowser? A: Check out http://www.bsalsa.com/downloads.html. This is a series of Delphi components (free source code, you can see an example of this ...
{ "language": "en", "url": "https://stackoverflow.com/questions/54758", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Unfiltering NSPasteboard Is there a way to unfilter an NSPasteboard for what the source application specifically declared it would provide? I'm attempting to serialize pasteboard data in my application. When another application places an RTF file on a pasteboard and then I ask for the available types, I get eleven ...
{ "language": "en", "url": "https://stackoverflow.com/questions/54760", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: ClickOnce Deployment, system update required Microsoft.mshtml We have an application that works with MS Office and uses Microsoft.mshtml.dll. We use ClickOnce to deploy the application. The application deploys without issues on most machines, but sometimes we get errors saying "System Update Required, Microsoft.msht...
{ "language": "en", "url": "https://stackoverflow.com/questions/54770", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Website Monitoring Libraries There has been some talk of Website performance monitoring tools and services on stackoverflow, however, they seem fairly expensive for what they actually do. Are there any good opensource libraries for automating checking/monitoring the availability of a website? A: If you just want t...
{ "language": "en", "url": "https://stackoverflow.com/questions/54771", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: What is the correct .NET exception to throw when try to insert a duplicate object into a collection? I have an Asset object that has a property AssignedSoftware, which is a collection. I want to make sure that the same piece of Software is not assigned to an Asset more than once. In Add method I check to see if t...
{ "language": "en", "url": "https://stackoverflow.com/questions/54789", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Is it possible to build MSBuild files (visual studio sln) from the command line in Mono? Is it possible to build Visual Studio solutions without having to fire up MonoDevelop? A: Current status (Mono 2.10, 2011): xbuild is now able to build all versions of Visual Studio / MSBuild projects, including .sln files. Sim...
{ "language": "en", "url": "https://stackoverflow.com/questions/54790", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "64" }
Q: Conferences and training for architects, best practices, It's getting close to the time when I need to submit training and travel requests. I'm looking for conferences and classes in the coming 12 months that are geared toward improving coding and software development, best practices, system architecture, etc. They ...
{ "language": "en", "url": "https://stackoverflow.com/questions/54791", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Limiting CPU speed for profiling I'm trying to optimize several bottlenecks on an application which is supposed to run on a really wide range of CPUs and architectures (some of them very close to embeded devices). The results of my profiler, however, aren't really significant because of the speed of my CPU. Is there...
{ "language": "en", "url": "https://stackoverflow.com/questions/54795", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: How do you implement Levenshtein distance in Delphi? I'm posting this in the spirit of answering your own questions. The question I had was: How can I implement the Levenshtein algorithm for calculating edit-distance between two strings, as described here, in Delphi? Just a note on performance: This thing is very fa...
{ "language": "en", "url": "https://stackoverflow.com/questions/54797", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "20" }
Q: How to best merge information, at a server, into a "form", a PDF being generated as the final output Background: I have a VB6 application I've "inherited" that generates a PDF for the user to review using unsupported Acrobat Reader OCX integration. The program generates an FDF file with the data, then renders the m...
{ "language": "en", "url": "https://stackoverflow.com/questions/54808", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Prevent Multi-Line ASP:Textbox from trimming line feeds I have the following webform: <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="TestWebApp.Default" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitio...
{ "language": "en", "url": "https://stackoverflow.com/questions/54833", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How can I monitor trace output of a .Net app? I'm working on some code that uses the System.Diagnostics.Trace class and I'm wondering how to monitor what is written via calls to Trace.WriteLine() both when running in debug mode in Visual Studio and when running outside the debugger. A: Try Debug View. It works quit...
{ "language": "en", "url": "https://stackoverflow.com/questions/54836", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }