qid
int64
4
22.2M
question
stringlengths
18
48.3k
answers
list
date
stringlengths
10
10
metadata
list
327,366
<p>I have two tables with the same columns, and I need to copy one table's rows to the other table's rows to create one big table with all the values from both tables. Right now I am doing this query to return the same thing:</p> <pre><code>SELECT col1, col2, col3 from Table1 union SELECT col1, col2, col3 from Table2...
[ { "answer_id": 327369, "author": "Tommy", "author_id": 1270, "author_profile": "https://Stackoverflow.com/users/1270", "pm_score": 5, "selected": true, "text": "SELECT col1, col2, col3 \nINTO Table1\nFROM Table2 \n" }, { "answer_id": 327374, "author": "Dustin", "author_id...
2008/11/29
[ "https://Stackoverflow.com/questions/327366", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2504/" ]
327,372
<p>How is a breakpoint implemented on PPC (On OS X, to be specific)?</p> <p>For example, on x86 it's typically done with the INT 3 instruction (0xCC) -- is there an instruction comparable to this for ppc? Or is there some other way they're set/implemented?</p>
[ { "answer_id": 327540, "author": "atzz", "author_id": 23252, "author_profile": "https://Stackoverflow.com/users/23252", "pm_score": 2, "selected": false, "text": "IABR" }, { "answer_id": 10286705, "author": "tc.", "author_id": 349112, "author_profile": "https://Stacko...
2008/11/29
[ "https://Stackoverflow.com/questions/327372", "https://Stackoverflow.com", "https://Stackoverflow.com/users/41764/" ]
327,379
<p>For one of the projects I'm doing right now, I need to look at the performance (amongst other things) of different <a href="http://en.wikipedia.org/wiki/Concurrent_computing" rel="nofollow noreferrer">concurrent enabled</a> programming languages.</p> <p>At the moment I'm looking into comparing <a href="http://www.s...
[ { "answer_id": 327860, "author": "sven", "author_id": 46, "author_profile": "https://Stackoverflow.com/users/46", "pm_score": 0, "selected": false, "text": "#include <cstdlib> //for atoi\n#include <iostream>\n#include <iomanip> //for setw and setfill\n#include <vector>\n\n\nint DoThread(...
2008/11/29
[ "https://Stackoverflow.com/questions/327379", "https://Stackoverflow.com", "https://Stackoverflow.com/users/46/" ]
327,382
<p>We have a large ASP.Net website that has a single css stylesheet which is getting out of control.</p> <p>I am thinking of using the following strategy (taken from <a href="http://www.techrepublic.com/article/developing-a-css-strategy/5437796/" rel="nofollow noreferrer">http://www.techrepublic.com/article/developing-...
[ { "answer_id": 327498, "author": "Chris Hawes", "author_id": 22776, "author_profile": "https://Stackoverflow.com/users/22776", "pm_score": 1, "selected": false, "text": "layout.css\ncontent.css\nmenu.css\ntypography.css\n" }, { "answer_id": 330147, "author": "Cody Caughlan", ...
2008/11/29
[ "https://Stackoverflow.com/questions/327382", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1127460/" ]
327,401
<p>What is the difference between <code>find-grep</code> and <code>grep-find</code> in Emacs?</p>
[ { "answer_id": 331902, "author": "Derek Slager", "author_id": 18636, "author_profile": "https://Stackoverflow.com/users/18636", "pm_score": 4, "selected": true, "text": "M-x describe-function" } ]
2008/11/29
[ "https://Stackoverflow.com/questions/327401", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6068/" ]
327,404
<p>I'm attempting to write a couple of NAnt tasks for interacting with Microsoft Virtual Server 2005 R2 SP1, and I've lifted the code found on "Virtual PC Guy's WebLog", in the <a href="http://blogs.msdn.com/virtual_pc_guy/archive/2006/06/13/630165.aspx" rel="nofollow noreferrer">"Controlling Virtual Server through Pow...
[ { "answer_id": 331902, "author": "Derek Slager", "author_id": 18636, "author_profile": "https://Stackoverflow.com/users/18636", "pm_score": 4, "selected": true, "text": "M-x describe-function" } ]
2008/11/29
[ "https://Stackoverflow.com/questions/327404", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8446/" ]
327,408
<p>I'm trying to run dot net console application via Java:</p> <pre><code>process = Runtime.getRuntime().exec(commandLine); </code></pre> <p>I get the following output:</p> <pre><code>Detecting The handle is invalid. </code></pre> <p>when running it directly via the console (windows) there is no problem:</p> <pre>...
[ { "answer_id": 472257, "author": "Markus Lausberg", "author_id": 39062, "author_profile": "https://Stackoverflow.com/users/39062", "pm_score": 0, "selected": false, "text": "Runtime r = Runtime.getRuntime();\nmStartProcess = r.exec(applicationName, null, fileToExecute);\n\nStreamLogger o...
2008/11/29
[ "https://Stackoverflow.com/questions/327408", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
327,411
<p>I've tried <a href="http://www.vim.org/scripts/script.php?script_id=159" rel="noreferrer">MiniBufExplorer</a>, but I usually end up with several windows showing it or close it altogether. What I'd like is something like <a href="http://www.vim.org/scripts/script.php?script_id=2050" rel="noreferrer">LustyJuggler</a> ...
[ { "answer_id": 327457, "author": "orip", "author_id": 37020, "author_profile": "https://Stackoverflow.com/users/37020", "pm_score": 5, "selected": false, "text": ":ls" }, { "answer_id": 327463, "author": "Terminus", "author_id": 7053, "author_profile": "https://Stacko...
2008/11/29
[ "https://Stackoverflow.com/questions/327411", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9204/" ]
327,415
<p>Using Windows key as Meta is very useful in Emacs, is there the way to do it in Vim?</p>
[ { "answer_id": 327469, "author": "wimh", "author_id": 33499, "author_profile": "https://Stackoverflow.com/users/33499", "pm_score": 3, "selected": false, "text": "#IfWinActive ahk_class GVIM\nRWin::Alt \nLWin::Alt \n#IfWinActive ; This puts subsequent remappings and hotkeys in effect ...
2008/11/29
[ "https://Stackoverflow.com/questions/327415", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9204/" ]
327,417
<p>How would I go about this?</p> <p>I have a mostly static site, which is being hosted on a cheap web-host, which only allows FTP access to the hosting. The site is tracked in git. I am using OS X.</p> <p>I would like to upload a new version of the site by simply doing <code>cap deploy</code></p>
[ { "answer_id": 327441, "author": "Peter Coulton", "author_id": 117, "author_profile": "https://Stackoverflow.com/users/117", "pm_score": 5, "selected": true, "text": "desc \"Sync\"\nnamespace :deploy do\n\n desc \"Sync remote by default\"\n task :default do\n remote.default\n end\n...
2008/11/29
[ "https://Stackoverflow.com/questions/327417", "https://Stackoverflow.com", "https://Stackoverflow.com/users/745/" ]
327,429
<p>I doing a function in Javascript like the VisualBasic DateDiff.</p> <p>You give two dates and the returning time interval (Seconds, Minutes, Days, etc...)</p> <pre><code>DateDiff(ByVal Interval As Microsoft.VisualBasic.DateInterval, _ ByVal Date1 As Date, ByVal Date2 As Date) as Long </code></pre> <p>So what's ...
[ { "answer_id": 327433, "author": "VonC", "author_id": 6309, "author_profile": "https://Stackoverflow.com/users/6309", "pm_score": 3, "selected": false, "text": "Date.getTime()\n" }, { "answer_id": 327458, "author": "Anand", "author_id": 12649, "author_profile": "https...
2008/11/29
[ "https://Stackoverflow.com/questions/327429", "https://Stackoverflow.com", "https://Stackoverflow.com/users/41385/" ]
327,438
<p>I'm writing a service that has five different methods that can take between 5 seconds and 5 minutes to run.</p> <p>The service will schedule these different methods to run at different intervals.</p> <p>I don't want any of the methods to run concurrently, so how do I have the methods check to see if another method...
[ { "answer_id": 327493, "author": "Blair Conrad", "author_id": 1199, "author_profile": "https://Stackoverflow.com/users/1199", "pm_score": 2, "selected": false, "text": "class ServiceClass\n{\n private object thisLock = new object();\n\n public Method1()\n {\n lock ( th...
2008/11/29
[ "https://Stackoverflow.com/questions/327438", "https://Stackoverflow.com", "https://Stackoverflow.com/users/366/" ]
327,448
<p>I have found many tutorials about using Windows Server 2003 as a development machine, and very little information about Windows Server 2008 for the same purpose.</p> <p>For a nicer experience, I have followed the steps from <a href="http://www.win2008workstation.com/wordpress/" rel="nofollow noreferrer">Convert you...
[ { "answer_id": 327451, "author": "alexandrul", "author_id": 19756, "author_profile": "https://Stackoverflow.com/users/19756", "pm_score": 4, "selected": true, "text": "SQL Server 2005 - installation order" } ]
2008/11/29
[ "https://Stackoverflow.com/questions/327448", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19756/" ]
327,454
<p>I need to have some information about the Scoping issue in Javascript. I know that it spports lexical(static) scoping, but, does not it support dynamic scoping as well? If you know anything about the scoping in Javascript, would you please share them with me ?</p> <p>Thanks</p>
[ { "answer_id": 327485, "author": "Piotr Lesnicki", "author_id": 38796, "author_profile": "https://Stackoverflow.com/users/38796", "pm_score": 4, "selected": true, "text": "var foo = \"old\";\nif (true) {var foo = \"new\";}\nalert (foo == \"new\")\n" } ]
2008/11/29
[ "https://Stackoverflow.com/questions/327454", "https://Stackoverflow.com", "https://Stackoverflow.com/users/41777/" ]
327,483
<p>I'm trying to do the following in python:</p> <p>In a file called foo.py:</p> <pre><code># simple function that does something: def myFunction(a,b,c): print "call to myFunction:",a,b,c # class used to store some data: class data: fn = None # assign function to the class for storage. data.fn = myFunction </co...
[ { "answer_id": 327488, "author": "André", "author_id": 9683, "author_profile": "https://Stackoverflow.com/users/9683", "pm_score": 6, "selected": true, "text": "data.fn = staticmethod(myFunction)\n" }, { "answer_id": 327530, "author": "Matthew Schinckel", "author_id": 188...
2008/11/29
[ "https://Stackoverflow.com/questions/327483", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1304/" ]
327,486
<p>I need to stop the execution Is there any procedures for using terminate and suspend activity</p>
[ { "answer_id": 356864, "author": "gbanfill", "author_id": 45068, "author_profile": "https://Stackoverflow.com/users/45068", "pm_score": 2, "selected": true, "text": "WorkflowInstance instance = runtime.GetWorkflow(instanceId);\ninstance.Suspend(\"Paused for some good reason\");\n\n// do ...
2008/11/29
[ "https://Stackoverflow.com/questions/327486", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22162/" ]
327,487
<p>i have problem i want to </p> <p>select name_magazine from magazine</p> <p>and i already import all library needed</p> <p>and </p> <blockquote> <p>Query q = EntityManger.createQuery ("SELECT name_magazine FROM Magazine");</p> <p>List results = (List) q.getResultList ();</p> <p>For(Sting s : result)</...
[ { "answer_id": 327497, "author": "Vincent Ramdhanie", "author_id": 27439, "author_profile": "https://Stackoverflow.com/users/27439", "pm_score": 2, "selected": false, "text": " select m from Magazine m\n" }, { "answer_id": 327504, "author": "Guðmundur Bjarni", "author_id"...
2008/11/29
[ "https://Stackoverflow.com/questions/327487", "https://Stackoverflow.com", "https://Stackoverflow.com/users/41780/" ]
327,499
<p>In standard ASP.net applications ASP.net offered some protection from XSS attacks with validateRequest throwing detect dangerous input errors if some one tried to. This functionality seems to have been taken out of MVC any idea why?</p>
[ { "answer_id": 708810, "author": "Sruly", "author_id": 72453, "author_profile": "https://Stackoverflow.com/users/72453", "pm_score": 3, "selected": false, "text": "[ValidateInput(true)]\npublic ActionResult Foo()\n{\n\n}\n" } ]
2008/11/29
[ "https://Stackoverflow.com/questions/327499", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23066/" ]
327,500
<p>I have a file with n lines. (n above 100 millions)</p> <p>I want to output a file with only 1 of 10 lines, I can't split the file in ten part and keep only one part, as it must be a little more random. later I have to do a statistical analysis I can't afford to create a strong bias in the data).</p> <p>I was think...
[ { "answer_id": 327510, "author": "The Archetypal Paul", "author_id": 21755, "author_profile": "https://Stackoverflow.com/users/21755", "pm_score": 4, "selected": true, "text": "findstr/N . path-to-log-file | findstr ^[0-9]*0:\n" }, { "answer_id": 327523, "author": "paxdiablo"...
2008/11/29
[ "https://Stackoverflow.com/questions/327500", "https://Stackoverflow.com", "https://Stackoverflow.com/users/24334/" ]
327,506
<p>I've a HTML page with several Div's that will show the time difference between now and each given date.</p> <pre><code>&lt;div class="dated" onEvent="calculateHTML(this, 'Sat Jun 09 2007 17:46:21')"&gt; 30 Minutes Ago&lt;/div&gt; </code></pre> <p>I want that time difference to be dynamic (calculated to all element...
[ { "answer_id": 327515, "author": "HUAGHAGUAH", "author_id": 27233, "author_profile": "https://Stackoverflow.com/users/27233", "pm_score": 2, "selected": true, "text": "function adjustDates() {\n var i;\n var elms = document.getElementsByTagName(\"div\");\n for (i = 0; i < elms.l...
2008/11/29
[ "https://Stackoverflow.com/questions/327506", "https://Stackoverflow.com", "https://Stackoverflow.com/users/41385/" ]
327,512
<p>I've created a login submit form in HTML but for some reason user/password autocompletion does not work like I expect in firefox.</p> <p>This is what happens in Firefox:</p> <ul> <li>I give username and password and click on the login button</li> <li>Firefox prompts me if I would like to remember the password. I p...
[ { "answer_id": 329949, "author": "genehack", "author_id": 39933, "author_profile": "https://Stackoverflow.com/users/39933", "pm_score": 0, "selected": false, "text": "autocomplete=\"ON\"" } ]
2008/11/29
[ "https://Stackoverflow.com/questions/327512", "https://Stackoverflow.com", "https://Stackoverflow.com/users/40323/" ]
327,513
<p>I'm looking for a high performance Java library for fuzzy string search.</p> <p>There are numerous algorithms to find similar strings, Levenshtein distance, Daitch-Mokotoff Soundex, n-grams etc.</p> <p>What Java implementations exists? Pros and cons for them? I'm aware of Lucene, any other solution or Lucene is be...
[ { "answer_id": 33125667, "author": "Henno Vermeulen", "author_id": 593533, "author_profile": "https://Stackoverflow.com/users/593533", "pm_score": 4, "selected": false, "text": "public static List<Integer> find(String doc, String pattern, int k)\n" } ]
2008/11/29
[ "https://Stackoverflow.com/questions/327513", "https://Stackoverflow.com", "https://Stackoverflow.com/users/41781/" ]
327,525
<p>I would like to show some links only to authenticated users in an asp.net mvc web application.</p> <ul> <li>I use the template for an asp.net mvc web application in Visual Studio 2008 that came with the beta release of asp.net mvc.</li> <li>I use forms authentication.</li> <li>I would like to add something like the...
[ { "answer_id": 327539, "author": "tvanfosson", "author_id": 12950, "author_profile": "https://Stackoverflow.com/users/12950", "pm_score": 3, "selected": true, "text": " <% if (HttpContext.Current.Request.IsAuthenticated) { %>\n <a href=\"/Account/ChangePassword\">Change password</a>\n...
2008/11/29
[ "https://Stackoverflow.com/questions/327525", "https://Stackoverflow.com", "https://Stackoverflow.com/users/41094/" ]
327,531
<p>i made another post</p> <p><a href="https://stackoverflow.com/questions/326885/a-loop-to-create-neighbor-nodes-in-3d-space">here</a> where I asked how to create the 26 neighbors of a cubic-voxel-node in 3-d space. I got a very good answer and implemented it. </p> <p>To that I added some MIN MAX Position checking.<...
[ { "answer_id": 327547, "author": "Johannes Schaub - litb", "author_id": 34509, "author_profile": "https://Stackoverflow.com/users/34509", "pm_score": 2, "selected": false, "text": "std::vector<Pos> vect1;\nvect1.reserve(27);" }, { "answer_id": 327552, "author": "SoapBox", ...
2008/11/29
[ "https://Stackoverflow.com/questions/327531", "https://Stackoverflow.com", "https://Stackoverflow.com/users/41706/" ]
327,534
<p>I have a list of data that looks like the following:</p> <pre><code>// timestep,x_position,y_position 0,4,7 0,2,7 0,9,5 0,6,7 1,2,5 1,4,7 1,9,0 1,6,8 </code></pre> <p>... and I want to make this look like:</p> <pre><code>0, (4,7), (2,7), (9,5), (6,7) 1, (2,5), (4,7), (9,0), (6.8) </code></pre> <p>My plan was to ...
[ { "answer_id": 327548, "author": "S.Lott", "author_id": 10661, "author_profile": "https://Stackoverflow.com/users/10661", "pm_score": 7, "selected": true, "text": "d[t].append(c)\n" }, { "answer_id": 327558, "author": "JuanDeLosMuertos", "author_id": 39339, "author_pr...
2008/11/29
[ "https://Stackoverflow.com/questions/327534", "https://Stackoverflow.com", "https://Stackoverflow.com/users/41121/" ]
327,544
<p>In my program I have one array with 25 double values 0.04 When I try to sum these values in a loop I get following results:</p> <pre><code>0.0 + 0.04 = 0.04 0.04 + 0.04 = 0.08 0.08 + 0.04 = 0.12 0.12 + 0.04 = 0.16 0.16 + 0.04 = 0.2 0.2 + 0.04 = 0.24000000000000002 0.24000000000000002 + 0.04 = 0.28 0.28 + 0.04 = 0.3...
[ { "answer_id": 327567, "author": "CesarB", "author_id": 28258, "author_profile": "https://Stackoverflow.com/users/28258", "pm_score": 3, "selected": false, "text": "numeric" } ]
2008/11/29
[ "https://Stackoverflow.com/questions/327544", "https://Stackoverflow.com", "https://Stackoverflow.com/users/35594/" ]
327,555
<p>There are important features of Emacs which are missing in Vim, such as the comint mode, and there are no scripts/plugins which can replace them.</p> <p>There are also benefits of Vim over Emacs, such as modal editing and generally better default shortcuts. However, Viper mode gets me both. Vimpulse also enables vi...
[ { "answer_id": 330617, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 5, "selected": true, "text": "vimpulse" }, { "answer_id": 381901, "author": "Community", "author_id": -1, "author_profile": "https://Stac...
2008/11/29
[ "https://Stackoverflow.com/questions/327555", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9204/" ]
327,562
<p>I use codes below to see a result like picture 1, but a result like picture 2 is coming. What should be done to solve it?</p> <p>aspx code:</p> <pre><code>&lt;asp:datalist id="dtlUrun" runat="server" RepeatDirection="Horizontal"&gt; &lt;ItemTemplate&gt; &lt;table class="dtlTable"&gt; ...
[ { "answer_id": 327577, "author": "Mitchel Sellers", "author_id": 13279, "author_profile": "https://Stackoverflow.com/users/13279", "pm_score": 2, "selected": false, "text": "<asp:dataList id=\"\" runat=\"server\">\n <headertemplate>\n <table>\n <tr>\n </headertemp...
2008/11/29
[ "https://Stackoverflow.com/questions/327562", "https://Stackoverflow.com", "https://Stackoverflow.com/users/439507/" ]
327,569
<p>I need to quickly build a parser for a very simplified version of a html-like markup language in Java. In python, I would use pyparsing library to do this. Is there something similar for Java? Please, don't suggest libraries already out there for html parsing, my application is a school assignment which will demonst...
[ { "answer_id": 327600, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 1, "selected": false, "text": "java.util.Scanner" } ]
2008/11/29
[ "https://Stackoverflow.com/questions/327569", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6254/" ]
327,573
<p>If I have a function that needs to work with a <code>shared_ptr</code>, wouldn't it be more efficient to pass it a reference to it (so to avoid copying the <code>shared_ptr</code> object)? What are the possible bad side effects? I envision two possible cases:</p> <p>1) inside the function a copy is made of the argu...
[ { "answer_id": 327581, "author": "Johannes Schaub - litb", "author_id": 34509, "author_profile": "https://Stackoverflow.com/users/34509", "pm_score": 4, "selected": false, "text": "void ClassA::take_copy_of_sp(boost::shared_ptr<foo> sp) {\n m_sp_member.swap(sp);\n}\n" }, { "an...
2008/11/29
[ "https://Stackoverflow.com/questions/327573", "https://Stackoverflow.com", "https://Stackoverflow.com/users/41789/" ]
327,576
<p>How do you plot bar charts in gnuplot with text labels?</p>
[ { "answer_id": 11551808, "author": "Brad", "author_id": 5464, "author_profile": "https://Stackoverflow.com/users/5464", "pm_score": 7, "selected": false, "text": "set boxwidth 0.5\nset style fill solid\nplot \"data.dat\" using 1:3:xtic(2) with boxes\n" }, { "answer_id": 36488276,...
2008/11/29
[ "https://Stackoverflow.com/questions/327576", "https://Stackoverflow.com", "https://Stackoverflow.com/users/40849/" ]
327,597
<p>I'm giving my first steps on Python. I saw that we don't have switch case statement, so I would you guys implement a text Menu in python?</p> <p>Thanks</p>
[ { "answer_id": 327601, "author": "Gonzalo Quero", "author_id": 40996, "author_profile": "https://Stackoverflow.com/users/40996", "pm_score": 2, "selected": false, "text": "n = chosenOption()\nif(n == 0):\n doSomething()\nelif(n == 1):\n doAnyOtherThing()\nelse:\n doDefaultThing(...
2008/11/29
[ "https://Stackoverflow.com/questions/327597", "https://Stackoverflow.com", "https://Stackoverflow.com/users/41795/" ]
327,609
<p>I have a working linker script. I want to add another data section whose contents is pulled directly from a file (ld shouldn't parse it and extract the sections and so on). How can I do that?</p> <pre><code>OUTPUT_FORMAT("elf32-i386") ENTRY(start) SECTIONS { .text 0x100000 : { *(.multiboot) *(.text) *...
[ { "answer_id": 328137, "author": "CesarB", "author_id": 28258, "author_profile": "https://Stackoverflow.com/users/28258", "pm_score": 5, "selected": false, "text": "objcopy" }, { "answer_id": 8517643, "author": "aimxhaisse", "author_id": 1099473, "author_profile": "ht...
2008/11/29
[ "https://Stackoverflow.com/questions/327609", "https://Stackoverflow.com", "https://Stackoverflow.com/users/434760/" ]
327,617
<p>I'm trying to scrape a price from a web page using PHP and Regexes. The price will be in the format £123.12 or $123.12 (i.e., pounds or dollars).</p> <p>I'm loading up the contents using libcurl. The output of which is then going into <code>preg_match_all</code>. So it looks a bit like this:</p> <pre><code>$conten...
[ { "answer_id": 327621, "author": "Patrick Desjardins", "author_id": 13913, "author_profile": "https://Stackoverflow.com/users/13913", "pm_score": 2, "selected": true, "text": "preg_match_all('/(\\$|\\£)[0-9]+(\\.[0-9]{2})/', $contents, $matches);\n" }, { "answer_id": 327624, ...
2008/11/29
[ "https://Stackoverflow.com/questions/327617", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
327,642
<p>Is it possible to pump monochrome (graphical data with 1 bit image depth) texture into OpenGL?</p> <p>I'm currently using this:</p> <pre><code>glTexImage2D( GL_TEXTURE_2D, 0, 1, game-&gt;width, game-&gt;height, 0, GL_LUMINANCE, GL_UNSIGNED_BYTE, game-&gt;culture[game-&gt;phase] ); </code></pre> <p>I'm pumping it ...
[ { "answer_id": 15706596, "author": "Zac", "author_id": 971443, "author_profile": "https://Stackoverflow.com/users/971443", "pm_score": 4, "selected": false, "text": "static GLubyte smiley[] = /* 16x16 smiley face */\n{\n 0x03, 0xc0, /* **** */\n 0x0f, 0xf0, /* *****...
2008/11/29
[ "https://Stackoverflow.com/questions/327642", "https://Stackoverflow.com", "https://Stackoverflow.com/users/38256/" ]
327,643
<p>I see the "More Action" drop-down box in gmail inbox page. It has levels and some disabled item in the list.</p> <p>How to do that in HTML+CSS?</p> <p>Thank you</p>
[ { "answer_id": 327703, "author": "Rob", "author_id": 3542, "author_profile": "https://Stackoverflow.com/users/3542", "pm_score": 3, "selected": true, "text": "<select>" }, { "answer_id": 5614556, "author": "Fernando", "author_id": 522555, "author_profile": "https://St...
2008/11/29
[ "https://Stackoverflow.com/questions/327643", "https://Stackoverflow.com", "https://Stackoverflow.com/users/41803/" ]
327,645
<p>I am migrating a 1.1 winforms app to 2.0. what are the main things i should immediately change because of generics. Here what i have so far:</p> <ol> <li>Replace all hashtables with generic dictionaries</li> <li>Replace all arraylists with List&lt;></li> <li>Replace all CollectionBase derive classes with : List&l...
[ { "answer_id": 327646, "author": "Konrad Rudolph", "author_id": 1968, "author_profile": "https://Stackoverflow.com/users/1968", "pm_score": 4, "selected": true, "text": "IEnumerable" }, { "answer_id": 327720, "author": "denis phillips", "author_id": 748, "author_profi...
2008/11/29
[ "https://Stackoverflow.com/questions/327645", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4653/" ]
327,654
<p>Hashtables have a syncroot property but generic dictionaries don't. If I have code that does this:</p> <pre><code>lock (hashtable.Syncroot) { .... } </code></pre> <p>How do I replicate this if I am removing the hashtable and changing to generic dictionaries?</p>
[ { "answer_id": 327667, "author": "Bryan Watts", "author_id": 37815, "author_profile": "https://Stackoverflow.com/users/37815", "pm_score": 3, "selected": false, "text": "var dictionary = new Dictionary<int, string>();\n\nlock(((ICollection) dictionary).SyncRoot)\n{\n // ...\n}\n" },...
2008/11/29
[ "https://Stackoverflow.com/questions/327654", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4653/" ]
327,656
<p>I am trying to specify an alternative jre (my default is 1.6 and i need to run with jdk 1.4.2) in Eclipse, for an application that i shall launch from eclipse. I am not sure if I am doing the right thing in the following code:</p> <pre><code>Path jreContainerPath = new Path("/usr/lib/jvm/j2sdk1.4.2_18/"); IVMInstal...
[ { "answer_id": 328296, "author": "VonC", "author_id": 6309, "author_profile": "https://Stackoverflow.com/users/6309", "pm_score": 3, "selected": true, "text": "getVMInstall" } ]
2008/11/29
[ "https://Stackoverflow.com/questions/327656", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23486/" ]
327,658
<p>I'm trying to write a VB.Net program that saves 1-2 million 5-field records (plus an indexed ID) to an MSAccess table every day. The saving process currently takes 13-20 hours, which obviously can't be right.</p> <p>Its a flat table with minimal indexing, currently only 156MB. Except for one double field, the fie...
[ { "answer_id": 327773, "author": "Fionnuala", "author_id": 2548, "author_profile": "https://Stackoverflow.com/users/2548", "pm_score": 0, "selected": false, "text": "Set cn = CreateObject(\"ADODB.Connection\")\nstrFile=\"C:\\ltd.mdb\"\nstrCon=\"Provider=Microsoft.Jet.OLEDB.4.0;Data Sourc...
2008/11/29
[ "https://Stackoverflow.com/questions/327658", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
327,664
<p>Tried to map it from Preferences -> Settings -> Keyboard, but the "key" combo box has only "forward delete" but no "delete". My keyboard on the other hand has only "delete" and no "forward delete"!</p> <p>Is there some other way to do it except from the preferences?</p>
[ { "answer_id": 327676, "author": "Andru Luvisi", "author_id": 5922, "author_profile": "https://Stackoverflow.com/users/5922", "pm_score": 10, "selected": true, "text": "Terminal" }, { "answer_id": 30753231, "author": "Stephane Gasparini", "author_id": 4994224, "author...
2008/11/29
[ "https://Stackoverflow.com/questions/327664", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5475/" ]
327,673
<p>I need to convert several million dates stored as wide strings into boost dates</p> <p>The following code works. However, it generates a horrible compiler warning and does not seem efficient.</p> <p>Is there a better way?</p> <pre><code>#include "boost/date_time/gregorian/gregorian.hpp" using namespace boost::gr...
[ { "answer_id": 327680, "author": "Johannes Schaub - litb", "author_id": 34509, "author_profile": "https://Stackoverflow.com/users/34509", "pm_score": 3, "selected": true, "text": "date_time" }, { "answer_id": 327736, "author": "efotinis", "author_id": 12320, "author_p...
2008/11/29
[ "https://Stackoverflow.com/questions/327673", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16582/" ]
327,678
<p>Given the following code,</p> <pre><code>Choices choices = new Choices(); choices.Add(new GrammarBuilder(new SemanticResultValue("product", "&lt;product/&gt;"))); GrammarBuilder builder = new GrammarBuilder(); builder.Append(new SemanticResultKey("options", choices.ToGrammarBuilder())); Grammar grammar = new Gram...
[ { "answer_id": 327680, "author": "Johannes Schaub - litb", "author_id": 34509, "author_profile": "https://Stackoverflow.com/users/34509", "pm_score": 3, "selected": true, "text": "date_time" }, { "answer_id": 327736, "author": "efotinis", "author_id": 12320, "author_p...
2008/11/29
[ "https://Stackoverflow.com/questions/327678", "https://Stackoverflow.com", "https://Stackoverflow.com/users/32498/" ]
327,681
<p>I am using jquery and the getJSON method and I am wondering if there is a way to display a message saying loading before it loads my content. i know with the jquery ajax calls there is the before submit callbacks where you can have something but the getJSON only has like three options.</p> <p>Any ideas?</p>
[ { "answer_id": 327695, "author": "Kent Fredric", "author_id": 15614, "author_profile": "https://Stackoverflow.com/users/15614", "pm_score": 4, "selected": true, "text": ".ajax" }, { "answer_id": 327758, "author": "liggett78", "author_id": 19762, "author_profile": "htt...
2008/11/29
[ "https://Stackoverflow.com/questions/327681", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
327,682
<p>I am loading JSON data to my page and using <code>appendTo()</code> but I am trying to fade in my results, any ideas?</p> <pre><code>$("#posts").fadeIn(); $(content).appendTo("#posts"); </code></pre> <p>I saw that there is a difference between <code>append</code> and <code>appendTo</code>, on the documents.</p> <...
[ { "answer_id": 327694, "author": "Kevin Gorski", "author_id": 35806, "author_profile": "https://Stackoverflow.com/users/35806", "pm_score": 8, "selected": true, "text": "// Create the DOM elements\n$(content)\n// Sets the style of the elements to \"display:none\"\n .hide()\n// Appends...
2008/11/29
[ "https://Stackoverflow.com/questions/327682", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
327,685
<p>I would like to inject binary data into an object in JavaScript. Is there a way to do this? </p> <p>i.e.</p> <pre><code>var binObj = new BinaryObject('101010100101011'); </code></pre> <p>Something to that effect. Any help would be great.</p>
[ { "answer_id": 327688, "author": "Greg", "author_id": 24181, "author_profile": "https://Stackoverflow.com/users/24181", "pm_score": 5, "selected": false, "text": "var bin = parseInt('10101010', 2);" }, { "answer_id": 4411163, "author": "Frithjof", "author_id": 538104, ...
2008/11/29
[ "https://Stackoverflow.com/questions/327685", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
327,700
<p>I'd like to create an application that would run on Google's appengine.</p> <p>However, this application needs to be able to generate PDFs dynamically.</p> <p>How could I do this?</p>
[ { "answer_id": 327747, "author": "Paul Fisher", "author_id": 39808, "author_profile": "https://Stackoverflow.com/users/39808", "pm_score": 6, "selected": true, "text": "reportlab" } ]
2008/11/29
[ "https://Stackoverflow.com/questions/327700", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20498/" ]
327,718
<p>How to list physical disks in Windows? In order to obtain a list of <code>"\\\\.\PhysicalDrive0"</code> available.</p>
[ { "answer_id": 327724, "author": "VonC", "author_id": 6309, "author_profile": "https://Stackoverflow.com/users/6309", "pm_score": 6, "selected": false, "text": "wmic diskdrive list\n" }, { "answer_id": 350304, "author": "Mick", "author_id": 12458, "author_profile": "h...
2008/11/29
[ "https://Stackoverflow.com/questions/327718", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2566/" ]
327,722
<p>I'm trying to get NAnt 0.86b1 running with VS2008 SP1 and x64 XP.</p> <p>I have a basic build file (below) which gives the error Solution format of file 'Solution.sln' is not supported.</p> <p> </p> <pre><code>&lt;property name="nant.settings.currentframework" value="net-3.5" /&gt; &lt;target name="build" descr...
[ { "answer_id": 327740, "author": "Matt Campbell", "author_id": 41110, "author_profile": "https://Stackoverflow.com/users/41110", "pm_score": 3, "selected": false, "text": "<solution" }, { "answer_id": 426455, "author": "Community", "author_id": -1, "author_profile": "...
2008/11/29
[ "https://Stackoverflow.com/questions/327722", "https://Stackoverflow.com", "https://Stackoverflow.com/users/34632/" ]
327,732
<p>We are working on an inquiry management system using J2EE. We're looking at a feature, allowing users to send inquiries to particular mail-id and entering into the database. Catch is to automatically allocate it to some categories. </p>
[ { "answer_id": 327740, "author": "Matt Campbell", "author_id": 41110, "author_profile": "https://Stackoverflow.com/users/41110", "pm_score": 3, "selected": false, "text": "<solution" }, { "answer_id": 426455, "author": "Community", "author_id": -1, "author_profile": "...
2008/11/29
[ "https://Stackoverflow.com/questions/327732", "https://Stackoverflow.com", "https://Stackoverflow.com/users/31590/" ]
327,745
<p><strong>I am very, very new to MYSQL.I tried to create a table named "option".</strong> <strong>My SQL Query is :</strong></p> <p>create table option( </p> <p>id int not null primary key auto_increment,</p> <p>choice varchar(30)</p> <p>)</p> <p><strong>While executing this query it shows the following error</st...
[ { "answer_id": 327752, "author": "Kibbee", "author_id": 1862, "author_profile": "https://Stackoverflow.com/users/1862", "pm_score": 4, "selected": false, "text": "`option`\n" }, { "answer_id": 327753, "author": "Alnitak", "author_id": 6782, "author_profile": "https://...
2008/11/29
[ "https://Stackoverflow.com/questions/327745", "https://Stackoverflow.com", "https://Stackoverflow.com/users/40945/" ]
327,772
<p>I have a Java object which is able to configure itself given an XML configuration description (it takes other descriptions as well, but I'm interested in the XML at the moment). I'm wondering if I can embed the XML description directly into a Spring application context description. I'm imagining something like:</p> ...
[ { "answer_id": 328190, "author": "toolkit", "author_id": 3295, "author_profile": "https://Stackoverflow.com/users/3295", "pm_score": 3, "selected": true, "text": "<constructor-arg>" } ]
2008/11/29
[ "https://Stackoverflow.com/questions/327772", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6716/" ]
327,776
<p>Imagine I have a file with </p> <pre><code>Xpto,50,30,60 Xpto,a,v,c Xpto,1,9,0 Xpto,30,30,60 </code></pre> <p>that txt file can be appended a lot of times and when I open the file I want only to get the values of the last line of the txt file... How can i do that on python? reading the last line?</p>
[ { "answer_id": 327825, "author": "Alex Coventry", "author_id": 1941213, "author_profile": "https://Stackoverflow.com/users/1941213", "pm_score": 3, "selected": false, "text": "os.popen(\"tail -10 \" +\n filepath).readlines()" }, { "answer_id": 327980, "author": "hasen", ...
2008/11/29
[ "https://Stackoverflow.com/questions/327776", "https://Stackoverflow.com", "https://Stackoverflow.com/users/41795/" ]
327,777
<p>I am fairly beginner level at shell scripts and following are the details..</p> <p>Am looking for the best way to fire sql queries and and carry out some logic based on that data. I've used the following snippet..</p> <p>shellvariable=<code>sqlplus $user/$passwd &lt;&lt;END select count(1) from table1; end EOF</co...
[ { "answer_id": 328617, "author": "tardate", "author_id": 6329, "author_profile": "https://Stackoverflow.com/users/6329", "pm_score": 3, "selected": true, "text": "alertlog=$(sqlplus -S \\/ as sysdba 2> /dev/null <<EOF\nSET NEWPAGE 0\nSET SPACE 0\nSET LINESIZE 80\nSET PAGESIZE 0\nSET ECHO...
2008/11/29
[ "https://Stackoverflow.com/questions/327777", "https://Stackoverflow.com", "https://Stackoverflow.com/users/31590/" ]
327,787
<p>I'm creating a user-based website. For each user, I'll need a few MySQL tables to store different types of information (that is, userInfo, quotesSubmitted, and ratesSubmitted). Is it a better idea to:</p> <p>a) Create one database for the site (that is, "mySite") and then hundreds or thousands of tables inside thi...
[ { "answer_id": 327798, "author": "Alnitak", "author_id": 6782, "author_profile": "https://Stackoverflow.com/users/6782", "pm_score": 3, "selected": false, "text": "CREATE TABLE user (\n user INT(10) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,\n ...\n);\n\nCREATE TABLE quote (\n ...
2008/11/29
[ "https://Stackoverflow.com/questions/327787", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1615/" ]
327,793
<p>I have a J2EE-based system which is running currently on Apache Tomcat. We are in discussions to move our production servers to the Glassfish server.</p> <p>Can someone share their experiences with either of them?</p>
[ { "answer_id": 327810, "author": "Johannes Schaub - litb", "author_id": 34509, "author_profile": "https://Stackoverflow.com/users/34509", "pm_score": 5, "selected": false, "text": "grizzly" } ]
2008/11/29
[ "https://Stackoverflow.com/questions/327793", "https://Stackoverflow.com", "https://Stackoverflow.com/users/31590/" ]
327,807
<p>I have a model that looks like this:</p> <pre><code>class Category(models.Model): name = models.CharField(max_length=60) class Item(models.Model): name = models.CharField(max_length=60) category = models.ForeignKey(Category) </code></pre> <p>I want select count (just the count) of items for each categ...
[ { "answer_id": 327987, "author": "Carl Meyer", "author_id": 3207, "author_profile": "https://Stackoverflow.com/users/3207", "pm_score": 6, "selected": false, "text": "query_set = Item.objects.extra(select={'count': 'count(1)'}, \n order_by=['-count']).values...
2008/11/29
[ "https://Stackoverflow.com/questions/327807", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26592/" ]
327,829
<p>I have a button control style and I want to change the padding from whatever the data-bound version is to adjust for a glyph that needs a 2 pixel offset. I'll use SimpleButton from SimpleStyles.xaml as an example (... shows where the trigger code was removed for conciseness):</p> <pre><code>&lt;Style x:Key="Simple...
[ { "answer_id": 327997, "author": "Jobi Joy", "author_id": 8091, "author_profile": "https://Stackoverflow.com/users/8091", "pm_score": 2, "selected": false, "text": "<Ellipse Fill=\"Blue\" Height=\"50\"\n Width=\"{Binding RelativeSource={RelativeSource Self}, \n Path=Height, Con...
2008/11/29
[ "https://Stackoverflow.com/questions/327829", "https://Stackoverflow.com", "https://Stackoverflow.com/users/30505/" ]
327,836
<p>I have a multi file C program. I'd like the user to be able to specify different debugging levels at run time.</p> <p>What is the best way to implement this?</p> <p>I was thinking of having a debug(level, "message") type function exported and used everywhere. Any better/other ideas?</p>
[ { "answer_id": 327870, "author": "Jonathan Leffler", "author_id": 15168, "author_profile": "https://Stackoverflow.com/users/15168", "pm_score": 2, "selected": false, "text": "-d" }, { "answer_id": 328660, "author": "qrdl", "author_id": 28494, "author_profile": "https:...
2008/11/29
[ "https://Stackoverflow.com/questions/327836", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
327,838
<p>I have a Button style and can't seem to property databind the border's CornerRadius property to the template. This is a dependency property, so it should be data bindable. I wonder if I'm missing the right XAML syntax to use?</p> <pre><code>&lt;Style TargetType="{x:Type Button}" BasedOn="{x:Null}"&gt; ...
[ { "answer_id": 329150, "author": "Kent Boogaart", "author_id": 5380, "author_profile": "https://Stackoverflow.com/users/5380", "pm_score": 4, "selected": true, "text": "CornerRadius" } ]
2008/11/29
[ "https://Stackoverflow.com/questions/327838", "https://Stackoverflow.com", "https://Stackoverflow.com/users/30505/" ]
327,843
<p>A simple problem: If i use escape characters for a property such as</p> <pre><code>&lt;mx:Image id="img" toolTip="\\foo{\\bar}" </code></pre> <p>It wont validate toolTip and therefore not compile.</p> <p>What is the solution ?</p>
[ { "answer_id": 340460, "author": "Jérémy Reynaud", "author_id": 43051, "author_profile": "https://Stackoverflow.com/users/43051", "pm_score": 2, "selected": false, "text": "<mx:Image id=\"img\" source=\"foo.jpg\" width=\"50\" height=\"50\">\n<mx:toolTip>\n <![CDATA[\\foo{\\bar} or any...
2008/11/29
[ "https://Stackoverflow.com/questions/327843", "https://Stackoverflow.com", "https://Stackoverflow.com/users/32032/" ]
327,857
<p>I have a list of input words separated by comma. I want to sort these words by alphabetical and length. How can I do this without using the built-in sorting functions?</p>
[ { "answer_id": 327891, "author": "Eric Schoonover", "author_id": 3957, "author_profile": "https://Stackoverflow.com/users/3957", "pm_score": 2, "selected": false, "text": "public static void Main(string[] args)\n{\n string [] strList = \"a,b,c,d,e,f,a,a,b\".Split(new [] { ',' }, Strin...
2008/11/29
[ "https://Stackoverflow.com/questions/327857", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
327,880
<p>Is there anyway to get the THotkey component in delphi to support the windows key?</p> <p>Or does anyone know of a component that can do this?</p> <p>Thanks heaps!</p>
[ { "answer_id": 343710, "author": "Tom", "author_id": 20979, "author_profile": "https://Stackoverflow.com/users/20979", "pm_score": 2, "selected": false, "text": " TMyCustomHotKey = class(TWinControl)\n public\n WinKey: boolean;\n procedure WMPaint(var Message: TWMPaint); message ...
2008/11/29
[ "https://Stackoverflow.com/questions/327880", "https://Stackoverflow.com", "https://Stackoverflow.com/users/41837/" ]
327,885
<p>In <a href="http://www.asp.net/mvc/" rel="noreferrer">ASP.NET MVC</a>, the <code>ActionResult</code> class, which is the base for all results returned by action methods from a controller, is defined as an abstract class with the single method (&copy; Microsoft):</p> <pre><code>public abstract void ExecuteResult(Con...
[ { "answer_id": 10819629, "author": "fargs", "author_id": 1426411, "author_profile": "https://Stackoverflow.com/users/1426411", "pm_score": 1, "selected": false, "text": "public ActionResult Get(){\n var customer = new Customer();\n return View(customer);\n}\n" } ]
2008/11/29
[ "https://Stackoverflow.com/questions/327885", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11963/" ]
327,893
<p>I have a structure:</p> <pre><code>struct pkt_ { double x; double y; double alfa; double r_kw; }; typedef struct pkt_ pkt; </code></pre> <p>A table of these structures:</p> <pre><code>pkt *tab_pkt; tab_pkt = malloc(ilosc_pkt * sizeof(pkt)); </code></pre> <p>What I want to do is to sort <code>tab_pkt</c...
[ { "answer_id": 327925, "author": "Jonathan Leffler", "author_id": 15168, "author_profile": "https://Stackoverflow.com/users/15168", "pm_score": 1, "selected": false, "text": "porownaj(&pkt_a, &pkt_b) == -porownaj(&pkt_b, &pkt_a)\n" }, { "answer_id": 327929, "author": "Robert ...
2008/11/29
[ "https://Stackoverflow.com/questions/327893", "https://Stackoverflow.com", "https://Stackoverflow.com/users/41839/" ]
327,895
<p>Currently I have to uninstall the old version of my service before I install the new version. I am pretty sure this has something to do with it not being smart enough to update or remove the old service entries before adding the new ones.</p> <p>Is there a way to have the installer skip registering the service if it...
[ { "answer_id": 328032, "author": "David Pokluda", "author_id": 223, "author_profile": "https://Stackoverflow.com/users/223", "pm_score": 3, "selected": false, "text": "sc stop {name of your service}\nsc start {name of your service}\n" }, { "answer_id": 328211, "author": "Ferr...
2008/11/29
[ "https://Stackoverflow.com/questions/327895", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5274/" ]
327,896
<p>I would like to draw lines (of arbitrary position and length) onto a surface in pygame, which itself is an image loaded from a file on disk.</p> <p>Can anyone point me to some example code that does this?</p>
[ { "answer_id": 327908, "author": "chirag", "author_id": 40596, "author_profile": "https://Stackoverflow.com/users/40596", "pm_score": 0, "selected": false, "text": "aalines(...)\n pygame.draw.aalines(Surface, color, closed, pointlist, blend=1): return Rect\n\narc(...)\n pygame.draw...
2008/11/29
[ "https://Stackoverflow.com/questions/327896", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3045/" ]
327,904
<p>In the application I'm writing, one of the methods allows for the numbers the user entered to be turned into letters.</p> <p>For example, the user will be entering grades (as doubles) and the program will decide (when the criteria is met) to return the letter associated with the number. Initially, I had it written ...
[ { "answer_id": 327923, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 2, "selected": false, "text": "public string ToGrade(double score)\n{\n if (score >= 95.0)\n return \"A+\";\n else if (score >= 90.0)\n ret...
2008/11/29
[ "https://Stackoverflow.com/questions/327904", "https://Stackoverflow.com", "https://Stackoverflow.com/users/29756/" ]
327,913
<p>Ok, i have simple scenario:</p> <p>have two pages: login and welcome pages. im using FormsAuthentication with my own table that has four columns: ID, UserName, Password, FullName</p> <p>When pressed login im setting my username like:</p> <pre><code>FormsAuthentication.SetAuthCookie(userName, rememberMe ?? false);...
[ { "answer_id": 328270, "author": "Todd Smith", "author_id": 31624, "author_profile": "https://Stackoverflow.com/users/31624", "pm_score": 2, "selected": true, "text": "FormsAuth.SetAuthCookie(userName, rememberme);\n\n// get the full name (ex \"John Doe\") from the datbase here during lo...
2008/11/29
[ "https://Stackoverflow.com/questions/327913", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2246271/" ]
327,916
<p>I was shocked to find out today that C# does not support dynamic sized arrays. How then does a <a href="http://en.wikipedia.org/wiki/Visual_Basic_.NET" rel="noreferrer">VB.NET</a> developer used to using <a href="http://msdn.microsoft.com/en-us/library/w8k3cys2.aspx" rel="noreferrer">ReDim Preserve</a> deal with thi...
[ { "answer_id": 327937, "author": "Jonathan Allen", "author_id": 5274, "author_profile": "https://Stackoverflow.com/users/5274", "pm_score": 3, "selected": false, "text": "x = (int[]) Utils.CopyArray((Array) x, new int[10]);\n" }, { "answer_id": 327958, "author": "Jon Skeet", ...
2008/11/29
[ "https://Stackoverflow.com/questions/327916", "https://Stackoverflow.com", "https://Stackoverflow.com/users/41543/" ]
327,955
<p>Since I started learning <a href="http://en.wikipedia.org/wiki/F_Sharp_%28programming_language%29" rel="noreferrer">F#</a> and <a href="http://en.wikipedia.org/wiki/Objective_Caml" rel="noreferrer">OCaml</a> last year, I've read a huge number of articles which insist that design patterns (especially in Java) are wor...
[ { "answer_id": 328048, "author": "Germán", "author_id": 17138, "author_profile": "https://Stackoverflow.com/users/17138", "pm_score": 3, "selected": false, "text": "for(int i = 0; i < myList.size(); i++) { doWhatever(myList.get(i)); }\n" }, { "answer_id": 405476, "author": "C...
2008/11/29
[ "https://Stackoverflow.com/questions/327955", "https://Stackoverflow.com", "https://Stackoverflow.com/users/40516/" ]
327,982
<p>Is it possible to write connect and open a SQL Compact 3.5 database from within MS Access 2003? I want to be able to use MS Access 2003 to manipulate data in a SQL Compact 3.5 database. If it is possible, then what statements would be used to open the database?</p>
[ { "answer_id": 330376, "author": "Philippe Grondier", "author_id": 11436, "author_profile": "https://Stackoverflow.com/users/11436", "pm_score": 1, "selected": false, "text": "public sub connectionTest\nDim activeConnection as ADODB.connection, _\n activeRecordset as ADODB.recordset\n...
2008/11/29
[ "https://Stackoverflow.com/questions/327982", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
327,984
<p>Say I have an interface like this:</p> <pre><code>public interface ISomeInterface { ... } </code></pre> <p>I also have a couple of classes implementing this interface;</p> <pre><code>public class SomeClass : ISomeInterface { ... } </code></pre> <p>Now I have a WPF ListBox listing items of ISomeInterface, using a...
[ { "answer_id": 327993, "author": "user7116", "author_id": 7116, "author_profile": "https://Stackoverflow.com/users/7116", "pm_score": 4, "selected": false, "text": "public abstract class SomeClassBase\n{\n\n}\n\npublic class SomeClass : SomeClassBase\n{\n\n}\n\n<DataTemplate DataType=\"{...
2008/11/29
[ "https://Stackoverflow.com/questions/327984", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2122/" ]
327,985
<p>The last line of my file is:</p> <blockquote> <p>29-dez,40,</p> </blockquote> <p>How can I modify that line so that it reads:</p> <blockquote> <p>29-Dez,40,90,100,50</p> </blockquote> <p>Note: I don't want to write a new line. I want to take the same line and put new values after <code>29-Dez,40,</code></p> ...
[ { "answer_id": 328007, "author": "Douglas Leeder", "author_id": 3978, "author_profile": "https://Stackoverflow.com/users/3978", "pm_score": 3, "selected": false, "text": "f = open(\"foo.file\", \"wb\")\nf.seek(-len(os.linesep), os.SEEK_END) \nf.write(\"new text at end of last line\" + os...
2008/11/29
[ "https://Stackoverflow.com/questions/327985", "https://Stackoverflow.com", "https://Stackoverflow.com/users/41795/" ]
327,986
<p>I still have a large number of floppies. On some of them there probably is source code I don't want to lose. I also don't want to take look at each one individually, as that's going to take a lot of time. What software would be best for copying all data to a hard disk, preferably while creating an index at the same ...
[ { "answer_id": 328016, "author": "Zoredache", "author_id": 20267, "author_profile": "https://Stackoverflow.com/users/20267", "pm_score": 4, "selected": true, "text": "#!/bin/bash\n\nfloppydev='/dev/sdb'\nsavepath='/srv/floppy_imgs'\nwhile true\ndo\n echo \"Press a key to create an image...
2008/11/29
[ "https://Stackoverflow.com/questions/327986", "https://Stackoverflow.com", "https://Stackoverflow.com/users/35306/" ]
328,005
<p>If you have a C# function with Sqlaccess, is it mandatory to close all objects/handles, or is everything cleaned up automatically once you exit the function</p> <p>For example:</p> <pre><code>void DoSqlStuff() { SqlConnection sqlConn = new SqlConnection(...); SqlCommand cmd = new SqlCommand(...); SqlDa...
[ { "answer_id": 328011, "author": "Kevin Tighe", "author_id": 39461, "author_profile": "https://Stackoverflow.com/users/39461", "pm_score": 6, "selected": true, "text": "using (SqlConnection cn = new SqlConnection(connectionString))\n{ \n SqlCommand cm = new SqlCommand(commandString,...
2008/11/29
[ "https://Stackoverflow.com/questions/328005", "https://Stackoverflow.com", "https://Stackoverflow.com/users/37955/" ]
328,017
<p>How can I programatically get the path to MSBuild from a machine where my .exe is running?</p> <p>I can get the .NET version from the Environment but is there a way of getting the correct folder for a .NET version?</p>
[ { "answer_id": 328133, "author": "Brian", "author_id": 19299, "author_profile": "https://Stackoverflow.com/users/19299", "pm_score": 8, "selected": true, "text": "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\MSBuild\\ToolsVersions\\2.0\nHKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\MSBuild\\Tools...
2008/11/29
[ "https://Stackoverflow.com/questions/328017", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11755/" ]
328,020
<p>I am trying to input data from a .txt file into a scheme structure. Each element is separated by a tab in the data file and each structure set is on a new line. I want to be able to read in the data from one line into a structure and make a list of each structure set in the file. Any suggestions?</p>
[ { "answer_id": 331048, "author": "Nathan Shively-Sanders", "author_id": 7851, "author_profile": "https://Stackoverflow.com/users/7851", "pm_score": 2, "selected": false, "text": "(require (planet neil/csv:1:2/csv))\n" } ]
2008/11/29
[ "https://Stackoverflow.com/questions/328020", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
328,023
<p>I've noticed on bank websites, etc, my user IDs aren't saved (they don't appear in a dropdown like other commonly entered stuff does) and there's no prompt for it to remember your password. How is this done? How do the sites notify the browser that they are in 'special' or else exceptions? Just curious.</p>
[ { "answer_id": 328029, "author": "Robert Gamble", "author_id": 25222, "author_profile": "https://Stackoverflow.com/users/25222", "pm_score": 3, "selected": false, "text": "<input type=\"password\" autocomplete=\"off\" />\n" }, { "answer_id": 32861451, "author": "Shyam Sharma"...
2008/11/29
[ "https://Stackoverflow.com/questions/328023", "https://Stackoverflow.com", "https://Stackoverflow.com/users/37014/" ]
328,025
<p>I have an enum </p> <pre><code>public enum FileExtentions { mp3, mpeg } </code></pre> <p>And I have a FileInfo of which I want to check if the extension is in the previous enum. I was hoping I could do a </p> <pre><code>FileExtensions.Any(e=&gt;e.ToString().Equals(file.Extension)); </code></pre> <p>But t...
[ { "answer_id": 328031, "author": "Boris Callens", "author_id": 11333, "author_profile": "https://Stackoverflow.com/users/11333", "pm_score": 3, "selected": false, "text": "Enum.GetNames(typeof(FileExtensions)).Any(f=>f.Equals(\".\"+file.Extension))\n" }, { "answer_id": 328034, ...
2008/11/29
[ "https://Stackoverflow.com/questions/328025", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11333/" ]
328,041
<p>I have a small lightweight application that is used as part of a larger solution. Currently it is written in C but I am looking to rewrite it using a cross-platform scripting language. The solution needs to run on Windows, Linux, Solaris, AIX and HP-UX.</p> <p>The existing C application works fine but I want to hav...
[ { "answer_id": 328159, "author": "Becca Royal-Gordon", "author_id": 41222, "author_profile": "https://Stackoverflow.com/users/41222", "pm_score": 2, "selected": false, "text": "Dagny:~ brent$ time perl -MCGI -e0\n\nreal 0m0.610s\nuser 0m0.036s\nsys 0m0.022s\nDagny:~ brent$ time...
2008/11/29
[ "https://Stackoverflow.com/questions/328041", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5077/" ]
328,044
<p>I have a database table with a large number of rows and one numeric column, and I want to represent this data in memory. I could just use one big integer array and this would be very fast, but the number of rows could be too large for this.</p> <p>Most of the rows (more than 99%) have a value of zero. Is there an...
[ { "answer_id": 328053, "author": "Morten Christiansen", "author_id": 4055, "author_profile": "https://Stackoverflow.com/users/4055", "pm_score": 1, "selected": false, "text": "ContainsKey" }, { "answer_id": 328201, "author": "milot", "author_id": 22637, "author_profil...
2008/11/29
[ "https://Stackoverflow.com/questions/328044", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14606/" ]
328,059
<p>I'm trying to open a file and create a list with each line read from the file.</p> <pre><code> i=0 List=[""] for Line in inFile: List[i]=Line.split(",") i+=1 print List </code></pre> <p>But this sample code gives me an error because of the <code>i+=1</code> saying that <code>index is out of ...
[ { "answer_id": 328068, "author": "Brian C. Lane", "author_id": 27461, "author_profile": "https://Stackoverflow.com/users/27461", "pm_score": 8, "selected": true, "text": "List = open(\"filename.txt\").readlines()\n" }, { "answer_id": 328070, "author": "orip", "author_id":...
2008/11/29
[ "https://Stackoverflow.com/questions/328059", "https://Stackoverflow.com", "https://Stackoverflow.com/users/41795/" ]
328,061
<p>Can someone give me some example code that creates a surface with a transparent background in pygame?</p>
[ { "answer_id": 328067, "author": "UnkwnTech", "author_id": 115, "author_profile": "https://Stackoverflow.com/users/115", "pm_score": 7, "selected": true, "text": "image = pygame.Surface([640,480], pygame.SRCALPHA, 32)\nimage = image.convert_alpha()\n" }, { "answer_id": 353739, ...
2008/11/29
[ "https://Stackoverflow.com/questions/328061", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3045/" ]
328,107
<p>Let's say you have a two dimensional plane with 2 points (called a and b) on it represented by an x integer and a y integer for each point.</p> <p>How can you determine if another point c is on the line segment defined by a and b?</p> <p>I use python most, but examples in any language would be helpful.</p>
[ { "answer_id": 328110, "author": "Darius Bacon", "author_id": 27024, "author_profile": "https://Stackoverflow.com/users/27024", "pm_score": 5, "selected": false, "text": "b-a" }, { "answer_id": 328122, "author": "Cyrille Ka", "author_id": 39622, "author_profile": "htt...
2008/11/29
[ "https://Stackoverflow.com/questions/328107", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3045/" ]
328,123
<p>I have one table that saves comments for a varied set of content types. These are saved in other tables (news, articles, users). I wonder what's the best way to connect these tables? In previous projects I used a second table for each kind of content. They held the id of the certain content mapped to ids of the com...
[ { "answer_id": 328218, "author": "Vilx-", "author_id": 41360, "author_profile": "https://Stackoverflow.com/users/41360", "pm_score": 0, "selected": false, "text": "Comments\n-------\nID\nNewsID\nArticleID\nUserID\n" } ]
2008/11/29
[ "https://Stackoverflow.com/questions/328123", "https://Stackoverflow.com", "https://Stackoverflow.com/users/35903/" ]
328,202
<p>I'm considering using Annotations to define my Hibernate mappings but have run into a problem: I want to use a base entity class to define common fields (including the ID field) but I want different tables to have different ID generation strategies:</p> <pre><code>@MappedSuperclass public abstract class Base imple...
[ { "answer_id": 339872, "author": "LenW", "author_id": 41292, "author_profile": "https://Stackoverflow.com/users/41292", "pm_score": 2, "selected": false, "text": "@Override // So that we can set Generated strategy\n@GeneratedValue(strategy = AUTO)\npublic Integer getId() {\n return su...
2008/11/29
[ "https://Stackoverflow.com/questions/328202", "https://Stackoverflow.com", "https://Stackoverflow.com/users/41861/" ]
328,215
<p>I was hanging out in my profiler for a while trying to figure out how to speed up a common log parser which was bottlenecked around the date parsing, and I tried various algorithms to speed things up.</p> <p>The thing I tried that was fastest for me was also by far the most readable, but potentially non-standard C....
[ { "answer_id": 328222, "author": "Robert Gamble", "author_id": 25222, "author_profile": "https://Stackoverflow.com/users/25222", "pm_score": 2, "selected": false, "text": "char" }, { "answer_id": 328228, "author": "Johannes Schaub - litb", "author_id": 34509, "author_...
2008/11/29
[ "https://Stackoverflow.com/questions/328215", "https://Stackoverflow.com", "https://Stackoverflow.com/users/39975/" ]
328,249
<p>How do you concatenate characters in java? Concatenating strings would only require a <code>+</code> between the strings, but concatenating chars using <code>+</code> will change the value of the char into ascii and hence giving a numerical output. I want to do <code>System.out.println(char1+char2+char3...</code> an...
[ { "answer_id": 328253, "author": "Dustin", "author_id": 39975, "author_profile": "https://Stackoverflow.com/users/39975", "pm_score": 6, "selected": false, "text": "String s = new StringBuilder().append(char1).append(char2).append(char3).toString();\n" }, { "answer_id": 328255, ...
2008/11/30
[ "https://Stackoverflow.com/questions/328249", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
328,264
<p>When I supply the script with the argument: hi[123].txt it will do exactly what I want. But if I specify the wildcard character ( hi*.txt ) it will be re-reading some files.</p> <p>I was wondering how to modify this script to fix that silly problem:</p> <pre><code>#!/bin/sh count="0" total="0" FILE="$1" #FILE sp...
[ { "answer_id": 328286, "author": "Johannes Schaub - litb", "author_id": 34509, "author_profile": "https://Stackoverflow.com/users/34509", "pm_score": 1, "selected": false, "text": "for FILE in $@" }, { "answer_id": 328287, "author": "Bill Karwin", "author_id": 20860, ...
2008/11/30
[ "https://Stackoverflow.com/questions/328264", "https://Stackoverflow.com", "https://Stackoverflow.com/users/40120/" ]
328,277
<p>So here's what I've got: </p> <ul> <li>An NSTableView with an NSMutableArray data source</li> <li>FSEvents monitoring a folder that contains the file that contains the data for the table view (Using <a href="http://stuconnolly.com/blog/archive/2008/05/08/fsevents-objectivec-wrapper" rel="nofollow noreferrer">SCEven...
[ { "answer_id": 328357, "author": "Ashley Clark", "author_id": 4556, "author_profile": "https://Stackoverflow.com/users/4556", "pm_score": 1, "selected": false, "text": "[myObject performSelector:@selector(reloadAction:) withObject:nil afterDelay:0.0];\n" }, { "answer_id": 328583,...
2008/11/30
[ "https://Stackoverflow.com/questions/328277", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4103/" ]
328,281
<p>A customer sometimes sends POST requests with <code>Content-Length: 0</code> when submitting a form (10 to over 40 fields).</p> <p>We tested it with different browsers and from different locations but couldn't reproduce the error. The customer is using Internet Explorer 7 and a proxy.</p> <p>We asked them to let t...
[ { "answer_id": 42594322, "author": "user1641854", "author_id": 1641854, "author_profile": "https://Stackoverflow.com/users/1641854", "pm_score": 0, "selected": false, "text": "curl" }, { "answer_id": 44852556, "author": "matthewrwilton", "author_id": 3639663, "author_...
2008/11/30
[ "https://Stackoverflow.com/questions/328281", "https://Stackoverflow.com", "https://Stackoverflow.com/users/41860/" ]
328,343
<p>I'm trying to use SharpZipLib to pull specified files from a zip archive. All of the examples I've seen always expect that you want to unzip the entire zip, and do something along the lines of:</p> <pre><code> FileStream fileStreamIn = new FileStream (sourcePath, FileMode.Open, FileAccess.Read); ZipI...
[ { "answer_id": 328353, "author": "Mark Brackett", "author_id": 2199, "author_profile": "https://Stackoverflow.com/users/2199", "pm_score": 7, "selected": true, "text": "using (var fs = new FileStream(sourcePath, FileMode.Open, FileAccess.Read))\nusing (var zf = new ZipFile(fs)) {\n var...
2008/11/30
[ "https://Stackoverflow.com/questions/328343", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1965/" ]
328,352
<p>I'd like to add a logo to the left of my title on my navigation bar. The title property seems to only take an NSString. What's the best way to add an image to the navigation bar?</p>
[ { "answer_id": 328363, "author": "Adam Ernst", "author_id": 79, "author_profile": "https://Stackoverflow.com/users/79", "pm_score": 2, "selected": false, "text": "UINavigationItem.titleView" }, { "answer_id": 328372, "author": "carson", "author_id": 25343, "author_pro...
2008/11/30
[ "https://Stackoverflow.com/questions/328352", "https://Stackoverflow.com", "https://Stackoverflow.com/users/40882/" ]
328,355
<p>For example, if I have:</p> <p>&lt;div>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Curabitur urna felis, convallis quis, placerat in, elementum quis, libero. Nam quis lacus. Vivamus rhoncus quam et metus. Praesent et velit eget sem vestibulum volutpat. Integer sed risus. Integer quis libero id diam bi...
[ { "answer_id": 328404, "author": "vincent", "author_id": 34871, "author_profile": "https://Stackoverflow.com/users/34871", "pm_score": 2, "selected": false, "text": "// highlight every word found in a <p>\n$(\"p\").each(\n function () { \n var content = \"\"; \n var w...
2008/11/30
[ "https://Stackoverflow.com/questions/328355", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
328,356
<p>I'd like to extract the text from an HTML file using Python. I want essentially the same output I would get if I copied the text from a browser and pasted it into notepad. </p> <p>I'd like something more robust than using regular expressions that may fail on poorly formed HTML. I've seen many people recommend Be...
[ { "answer_id": 1463802, "author": "GeekTantra", "author_id": 177526, "author_profile": "https://Stackoverflow.com/users/177526", "pm_score": 3, "selected": false, "text": "from stripogram import html2text\ntext = html2text(your_html_string)\n" }, { "answer_id": 3987802, "auth...
2008/11/30
[ "https://Stackoverflow.com/questions/328356", "https://Stackoverflow.com", "https://Stackoverflow.com/users/25188/" ]
328,381
<p>I'm a php guy, but I have to do some small project in JSP. I'm wondering if there's an equivalent to htmlentities function (of php) in JSP.</p>
[ { "answer_id": 328386, "author": "Florin", "author_id": 34565, "author_profile": "https://Stackoverflow.com/users/34565", "pm_score": 3, "selected": true, "text": "public static String stringToHTMLString(String string) {\n StringBuffer sb = new StringBuffer(string.length());\n // t...
2008/11/30
[ "https://Stackoverflow.com/questions/328381", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4386/" ]
328,382
<p>What to do when after all probing, a reportedly valid object return 'undefined' for any attribute probed? I use jQuery, <code>$('selector').mouseover(function() { });</code> Everything returns 'undefined' for <code>$(this)</code> inside the function scope. The selector is a 'area' for a map tag and I'm looking for i...
[ { "answer_id": 328418, "author": "Jason Bunting", "author_id": 1790, "author_profile": "https://Stackoverflow.com/users/1790", "pm_score": 6, "selected": true, "text": "function listProperties(obj) {\n var propList = \"\";\n for(var propName in obj) {\n if(typeof(obj[propName]) ...
2008/11/30
[ "https://Stackoverflow.com/questions/328382", "https://Stackoverflow.com", "https://Stackoverflow.com/users/34565/" ]
328,384
<p>I have an associative array, ie</p> <pre><code>$primes = array( 2=&gt;2, 3=&gt;3, 5=&gt;5, 7=&gt;7, 11=&gt;11, 13=&gt;13, 17=&gt;17, // ...etc ); </code></pre> <p>then I do</p> <pre><code>// seek to first prime greater than 10000 reset($primes); while(next($primes) &lt; 10000) {} prev($primes); /...
[ { "answer_id": 328388, "author": "strager", "author_id": 39992, "author_profile": "https://Stackoverflow.com/users/39992", "pm_score": 3, "selected": false, "text": "$state = key($array);\n" }, { "answer_id": 328457, "author": "Stepan Mazurov", "author_id": 40786, "au...
2008/11/30
[ "https://Stackoverflow.com/questions/328384", "https://Stackoverflow.com", "https://Stackoverflow.com/users/33258/" ]
328,387
<p>I need help to replace all \n (new line) caracters for <br /> in a String, but not those \n inside [code][/code] tags. My brain is burning, I can't solve this by my own :(</p> <p>Example:</p> <pre><code>test test test test test test test test [code]some test code [/code] more text </code></pre> <p>Should be:</p...
[ { "answer_id": 328392, "author": "strager", "author_id": 39992, "author_profile": "https://Stackoverflow.com/users/39992", "pm_score": 4, "selected": true, "text": "stack elementStack;\n\nforeach(char in string) {\n if(string-from-char == \"[code]\") {\n elementStack.push(\"cod...
2008/11/30
[ "https://Stackoverflow.com/questions/328387", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4386/" ]