qid
int64
4
19.1M
question
stringlengths
18
48.3k
answers
list
date
stringlengths
10
10
metadata
list
70,779
<p>I need to be able to quickly convert an image (inside a rails controller) so that the hosting company using managing our application can quickly test at any time to ensure that rmagick is not only successfully installed, but can be called throgh the rails stiack, what is the quickest clean code I can use to do this?...
[ { "answer_id": 70952, "author": "Asaf Bartov", "author_id": 7483, "author_profile": "https://Stackoverflow.com/users/7483", "pm_score": 0, "selected": false, "text": "require 'RMagick'\ninclude Magick\nimg = ImageList.new('myfile.jpg')\nimg.crop(0,0,10,10) # or whatever\nimg.write('mycro...
2008/09/16
[ "https://Stackoverflow.com/questions/70779", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7473/" ]
70,782
<p>How to get a file's creation date or file size, for example this Hello.jpg at <a href="http://www.mywebsite.com/now/Hello.jpg(note" rel="nofollow noreferrer">http://www.mywebsite.com/now/Hello.jpg(note</a>: This URL does not exist)? The purpose of this question is to make my application re-download the files from th...
[ { "answer_id": 70803, "author": "Vinko Vrsalovic", "author_id": 5190, "author_profile": "https://Stackoverflow.com/users/5190", "pm_score": 4, "selected": true, "text": "$ telnet www.google.com 80\nTrying 216.239.59.103...\nConnected to www.l.google.com.\nEscape character is '^]'.\nHEAD ...
2008/09/16
[ "https://Stackoverflow.com/questions/70782", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
70,785
<p>We want to try Ext JS on new project. Is there any well-known best practice for integrating Ext JS with server side Java (Spring/Hibernate/JS) application? Is DWR a good choice for that?</p>
[ { "answer_id": 75007, "author": "noah", "author_id": 12034, "author_profile": "https://Stackoverflow.com/users/12034", "pm_score": 1, "selected": false, "text": "var MyProxy = function(fn) {\n this.fn = fn;\n};\nExt.extend( MyProxy, Ext.data.DataProxy, {\n load: function(params,reader,...
2008/09/16
[ "https://Stackoverflow.com/questions/70785", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7292/" ]
70,797
<p>How do I have a Python script that a) can accept user input and how do I make it b) read in arguments if run from the command line?</p>
[ { "answer_id": 70814, "author": "lbz", "author_id": 11530, "author_profile": "https://Stackoverflow.com/users/11530", "pm_score": 9, "selected": false, "text": "var = raw_input(\"Please enter something: \")\nprint \"you entered\", var\n var = input(\"Please enter something: \")\nprint(\"...
2008/09/16
[ "https://Stackoverflow.com/questions/70797", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1384652/" ]
70,842
<p>How should I run another program from within my <code>C</code> program? I need to be able to write data into <code>STDIN</code> of the launched program (and maybe read from it's <code>STDOUT</code>)</p> <p>I am not sure if this is a standard C function. I need the solution that should work under Linux.</p>
[ { "answer_id": 70848, "author": "freespace", "author_id": 8297, "author_profile": "https://Stackoverflow.com/users/8297", "pm_score": 5, "selected": true, "text": "popen man popen\n popen popen popen" }, { "answer_id": 70857, "author": "Vhaerun", "author_id": 11234, "...
2008/09/16
[ "https://Stackoverflow.com/questions/70842", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6974/" ]
70,850
<p>What advantage, if any, is provided by formatting C code as follows:</p> <pre><code>while(lock_file(lockdir)==0) { count++; if(count==20) { fprintf(stderr,"Can't lock dir %s\n",lockdir); exit(1); } sleep(3); } if(rmdir(serverdir)!=0) { switch(errno) ...
[ { "answer_id": 70923, "author": "Ben", "author_id": 11522, "author_profile": "https://Stackoverflow.com/users/11522", "pm_score": 2, "selected": false, "text": "if (x == 0) \n{\n if (y == 2)\n {\n if (z == 3)\n {\n do_something (x);\n }\n }\n}\n" }, { "answer_id...
2008/09/16
[ "https://Stackoverflow.com/questions/70850", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2974/" ]
70,855
<p>Is there a realistic way of implementing a multi-threaded model in PHP whether truly, or just simulating it. Some time back it was suggested that you could force the operating system to load another instance of the PHP executable and handle other simultaneous processes.</p> <p>The problem with this is that when the...
[ { "answer_id": 72605, "author": "Adam Hopkinson", "author_id": 12280, "author_profile": "https://Stackoverflow.com/users/12280", "pm_score": 4, "selected": false, "text": "exec(\"/path/to/php -f '/path/to/file.php' | '/path/to/output.txt'\");\n" }, { "answer_id": 1079624, "au...
2008/09/16
[ "https://Stackoverflow.com/questions/70855", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11190/" ]
70,880
<p>Say I have the following C++:</p> <pre><code>char *p = new char[cb]; SOME_STRUCT *pSS = (SOME_STRUCT *) p; delete pSS; </code></pre> <p>Is this safe according to the C++ standard? Do I need to cast back to a <code>char*</code> and then use <code>delete[]</code>? I know it'll work in most C++ compilers, because it'...
[ { "answer_id": 70904, "author": "Daniel James", "author_id": 2434, "author_profile": "https://Stackoverflow.com/users/2434", "pm_score": 3, "selected": false, "text": "operator delete[] operator delete" }, { "answer_id": 70905, "author": "thudbang", "author_id": 11661, ...
2008/09/16
[ "https://Stackoverflow.com/questions/70880", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8446/" ]
70,947
<p>I have a workbook with 20 different pivot tables. Is there any easy way to find all the pivot tables and refresh them in VBA?</p>
[ { "answer_id": 70976, "author": "GSerg", "author_id": 11683, "author_profile": "https://Stackoverflow.com/users/11683", "pm_score": 9, "selected": true, "text": "ThisWorkbook.RefreshAll\n Dim Sheet as WorkSheet, Pivot as PivotTable\nFor Each Sheet in ThisWorkbook.WorkSheets\n For Each...
2008/09/16
[ "https://Stackoverflow.com/questions/70947", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8418/" ]
70,956
<p>Is there a good way to exclude certain pages from using a HTTP module?</p> <p>I have an application that uses a custom HTTP module to validate a session. The HTTPModule is set up like this in web config:</p> <pre><code>&lt;system.web&gt; &lt;!-- ... --&gt; &lt;httpModules&gt; &lt;add name="SessionValidatio...
[ { "answer_id": 71790, "author": "Crob", "author_id": 2460, "author_profile": "https://Stackoverflow.com/users/2460", "pm_score": 5, "selected": true, "text": "<add verb=\"*\" path=\"/validate/*.aspx\" type=\"Handler,Assembly\"/>\n" }, { "answer_id": 18411217, "author": "Mr. P...
2008/09/16
[ "https://Stackoverflow.com/questions/70956", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6308/" ]
70,964
<p>Originally I am looking for a solution in Actionscript. The point of this question is the algorithm, which detects the exact Minute, when a clock has to switch the Daylight Saving Time. </p> <p>So for example between the 25th and the 31th of October we have to check, if the actual date is a sunday, it is before or ...
[ { "answer_id": 154765, "author": "Benno Richters", "author_id": 3565, "author_profile": "https://Stackoverflow.com/users/3565", "pm_score": 2, "selected": false, "text": "inDaylightTime import org.joda.time.DateTime;\nimport org.joda.time.DateTimeZone;\n\npublic class App {\n public s...
2008/09/16
[ "https://Stackoverflow.com/questions/70964", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
70,992
<p>Relating to my <a href="https://stackoverflow.com/questions/48733/javahibernate-jpa-designing-the-server-data-reload">earlier question</a>, I want to ensure all the child objects are loaded as I have a multiple threads that may need to access the data (and thus avoid lazy loading exceptions). I understand the way t...
[ { "answer_id": 74284, "author": "ncgz", "author_id": 12905, "author_profile": "https://Stackoverflow.com/users/12905", "pm_score": -1, "selected": false, "text": " <filter>\n <filter-name>hibernateFilter</filter-name>\n <filter-class> org.springframework.orm.hibernate3....
2008/09/16
[ "https://Stackoverflow.com/questions/70992", "https://Stackoverflow.com", "https://Stackoverflow.com/users/48310/" ]
70,993
<p>We all know the various ways of testing OO systems. However, it looks like I'll be going to do a project where I'll be dealing with PLC ladder logic (don't ask :/), and I was wondering if there's a good way of testing the validity of the system.</p> <p>The only way I see so far is simply constructing a huge table w...
[ { "answer_id": 71105, "author": "jbdavid", "author_id": 6314, "author_profile": "https://Stackoverflow.com/users/6314", "pm_score": 4, "selected": true, "text": "|---|R15|---+---|/R16|---------(R18)--------|\n| |\n|---|R12|---+\n always @(*) R18 = !R16 && ( R15 | R12);\n assign...
2008/09/16
[ "https://Stackoverflow.com/questions/70993", "https://Stackoverflow.com", "https://Stackoverflow.com/users/909/" ]
71,000
<p>I'm trying to create a Zip file from .Net that can be read from Java code.</p> <p>I've used SharpZipLib to create the Zip file but also if the file generated is valid according to the CheckZip function of the #ZipLib library and can be successfully uncompressed via WinZip or WinRar I always get an error when trying...
[ { "answer_id": 71072, "author": "Panos", "author_id": 8049, "author_profile": "https://Stackoverflow.com/users/8049", "pm_score": 4, "selected": true, "text": "using (ZipFile zipFile = new ZipFile())\n{\n zipFile.AddDirectory(sourceFolderPath);\n zipFile.Save(archiveFolderName);\n}\n" ...
2008/09/16
[ "https://Stackoverflow.com/questions/71000", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11673/" ]
71,022
<p>How do you return 1 value per row of the max of several columns:</p> <p><strong>TableName</strong></p> <pre><code>[Number, Date1, Date2, Date3, Cost] </code></pre> <p>I need to return something like this:</p> <pre><code>[Number, Most_Recent_Date, Cost] </code></pre> <p>Query?</p>
[ { "answer_id": 71045, "author": "Lasse V. Karlsen", "author_id": 267, "author_profile": "https://Stackoverflow.com/users/267", "pm_score": 9, "selected": true, "text": "SELECT\n CASE\n WHEN Date1 >= Date2 AND Date1 >= Date3 THEN Date1\n WHEN Date2 >= Date1 AND Date2 >= D...
2008/09/16
[ "https://Stackoverflow.com/questions/71022", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11703/" ]
71,030
<p>I'm aware I can add maven repositories for fetching dependencies in ~/.m2/settings.xml. But is it possible to add a repository using command line, something like:</p> <pre><code>mvn install -Dmaven.repository=http://example.com/maven2 </code></pre> <p>The reason I want to do this is because I'm using a continuous ...
[ { "answer_id": 71132, "author": "Jorge Ferreira", "author_id": 6508, "author_profile": "https://Stackoverflow.com/users/6508", "pm_score": 3, "selected": false, "text": " <?xml version=\"1.0\" encoding=\"UTF-8\"?>\n <project xmlns=\"http://maven.apache.org/POM/4.0.0\"\n xmln...
2008/09/16
[ "https://Stackoverflow.com/questions/71030", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1113/" ]
71,069
<p>Maven spews out far too many lines of output to my taste (I like the Unix way: no news is good news).</p> <p>I want to get rid of all <code>[INFO]</code> lines, but I couldn't find any mention of an argument or config settings that controls the verbosity of Maven.</p> <p>Is there no LOG4J-like way to set the log lev...
[ { "answer_id": 71086, "author": "Jorge Ferreira", "author_id": 6508, "author_profile": "https://Stackoverflow.com/users/6508", "pm_score": 8, "selected": true, "text": "-q -q --quiet" }, { "answer_id": 40535065, "author": "Stanislav", "author_id": 2213164, "author_pro...
2008/09/16
[ "https://Stackoverflow.com/questions/71069", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7483/" ]
71,074
<p>I can make Firefox not display the ugly dotted focus outlines on <b>links</b> with this:</p> <pre class="lang-css prettyprint-override"><code>a:focus { outline: none; } </code></pre> <p>But how can I do this for <code>&lt;button&gt;</code> tags as well? When I do this:</p> <pre class="lang-css prettyprint-o...
[ { "answer_id": 71251, "author": "Vitaly Sharovatov", "author_id": 6647, "author_profile": "https://Stackoverflow.com/users/6647", "pm_score": 3, "selected": false, "text": "browser.display.focus_ring_width" }, { "answer_id": 71260, "author": "AlexWilson", "author_id": 224...
2008/09/16
[ "https://Stackoverflow.com/questions/71074", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4639/" ]
71,077
<p>I want to compress some files (into the <a href="http://en.wikipedia.org/wiki/ZIP_%28file_format%29" rel="nofollow noreferrer">ZIP</a> format) and encrypt them if possible using C#. Is there some way to do this?</p> <p>Can encryption be done as a part of the compression itself?</p>
[ { "answer_id": 71099, "author": "Skizz", "author_id": 1898, "author_profile": "https://Stackoverflow.com/users/1898", "pm_score": 5, "selected": true, "text": "System.IO.Compression System.Security.Cryptography" } ]
2008/09/16
[ "https://Stackoverflow.com/questions/71077", "https://Stackoverflow.com", "https://Stackoverflow.com/users/184/" ]
71,108
<p>Under what circumstances might you want to use multiple indirection (that is, a chain of pointers as in <code>Foo **</code>) in C++?</p>
[ { "answer_id": 71143, "author": "aku", "author_id": 1196, "author_profile": "https://Stackoverflow.com/users/1196", "pm_score": 3, "selected": false, "text": "void test(int ** var)\n{\n ...\n}\n\nint *foo = ...\ntest(&foo);\n int ** array = new *int[2];\narray[0] = new int[2];\narray[1] ...
2008/09/16
[ "https://Stackoverflow.com/questions/71108", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11575/" ]
71,151
<p>Using the Python Documentation I found the <a href="http://docs.python.org/lib/module-HTMLParser.html" rel="noreferrer">HTML parser</a> but I have no idea which library to import to use it, how do I find this out (bearing in mind it doesn't say on the page).</p>
[ { "answer_id": 71161, "author": "1077", "author_id": 10776, "author_profile": "https://Stackoverflow.com/users/10776", "pm_score": 5, "selected": true, "text": "import HTMLParser\n import html.parser\n import HTMLParser\n" }, { "answer_id": 71174, "author": "Vinko Vrsalovic",...
2008/09/16
[ "https://Stackoverflow.com/questions/71151", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1384652/" ]
71,180
<p>How can I find the last row that contains data in a specific column and on a specific sheet?</p>
[ { "answer_id": 71197, "author": "Galwegian", "author_id": 3201, "author_profile": "https://Stackoverflow.com/users/3201", "pm_score": -1, "selected": false, "text": "Function LastRow(rng As Range) As Long\n Dim iRowN As Long\n Dim iRowI As Long\n Dim iColN As Integer\n Dim iC...
2008/09/16
[ "https://Stackoverflow.com/questions/71180", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8418/" ]
71,201
<p>I'm developing a web service whose methods will be called from a "dynamic banner" that will show a sort of queue of messages read from a sql server table.</p> <p>The banner will have a heavy pressure in the home pages of high traffic sites; every time the banner will be loaded, it will call my web service, in order...
[ { "answer_id": 404798, "author": "Sklivvz", "author_id": 7028, "author_profile": "https://Stackoverflow.com/users/7028", "pm_score": 0, "selected": false, "text": " [Cached]\n public class MyTime : ContextBoundObject\n {\n [CachedMethod(1)]\n public DateTim...
2008/09/16
[ "https://Stackoverflow.com/questions/71201", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1178/" ]
71,223
<p>I'm currently writing a TYPO3 extension which is configured with a list of <code>tt_content</code> UID's. These point to content elements of type "text" and i want to render them by my extension.</p> <p>Because of TYPO3s special way of transforming the text you enter in the rich text editing when it enters the data...
[ { "answer_id": 71272, "author": "Jan Hančič", "author_id": 185527, "author_profile": "https://Stackoverflow.com/users/185527", "pm_score": 4, "selected": true, "text": "$output .= $this->pi_RTEcssText( $contentFromDb );" }, { "answer_id": 2592788, "author": "cweiske", "au...
2008/09/16
[ "https://Stackoverflow.com/questions/71223", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4186/" ]
71,226
<p>I am using a .NET Windows Forms DataGridView and I need to edit a DataBound column (that binds on a boolean DataTable column). For this I specify the cell template like this:</p> <p>DataGridViewColumn column = new DataGridViewColumn(new DataGridViewCheckBoxCell());</p> <p>You see that I need a CheckBox cell templa...
[ { "answer_id": 71252, "author": "Biri", "author_id": 968, "author_profile": "https://Stackoverflow.com/users/968", "pm_score": 0, "selected": false, "text": "<asp:TemplateField HeaderText=\"Whatever\" SortExpression=\"fieldname\" ItemStyle-HorizontalAlign=\"Center\">\n <ItemTemplate>\...
2008/09/16
[ "https://Stackoverflow.com/questions/71226", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2130892/" ]
71,248
<p>I would like to debug an embedded system containing gdb remotely using some kind of gui (ie like ddd). The embedded system does not have the sources or build symbols. However my local x windows box has. However the execution must happen on the embedded system. How can I from my development box drive gdb remotely wit...
[ { "answer_id": 4675868, "author": "FractalSpace", "author_id": 175169, "author_profile": "https://Stackoverflow.com/users/175169", "pm_score": 2, "selected": false, "text": "target> gdbserver localhost:1234 <application>\n host> gdb <application>\n gdb> set <path-to-libs-search>\ngdb> ta...
2008/09/16
[ "https://Stackoverflow.com/questions/71248", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
71,254
<p>When viewing someone else's webpage containing an applet, how can I force Internet Explorer 6.0 to use a a particular JRE when I have several installed?</p>
[ { "answer_id": 71329, "author": "BrezzaP", "author_id": 11766, "author_profile": "https://Stackoverflow.com/users/11766", "pm_score": 2, "selected": false, "text": "<OBJECT \n classid=\"clsid:8AD9C840-044E-11D1-B3E9-00805F499D93\"\n width=\"200\" height=\"200\">\n <PARAM name=\"code\"...
2008/09/16
[ "https://Stackoverflow.com/questions/71254", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
71,257
<p>How do I suspend a whole process (like the Process Explorer does when I click Suspend) in C#.</p> <p>I'm starting the Process with Process.Start, and on a certain event, I want to suspend the process to be able to do some investigation on a "snapshot" of it.</p>
[ { "answer_id": 71457, "author": "Magnus Johansson", "author_id": 3584, "author_profile": "https://Stackoverflow.com/users/3584", "pm_score": 6, "selected": true, "text": " [Flags]\n public enum ThreadAccess : int\n {\n TERMINATE = (0x0001),\n SUSPEND_RESUME = (0x0002),\n ...
2008/09/16
[ "https://Stackoverflow.com/questions/71257", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9632/" ]
71,273
<p>Working with software day-to-day usually means you have to juggle project work, meetings, calls and other interrupts.</p> <p>What single technique, trick, or tool do you find most useful in managing your time?</p> <p>How do you stay focused?</p> <p>What is your single biggest distraction from your work?</p>
[ { "answer_id": 71443, "author": "Johan", "author_id": 11347, "author_profile": "https://Stackoverflow.com/users/11347", "pm_score": 2, "selected": false, "text": "C:\\windows\\system32\\cmd.exe /C \"start /B msg jpretori /W /V \"15-minute check\"\"" } ]
2008/09/16
[ "https://Stackoverflow.com/questions/71273", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11613/" ]
71,306
<p>The single timing column in the weblog naturally includes client transmission timing. For anamoly analysis, I want to differentiate pages that took excessive construction time from requests that simply had a slow client.</p> <p>For buffered pages, I've looked at the ASP.NET page lifecycle model and do not see wher...
[ { "answer_id": 71632, "author": "Timothy Khouri", "author_id": 11917, "author_profile": "https://Stackoverflow.com/users/11917", "pm_score": 2, "selected": false, "text": "<%=DateTime.Now.Subtract(HttpContext.Current.Timestamp).TotalSeconds %>" } ]
2008/09/16
[ "https://Stackoverflow.com/questions/71306", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11791/" ]
71,309
<p>for example this code</p> <pre><code>var html = "&lt;p&gt;This text is &lt;a href=#&gt; good&lt;/a&gt;&lt;/p&gt;"; var newNode = Builder.node('div',{className: 'test'},[html]); $('placeholder').update(newNode); </code></pre> <p>casues the p and a tags to be shown, how do I prevent them from being escaped?</p>
[ { "answer_id": 71371, "author": "Leo Lännenmäki", "author_id": 2451, "author_profile": "https://Stackoverflow.com/users/2451", "pm_score": 3, "selected": true, "text": "var a = Builder.node('div').update(\"<a href='#'>foo</a>\")\n var a = Builder.node('div', {'class':'cool'}, \n ...
2008/09/16
[ "https://Stackoverflow.com/questions/71309", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6892/" ]
71,323
<p>I'm trying to replace each <code>,</code> in the current file by a new line:</p> <pre><code>:%s/,/\n/g </code></pre> <p>But it inserts what looks like a <code>^@</code> instead of an actual newline. The file is not in DOS mode or anything.</p> <p>What should I do?</p> <p>If you are curious, like me, check the q...
[ { "answer_id": 71334, "author": "Konrad Rudolph", "author_id": 1968, "author_profile": "https://Stackoverflow.com/users/1968", "pm_score": 13, "selected": true, "text": "\\r \\n \\n \\r \\n \\n \\r \\n \\r \\n \\r xxd echo bar > test\n(echo 'Before:'; xxd test) > output.txt\nvim test '+s...
2008/09/16
[ "https://Stackoverflow.com/questions/71323", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5190/" ]
71,328
<p>I have PHP configured so that magic quotes are on and register globals are off.</p> <p>I do my best to always call htmlentities() for anything I am outputing that is derived from user input.</p> <p>I also occasionally seach my database for common things used in xss attached such as...</p> <pre><code>&lt;script </...
[ { "answer_id": 71358, "author": "Konrad Rudolph", "author_id": 1968, "author_profile": "https://Stackoverflow.com/users/1968", "pm_score": 2, "selected": false, "text": "Referer javascript:" }, { "answer_id": 71444, "author": "Michał Niedźwiedzki", "author_id": 2169, ...
2008/09/16
[ "https://Stackoverflow.com/questions/71328", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4012/" ]
71,365
<p>Presently, we've got several main projects each in their own repository. We will have to version-control up to a dozen additional projects. VisualSVN recommends to create 1 respository for our company and then vc all projects inside that. </p> <blockquote> <p>It's a good practice to create one repository for the ...
[ { "answer_id": 71543, "author": "Bruno De Fraine", "author_id": 6918, "author_profile": "https://Stackoverflow.com/users/6918", "pm_score": 1, "selected": false, "text": "post-commit svnlook changed grep" } ]
2008/09/16
[ "https://Stackoverflow.com/questions/71365", "https://Stackoverflow.com", "https://Stackoverflow.com/users/997/" ]
71,374
<p>We need to optimize the text rendering for a C# <a href="http://en.wikipedia.org/wiki/Windows_Forms" rel="noreferrer">Windows Forms</a> application displaying a large number of small strings in an irregular grid. At any time there can be well over 5000 cells visible that update 4 times per second. The font family ...
[ { "answer_id": 64655977, "author": "Chungalin", "author_id": 2989229, "author_profile": "https://Stackoverflow.com/users/2989229", "pm_score": 0, "selected": false, "text": "ExtTextOut ETO_GLYPH_INDEX ExtTextOut GetCharacterPlacement ExtTextOutW" } ]
2008/09/16
[ "https://Stackoverflow.com/questions/71374", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6996/" ]
71,413
<p>Given a table of votes (users vote for a choice, and must supply an email address):</p> <pre><code>votes -- id: int choice: int timestamp: timestamp ip: varchar email: varchar </code></pre> <p>What's the best way to count "unique" votes (a user being a unique combination of email + ip) given the constraint they ma...
[ { "answer_id": 71430, "author": "Galwegian", "author_id": 3201, "author_profile": "https://Stackoverflow.com/users/3201", "pm_score": 2, "selected": false, "text": "select email, ip, count(choice)\nfrom votes\ngroup by email, ip, datepart(hour, timestamp)\n" }, { "answer_id": 714...
2008/09/16
[ "https://Stackoverflow.com/questions/71413", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
71,416
<p>I'm trying to do something like the following:</p> <pre><code>enum E; void Foo(E e); enum E {A, B, C}; </code></pre> <p>which the compiler rejects. I've had a quick look on Google and the consensus seems to be "you can't do it", but I can't understand why. Can anyone explain?</p> <p>Clarification 2: I'm doing...
[ { "answer_id": 71961, "author": "Laurie Cheers", "author_id": 12066, "author_profile": "https://Stackoverflow.com/users/12066", "pm_score": 3, "selected": false, "text": "typedef unsigned long E;\n\nvoid Foo(E e);\n enum Econtent { FUNCTIONALITY_NORMAL, FUNCTIONALITY_RESTRICTED, FUNCTION...
2008/09/16
[ "https://Stackoverflow.com/questions/71416", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11437/" ]
71,417
<p>From question <em><a href="https://stackoverflow.com/questions/71323/how-to-replace-a-character-for-a-newline-in-vim">How to replace a character for a newline in Vim?</a></em>. You have to use \r when replacing text for a newline, like this</p> <pre><code>:%s/%/\r/g </code></pre> <p>But when replacing end of lines...
[ { "answer_id": 71531, "author": "Aristotle Pagaltzis", "author_id": 9410, "author_profile": "https://Stackoverflow.com/users/9410", "pm_score": 6, "selected": false, "text": ":help NL-used-for-Nul <Nul> <NL> ^@ <Nul> <NL> <NL> <Nul> <Nul>" }, { "answer_id": 73438, "author": "...
2008/09/16
[ "https://Stackoverflow.com/questions/71417", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5190/" ]
71,419
<p>I've heard many programmers, particularly Delphi programmers scorn the use of 'with'. </p> <p>I thought it made programs run faster (only one reference to parent object) and that it was easier to read the code if used sensibly (less than a dozen lines of code and no nesting).</p> <p>Here's an example:</p> <pre><...
[ { "answer_id": 71470, "author": "Konrad Rudolph", "author_id": 1968, "author_profile": "https://Stackoverflow.com/users/1968", "pm_score": 4, "selected": false, "text": ". With obj\n .Left = 10\n .Submit()\nEnd With\n with" }, { "answer_id": 71471, "author": "Lars Truij...
2008/09/16
[ "https://Stackoverflow.com/questions/71419", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11781/" ]
71,423
<p>I want to disable the selection of certain rows in a datagridview.</p> <p>It must be possible to remove the select property for one or more datagridview rows in a datagridview shown in a winform. The goal is that the user can't select certain rows. (depending on a condition)</p> <p>Thankx,</p>
[ { "answer_id": 71665, "author": "szevvy", "author_id": 11437, "author_profile": "https://Stackoverflow.com/users/11437", "pm_score": 5, "selected": true, "text": "public class MyDataGridView : DataGridView\n{\n protected override void SetSelectedRowCore(int rowIndex, bool selected)\n ...
2008/09/16
[ "https://Stackoverflow.com/questions/71423", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4392/" ]
71,440
<p>I have a UserControl in my Asp.net project that has a public property. I do not want this property to show up in the Visual Studio Property Window when a user highlights an instance of the UserControl in the IDE. What attribute (or other method) should I use to prevent it from showing up?</p> <pre><code>class MyCon...
[ { "answer_id": 71454, "author": "Phil Wright", "author_id": 6276, "author_profile": "https://Stackoverflow.com/users/6276", "pm_score": 5, "selected": true, "text": "using System.ComponentModel;\n\n[Browsable(false)]\npublic bool SampleProperty { get; set; }\n <System.ComponentModel.Brow...
2008/09/16
[ "https://Stackoverflow.com/questions/71440", "https://Stackoverflow.com", "https://Stackoverflow.com/users/51/" ]
71,468
<p>Does anybody know of a tool to test OCSP responses? Preferably, something that can be used from a Windows Command-line and/or can be included (easily) in a Java/python program </p>
[ { "answer_id": 72957, "author": "JJarava", "author_id": 12344, "author_profile": "https://Stackoverflow.com/users/12344", "pm_score": 3, "selected": true, "text": "openssl ocsp -whatever\n" } ]
2008/09/16
[ "https://Stackoverflow.com/questions/71468", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
71,469
<p>Let's assume we've got the following Java code:</p> <pre><code>public class Maintainer { private Map&lt;Enum, List&lt;Listener&gt;&gt; map; public Maintainer() { this.map = new java.util.ConcurrentHashMap&lt;Enum, List&lt;Listener&gt;&gt;(); } public void addListener( Listener listener, Enum eve...
[ { "answer_id": 73129, "author": "Alexandre Victoor", "author_id": 11897, "author_profile": "https://Stackoverflow.com/users/11897", "pm_score": 0, "selected": false, "text": "public @interface MyAnnotation {\n MyEnum value();\n}\n" }, { "answer_id": 75192, "author": "flick...
2008/09/16
[ "https://Stackoverflow.com/questions/71469", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7345/" ]
71,475
<p>I have created a namespace extension that is rooted under Desktop. The main purpose of the extension is to provide a virtual list of ZIP files that represent a list of configurable directories. When the user clicks one of the those items the contents of the related directory are zipped in place and the resulting ZIP...
[ { "answer_id": 73129, "author": "Alexandre Victoor", "author_id": 11897, "author_profile": "https://Stackoverflow.com/users/11897", "pm_score": 0, "selected": false, "text": "public @interface MyAnnotation {\n MyEnum value();\n}\n" }, { "answer_id": 75192, "author": "flick...
2008/09/16
[ "https://Stackoverflow.com/questions/71475", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6508/" ]
71,478
<p>Is it possible in <code>PHP (as it is in C++)</code> to declare a <code>class method</code> OUTSIDE the <code>class definition?</code></p>
[ { "answer_id": 71545, "author": "Michał Niedźwiedzki", "author_id": 2169, "author_profile": "https://Stackoverflow.com/users/2169", "pm_score": 3, "selected": false, "text": "__call class A {\n\n public function __call($method, $args) {\n if ($method == 'foo') {\n re...
2008/09/16
[ "https://Stackoverflow.com/questions/71478", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
71,488
<p>I've currently got a set of reports with a number of common functions sitting in code blocks within the .rdl files. This obviously presents a maintainability issue and I as wondering if anyone knew a way for these different reports to share a library of common code?</p> <p>Ideally I'd like to have a .Net Assembly a...
[ { "answer_id": 1546774, "author": "Daver", "author_id": 68095, "author_profile": "https://Stackoverflow.com/users/68095", "pm_score": 2, "selected": false, "text": "<CodeGroup class=\"UnionCodeGroup\"\n version=\"1\"\n PermissionSetName=\"FullTrust\"\n Name=\"MyCodeGroup\"\n Desc...
2008/09/16
[ "https://Stackoverflow.com/questions/71488", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4019/" ]
71,491
<p>I'm planning to write a simple J2SE application to aggregate information from multiple web sources.</p> <p>The most difficult part, I think, is extraction of meaningful information from web pages, if it isn't available as RSS or Atom feeds. For example, I might want to extract a list of questions from stackoverflow...
[ { "answer_id": 71577, "author": "Vhaerun", "author_id": 11234, "author_profile": "https://Stackoverflow.com/users/11234", "pm_score": 0, "selected": false, "text": "GET /file.html HTTP/1.0\nHost: site.com\n<ENTER>\n<ENTER>\n Socket#getInputStream" }, { "answer_id": 71690, "au...
2008/09/16
[ "https://Stackoverflow.com/questions/71491", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1764/" ]
71,518
<p>I just tried FxCop. It does detect unused private methods, but not unused public. Is there a custom rule that I can download, plug-in that will detect public methods that aren't called from within the same assembly?</p>
[ { "answer_id": 71730, "author": "Keith", "author_id": 905, "author_profile": "https://Stackoverflow.com/users/905", "pm_score": 3, "selected": false, "text": "public internal" }, { "answer_id": 71929, "author": "user7116", "author_id": 7116, "author_profile": "https:/...
2008/09/16
[ "https://Stackoverflow.com/questions/71518", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9328/" ]
71,534
<p>I hope I haven't painted myself into a corner. I've gotten what seems to be most of the way through implementing a Makefile and I can't get the last bit to work. I hope someone here can suggest a technique to do what I'm trying to do.</p> <p>I have what I'll call "bills of materials" in version controlled files i...
[ { "answer_id": 71623, "author": "mbyrne215", "author_id": 5241, "author_profile": "https://Stackoverflow.com/users/5241", "pm_score": 0, "selected": false, "text": "$(DEP) : $(SIGS)\n ... recreate dependency\n$(BOMS) : $(SIGS)\n ...checkout TAG=$(VER) $@\n$(SIGS) :\n ...if $(sub...
2008/09/16
[ "https://Stackoverflow.com/questions/71534", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7685/" ]
71,561
<p>In a web interface, I've got a text field. When user enters text and accepts with enter, application performs an action.</p> <p>I wanted to test the behavior with Selenium. Unfortunately, invoking 'keypress' with chr(13) insert representation of the character into the field.</p> <p>Is there a way other then submit...
[ { "answer_id": 71902, "author": "noah", "author_id": 12034, "author_profile": "https://Stackoverflow.com/users/12034", "pm_score": 4, "selected": true, "text": "selenium.keyDown(id, \"\\\\13\");\n" } ]
2008/09/16
[ "https://Stackoverflow.com/questions/71561", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9622/" ]
71,565
<p>If I have the following:</p> <pre><code>Public Class Product Public Id As Integer Public Name As String Public AvailableColours As List(Of Colour) Public AvailableSizes As List(Of Size) End Class </code></pre> <p>and I want to get a list of products from the database and display them on a page alon...
[ { "answer_id": 71624, "author": "Bob Dizzle", "author_id": 9581, "author_profile": "https://Stackoverflow.com/users/9581", "pm_score": 0, "selected": false, "text": "Public static function Load(Id as integer) as Product\n\nProduct.Load(Id)\n private _Colors as list(Of Color)\npublic prop...
2008/09/16
[ "https://Stackoverflow.com/questions/71565", "https://Stackoverflow.com", "https://Stackoverflow.com/users/984/" ]
71,578
<p>I have a database in ISO-8859-2 format, but I need to create XML in UTF-8. This means that I must encode the database before prinitng in UTF-8. I know very little about ASP.Net, so I'm hoping someone can help.</p> <p>In PHP I would do something like this:</p> <pre><code>db_connect(); mysql_query("SET NAMES 'UTF8'...
[ { "answer_id": 71640, "author": "Omer van Kloeten", "author_id": 4979, "author_profile": "https://Stackoverflow.com/users/4979", "pm_score": 3, "selected": true, "text": "str var encoding = System.Text.Encoding.GetEncoding(\"iso-8859-2\");\n\nvar bytes = System.Text.Encoding.Convert(enco...
2008/09/16
[ "https://Stackoverflow.com/questions/71578", "https://Stackoverflow.com", "https://Stackoverflow.com/users/205368/" ]
71,585
<p>Since generics were introduced, Class is parametrized, so that List.class produces Class&lt;List>. This is clear.</p> <p>What I am not able to figure out is how to get a instance of Class of type which is parametrized itself, i.e. Class&lt;List&lt;String>>. Like in this snippet:</p> <pre><code>public class GenTest...
[ { "answer_id": 71795, "author": "Dan Dyer", "author_id": 5171, "author_profile": "https://Stackoverflow.com/users/5171", "pm_score": 1, "selected": false, "text": "public class GenTest\n{\n private static <E> List<E> createList()\n {\n return new ArrayList<E>();\n }\n\n ...
2008/09/16
[ "https://Stackoverflow.com/questions/71585", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7135/" ]
71,590
<p>With this code I can show an animated gif while the server script is running:</p> <pre><code>function calculateTotals() { $('#results').load('getResults.php', null, showStatusFinished); showLoadStatus(); } function showLoadStatus() { $('#status').html(''); } function showStatusFinished() { $('#st...
[ { "answer_id": 165872, "author": "matdumsa", "author_id": 1775, "author_profile": "https://Stackoverflow.com/users/1775", "pm_score": 3, "selected": true, "text": "function getStatus() {\n $.getJSON(\"/status.php\",{\"session\":0, \"requestID\":12345}, \n function(data) { //data is...
2008/09/16
[ "https://Stackoverflow.com/questions/71590", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4639/" ]
71,608
<p>How do you set up your .NET development tree? I use a structure like this:</p> <pre><code>-projectname --config (where I put the configuration files) --doc (where I put all the document concerning the project: e-mails, documentation) --tools (all the tools I use: Nunit, Moq) --lib (all the libraries used by ...
[ { "answer_id": 71738, "author": "Curro", "author_id": 10688, "author_profile": "https://Stackoverflow.com/users/10688", "pm_score": 0, "selected": false, "text": "\nsolutionfile.sln\n-src\n--projectname\n---config\n---doc\n---source files (structure representing namespaces)\n-test\n--tes...
2008/09/16
[ "https://Stackoverflow.com/questions/71608", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4093/" ]
71,625
<p>I have just found a static nested interface in our code-base.</p> <pre><code>class Foo { public static interface Bar { /* snip */ } /* snip */ } </code></pre> <p>I have never seen this before. The original developer is out of reach. Therefore I have to ask SO:</p> <p>What are the semantics beh...
[ { "answer_id": 71654, "author": "Clinton Dreisbach", "author_id": 6262, "author_profile": "https://Stackoverflow.com/users/6262", "pm_score": 3, "selected": false, "text": "Foo.Bar public class Baz implements Foo.Bar {\n ...\n}\n" }, { "answer_id": 71708, "author": "Skizz",...
2008/09/16
[ "https://Stackoverflow.com/questions/71625", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1870/" ]
71,643
<p>Currently I monitoring a particular file with a simple shell one-liner:</p> <pre><code>filesize=$(ls -lah somefile | awk '{print $5}') </code></pre> <p>I'm aware that Perl has some nice modules to deal with Excel files so the idea is to, let's say, run that check daily, perhaps with cron, and write the result on ...
[ { "answer_id": 71668, "author": "Aristotle Pagaltzis", "author_id": 9410, "author_profile": "https://Stackoverflow.com/users/9410", "pm_score": 3, "selected": false, "text": "-s" }, { "answer_id": 72229, "author": "Michael Cramer", "author_id": 1496728, "author_profil...
2008/09/16
[ "https://Stackoverflow.com/questions/71643", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6992/" ]
71,647
<p>I have an ASP.Net 2.0 application in which the Session_Start event is not firing in my Global.asax file. Can anyone tell why this is happening and how I can get it working?</p> <p>The application worked fine on my Windows XP development machine, but stopped working when deployed to the server (Win Server 2003/IIS 6...
[ { "answer_id": 192433, "author": "craigmoliver", "author_id": 12252, "author_profile": "https://Stackoverflow.com/users/12252", "pm_score": 1, "selected": false, "text": "<session />" } ]
2008/09/16
[ "https://Stackoverflow.com/questions/71647", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1052/" ]
71,692
<p>I'm building small web site in Java (Spring MVC with JSP views) and am trying to find best solution for making and including few reusable modules (like "latest news" "upcoming events"...).</p> <p>So the question is: Portlets, tiles or some other technology?</p>
[ { "answer_id": 71807, "author": "jodonnell", "author_id": 4223, "author_profile": "https://Stackoverflow.com/users/4223", "pm_score": 1, "selected": false, "text": "public class MyApplication implements EntryPoint, HistoryListener\n{\n static final String INIT_STATE = \"status\";\n\n ...
2008/09/16
[ "https://Stackoverflow.com/questions/71692", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11890/" ]
71,694
<p>Is there an api to bring the vista side bar to the front (Win+Space) programatically and to do the reverse (send it to the back ground).</p>
[ { "answer_id": 71785, "author": "Cory", "author_id": 11870, "author_profile": "https://Stackoverflow.com/users/11870", "pm_score": 1, "selected": false, "text": "SetWindowPos(sidebarHandle, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NORESIZE);\n SetWindowPos(sidebarHandle, HWND_BOTTOM, 0, 0,...
2008/09/16
[ "https://Stackoverflow.com/questions/71694", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11930/" ]
71,720
<p>I've been using OpenGL for years, but after trying to use D3D for the first time, I wasted a significant amount of time trying figure out how to make my scene lights stay fixed in the world rather than fixed on my objects.</p> <p>In OpenGL light positions get transformed just like everything else with the MODELVIEW...
[ { "answer_id": 71802, "author": "Baxissimo", "author_id": 9631, "author_profile": "https://Stackoverflow.com/users/9631", "pm_score": 2, "selected": false, "text": "MODELVIEW D3DTS_VIEW D3DTS_WORLD" } ]
2008/09/16
[ "https://Stackoverflow.com/questions/71720", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9631/" ]
71,740
<p>in our application we have a Java applet running inside a .NET browser control. It is a know issue from Sun that running an applet this way may crash the control.</p> <p>Has anyone come across the same problem and solved it?</p> <p>Atm we are running the applet in a Webbrowser but we need to run it in a browser co...
[ { "answer_id": 72084, "author": "Mike", "author_id": 1115144, "author_profile": "https://Stackoverflow.com/users/1115144", "pm_score": 0, "selected": false, "text": "Here is a link - http://msdn.microsoft.com/en-us/library/aa290083(VS.71).aspx\n" } ]
2008/09/16
[ "https://Stackoverflow.com/questions/71740", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11946/" ]
71,756
<p>If I remove all the ' characters from a SQL query, is there some other way to do a SQL injection attack on the database?</p> <p>How can it be done? Can anyone give me examples?</p>
[ { "answer_id": 71780, "author": "Bob Dizzle", "author_id": 9581, "author_profile": "https://Stackoverflow.com/users/9581", "pm_score": 2, "selected": false, "text": "5; drop table employees; -- select * from somewhere where number = 5; drop table employees; -- and sadfsf --" }, { ...
2008/09/16
[ "https://Stackoverflow.com/questions/71756", "https://Stackoverflow.com", "https://Stackoverflow.com/users/184/" ]
71,766
<p>In Delphi, I want to be able to create an private object that's associated with a class, and access it from all instances of that class. In Java, I'd use:</p> <pre><code>public class MyObject { private static final MySharedObject mySharedObjectInstance = new MySharedObject(); } </code></pre> <p>Or, if MyShare...
[ { "answer_id": 71811, "author": "CL.", "author_id": 11654, "author_profile": "https://Stackoverflow.com/users/11654", "pm_score": 0, "selected": false, "text": "implementation" }, { "answer_id": 71841, "author": "squadette", "author_id": 7754, "author_profile": "https...
2008/09/16
[ "https://Stackoverflow.com/questions/71766", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11961/" ]
71,775
<p>I have to read data from some files and insert the data into different tables in a database. Is Unix shell script powerful enough to do the job?</p> <p>Is it easy to do the job in shell script or should I go about doing this in Java?</p>
[ { "answer_id": 71789, "author": "Josti", "author_id": 11231, "author_profile": "https://Stackoverflow.com/users/11231", "pm_score": 0, "selected": false, "text": "echo \"INSERT INTO foo (b,a,r) VALUES (1,2,3);\" | \n mysql -u user -psecret -h host database\n" }, { "answer_id":...
2008/09/16
[ "https://Stackoverflow.com/questions/71775", "https://Stackoverflow.com", "https://Stackoverflow.com/users/184/" ]
71,776
<p>I have 16,000 jpg's from a webcan screeb grabber that I let run for a year pointing into the back year. I want to find a way to grab every 4th image so that I can then put them into another directory so I can later turn them into a movie. Is there a simple bash script or other way under linux that I can do this.</p>...
[ { "answer_id": 71798, "author": "Pat", "author_id": 238, "author_profile": "https://Stackoverflow.com/users/238", "pm_score": 1, "selected": false, "text": "ls -1 /path/to/files/ | perl -e 'while (<STDIN>) {($seq)=/(\\d*)\\.jpg$/; print $_ if $seq && $seq % 4 ==0}'\n file_9.jpg file_10.j...
2008/09/16
[ "https://Stackoverflow.com/questions/71776", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11950/" ]
71,788
<p>I'm writing an Emacs major mode for an APL dialect I use at work. I've gotten basic font locking to work, and after setting comment-start and comment-start-skip, comment/uncomment region and fill paragraph also work.</p> <p>However, comment blocks often contain javadoc style comments and i would like fill-paragraph...
[ { "answer_id": 72637, "author": "Allen", "author_id": 6043, "author_profile": "https://Stackoverflow.com/users/6043", "pm_score": 1, "selected": false, "text": "fill-paragraph-function" }, { "answer_id": 145431, "author": "Joakim Hårsman", "author_id": 11978, "author_...
2008/09/16
[ "https://Stackoverflow.com/questions/71788", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11978/" ]
71,817
<p>The problem: I have a class which contains a template method <code>execute</code> which calls another method <code>_execute</code>. Subclasses are supposed to overwrite <code>_execute</code> to implement some specific functionality. This functionality should be documented in the docstring of <code>_execute</code>. ...
[ { "answer_id": 72126, "author": "John Montgomery", "author_id": 5868, "author_profile": "https://Stackoverflow.com/users/5868", "pm_score": 0, "selected": false, "text": "__doc__ _execute \n\nclass MyClass(object):\n def execute(self):\n '''original doc-string'''\n self...
2008/09/16
[ "https://Stackoverflow.com/questions/71817", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11992/" ]
71,820
<p>I need a function called <code>SizeOfPipe()</code> which should return the size of a pipe - I only want to know how much data is in the pipe and not actually read data off the pipe itself. </p> <p>I thought the following code would work:</p> <pre><code>fseek (pPipe, 0 , SEEK_END); *pBytes = ftell (pPipe); rewind (...
[ { "answer_id": 71925, "author": "CL.", "author_id": 11654, "author_profile": "https://Stackoverflow.com/users/11654", "pm_score": 3, "selected": false, "text": "st_size fstat()" }, { "answer_id": 77381, "author": "MSN", "author_id": 6210, "author_profile": "https://St...
2008/09/16
[ "https://Stackoverflow.com/questions/71820", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
71,838
<p>Does anyone know if the Infragistics UltraGrid control provides functionality similar to that of DataGridView.HitTestInfo?</p>
[ { "answer_id": 72466, "author": "Andrew", "author_id": 5662, "author_profile": "https://Stackoverflow.com/users/5662", "pm_score": 0, "selected": false, "text": ".MousePosition System.Drawing.Point" }, { "answer_id": 72687, "author": "Ryan Spears", "author_id": 11948, ...
2008/09/16
[ "https://Stackoverflow.com/questions/71838", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11948/" ]
71,853
<p>I'm using an Xml field in my Sql Server database table. I'm trying to search a word using the XQuery <strong>contains</strong> method but it seems to search <strong>only</strong> in case sensitive mode. The lower method isn't implemented on Sql Server XQuery implementation also. ¿Is there a simple solution to this p...
[ { "answer_id": 74594, "author": "JWHEAT", "author_id": 7079, "author_profile": "https://Stackoverflow.com/users/7079", "pm_score": 3, "selected": true, "text": "DECLARE @x xml = N'abcDEF!@4';\nSELECT @x.value('fn:upper-case(/text()[1])', 'nvarchar(10)');\n" } ]
2008/09/16
[ "https://Stackoverflow.com/questions/71853", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
71,864
<p>I want to delete all but the 4 newest directories in my parent directory. How would you do this in Bash?</p>
[ { "answer_id": 71891, "author": "Leigh Caldwell", "author_id": 3267, "author_profile": "https://Stackoverflow.com/users/3267", "pm_score": 4, "selected": true, "text": "ls -atrd */ | head --lines=-4 | xargs rm -rf\n" }, { "answer_id": 71972, "author": "mana", "author_id":...
2008/09/16
[ "https://Stackoverflow.com/questions/71864", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12015/" ]
71,899
<p>I'm trying to write a simple audio player for a website, and am using the EMBED... tag to embed the audio and setting HIDDEN="true" and using various javascript commands to control the audio playback. It works fine for realplayer and mplayer but the quicktime plugin doesn't respond to javascript if the hidden bit is...
[ { "answer_id": 72107, "author": "p4bl0", "author_id": 12043, "author_profile": "https://Stackoverflow.com/users/12043", "pm_score": 2, "selected": false, "text": "object embed hidden" } ]
2008/09/16
[ "https://Stackoverflow.com/questions/71899", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
71,913
<p>Here is a sample from Kernighan &amp; Ritchie's "The C Programming Language":</p> <pre><code>int getline(char s[], int lim) { int c, i = 0; while (--lim &gt; 0; &amp;&amp; (c=getchar()) !=EOF &amp;&amp; c !='\n') { s[i++] = c; } if (c =='\n') { s[i++] = c; } s[i] = '\0'; ...
[ { "answer_id": 71988, "author": "aku", "author_id": 1196, "author_profile": "https://Stackoverflow.com/users/1196", "pm_score": 0, "selected": false, "text": "int getline(char s[], int lim)\n{\n int c, i;\n i=0;\n /* While staying withing limit and there is a char in stdin and it's...
2008/09/16
[ "https://Stackoverflow.com/questions/71913", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11972/" ]
71,920
<p>How to implement a website with a recommendation system similar to stackoverflow/digg/reddit? I.e., users submit content and the website needs to calculate some sort of "hotness" according to how popular the item is. The flow is as follows:</p> <ul> <li>Users submit content</li> <li>Other users view and vote on the...
[ { "answer_id": 13159442, "author": "Chris Broski", "author_id": 468111, "author_profile": "https://Stackoverflow.com/users/468111", "pm_score": 1, "selected": false, "text": "SELECT id, title\nFROM videos\nORDER BY \n LOG10(ABS(cached_votes_total) + 1) * SIGN(cached_votes_total) \n ...
2008/09/16
[ "https://Stackoverflow.com/questions/71920", "https://Stackoverflow.com", "https://Stackoverflow.com/users/103373/" ]
71,932
<p>I'm missing the boat on something here, kids. This keeps rearing its head and I don't know what's going on with it, so I hope my homeys here can help.</p> <p>When working in Silverlight, when I create bindings in my c# code, they never hold up when the application is running. The declarative bindings from my xaml...
[ { "answer_id": 72129, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 3, "selected": false, "text": "TextBlock tb = new TextBlock();\nBinding b = new Binding(\"FontSize\");\nb.Source = this;\ntb.SetBinding(TextBlock.FontSizeProp...
2008/09/16
[ "https://Stackoverflow.com/questions/71932", "https://Stackoverflow.com", "https://Stackoverflow.com/users/93/" ]
71,944
<p>I am using <code>&lt;input type="file" id="fileUpload" runat="server"&gt;</code> to upload a file in an ASP.NET application. I would like to limit the file type of the upload (example: limit to .xls or .xlsx file extensions). </p> <p>Both JavaScript or server-side validation are OK (as long as the server side valid...
[ { "answer_id": 72013, "author": "staktrace", "author_id": 12050, "author_profile": "https://Stackoverflow.com/users/12050", "pm_score": 3, "selected": false, "text": "<form onsubmit=\"if (document.getElementById('fileUpload').value.match(/xls$/) || document.getElementById('fileUpload').v...
2008/09/16
[ "https://Stackoverflow.com/questions/71944", "https://Stackoverflow.com", "https://Stackoverflow.com/users/51/" ]
71,959
<p>I have my own class inside the file "Particles.h" and the class's implementation is inside "Particles.cpp"</p> <p>I want the file "Load.h" to recognize my classes inside there, so I've added the line</p> <pre><code>#include "Particles.h" </code></pre> <p>and the file doesn't recognize it and in the past everythin...
[ { "answer_id": 72021, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 0, "selected": false, "text": "Stone *stone[48];\n" }, { "answer_id": 72109, "author": "CariElf", "author_id": 12117, "author_profile": "h...
2008/09/16
[ "https://Stackoverflow.com/questions/71959", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
71,971
<p>My web application generates pdf files and either e-mails or faxes them to our customers. Somehow IIS6 is keeping hold of the file and blocking any other requests for it claiming the old '..the process cannot access the file 'xxx.pdf' because it is being used by another process.'</p> <p>When I recycle the applicati...
[ { "answer_id": 72093, "author": "massimogentilini", "author_id": 11673, "author_profile": "https://Stackoverflow.com/users/11673", "pm_score": 0, "selected": false, "text": "byte[] asciiBytes = getPdf(...);\ntry{\nBinaryWriter bw = new BinaryWriter(File.Create(filename));\nbw.Write(pdfBy...
2008/09/16
[ "https://Stackoverflow.com/questions/71971", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11707/" ]
71,979
<p>I just came across the proposed <a href="http://web.archive.org/web/20171008232044/http://dancinghacker.com:80/code/dataflow/dataflow/introduction/dataflow.html" rel="nofollow noreferrer">Boost::Dataflow</a> library. It seems like an interesting approach and I was wondering if there are other such alternative frame...
[ { "answer_id": 13454268, "author": "Alexei Kaigorodov", "author_id": 1206301, "author_profile": "https://Stackoverflow.com/users/1206301", "pm_score": 2, "selected": false, "text": "tbb::flow" } ]
2008/09/16
[ "https://Stackoverflow.com/questions/71979", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
71,980
<p>I have a BSTR object that I would like to convert to copy to a wchar__t object. The tricky thing is the length of the BSTR object could be anywhere from a few kilobytes to a few hundred kilobytes. Is there an efficient way of copying the data across? I know I could just declare a wchar_t array and alway allocate the...
[ { "answer_id": 72760, "author": "Mike Dimmick", "author_id": 6970, "author_profile": "https://Stackoverflow.com/users/6970", "pm_score": 2, "selected": false, "text": "BSTR BSTR BSTR wchar_t BSTR unsigned short wchar_t wchar_t /Zc:wchar_t" }, { "answer_id": 72866, "author": "...
2008/09/16
[ "https://Stackoverflow.com/questions/71980", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
71,985
<p>How can I copy a line 10 times easily in Emacs? I can't find a copy-line shortcut or function. I can use C-aC-spcC-eM-w to laboriously copy the line but how can I then paste it more than once?</p> <p>Any ideas before I go and write my own functions.</p>
[ { "answer_id": 72181, "author": "ShreevatsaR", "author_id": 4958, "author_profile": "https://Stackoverflow.com/users/4958", "pm_score": 5, "selected": true, "text": "kill-ring-save kill-region (defadvice kill-ring-save (before slickcopy activate compile)\n \"When called interactively wi...
2008/09/16
[ "https://Stackoverflow.com/questions/71985", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9831/" ]
72,010
<p>Given the following example, why do I have to explicitly use the statement <code>b-&gt;A::DoSomething()</code> rather than just <code>b-&gt;DoSomething()</code>?</p> <p>Shouldn't the compiler's overload resolution figure out which method I'm talking about?</p> <p>I'm using Microsoft VS 2005. (Note: using virtual d...
[ { "answer_id": 72075, "author": "Konrad Rudolph", "author_id": 1968, "author_profile": "https://Stackoverflow.com/users/1968", "pm_score": 6, "selected": true, "text": "B::DoSomething A B class B : public A {\npublic:\n using A::DoSomething;\n // …\n}\n" }, { "answer_id": 7...
2008/09/16
[ "https://Stackoverflow.com/questions/72010", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12083/" ]
72,036
<p>What is the best way to implement mutliple Default Buttons on a ASP.NET Webform?</p> <p>I have what I think is a pretty standard page. There is a login area with user/pass field and a login button. Then elsewhere on the same page there is a single search field with a search button.</p>
[ { "answer_id": 72095, "author": "jansokoly", "author_id": 12111, "author_profile": "https://Stackoverflow.com/users/12111", "pm_score": 4, "selected": true, "text": "asp:Panel DefaultButton" } ]
2008/09/16
[ "https://Stackoverflow.com/questions/72036", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3747/" ]
72,048
<p>I admit I know enough about COM and IE architecture only to be dangerous. I have a working C# .NET ActiveX control similar to this:</p> <pre><code>using System; using System.Runtime.InteropServices; using BrowseUI; using mshtml; using SHDocVw; using Microsoft.Win32; namespace CTI { public interfac...
[ { "answer_id": 75086, "author": "jlew", "author_id": 7450, "author_profile": "https://Stackoverflow.com/users/7450", "pm_score": 2, "selected": false, "text": "IHtmlDocument2 Document { set; }\n public IHtmlDocument2 Document\n{\n set { _doc = value;}\n}\n CTIAX.Document = document; \n"...
2008/09/16
[ "https://Stackoverflow.com/questions/72048", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
72,057
<p>I would like to have a Guile script, which implements functions, which output test result messages according to the TAP protocol.</p>
[ { "answer_id": 21836368, "author": "Yawar", "author_id": 20371, "author_profile": "https://Stackoverflow.com/users/20371", "pm_score": 2, "selected": false, "text": "spec $ ggspec -f tap\n spec/lib-spec.scm" } ]
2008/09/16
[ "https://Stackoverflow.com/questions/72057", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11886/" ]
72,070
<p>I'm executing stored procedures using SET FMTONLY ON, in order to emulate what our code generator does. However, it seems that the results are cached when executed like this, as I'm still getting a <em>Conversion failed</em> error from a proc that I have just dropped! This happens even when I execute the proc witho...
[ { "answer_id": 232380, "author": "Rick", "author_id": 14138, "author_profile": "https://Stackoverflow.com/users/14138", "pm_score": 2, "selected": true, "text": "SET FMTONLY ON set variable SET FMTONLY on\n\nselect 1 as a\n\ndeclare @a int\nset @a = 'a'\n" }, { "answer_id": 11450...
2008/09/16
[ "https://Stackoverflow.com/questions/72070", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8741/" ]
72,090
<p>I'm trying to modify my GreaseMonkey script from firing on window.onload to window.DOMContentLoaded, but this event never fires.</p> <p>I'm using FireFox 2.0.0.16 / GreaseMonkey 0.8.20080609</p> <p><a href="https://stackoverflow.com/questions/59205/enhancing-stackoverflow-user-experience">This</a> is the full scri...
[ { "answer_id": 72245, "author": "Sam Hasler", "author_id": 2541, "author_profile": "https://Stackoverflow.com/users/2541", "pm_score": 6, "selected": true, "text": "window.addEventListener (\"load\", function() { }, false);" }, { "answer_id": 72314, "author": "PabloG", "a...
2008/09/16
[ "https://Stackoverflow.com/questions/72090", "https://Stackoverflow.com", "https://Stackoverflow.com/users/394/" ]
72,098
<p>When using MediaWiki's markup language, the only thing that I hate is creating numbered lists. The only way I know to create a list is to do something like this:</p> <pre><code>#Item1 #Item2 </code></pre> <p>However, if I want to add spaces or some other text between those lines, the numbering gets lost. For examp...
[ { "answer_id": 72140, "author": "finnw", "author_id": 12048, "author_profile": "https://Stackoverflow.com/users/12048", "pm_score": 5, "selected": false, "text": "#Item1\n#:Somestuff\n#Item2\n" }, { "answer_id": 630617, "author": "Adrian Archer", "author_id": 65284, "...
2008/09/16
[ "https://Stackoverflow.com/questions/72098", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
72,103
<p>I'm using a winforms webbrowser control to display some content in a windows forms app. I'm using the DocumentText property to write the generated HTML. That part is working spectacularly. Now I want to use some images in the markup. (I also would prefer to use linked CSS and JavaScript, however, that can be wor...
[ { "answer_id": 72339, "author": "Ken Wootton", "author_id": 7357, "author_profile": "https://Stackoverflow.com/users/7357", "pm_score": 4, "selected": true, "text": "public class HtmlFormatter\n{\n /// <summary>\n /// Indicator that this is a URI referencing the local\n /// file...
2008/09/16
[ "https://Stackoverflow.com/questions/72103", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5496/" ]
72,116
<p>I understand about race conditions and how with multiple threads accessing the same variable, updates made by one can be ignored and overwritten by others, but what if each thread is writing the same value (not different values) to the same variable; can even this cause problems? Could this code:</p> <p>GlobalVar.p...
[ { "answer_id": 72571, "author": "Torne", "author_id": 12345, "author_profile": "https://Stackoverflow.com/users/12345", "pm_score": 3, "selected": false, "text": "int x = 0, y = 0;\n\n//thread A does:\nx = 1;\ny = 2;\nif (y == 2)\n print(x);\n\n//thread B does, at the same time:\nif (...
2008/09/16
[ "https://Stackoverflow.com/questions/72116", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
72,121
<p>Let me use the following example to explain my question:</p> <pre class="lang-csharp prettyprint-override"><code>public string ExampleFunction(string Variable) { return something; } string WhatIsMyName = &quot;Hello World&quot;; string Hello = ExampleFunction(WhatIsMyName); </code></pre> <p>When I pass the vari...
[ { "answer_id": 72139, "author": "Gishu", "author_id": 1695, "author_profile": "https://Stackoverflow.com/users/1695", "pm_score": -1, "selected": true, "text": "NamedParameter Name Param" }, { "answer_id": 72145, "author": "Konrad Rudolph", "author_id": 1968, "author_...
2008/09/16
[ "https://Stackoverflow.com/questions/72121", "https://Stackoverflow.com", "https://Stackoverflow.com/users/383/" ]
72,125
<p>Lets say that you have websites www.xyz.com and www.abc.com.</p> <p>Lets say that a user goes to www.abc.com and they get authenticated through the normal ASP .NET membership provider. </p> <p>Then, from that site, they get sent to (redirection, linked, whatever works) site www.xyz.com, and the intent of site www....
[ { "answer_id": 72517, "author": "Adam Pope", "author_id": 12226, "author_profile": "https://Stackoverflow.com/users/12226", "pm_score": 2, "selected": false, "text": "<authentication mode=\"Forms\">\n <forms name=\".ASPXAUTH\" loginUrl=\"~/Login.aspx\" path=\"/\" \n p...
2008/09/16
[ "https://Stackoverflow.com/questions/72125", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7952/" ]
72,128
<p>Using C++ (and Qt), I need to process a big amount of 3D coordinates.</p> <p>Specifically, when I receive a 3D coordinate (made of 3 doubles), I need to check in a list if this coordinate has already been processed. If not, then I process it and add it to the list (or container).</p> <p>The amount of coordinates c...
[ { "answer_id": 72227, "author": "zweiterlinde", "author_id": 6592, "author_profile": "https://Stackoverflow.com/users/6592", "pm_score": 0, "selected": false, "text": "map<map<map<>>>" }, { "answer_id": 72350, "author": "Roel", "author_id": 11449, "author_profile": "h...
2008/09/16
[ "https://Stackoverflow.com/questions/72128", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2796/" ]
72,151
<p>I'm using OLEDB provider for ADO.Net connecting to an Oracle database. In my loop, I am doing an insert:</p> <pre><code>insert into ps_tl_compleave_tbl values('2626899', 0, TO_DATE('01/01/2002', 'MM/DD/YYYY'), 'LTKN', 'LTKN', '52', TO_DATE('01/01/2002', 'MM/DD/YYYY'), 16.000000, 24.000)insert into ps_tl_compleave_...
[ { "answer_id": 72170, "author": "ShoeLace", "author_id": 3825, "author_profile": "https://Stackoverflow.com/users/3825", "pm_score": 2, "selected": false, "text": "BEGIN\n insert (...) into (...);\n insert (...) into (...);\nEND;\n" }, { "answer_id": 72179, "author"...
2008/09/16
[ "https://Stackoverflow.com/questions/72151", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10589/" ]
72,153
<p>How can I construct a MSBuild ItemGroup to exclude .svn directories and all files within (recursively). I've got:</p> <pre><code>&lt;ItemGroup&gt; &lt;LibraryFiles Include="$(LibrariesReleaseDir)\**\*.*" Exclude=".svn" /&gt; &lt;/ItemGroup&gt; </code></pre> <p>At the moment, but this does not exclude anythin...
[ { "answer_id": 72536, "author": "Kieran Benton", "author_id": 5777, "author_profile": "https://Stackoverflow.com/users/5777", "pm_score": 7, "selected": true, "text": "<ItemGroup>\n <LibraryFiles Include=\"$(LibrariesReleaseDir)\\**\\*.*\" \n Exclude=\"$(LibrariesRe...
2008/09/16
[ "https://Stackoverflow.com/questions/72153", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5777/" ]
72,167
<p>How do I find out which sound files the user has configured in the control panel?</p> <p>Example: I want to play the sound for "Device connected".</p> <p>Which API can be used to query the control panel sound settings?</p> <p>I see that there are some custom entries made by third party programs in the control pan...
[ { "answer_id": 72250, "author": "titanae", "author_id": 2387, "author_profile": "https://Stackoverflow.com/users/2387", "pm_score": 5, "selected": true, "text": "PlaySound" }, { "answer_id": 72488, "author": "Nidonocu", "author_id": 483, "author_profile": "https://Sta...
2008/09/16
[ "https://Stackoverflow.com/questions/72167", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1810/" ]
72,176
<p>While there are 100 ways to solve the conversion problem, I am focusing on performance.</p> <p>Give that the string only contains binary data, what is the fastest method, in terms of performance, of converting that data to a byte[] (not char[]) under C#?</p> <p>Clarification: This is not ASCII data, rather binary...
[ { "answer_id": 72500, "author": "Konrad Rudolph", "author_id": 1968, "author_profile": "https://Stackoverflow.com/users/1968", "pm_score": 0, "selected": false, "text": "byte[]" }, { "answer_id": 72822, "author": "Davy Landman", "author_id": 11098, "author_profile": "...
2008/09/16
[ "https://Stackoverflow.com/questions/72176", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12113/" ]
72,198
<p>This seemed like an easy thing to do. I just wanted to pop up a text window and display two columns of data -- a description on the left side and a corresponding value displayed on the right side. I haven't worked with Forms much so I just grabbed the first control that seemed appropriate, a TextBox. I thought using...
[ { "answer_id": 72283, "author": "Matt Dawdy", "author_id": 232, "author_profile": "https://Stackoverflow.com/users/232", "pm_score": 1, "selected": true, "text": "Private Declare Function SendMessage _\n Lib \"user32\" Alias \"SendMessageA\" _\n (ByVal handle As IntPtr, ByVal wMsg As I...
2008/09/16
[ "https://Stackoverflow.com/questions/72198", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12058/" ]
72,204
<p>Has anyone used <a href="http://www.ayende.com/Blog/archive/2007/09/03/Rhino-Igloo-ndash-MVC-Framework-for-Web-Forms.aspx" rel="nofollow noreferrer">Rhino igloo</a> in a non-trivial project? I am curious if it's worth, what are its drawbacks, does it enhance testability a lot, is it easy to use. How would you compar...
[ { "answer_id": 72283, "author": "Matt Dawdy", "author_id": 232, "author_profile": "https://Stackoverflow.com/users/232", "pm_score": 1, "selected": true, "text": "Private Declare Function SendMessage _\n Lib \"user32\" Alias \"SendMessageA\" _\n (ByVal handle As IntPtr, ByVal wMsg As I...
2008/09/16
[ "https://Stackoverflow.com/questions/72204", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1801/" ]