qid
int64
4
19.1M
question
stringlengths
18
48.3k
answers
list
date
stringlengths
10
10
metadata
list
192,796
<p>Suppose I have an M-file that calculates, for exampleת <code>d=a+b+c</code> (The values on <code>a</code>, <code>b</code>, <code>c</code> were given earlier). </p> <p>What command should I use in order to produce an output M-file showing the result of this sum?</p>
[ { "answer_id": 192841, "author": "Scottie T", "author_id": 6688, "author_profile": "https://Stackoverflow.com/users/6688", "pm_score": 1, "selected": false, "text": "disp(num2str(d));\n" }, { "answer_id": 192859, "author": "Azim J", "author_id": 4612, "author_profile"...
2008/10/10
[ "https://Stackoverflow.com/questions/192796", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
192,801
<p>Trivial data binding examples are just that, trivial. I want to do something a little more complicated and am wondering if there's an easy, built in way to handle it.</p> <pre><code>public partial class Form1 : Form { public Form1() { InitializeComponent(); List&lt;DataStruct&gt; list = new List&lt;Dat...
[ { "answer_id": 192841, "author": "Scottie T", "author_id": 6688, "author_profile": "https://Stackoverflow.com/users/6688", "pm_score": 1, "selected": false, "text": "disp(num2str(d));\n" }, { "answer_id": 192859, "author": "Azim J", "author_id": 4612, "author_profile"...
2008/10/10
[ "https://Stackoverflow.com/questions/192801", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16979/" ]
192,810
<p>I have a home-grown automated build script in the form of a DOS batch file. In part of that script, I check out (with "svn checkout") a section of our SVN repository that includes a bunch of third-party stuff that's used in our projects. This batch file performed pretty well for a long time, but now people have ch...
[ { "answer_id": 2023917, "author": "Michael Hackner", "author_id": 189919, "author_profile": "https://Stackoverflow.com/users/189919", "pm_score": 6, "selected": true, "text": "svn checkout svn update filename svn checkout svn://path/to/repos/directory --depth empty svn list --recursive s...
2008/10/10
[ "https://Stackoverflow.com/questions/192810", "https://Stackoverflow.com", "https://Stackoverflow.com/users/404/" ]
192,822
<p>I know the #warning directive does not exist in vb.net... is there anything like it?<br> I want to be able to throw messages (warnings) at compiler time.</p>
[ { "answer_id": 59661392, "author": "bitlischieber", "author_id": 3767329, "author_profile": "https://Stackoverflow.com/users/3767329", "pm_score": 1, "selected": false, "text": "<ObsoleteAttribute(\"You should no used this method!\", False)>\nSub MySub()\nEnd Sub\n" } ]
2008/10/10
[ "https://Stackoverflow.com/questions/192822", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23893/" ]
192,824
<p>Can I ignore a folder on svn checkout? I need to ignore DOCs folder on checkout at my build server.</p> <p><strong>edit:</strong> Ignore externals isn't an option. I have some externals that I need.</p>
[ { "answer_id": 192835, "author": "John Millikin", "author_id": 3560, "author_profile": "https://Stackoverflow.com/users/3560", "pm_score": 2, "selected": false, "text": "svn checkout --ignore-externals" }, { "answer_id": 218131, "author": "Jon Topper", "author_id": 6945, ...
2008/10/10
[ "https://Stackoverflow.com/questions/192824", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20683/" ]
192,838
<p>I was wondering if it is possible to generate a "core" file, copy if to another machine and then continue execution of the a core file on that machine?</p> <p>I have seen the gcore utility that will make a core file from a running process. But I do not think gdb can continue execution based on a core file.</p> <p>...
[ { "answer_id": 42280061, "author": "Nobilis", "author_id": 1006955, "author_profile": "https://Stackoverflow.com/users/1006955", "pm_score": 2, "selected": false, "text": "sudo apt-get install criu" } ]
2008/10/10
[ "https://Stackoverflow.com/questions/192838", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7743/" ]
192,839
<p>Is it possible to get the machine name, or IP, or MAC address (basically client network information) from javascript running Internet Explorer?</p> <p>I found the following code that seems to accomplish this:</p> <pre><code>function Button1_onclick() { var locator = new ActiveXObject("WbemScripting.SWbemLocator"...
[ { "answer_id": 195351, "author": "Tomalak", "author_id": 18771, "author_profile": "https://Stackoverflow.com/users/18771", "pm_score": 2, "selected": true, "text": "MetaFrameSession MetaFrame_ICA_Client root\\Citrix var MetaFrameSessionObject = 6;\n\nvar oShell = new ActiveXObject(\"WS...
2008/10/10
[ "https://Stackoverflow.com/questions/192839", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1341/" ]
192,862
<p>I'm developing a webapp where the user is given the chance to upload his resume in pdf format. I'm using NHibernate as a data mapper and MS SQL SERVER 2005.</p> <p>I want to be able to save the .pdf file to a given table... any ideas?</p> <p>Thank you very much!</p>
[ { "answer_id": 200565, "author": "huo73", "author_id": 15657, "author_profile": "https://Stackoverflow.com/users/15657", "pm_score": 4, "selected": true, "text": "package com.hibernate.pdf.sample;\n\npublic class TPDFDocument implements java.io.Serializable {\n\n\n private Integer...
2008/10/10
[ "https://Stackoverflow.com/questions/192862", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7595/" ]
192,876
<p>Is there any way to set a system wide memory limit a process can use in Windows XP? I have a couple of unstable apps which do work ok for most of the time but can hit a bug which results in eating whole memory in a matter of seconds (or at least I suppose that's it). This results in a hard reset as Windows becomes t...
[ { "answer_id": 73521886, "author": "Jim Grisham", "author_id": 5711986, "author_profile": "https://Stackoverflow.com/users/5711986", "pm_score": 3, "selected": true, "text": "renice" } ]
2008/10/10
[ "https://Stackoverflow.com/questions/192876", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26943/" ]
192,878
<p>I've been tasked with writing a outlook .MSG files from XML files that have associated metadata. I've tried using the Aspose library, but all of the exposed MapiMessage properties are read only. Using the Outlook Object Model I'm unable to change the creation date, and other properties that I must have access to. I'...
[ { "answer_id": 73521886, "author": "Jim Grisham", "author_id": 5711986, "author_profile": "https://Stackoverflow.com/users/5711986", "pm_score": 3, "selected": true, "text": "renice" } ]
2008/10/10
[ "https://Stackoverflow.com/questions/192878", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
192,888
<p>I have some nested tables that I want to hide/show upon a click on one of the top-level rows.</p> <p>The markup is, in a nutshell, this:</p> <pre> &lt;table&gt; &lt;tr&gt; &lt;td&gt;stuff&lt;/td&gt; .... more tds here &lt;/tr&gt; &lt;tr&gt; &lt;td colspan=some_number&gt; &lt...
[ { "answer_id": 192901, "author": "Mark Biek", "author_id": 305, "author_profile": "https://Stackoverflow.com/users/305", "pm_score": 1, "selected": false, "text": "<td <table" }, { "answer_id": 192904, "author": "Zack The Human", "author_id": 18265, "author_profile": ...
2008/10/10
[ "https://Stackoverflow.com/questions/192888", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22390/" ]
192,892
<p>Has anyone implemented a very large EAV or open schema style database in SQL Server? I'm wondering if there are performance issues with this and how you were able to overcome those obstacles.</p>
[ { "answer_id": 231681, "author": "Bill Karwin", "author_id": 20860, "author_profile": "https://Stackoverflow.com/users/20860", "pm_score": 3, "selected": false, "text": "SELECT e.id, a1.attr_value as \"cost\", a2.attr_value as \"color\",\n a3.attr_value as \"size\", . . .\nFROM entity e...
2008/10/10
[ "https://Stackoverflow.com/questions/192892", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4541/" ]
192,900
<p>Is it possible to set the cursor to 'wait' on the entire html page in a simple way? The idea is to show the user that something is going on while an ajax call is being completed. The code below shows a simplified version of what I tried and also demonstrate the problems I run into:</p> <ol> <li>if an element (#id1)...
[ { "answer_id": 193006, "author": "Kibbee", "author_id": 1862, "author_profile": "https://Stackoverflow.com/users/1862", "pm_score": 4, "selected": false, "text": "<style>\n*{ cursor: inherit;}\nbody{ cursor: wait;}\n</style>\n" }, { "answer_id": 202671, "author": "GameFreak",...
2008/10/10
[ "https://Stackoverflow.com/questions/192900", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20417/" ]
192,907
<p>Python has several ways to parse XML...</p> <p>I understand the very basics of parsing with <strong>SAX</strong>. It functions as a stream parser, with an event-driven API.</p> <p>I understand the <strong>DOM</strong> parser also. It reads the XML into memory and converts it to objects that can be accessed with ...
[ { "answer_id": 194248, "author": "Torsten Marek", "author_id": 9567, "author_profile": "https://Stackoverflow.com/users/9567", "pm_score": 7, "selected": true, "text": "iterparse iterparse <a>This is <b>a</b> test</a>\n test tail b" }, { "answer_id": 15452402, "author": "Paol...
2008/10/10
[ "https://Stackoverflow.com/questions/192907", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16148/" ]
192,915
<p>Within my Subversion project I have a few directories that contain other open source projects that my code needs. For example ffmpeg, freetype, matrixssl and a few others. </p> <p>What is the best way to update SVN to hold the the latest version of one of these projects?</p> <p>Essentially I will be doing the foll...
[ { "answer_id": 192946, "author": "JesperE", "author_id": 13051, "author_profile": "https://Stackoverflow.com/users/13051", "pm_score": 2, "selected": false, "text": "branches/\ntrunk/\nvendor/\n cmake/\n cmake-2.6.0/\n cmake-2.6.1/\n cmake-2.6.2/\n ...\n" ...
2008/10/10
[ "https://Stackoverflow.com/questions/192915", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13676/" ]
192,920
<p><strong>Summary:</strong> I'm developing a persistent Java web application, and I need to make sure that all resources I persist have globally unique identifiers to prevent duplicates.</p> <p><strong>The Fine Print:</strong></p> <ol> <li>I'm not using an RDBMS, so I don't have any fancy sequence generators (such a...
[ { "answer_id": 192947, "author": "Bill K", "author_id": 12943, "author_profile": "https://Stackoverflow.com/users/12943", "pm_score": 1, "selected": false, "text": "(System.currentTimeMillis() << 4) | (staticCounter++ & 15) private static int staticCounter=0;\nprivate final int nBits=4;\...
2008/10/10
[ "https://Stackoverflow.com/questions/192920", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8217/" ]
192,924
<p>Can you get the distinct combination of 2 different fields in a database table? if so, can you provide the SQL example.</p>
[ { "answer_id": 192933, "author": "Howard Pinsley", "author_id": 7961, "author_profile": "https://Stackoverflow.com/users/7961", "pm_score": 8, "selected": true, "text": "select distinct c1, c2 from t\n select c1, c2, count(*)\nfrom t\ngroup by c1, c2\n" }, { "answer_id": 15370893...
2008/10/10
[ "https://Stackoverflow.com/questions/192924", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4653/" ]
192,938
<p>When in Outlook 2003, open the Address Book, select Tools->Options. You get the address dialog showing the option "When sending mail, check names using these address lists in the following order:"</p> <p><img src="https://i.stack.imgur.com/wa79y.jpg" alt="Address dialog"></p> <p>For most people, this will contain...
[ { "answer_id": 17750361, "author": "Dmitry Streblechenko", "author_id": 332059, "author_profile": "https://Stackoverflow.com/users/332059", "pm_score": 0, "selected": false, "text": "IAddrBook.SetSearchPath RDOSession.AddressBook.SearchPath" } ]
2008/10/10
[ "https://Stackoverflow.com/questions/192938", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3347/" ]
192,944
<p>I am trying to build a homebrew web brower to get more proficient at Cocoa. I need a good way to validate whether the user has entered a valid URL. I have tried some regular expressions but NSString has some interesting quirks and doesn't like some of the back-quoting that most regular expressions I've seen use.</p>...
[ { "answer_id": 193171, "author": "Jon Shea", "author_id": 3770, "author_profile": "https://Stackoverflow.com/users/3770", "pm_score": 4, "selected": true, "text": "+ (id)URLWithString:(NSString *)URLString NSURL nil baseURL host parameterString path" } ]
2008/10/10
[ "https://Stackoverflow.com/questions/192944", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26948/" ]
192,951
<p>What's the fastest way to get a framebuffer and render to in software on the iPhone?</p> <p>Basically getting into a mode 13h style thing going so I can make some effects? :)</p>
[ { "answer_id": 192983, "author": "Mark Bessey", "author_id": 17826, "author_profile": "https://Stackoverflow.com/users/17826", "pm_score": 3, "selected": true, "text": "CGImageContext frameBuffer" } ]
2008/10/10
[ "https://Stackoverflow.com/questions/192951", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8005/" ]
192,957
<p>Lets say that I have 10,000 regexes and one string and I want to find out if the string matches any of them and get all the matches. The trivial way to do it would be to just query the string one by one against all regexes. Is there a faster,more efficient way to do it? </p> <p>EDIT: I have tried substituting it wi...
[ { "answer_id": 192995, "author": "Markus Jarderot", "author_id": 22364, "author_profile": "https://Stackoverflow.com/users/22364", "pm_score": 2, "selected": false, "text": "(?=(regex1)?)(?=(regex2)?)(?=(regex3)?)...(?=(regex20)?)\n undefined None null" }, { "answer_id": 193027, ...
2008/10/10
[ "https://Stackoverflow.com/questions/192957", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13820/" ]
192,960
<p>I have a TListBox with multiselect and ExtendedSelect both set to true. I need to be able to drag multiple items in the list box to re-arrange them. My problem is what happens when the user clicks on an item that is already selected without holding down the CTRL or SHIFT key.</p> <p>Case 1: DragMode is set to dmMa...
[ { "answer_id": 192995, "author": "Markus Jarderot", "author_id": 22364, "author_profile": "https://Stackoverflow.com/users/22364", "pm_score": 2, "selected": false, "text": "(?=(regex1)?)(?=(regex2)?)(?=(regex3)?)...(?=(regex20)?)\n undefined None null" }, { "answer_id": 193027, ...
2008/10/10
[ "https://Stackoverflow.com/questions/192960", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6174/" ]
192,976
<p>I have a similar problem to <a href="https://stackoverflow.com/questions/174535/google-maps-overlays">this post</a>. I need to display up to 1000 polygons on an embedded Google map. The polygons are in a SQL database, and I can render each one as a single KML file on the fly using a custom HttpHandler (in ASP.NET), ...
[ { "answer_id": 228776, "author": "Daniel Beardsley", "author_id": 13216, "author_profile": "https://Stackoverflow.com/users/13216", "pm_score": 0, "selected": false, "text": "P[0..n] T[n] P[n-1], P[n], P[n+1] Max T[1..n-1] T[i] P[i] T[n-1], T[n+1] Max" } ]
2008/10/10
[ "https://Stackoverflow.com/questions/192976", "https://Stackoverflow.com", "https://Stackoverflow.com/users/239663/" ]
192,978
<p>I am working on a process to allow people to upload PDF files and manage the document (page order) via a web based interface.</p> <p>The pages of the PDF file need to be cropped to a particular size for printing and currently we run them through a Photoshop action that takes care of this.</p> <p>What I want to do ...
[ { "answer_id": 228776, "author": "Daniel Beardsley", "author_id": 13216, "author_profile": "https://Stackoverflow.com/users/13216", "pm_score": 0, "selected": false, "text": "P[0..n] T[n] P[n-1], P[n], P[n+1] Max T[1..n-1] T[i] P[i] T[n-1], T[n+1] Max" } ]
2008/10/10
[ "https://Stackoverflow.com/questions/192978", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
192,980
<p>I've recently created these two (unrelated) methods to replace lots of boiler-plate code in my winforms application. As far as I can tell, they work ok, but I need some reassurance/advice on whether there are some problems I might be missing.</p> <p>(from memory)</p> <pre><code>static class SafeInvoker { //Uti...
[ { "answer_id": 193038, "author": "programmer", "author_id": 5289, "author_profile": "https://Stackoverflow.com/users/5289", "pm_score": 5, "selected": true, "text": "//Replaces OnMyEventRaised boiler-plate code\n//Usage: SafeInvoker.RaiseEvent(this, MyEventRaised)\npublic static void Rai...
2008/10/10
[ "https://Stackoverflow.com/questions/192980", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11410/" ]
192,985
<p>I have a class which extends <code>DefaultTableCellRenderer</code>, which renders strings in a monospace font, with a particular color. By default, it appears that tabs are not rendered at all (0 spaces). How can I set the tab size and/or cause them to be rendered?</p> <p><strong>edits:</strong> By "tabs" I mean ta...
[ { "answer_id": 193287, "author": "Tom Hawtin - tackline", "author_id": 4725, "author_profile": "https://Stackoverflow.com/users/4725", "pm_score": 2, "selected": false, "text": "DefaultTableCellRenderer JLabel JLabel TableCellRenderer JPanel JLabel JComponent paintComponent" } ]
2008/10/10
[ "https://Stackoverflow.com/questions/192985", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26960/" ]
192,998
<p>I have some custom SharePoint site definitions that are deployed via SharePoint wsp solution packages. They appear to work fine. I can deploy them fine via the stsadm command line, and my C# code running in some features can also deploy sites based on them. My <code>webtemp.*.xml</code> files appear to be correc...
[ { "answer_id": 815391, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 1, "selected": false, "text": "stsadm -o execadmsvcjobs\n" }, { "answer_id": 9710852, "author": "Jason S", "author_id": 691965, "author_p...
2008/10/10
[ "https://Stackoverflow.com/questions/192998", "https://Stackoverflow.com", "https://Stackoverflow.com/users/404/" ]
193,020
<p>If I define a constant in a Perl module, how do I use that constant in my main program? (Or how do I call that constant in the main program?)</p>
[ { "answer_id": 193031, "author": "friedo", "author_id": 20745, "author_profile": "https://Stackoverflow.com/users/20745", "pm_score": 6, "selected": false, "text": "package Foo;\nuse strict;\nuse warnings;\n\nuse base 'Exporter';\n\nuse constant CONST => 42;\n\nour @EXPORT_OK = ('CONST')...
2008/10/10
[ "https://Stackoverflow.com/questions/193020", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26964/" ]
193,044
<p>Languages like C and even C# (which technically doesn't have a preprocessor) allow you to write code like:</p> <pre><code>#DEFINE DEBUG ... string returnedStr = this.SomeFoo(); #if DEBUG Debug.WriteLine("returned string =" + returnedStr); #endif </code></pre> <p>This is something I like to use in my code as a...
[ { "answer_id": 193072, "author": "Owen", "author_id": 4853, "author_profile": "https://Stackoverflow.com/users/4853", "pm_score": 4, "selected": true, "text": "define('DEBUG', true);\n...\nif (DEBUG):\n $debug->writeLine(\"stuff\");\nendif;\n $str = 'string';\nDEBUG ? $debug->writeLine(...
2008/10/10
[ "https://Stackoverflow.com/questions/193044", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10708/" ]
193,077
<p>How can I distribute a standalone Python application in Linux?</p> <p>I think I can take for granted the presence of a recent Python interpreter in any modern distribution. The problem is dealing with those libraries that do not belong to the standard library, i.e. wxPython, scipy, python cryptographic toolkit, rep...
[ { "answer_id": 195770, "author": "HUAGHAGUAH", "author_id": 27233, "author_profile": "https://Stackoverflow.com/users/27233", "pm_score": 3, "selected": false, "text": "# program startup code\nimport os\nimport sys\nimport site\npath = os.path.abspath(os.path.dirname(__file__))\nver = 'p...
2008/10/10
[ "https://Stackoverflow.com/questions/193077", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18770/" ]
193,080
<p>I really want to put in some sort of section handler into App.config that will execute some code before the application actually starts executing at Main. Is there any way to do such a thing?</p>
[ { "answer_id": 193131, "author": "Ricardo Villamil", "author_id": 19314, "author_profile": "https://Stackoverflow.com/users/19314", "pm_score": 2, "selected": false, "text": "static void Main(string[] args)\n{\n //read your app.config variable\n callAlternate = GetConfigSettings();...
2008/10/10
[ "https://Stackoverflow.com/questions/193080", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14101/" ]
193,092
<p>I am just starting to fiddle with Excel via C# to be able to automate the creation, and addition to an Excel file.</p> <p>I can open the file and update its data and move through the existing worksheets. My problem is how can I add new sheets?</p> <p>I tried:</p> <pre><code>Excel.Worksheet newWorksheet; newWorksh...
[ { "answer_id": 193323, "author": "AR.", "author_id": 1354, "author_profile": "https://Stackoverflow.com/users/1354", "pm_score": 6, "selected": true, "text": "Microsoft Excel 11.0 Object Library private void AddWorksheetToExcelWorkbook(string fullFilename,string worksheetName)\n{\n Mi...
2008/10/10
[ "https://Stackoverflow.com/questions/193092", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6486/" ]
193,107
<p>I am using Oracle SQL (in SQLDeveloper, using the SQL Worksheet). I would like to print a statement before my select, such as</p> <pre><code>PRINT 'Querying Table1'; SELECT * from Table1; </code></pre> <p>What do I use to Print / show text output? It's not Print, because that gives me the error: Bind Variable <c...
[ { "answer_id": 193158, "author": "Eddie Awad", "author_id": 17273, "author_profile": "https://Stackoverflow.com/users/17273", "pm_score": 4, "selected": false, "text": "set echo on\nREM Querying table\nselect * from dual;\n" }, { "answer_id": 195000, "author": "Leigh Riffel",...
2008/10/10
[ "https://Stackoverflow.com/questions/193107", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22523/" ]
193,119
<p>I need to have my iPhone Objective-C code catch Javascript errors in a UIWebView. That includes uncaught exceptions, syntax errors when loading files, undefined variable references, etc.</p> <p>This is for a development environment, so it doesn't need to be SDK-kosher. In fact, it only really needs to work on the...
[ { "answer_id": 193212, "author": "kdbdallas", "author_id": 26728, "author_profile": "https://Stackoverflow.com/users/26728", "pm_score": 0, "selected": false, "text": "// Dismiss Javascript alerts and telephone confirms\n/*- (void)alertSheet:(UIAlertSheet*)sheet buttonClicked:(int)button...
2008/10/10
[ "https://Stackoverflow.com/questions/193119", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16952/" ]
193,124
<p>I have an ASPX page that creates an XMLDocument object from SQL data and then transforms it into another XML document (RSS feed) using an XSLT file with XPathNavigator and XslCompiledTransform. Occasionally the data will contain smart quotes (\u2019) which results in an error (Unable to translate Unicode character ...
[ { "answer_id": 194525, "author": "Robert Rossney", "author_id": 19403, "author_profile": "https://Stackoverflow.com/users/19403", "pm_score": 1, "selected": false, "text": "ContentEncoding HttpResponse Encoding.UTF16" } ]
2008/10/10
[ "https://Stackoverflow.com/questions/193124", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
193,130
<p>I'd like to have a custom object attached to the application so I can preserve state in it between different html pages in adobe air. Is this possible?</p> <hr> <p>I was asking for a fullblown solution to store a custom js object in memory and persist it between pages loaded from the application sandbox, but this ...
[ { "answer_id": 194276, "author": "Dimitry", "author_id": 27073, "author_profile": "https://Stackoverflow.com/users/27073", "pm_score": 1, "selected": false, "text": "//write an Object to a file\nprivate function writeObject():void {\n var object:Object = new Object();//create an objec...
2008/10/10
[ "https://Stackoverflow.com/questions/193130", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7883/" ]
193,142
<p>I have a WPF app which snaps to screen edges (I just set the .Top or .Left of the window if you're within 20 pixels of the screen edge), but I recently added some code <a href="http://blogs.msdn.com/wpfsdk/archive/2008/09/08/custom-window-chrome-in-wpf.aspx" rel="noreferrer">provided by the WPF SDK Team</a> to "mess...
[ { "answer_id": 260600, "author": "Jaykul", "author_id": 8718, "author_profile": "https://Stackoverflow.com/users/8718", "pm_score": 4, "selected": true, "text": "WM_NCCALCSIZE WM_MOVE WM_WINDOWPOSCHANGED WindowPositionChanged WM_NCCALCSIZE WM_NCCALCSIZE WM_MOVE WM_MOVE WM_NCCALCSIZE WM_W...
2008/10/10
[ "https://Stackoverflow.com/questions/193142", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8718/" ]
193,143
<p>I'm using MSTEST inside Visual Studio 2008. How can I have each unit test method in a certain test class act as if it were the first test to run so that all global state is reset before running each test? I do not want to explicitly clean up the world using TestInitialize, ClassInitialize, AssemblyInitialize, etc. F...
[ { "answer_id": 198562, "author": "Watson", "author_id": 25807, "author_profile": "https://Stackoverflow.com/users/25807", "pm_score": 3, "selected": false, "text": "public static class SingletonHelper {\n public static void CleanDALFactory() \n {\n ...
2008/10/10
[ "https://Stackoverflow.com/questions/193143", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1869/" ]
193,151
<p>So the question is how to distribute/offload the media files from Wordpress posts across multiple domains. </p> <p>The reasoning being to overcome this limitation: "Most browser will only make 2 simultaneous requests to a server, so if you page requires 16 files they will be requested 2 at a time."</p> <p>In relat...
[ { "answer_id": 193447, "author": "Jordan Ogren", "author_id": 21888, "author_profile": "https://Stackoverflow.com/users/21888", "pm_score": 1, "selected": false, "text": "print(\"<link rel=\"stylesheet\" type=\"text/css\" media=\"screen\" href=\"<?php bloginfo('stylesheet_url'); ?>\" />\...
2008/10/10
[ "https://Stackoverflow.com/questions/193151", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
193,154
<p>I am getting the following error when I try to call a stored procedure that contains a SELECT Statement:</p> <blockquote> <p>The operation is not valid for the state of the transaction</p> </blockquote> <p>Here is the structure of my calls:</p> <pre><code>public void MyAddUpdateMethod() { using (Transactio...
[ { "answer_id": 203394, "author": "Michael Kniskern", "author_id": 26327, "author_profile": "https://Stackoverflow.com/users/26327", "pm_score": 7, "selected": true, "text": "public void MyAddUpdateMethod()\n{\n using (TransactionScope Scope = new TransactionScope(TransactionScopeOptio...
2008/10/10
[ "https://Stackoverflow.com/questions/193154", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26327/" ]
193,155
<p>SQL Server (2005/2008)</p> <p>Each of the below statements have the same result. Does anyone know if one outperforms the other?</p> <pre><code>insert into SOMETABLE values ('FieldOneValue','FieldTwoValue',3,4.55,'10/10/2008 16:42:00.000') insert into SOMETABLE select 'FieldOneValue','FieldTwoValue',3,4.55,'...
[ { "answer_id": 193164, "author": "Aaron Smith", "author_id": 12969, "author_profile": "https://Stackoverflow.com/users/12969", "pm_score": 0, "selected": false, "text": "INSERT into SOMETABLE\n(\nSELECT * FROM SOMEOTHERTABLE\n)\n" } ]
2008/10/10
[ "https://Stackoverflow.com/questions/193155", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7870/" ]
193,161
<p>Imagine that you want to develop a non-trivial end-user desktop (not web) application in Python. What is the best way to structure the project's folder hierarchy?</p> <p>Desirable features are ease of maintenance, IDE-friendliness, suitability for source control branching/merging, and easy generation of install pac...
[ { "answer_id": 193181, "author": "S.Lott", "author_id": 10661, "author_profile": "https://Stackoverflow.com/users/10661", "pm_score": 10, "selected": true, "text": "/scripts /bin /tests /lib /doc /apidoc /src /src /lib /bin /src /foo /bar /baz quux /quux PYTHONPATH /path/to/quux/foo QUUX...
2008/10/10
[ "https://Stackoverflow.com/questions/193161", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13402/" ]
193,166
<p>Java process control is notoriously bad - primarily due to inadequate support by the Java VM/JDK classes (e.g. java.lang.Process).</p> <p>I am wondering, are there any good open source libraries out there that are reliable.</p> <p>The requirements would be:</p> <ol> <li>OSS</li> <li>Start/Stop processes</li> <li>...
[ { "answer_id": 4464978, "author": "Ryan", "author_id": 545294, "author_profile": "https://Stackoverflow.com/users/545294", "pm_score": 3, "selected": false, "text": "java.lang.Process" } ]
2008/10/10
[ "https://Stackoverflow.com/questions/193166", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19013/" ]
193,182
<p>Is there any way to get own phone number by standard APIs from iPhone SDK?</p>
[ { "answer_id": 224356, "author": "Robert Sanders", "author_id": 16952, "author_profile": "https://Stackoverflow.com/users/16952", "pm_score": 6, "selected": false, "text": "NSString *num = [[NSUserDefaults standardUserDefaults] stringForKey:@\"SBFormattedPhoneNumber\"];\n WebKitJavaScrip...
2008/10/10
[ "https://Stackoverflow.com/questions/193182", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26980/" ]
193,185
<p>I've got a little problem that's slightly frustrating. Is it possible to set a default value when deserializing xml in C# (.NET 3.5)? Basically I'm trying to deserialize some xml that is not under my control and one element looks like this:</p> <pre><code>&lt;assignee-id type="integer"&gt;38628&lt;/assignee-id&gt; ...
[ { "answer_id": 193874, "author": "Timothy Walters", "author_id": 14454, "author_profile": "https://Stackoverflow.com/users/14454", "pm_score": 3, "selected": true, "text": "<assignees>\n <assignee>\n <assignee-id type=\"integer\">123456</assignee-id>\n </assignee>\n <assignee>\n ...
2008/10/10
[ "https://Stackoverflow.com/questions/193185", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15726/" ]
193,257
<p>Assuming a Read Committed Snapshot transaction isolation setting, is the following statement "atomic" in the sense that you won't ever "lose" a concurrent increment?</p> <pre><code>update mytable set counter = counter + 1 </code></pre> <p>I would assume that in the general case, where this update statement is part...
[ { "answer_id": 193265, "author": "GSerg", "author_id": 11683, "author_profile": "https://Stackoverflow.com/users/11683", "pm_score": 2, "selected": false, "text": "update t\nset counter = counter+1\nfrom t with(updlock, <some other hints maybe>)\nwhere foo = bar\n" }, { "answer_i...
2008/10/10
[ "https://Stackoverflow.com/questions/193257", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26651/" ]
193,260
<p>We're currently running an <code>svnserve</code> instance as NT service. While this works, it's needlessly cumbersome to administer, and I'd like to move on to the much simpler VisualSVN Server. (Bonus side benefits include Windows-integrated authentication and, thanks to HTTP/WebDAV, browsing of the latest revision...
[ { "answer_id": 193265, "author": "GSerg", "author_id": 11683, "author_profile": "https://Stackoverflow.com/users/11683", "pm_score": 2, "selected": false, "text": "update t\nset counter = counter+1\nfrom t with(updlock, <some other hints maybe>)\nwhere foo = bar\n" }, { "answer_i...
2008/10/10
[ "https://Stackoverflow.com/questions/193260", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1600/" ]
193,271
<p>CVS and Subversion both have a handy merge feature so that when you update a source file that you have modified, it merges in changes that others have made on the same file.</p> <p>However, if your changes and the other ones are incompatible - generally if you have both changed the same parts of the code - it will ...
[ { "answer_id": 26581522, "author": "vCillusion", "author_id": 1688718, "author_profile": "https://Stackoverflow.com/users/1688718", "pm_score": 0, "selected": false, "text": "/* DisableWhitespaceDifferences and DisableCaseDifferences. \n* The settings for TortoiseMerge is stored in Regis...
2008/10/10
[ "https://Stackoverflow.com/questions/193271", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3267/" ]
193,273
<p>I'm making a dynamic image for a forum that doesn't allow dynamic images.</p> <p>I tried using .htacess to redirect all *.png files to image.png... which works perfectly, but from here I can't seem to be able to get the filename of the .png that was requested to generate the content. </p> <p>For example:</p> <ol>...
[ { "answer_id": 26581522, "author": "vCillusion", "author_id": 1688718, "author_profile": "https://Stackoverflow.com/users/1688718", "pm_score": 0, "selected": false, "text": "/* DisableWhitespaceDifferences and DisableCaseDifferences. \n* The settings for TortoiseMerge is stored in Regis...
2008/10/10
[ "https://Stackoverflow.com/questions/193273", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26987/" ]
193,288
<p>Most of Apples documentation seems to avoid using autoreleased objects especially when creating gui views, but I want to know what the cost of using autoreleased objects is?</p> <pre><code>UIScrollView *timeline = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 20, 320, 34)]; [self addSubview:timeline]; [timeline...
[ { "answer_id": 193640, "author": "mmalc", "author_id": 23233, "author_profile": "https://Stackoverflow.com/users/23233", "pm_score": 5, "selected": true, "text": "NSString stringWithEtc initWithEtc" }, { "answer_id": 224525, "author": "Dave Dribin", "author_id": 26825, ...
2008/10/10
[ "https://Stackoverflow.com/questions/193288", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26986/" ]
193,293
<p>Given a filename, I need to be able to access certain metadata in an image for a (closed source) project I'm currently developing, without regard to how the metadata is stored (that is, Exif, IPTC, or XMP). In particular, I want to access geotagging data.</p> <p>Is there a way of doing this <b>without</b> requiring...
[ { "answer_id": 2120868, "author": "Dave Cowart", "author_id": 88959, "author_profile": "https://Stackoverflow.com/users/88959", "pm_score": 2, "selected": false, "text": "public static string GetEXIFInfo(System.Drawing.Image img, int propertyItem) {\n return new ASCIIEncoding().GetStr...
2008/10/10
[ "https://Stackoverflow.com/questions/193293", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5697/" ]
193,341
<p>I have a Trac project installed on top of a Subversion implementation (easy to do thanks to Webfaction's control panel), but now I have configuration work to do. With that in mind, are there <em>easy</em> ways to do the following in Trac:</p> <p>1) Ensure that customers can only see a high level progress indicator...
[ { "answer_id": 524915, "author": "Oliver Giesen", "author_id": 9784, "author_profile": "https://Stackoverflow.com/users/9784", "pm_score": 2, "selected": false, "text": "ROADMAP_VIEW" }, { "answer_id": 530173, "author": "Bob Nadler", "author_id": 2514, "author_profile...
2008/10/10
[ "https://Stackoverflow.com/questions/193341", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13990/" ]
193,351
<p>Is it possible to break at runtime when a particular file has been modified? </p> <p>ie. monitor the file and break into a debugger once a change has been made to it.</p> <p>This is for a windows app...is this possible in visual studio or windbg?</p> <p>edit: i should have mentioned that this is for a Win32 app...
[ { "answer_id": 193360, "author": "MusiGenesis", "author_id": 14606, "author_profile": "https://Stackoverflow.com/users/14606", "pm_score": 0, "selected": false, "text": "FileSystemWatcher watcher = new FileSystemWatcher(\"c:filename.txt\");\nwatcher.Changed += new FileSystemEventHandler(...
2008/10/10
[ "https://Stackoverflow.com/questions/193351", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19263/" ]
193,398
<p>Is there an algorithm for accurately multiplying two arbitrarily long integers together? The language I am working with is limited to 64-bit unsigned integer length (maximum integer size of 18446744073709551615). Realistically, I would like to be able to do this by breaking up each number, processing them somehow us...
[ { "answer_id": 193416, "author": "Paige Ruten", "author_id": 813, "author_profile": "https://Stackoverflow.com/users/813", "pm_score": 5, "selected": true, "text": " 45\n x67\n ---\n 315\n+270\n----\n 585\n 101\n x101\n ----\n 101\n 000\n+101\n------\n 11001\n" }, { "ans...
2008/10/10
[ "https://Stackoverflow.com/questions/193398", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14322/" ]
193,440
<pre><code>func() { Object* pNext; func1(pNext); } func1(Object* pNext) { pNext = Segement-&gt;GetFirstPara(0); } </code></pre> <p>I was expecting it to be pointer to firstpara returned from func1() but I'm seeing NULL can some explain and how to fix it to actually return the firstpara() pointer?</p>
[ { "answer_id": 193450, "author": "Matthew Scharley", "author_id": 15537, "author_profile": "https://Stackoverflow.com/users/15537", "pm_score": 2, "selected": false, "text": "Object** pNext func() { \n Object* pNext;\n func1(&pNext);\n}\n\nfunc1(Object** pNext) { *pNext = Segement-...
2008/10/11
[ "https://Stackoverflow.com/questions/193440", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22535/" ]
193,457
<p>I have subclassed <a href="https://docs.oracle.com/javase/9/docs/api/java/awt/Frame.html" rel="nofollow noreferrer"><code>java.awt.Frame</code></a> and have overridden the <a href="https://docs.oracle.com/javase/9/docs/api/java/awt/Window.html#paint-java.awt.Graphics-" rel="nofollow noreferrer"><code>paint()</code><...
[ { "answer_id": 193450, "author": "Matthew Scharley", "author_id": 15537, "author_profile": "https://Stackoverflow.com/users/15537", "pm_score": 2, "selected": false, "text": "Object** pNext func() { \n Object* pNext;\n func1(&pNext);\n}\n\nfunc1(Object** pNext) { *pNext = Segement-...
2008/10/11
[ "https://Stackoverflow.com/questions/193457", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8779/" ]
193,469
<p>I have a collection of Boost unit tests I want to run as a console application.</p> <p>When I'm working on the project and I run the tests I would like to be able to debug the tests, and I would like to have the console stay open after the tests run.</p> <p>I see that if I run in release mode the console window st...
[ { "answer_id": 318975, "author": "Die in Sente", "author_id": 40756, "author_profile": "https://Stackoverflow.com/users/40756", "pm_score": 2, "selected": false, "text": "system(\"pause\") void pause () {\n system (\"pause\");\n}\n\nint main (int argc, char ** argv) {\n // If \"lau...
2008/10/11
[ "https://Stackoverflow.com/questions/193469", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5113/" ]
193,471
<p>As I recall <code>BOOST_MPL_ASSERT</code> was once preferred. Is this still true? Anyone know why?</p>
[ { "answer_id": 193592, "author": "Head Geek", "author_id": 12193, "author_profile": "https://Stackoverflow.com/users/12193", "pm_score": 2, "selected": false, "text": "BOOST_MPL_ASSERT BOOST_MPL_ASSERT_MSG BOOST_STATIC_ASSERT" }, { "answer_id": 687302, "author": "jwfearn", ...
2008/10/11
[ "https://Stackoverflow.com/questions/193471", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10559/" ]
193,474
<p>I want to create an ini file to store some settings for my application. Is it a good idea to find where the jar file is located and create an ini file there? If yes, then how can I find the location of the jar file? </p> <p>But if you know a better solution for something like this, I would like to hear some of them...
[ { "answer_id": 193987, "author": "McDowell", "author_id": 304, "author_profile": "https://Stackoverflow.com/users/304", "pm_score": 6, "selected": true, "text": "/home/user/.eclipse\nC:\\Documents and Settings\\User\\.eclipse\n public static File getSettingsDirectory() {\n String user...
2008/10/11
[ "https://Stackoverflow.com/questions/193474", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8418/" ]
193,483
<p>When using Maven to build an executable JAR, how do I specify the JVM arguments that are used when the JAR is executed?</p> <p>I can specify the main class using <code>&lt;mainClass&gt;</code>. I suspect there's a similar attribute for JVM arguments. Specially I need to specify the maximum memory (example -Xmx500m)...
[ { "answer_id": 195815, "author": "David Carlson", "author_id": 4901, "author_profile": "https://Stackoverflow.com/users/4901", "pm_score": 2, "selected": false, "text": "<mainClass>scratch.Bootstrap</mainClass> package scratch;\n\nimport java.io.BufferedReader;\nimport java.io.IOExceptio...
2008/10/11
[ "https://Stackoverflow.com/questions/193483", "https://Stackoverflow.com", "https://Stackoverflow.com/users/24396/" ]
193,488
<p>I've just started tinkering with XML manipulation with PHP, and i've stumbled into something unexpected. Here's the XML i'm using as a test input:</p> <pre><code>&lt;list&gt; &lt;activity1&gt; running &lt;/activity1&gt; &lt;activity2&gt; swimming &lt;/activity2&gt; &lt;activity3&gt; soccer &lt;/activity...
[ { "answer_id": 193571, "author": "Czimi", "author_id": 3906, "author_profile": "https://Stackoverflow.com/users/3906", "pm_score": 1, "selected": false, "text": "<?php\n$xmldoc = new DOMDocument();\n$xmldoc->load('file.xml', LIBXML_NOBLANKS);\n?>\n" }, { "answer_id": 193736, ...
2008/10/11
[ "https://Stackoverflow.com/questions/193488", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
193,499
<p>What's the easiest way to get the UTC offset in PHP, relative to the current (system) timezone?</p>
[ { "answer_id": 193516, "author": "John Millikin", "author_id": 3560, "author_profile": "https://Stackoverflow.com/users/3560", "pm_score": 5, "selected": false, "text": "timezone_offset_get() $this_tz_str = date_default_timezone_get();\n$this_tz = new DateTimeZone($this_tz_str);\n$now = ...
2008/10/11
[ "https://Stackoverflow.com/questions/193499", "https://Stackoverflow.com", "https://Stackoverflow.com/users/79/" ]
193,514
<p>There is another recent Project Euler question but I think this is a bit more specific (I'm only really interested in PHP based solutions) so I'm asking anyway.</p> <p><a href="http://projecteuler.net/index.php?section=problems&amp;id=5" rel="nofollow noreferrer">Question #5</a> tasks you with: "What is the smalles...
[ { "answer_id": 193521, "author": "C. K. Young", "author_id": 13, "author_profile": "https://Stackoverflow.com/users/13", "pm_score": 3, "selected": false, "text": "16 = 2**4 9 = 3**2" }, { "answer_id": 193566, "author": "Czimi", "author_id": 3906, "author_profile": "h...
2008/10/11
[ "https://Stackoverflow.com/questions/193514", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11252/" ]
193,536
<p>I know that JavaScript doesn't support macros (Lisp-style ones) but I was wondering if anyone had a solution to maybe simulate macros? I Googled it, and one of the solutions suggested using <code>eval()</code>, but as he said, would be quite costly.</p> <p>They don't really have to be very fancy. I just want to do s...
[ { "answer_id": 1390694, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 3, "selected": false, "text": "function CPU_CP_A(R,C) { // this function simulates the CP instruction, \n return ''+ // sets CPU flags and stor...
2008/10/11
[ "https://Stackoverflow.com/questions/193536", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13995/" ]
193,540
<p>Has anyone ever given table columns the "fisheye" effect? Im talking about an expanding effect of the table columns when hovering the mouse over them. I'd love to see some code if anyone has tried this.</p> <p>EDIT: ...or an accordian effect</p>
[ { "answer_id": 193857, "author": "Wayne", "author_id": 8236, "author_profile": "https://Stackoverflow.com/users/8236", "pm_score": 2, "selected": false, "text": "<html>\n<head>\n<script type=\"text/javascript\" src=\"jquery.js\"></script>\n<script type=\"text/javascript\">\n$(document).r...
2008/10/11
[ "https://Stackoverflow.com/questions/193540", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16435/" ]
193,547
<p>I have stumbled into several methods of looping in JavaScript, what I like the most is:</p> <pre><code>for(var i = 0; i &lt; a.length; i++){ var element = a[i]; } </code></pre> <p>But as tested here (<a href="http://www.robertnyman.com/2008/04/11/javascript-loop-performance/" rel="noreferrer">http://www.robert...
[ { "answer_id": 193553, "author": "Kibbee", "author_id": 1862, "author_profile": "https://Stackoverflow.com/users/1862", "pm_score": 2, "selected": false, "text": "Var max = a.length-1;\nvar i = 0;\n\nwhile(i <= max)\n{\nvar element = a[i];\ni++;\n}\n" }, { "answer_id": 193563, ...
2008/10/11
[ "https://Stackoverflow.com/questions/193547", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13995/" ]
193,560
<p>Intuitively, it would seems that a compiler for language <code>Foo</code> cannot itself be written in Foo. More specifically, the <em>first</em> compiler for language <code>Foo</code> cannot be written in Foo, but any subsequent compiler could be written for <code>Foo</code>.</p> <p>But is this actually true? I hav...
[ { "answer_id": 193832, "author": "Federico A. Ramponi", "author_id": 18770, "author_profile": "https://Stackoverflow.com/users/18770", "pm_score": 6, "selected": false, "text": "make bootstrap\n" }, { "answer_id": 256679, "author": "Marc Gravell", "author_id": 23354, ...
2008/10/11
[ "https://Stackoverflow.com/questions/193560", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2648/" ]
193,561
<p>I have managed to create an <a href="http://docs.sencha.com/ext-js/3-4/#!/api/Ext.tree.TreeNode" rel="nofollow noreferrer">Ext.tree.TreePanel</a> that loads child nodes dynamically, but I'm having a difficult time clearing the tree and loading it with new data. Can someone help me with the code to do this?</p>
[ { "answer_id": 193617, "author": "slmcmahon", "author_id": 26233, "author_profile": "https://Stackoverflow.com/users/26233", "pm_score": 1, "selected": false, "text": "if (tree)\n{\n var delNode;\n while (delNode = tree.root.childNodes[0])\n tree.root.removeChild(delNode);\n...
2008/10/11
[ "https://Stackoverflow.com/questions/193561", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26233/" ]
193,593
<p>I have a small financial application with PHP as the front end and MySQL as the back end. I have ancient prejudices, and I store money values in MySQL as an integer of cents. My HTML forms allow input of dollar values, like "156.64" and I use PHP to convert that to cents and then I store the cents in the database.</...
[ { "answer_id": 193621, "author": "Cade Roux", "author_id": 18255, "author_profile": "https://Stackoverflow.com/users/18255", "pm_score": 2, "selected": false, "text": "DECIMAL NUMERIC MONEY" }, { "answer_id": 193650, "author": "Steve Clay", "author_id": 3779, "author_...
2008/10/11
[ "https://Stackoverflow.com/questions/193593", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13667/" ]
193,602
<p>Does anyone know of a really simple way of publishing Java methods as web services? I don't really want the overhead of using Tomcat or Jetty or any of the other container frameworks.</p> <p>Scenario: I've got a set of Java methods in a service type application that I want to access from other machines on the local...
[ { "answer_id": 193623, "author": "Simon Lehmann", "author_id": 27011, "author_profile": "https://Stackoverflow.com/users/27011", "pm_score": 4, "selected": true, "text": "<service name=\"name of the service\" scope=\"<one of request, session or application>\">\n <description>\n opt...
2008/10/11
[ "https://Stackoverflow.com/questions/193602", "https://Stackoverflow.com", "https://Stackoverflow.com/users/826/" ]
193,603
<p>I'm looking for a simple file format to use for wireframe models. I am aware of VRML, u3D, etc, but these seem heavyweight for my needs. My criterea are:</p> <ul> <li>Must have a clear spec. Either open or very well established/documented.</li> <li>I only need (want) simple models - vertices and edges. I don't want...
[ { "answer_id": 193633, "author": "lajos", "author_id": 3740, "author_profile": "https://Stackoverflow.com/users/3740", "pm_score": 3, "selected": false, "text": "v -0.500000 -0.000000 0.500000\nv 0.000000 -0.000000 0.500000\nv 0.500000 -0.000000 0.500000\nv -0.500000 0.000000 0.000000\nv...
2008/10/11
[ "https://Stackoverflow.com/questions/193603", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26334/" ]
193,629
<p>When I give Java and C large floats and doubles (in the billion range), they convert them to scientific notation, losing precision in the process. How can I stop this behavior?</p>
[ { "answer_id": 193635, "author": "James Curran", "author_id": 12725, "author_profile": "https://Stackoverflow.com/users/12725", "pm_score": 3, "selected": false, "text": "printf(\"%10f\", dbl);\n" } ]
2008/10/11
[ "https://Stackoverflow.com/questions/193629", "https://Stackoverflow.com", "https://Stackoverflow.com/users/24391/" ]
193,630
<p>I've implemented a few poor solutions for bringing up an AJAX loader before dynamically updating a content DIV, but none seem to be "universal", and I find each time I do it I'm reworking it. If I have a DIV with content that updates depending on what a user clicks on the page, and I want to display the loader over ...
[ { "answer_id": 194262, "author": "Dimitry", "author_id": 27073, "author_profile": "https://Stackoverflow.com/users/27073", "pm_score": 3, "selected": true, "text": "Ajax.Responders.register({\n onCreate: function() {\n $('loader').show();\n Ajax.activeRequestCount++;\n },\n onCo...
2008/10/11
[ "https://Stackoverflow.com/questions/193630", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
193,634
<p>Is it possible to create a footer div that sits at the bottom of a site regardless of how much information is present in the middle?</p> <p>Currently the div I have is positioned depending on how much content i have in the body.</p> <blockquote> <h3>See also:</h3> <p><a href="https://stackoverflow.com/quest...
[ { "answer_id": 193637, "author": "JasonS", "author_id": 1865, "author_profile": "https://Stackoverflow.com/users/1865", "pm_score": 5, "selected": true, "text": ".d_footer\n{\n position:fixed;\n bottom:0px;\n background-color: #336699;\n width:100%;\n text-align:center;\n ...
2008/10/11
[ "https://Stackoverflow.com/questions/193634", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17211/" ]
193,651
<p>I've had my first go at writing a DLL in Delphi. So far so good. By using a typelib I've been able to pass Widestrings to and from the DLL without difficulty.</p> <p>What's curious at the moment is that I'm using VB6 as the testbed, and every time I run a test within the IDE, the program runs and then the IDE proce...
[ { "answer_id": 193774, "author": "GSerg", "author_id": 11683, "author_profile": "https://Stackoverflow.com/users/11683", "pm_score": 2, "selected": false, "text": "result := PWideString(s);\n" }, { "answer_id": 193972, "author": "Hugh Allen", "author_id": 15069, "auth...
2008/10/11
[ "https://Stackoverflow.com/questions/193651", "https://Stackoverflow.com", "https://Stackoverflow.com/users/426/" ]
193,656
<p>Can I put the painter into the class variables? :</p> <pre><code>protected: QPainter *myPainter; ... void MyWidget::paintEvent(QPaintEvent *event) { myPainter = new QPainter(this); </code></pre>
[ { "answer_id": 193658, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 2, "selected": false, "text": "void MyWidget::paintEvent(QPaintEvent *event)\n{\n QPainter painter(this);\n // use painter\n ...\n // paint objec...
2008/10/11
[ "https://Stackoverflow.com/questions/193656", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19884/" ]
193,663
<p>Classic ASP had 'server side includes' so that one could easily design a generic layout for the header, footer, left or right side bar.</p> <p>In ASP.NET, I think we must use 'Page Templates'. Although most people say that it is easy to use, I find it rather complicated, as we must copy the whole HTML code inside t...
[ { "answer_id": 193725, "author": "Rajeshwaran S P", "author_id": 21995, "author_profile": "https://Stackoverflow.com/users/21995", "pm_score": 0, "selected": false, "text": "<asp:content id='page_contents'>" } ]
2008/10/11
[ "https://Stackoverflow.com/questions/193663", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15065/" ]
193,686
<p>I enabled PHP5 on my website and my webhost needs me to add the following to .htaccess files for PHP5 to work:</p> <blockquote> <p>AddHandler application/x-httpd-php5 .php5 .php4 .php .php3 .php2 .phtml<br> AddType application/x-httpd-php5 .php5 .php4 .php .php3 .php2 .phtml </p> </blockquote> <p>Locally, I am...
[ { "answer_id": 194006, "author": "Kornel", "author_id": 27009, "author_profile": "https://Stackoverflow.com/users/27009", "pm_score": 2, "selected": false, "text": "<IfDefine> AddType <IfDefine !MyServer>\nAddType application/x-httpd-php5 .php5 …\n…\n</IfDefine>\n apachectl -D MyServer\n...
2008/10/11
[ "https://Stackoverflow.com/questions/193686", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
193,701
<p>I am working on developing a pair of libraries to work with a REST API. Because I need to be able to use the API in very different settings I'm currently planning to have a version in PHP (for web applications) and a second version in Python (for desktop applications, and long running processes). Are there any bes...
[ { "answer_id": 193709, "author": "Daniel Spiewak", "author_id": 9815, "author_profile": "https://Stackoverflow.com/users/9815", "pm_score": 0, "selected": false, "text": "MyCompany::Foo bar_baz() com.mycompany.rest.Foo barBaz()" } ]
2008/10/11
[ "https://Stackoverflow.com/questions/193701", "https://Stackoverflow.com", "https://Stackoverflow.com/users/24215/" ]
193,703
<p>recently I've been reading through Scott Meyers's excellent <a href="https://rads.stackoverflow.com/amzn/click/com/0321334876" rel="noreferrer" rel="nofollow noreferrer">Effective C++</a> book. In one of the last tips he covered some of the features from TR1 - I knew many of them via Boost. </p> <p>However, there w...
[ { "answer_id": 193752, "author": "Nick", "author_id": 26240, "author_profile": "https://Stackoverflow.com/users/26240", "pm_score": 5, "selected": true, "text": "void Increment( int& iValue )\n{\n iValue++;\n}\n\nint iVariable = 0;\nboost::function< void () > fIncrementMyVariable = bo...
2008/10/11
[ "https://Stackoverflow.com/questions/193703", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14069/" ]
193,707
<p>What is a preferred way to store recurring time windows? <br /> For example. If I have a calendar system where I need to be able to accommodate daily, weekly or monthly recurring events, what sort of time management system is best? <br /><br /> How is this best represented in a database? </p> <p><strong>More Detail...
[ { "answer_id": 193752, "author": "Nick", "author_id": 26240, "author_profile": "https://Stackoverflow.com/users/26240", "pm_score": 5, "selected": true, "text": "void Increment( int& iValue )\n{\n iValue++;\n}\n\nint iVariable = 0;\nboost::function< void () > fIncrementMyVariable = bo...
2008/10/11
[ "https://Stackoverflow.com/questions/193707", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8880/" ]
193,708
<p>I hear that tr1::result_of gets used frequently inside of Boost... I'm wondering if there are any good (simple) use cases for tr1::result_of I can use at home.</p>
[ { "answer_id": 193803, "author": "Lev", "author_id": 7224, "author_profile": "https://Stackoverflow.com/users/7224", "pm_score": 2, "selected": false, "text": "BOOST_AUTO BOOST_AUTO(x, make_pair(a, b));\n" } ]
2008/10/11
[ "https://Stackoverflow.com/questions/193708", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14069/" ]
193,715
<p>atoi() is giving me this error:</p> <pre><code> error C2664: 'atoi' : cannot convert parameter 1 from 'char' to 'const char *' Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast </code></pre> <p>from this line: int pid = atoi( token.at(0) ); where t...
[ { "answer_id": 193717, "author": "Jason Etheridge", "author_id": 2193, "author_profile": "https://Stackoverflow.com/users/2193", "pm_score": 2, "selected": false, "text": "int pid = atoi(std::string(1, token.at(0)).c_str());\n" }, { "answer_id": 193722, "author": "Paige Ruten...
2008/10/11
[ "https://Stackoverflow.com/questions/193715", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
193,728
<p>Is there a free XML formatting (indent) tool available where I can past an XML string and have it formatted so I can read the XML document correctly?</p> <p>Thanks</p> <p>Edit ~ I am using XML Notepad on Windows XP.</p>
[ { "answer_id": 193745, "author": "zoul", "author_id": 17279, "author_profile": "https://Stackoverflow.com/users/17279", "pm_score": 6, "selected": false, "text": "xmllint --format" }, { "answer_id": 193753, "author": "Guy", "author_id": 1463, "author_profile": "https:...
2008/10/11
[ "https://Stackoverflow.com/questions/193728", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23667/" ]
193,771
<p>As part of learning jQuery, I decided to do a simple tic-tac-toe game in JavaScript and, at the moment, I'm using a HTML table for spacing and using graphic images within the table.</p> <p>The images are either a small circle or a big X or O. When the user clicks on a circle, it changes to an X or O then checks wh...
[ { "answer_id": 193799, "author": "Owen", "author_id": 4853, "author_profile": "https://Stackoverflow.com/users/4853", "pm_score": 2, "selected": false, "text": "<!-- your html -->\n<div id=\"board\">\n <div class=\"square\" id=\"topLeft\">&nbsp;</div>\n <div class=\"square\" id=\"topCe...
2008/10/11
[ "https://Stackoverflow.com/questions/193771", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14860/" ]
193,773
<p>You often see, on sites like <a href="http://en.wikipedia.org/wiki/The_Daily_WTF" rel="nofollow noreferrer">The Daily WTF</a>, examples of overengineered code that should have just been a call to a built-in method within the .NET framework.</p> <p>What namespaces/classes should be considered essential knowledge for...
[ { "answer_id": 193796, "author": "Inisheer", "author_id": 2982, "author_profile": "https://Stackoverflow.com/users/2982", "pm_score": 5, "selected": true, "text": "System;\nSystem.Collections;\nSystem.Collections.Generic;\n" }, { "answer_id": 193815, "author": "James Newton-K...
2008/10/11
[ "https://Stackoverflow.com/questions/193773", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1588/" ]
193,780
<p>I have 2-3 different column names that I want to look up in the entire database and list out all tables which have those columns. Is there any easy script?</p>
[ { "answer_id": 193788, "author": "GSerg", "author_id": 11683, "author_profile": "https://Stackoverflow.com/users/11683", "pm_score": 8, "selected": false, "text": "SELECT TABLE_NAME, COLUMN_NAME\nFROM INFORMATION_SCHEMA.COLUMNS\nWHERE COLUMN_NAME LIKE '%wild%';\n" }, { "answer_id...
2008/10/11
[ "https://Stackoverflow.com/questions/193780", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8091/" ]
193,794
<p>How can I change a file's extension using PHP?</p> <p>Ex: photo.jpg to photo.exe</p>
[ { "answer_id": 193795, "author": "Galen", "author_id": 7894, "author_profile": "https://Stackoverflow.com/users/7894", "pm_score": 3, "selected": false, "text": "rename(string $from, string $to, ?resource $context = null)" }, { "answer_id": 193798, "author": "Paige Ruten", ...
2008/10/11
[ "https://Stackoverflow.com/questions/193794", "https://Stackoverflow.com", "https://Stackoverflow.com/users/27025/" ]
193,835
<p>I'm looking to move some of my lighter weight metaprogramming from Nemerle to Boo and I'm trying to figure out how to define custom operators. For example, I can do the following in Nemerle:</p> <pre><code>macro @&lt;-(func, v) { &lt;[ $func($v) ]&gt; } </code></pre> <p>Then these two are equivalent:</p> <pr...
[ { "answer_id": 1110562, "author": "Marcus Griep", "author_id": 28645, "author_profile": "https://Stackoverflow.com/users/28645", "pm_score": 4, "selected": true, "text": "op_addition" } ]
2008/10/11
[ "https://Stackoverflow.com/questions/193835", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4977/" ]
193,838
<p>I want to do a conditional rendering at the layout level based on the actual template has defined <code>content_for(:an__area)</code>, any idea how to get this done?</p>
[ { "answer_id": 194243, "author": "William Yeung", "author_id": 16371, "author_profile": "https://Stackoverflow.com/users/16371", "pm_score": 1, "selected": false, "text": " def content_defined?(symbol)\n content_var_name=\"@content_for_\" + \n if symbol.kind_of? Symbol \n ...
2008/10/11
[ "https://Stackoverflow.com/questions/193838", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16371/" ]
193,852
<p>I have the following character string: </p> <pre><code>"..1....10..20....30...40....50...80..." </code></pre> <p>and I need to extract all numbers from it into array. </p> <p>What is the best way to do it in C? </p>
[ { "answer_id": 193858, "author": "Greg Hewgill", "author_id": 893, "author_profile": "https://Stackoverflow.com/users/893", "pm_score": 4, "selected": false, "text": "strtok() strtok_r() char str[] = \"..1...10...20\";\nchar *p = strtok(str, \".\");\nwhile (p != NULL) {\n printf(\"%d\...
2008/10/11
[ "https://Stackoverflow.com/questions/193852", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
193,864
<p>You can structure a C++ program so that (almost) all the code resides in Header files. It essentially looks like a C# or Java program. However, you do need at least one <code>.cpp</code> file to pull in all the header files when compiling. Now I know some people would absolutely detest this idea. But I haven't found...
[ { "answer_id": 193868, "author": "C. K. Young", "author_id": 13, "author_profile": "https://Stackoverflow.com/users/13", "pm_score": 4, "selected": false, "text": ".cpp" }, { "answer_id": 194184, "author": "paercebal", "author_id": 14089, "author_profile": "https://St...
2008/10/11
[ "https://Stackoverflow.com/questions/193864", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15071/" ]
193,875
<p>I have some very simple code to generate an assembly and invoke a method on a contained type. The method gets called and runs correctly, however when I view the generated assembly using Reflector, I don't see the type.</p> <p>Below is the sample code:</p> <pre><code>namespace ConsoleApplication2 { class Progg...
[ { "answer_id": 193932, "author": "alexmac", "author_id": 23066, "author_profile": "https://Stackoverflow.com/users/23066", "pm_score": -1, "selected": false, "text": "print(\" Microsoft.CSharp.CSharpCodeProvider objCodeProvider = new Microsoft.CSharp.CSharpCodeProvider();\n string...
2008/10/11
[ "https://Stackoverflow.com/questions/193875", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26054/" ]
193,918
<p>Given a point such as (0, 0, 0) and a vector like (x, y, z). What is the easiest way to align the negative Z-axis centered at (0, 0, 0) to point in the direction of this vector? Examples using OpenGL would be welcome, but not neccessary.</p>
[ { "answer_id": 194037, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 5, "selected": true, "text": "vec3 target_dir = normalise( vector );\nfloat rot_angle = acos( dot_product(target_dir,z_axis) );\nif( fabs(rot_angle) > a_very...
2008/10/11
[ "https://Stackoverflow.com/questions/193918", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12828/" ]
193,919
<p>I am a little confused by the multitude of ways in which you can import modules in Python. </p> <pre><code>import X import X as Y from A import B </code></pre> <p>I have been reading up about scoping and namespaces, but I would like some practical advice on what is the best strategy, under which circumstances and...
[ { "answer_id": 193927, "author": "MvdD", "author_id": 18044, "author_profile": "https://Stackoverflow.com/users/18044", "pm_score": 4, "selected": false, "text": "import X from X import Y import X as Y def main():\n import sys\n if len(sys.argv) > 1:\n pass\n" }, { "answer_...
2008/10/11
[ "https://Stackoverflow.com/questions/193919", "https://Stackoverflow.com", "https://Stackoverflow.com/users/24039/" ]
193,939
<p>What is the difference between the CIL instructions "Call" and "Callvirt"?</p>
[ { "answer_id": 193952, "author": "C. K. Young", "author_id": 13, "author_profile": "https://Stackoverflow.com/users/13", "pm_score": 7, "selected": true, "text": "call callvirt this" }, { "answer_id": 193955, "author": "Drew Noakes", "author_id": 24874, "author_profil...
2008/10/11
[ "https://Stackoverflow.com/questions/193939", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26054/" ]
193,965
<p>I love the Ruby RSpec BDD development style. Are there any good tools for doing this with C/C++?</p>
[ { "answer_id": 7065024, "author": "Tony Bai", "author_id": 207003, "author_profile": "https://Stackoverflow.com/users/207003", "pm_score": 2, "selected": false, "text": "FEATURE(1, \"strstr\")\n SCENARIO(\"The strstr finds the first occurrence of the substring in the source string\")\...
2008/10/11
[ "https://Stackoverflow.com/questions/193965", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6805/" ]
193,973
<p>It obviously depends on the context you are using them in but, I was wondering if there is a universally accepted way to name such variables, or at least in a mathematical context.</p> <p>I've often seen:</p> <pre><code>float k = someValue; float oneMinusK = 1 - k; </code></pre> <p>...which seems as descr...
[ { "answer_id": 193978, "author": "Vinko Vrsalovic", "author_id": 5190, "author_profile": "https://Stackoverflow.com/users/5190", "pm_score": 5, "selected": true, "text": "float will_win_lottery = 0.00000000001;\nfloat will_not_win_lottery = 1 - will_win_lottery;\n" }, { "answer_i...
2008/10/11
[ "https://Stackoverflow.com/questions/193973", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7839/" ]
193,994
<p>I'm writing a construct in PHP where a parser determins which function to call dynamically, kind of like this:</p> <pre><code>// The definition of what to call $function_call_spec = array( "prototype" =&gt; "myFunction", "parameters" =&gt; array( "first_par" =&gt; "Hello", ...
[ { "answer_id": 193998, "author": "moo", "author_id": 23107, "author_profile": "https://Stackoverflow.com/users/23107", "pm_score": 3, "selected": false, "text": "call_user_func_array($funcPrototype, $function_call_spec[\"parameters\"]);\n function InvokeFunction($function, $args = array(...
2008/10/11
[ "https://Stackoverflow.com/questions/193994", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7891/" ]
194,032
<p>I need to build a little webapp but I'm not sure what is the best thing to do.</p> <p>A person that subscribe the petition is signing an email sent to <em>X</em>. This will be also saved to a db in order to show online who subscribed.</p> <p>The idea is to have a standard text message, the user submit his name and...
[ { "answer_id": 194074, "author": "Oli", "author_id": 12870, "author_profile": "https://Stackoverflow.com/users/12870", "pm_score": 3, "selected": true, "text": "<a href=\"mailto:... mailto:" } ]
2008/10/11
[ "https://Stackoverflow.com/questions/194032", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21384/" ]