text
stringlengths
8
267k
meta
dict
Q: Do you continue development in a branch or in the trunk? Suppose you're developing a software product that has periodic releases. What are the best practices with regard to branching and merging? Slicing off periodic release branches to the public (or whomever your customer is) and then continuing development on the...
{ "language": "en", "url": "https://stackoverflow.com/questions/35646", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "171" }
Q: Windows Home Server versus Vista Backup and Restore Center I've been using Window Home Server for my backups here at home for most of a year now, and I'm really pleased with it. It's far better than the software I was using previously (Acronis). I'm thinking about a backup strategy for my work machine and I'd like...
{ "language": "en", "url": "https://stackoverflow.com/questions/35669", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I begin using SVN? I am ready to start using SVN, but I have NO (as in the money required for free beer) experience with source control. I have installed subversion on my server (that was easy, 'apt-get install subversion') but now I don't know what to do, how to configure it, or how to use it.What suggestio...
{ "language": "en", "url": "https://stackoverflow.com/questions/35670", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: What is the best architecture to bridge to XMPP? If I have a separate system with its own concept of users and presence, what is the most appropriate architecture for creating a bridge to an XMPP server network? As far as I can tell there are three primary ways: * *Act as a server. This creates one touchpoint, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/35677", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: "Multi-agent computing" in simple terms I've encountered the term "multi-agent computing" as of late, and I don't quite get what it is. I've read a book about it, but that didn't answer the fundamental question of what an agent was. Does someone out there have a pointer to some reference which is clear and concise a...
{ "language": "en", "url": "https://stackoverflow.com/questions/35698", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: On a two-column page, how can I grow the left div to the same height of the right div using CSS or Javascript? I'm trying to make a two-column page using a div-based layout (no tables please!). Problem is, I can't grow the left div to match the height of the right one. My right div typically has a lot of content. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/35699", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: Writing cross-platform apps in C What things should be kept most in mind when writing cross-platform applications in C? Targeted platforms: 32-bit Intel based PC, Mac, and Linux. I'm especially looking for the type of versatility that Jungle Disk has in their USB desktop edition ( http://www.jungledisk.com/desktop/d...
{ "language": "en", "url": "https://stackoverflow.com/questions/35700", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: Decision making in distributed applications With a distributed application, where you have lots of clients and one main server, should you: * *Make the clients dumb and the server smart: clients are fast and non-invasive. Business rules are needed in only 1 place *Make the clients smart and the server dumb: take...
{ "language": "en", "url": "https://stackoverflow.com/questions/35707", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do I change my Active Sound Card on the Fly? I currently have speakers set up both in my office and in my living room, connected to my PC via two sound cards, and would like to switch the set of speakers I'm outputting to on the fly. Anyone know an application or a windows API call that I can use to change the d...
{ "language": "en", "url": "https://stackoverflow.com/questions/35709", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Seeking code highlighter recommendation for WordPress Can anybody recommend a reliable and decently documented code highlighter for WordPress 2.6.1? I have tried Code Snippet by Roman Roan and Developer Formatter by Gilberto Saraiva. But they don't seem to work as described in the documentation and are mangling the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/35721", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Desktop search utility for pdf,chm and djvu files I want to write a tool that helps me search pdf/chm/djvu files in linux. Any pointers on how to go about it? The major problem is reading/importing data from all these files. Can this be done with C and shell scripting? A: Tracker ships with Ubuntu 8.04 -- it was ...
{ "language": "en", "url": "https://stackoverflow.com/questions/35722", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: FileUpload control inside an UpdatePanel without refreshing the whole page? According to Microsoft the FileUpload control is not compatible with an AJAX UpdatePanel. I am aware that a PostBackTrigger can be added to the submit button of the form like this: <Triggers> <asp:PostBackTrigger ControlID="Button1" /> </...
{ "language": "en", "url": "https://stackoverflow.com/questions/35743", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: Are there any tools to visualize template/class methods and their usage? I have taken over a large code base and would like to get an overview how and where certain classes and their methods are used. Is there any good tool that can somehow visualize the dependencies and draw a nice call tree or something similar? T...
{ "language": "en", "url": "https://stackoverflow.com/questions/35745", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Is it possible to list named events in Windows? I would like to create events for certain resources that are used across various processes and access these events by name. The problem seems to be that the names of the events must be known to all applications referring to them. Is there maybe a way to get a list of n...
{ "language": "en", "url": "https://stackoverflow.com/questions/35748", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Is Python good for big software projects (not web based)? Right now I'm developing mostly in C/C++, but I wrote some small utilities in Python to automatize some tasks and I really love it as language (especially the productivity). Except for the performances (a problem that could be sometimes solved thanks to the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/35753", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "29" }
Q: Linux GUI development I have a large GUI project that I'd like to port to Linux. What is the most recommended framework to utilize for GUI programming in Linux? Are Frameworks such as KDE / Gnome usable for this objective Or is better to use something more generic other than X? I feel like if I chose one of Gnome o...
{ "language": "en", "url": "https://stackoverflow.com/questions/35762", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: How to embed user-specific data in .NET windows setup app at setup download time? I'd like to have a link in my ASP.NET web site that authenticated users click to download a windows app that is already pre-configured with their client ID and some site config data. My goal is no typing required for the user during t...
{ "language": "en", "url": "https://stackoverflow.com/questions/35772", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Formatting tabular data using unicode characters I need to produce a calculation trace file containing tabular data showing intermediate results. I am currently using a combination of the standard ascii pipe symbols (|) and dashes (-) to draw the table lines: E.g. Numerator | Denominator | Result ----------|-------...
{ "language": "en", "url": "https://stackoverflow.com/questions/35782", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: XML serialization in Java? What is the Java analogue of .NET's XML serialization? A: 2008 Answer The "Official" Java API for this is now JAXB - Java API for XML Binding. See Tutorial by Oracle. The reference implementation lives at http://jaxb.java.net/ 2018 Update Note that the Java EE and CORBA Modules are depre...
{ "language": "en", "url": "https://stackoverflow.com/questions/35785", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "107" }
Q: Techniques to detect Polymorphic and Metamorphic viruses? What techniques can be applied to detect Polymorphic and Metamorphic viruses? How difficult is to implement these techniques? Are these techniques being applied in modern day anti-virus softwares? A: I thought most of the virus scanners nowadays use sandbox...
{ "language": "en", "url": "https://stackoverflow.com/questions/35798", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Why is my instance variable not in __dict__? If I create a class A as follows: class A: def __init__(self): self.name = 'A' Inspecting the __dict__ member looks like {'name': 'A'} If however I create a class B: class B: name = 'B' __dict__ is empty. What is the difference between the two, and why d...
{ "language": "en", "url": "https://stackoverflow.com/questions/35805", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "37" }
Q: How to escape os.system() calls? When using os.system() it's often necessary to escape filenames and other arguments passed as parameters to commands. How can I do this? Preferably something that would work on multiple operating systems/shells but in particular for bash. I'm currently doing the following, but am s...
{ "language": "en", "url": "https://stackoverflow.com/questions/35817", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "142" }
Q: Get a list of current windows, and give one of them focus, in .Net Without resorting to PInvoke, is there a way in .net to find out what windows are open? This is slightly different than asking what applications are running in memory. For example, Firefox could be running, but could be more than one window. Basic...
{ "language": "en", "url": "https://stackoverflow.com/questions/35834", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: What is the Difference Between Mercurial and Git? I've been using git for some time now on Windows (with msysGit) and I like the idea of distributed source control. Just recently I've been looking at Mercurial (hg) and it looks interesting. However, I can't wrap my head around the differences between hg and git. Has...
{ "language": "en", "url": "https://stackoverflow.com/questions/35837", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "726" }
Q: How can a Java program get its own process ID? How do I get the id of my Java process? I know there are several platform-dependent hacks, but I would prefer a more generic solution. A: public static long getPID() { String processName = java.lang.management.ManagementFactory.getRuntimeMXBean().getName(); if...
{ "language": "en", "url": "https://stackoverflow.com/questions/35842", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "409" }
Q: VB.NET form Height Question I have a VB6.0 project and I want to convert it in VB.Net. In my VB6.0 application some of the MDI Child form’s height is 17000 and width is 13000. Now I want to set the same form size in VB.Net forms, but it allows maximum form width = 1036, height = 780 for resolution 1024x768. How can ...
{ "language": "en", "url": "https://stackoverflow.com/questions/35848", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: What logging is good logging for your app? So we've discussed logging in passing at my place of work and I was wondering if some of you guys here could give me some ideas of your approaches? Typically our scenario is, no logging really at all, and mostly .NET apps, winforms/WPF clients talking through web services o...
{ "language": "en", "url": "https://stackoverflow.com/questions/35849", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: P/Invoke in Mono What's the current status of Mono's Platform Invoke implementation on Linux and on Solaris? A: Working, usable and stable. It's well tested since quite a lot of mono's own low-level functionality has to be marshaled through it to the underlying operating system. There are some P/Invoke extensions w...
{ "language": "en", "url": "https://stackoverflow.com/questions/35853", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "21" }
Q: Comparison of Lat, Long Coordinates I have a list of more than 15 thousand latitude and longitude coordinates. Given any X,Y coordinates, what is the fastest way to find the closest coordinates on the list? A: I did this once for a web site. I.e. find the dealer within 50 miles of your zip code. I used the great...
{ "language": "en", "url": "https://stackoverflow.com/questions/35870", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Base64 Encoding Image I am building an open search add-on for Firefox/IE and the image needs to be Base64 Encoded so how can I base 64 encode the favicon I have? I am only familiar with PHP A: My synopsis of rfc2397 is: Once you've got your base64 encoded image data put it inside the <Image></Image> tags prefixed w...
{ "language": "en", "url": "https://stackoverflow.com/questions/35879", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "65" }
Q: Grid controls compatible with .NET and Mono? Do you know any grid control compatible with .NET and Mono? DataGridView seems to be quite buggy on Mono, and GTK# controls depends on GTK+ so you need to install it in windows machines where, usually, it's not present. A: You might want to try out the preview of Mono 2....
{ "language": "en", "url": "https://stackoverflow.com/questions/35893", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: How can I play compressed sound files in C# in a portable way? Is there a portable, not patent-restricted way to play compressed sound files in C# / .Net? I want to play short "jingle" sounds on various events occuring in the program. System.Media.SoundPlayer can handle only WAV, but those are typically to big to em...
{ "language": "en", "url": "https://stackoverflow.com/questions/35896", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: How do I autorun an application in a terminal in Ubuntu? I've created a few autorun script files on various USB devices that run bash scripts when they mount. These scripts run "in the background", how do I get them to run in a terminal window? (Like the "Application in Terminal" gnome Launcher type.) A: Run them ...
{ "language": "en", "url": "https://stackoverflow.com/questions/35905", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: 3rd Party UI components for .net Compact Framework? I have a .Net compact framework application with a frankly unimpressive UI. My win32 app uses Dev Express components and looks great, but I can't find anything similar for the compact framework. Can anyone recommend components that will jazz up my UI? Does such a t...
{ "language": "en", "url": "https://stackoverflow.com/questions/35907", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Launch a file with command line arguments without knowing location of exe? Here's the situation: I am trying to launch an application, but the location of the .exe isn't known to me. Now, if the file extension is registered (in Windows), I can do something like: Process.Start("Sample.xls"); However, I need to pass...
{ "language": "en", "url": "https://stackoverflow.com/questions/35914", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Are there any "nice to program" GUI toolkits for Python? I've played around with GTK, TK, wxPython, Cocoa, curses and others. They are are fairly horrible to use.. GTK/TK/wx/curses all seem to basically be direct-ports of the appropriate C libraries, and Cocoa basically mandates using both PyObjC and Interface Build...
{ "language": "en", "url": "https://stackoverflow.com/questions/35922", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: Logging in a PHP webapp I want to keep logs of some things that people do in my app, in some cases so that it can be undone if needed. Is it best to store such logs in a file or a database? I'm completely at a loss as to what the pros and cons are except that it's another table to setup. Is there a third (or fourth ...
{ "language": "en", "url": "https://stackoverflow.com/questions/35943", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Django templates and variable attributes I'm using Google App Engine and Django templates. I have a table that I want to display the objects look something like: Object Result: Items = [item1,item2] Users = [{name='username',item1=3,item2=4},..] The Django template is: <table> <tr align="center"> <th>us...
{ "language": "en", "url": "https://stackoverflow.com/questions/35948", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "38" }
Q: I don't understand std::tr1::unordered_map I need an associative container that makes me index a certain object through a string, but that also keeps the order of insertion, so I can look for a specific object by its name or just iterate on it and retrieve objects in the same order I inserted them. I think this hybr...
{ "language": "en", "url": "https://stackoverflow.com/questions/35950", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How do you full-text search multiple criteria on left-joined tables in SQL Server? I have a query that originally looks like this: select c.Id, c.Name, c.CountryCode, c.CustomerNumber, cacc.AccountNumber, ca.Line1, ca.CityName, ca.PostalCode from dbo.Customer as c left join dbo.CustomerAddress as ca on ca.CustomerId...
{ "language": "en", "url": "https://stackoverflow.com/questions/35954", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Add predefined data for typedef enums in C What is the best approach to define additional data for typedef enums in C? Example: typedef enum { kVizsla = 0, kTerrier = 3, kYellowLab = 10 } DogType; Now I would like to define names for each, for example kVizsla should be "vizsla". I currently use a function tha...
{ "language": "en", "url": "https://stackoverflow.com/questions/35973", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Embed Images in emails created using SQL Server Database Mail I'm working on an email solution in SQL Server ONLY that will use Database Mail to send out HTML formatted emails. The catch is that the images in the HTML need to be embedded in the outgoing email. This wouldn't be a problem if I were using a .net app t...
{ "language": "en", "url": "https://stackoverflow.com/questions/35974", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Rolling back bad changes with svn in Eclipse Let's say I have committed some bad changes to Subversion repository. Then I commit good changes, that I want to keep. What would be easiest way to roll back those bad changes in Eclipse, and keep the good changes? Assuming that files relating to bad changes are not same ...
{ "language": "en", "url": "https://stackoverflow.com/questions/35983", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "83" }
Q: C-like structures in Python Is there a way to conveniently define a C-like structure in Python? I'm tired of writing stuff like: class MyStruct(): def __init__(self, field1, field2, field3): self.field1 = field1 self.field2 = field2 self.field3 = field3 A: Perhaps you are looking for St...
{ "language": "en", "url": "https://stackoverflow.com/questions/35988", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "642" }
Q: Altering database tables in Django I'm considering using Django for a project I'm starting (fyi, a browser-based game) and one of the features I'm liking the most is using syncdb to automatically create the database tables based on the Django models I define (a feature that I can't seem to find in any other framewor...
{ "language": "en", "url": "https://stackoverflow.com/questions/35991", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "62" }
Q: How do I execute a file in Cygwin? How can I execute a.exe using the Cygwin shell? I created a C file in Eclipse on Windows and then used Cygwin to navigate to the directory. I called gcc on the C source file and a.exe was produced. I would like to run a.exe. A: ./a.exe at the prompt A: just type ./a in the shell ...
{ "language": "en", "url": "https://stackoverflow.com/questions/35999", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "49" }
Q: SQL Server 2005 Auto Updated DateTime Column - LastUpdated I have a table defined (see code snippet below). How can I add a constraint or whatever so that the LastUpdate column is automatically updated anytime the row is changed? CREATE TABLE dbo.Profiles ( UserName varchar(100...
{ "language": "en", "url": "https://stackoverflow.com/questions/36001", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: Why is .NET exception not caught by try/catch block? I'm working on a project using the ANTLR parser library for C#. I've built a grammar to parse some text and it works well. However, when the parser comes across an illegal or unexpected token, it throws one of many exceptions. The problem is that in some cases ...
{ "language": "en", "url": "https://stackoverflow.com/questions/36014", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "55" }
Q: Deleting messages from Exchange IMAP mailbox on iPhone I have a secondary Exchange mailbox configured on my iPhone using IMAP. This all appears to work fine except when a message is deleted on the phone, it still shows normally in Outlook. It does not seem to matter what I set the "remove deleted messages" setting t...
{ "language": "en", "url": "https://stackoverflow.com/questions/36019", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to assign a method's output to a textbox value without code behind How do I assign a method's output to a textbox value without code behind? <%@ Page Language="VB" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <script runat="server"> ...
{ "language": "en", "url": "https://stackoverflow.com/questions/36028", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Yaws uses old config file I'm developing a web app on Yaws 1.65 (installed through apt) running on Debian etch on a VPS with UML. Whenever I do /etc/init.d/yaws restart or a stop/start, it initializes according to an old version of the config file (/etc/yaws/yaws.conf). I know this because I changed the docroot fro...
{ "language": "en", "url": "https://stackoverflow.com/questions/36030", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Templates spread across multiple files C++ seems to be rather grouchy when declaring templates across multiple files. More specifically, when working with templated classes, the linker expect all method definitions for the class in a single compiler object file. When you take into account headers, other declarations...
{ "language": "en", "url": "https://stackoverflow.com/questions/36039", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "23" }
Q: Anyone have experience with Sphinx speech recognition? Has anyone used the Sphinx speech recognition stack to build IVR applications? I am looking for open source alternatives to the expensive and somewhat limiting choices from MSFT and others. I have not been able to find a comprehensive package that ties open so...
{ "language": "en", "url": "https://stackoverflow.com/questions/36054", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: What's a good open source VoiceXML implementation? I am trying to find out if it's possible to build a complete IVR application by cobbling together parts from open source projects. Is anyone using a non-commercial VoiceXML implementation to build speech-enabled systems? A: I've tried JVoiceXML in the past and had...
{ "language": "en", "url": "https://stackoverflow.com/questions/36056", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: How do I close a popup window, and open the next page in the main window in ROR? I have a popup window containing a form which gathers data for a report. When I click submit in that window, I want it to close the popup, and open the report in the original window that called the popup. I think I can open the report i...
{ "language": "en", "url": "https://stackoverflow.com/questions/36058", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What is the replacement of Controller.ReadFromRequest in ASP.NET MVC? I am attempting to update a project from ASP.NET MVC Preview 3 to Preview 5 and it seems that Controller.ReadFromRequest(string key) has been removed from the Controller class. Does anyone know of any alternatives to retrieving information based o...
{ "language": "en", "url": "https://stackoverflow.com/questions/36064", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Finding out the source of an exception in C++ after it is caught? I'm looking for an answer in MS VC++. When debugging a large C++ application, which unfortunately has a very extensive usage of C++ exceptions. Sometimes I catch an exception a little later than I actually want. Example in pseudo code: FunctionB() { ...
{ "language": "en", "url": "https://stackoverflow.com/questions/36077", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: PHP mail using Gmail In my PHP web app, I want to be notified via email whenever certain errors occur. I'd like to use my Gmail account for sending these. How could this be done? A: You could use PEAR's mail function with Gmail's SMTP Server Note that when sending e-mail using Gmail's SMTP server, it will look like...
{ "language": "en", "url": "https://stackoverflow.com/questions/36079", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: How to Catch an exception in a using block with .NET 2.0? I'm trying to leverage the using block more and more these days when I have an object that implements IDisposable but one thing I have not figured out is how to catch an exception as I would in a normal try/catch/finally ... any code samples to point me in th...
{ "language": "en", "url": "https://stackoverflow.com/questions/36081", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Subversion or Adobe Version CUE 3 for Photoshop/Illustrator Files This might seem like a stupid question I admit. But I'm in a small shop me plus two designers. Our backups are getting out of hand because they just copy/paste files if they need to make a change (version). I was all set to try Subversion to handle a...
{ "language": "en", "url": "https://stackoverflow.com/questions/36093", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How do I set the name of a window in ROR? How do I "name" a browser window in ROR, such that I can open a page in it later, from another (popup) window (using the target="name" html parameter) A: You have to use JavaScript for this: <script type="text/javascript"> window.name = "MyWindow"; </script> Of course yo...
{ "language": "en", "url": "https://stackoverflow.com/questions/36101", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: What are some alternatives to a bit array? I have an information retrieval application that creates bit arrays on the order of 10s of million bits. The number of "set" bits in the array varies widely, from all clear to all set. Currently, I'm using a straight-forward bit array (java.util.BitSet), so each of my bit a...
{ "language": "en", "url": "https://stackoverflow.com/questions/36106", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: How to get controls in WPF to fill available space? Some WPF controls (like the Button) seem to happily consume all the available space in its' container if you don't specify the height it is to have. And some, like the ones I need to use right now, the (multiline) TextBox and the ListBox seem more worried about jus...
{ "language": "en", "url": "https://stackoverflow.com/questions/36108", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "348" }
Q: Quoting command-line arguments in shell scripts The following shell script takes a list of arguments, turns Unix paths into WINE/Windows paths and invokes the given executable under WINE. #! /bin/sh if [ "${1+set}" != "set" ] then echo "Usage; winewrap EXEC [ARGS...]" exit 1 fi EXEC="$1" shift ARGS="" for p...
{ "language": "en", "url": "https://stackoverflow.com/questions/36109", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Variable Holding data in a while statement I know I must be missing something, but in a while statement how does the variable hold the data, when it finishes the first pass and goes into the second pass? { int num1 = 0 ; int num2 = 0; int num3 = 0; while (num1 < 10) {cout << "enter your first number: "; cin >...
{ "language": "en", "url": "https://stackoverflow.com/questions/36114", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What is the most efficient way to keep track of a specific character's index in a string? Take the following string as an example: "The quick brown fox" Right now the q in quick is at index 4 of the string (starting at 0) and the f in fox is at index 16. Now lets say the user enters some more text into this stri...
{ "language": "en", "url": "https://stackoverflow.com/questions/36122", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Any recommended VC++ settings for better PDB analysis on release builds Are there any VC++ settings I should know about to generate better PDB files that contain more information? I have a crash dump analysis system in place based on the project crashrpt. Also, my production build server has the source code install...
{ "language": "en", "url": "https://stackoverflow.com/questions/36127", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: What are some real life examples of Design Patterns used in software I'm reading through head first design patterns at the moment and while the book is excellent I also would like to see how these are actually used in the real world. If you know of a good example of design pattern usage (preferably in a OSS program ...
{ "language": "en", "url": "https://stackoverflow.com/questions/36129", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How to sort a list of strings? What is the best way of creating an alphabetically sorted list in Python? A: But how does this handle language specific sorting rules? Does it take locale into account? No, list.sort() is a generic sorting function. If you want to sort according to the Unicode rules, you'll have to ...
{ "language": "en", "url": "https://stackoverflow.com/questions/36139", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "477" }
Q: How do you make a post request into a new browser tab using JavaScript / XUL? I'm trying to open a new browser tab with the results of a POST request. I'm trying to do so using a function containing the following code: var windowManager = Components.classes["@mozilla.org/appshell/window-mediator;1"] .getService...
{ "language": "en", "url": "https://stackoverflow.com/questions/36144", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How do you unsubscribe from a ubiquity command I can't seem to find details on how to unsubscribe from ubiquity commands. The command list page only seems to have information about the installed commands and there are no links to deleting them. Am I missing something? A: Go to about:ubiquity in Firefox. Under th...
{ "language": "en", "url": "https://stackoverflow.com/questions/36152", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How expensive is ST_GeomFromText In postgis, is the ST_GeomFromText call very expensive? I ask mostly because I have a frequently called query that attempts to find the point that is nearest another point that matches some criteria, and which is also within a certain distance of that other point, and the way I curr...
{ "language": "en", "url": "https://stackoverflow.com/questions/36182", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Replacing the nth instance of a regex match in Javascript I'm trying to write a regex function that will identify and replace a single instance of a match within a string without affecting the other instances. For example, I have this string: 12||34||56 I want to replace the second set of pipes with ampersands to ...
{ "language": "en", "url": "https://stackoverflow.com/questions/36183", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "29" }
Q: Best Versioning Tools to use for Photoshop/Illustrator and related binary files? I previously asked about Version Cue 3 vs Subversion. I think this is a better question and someone suggested http://www.gridironsoftware.com/Flow/ I hope this question will allow others to join in and suggest other tools or give specif...
{ "language": "en", "url": "https://stackoverflow.com/questions/36186", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: ASP.NET MVC: Structuring Controllers So I'm embarking on an ASP.NET MVC project and while the experience has been a good one overall, I'm not quite as pleased with the spaghetti mess that my controllers have become. I've looked around online (CodeCampServer, etc...) and they all seem to suffer the same issue wherein...
{ "language": "en", "url": "https://stackoverflow.com/questions/36197", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: What should we do to prepare for 2038? I would like to think that some of the software I'm writing today will be used in 30 years. But I am also aware that a lot of it is based upon the UNIX tradition of exposing time as the number of seconds since 1970. #include <stdio.h> #include <time.h> #include <limits.h> void...
{ "language": "en", "url": "https://stackoverflow.com/questions/36239", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "66" }
Q: Dealing with circular dependencies in OCaml I'm writing an interpreter for an experimental language. Three of the main constructs of the language are definitions, statements, and expressions. Definitions can contain statements and expressions, statements can contain definitions and expressions, and one kind of expre...
{ "language": "en", "url": "https://stackoverflow.com/questions/36260", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: How much should one DataSet represent? How much should one DataSet represent? Using the example of an ordering system: While showing your order I also show a list of items similar to one of yours as well as a list of our most popular items. While your items are tangled in a web of relationships involving you and yo...
{ "language": "en", "url": "https://stackoverflow.com/questions/36262", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What is Lazy Loading? What is Lazy Loading? [Edit after reading a few answers] Why do people use this term so often? Say you just use a ASP/ADO recordset and load it with data or ADO.NET Datasource for a gridview. I guess I should have asked why people use the term Lazy Loading, what "other" types are their? A: wi...
{ "language": "en", "url": "https://stackoverflow.com/questions/36274", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "95" }
Q: F# language - hints for newbie Looks like here in StackOveflow there is a group of F# enthusiasts. I'd like to know better this language, so, apart from the functional programming theory, can you point me to the better starting points to start using the F# language? I mean, tutorials, how-tos, but first of all work...
{ "language": "en", "url": "https://stackoverflow.com/questions/36294", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: What's the answer to this Microsoft PDC challenge? In today's channel9.msdn.com video, the PDC guys posted a challenge to decipher this code: 2973853263233233753482843823642933243283 6434928432937228939232737732732535234532 9335283373377282333349287338349365335325 3283443783243263673762933373883363333472 89366393384...
{ "language": "en", "url": "https://stackoverflow.com/questions/36296", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: What is 'Currying'? I've seen references to curried functions in several articles and blogs but I can't find a good explanation (or at least one that makes sense!) A: It can be a way to use functions to make other functions. In javascript: let add = function(x){ return function(y){ return x + y }; }; Woul...
{ "language": "en", "url": "https://stackoverflow.com/questions/36314", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "787" }
Q: Alternative to HttpUtility for .NET 3.5 SP1 client framework? It'd be really nice to target my Windows Forms app to the .NET 3.5 SP1 client framework. But, right now I'm using the HttpUtility.HtmlDecode and HttpUtility.UrlDecode functions, and the MSDN documentation doesn't point to any alternatives inside of, say, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/36315", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: "The system cannot find the file specified" when invoking subprocess.Popen in python I'm trying to use svnmerge.py to merge some files. Under the hood it uses python, and when I use it I get an error - "The system cannot find the file specified". Colleagues at work are running the same version of svnmerge.py, and of...
{ "language": "en", "url": "https://stackoverflow.com/questions/36324", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: How can I store user-tweakable configuration in app.config? I know it is a good idea to store configuration data in app.config (e.g. database connection strings) instead of hardcoing it, even if I am writing an application just for myself. But is there a way to update the configuration data stored in app.config from...
{ "language": "en", "url": "https://stackoverflow.com/questions/36326", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Preview theme in WordPress In the latest version of WordPress, it gives you the opportunity to view a preview of what your site would look like using a different theme. You basically just click on the theme, it takes over the screen and you have a chance to activate or close it (and return to the previous screen, wh...
{ "language": "en", "url": "https://stackoverflow.com/questions/36333", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Why can't SGML::Parser::OpenSP find the symbol __ZTI15SGMLApplication? I'm trying to "install SGML::Parser::OpenSP" from the cpan shell, but it fails on the first "make test". I also get the same error if I go into the build directory and run make test. I believe this bit of the output below is the relevant part. N...
{ "language": "en", "url": "https://stackoverflow.com/questions/36344", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: What are the differences between "generic" types in C++ and Java? Java has generics and C++ provides a very strong programming model with templates. So then, what is the difference between C++ and Java generics? A: C++ has templates. Java has generics, which look kinda sorta like C++ templates, but they're very, ve...
{ "language": "en", "url": "https://stackoverflow.com/questions/36347", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "174" }
Q: How to pass a single object[] to a params object[] I have a method which takes params object[] such as: void Foo(params object[] items) { Console.WriteLine(items[0]); } When I pass two object arrays to this method, it works fine: Foo(new object[]{ (object)"1", (object)"2" }, new object[]{ (object)"3", (object)"...
{ "language": "en", "url": "https://stackoverflow.com/questions/36350", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "128" }
Q: Relative Root with Visual Studio ASP.NET debugger I am working on an ASP.NET project which is physically located at C:\Projects\MyStuff\WebSite2. When I run the app with the Visual Studio debugger it seems that the built in web server considers "C:\Projects\MyStuff\" to be the relative root, not "C:\Projects\MyStuff...
{ "language": "en", "url": "https://stackoverflow.com/questions/36406", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Firefox add-ons What Firefox add-ons do you use that are useful for programmers? A: I'd also recommend the Web Developer extension by Chris Pederick. A: As far as web development, especially for javascript, I find Firebug to be invaluable. Web developer toolbar is also very useful. A: The ones I have are... * ...
{ "language": "en", "url": "https://stackoverflow.com/questions/36407", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "20" }
Q: PHP best practices? What is a good way to remove the code from display pages when developing with PHP. Often the pages I work on need to be editted by an outside person. This person is often confused by lots of blocks of PHP, and also likes to break my code. I've tried moving blocks of code out into functions, so no...
{ "language": "en", "url": "https://stackoverflow.com/questions/36417", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: What are the important Ruby commands? I'm not sure of all of them, but what are the commands to do things like update Ruby, download a new gem, or update an existing gem? What other important things are there? Since it might matter, I'm running Windows. A: By Ruby commands you probably mean the command line program...
{ "language": "en", "url": "https://stackoverflow.com/questions/36430", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Alignment restrictions for malloc()/free() Older K&R (2nd ed.) and other C-language texts I have read that discuss the implementation of a dynamic memory allocator in the style of malloc() and free() usually also mention, in passing, something about data type alignment restrictions. Apparently certain computer hardw...
{ "language": "en", "url": "https://stackoverflow.com/questions/36455", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Designing a threaded commenting system What would be the best way to design a threaded commenting system so that it doesn't hammer the database? A: Modified pre-order tree traversal (or what Matt refers to as "nested set") is the way to go. If you happen to be working in Django, there's a third-party app, django-mp...
{ "language": "en", "url": "https://stackoverflow.com/questions/36475", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Long-term Static Page Caching I maintain several client sites that have no dynamic data whatsoever, everything is static asp.net with c#. Are there any pitfalls to caching the entire page for extreme periods of time, like a week? Kibbee, We use a couple controls on the sites (ad rotator, some of the ajax extensions)...
{ "language": "en", "url": "https://stackoverflow.com/questions/36477", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How do I Send Email from the Command Line? I would like to quickly send email from the command line. I realize there are probably a number of different ways to do this. I'm looking for a simple way to do this from a linux terminal (likely a bash shell but anything should do) and an alternative way to do this on Win...
{ "language": "en", "url": "https://stackoverflow.com/questions/36498", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "21" }
Q: How can I disable DLL Caching in Windows Vista via CMD? I know Windows Vista (and XP) cache recently loaded DLL's in memory... How can this be disabled via the command prompt? A: The only thing you can do is disable SuperFetch, which can be done from the command prompt with this command (there has to be a space bet...
{ "language": "en", "url": "https://stackoverflow.com/questions/36502", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Why functional languages? I see a lot of talk on here about functional languages and stuff. Why would you use one over a "traditional" language? What do they do better? What are they worse at? What's the ideal functional programming application? A: I must be dense, but I still don't get it. Are there any actua...
{ "language": "en", "url": "https://stackoverflow.com/questions/36504", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "345" }
Q: VB.NET Get underlying system.type from nullable type I'm attempting to create a dataset based on the properties of an object. For example, I have an instance of a Person class with properties including ID, Forename, Surname, DOB etc. Using reflection, I'm adding columns to a new dataset based on the object propertie...
{ "language": "en", "url": "https://stackoverflow.com/questions/36511", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }