qid
int64
4
19.1M
question
stringlengths
18
48.3k
answers
list
date
stringlengths
10
10
metadata
list
172,653
<p>Is there <strong>any</strong> way (maybe directly editing resource files) to configure a Tab Control (add/remove tabs and their captions and contents) at <strong>design time</strong> with Visual Studio 2008 without SP1 (I heard that SP1 has such feature)? P.S.: I use c++ with wtl</p>
[ { "answer_id": 172833, "author": "Neall", "author_id": 619, "author_profile": "https://Stackoverflow.com/users/619", "pm_score": 4, "selected": false, "text": "photos\n photoid\n caption\n filename\n date\n\ntags\n tagid\n tagname\n\nphototags\n photoid\n tagid\n" }, { "a...
2008/10/05
[ "https://Stackoverflow.com/questions/172653", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14535/" ]
172,658
<p>I'm attempting to use extension methods to add an operater overload to the C# <code>StringBuilder</code> class. Specifically, given <code>StringBuilder</code> <code>sb</code>, I'd like <code>sb += "text"</code> to become equivalent to <code>sb.Append("text")</code>.</p> <p>Here's the syntax for creating an extensi...
[ { "answer_id": 2194671, "author": "Jordão", "author_id": 31158, "author_profile": "https://Stackoverflow.com/users/31158", "pm_score": 6, "selected": false, "text": "class Program {\n\n static void Main(string[] args) {\n StringBuilder sb = new StringBuilder();\n ReceiveImportantM...
2008/10/05
[ "https://Stackoverflow.com/questions/172658", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1388/" ]
172,691
<p>I'm trying to determine if the user is using 24 hour or 12 hour time, and there doesn't seem to be a good way to figure this out other than creating an NSDateFormatter and searching the format string for the period field ('a' character)</p> <p>Here's what I'm doing now:</p> <pre><code>NSDateFormatter *formatter = ...
[ { "answer_id": 172755, "author": "schwa", "author_id": 23113, "author_profile": "https://Stackoverflow.com/users/23113", "pm_score": 3, "selected": true, "text": "NSLog(@\"%@\", [[NSUserDefaults standardUserDefaults] dictionaryRepresentation]);\n" } ]
2008/10/05
[ "https://Stackoverflow.com/questions/172691", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17188/" ]
172,711
<p>This is the one thing I could never get to work.<br> My problem is to detect the end of one day and the start of the next and then splitting the diff into each day.</p> <p>Imagine you want to calculate a pay rate but it has to span across midnight.</p> <p>It also applies to calculating time to run on timed system,...
[ { "answer_id": 172716, "author": "UnkwnTech", "author_id": 115, "author_profile": "https://Stackoverflow.com/users/115", "pm_score": 3, "selected": false, "text": "hoursWorked = ((stopTime - startTime)/60)/60\n <?php\n$startTime = \"12/31/2008 22:02\"; //No AM/PM we'll use 24hour system\...
2008/10/05
[ "https://Stackoverflow.com/questions/172711", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8167/" ]
172,720
<p>This is really two questions, but they are so similar, and to keep it simple, I figured I'd just roll them together:</p> <ul> <li><p><strong>Firstly</strong>: Given an established python project, what are some decent ways to speed it up beyond just plain in-code optimization?</p></li> <li><p><strong>Secondly</stron...
[ { "answer_id": 172726, "author": "tzot", "author_id": 6899, "author_profile": "https://Stackoverflow.com/users/6899", "pm_score": 4, "selected": false, "text": "for i in range(10000000)" }, { "answer_id": 172744, "author": "John Millikin", "author_id": 3560, "author_p...
2008/10/05
[ "https://Stackoverflow.com/questions/172720", "https://Stackoverflow.com", "https://Stackoverflow.com/users/145/" ]
172,739
<p>I am studying for cryptography and I somehow stuck on understanding how DES works. Because it is around for a long time there should be nice tutorials like fancy diagrams, videos etc around the net. I searched but with no luck. Has anyone spotted anything "easy-to-digest" for the brain?</p>
[ { "answer_id": 9643405, "author": "Filippos Pirpilidis", "author_id": 1259305, "author_profile": "https://Stackoverflow.com/users/1259305", "pm_score": 1, "selected": false, "text": "public class Filippakoc_Des {\nstatic int[][] sb1={\n {14 , 4 , 13 , 1 , 2 , 15 , 11 , 8 , 3 , 10 , 6 ...
2008/10/05
[ "https://Stackoverflow.com/questions/172739", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1622/" ]
172,748
<p>Is there a way to make a popup window maximised as soon as it is opened? If not that, at least make it screen-sized? This:</p> <pre><code>window.open(src, 'newWin', 'fullscreen="yes"') </code></pre> <p>apparently only worked for old version of IE.</p>
[ { "answer_id": 172756, "author": "Geoff", "author_id": 10427, "author_profile": "https://Stackoverflow.com/users/10427", "pm_score": 7, "selected": true, "text": "screen.availWidth screen.availHeight window.open()" }, { "answer_id": 189931, "author": "Ray", "author_id": 2...
2008/10/05
[ "https://Stackoverflow.com/questions/172748", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3037/" ]
172,753
<p>just wondering if anyone has ever tried embedding and actually integrating any js engine into the .net environment. I could find and actually use (after a <strong>LOT</strong> of pain and effort, since it's pretty outdated and not quite finished) spidermonkey-dotnet project. Anyone with experience in this area? Engi...
[ { "answer_id": 3560739, "author": "Deacon Frost", "author_id": 389762, "author_profile": "https://Stackoverflow.com/users/389762", "pm_score": 3, "selected": false, "text": "// Initialize the context\nJavascriptContext context = new JavascriptContext();\n\n// Setting the externals parame...
2008/10/05
[ "https://Stackoverflow.com/questions/172753", "https://Stackoverflow.com", "https://Stackoverflow.com/users/25339/" ]
172,777
<p>We're all familiar with the pre- and post-increment operators, e.g.</p> <pre><code>c++; // c = c + 1 ++c; // ditto </code></pre> <p>and the "combined operators" which extend this principle:</p> <pre><code>c += 5; // c = c + 5 s .= ", world"; // s = s . ", world"; e.g. PHP </code></pre> <p>I've often ...
[ { "answer_id": 172792, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 3, "selected": true, "text": "a=-5; //'a = -5' or 'a =- 5'?\nb=*p; //'b = *p' or 'b =* p'?\nc=.5; //'c = .5' or 'c =. 5'?\n" }, { "answer_id...
2008/10/05
[ "https://Stackoverflow.com/questions/172777", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5058/" ]
172,781
<p>My normal work flow to create a new repository with subversion is to create a new repos, do a checkout of the repos root, create my branches tags and trunk folders and place in the trunk my initial files. Then I do a commit of this "initial import", delete the checked out repos from my hard drive and do a checkout o...
[ { "answer_id": 172786, "author": "antik", "author_id": 1625, "author_profile": "https://Stackoverflow.com/users/1625", "pm_score": 1, "selected": false, "text": "svn add svn commit" } ]
2008/10/05
[ "https://Stackoverflow.com/questions/172781", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21406/" ]
172,812
<p>I have the following style in an external CSS file called first.css</p> <pre><code>table { width: 100%; } </code></pre> <p>This makes the tables fill their container. If there are only two small columns they appear too far from each other.</p> <p>To force the columns to appear nearer I have added this style</p> ...
[ { "answer_id": 172816, "author": "Bobby Jack", "author_id": 5058, "author_profile": "https://Stackoverflow.com/users/5058", "pm_score": 6, "selected": true, "text": "table { width: auto; }\n" } ]
2008/10/05
[ "https://Stackoverflow.com/questions/172812", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14755/" ]
172,821
<p>I've got a div that contains some content that's being added and removed dynamically, so its height is changing often. I also have a div that is absolutely positioned directly underneath with javascript, so unless I can detect when the height of the div changes, I can't reposition the div below it.</p> <p>So, how c...
[ { "answer_id": 173349, "author": "eyelidlessness", "author_id": 17964, "author_profile": "https://Stackoverflow.com/users/17964", "pm_score": 5, "selected": false, "text": "$(something).bind('DOMSubtreeModified' ...\n" }, { "answer_id": 16654445, "author": "Kyle", "author...
2008/10/05
[ "https://Stackoverflow.com/questions/172821", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1384/" ]
172,831
<p>If you have the following:</p> <pre><code>$var = 3; // we'll say it's set to 3 for this example if ($var == 4) { // do something } else if ($var == 5) { // do something } else if ($var == 2) { // do something } else if ($var == 3) { // do something } else { // do something } </code></pre> <p>If...
[ { "answer_id": 172870, "author": "S.Lott", "author_id": 10661, "author_profile": "https://Stackoverflow.com/users/10661", "pm_score": 5, "selected": true, "text": "if var <= 3:\n if var == 2:\n # do something\n elif var == 3:\n # do something\n else: \n rais...
2008/10/05
[ "https://Stackoverflow.com/questions/172831", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5441/" ]
172,841
<p>I have applied a <code>Formatter</code> to a <code>JFormattedTextField</code> using a <code>FormatterFactory</code>, when a user clicks into the text field I want to select the contents. </p> <p>A focus listener does not work as expected because the formatter gets called, which eventually causes the value to be res...
[ { "answer_id": 190302, "author": "Peter", "author_id": 26483, "author_profile": "https://Stackoverflow.com/users/26483", "pm_score": 3, "selected": true, "text": " EventQueue.invokeLater(new Runnable(){\n public void run() { yourTextField.selectAll();}\n});\n" } ]
2008/10/05
[ "https://Stackoverflow.com/questions/172841", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18445/" ]
172,854
<p>I have a Boost unit test case which causes the object under test to throw an exception (that's the test, to cause an exception). How do I specify in the test to expect that particular exception.</p> <p>I can specify that the test should have a certain number of failures by using BOOST_AUTO_TEST_CASE_EXPECTED_FAILUR...
[ { "answer_id": 172995, "author": "jonner", "author_id": 78437, "author_profile": "https://Stackoverflow.com/users/78437", "pm_score": 7, "selected": true, "text": "BOOST_CHECK_THROW (expression, an_exception_type);\n BOOST_WARN_THROW() BOOST_REQUIRE_THROW()" } ]
2008/10/05
[ "https://Stackoverflow.com/questions/172854", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4086/" ]
172,875
<p>Basically I'm running some performance tests and don't want the external network to be the drag factor. I'm looking into ways of disabling network LAN. What is an effective way of doing it programmatically? I'm interested in c#. If anyone has a code snippet that can drive the point home that would be cool.</p>
[ { "answer_id": 6170507, "author": "Melvyn", "author_id": 755986, "author_profile": "https://Stackoverflow.com/users/755986", "pm_score": 5, "selected": false, "text": "SelectQuery wmiQuery = new SelectQuery(\"SELECT * FROM Win32_NetworkAdapter WHERE NetConnectionId != NULL\");\nManagemen...
2008/10/05
[ "https://Stackoverflow.com/questions/172875", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
172,888
<p>This will hopefully be an easy one. I have an F# project (latest F# CTP) with two files (Program.fs, Stack.fs). In Stack.fs I have a simple namespace and type definition</p> <p>Stack.fs</p> <pre><code>namespace Col type Stack= ... </code></pre> <p>Now I try to include the namespace in Program.fs by declaring...
[ { "answer_id": 172896, "author": "Brian", "author_id": 19299, "author_profile": "https://Stackoverflow.com/users/19299", "pm_score": 8, "selected": true, "text": ".fsproj" }, { "answer_id": 30610092, "author": "Benj Sanders", "author_id": 3594261, "author_profile": "h...
2008/10/06
[ "https://Stackoverflow.com/questions/172888", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23283/" ]
172,895
<p>Is there any easy way to retrieve table creation DDL from Microsoft Access (2007) or do I have to code it myself using VBA to read the table structure? </p> <p>I have about 30 tables that we are porting to Oracle and it would make life easier if we could create the tables from the Access definitions.</p>
[ { "answer_id": 173027, "author": "Richard A", "author_id": 24355, "author_profile": "https://Stackoverflow.com/users/24355", "pm_score": 6, "selected": true, "text": "Option Compare Database\nPublic Function TableCreateDDL(TableDef As TableDef) As String\n\n Dim fldDef As Field\n...
2008/10/06
[ "https://Stackoverflow.com/questions/172895", "https://Stackoverflow.com", "https://Stackoverflow.com/users/24355/" ]
172,906
<p>I'd like to take XML in the format below and load each code record into a domain object in my <code>BootStrap.groovy</code>. I want to preserve the formatting of each snippet of code. </p> <h2>XML</h2> <pre><code>&lt;records&gt; &lt;code&gt; &lt;language&gt;Groovy&lt;/language&gt; &lt;snippet&...
[ { "answer_id": 172972, "author": "mbrevoort", "author_id": 18228, "author_profile": "https://Stackoverflow.com/users/18228", "pm_score": 2, "selected": true, "text": "def CODE_XML = '''\n<records>\n <code>\n <language>Groovy</language>\n <snippet>\n println \"...
2008/10/06
[ "https://Stackoverflow.com/questions/172906", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
172,908
<p>I'm trying to call a web service from Excel 2003 module. The way i've implemented it is creating a .NET COM library with all the classes/methods i need to be exposed. When i try to call a method that queries a web service from Excel the execution just stops on that line without any error. May be it has to do with re...
[ { "answer_id": 175502, "author": "Andrew Cowenhoven", "author_id": 12281, "author_profile": "https://Stackoverflow.com/users/12281", "pm_score": 2, "selected": false, "text": "\n\n[Guid(\"123Fooetc...\")]\n [InterfaceType(ComInterfaceType.InterfaceIsIDispatch)]\n public interface I...
2008/10/06
[ "https://Stackoverflow.com/questions/172908", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10793/" ]
172,918
<p>I have a container div that holds two internal divs; both should take 100% width and 100% height within the container.</p> <p>I set both internal divs to 100% height. That works fine in Firefox, however in IE the divs do not stretch to 100% height but only the height of the text inside them.</p> <p>The following i...
[ { "answer_id": 172923, "author": "Jarett Millard", "author_id": 15882, "author_profile": "https://Stackoverflow.com/users/15882", "pm_score": 1, "selected": false, "text": "html { height:100%; }\n body { height:100%; }\n" }, { "answer_id": 174208, "author": "Ian Oxley", "...
2008/10/06
[ "https://Stackoverflow.com/questions/172918", "https://Stackoverflow.com", "https://Stackoverflow.com/users/131/" ]
172,921
<p>In order to create an arbitrary precision floating point / drop in replacement for Double, I'm trying to wrap <a href="http://www.mpfr.org/" rel="nofollow noreferrer">MPFR</a> using the FFI but despite all my efforts the simplest bit of code doesn't work. It compiles, it runs, but it crashes mockingly after pretendi...
[ { "answer_id": 173249, "author": "ephemient", "author_id": 20713, "author_profile": "https://Stackoverflow.com/users/20713", "pm_score": 3, "selected": true, "text": "$ uname -a\nLinux burnup 2.6.26-gentoo-r1 #1 SMP PREEMPT Tue Sep 9 00:05:54 EDT 2008 i686 Intel(R) Pentium(R) 4 CPU 2.80G...
2008/10/06
[ "https://Stackoverflow.com/questions/172921", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2543/" ]
172,934
<p>I need to retrieve a set of Widgets from my data access layer, grouped by widget.Manufacturer, to display in a set of nested ASP.NET ListViews.</p> <p>The problem is that (as far as I can tell) the nested ListView approach requires me to shape the data before using it, and I can't figure out the best approach to ta...
[ { "answer_id": 173177, "author": "Amy B", "author_id": 8155, "author_profile": "https://Stackoverflow.com/users/8155", "pm_score": 2, "selected": false, "text": "List<int> myInts = new List<int>() { 1, 2, 3, 4, 5 };\nIEnumerable<IGrouping<int, int>> myGroups = myInts.GroupBy(i => i % 2);...
2008/10/06
[ "https://Stackoverflow.com/questions/172934", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4160/" ]
172,935
<p>After understanding (quote), I'm curious as to how one might cause the statement to execute. My first thought was</p> <pre><code>(defvar x '(+ 2 21)) `(,@x) </code></pre> <p>but that just evaluates to <code>(+ 2 21)</code>, or the contents of <code>x</code>. How would one run code that was placed in a list?</p>
[ { "answer_id": 172939, "author": "Rich", "author_id": 22003, "author_profile": "https://Stackoverflow.com/users/22003", "pm_score": 5, "selected": true, "text": "(eval '(+ 2 21))" }, { "answer_id": 175970, "author": "Rich", "author_id": 22003, "author_profile": "https...
2008/10/06
[ "https://Stackoverflow.com/questions/172935", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1256/" ]
172,948
<p>Anyone have any idea how to do the following?</p> <p>declare cursor open cursor fetch cursor &lt;&lt; Start reading the cursor in a LOOP >> Lets say the cursor have 10 records. Read until 5th record then go to the 6th record and do some checking.</p> <p>Now, is it possible to go back to 5th record from 6th record...
[ { "answer_id": 173036, "author": "Justin Cave", "author_id": 10397, "author_profile": "https://Stackoverflow.com/users/10397", "pm_score": 3, "selected": false, "text": "SQL> ed\nWrote file afiedt.buf\n\n 1 select ename,\n 2 sal,\n 3 lead(sal) over (order by ename) ne...
2008/10/06
[ "https://Stackoverflow.com/questions/172948", "https://Stackoverflow.com", "https://Stackoverflow.com/users/25368/" ]
172,957
<p>I just set up my new homepage at <a href="http://ritter.vg" rel="noreferrer">http://ritter.vg</a>. I'm using jQuery, but very minimally.<br> It loads all the pages using AJAX - I have it set up to allow bookmarking by detecting the hash in the URL. </p> <pre><code> //general functions function getUrl(u) { ...
[ { "answer_id": 5708124, "author": "Eugene Kerner", "author_id": 597686, "author_profile": "https://Stackoverflow.com/users/597686", "pm_score": 1, "selected": false, "text": "// Add code below ...\nfunction locationHashChanged(qs)\n{\n var q = parseQs(qs);\n // ADD SOME CODE HERE TO LO...
2008/10/06
[ "https://Stackoverflow.com/questions/172957", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8435/" ]
173,005
<p>I want to display the TIME field from my mysql table on my website, but rather than showing 21:00:00 etc I want to show 8:00 PM. I need a function/code to do this or even any pointers in the right direction. Will mark the first reply with some code as the correct reply.</p>
[ { "answer_id": 173102, "author": "phatduckk", "author_id": 3896, "author_profile": "https://Stackoverflow.com/users/3896", "pm_score": 2, "selected": false, "text": "UNIX_TIMESTAMP() select a, b, c, UNIX_TIMESTAMP(instime) as unixtime;\n date() <?php echo date('Y/m/d', $row->unixtime); ?...
2008/10/06
[ "https://Stackoverflow.com/questions/173005", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23019/" ]
173,009
<p>All too often I want a WPF slider that behaves like the System.Windows.Forms.TrackBar of old. That is, I want a slider that goes from X to Y but only allows the user to move it in discrete integer positions.</p> <p>How does one do this in WPF since the Value property on the Slider is double?</p>
[ { "answer_id": 173024, "author": "cplotts", "author_id": 22294, "author_profile": "https://Stackoverflow.com/users/22294", "pm_score": 8, "selected": false, "text": "<Slider\n Orientation=\"Vertical\"\n Height=\"200\"\n Minimum=\"0\"\n Maximum=\"10\"\n Value=\"0\"\n IsS...
2008/10/06
[ "https://Stackoverflow.com/questions/173009", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22294/" ]
173,017
<p>I'm running some java processes on Windows 2003 server R2 I'm using Apache log4j-1.2.8. All my processes called via one jar file with different parameter example</p> <pre><code> java -jar process.jar one java -jar process.jar two java -jar process.jar three </code></pre> <p>And I config log4j.propert...
[ { "answer_id": 173084, "author": "Fuangwith S.", "author_id": 24550, "author_profile": "https://Stackoverflow.com/users/24550", "pm_score": -1, "selected": false, "text": "@echo off\nset CLASSPATH=.;%CLASSPATH%\nset path=C:\\j2sdk1.4.2\\bin;%path%\njavaw -jar process.jar %1\n Manifest-Ve...
2008/10/06
[ "https://Stackoverflow.com/questions/173017", "https://Stackoverflow.com", "https://Stackoverflow.com/users/24550/" ]
173,041
<p>Which of these queries is the faster?</p> <p>NOT EXISTS:</p> <pre><code>SELECT ProductID, ProductName FROM Northwind..Products p WHERE NOT EXISTS ( SELECT 1 FROM Northwind..[Order Details] od WHERE p.ProductId = od.ProductId) </code></pre> <p>Or NOT IN:</p> <pre><code>SELECT ProductID, ProductName...
[ { "answer_id": 173058, "author": "oglester", "author_id": 2017, "author_profile": "https://Stackoverflow.com/users/2017", "pm_score": -1, "selected": false, "text": "SELECT x.col\nFROM big_table x\nWHERE x.key IN( SELECT key FROM really_big_table );\n SELECT x.col\nFROM big_table x\nWHER...
2008/10/06
[ "https://Stackoverflow.com/questions/173041", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9825/" ]
173,046
<p>I need to create a custom volume slider for a WMP object. The current slider is complicated to modify, and use, is there a simple way to generate a slider on an HTML page that can have it's value passed to a javascript function?</p>
[ { "answer_id": 173888, "author": "olle", "author_id": 22422, "author_profile": "https://Stackoverflow.com/users/22422", "pm_score": 4, "selected": false, "text": "<input type=\"range\">" }, { "answer_id": 10391073, "author": "Martin", "author_id": 1366768, "author_pro...
2008/10/06
[ "https://Stackoverflow.com/questions/173046", "https://Stackoverflow.com", "https://Stackoverflow.com/users/115/" ]
173,056
<p>I've been trying to solve this, and have been getting stuck, so I thought I'd ask.</p> <p>Imagine two ActionBeans, A and B.</p> <p><code>A.jsp</code> has this section in it:</p> <pre><code>... &lt;jsp:include page="/B.action"&gt; &lt;jsp:param name="ponies" value="on"/&gt; &lt;/jsp:include&gt; &lt;jsp:include p...
[ { "answer_id": 173888, "author": "olle", "author_id": 22422, "author_profile": "https://Stackoverflow.com/users/22422", "pm_score": 4, "selected": false, "text": "<input type=\"range\">" }, { "answer_id": 10391073, "author": "Martin", "author_id": 1366768, "author_pro...
2008/10/06
[ "https://Stackoverflow.com/questions/173056", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22419/" ]
173,070
<p>I heard that you could right-shift a number by .5 instead of using Math.floor(). I decided to check its limits to make sure that it was a suitable replacement, so I checked the following values and got the following results in Google Chrome:</p> <pre><code> 2.5 >> .5 == 2; 2.9999 >> .5 == 2; 2.999999999999999 >> .5...
[ { "answer_id": 173090, "author": "John Millikin", "author_id": 3560, "author_profile": "https://Stackoverflow.com/users/3560", "pm_score": 5, "selected": false, "text": "Math.floor() x y x Math.floor()" }, { "answer_id": 173092, "author": "Rob Walker", "author_id": 3631, ...
2008/10/06
[ "https://Stackoverflow.com/questions/173070", "https://Stackoverflow.com", "https://Stackoverflow.com/users/25357/" ]
173,080
<p>What are some of the new features that can be used in .NET 2.0 that are specific to C# 3.0/3.5 after upgrading to Visual Studio 2008? Also, what are some of the features that aren't available?</p> <p><strong>Available</strong></p> <ul> <li>Lambdas</li> <li>Extension methods (by declaring an empty System.Runtime.Co...
[ { "answer_id": 173088, "author": "Curt Hagenlocher", "author_id": 533, "author_profile": "https://Stackoverflow.com/users/533", "pm_score": 2, "selected": false, "text": "namespace System.Runtime.CompilerServices {\n [AttributeUsage(AttributeTargets.Method | AttributeTargets.Class | Att...
2008/10/06
[ "https://Stackoverflow.com/questions/173080", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18194/" ]
173,115
<p>I'm currently working on the <code>Tips.js</code> from <code>mootools</code> library and my code breaks on the line that has those <code>el.$tmp</code>, and console says it's undefined</p> <p>Can anybody help me?</p>
[ { "answer_id": 242743, "author": "Ryan", "author_id": 32009, "author_profile": "https://Stackoverflow.com/users/32009", "pm_score": 2, "selected": true, "text": "var Garbage = {\n\n elements: [],\n\n collect: function(el){\n if (!el.$tmp){\n Garbage.elements.push(...
2008/10/06
[ "https://Stackoverflow.com/questions/173115", "https://Stackoverflow.com", "https://Stackoverflow.com/users/24744/" ]
173,133
<p>1. How can I reinterpret cast a float to an int (or a double to a long)?</p> <pre><code>float f = 2.0f; int i = (int)f; // causes conversion </code></pre> <p>I only want to copy the bit-pattern from <code>f</code> to <code>i</code>. How can this be done?</p> <p>2. The implicit and explicit operators in C# uses on...
[ { "answer_id": 173139, "author": "user7116", "author_id": 7116, "author_profile": "https://Stackoverflow.com/users/7116", "pm_score": 3, "selected": false, "text": "float ff = 2.0f;\nint ii = BitConverter.ToInt32(BitConverter.GetBytes(ff), 0);\n\nfloat[] ff = new float[...];\nint[] ii = ...
2008/10/06
[ "https://Stackoverflow.com/questions/173133", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
173,144
<p>I want to make sure people can't type the name of a PHP script in the URL and run it. What's the best way of doing this?</p> <p>I could set a variable in the file that will be including this file, and then check that variable in the file being included, but is there an easier way?</p>
[ { "answer_id": 173152, "author": "UnkwnTech", "author_id": 115, "author_profile": "https://Stackoverflow.com/users/115", "pm_score": 4, "selected": true, "text": "$_SERVER['SCRIPT_FILENAME']\n" }, { "answer_id": 173161, "author": "ThoriumBR", "author_id": 16545, "auth...
2008/10/06
[ "https://Stackoverflow.com/questions/173144", "https://Stackoverflow.com", "https://Stackoverflow.com/users/813/" ]
173,145
<p>Given:</p> <pre><code>interface I { } class B: I { } class C: I { } class A { public void Method(B arg) { } public void Method(C arg) { } public void Method(I arg) { // THIS is the method I want to simplify. if (I is B) { this.Method(arg as B); ...
[ { "answer_id": 173165, "author": "Marc Gravell", "author_id": 23354, "author_profile": "https://Stackoverflow.com/users/23354", "pm_score": 0, "selected": false, "text": "return (I is B) ? Method((B)I) : ((I is C) ? Method((C)I) : 0);\n" }, { "answer_id": 173167, "author": "j...
2008/10/06
[ "https://Stackoverflow.com/questions/173145", "https://Stackoverflow.com", "https://Stackoverflow.com/users/25388/" ]
173,149
<p>Can someone please explain how to remove the background/borders off an embedded CrystalReportViewer control in Visual Studio 2008.</p> <p>I'm trying to remove the light gray (below the "Crystal Report" heading) and then the darker gray underneath that. I want to be left with only the white box and the report inside...
[ { "answer_id": 173165, "author": "Marc Gravell", "author_id": 23354, "author_profile": "https://Stackoverflow.com/users/23354", "pm_score": 0, "selected": false, "text": "return (I is B) ? Method((B)I) : ((I is C) ? Method((C)I) : 0);\n" }, { "answer_id": 173167, "author": "j...
2008/10/06
[ "https://Stackoverflow.com/questions/173149", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
173,159
<p>I know what ViewData is and use it all the time, but in ASP.NET Preview 5 they introduced something new called TempData. </p> <p>I normally strongly type my ViewData, instead of using the dictionary of objects approach.</p> <p>So, when should I use TempData instead of ViewData?</p> <p>Are there any best practices...
[ { "answer_id": 173650, "author": "Dragan Panjkov", "author_id": 481, "author_profile": "https://Stackoverflow.com/users/481", "pm_score": 8, "selected": true, "text": "TempData TempData TempData" }, { "answer_id": 44553266, "author": "Ali Adravi", "author_id": 586227, ...
2008/10/06
[ "https://Stackoverflow.com/questions/173159", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4481/" ]
173,199
<p>Can someone explain the pros and cons of it and any math involved with it?</p>
[ { "answer_id": 173274, "author": "zoul", "author_id": 17279, "author_profile": "https://Stackoverflow.com/users/17279", "pm_score": 1, "selected": false, "text": "glReadPixels" } ]
2008/10/06
[ "https://Stackoverflow.com/questions/173199", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
173,207
<p>I am exploring ASP.NET MVC and I wanted to add jQuery to make the site interactive. I used StringTemplate, ported to .Net, as my template engine to generate html and to send JSON. However, when I view the page, I could not see it. After debugging, I've realized that the $ is used by the StringTemplate to access prop...
[ { "answer_id": 896129, "author": "Robert Harvey", "author_id": 102937, "author_profile": "https://Stackoverflow.com/users/102937", "pm_score": 3, "selected": false, "text": "jQuery(\n $(\n" }, { "answer_id": 2799529, "author": "Community", "author_id": -1, "author_pro...
2008/10/06
[ "https://Stackoverflow.com/questions/173207", "https://Stackoverflow.com", "https://Stackoverflow.com/users/24755/" ]
173,209
<p>Specifically, in VS 2008, I want to connect to a data source that you can have by right-clicking on the automatically-generated App_Data folder (an .mdf "database"). Seems easy, and it is once you know how.</p>
[ { "answer_id": 173221, "author": "MrBoJangles", "author_id": 13578, "author_profile": "https://Stackoverflow.com/users/13578", "pm_score": 4, "selected": true, "text": "AttachDbFilename Data Source=.\\SQLEXPRESS;Integrated Security=True;Connect Timeout=30;User Instance=True\n <add name=\...
2008/10/06
[ "https://Stackoverflow.com/questions/173209", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13578/" ]
173,212
<p>I just moved to a new hosting company and now whenever a string gets escaped using:</p> <pre><code>mysql_real_escape_string($str); </code></pre> <p>the slashes remain in the database. This is the first time I've ever seen this happen so none of my scripts use</p> <pre><code>stripslashes() </code></pre> <p>anymore.</...
[ { "answer_id": 173234, "author": "Steve Obbayi", "author_id": 11190, "author_profile": "https://Stackoverflow.com/users/11190", "pm_score": -1, "selected": false, "text": "mysql_real_escape_string($str); stripslashes()" }, { "answer_id": 173238, "author": "Andy Lester", "...
2008/10/06
[ "https://Stackoverflow.com/questions/173212", "https://Stackoverflow.com", "https://Stackoverflow.com/users/538/" ]
173,219
<p>I run php 5.2.6 as a cgi under lighttpd 1.4 and for some reason it's always running as root. All php-cgi processes in are owned by root and all files written to the file system are owned by root. </p> <p>I've tried setting the user in lighttpd as non privileged, and confirmed, it's running right it's just php that ...
[ { "answer_id": 173502, "author": "Kent Fredric", "author_id": 15614, "author_profile": "https://Stackoverflow.com/users/15614", "pm_score": 3, "selected": true, "text": "server.username = \"nonprivuser\"\nserver.groupname = \"nonprivgroup\"\n" } ]
2008/10/06
[ "https://Stackoverflow.com/questions/173219", "https://Stackoverflow.com", "https://Stackoverflow.com/users/538/" ]
173,224
<p>I am having issues with a website that I am working on in which images and background-images fail to load in Internet Explorer 6.</p> <p>Here is an example of a page on which you might experience this issue:</p> <p><a href="http://www.infinitieurope.com/aboutinfiniti/environment/infiniti-environment.html" rel="nof...
[ { "answer_id": 174406, "author": "Matt", "author_id": 17020, "author_profile": "https://Stackoverflow.com/users/17020", "pm_score": 1, "selected": false, "text": "div.gBodyContainer {\nbackground-image:url(/etc/medialib/europe/about_infiniti/environment.Par.7366.Image.964.992.direct.jpg)...
2008/10/06
[ "https://Stackoverflow.com/questions/173224", "https://Stackoverflow.com", "https://Stackoverflow.com/users/25380/" ]
173,246
<p>I have a web project where I must import text and images from a user-supplied document, and one of the possible formats is Microsoft Office 2007. There's also a need to generate documents in this format.</p> <p>The server runs CentOS 5.2 and has PHP/Perl/Python installed. I can execute local binaries and shell scri...
[ { "answer_id": 1979887, "author": "mikemaccana", "author_id": 123671, "author_profile": "https://Stackoverflow.com/users/123671", "pm_score": 3, "selected": false, "text": "from docx import *\ndocument = newdocument()\n\n# This location is where most document content lives \ndocbody = do...
2008/10/06
[ "https://Stackoverflow.com/questions/173246", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18406/" ]
173,272
<p>I see lots of job ads for C#/.NET programmers, so I thought it could be a good idea to have had a look at it.</p> <p>After looking at a few tutorials I found nothing really new to me. Just a language with a syntax somewhere between Java and C++ (arguably nicer than both though).</p> <p>So, what features in particu...
[ { "answer_id": 173333, "author": "Jon Skeet", "author_id": 22656, "author_profile": "https://Stackoverflow.com/users/22656", "pm_score": 4, "selected": true, "text": "using" } ]
2008/10/06
[ "https://Stackoverflow.com/questions/173272", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13565/" ]
173,278
<p>The docs say that calling sys.exit() raises a SystemExit exception which can be caught in outer levels. I have a situation in which I want to definitively and unquestionably exit from inside a test case, however the unittest module catches SystemExit and prevents the exit. This is normally great, but the specific ...
[ { "answer_id": 173323, "author": "Jerub", "author_id": 14648, "author_profile": "https://Stackoverflow.com/users/14648", "pm_score": 8, "selected": true, "text": "os._exit() import os\nos._exit(1)\n atexit" }, { "answer_id": 13723190, "author": "MestreLion", "author_id": ...
2008/10/06
[ "https://Stackoverflow.com/questions/173278", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2168/" ]
173,290
<p>I have a list string tag.</p> <p>I am trying to initialize a dictionary with the key as the tag string and values as the array index.</p> <pre><code>for i, ithTag in enumerate(tag): tagDict.update(ithTag=i) </code></pre> <p>The above returns me {'ithTag': 608} <em>608 is the 608th index</em></p> <p>My probl...
[ { "answer_id": 173299, "author": "Jerub", "author_id": 14648, "author_profile": "https://Stackoverflow.com/users/14648", "pm_score": 7, "selected": true, "text": "for i, tag in enumerate(tag):\n tagDict[tag] = i\n" }, { "answer_id": 173300, "author": "mbesso", "author_...
2008/10/06
[ "https://Stackoverflow.com/questions/173290", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17085/" ]
173,295
<p>How do you select a datagridview row on a right-click?</p>
[ { "answer_id": 173315, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 4, "selected": false, "text": " // Clear all the previously selected rows\n foreach (DataGridViewRow row in yourDataGridView.Rows)\n {\n row.Se...
2008/10/06
[ "https://Stackoverflow.com/questions/173295", "https://Stackoverflow.com", "https://Stackoverflow.com/users/25078/" ]
173,305
<p>I have a <code>QTreeView</code> class with a context menu installed as follows:</p> <pre><code>m_ui.tree-&gt;setContextMenuPolicy(Qt::CustomContextMenu); connect(m_ui.tree, SIGNAL(customContextMenuRequested(const QPoint&amp;)), this, SLOT(ShowTreeContextMenu(const QPoint&amp;))); ... void ShowTreeContextMen...
[ { "answer_id": 173535, "author": "Marius", "author_id": 1585, "author_profile": "https://Stackoverflow.com/users/1585", "pm_score": 1, "selected": false, "text": "class TreeView : public QTreeView{\n Q_OBJECT\npublic:\n TreeView(QWidget *parent);\n ~TreeView();\nprotected:\n void con...
2008/10/06
[ "https://Stackoverflow.com/questions/173305", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6049/" ]
173,309
<p>I don't have a Rails environment set up and this is actually quite hard to find a quick answer for, so I'll ask the experts.</p> <p>When Rails creates a table based on your "model" that you have set up, does Rails create a table that mirrors this model exactly, or does it add in more fields to the table to help it ...
[ { "answer_id": 173469, "author": "Mike Woodhouse", "author_id": 1060, "author_profile": "https://Stackoverflow.com/users/1060", "pm_score": 3, "selected": false, "text": "ruby script/generate model User name:string\n class CreateUsers < ActiveRecord::Migration\n def self.up\n create_...
2008/10/06
[ "https://Stackoverflow.com/questions/173309", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23701/" ]
173,328
<p>Some of the most efficient engineers, developers and IT professionals I know usually carry around a common "toolkit" of useful programs, add-ins or utilities which help them for day-to-day debugging, developing or designing.</p> <p>The question is:<br> <i>What is in your utility toolkit.. What tools couldn't you li...
[ { "answer_id": 173452, "author": "Daren Thomas", "author_id": 2260, "author_profile": "https://Stackoverflow.com/users/2260", "pm_score": 2, "selected": false, "text": "cmd.Cmd" }, { "answer_id": 173529, "author": "Kent Fredric", "author_id": 15614, "author_profile": ...
2008/10/06
[ "https://Stackoverflow.com/questions/173328", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18471/" ]
173,329
<p>I have this query in sql server 2000:</p> <pre><code>select pwdencrypt('AAAA') </code></pre> <p>which outputs an encrypted string of 'AAAA':</p> <pre> 0x0100CF465B7B12625EF019E157120D58DD46569AC7BF4118455D12625EF019E157120D58DD46569AC7BF4118455D </pre> <p><strong>How can I convert (decrypt) the output from its o...
[ { "answer_id": 173344, "author": "Svet", "author_id": 8934, "author_profile": "https://Stackoverflow.com/users/8934", "pm_score": 5, "selected": true, "text": "SELECT password_field FROM mytable WHERE password_field=pwdencrypt(userEnteredValue)\n" }, { "answer_id": 173351, "a...
2008/10/06
[ "https://Stackoverflow.com/questions/173329", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21963/" ]
173,332
<p>I know there are HTML entities for 1/2, 1/4, and 3/4, but are there others? Like 1/3 or 1/8? Is there a good way to encode arbitrary fractions?</p>
[ { "answer_id": 173347, "author": "Darryl Hein", "author_id": 5441, "author_profile": "https://Stackoverflow.com/users/5441", "pm_score": 1, "selected": false, "text": "15/16<sup>ths</sup>" }, { "answer_id": 173402, "author": "scronide", "author_id": 22844, "author_pro...
2008/10/06
[ "https://Stackoverflow.com/questions/173332", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7598/" ]
173,366
<p>V8's documentation explains <a href="http://code.google.com/apis/v8/embed.html#dynamic" rel="noreferrer">how to create a Javascript object that wraps a C++ object</a>. The Javascript object holds on to a pointer to a C++ object instance. My question is, let's say you create the C++ object on the heap, how can you ge...
[ { "answer_id": 176380, "author": "Max Lybbert", "author_id": 10593, "author_profile": "https://Stackoverflow.com/users/10593", "pm_score": 6, "selected": true, "text": "Persistent Persistent MakeWeak() Persistent::MakeWeak Persistent::MakeWeak void MakeWeak(void* parameters, WeakReferenc...
2008/10/06
[ "https://Stackoverflow.com/questions/173366", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1892/" ]
173,374
<p>Boost is a very large library with many inter-dependencies -- which also takes a long time to compile (which for me slows down our <a href="http://cruisecontrol.sourceforge.net/" rel="noreferrer"><strong>CruiseControl</strong></a> response time).</p> <p>The only parts of boost I use are boost::regex and boost::form...
[ { "answer_id": 173388, "author": "JesperE", "author_id": 13051, "author_profile": "https://Stackoverflow.com/users/13051", "pm_score": 2, "selected": false, "text": "CMakeLists.txt project( MyBoost )\n\nset(SOURCES \n boost/regex/src/c_regex_traits.cpp\n boost/regex/src/cpp_regex_trait...
2008/10/06
[ "https://Stackoverflow.com/questions/173374", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6386/" ]
173,389
<p>I've build my WinForm app on windows machine and the app is working ok. When I user nhibernate 1.2.1 the app also worked on linux machine using mono, but now when i upgraded app to nhibernate 2.0.1 it works only in windows. I've get error: NHibernate.InvalidProxyTypeException: The following types may not be used as...
[ { "answer_id": 531023, "author": "jrwren", "author_id": 16998, "author_profile": "https://Stackoverflow.com/users/16998", "pm_score": 1, "selected": false, "text": "<property name=\"use_proxy_validator\">false</property> <?xml version=\"1.0\"?>\n<configuration>\n <configSections>\n <...
2008/10/06
[ "https://Stackoverflow.com/questions/173389", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
173,393
<p>I'm trying to use the <code>Microsoft.Sdc.Tasks.ServiceProcess.Exists</code> to check whether or not a service exists. There is no example of using it in the documentation though. Anyone have one?</p>
[ { "answer_id": 173440, "author": "Dandikas", "author_id": 23436, "author_profile": "https://Stackoverflow.com/users/23436", "pm_score": 2, "selected": false, "text": "<target name=\"service_exists\">\n <script language=\"C#\">\n <references>\n <include name=\"System....
2008/10/06
[ "https://Stackoverflow.com/questions/173393", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3957/" ]
173,400
<p>PHP treats all arrays as associative, so there aren't any built in functions. Can anyone recommend a fairly efficient way to check if an array <em>&quot;is a list&quot;</em> (contains only numeric keys starting from 0)?</p> <p>Basically, I want to be able to differentiate between this:</p> <pre><code>$sequentialArra...
[ { "answer_id": 173412, "author": "Daren Thomas", "author_id": 2260, "author_profile": "https://Stackoverflow.com/users/2260", "pm_score": 0, "selected": false, "text": "for i in 0 to len(your_array):\n if not defined(your-array[i]):\n # this is not an array array, it's an assoc...
2008/10/06
[ "https://Stackoverflow.com/questions/173400", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5291/" ]
173,409
<p>I'm trying to find a way to get the execution time of a section of code in C. I've already tried both time() and clock() from time.h, but it seems that time() returns seconds and clock() seems to give me milliseconds (or centiseconds?) I would like something more precise though. Is there a way I can grab the time w...
[ { "answer_id": 173436, "author": "Andrew Edgecombe", "author_id": 11694, "author_profile": "https://Stackoverflow.com/users/11694", "pm_score": 5, "selected": true, "text": "clock() time() gettimeofday() struct timeval" }, { "answer_id": 175064, "author": "PhirePhly", "au...
2008/10/06
[ "https://Stackoverflow.com/questions/173409", "https://Stackoverflow.com", "https://Stackoverflow.com/users/25295/" ]
173,431
<p>I have to develop an application using C#.net that has to be run once a day. It only runs for at most one minute, so developing a Windows service is overkill and a scheduled task is the appropriate way.</p> <p>However, I have a few questions about how the application can communicate its results:</p> <ul> <li>How d...
[ { "answer_id": 173462, "author": "Kev", "author_id": 419, "author_profile": "https://Stackoverflow.com/users/419", "pm_score": 4, "selected": true, "text": "0xe0434f4d Console.WriteLine(\"blah\");" }, { "answer_id": 173531, "author": "gimel", "author_id": 6491, "autho...
2008/10/06
[ "https://Stackoverflow.com/questions/173431", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9540/" ]
173,473
<p>I have a generated HTML page with flash content in it. I am trying to reposition the flash content and make it "absolute". I have tried to wrap the object tags with a div tag, but to no avail. Can anyone tell me how to do this? Removing the generated positioning attributes does not work. </p> <p>See relevant code b...
[ { "answer_id": 173530, "author": "Errico Malatesta", "author_id": 24439, "author_profile": "https://Stackoverflow.com/users/24439", "pm_score": 1, "selected": false, "text": " <meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\" />\n <title>* welcome *</title...
2008/10/06
[ "https://Stackoverflow.com/questions/173473", "https://Stackoverflow.com", "https://Stackoverflow.com/users/25280/" ]
173,487
<h1> 1st phase</h1> <p>I have a problem shutting down my running JBoss instance under Eclipse since I changed the JNDI port of JBoss. Of course I can shut it down from the console view but not with the stop button (it still searches JNDI port at the default 1099 port). I'm looking forward to any solutions. Than...
[ { "answer_id": 173543, "author": "huo73", "author_id": 15657, "author_profile": "https://Stackoverflow.com/users/15657", "pm_score": 0, "selected": false, "text": "--shutdown\n -s jnp://localhost:11099 --shutdown\n" }, { "answer_id": 1512563, "author": "Community", "autho...
2008/10/06
[ "https://Stackoverflow.com/questions/173487", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19621/" ]
173,498
<p>I am trying to take a rather large CSV file and insert it into a MySQL database for referencing in a project. I would like to use the first line of the file to create the table using proper data types and not varchar for each column. The ultimate goal is to automate this process as I have several similar files but t...
[ { "answer_id": 173526, "author": "pilsetnieks", "author_id": 6615, "author_profile": "https://Stackoverflow.com/users/6615", "pm_score": 2, "selected": false, "text": "define('DECIMAL_SEPARATOR', '.');\n\nswitch ($fieldList[$i])\n{\n case (string)(int)$fieldList[$i]:\n $typeInf...
2008/10/06
[ "https://Stackoverflow.com/questions/173498", "https://Stackoverflow.com", "https://Stackoverflow.com/users/24802/" ]
173,503
<p>I've got a "little" problem with Zend Framework Zend_Pdf class. Multibyte characters are stripped from generated pdf files. E.g. when I write aąbcčdeę it becomes abcd with lithuanian letters stripped.</p> <p>I'm not sure if it's particularly Zend_Pdf problem or php in general. </p> <p>Source text is encoded in utf...
[ { "answer_id": 185651, "author": "leek", "author_id": 3765, "author_profile": "https://Stackoverflow.com/users/3765", "pm_score": 1, "selected": false, "text": "// Draw the string on the page\n$pdfPage->drawText($unicodeString, 72, 720, 'UTF-8');\n Zend_Pdf_Font::FONT_COURIER_BOLD\nZend_...
2008/10/06
[ "https://Stackoverflow.com/questions/173503", "https://Stackoverflow.com", "https://Stackoverflow.com/users/25413/" ]
173,527
<p>I have some old rrdtool databases, for which the exact creation recipe has long been since lost. I need to create a new database with the same characteristics as the current ones. I've dumped a couple of old databases and pored over the contents but I'm not sure how to interpret the metadata. I think it appears in t...
[ { "answer_id": 173547, "author": "Stu Thompson", "author_id": 2961, "author_profile": "https://Stackoverflow.com/users/2961", "pm_score": 3, "selected": true, "text": "$ rrdtool info random.rrd\nfilename = \"random.rrd\"\nrrd_version = \"0001\"\nstep = 300\nlast_update = 955892996\nds[a]...
2008/10/06
[ "https://Stackoverflow.com/questions/173527", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18625/" ]
173,560
<p>When the policy for a disk in Windows XP and Vista is set to enable write caching on the hard disk, is there a way to flush a file that has just been written, and ensure that it has been committed to disk?</p> <p>I want to do this programmatically in C++.</p> <p>Closing the file does perform a flush at the applica...
[ { "answer_id": 173600, "author": "tzot", "author_id": 6899, "author_profile": "https://Stackoverflow.com/users/6899", "pm_score": 3, "selected": true, "text": ".Flush FlushFileBuffers" }, { "answer_id": 830228, "author": "MSalters", "author_id": 15416, "author_profile...
2008/10/06
[ "https://Stackoverflow.com/questions/173560", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16314/" ]
173,579
<p>I am writing a very specialized app in C# that floats as a mostly transparent window over the entire desktop. I want to be able to create and pass mouse events to applications behind mine, and have them appear to operate "normally", responding to those events. It would also be preferable if the window manager could ...
[ { "answer_id": 173800, "author": "Garth", "author_id": 23407, "author_profile": "https://Stackoverflow.com/users/23407", "pm_score": 3, "selected": true, "text": "protected override CreateParams CreateParams\n{\n get\n {\n CreateParams createParams = base.CreateParams;\n ...
2008/10/06
[ "https://Stackoverflow.com/questions/173579", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23407/" ]
173,593
<p>I've tried to override WndProc, but no message show up on paste event.</p> <p>Then I tried to create custom filter and using method PreFilterMessage I was able to catch message with value 257 (KEYUP event), but that's not enough...</p>
[ { "answer_id": 173610, "author": "Goran", "author_id": 23164, "author_profile": "https://Stackoverflow.com/users/23164", "pm_score": 4, "selected": false, "text": " protected override void OnKeyDown(KeyEventArgs e)\n {\n if (e.KeyCode == Keys.V && e.Modifiers == Keys.Control)\n ...
2008/10/06
[ "https://Stackoverflow.com/questions/173593", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
173,616
<p>I am interested in seeing if I can improve the way we use NUnit in a Visual Studio solution containing 30+ projects.</p> <p>First, would you have one assembly of tests for every assembly in the solution, or would you try to keep the number of test assemblies down? I started off creating many test assemblies, but I ...
[ { "answer_id": 173625, "author": "Matthew Scharley", "author_id": 15537, "author_profile": "https://Stackoverflow.com/users/15537", "pm_score": 4, "selected": true, "text": "[Explicit] [Ignore] [Platform]" } ]
2008/10/06
[ "https://Stackoverflow.com/questions/173616", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7532/" ]
173,617
<p>I read that you could call JavaScript code from a Java Applet by calling</p> <pre><code>JApplet.getAppletContext().showDocument( "javascript:alert('Hello World');" ); </code></pre> <p>However, when I do this i get the following error:</p> <pre><code>java.net.MalformedURLException: unknown protocol: javascript </c...
[ { "answer_id": 173743, "author": "RuntimeException", "author_id": 15789, "author_profile": "https://Stackoverflow.com/users/15789", "pm_score": 2, "selected": false, "text": " try {\n this.getAppletContext().showDocument(new URL(\"javascript:alert('hello world');\"));\n }cat...
2008/10/06
[ "https://Stackoverflow.com/questions/173617", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20298/" ]
173,618
<p>In MSVC, <a href="http://msdn.microsoft.com/en-us/library/ms679297.aspx" rel="noreferrer">DebugBreak()</a> or <a href="http://msdn.microsoft.com/fr-fr/library/f408b4et.aspx" rel="noreferrer">__debugbreak</a> cause a debugger to break. On x86 it is equivalent to writing "_asm int 3", on x64 it is something different....
[ { "answer_id": 173630, "author": "Jorge Ferreira", "author_id": 6508, "author_profile": "https://Stackoverflow.com/users/6508", "pm_score": 5, "selected": true, "text": "#ifdef _MSC_VER\n#define DEBUG_BREAK __debugbreak()\n#else\n...\n#endif\n DEBUG_BREAK" }, { "answer_id": 17365...
2008/10/06
[ "https://Stackoverflow.com/questions/173618", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23740/" ]
173,621
<p>Our svn repository has lots of branches that are branches off of sub-trees. This works OK with svn because I can check out that sub-tree in the correct spot in my working copy. However, if I check out the same branch using git, I get a working copy with only the branch sub-tree. Is it possible to make git relocate t...
[ { "answer_id": 176224, "author": "Daniel Schierbeck", "author_id": 20321, "author_profile": "https://Stackoverflow.com/users/20321", "pm_score": 3, "selected": true, "text": "svn copy" } ]
2008/10/06
[ "https://Stackoverflow.com/questions/173621", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5179/" ]
173,641
<p>I'm trying to use TestDriven.Net not only to test my code, but to call a function on my code whose purpose is to print out the internal state of the code to the Debug window.</p> <p>Here's a very simplified example of what I'm trying to do..</p> <pre><code>&lt;TestFixture()&gt; _ Public Class UnitTest &lt;Tes...
[ { "answer_id": 173693, "author": "Andrew", "author_id": 5662, "author_profile": "https://Stackoverflow.com/users/5662", "pm_score": 2, "selected": false, "text": "Trace.WriteLine() Trace Debug ------ Test started: Assembly: ClassLibrary1.dll ------\n\nInternal state of Class1: True\n\n1 ...
2008/10/06
[ "https://Stackoverflow.com/questions/173641", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5662/" ]
173,642
<p>I only want a list of files that have been added (not ones that have been modified) since a certain date. Is there an easy way to do this?</p> <p><strong>Answer</strong>: Here's what ended up working for me, thanks guys!</p> <blockquote> <p>svn log -v -r{2008-10-1}:HEAD svn://path.to.repo/ | grep "^&nbsp;&nbsp;&...
[ { "answer_id": 173665, "author": "Matthias Winkelmann", "author_id": 4494, "author_profile": "https://Stackoverflow.com/users/4494", "pm_score": 4, "selected": true, "text": "svn log -v -r{2008-10-1}:HEAD | grep \"^ A\"\n" }, { "answer_id": 173669, "author": "mmaibaum", ...
2008/10/06
[ "https://Stackoverflow.com/questions/173642", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6583/" ]
173,646
<p>Most often the cleanup rules (Preferences > Java > Code Style > Clean Up) in Eclipse work perfectly and create nice-looking code.</p> <p>But sometimes, especially with comments and concatenated string snippets (like inline SQL queries), the cleanup just messes things up, and destroys my formatting.</p> <p>Is there...
[ { "answer_id": 175182, "author": "srclontz", "author_id": 4606, "author_profile": "https://Stackoverflow.com/users/4606", "pm_score": 2, "selected": false, "text": "public static final String SELECT_SOMETHING = \"SELECT\"\n + \"OBJECTID, THIS, THAT, THEOTHER, THING\"\n + \"...
2008/10/06
[ "https://Stackoverflow.com/questions/173646", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2238/" ]
173,652
<p>I have a WPF Window which has a among other controls hosts a Frame. In that frame I display different pages. Is there way to make a dialog modal to only a page? When I'm showing the dialog it should not be possible to click on any control on the page but it should be possible to click on a control on the same window...
[ { "answer_id": 173769, "author": "Brad Leach", "author_id": 708, "author_profile": "https://Stackoverflow.com/users/708", "pm_score": 6, "selected": true, "text": "<ControlTemplate TargetType=\"{x:Type local=DialogPresenter}\">\n <Grid>\n <ContentControl>\n <ContentPresenter />\...
2008/10/06
[ "https://Stackoverflow.com/questions/173652", "https://Stackoverflow.com", "https://Stackoverflow.com/users/143/" ]
173,663
<p><strong>Good day.</strong></p> <p>I have a program thats launches an external application. That external app has a right click sub menu on it which I need to disable. Is it possible (without modifying the external app) to disable the right click? Maybe permission or group policies and etc.</p> <p>Thanks.</p>
[ { "answer_id": 173730, "author": "Henry B", "author_id": 6414, "author_profile": "https://Stackoverflow.com/users/6414", "pm_score": 1, "selected": false, "text": "WM_RBUTTONDOWN WM_RBUTTONUP" }, { "answer_id": 17992865, "author": "GaneshKumar", "author_id": 1667832, ...
2008/10/06
[ "https://Stackoverflow.com/questions/173663", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
173,681
<p>Are the string literals we use inside functions automatic variables? Or are they allocated in heap which we have to free manually?</p> <p>I've a situation like the code shown below wherein I'm assigning a string literal to a private field of the class (marked as ONE in the code) and retrieving it much later in my p...
[ { "answer_id": 173719, "author": "Richard Corden", "author_id": 11698, "author_profile": "https://Stackoverflow.com/users/11698", "pm_score": 3, "selected": false, "text": "char* const char * s std::string" }, { "answer_id": 173816, "author": "Srikanth", "author_id": 7205...
2008/10/06
[ "https://Stackoverflow.com/questions/173681", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7205/" ]
173,687
<p>I haven't found an answer elsewhere and this doesn't appear to have been asked yet on SO.</p> <p>When creating an event binding in wxPython, is it possible to pass additional arguments to the event? For example, this is the normal way:</p> <pre><code>b = wx.Button(self, 10, "Default Button", (20, 20)) self...
[ { "answer_id": 173694, "author": "Florian Bösch", "author_id": 19435, "author_profile": "https://Stackoverflow.com/users/19435", "pm_score": 6, "selected": false, "text": "b = wx.Button(self, 10, \"Default Button\", (20, 20))\n self.Bind(wx.EVT_BUTTON, lambda event: self.OnClick(e...
2008/10/06
[ "https://Stackoverflow.com/questions/173687", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18676/" ]
173,706
<p>I am having the problem that I cannot select a specific XML node which needs to be deleted. I have already tried to select the node by using the XPath which works fine for some XML files but I cannot figure out the correct XPath for a node in a more complex file.</p> <p>Does anybody know a freeware tool which can l...
[ { "answer_id": 173748, "author": "mdb", "author_id": 8562, "author_profile": "https://Stackoverflow.com/users/8562", "pm_score": 0, "selected": false, "text": "<root>\n <anything foo=\"bar\">value1</anything>\n <anything foo=\"qux\">value2</anything>\n</root>\n /root/anything[@foo=\"qu...
2008/10/06
[ "https://Stackoverflow.com/questions/173706", "https://Stackoverflow.com", "https://Stackoverflow.com/users/25428/" ]
173,717
<p>What is the easiest way to copy the all the values from a column in a table to another column in the same table?</p>
[ { "answer_id": 173720, "author": "Ilya Kochetov", "author_id": 15329, "author_profile": "https://Stackoverflow.com/users/15329", "pm_score": 4, "selected": false, "text": "UPDATE table SET field1 = field2\n" }, { "answer_id": 173722, "author": "Panagiotis Korros", "author...
2008/10/06
[ "https://Stackoverflow.com/questions/173717", "https://Stackoverflow.com", "https://Stackoverflow.com/users/25438/" ]
173,726
<p>I'm doing some research into databases and I'm looking at some limitations of relational DBs. </p> <p>I'm getting that joins of large tables is very expensive, but I'm not completely sure why. What does the DBMS need to do to execute a join operation, where is the bottleneck?<br> How can denormalization help to ove...
[ { "answer_id": 174047, "author": "Peter Wone", "author_id": 1715673, "author_profile": "https://Stackoverflow.com/users/1715673", "pm_score": 10, "selected": true, "text": "SELECT * FROM A,B JOINs JOINs" } ]
2008/10/06
[ "https://Stackoverflow.com/questions/173726", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5409/" ]
173,727
<p>I would like to save data in cookies (user name, email address, etc...) but I don't the user to easily read it or modify it. I need to be able able to read the data back. How can I do that with php 5.2+?</p> <p>It would be used for "welcome back bob" kind of feature. It is not a replacement for persistence or sessi...
[ { "answer_id": 173750, "author": "Kev", "author_id": 419, "author_profile": "https://Stackoverflow.com/users/419", "pm_score": 1, "selected": false, "text": "mcrypt" }, { "answer_id": 173764, "author": "Shoan", "author_id": 17404, "author_profile": "https://Stackoverf...
2008/10/06
[ "https://Stackoverflow.com/questions/173727", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1771/" ]
173,745
<p>I'm looking for a query which will return me an extra column at the end of my current query which is the count of all columns within the return set which contain a null column. For example:</p> <pre><code>Col 1 - Col 2 - Col 3 A B 0 A NULL 1 NULL NULL 2 </code></pre> <p>Is there a simple...
[ { "answer_id": 173805, "author": "pmg", "author_id": 25324, "author_profile": "https://Stackoverflow.com/users/25324", "pm_score": 2, "selected": false, "text": "select Col1, Col2,\n case when Col1 is null then 1 else 0 end\n + case when Col2 is null then 1 else 0 end\n as ...
2008/10/06
[ "https://Stackoverflow.com/questions/173745", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
173,757
<p>We run a medium-size site that gets a few hundred thousand pageviews a day. Up until last weekend we ran with a load usually below 0.2 on a virtual machine. The OS is Ubuntu.</p> <p>When deploying the latest version of our application, we also did an apt-get dist-upgrade before deploying. After we had deployed we n...
[ { "answer_id": 174994, "author": "Jon Topper", "author_id": 6945, "author_profile": "https://Stackoverflow.com/users/6945", "pm_score": 3, "selected": false, "text": "vmstat 1\n top\n echo \"show full processlist\" | mysql | grep -v Sleep\n" } ]
2008/10/06
[ "https://Stackoverflow.com/questions/173757", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1606/" ]
173,786
<p>I have a UIScrollView that shows vertical data, but where the horizontal component is no wider than the screen of the iPhone. The problem is that the user is still able to drag horizontally, and basically expose blank sections of the UI. I have tried setting:</p> <pre><code>scrollView.alwaysBounceHorizontal = NO; s...
[ { "answer_id": 174920, "author": "Mike McMaster", "author_id": 544, "author_profile": "https://Stackoverflow.com/users/544", "pm_score": 5, "selected": true, "text": "// Should scroll vertically but not horizontally\nUIScrollView *scrollView = [[UIScrollView alloc] initWithFrame:CGRectMa...
2008/10/06
[ "https://Stackoverflow.com/questions/173786", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6044/" ]
173,790
<p>If I safe an Array and reload it, is there a possibility to get the size if its unknown? Thanks</p>
[ { "answer_id": 173808, "author": "Wouter Lievens", "author_id": 7927, "author_profile": "https://Stackoverflow.com/users/7927", "pm_score": 2, "selected": false, "text": "int[] myArray = deserializeSomeArray();\nint size = myArray.length;\n" }, { "answer_id": 174077, "author"...
2008/10/06
[ "https://Stackoverflow.com/questions/173790", "https://Stackoverflow.com", "https://Stackoverflow.com/users/25128/" ]
173,810
<p>A <code>TextBox</code> is set to <code>AutoPostback</code> as changing the value should cause a number of (display-only) fields to be recalculated and displayed.<br> That works fine.</p> <p>However, when the field is tabbed out of, the focus briefly moves on to the next field, then disappears when the page is redra...
[ { "answer_id": 7875147, "author": "Emanuele Greco", "author_id": 497040, "author_profile": "https://Stackoverflow.com/users/497040", "pm_score": 1, "selected": false, "text": "<script>\nvar idSelected;\n $(\"input\").focusin(function () {\n idSelected = this.id;\n });\n</scrip...
2008/10/06
[ "https://Stackoverflow.com/questions/173810", "https://Stackoverflow.com", "https://Stackoverflow.com/users/24096/" ]
173,814
<p>How can ALTER be used to drop a column in a MySQL table if that column exists? </p> <p>I know I can use <code>ALTER TABLE my_table DROP COLUMN my_column</code>, but that will throw an error if <code>my_column</code> does not exist. Is there alternative syntax for dropping the column conditionally?</p> <p>I'm using...
[ { "answer_id": 173820, "author": "Matthias Winkelmann", "author_id": 4494, "author_profile": "https://Stackoverflow.com/users/4494", "pm_score": 7, "selected": true, "text": "IF EXISTS DROP [COLUMN] [IF EXISTS] col_name \n ALTER TABLE my_table DROP IF EXISTS my_column;\n" }, { "a...
2008/10/06
[ "https://Stackoverflow.com/questions/173814", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7362/" ]
173,821
<p>I want to output the function name each time it is called, I can easily copy and paste the function name, however I wondered if there was a shortcut that would do the job for me?</p> <p>At the moment I am doing:</p> <pre><code>SlideInfoHeader* lynxThreeFile::readSlideInfoHeader(QDataStream &amp; in) { qDebug("...
[ { "answer_id": 173828, "author": "Torbjörn Gyllebring", "author_id": 21182, "author_profile": "https://Stackoverflow.com/users/21182", "pm_score": 6, "selected": true, "text": "__FUNCTION__" }, { "answer_id": 174369, "author": "Matt Price", "author_id": 852, "author_p...
2008/10/06
[ "https://Stackoverflow.com/questions/173821", "https://Stackoverflow.com", "https://Stackoverflow.com/users/24459/" ]
173,834
<p>Given an SQLConnection object how can you get a schema for a single table?</p> <p>I seemed to be able to get the schema from a <code>DataSet</code> which I'd gotten from running a query, but all the schema info I could get from the connection seemed to be related to what tables were available and not the actual deta...
[ { "answer_id": 173863, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 4, "selected": true, "text": "Command.ExecuteReader(CommandBehavior.KeyInfo)\n" }, { "answer_id": 173871, "author": "Mitch Wheat", "author_id...
2008/10/06
[ "https://Stackoverflow.com/questions/173834", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20400/" ]
173,835
<p>I am using Spry (<code>SpryData.js,xpath.js</code>)</p> <pre><code> var ds1 = new Spry.Data.XMLDataSet("_db/db.xml", "bildiriler/bildiri",{useCache:false}); // load the xml tree </code></pre> <p>....</p> <pre><code>&lt;!-- use it in a loop - Sometimes the page use "ds1.loadData();" to refresh the data --&gt...
[ { "answer_id": 174320, "author": "Errico Malatesta", "author_id": 24439, "author_profile": "https://Stackoverflow.com/users/24439", "pm_score": 0, "selected": false, "text": "<p spry:state =\"loading\"> Loading ( text or an image ) </p>\n" }, { "answer_id": 3351158, "author":...
2008/10/06
[ "https://Stackoverflow.com/questions/173835", "https://Stackoverflow.com", "https://Stackoverflow.com/users/24439/" ]
173,846
<p>I'm trying to have my Struts2 app redirect to a generated URL. In this case, I want the URL to use the current date, or a date I looked up in a database. So <code>/section/document</code> becomes <code>/section/document/2008-10-06</code></p> <p>What's the best way to do this?</p>
[ { "answer_id": 174100, "author": "Sietse", "author_id": 6400, "author_profile": "https://Stackoverflow.com/users/6400", "pm_score": 2, "selected": false, "text": "ServletRedirectResult doExecute() super.doExecute() public class AppendRedirectionResult extends ServletRedirectResult {\n ...
2008/10/06
[ "https://Stackoverflow.com/questions/173846", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6400/" ]
173,851
<p>I have a PHP script that needs to determine if it's been executed via the command-line or via HTTP, primarily for output-formatting purposes. What's the canonical way of doing this? I had thought it was to inspect <code>SERVER['argc']</code>, but it turns out this is populated, even when using the 'Apache 2.0 Handle...
[ { "answer_id": 173856, "author": "Vinko Vrsalovic", "author_id": 5190, "author_profile": "https://Stackoverflow.com/users/5190", "pm_score": 3, "selected": false, "text": "$_SERVER['REMOTE_ADDR']\n" }, { "answer_id": 173887, "author": "Community", "author_id": -1, "au...
2008/10/06
[ "https://Stackoverflow.com/questions/173851", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5058/" ]
173,866
<p>I have a web page which contains a select box. When I open a jQuery Dialog it is displayed partly behind the select box.</p> <p>How should I approach this problem? Should I hide the select box or does jQuery offer some kind of 'shim' solution. (I have Googled but didn't find anything)</p> <p>Here is some code:</p...
[ { "answer_id": 173856, "author": "Vinko Vrsalovic", "author_id": 5190, "author_profile": "https://Stackoverflow.com/users/5190", "pm_score": 3, "selected": false, "text": "$_SERVER['REMOTE_ADDR']\n" }, { "answer_id": 173887, "author": "Community", "author_id": -1, "au...
2008/10/06
[ "https://Stackoverflow.com/questions/173866", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11249/" ]
173,868
<p>This is a question you can read everywhere on the web with various answers:</p> <pre><code>$ext = end(explode('.', $filename)); $ext = substr(strrchr($filename, '.'), 1); $ext = substr($filename, strrpos($filename, '.') + 1); $ext = preg_replace('/^.*\.([^.]+)$/D', '$1', $filename); $exts = split("[/\\.]", $filena...
[ { "answer_id": 173872, "author": "Adam Wright", "author_id": 1200, "author_profile": "https://Stackoverflow.com/users/1200", "pm_score": 8, "selected": false, "text": "pathinfo() $path_info = pathinfo('/foo/bar/baz.bill');\n\necho $path_info['extension']; // \"bill\"\n" }, { "ans...
2008/10/06
[ "https://Stackoverflow.com/questions/173868", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9951/" ]
173,870
<p>I knew I should never have started using c++ io, the whole "type safety" argument is a red herring (does anyone <em>really</em> find that it's one of their most pressing problems?). Anyhow, I did, and discovered a strange difference between ifstreams and FILE*s and plain old file descriptors: ifstreams cannot read f...
[ { "answer_id": 174268, "author": "Greg Rogers", "author_id": 5963, "author_profile": "https://Stackoverflow.com/users/5963", "pm_score": 2, "selected": false, "text": "ios::in" } ]
2008/10/06
[ "https://Stackoverflow.com/questions/173870", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22147/" ]