qid
int64
4
19.1M
question
stringlengths
18
48.3k
answers
list
date
stringlengths
10
10
metadata
list
252,156
<p>In Sql Server 2005 what data type should be used to store passwords <a href="http://msdn.microsoft.com/en-us/library/system.security.cryptography.sha256managed(VS.71).aspx" rel="noreferrer">hashed by SHA-256 algorithm</a>? </p> <p>The data is <a href="http://msdn.microsoft.com/en-us/library/system.security.cryptogr...
[ { "answer_id": 252175, "author": "Peter Parker", "author_id": 23264, "author_profile": "https://Stackoverflow.com/users/23264", "pm_score": 4, "selected": false, "text": "0x" } ]
2008/10/30
[ "https://Stackoverflow.com/questions/252156", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3241/" ]
252,179
<p>What is the best way to check if a given url points to a valid file (i.e. not return a 404/301/etc.)? I've got a script that will load certain .js files on a page, but I need a way to verify each URL it receives points to a valid file.</p> <p>I'm still poking around the PHP manual to see which file functions (if an...
[ { "answer_id": 252418, "author": "Czimi", "author_id": 3906, "author_profile": "https://Stackoverflow.com/users/3906", "pm_score": 4, "selected": true, "text": "<?php\n// create a new cURL resource\n$ch = curl_init();\n\n// set URL and other appropriate options\ncurl_setopt($ch, CURLOPT_...
2008/10/30
[ "https://Stackoverflow.com/questions/252179", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5291/" ]
252,202
<p>In my database I have tables that define types for example</p> <p>Table: Publication Types</p> <pre> ID | Type ---------- 1 | Article 2 | Abstract 3 | Book .... </pre> <p>Which is related through the ID key to a publication tables which has the field <em>TypeID</em>.</p> <p>I then create a PublicationTable ...
[ { "answer_id": 252212, "author": "Steven A. Lowe", "author_id": 9345, "author_profile": "https://Stackoverflow.com/users/9345", "pm_score": 4, "selected": true, "text": "inner join lookuptable lt on lt.id = (int)myenum.sometype \n inner join lookuptable lt on lt.name = \"somehardcodeddes...
2008/10/31
[ "https://Stackoverflow.com/questions/252202", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4612/" ]
252,203
<p>I am using the following code to check if a variable is not nil and not zero</p> <pre><code>if(discount != nil &amp;&amp; discount != 0) ... end </code></pre> <p>Is there a better way to do this?</p>
[ { "answer_id": 252220, "author": "Paige Ruten", "author_id": 813, "author_profile": "https://Stackoverflow.com/users/813", "pm_score": 5, "selected": false, "text": "if (!discount.nil? && !discount.zero?)\n discount nil zero? discount.zero? discount nil" }, { "answer_id": 252330,...
2008/10/31
[ "https://Stackoverflow.com/questions/252203", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14755/" ]
252,222
<p>What is the best way to access an ASP.NET HiddenField control that is embedded in an ASP.NET PlaceHolder control through JavaScript? The Visible attribute is set to false in the initial page load and can changed via an AJAX callback.</p> <p>Here is my current source code:</p> <pre><code>&lt;script language="javas...
[ { "answer_id": 11045023, "author": "BinuAmitSanish", "author_id": 1457853, "author_profile": "https://Stackoverflow.com/users/1457853", "pm_score": 2, "selected": false, "text": "function popup(lid)\n{\n var linkid=lid.id.toString(); \n var lengthid=linkid.length-25; \n va...
2008/10/31
[ "https://Stackoverflow.com/questions/252222", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26327/" ]
252,226
<p>I have an <a href="http://en.wikipedia.org/wiki/EXE" rel="noreferrer">EXE</a> file that I should like to sign so that Windows will not warn the end user about an application from an "unknown publisher". I am not a Windows developer. The application in question is a screensaver generated from an application that gene...
[ { "answer_id": 25922635, "author": "Lee Richardson", "author_id": 40783, "author_profile": "https://Stackoverflow.com/users/40783", "pm_score": 5, "selected": false, "text": "signtool.exe sign /t http://timestamp.verisign.com/scripts/timstamp.dll /f \"MyCert.pfx\" /p MyPassword /d Signed...
2008/10/31
[ "https://Stackoverflow.com/questions/252226", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9438/" ]
252,229
<p>What's the best way to unify several overlapping id systems into a unified one while maintaining the old id system.</p> <p>I have several different ids on my website... (E.g /publisher/1234 and /designer/1234) I would like to unify the ids into a new system, but want to preserve the functionality of the older syste...
[ { "answer_id": 25922635, "author": "Lee Richardson", "author_id": 40783, "author_profile": "https://Stackoverflow.com/users/40783", "pm_score": 5, "selected": false, "text": "signtool.exe sign /t http://timestamp.verisign.com/scripts/timstamp.dll /f \"MyCert.pfx\" /p MyPassword /d Signed...
2008/10/31
[ "https://Stackoverflow.com/questions/252229", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4133/" ]
252,242
<p>Specifically, I have a model that has a field like this</p> <pre><code>pub_date = models.DateField("date published") </code></pre> <p>I want to be able to easily grab the object with the most recent <code>pub_date</code>. What is the easiest/best way to do this?</p> <p>Would something like the following do what I...
[ { "answer_id": 252248, "author": "Harley Holcombe", "author_id": 1057, "author_profile": "https://Stackoverflow.com/users/1057", "pm_score": 6, "selected": true, "text": "obj = Edition.objects.latest('pub_date')\n get_latest_by obj = Edition.objects.latest()\n ordering" }, { "ans...
2008/10/31
[ "https://Stackoverflow.com/questions/252242", "https://Stackoverflow.com", "https://Stackoverflow.com/users/85/" ]
252,249
<p>Lucene is an excellent search engine, but the .NET version is behind the official Java release (latest stable .NET release is 2.0, but the latest Java Lucene version is 2.4, which has more features).</p> <p>How do you get around this?</p>
[ { "answer_id": 252254, "author": "Kalid", "author_id": 109, "author_profile": "https://Stackoverflow.com/users/109", "pm_score": 5, "selected": true, "text": "ikvmc -target:library <path-to-lucene.jar>\n QueryParser parser = new QueryParser(\"field1\", analyzer);\njava.util.Map boosts = ...
2008/10/31
[ "https://Stackoverflow.com/questions/252249", "https://Stackoverflow.com", "https://Stackoverflow.com/users/109/" ]
252,252
<p>Given the following markup:</p> <pre><code>&lt;ul&gt; &lt;li&gt;apple&lt;/li&gt; &lt;li class="highlight"&gt;orange&lt;/li&gt; &lt;li&gt;pear&lt;/li&gt; &lt;/ul&gt; </code></pre> <p>Both the <code>ul</code>s and the <code>li</code>s widths appear to be 100%. If I apply a <code>background-color</code> to t...
[ { "answer_id": 252259, "author": "BoltBait", "author_id": 20848, "author_profile": "https://Stackoverflow.com/users/20848", "pm_score": 2, "selected": false, "text": "<ul>\n <li>apple</li>\n <li><span class=\"highlight\">orange</span></li>\n <li>pear</li>\n</ul>\n" }, { "an...
2008/10/31
[ "https://Stackoverflow.com/questions/252252", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26627/" ]
252,257
<p>I was just wondering, since the <strong>sealed</strong> keyword's existence indicates that it's the class author's decision as to whether other classes are allowed to inherit from it, why aren't classes sealed by default, with some keyword to mark them explicitly as extensible?</p> <p>I know it's somewhat different...
[ { "answer_id": 252745, "author": "Pablo Retyk", "author_id": 30729, "author_profile": "https://Stackoverflow.com/users/30729", "pm_score": 6, "selected": true, "text": "public extensible class MyClass\n public sealed class MyClass\n" } ]
2008/10/31
[ "https://Stackoverflow.com/questions/252257", "https://Stackoverflow.com", "https://Stackoverflow.com/users/82/" ]
252,260
<p>I am trying to use reflector.InvokeMethod to invoke a function with an optional parameter. The function looks like this: </p> <pre><code>Private Function DoSomeStuff(ByVal blah1 as string, ByVal blah2 as string, Optional ByVal blah3 as string = "45") as boolean 'stuff end function </code></pre> <p>and I'm Invoking...
[ { "answer_id": 319190, "author": "codeConcussion", "author_id": 1321, "author_profile": "https://Stackoverflow.com/users/1321", "pm_score": 0, "selected": false, "text": "Private Overloads Function DoSomeStuff(ByVal blah1 As String, ByVal blah2 As String) As Boolean\n Return DoSomeStu...
2008/10/31
[ "https://Stackoverflow.com/questions/252260", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
252,267
<p>The code at the end produces a compile error:</p> <pre><code>NotApplicable.java:7: run() in cannot be applied to (int) run(42); ^ 1 error </code></pre> <p>The question is why? Why does javac think I am calling run(), and does not find run(int bar)? It correctly called foo(int bar...
[ { "answer_id": 252276, "author": "Claudiu", "author_id": 15055, "author_profile": "https://Stackoverflow.com/users/15055", "pm_score": 0, "selected": false, "text": "run new Runnable() {} import java.util.*;\n\npublic class tmp\n{\n private int x = 20;\n public static class Inner\n {\...
2008/10/31
[ "https://Stackoverflow.com/questions/252267", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21838/" ]
252,268
<p>I develop and maintain small intranet web apps(JSP and Resin).</p> <p>Some users takes so much time to complete the forms that, when they submit, they lose all their input data because of session timeout.</p> <p>Currently I prolonged session timeout to 30 minutes and display count-down clock till session timeout ...
[ { "answer_id": 252349, "author": "Jere.Jones", "author_id": 19476, "author_profile": "https://Stackoverflow.com/users/19476", "pm_score": 2, "selected": false, "text": "<input type=\"hidden\" name=\"user\" value=\"bob\" />\n<input type=\"hidden\" name=\"currentRecordId\" value=\"2345\" /...
2008/10/31
[ "https://Stackoverflow.com/questions/252268", "https://Stackoverflow.com", "https://Stackoverflow.com/users/29197/" ]
252,274
<p>I open gmail, click on an inbox item, and look at source of the page. It doesn't look like there isn't any proper html to relate to what is shown on the actual page.</p> <p>How is the source getting processed into the actual page? Is there some javascript processing this information?</p>
[ { "answer_id": 252307, "author": "Richard A", "author_id": 24355, "author_profile": "https://Stackoverflow.com/users/24355", "pm_score": 2, "selected": false, "text": "try{function aa(a,b){return a.appendChild=b}function ba(a,b){return a.textContent=b}function da(a,b){return a.stop=b}fun...
2008/10/31
[ "https://Stackoverflow.com/questions/252274", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
252,282
<p>I'm working on an import (from Excel) dialog to select ranges of cells.</p> <p>When the range is selected, I use the event sink to catch the event and highlight the first row and first column.</p> <p>I need to unhighlight the previous selection's first row and column. I don't think it's safe to just get the selec...
[ { "answer_id": 252439, "author": "dbb", "author_id": 25675, "author_profile": "https://Stackoverflow.com/users/25675", "pm_score": 3, "selected": true, "text": "Set Rng = Application.Selection\n" } ]
2008/10/31
[ "https://Stackoverflow.com/questions/252282", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1965047/" ]
252,286
<p>This sounds dumb, but I can't get it to work. I think i just dont' understand the difference between <code>%%v, %v% and %v</code></p> <p>Here's what I'm trying to do:</p> <pre><code>for %%v in (*.flv) do ffmpeg.exe -i "%%v" -y -f mjpeg -ss 0.001 -vframes 1 -an "%%v.jpg" </code></pre> <p>This successfully generate...
[ { "answer_id": 252316, "author": "Jeff Hillman", "author_id": 3950, "author_profile": "https://Stackoverflow.com/users/3950", "pm_score": 3, "selected": false, "text": "for %%v in (*.flv) do ffmpeg.exe -i \"%%v\" -y -f mjpeg -ss 0.001 -vframes 1 -an \"%%~nv.jpg\"\n %~I - expands ...
2008/10/31
[ "https://Stackoverflow.com/questions/252286", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10680/" ]
252,287
<p>Here's my setup: a Mac, running OS X Tiger. Windows XP running in a virtual machine (Parallels). Windows XP has my Mac home directory mapped as a network drive.</p> <p>I have two files in a directory of my Mac home directory:</p> <h3>foo.py</h3> <pre><code>pass </code></pre> <h3>test.py</h3> <pre><code>import...
[ { "answer_id": 254355, "author": "Brian", "author_id": 9493, "author_profile": "https://Stackoverflow.com/users/9493", "pm_score": 1, "selected": false, "text": "python -v -v test.py\n" } ]
2008/10/31
[ "https://Stackoverflow.com/questions/252287", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15154/" ]
252,297
<p>I was making the following call:</p> <pre><code>result = RegOpenKeyEx(key, s, 0, KEY_READ, &amp;key); </code></pre> <p>(C++, Visual Studio 5, Vista 64bit).</p> <p>It is failing with error code 2 ("File not found") even though "<code>regedit</code>" shows that the key exists. This code has always worked on 32bit ...
[ { "answer_id": 252302, "author": "Tim Cooper", "author_id": 10592, "author_profile": "https://Stackoverflow.com/users/10592", "pm_score": 7, "selected": true, "text": "KEY_WOW64_64KEY result = RegOpenKeyEx(key, s, 0, KEY_READ|KEY_WOW64_64KEY, &key);\n" }, { "answer_id": 3104602, ...
2008/10/31
[ "https://Stackoverflow.com/questions/252297", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10592/" ]
252,304
<p>In our data access layer at work we have this standard implementation where the class is accessed through a singleton public property which looks something like this:</p> <pre><code>public static CustomerController Instance { get { lock(singletonLock) ...
[ { "answer_id": 252363, "author": "Keith Nicholas", "author_id": 10431, "author_profile": "https://Stackoverflow.com/users/10431", "pm_score": 1, "selected": false, "text": " public static CustomerController Instance\n {\n get \n {\n ...
2008/10/31
[ "https://Stackoverflow.com/questions/252304", "https://Stackoverflow.com", "https://Stackoverflow.com/users/493/" ]
252,323
<p>I have a program that monitors debug messages and I have tried using a TextBox and appended the messages to it but it doesn't scale very well and slows way down when the number of messages gets large. I then tried a ListBox but the scrolling was snapping to the top when appending new messages. It also doesn't allow...
[ { "answer_id": 252347, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 1, "selected": false, "text": " private void AddConsoleComment(string comment)\n {\n textBoxConsole.Text += comment + System.Environment.NewLine...
2008/10/31
[ "https://Stackoverflow.com/questions/252323", "https://Stackoverflow.com", "https://Stackoverflow.com/users/32958/" ]
252,352
<p>Is it possible to change the <code>RowCount</code> of a <code>DataGrid</code> in flash after it has been created on the stage?</p> <p>I am loading an XML file externally that contains the number of rows the <code>DataGrid</code> should have, but the problem is that because this file is not loaded at runtime, it jus...
[ { "answer_id": 252347, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 1, "selected": false, "text": " private void AddConsoleComment(string comment)\n {\n textBoxConsole.Text += comment + System.Environment.NewLine...
2008/10/31
[ "https://Stackoverflow.com/questions/252352", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6822/" ]
252,355
<p>After I read a bunch of LINQ related stuff, I suddenly realized that no articles introduce how to write asynchronous LINQ query. </p> <p>Suppose we use LINQ to SQL, below statement is clear. However, if the SQL database responds slowly, then the thread using this block of code would be hindered.</p> <pre><code>var...
[ { "answer_id": 252426, "author": "TheSoftwareJedi", "author_id": 18941, "author_profile": "https://Stackoverflow.com/users/18941", "pm_score": 6, "selected": true, "text": "public static class AsynchronousQueryExecutor\n{\n public static void Call<T>(IEnumerable<T> query, Action<IEnum...
2008/10/31
[ "https://Stackoverflow.com/questions/252355", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26349/" ]
252,365
<p>I'm trying to create a TCP connection and send/read data that uses SSL, but I haven't been able to successfully accomplish this.</p> <p>What I'd like to do is something like this:</p> <pre><code> TcpClient _tcpClient = new TcpClient("host", 110); BinaryReader reader = new BinaryReader(new System.Ne...
[ { "answer_id": 252389, "author": "Ovidiu Pacurar", "author_id": 28419, "author_profile": "https://Stackoverflow.com/users/28419", "pm_score": 5, "selected": true, "text": "TcpClient _tcpClient = new TcpClient(\"host\", 110);\n\nStreamReader reader = \n new StreamReader(new System.Net.S...
2008/10/31
[ "https://Stackoverflow.com/questions/252365", "https://Stackoverflow.com", "https://Stackoverflow.com/users/32226/" ]
252,371
<p>What's the easiest way to increase or decrease indentation for a large block of code in vi?</p>
[ { "answer_id": 252380, "author": "Greg Hewgill", "author_id": 893, "author_profile": "https://Stackoverflow.com/users/893", "pm_score": 2, "selected": false, "text": ">% <%" }, { "answer_id": 252385, "author": "Harley Holcombe", "author_id": 1057, "author_profile": "h...
2008/10/31
[ "https://Stackoverflow.com/questions/252371", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1693/" ]
252,391
<p>Currently I have:</p> <pre><code>&lt;system.net&gt; &lt;mailSettings&gt; &lt;smtp from="me@mydomain.com"&gt; &lt;network host="localhost" port="25" /&gt; &lt;/smtp&gt; &lt;/mailSettings&gt; &lt;/system.net&gt; </code></pre> <p>How can I change it...
[ { "answer_id": 252415, "author": "Ty.", "author_id": 16948, "author_profile": "https://Stackoverflow.com/users/16948", "pm_score": 7, "selected": true, "text": "new SmtpClient(...).Send(\"\\\"John Smith\\\" jsmith@somewhere.com\", ...);\n <smtp from=\"&quot;John Smith&quot; &lt;jsmith@so...
2008/10/31
[ "https://Stackoverflow.com/questions/252391", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2385/" ]
252,411
<p>At the moment I have a console application. I would like to be able to exit the application, update through svn, recompile and then relaunch. This is running under a Linux environment. At the moment I'm not sure how I would be able to relaunch the application. Is there a way to do this?</p>
[ { "answer_id": 252415, "author": "Ty.", "author_id": 16948, "author_profile": "https://Stackoverflow.com/users/16948", "pm_score": 7, "selected": true, "text": "new SmtpClient(...).Send(\"\\\"John Smith\\\" jsmith@somewhere.com\", ...);\n <smtp from=\"&quot;John Smith&quot; &lt;jsmith@so...
2008/10/31
[ "https://Stackoverflow.com/questions/252411", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23120/" ]
252,417
<p>What is the easiest way to use a <code>DLL</code> file from within <code>Python</code>?</p> <p>Specifically, how can this be done <em>without</em> writing any additional wrapper <code>C++</code> code to expose the functionality to <code>Python</code>?</p> <p>Native <code>Python</code> functionality is strongly pre...
[ { "answer_id": 252473, "author": "paxdiablo", "author_id": 14860, "author_profile": "https://Stackoverflow.com/users/14860", "pm_score": 8, "selected": true, "text": "import ctypes\n\n# Load DLL into memory.\n\nhllDll = ctypes.WinDLL (\"c:\\\\PComm\\\\ehlapi32.dll\")\n\n# Set up prototyp...
2008/10/31
[ "https://Stackoverflow.com/questions/252417", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6839/" ]
252,451
<p>I have a dynamic Facelets page that needs to show information from database when the page loads. At this point in the flow, there have not been any form submissions. Every JSF example I can find only shows a form submission with dynamic results on the next page.</p> <p>Every call I make to our database is currently...
[ { "answer_id": 252943, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 1, "selected": false, "text": "public class BackingBean implements InitializingBean\n{\n public void afterPropertiesSet()\n {\n loadInitialData(...
2008/10/31
[ "https://Stackoverflow.com/questions/252451", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
252,459
<p>If you have multiple, unrelated projects, is it a good idea to put them in the same repository?</p> <pre><code>myRepo/projectA/trunk myRepo/projectA/tags myRepo/projectA/branches myRepo/projectB/trunk myRepo/projectB/tags myRepo/projectB/branches </code></pre> <p>or would you create new repositories for each?</p> ...
[ { "answer_id": 252659, "author": "mlambie", "author_id": 17453, "author_profile": "https://Stackoverflow.com/users/17453", "pm_score": 3, "selected": false, "text": "/client/<clientname>/<project>/<trunk, branches, tags>\n" }, { "answer_id": 252717, "author": "Frederic Morin"...
2008/10/31
[ "https://Stackoverflow.com/questions/252459", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9021/" ]
252,464
<p>I'm trying to send the output to the console (or colouredconsole) ... which I'm hoping would (also?) go to the Visual Studio's <code>Output</code> window for any ASP.NET web site/app/mvc app.</p> <p>It doesn't by default, but if I change the target to 'file' then it works for sure.</p> <p>Can NLog output to the <cod...
[ { "answer_id": 260576, "author": "Scott P", "author_id": 33848, "author_profile": "https://Stackoverflow.com/users/33848", "pm_score": 8, "selected": true, "text": "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n<nlog xmlns=\"http://www.nlog-project.org/schemas/NLog.xsd\"\n xmlns:xsi=...
2008/10/31
[ "https://Stackoverflow.com/questions/252464", "https://Stackoverflow.com", "https://Stackoverflow.com/users/30674/" ]
252,489
<p>Given a simple switch statement</p> <pre><code>switch (int) { case 1 : { printf("1\n"); break; } case 2 : { printf("2\n"); } case 3 : { printf("3\n"); } } </code></pre> <p>The absence of a break statement in case 2, implies that execution will...
[ { "answer_id": 252497, "author": "Bill the Lizard", "author_id": 1288, "author_profile": "https://Stackoverflow.com/users/1288", "pm_score": 4, "selected": false, "text": "case 0:\ncase 1:\ncase 2:\n // all do the same thing.\n break;\ncase 3:\ncase 4:\n // do something differen...
2008/10/31
[ "https://Stackoverflow.com/questions/252489", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7734/" ]
252,493
<p>Besides the DateTime ctor (new DateTime(year, month, day)) , is there any other way to truncate a date?</p>
[ { "answer_id": 252495, "author": "FlySwat", "author_id": 1965, "author_profile": "https://Stackoverflow.com/users/1965", "pm_score": 2, "selected": false, "text": "DateTime.Now.ToShortDateString();\n" } ]
2008/10/31
[ "https://Stackoverflow.com/questions/252493", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1130097/" ]
252,515
<p>This is a question that's been nagging me for some time. I always thought that C++ should have been designed so that the <code>delete</code> operator (without brackets) works even with the <code>new[]</code> operator.</p> <p>In my opinion, writing this:</p> <pre><code>int* p = new int; </code></pre> <p>should be ...
[ { "answer_id": 252518, "author": "David Nehme", "author_id": 14167, "author_profile": "https://Stackoverflow.com/users/14167", "pm_score": 6, "selected": true, "text": "new delete new[] delete[] new[] delete[] new delete malloc free delete delete[]" }, { "answer_id": 252521, ...
2008/10/31
[ "https://Stackoverflow.com/questions/252515", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9936/" ]
252,517
<p>I'm using c#, and have an open tcpip connection receiving data. Is it possible to save the stream to an ms sql server database as I'm receiving it, instead of receiving all the data then saving it all? If the stream could be sent to the database as it's being received, you wouldn't have to keep the entire chunk of...
[ { "answer_id": 252526, "author": "TheSoftwareJedi", "author_id": 18941, "author_profile": "https://Stackoverflow.com/users/18941", "pm_score": 3, "selected": true, "text": "update myTable set myColumn.Write(@data, @offset, @length) where someid = @someId\n" } ]
2008/10/31
[ "https://Stackoverflow.com/questions/252517", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9266/" ]
252,519
<p>How can I calculate the number of work days between two dates in SQL Server? </p> <p>Monday to Friday and it must be T-SQL.</p>
[ { "answer_id": 252532, "author": "Bogdan Maxim", "author_id": 23795, "author_profile": "https://Stackoverflow.com/users/23795", "pm_score": 5, "selected": false, "text": "--Changing current database to the Master database allows function to be shared by everyone.\nUSE MASTER\nGO\n--If th...
2008/10/31
[ "https://Stackoverflow.com/questions/252519", "https://Stackoverflow.com", "https://Stackoverflow.com/users/28419/" ]
252,539
<p>I have an app where I create many uiviews and add them to the self.view of the UIViewController. My app is running really slowly. I am releasing all of my objects and have no memory leaks (I ran the performance tool). Can anyone tell me what could be making my app so slow? (code is below)</p> <p>[EDIT] The array ha...
[ { "answer_id": 252566, "author": "Ben Gottlieb", "author_id": 6694, "author_profile": "https://Stackoverflow.com/users/6694", "pm_score": 2, "selected": false, "text": "[item release] item for(NSString *item in arrayTips)..." } ]
2008/10/31
[ "https://Stackoverflow.com/questions/252539", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23695/" ]
252,548
<p>When upgrading MySQL, I first create a backup of the database. Then I will uninstall the current version installed, and delete all the files that were left by the installer. Then I install the latest GA version, and restore the created back-up, using the MySQL Administrator.</p> <p>Is there a better way of doing an...
[ { "answer_id": 252587, "author": "Owen", "author_id": 4853, "author_profile": "https://Stackoverflow.com/users/4853", "pm_score": 3, "selected": true, "text": "mysql.user mysql.db select concat('show grants for ',quote(user),'@',quote(host),';') from mysql.user\n" } ]
2008/10/31
[ "https://Stackoverflow.com/questions/252548", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26087/" ]
252,552
<p>When should unions be used? Why do we need them?</p>
[ { "answer_id": 252561, "author": "LeopardSkinPillBoxHat", "author_id": 22489, "author_profile": "https://Stackoverflow.com/users/22489", "pm_score": 5, "selected": false, "text": "union {\n int a;\n int b;\n int c;\n} myUnion;\n" }, { "answer_id": 252568, "author": "Ada...
2008/10/31
[ "https://Stackoverflow.com/questions/252552", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
252,559
<p>What is meant by redundant function? What is the difference between a redundant function &amp; an inline function? </p>
[ { "answer_id": 252736, "author": "PhiLho", "author_id": 15459, "author_profile": "https://Stackoverflow.com/users/15459", "pm_score": 1, "selected": false, "text": "function Foo(x) { return x * x / 2; }\nfunction Bar(x) { return Math.sqr(x) * 0.5; }\n" } ]
2008/10/31
[ "https://Stackoverflow.com/questions/252559", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
252,575
<p>Can we call functions using function pointer? if yes how?</p>
[ { "answer_id": 252581, "author": "Adam Liss", "author_id": 29157, "author_profile": "https://Stackoverflow.com/users/29157", "pm_score": 4, "selected": false, "text": "\n// Functions that will be executed via pointer.\nint add(int i, int j) { return i+j; }\nint subtract(int i, int j) {re...
2008/10/31
[ "https://Stackoverflow.com/questions/252575", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
252,588
<p>On large files (~200+ MB), I get the 503 error when I read the stream.</p> <pre><code>ftp = (FtpWebRequest)WebRequest.Create(new Uri(address.AbsoluteUri + @"/" + file.Name)); ftp.Credentials = new NetworkCredential(username, password); ftp.Method = WebRequestMethods.Ftp.DownloadFile; response = (FtpWebResponse)ftp...
[ { "answer_id": 264122, "author": "John Lemp", "author_id": 12915, "author_profile": "https://Stackoverflow.com/users/12915", "pm_score": 3, "selected": true, "text": "ftp.KeepAlive = false;\n" }, { "answer_id": 39368278, "author": "mrrrk", "author_id": 155791, "author...
2008/10/31
[ "https://Stackoverflow.com/questions/252588", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4068/" ]
252,599
<p>We are developing a desktop application(visual basic 6.0).We have our own logging framework. What are good practices? When we have a web application, then we can control the level of logging. How to go about in a desktop app?</p>
[ { "answer_id": 252614, "author": "Adam Liss", "author_id": 29157, "author_profile": "https://Stackoverflow.com/users/29157", "pm_score": 3, "selected": false, "text": "syslog" } ]
2008/10/31
[ "https://Stackoverflow.com/questions/252599", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
252,611
<p>I need to be able to lock down the valid characters in a textbox, I presently have a regex which I can check each character against such as </p> <blockquote> <p>[A-Za-z]</p> </blockquote> <p>would lock down to just Alpha characters. </p> <pre><code>protected override void OnKeyPress(KeyPressEventArgs e) { if ...
[ { "answer_id": 304014, "author": "benPearce", "author_id": 4490, "author_profile": "https://Stackoverflow.com/users/4490", "pm_score": 0, "selected": false, "text": "protected override void OnKeyDown(KeyEventArgs e)\n {\n Keys keyCode = (Keys)e.KeyValue;\n base.OnKeyDown(e);\n i...
2008/10/31
[ "https://Stackoverflow.com/questions/252611", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4490/" ]
252,615
<p>I have got the following problem since the server has safe mode turned on, and directories are being created under different users:</p> <ol> <li>I upload my script to the server, it shows as belonging to 'user1'. All it is doing is making a new directory when a new user is created so it can store files in it.</li> ...
[ { "answer_id": 252645, "author": "mlambie", "author_id": 17453, "author_profile": "https://Stackoverflow.com/users/17453", "pm_score": 0, "selected": false, "text": "php_value safe_mode = Off\n" }, { "answer_id": 252646, "author": "Luis Melgratti", "author_id": 17032, ...
2008/10/31
[ "https://Stackoverflow.com/questions/252615", "https://Stackoverflow.com", "https://Stackoverflow.com/users/131/" ]
252,624
<p>My users want data from my application in Excel. The data resides in a SQL Server database but I don't want the users to have direct access to the database, I would rather provide them a web service to get the data. What is the best way to move data from SQL Server to Excel via a web service?</p>
[ { "answer_id": 252648, "author": "Dested", "author_id": 11137, "author_profile": "https://Stackoverflow.com/users/11137", "pm_score": 2, "selected": false, "text": " public static void CreateExcelFromDataTable(string filename, DataTable dt) {\n\n DataGrid grid = new DataGrid();...
2008/10/31
[ "https://Stackoverflow.com/questions/252624", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
252,626
<p>I've got the following url route and i'm wanting to make sure that a segment of the route will only accept numbers. as such, i can provide some regex which checks the word.</p> <p>/page/{currentPage}</p> <p>so.. can someone give me a regex which matches when the word is a number (any int) greater than 0 (ie. 1 &lt...
[ { "answer_id": 252634, "author": "Paige Ruten", "author_id": 813, "author_profile": "https://Stackoverflow.com/users/813", "pm_score": 3, "selected": false, "text": "/([1-9][0-9]*)/\n [0-9]+" }, { "answer_id": 252641, "author": "Christian C. Salvadó", "author_id": 5445, ...
2008/10/31
[ "https://Stackoverflow.com/questions/252626", "https://Stackoverflow.com", "https://Stackoverflow.com/users/30674/" ]
252,644
<p>Here is one of my header file which consists of a union template with 4 different structures.</p> <pre><code>#define MAX 3 union family { struct name /*for taking the name and gender of original member*/ { unsigned char *namess; unsigned int gender; union family *ptr_ancestor; /*this...
[ { "answer_id": 252667, "author": "Adam Liss", "author_id": 29157, "author_profile": "https://Stackoverflow.com/users/29157", "pm_score": 2, "selected": false, "text": "// Define an array of 20 employees, each identified either by name or ID.\nunion ID {\n char name[10]; // ID may be...
2008/10/31
[ "https://Stackoverflow.com/questions/252644", "https://Stackoverflow.com", "https://Stackoverflow.com/users/31116/" ]
252,660
<p>How can I delete the session information from my browser by using javascript? Is it possible to do?</p>
[ { "answer_id": 252675, "author": "Ady", "author_id": 31395, "author_profile": "https://Stackoverflow.com/users/31395", "pm_score": 1, "selected": false, "text": "var d = new Date();\ndocument.cookie = \"cookiename=1;expires=\" + d.toGMTString() + \";\" + \";\";\n" }, { "answer_id...
2008/10/31
[ "https://Stackoverflow.com/questions/252660", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
252,662
<p>I need some information about localization. I am using .net 2.0 with C# 2.0 which takes care of most of the localization related issues. However, I need to manually draw the alphabets corresponding to the current culture on the screen in one particular screen.</p> <p>This would be similar to the Contacts screen in ...
[ { "answer_id": 265586, "author": "Serge Wautier", "author_id": 12379, "author_profile": "https://Stackoverflow.com/users/12379", "pm_score": 0, "selected": false, "text": "GetLocaleInfoW(MAKELCID(wLangId, SORT_DEFAULT), LOCALE_FONTSIGNATURE, wcBuf, MAXWCBUF);\n" } ]
2008/10/31
[ "https://Stackoverflow.com/questions/252662", "https://Stackoverflow.com", "https://Stackoverflow.com/users/32990/" ]
252,665
<p>I need to get all the <em>cookies</em> stored in my browser using JavaScript. How can it be done? </p>
[ { "answer_id": 252684, "author": "Codeslayer", "author_id": 4021, "author_profile": "https://Stackoverflow.com/users/4021", "pm_score": 4, "selected": false, "text": "document.cookie" }, { "answer_id": 252727, "author": "Franci Penov", "author_id": 17028, "author_prof...
2008/10/31
[ "https://Stackoverflow.com/questions/252665", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
252,671
<p>Has anyone ever seen the storage class <code>auto</code> explicitly used in C/C++? If so, in what situation?</p>
[ { "answer_id": 252686, "author": "Robert Gamble", "author_id": 25222, "author_profile": "https://Stackoverflow.com/users/25222", "pm_score": 2, "selected": false, "text": "auto auto" }, { "answer_id": 12573433, "author": "Jive Dadson", "author_id": 445296, "author_pro...
2008/10/31
[ "https://Stackoverflow.com/questions/252671", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2079/" ]
252,689
<p>We had a performance issue with DataGridViews where the redraw was horridly slow and found the solution <a href="https://stackoverflow.com/questions/118528/horrible-redraw-performance-of-the-datagridview-on-one-of-my-two-screens">Here</a> to create a derived type and enable double buffering on the control. (Derived ...
[ { "answer_id": 10277205, "author": "Dawid Moś", "author_id": 665695, "author_profile": "https://Stackoverflow.com/users/665695", "pm_score": 5, "selected": false, "text": "typeof(DataGridView).InvokeMember(\n \"DoubleBuffered\", \n BindingFlags.NonPublic | BindingFlags.Instance | Bin...
2008/10/31
[ "https://Stackoverflow.com/questions/252689", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12685/" ]
252,691
<p>I am hacking up a tagging application for emacs. I have got a tag cloud/weighted list successfully displaying on a buffer, but i am running into a snag. I need to be able to properly word-wrap the buffer, but I haven't a clue where to start.</p> <p>The font I am using is a variable width font. On top of that, ea...
[ { "answer_id": 255361, "author": "Alex Coventry", "author_id": 1941213, "author_profile": "https://Stackoverflow.com/users/1941213", "pm_score": 3, "selected": true, "text": "posn-at-point posn-at-x-y" }, { "answer_id": 256015, "author": "Matt Curtis", "author_id": 17221,...
2008/10/31
[ "https://Stackoverflow.com/questions/252691", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11052/" ]
252,703
<p>What's the difference between the list methods <code>append()</code> and <code>extend()</code>?</p>
[ { "answer_id": 252704, "author": "Greg Hewgill", "author_id": 893, "author_profile": "https://Stackoverflow.com/users/893", "pm_score": 7, "selected": false, "text": "append extend >>> a = [1, 2, 3]\n>>> a.append([4, 5, 6])\n>>> a\n[1, 2, 3, [4, 5, 6]]\n" }, { "answer_id": 252705...
2008/10/31
[ "https://Stackoverflow.com/questions/252703", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15055/" ]
252,729
<p>i'm trying to make the following routes .. and currently i'm going about this in a <em>really</em> long way.. ie. one route instance for EACH route.</p> <p>this is what i'm after... (assuming i'm doing a 'stackoverflow website')</p> <pre><code>/ &lt;-- root site /page/{page} &lt...
[ { "answer_id": 260131, "author": "Haacked", "author_id": 598, "author_profile": "https://Stackoverflow.com/users/598", "pm_score": 3, "selected": true, "text": "routes.MapRoute(\"page-tag\", \"tag/{tag}/page/{page}\", new {controller=\"question\", action=\"FilterByTag\"});\n public class...
2008/10/31
[ "https://Stackoverflow.com/questions/252729", "https://Stackoverflow.com", "https://Stackoverflow.com/users/30674/" ]
252,735
<p>I have made a bunch of changes to a number of files in a project. Every commit (usually at the file level) was accompanied by a comment of what was changed. </p> <p>Is there a way to get a list from CVS of these comments on changes since the last tagged version?</p> <p>Bonus if I can do this via the eclipse CVS pl...
[ { "answer_id": 252801, "author": "Louis Gerbarg", "author_id": 30506, "author_profile": "https://Stackoverflow.com/users/30506", "pm_score": 3, "selected": false, "text": "cvs log -rVERSION_1_0:\n" }, { "answer_id": 254100, "author": "Alex B", "author_id": 6180, "auth...
2008/10/31
[ "https://Stackoverflow.com/questions/252735", "https://Stackoverflow.com", "https://Stackoverflow.com/users/939/" ]
252,748
<p>How should I use array of function pointers in C?</p> <p>How can I initialize them?</p>
[ { "answer_id": 252750, "author": "VonC", "author_id": 6309, "author_profile": "https://Stackoverflow.com/users/6309", "pm_score": 8, "selected": false, "text": "int sum(int a, int b);\nint subtract(int a, int b);\nint mul(int a, int b);\nint div(int a, int b);\n\nint (*p[4]) (int x, int ...
2008/10/31
[ "https://Stackoverflow.com/questions/252748", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
252,766
<p>How can I add line numbers to a range of lines in a file opened in Vim? Not as in <code>:set nu</code>—this just <em>displays</em> line numbers—but actually have them be prepended to each line in the file?</p>
[ { "answer_id": 252770, "author": "Jerub", "author_id": 14648, "author_profile": "https://Stackoverflow.com/users/14648", "pm_score": 5, "selected": false, "text": "cat -n cat -n :%!cat -n\n :!cat -n\n :'<,'>!cat -n\n control-v x" }, { "answer_id": 252774, "author": "VonC",...
2008/10/31
[ "https://Stackoverflow.com/questions/252766", "https://Stackoverflow.com", "https://Stackoverflow.com/users/31641/" ]
252,780
<p>I have seen many programs consisting of structures like the one below</p> <pre><code>typedef struct { int i; char k; } elem; elem user; </code></pre> <p>Why is it needed so often? Any specific reason or applicable area?</p>
[ { "answer_id": 252783, "author": "Greg Hewgill", "author_id": 893, "author_profile": "https://Stackoverflow.com/users/893", "pm_score": 6, "selected": false, "text": "typedef struct struct elem\n{\n int i;\n char k;\n};\nelem user; // compile error!\nstruct elem user; // this is correct\...
2008/10/31
[ "https://Stackoverflow.com/questions/252780", "https://Stackoverflow.com", "https://Stackoverflow.com/users/31116/" ]
252,782
<p>What is the purpose of the <code>strdup()</code> function in C?</p>
[ { "answer_id": 252786, "author": "VonC", "author_id": 6309, "author_profile": "https://Stackoverflow.com/users/6309", "pm_score": 4, "selected": false, "text": "strdup() s1 free()" }, { "answer_id": 252802, "author": "paxdiablo", "author_id": 14860, "author_profile": ...
2008/10/31
[ "https://Stackoverflow.com/questions/252782", "https://Stackoverflow.com", "https://Stackoverflow.com/users/31116/" ]
252,785
<p>What is the difference between <code>IQueryable&lt;T&gt;</code> and <code>IEnumerable&lt;T&gt;</code>?</p> <hr> <p>See also <a href="https://stackoverflow.com/questions/2433306/whats-the-difference-between-iqueryable-and-ienumerable?rq=1">What's the difference between IQueryable and IEnumerable</a> that overlaps w...
[ { "answer_id": 252789, "author": "VonC", "author_id": 6309, "author_profile": "https://Stackoverflow.com/users/6309", "pm_score": 8, "selected": false, "text": "IQueryable<T> Expression IEnumerable<T> IQueryable<T> IEnumerable<T> IQueryable<T> IEnumerable<T> IQueryable<T> IEnumerable IQu...
2008/10/31
[ "https://Stackoverflow.com/questions/252785", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
252,800
<p>I have the need to display a nested set structure in HTML. I am doing it with the following partial:</p> <pre><code>&lt;ul&lt;%= ' id="tree"' if depth == 0 %&gt;&gt; &lt;% items.each do |item| %&gt; &lt;li id="node_&lt;%= item.id %&gt;"&gt;&lt;a&gt;&lt;%= item.name %&gt;&lt;/a&gt; &lt;% if item.has_children? %&...
[ { "answer_id": 252829, "author": "Jarek", "author_id": 33013, "author_profile": "https://Stackoverflow.com/users/33013", "pm_score": 2, "selected": false, "text": "def render_node(node)\n res = \"<ul>\"\n ...\n node.items.each {|n| res << render_node(n)}\n ...\n res << \"</ul>\"\n ...
2008/10/31
[ "https://Stackoverflow.com/questions/252800", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17453/" ]
252,811
<p>Does anyone know of a simple method for solving this?</p> <p>I have a table which consists of start times for events and the associated durations. I need to be able to split the event durations into thirty minute intervals. So for example if an event starts at 10:45:00 and the duration is 00:17:00 then the returned...
[ { "answer_id": 252854, "author": "Ady", "author_id": 31395, "author_profile": "https://Stackoverflow.com/users/31395", "pm_score": 2, "selected": false, "text": "create table #interval_lookup (\n from_date datetime,\n to_date datetime\n)\n\ndeclare @time datetime\nset @time = '00:00:00...
2008/10/31
[ "https://Stackoverflow.com/questions/252811", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
252,817
<p>Just out of curiosity:</p> <p>I know I can tell the compiler if I want a value to be interpreted as a certain numeric type, e.g. as Integer (32 bit signed), this way appending an "I" (type character) to the constant value:</p> <pre><code>Private Function GetTheAnswerAsInteger() As Integer Return 42I End Funct...
[ { "answer_id": 20710408, "author": "Yuriy Galanter", "author_id": 961695, "author_profile": "https://Stackoverflow.com/users/961695", "pm_score": 3, "selected": false, "text": "Imports System.Runtime.CompilerServices\n\nModule IntegerExtensions\n\n <Extension()> _\n Public Function...
2008/10/31
[ "https://Stackoverflow.com/questions/252817", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6461/" ]
252,820
<p>Is it possible to have something like a <code>JTextArea</code> which will color some keywords based on some mappings I have ?</p>
[ { "answer_id": 252833, "author": "VonC", "author_id": 6309, "author_profile": "https://Stackoverflow.com/users/6309", "pm_score": 3, "selected": true, "text": "JTextArea SyntaxHighlighter JTextPane" } ]
2008/10/31
[ "https://Stackoverflow.com/questions/252820", "https://Stackoverflow.com", "https://Stackoverflow.com/users/31610/" ]
252,848
<p>I tried this step:</p> <p>Select the menu options "Project > New Build Phase > New Run Script Build Phase", and enter the following script (don't forget to replace /Users/youruser/bin by the correct path to gen_entitlements.py) :</p> <pre><code>export CODESIGN_ALLOCATE=/Developer/Platforms/iPhoneOS.platform/Develo...
[ { "answer_id": 48738485, "author": "Lance Samaria", "author_id": 4833705, "author_profile": "https://Stackoverflow.com/users/4833705", "pm_score": 1, "selected": false, "text": "Build Phases Run Script X X Delete" } ]
2008/10/31
[ "https://Stackoverflow.com/questions/252848", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16066/" ]
252,856
<pre><code>div#thing { position: absolute; top: 0px; z-index: 2; margin: 0 auto; } &lt;div id="thing"&gt; &lt;p&gt;text text text with no fixed size, variable font&lt;/p&gt; &lt;/div&gt; </code></pre> <p>The div is at the top, but I can't center it with <code>&lt;center&gt;</code> or <code>margin: 0 auto</...
[ { "answer_id": 252872, "author": "JacobE", "author_id": 30056, "author_profile": "https://Stackoverflow.com/users/30056", "pm_score": 8, "selected": true, "text": "div div#thing {\n position: absolute;\n top: 0px;\n z-index: 2;\n width:400px;\n margin-left:-200px;\n lef...
2008/10/31
[ "https://Stackoverflow.com/questions/252856", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21559/" ]
252,865
<p>"We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil." (Donald Knuth). My SQL tables are unlikely to contain more than a few thousand rows each (and those are the big ones!). SQL Server Database Engine Tuning Advisor dismisses the amount of data as irr...
[ { "answer_id": 252952, "author": "Timothy Khouri", "author_id": 11917, "author_profile": "https://Stackoverflow.com/users/11917", "pm_score": 3, "selected": false, "text": "SELECT * FROM MySmallTable <-- No worries... Index won't help\n\nSELECT\n *\nFROM\n MyBigTable INNER JOIN MyS...
2008/10/31
[ "https://Stackoverflow.com/questions/252865", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15354/" ]
252,882
<p>There are a couple of questions similar to this on stack overflow but not quite the same.</p> <p>I want to open, or create, a local group on a win xp computer and add members to it, domain, local and well known accounts. I also want to check whether a user is already a member so that I don't add the same account t...
[ { "answer_id": 252890, "author": "Tim Robinson", "author_id": 32133, "author_profile": "https://Stackoverflow.com/users/32133", "pm_score": 1, "selected": false, "text": "\"member\" DirectoryEntry" }, { "answer_id": 252892, "author": "splattne", "author_id": 6461, "au...
2008/10/31
[ "https://Stackoverflow.com/questions/252882", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21429/" ]
252,891
<p>Am I allowed to place <code>&lt;noscript&gt;</code> in the <code>&lt;head&gt;</code>?</p>
[ { "answer_id": 8595670, "author": "Kevin C.", "author_id": 193494, "author_profile": "https://Stackoverflow.com/users/193494", "pm_score": 4, "selected": false, "text": "<head> <link>" }, { "answer_id": 58421249, "author": "Luke", "author_id": 1716905, "author_profile...
2008/10/31
[ "https://Stackoverflow.com/questions/252891", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21559/" ]
252,893
<p>How do you change the CLASSPATH of a Java process from within the Java process?</p> <hr> <p>Before you ask me "Why would you want to do that?" I'll explain it shortly. </p> <blockquote> <p>When you have a Clojure REPL running it is common to need more jars in your CLASSPATH to load a <a href="http://clojure.org...
[ { "answer_id": 252967, "author": "VonC", "author_id": 6309, "author_profile": "https://Stackoverflow.com/users/6309", "pm_score": 7, "selected": true, "text": "java.lang.ClassLoader java.net.URLClassLoader URLClassLoader (URLClassLoader) getClass().getClassLoader() (URLClassLoader) Class...
2008/10/31
[ "https://Stackoverflow.com/questions/252893", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6068/" ]
252,897
<p>I am developing an application that needs to use regini (because of legacy reasons) to insert something into the registry. I have been trying to do this in such a way the the user of the application is not aware of this. I have written the following code:</p> <pre><code>System.Diagnostics.ProcessStartInfo pi = new ...
[ { "answer_id": 253098, "author": "splattne", "author_id": 6461, "author_profile": "https://Stackoverflow.com/users/6461", "pm_score": 3, "selected": true, "text": "pi.CreateNoWindow = true;\n" } ]
2008/10/31
[ "https://Stackoverflow.com/questions/252897", "https://Stackoverflow.com", "https://Stackoverflow.com/users/32522/" ]
252,906
<p>Anyone got an idea how to get from an Xserver the list of all open windows?</p>
[ { "answer_id": 252911, "author": "Alnitak", "author_id": 6782, "author_profile": "https://Stackoverflow.com/users/6782", "pm_score": 8, "selected": true, "text": "xwininfo -tree -root\n XQueryTree Xlib" }, { "answer_id": 1017932, "author": "Marten", "author_id": 125739, ...
2008/10/31
[ "https://Stackoverflow.com/questions/252906", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4172/" ]
252,907
<p>I have two PHP scripts, both using the same session by calling <code>session_name('MySessID')</code>.</p> <p>When the first script calls the second script using curl, the second script hangs when <code>session_start()</code> is called.</p> <p>Why would this happend?</p>
[ { "answer_id": 252958, "author": "Jrgns", "author_id": 6681, "author_profile": "https://Stackoverflow.com/users/6681", "pm_score": 4, "selected": true, "text": "session_commit" }, { "answer_id": 470333, "author": "Tom", "author_id": 42754, "author_profile": "https://S...
2008/10/31
[ "https://Stackoverflow.com/questions/252907", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6681/" ]
252,915
<p>How to send array in Httpservice in Adobe Flex3</p>
[ { "answer_id": 435524, "author": "bartv", "author_id": 51371, "author_profile": "https://Stackoverflow.com/users/51371", "pm_score": 3, "selected": false, "text": "var service:HTTPService = new HTTPService();\nservice.useProxy = true;\nservice.destination = \"myservicet\";\nservice.resul...
2008/10/31
[ "https://Stackoverflow.com/questions/252915", "https://Stackoverflow.com", "https://Stackoverflow.com/users/33016/" ]
252,917
<p>I feel that using GetEnumerator() and casting IEnumerator.Current is expensive. Any better suggestions?<br/><br/> I'm open to using a different data structure if it offers similiar capabilities with better performance.</p> <p><strong>After thought:</strong><br/> Would a generic stack be a better idea so that the ca...
[ { "answer_id": 252944, "author": "Timothy Khouri", "author_id": 11917, "author_profile": "https://Stackoverflow.com/users/11917", "pm_score": 3, "selected": false, "text": "Stack<MyClass> stacky = new Stack<MyClass>();\n\nforeach (MyClass item in stacky)\n{\n // this is as fast as you...
2008/10/31
[ "https://Stackoverflow.com/questions/252917", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17540/" ]
252,921
<p>Magento shopping cart is built on the Zend Framework in PHP. This is the first time I've dealt with the Zend framework and I'm having the following difficulty...</p> <p>I'm creating a custom module that will allow users to upload images whenever they purchase products. </p> <p>I can overload the addAction() method...
[ { "answer_id": 258573, "author": "Simon", "author_id": 33036, "author_profile": "https://Stackoverflow.com/users/33036", "pm_score": 2, "selected": false, "text": " <?PHP\nrequire_once 'Mage/Checkout/controllers/CartController.php';\nclass Company_SpecialCheckout_Checkout_CartControll...
2008/10/31
[ "https://Stackoverflow.com/questions/252921", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17492/" ]
252,924
<p>This is a simple one. I want to replace a sub-string with another sub-string on client-side using Javascript.</p> <p>Original string is <code>'original READ ONLY'</code></p> <p>I want to replace the <code>'READ ONLY'</code> with <code>'READ WRITE'</code></p> <p>Any quick answer please? Possibly with a javascript ...
[ { "answer_id": 252928, "author": "Vinko Vrsalovic", "author_id": 5190, "author_profile": "https://Stackoverflow.com/users/5190", "pm_score": 4, "selected": false, "text": "<script type=\"text/javascript\">\n\nvar str1=\"Visit Microsoft!\";\nvar str2 = str1.replace(/microsoft/i, \"W3Schoo...
2008/10/31
[ "https://Stackoverflow.com/questions/252924", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13370/" ]
252,945
<p>I am creating a plugin for Eclipse 3.4. I created a plug-in development project using the application with a view. Now I am trying to create a <code>TextViewer</code> the documentation says that it is located in <code>org.eclipse.jface.text.TextViewer</code>. But, this whole package is missing and eclipse cannot ...
[ { "answer_id": 253132, "author": "McDowell", "author_id": 304, "author_profile": "https://Stackoverflow.com/users/304", "pm_score": 3, "selected": false, "text": "Require-Bundle: org.eclipse.ui,\n org.eclipse.core.runtime,\n org.eclipse.jface.text\n" } ]
2008/10/31
[ "https://Stackoverflow.com/questions/252945", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5004/" ]
252,955
<p>Is there a way to "stream" a set of results (eg. a DataTable) from a BackgroundWorker to a DataGridView. What I want to do is to query data, and fill the results in a DataGridView <strong>as they come</strong> (like query grid results in SQL Server Management Studio). My first thought was to use a BackgroundWorker (...
[ { "answer_id": 257554, "author": "Timothy Khouri", "author_id": 11917, "author_profile": "https://Stackoverflow.com/users/11917", "pm_score": 1, "selected": false, "text": "myDataGridView.Rows[rowNumber].SetValues(valuesFromNewPage);\n" }, { "answer_id": 426226, "author": "Co...
2008/10/31
[ "https://Stackoverflow.com/questions/252955", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18731/" ]
252,957
<p>I know we can do like mget *.xml which will download all xml files. But how is it possible that we using mget with certain file name patterns. can we do something like *SS.xml which mean it will download all files ending with SS.xml?</p>
[ { "answer_id": 252960, "author": "Alnitak", "author_id": 6782, "author_profile": "https://Stackoverflow.com/users/6782", "pm_score": 1, "selected": false, "text": "mget" } ]
2008/10/31
[ "https://Stackoverflow.com/questions/252957", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
252,962
<p>We have a file that has a 64 bit integer as a string in it. How do we scanf() or otherwise parse this numeric string into an unsigned 64 bit integer type in C++ ? </p> <p>We are aware of things like %lld etc., but a lot of ways to do this parse seem to break compiles under different compilers and stdlibs. The code ...
[ { "answer_id": 252965, "author": "Alnitak", "author_id": 6782, "author_profile": "https://Stackoverflow.com/users/6782", "pm_score": 1, "selected": false, "text": "scanf() strtoull()" }, { "answer_id": 252979, "author": "unwind", "author_id": 28169, "author_profile": ...
2008/10/31
[ "https://Stackoverflow.com/questions/252962", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19734/" ]
252,963
<p>How can I use Hyperlink button in gridview. I mean when I run my program,all data is displayed in gridview,but I want hyperlink in gridview, so that when I will click in hyperlink it will show the select path which is in gridview : if there is pdf file path and I just click on this hyper link then I can see the pdf ...
[ { "answer_id": 252984, "author": "Eoin Campbell", "author_id": 30155, "author_profile": "https://Stackoverflow.com/users/30155", "pm_score": 1, "selected": false, "text": "<asp:TemplateField HeaderText=\"Link\" SortExpression=\"PdfUrl\">\n <itemtemplate>\n <asp:HyperLink runat=...
2008/10/31
[ "https://Stackoverflow.com/questions/252963", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
252,972
<p>Please forgive my long question. I have an idea for a design that I could use some comments on. Is it a good idea to do this? And what are the pit falls I should be aware of? Are there other similar implementations that are better?</p> <p><strong>My situation is as follows:</strong><br> I am working on a rewrite of...
[ { "answer_id": 253024, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 2, "selected": true, "text": "def change103(...):\n \"Create new table.\"\ndef change104(...):\n \"\"\"Transfer data from old table to new table and ma...
2008/10/31
[ "https://Stackoverflow.com/questions/252972", "https://Stackoverflow.com", "https://Stackoverflow.com/users/30366/" ]
252,974
<p>I would like to hear some opinions about using the isolated storage in Silverlight for storing sensitive data. For example, is it OK to store an authentication token (some GUID that identifies a server-side session) in this storage, or is it better to use cookies?</p> <p>The isolated storage gives an advantage over...
[ { "answer_id": 253024, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 2, "selected": true, "text": "def change103(...):\n \"Create new table.\"\ndef change104(...):\n \"\"\"Transfer data from old table to new table and ma...
2008/10/31
[ "https://Stackoverflow.com/questions/252974", "https://Stackoverflow.com", "https://Stackoverflow.com/users/30056/" ]
252,976
<p>How can I create a query for a full outer join across a M2M relationchip using the django QuerySet API?</p> <p>It that is not supported, some hint about creating my own manager to do this would be welcome.</p> <p><strong>Edited to add:</strong> @S.Lott: Thanks for the enlightenment. The need for the OUTER JOIN co...
[ { "answer_id": 253057, "author": "S.Lott", "author_id": 10661, "author_profile": "https://Stackoverflow.com/users/10661", "pm_score": 5, "selected": true, "text": "for obj in Model1.objects.all():\n if obj.model2_set().count() == 0:\n # process (obj, None) -- no Model2 associat...
2008/10/31
[ "https://Stackoverflow.com/questions/252976", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11527/" ]
252,988
<p>How to get all the database names and corresponding table names together ?</p>
[ { "answer_id": 253003, "author": "Hapkido", "author_id": 27646, "author_profile": "https://Stackoverflow.com/users/27646", "pm_score": 0, "selected": false, "text": "SELECT Name FROM master.sys.databases\n SELECT %DatabaseName%, Name FROM %DatabaseName%.SysObjects WHERE type = 'U'\n CREA...
2008/10/31
[ "https://Stackoverflow.com/questions/252988", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
253,013
<p>We use a simple object model for our low level networking code at work where struct pointers are passed around to functions which are pretending to be methods. I've inherited most of this code which was written by consultants with passable C/C++ experience at best and I've spent many late nights trying to refactor c...
[ { "answer_id": 253119, "author": "qrdl", "author_id": 28494, "author_profile": "https://Stackoverflow.com/users/28494", "pm_score": 0, "selected": false, "text": "struct Foo_s this" }, { "answer_id": 253265, "author": "Ilya", "author_id": 6807, "author_profile": "http...
2008/10/31
[ "https://Stackoverflow.com/questions/253013", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22247/" ]
253,026
<p>I used a class which derives from <code>CListBox</code>, and create it with following:</p> <pre><code>style:WS_CHILD|WS_VISIBLE |LBS_OWNERDRAWFIXED | WS_VSCROLL | WS_HSCROLL </code></pre> <p>I expect the ListBox's item to be have a fixed size, not affected by the size of the list box. So I override the MeasureItem...
[ { "answer_id": 253201, "author": "Stu Mackellar", "author_id": 28591, "author_profile": "https://Stackoverflow.com/users/28591", "pm_score": 0, "selected": false, "text": "MSDN CListBox::MeasureItem LBS_OWNERDRAWVARIABLE LBS_OWNERDRAWFIXED MeasureItem" }, { "answer_id": 1125905, ...
2008/10/31
[ "https://Stackoverflow.com/questions/253026", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26404/" ]
253,030
<p>If you want to some code to execute based on two or more conditions which is the best way to format that if statement ?</p> <p>first example:-</p> <pre><code>if(ConditionOne &amp;&amp; ConditionTwo &amp;&amp; ConditionThree) { Code to execute } </code></pre> <p>Second example:-</p> <pre><code>if(ConditionOne)...
[ { "answer_id": 253047, "author": "Torbjørn", "author_id": 22621, "author_profile": "https://Stackoverflow.com/users/22621", "pm_score": 5, "selected": false, "text": "if(MyChecksAreOk()) { Code to execute }\n\n...\n\nprivate bool MyChecksAreOk()\n{ \n return ConditionOne && ConditionT...
2008/10/31
[ "https://Stackoverflow.com/questions/253030", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
253,036
<p>I have WPF ListBox which is bound to a ObservableCollection, when the collection changes, all items update their position.</p> <p>The new position is stored in the collection but the UI does not update. So I added the following:</p> <pre><code> void scenarioItems_CollectionChanged(object sender, System.Collecti...
[ { "answer_id": 253298, "author": "Gishu", "author_id": 1695, "author_profile": "https://Stackoverflow.com/users/1695", "pm_score": 7, "selected": true, "text": "List<MyCustomType>() void On_MyObjProperty_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)\n{\...
2008/10/31
[ "https://Stackoverflow.com/questions/253036", "https://Stackoverflow.com", "https://Stackoverflow.com/users/28149/" ]
253,038
<p>I'm having a bit of a problem. I have a datatable in the parent form. I open a dialogbox form that gets the datatable property and creates a checkboxlist. This will be used to export those columns. But when I run the application the parentform property is null. I've tried setting it in the parent and dialogbox form ...
[ { "answer_id": 253298, "author": "Gishu", "author_id": 1695, "author_profile": "https://Stackoverflow.com/users/1695", "pm_score": 7, "selected": true, "text": "List<MyCustomType>() void On_MyObjProperty_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)\n{\...
2008/10/31
[ "https://Stackoverflow.com/questions/253038", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5906/" ]
253,051
<p>I've been teaching myself Objective-C over the past month or so (I'm a Java head) and I've got my brain wrapped around most of it now. One thing that's confusing me at the moment: What's the difference between importing a class via @class vs doing a #import? </p> <p>Is one better than another one, or do I need to u...
[ { "answer_id": 253154, "author": "Ben Gottlieb", "author_id": 6694, "author_profile": "https://Stackoverflow.com/users/6694", "pm_score": 7, "selected": true, "text": "#import #import #import #import #import @class Object1; @class Object2; #import" }, { "answer_id": 253550, "...
2008/10/31
[ "https://Stackoverflow.com/questions/253051", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6044/" ]
253,055
<p>When I've worked a bit with my source code, I did my usual thing commit and then I pushed to a remote repository. But then I noticed I forgot to organize my imports in the source code. So I do the amend command to replace the previous commit:</p> <pre><code>&gt; git commit --amend </code></pre> <p>Unfortunately th...
[ { "answer_id": 253726, "author": "mipadi", "author_id": 28804, "author_profile": "https://Stackoverflow.com/users/28804", "pm_score": 7, "selected": false, "text": "git commit --amend git rebase $ git push origin +master:master\n +" }, { "answer_id": 255080, "author": "CB Bai...
2008/10/31
[ "https://Stackoverflow.com/questions/253055", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3713/" ]
253,058
<p>Today I happens to find that one C# class can inherit one interface both in implicit and explicit way. This surprises me. If C# works in this way, then one instance can behave differently when referenced in different way.</p> <pre><code>interface IFoo { void DoSomething(); } class Foo : IFoo { #region IFoo...
[ { "answer_id": 253079, "author": "François", "author_id": 32379, "author_profile": "https://Stackoverflow.com/users/32379", "pm_score": 2, "selected": false, "text": " interface IMoveable\n {\n public void Act();\n }\n\n interface IRollable\n {\n public void Act();\n }\n\n c...
2008/10/31
[ "https://Stackoverflow.com/questions/253058", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26349/" ]
253,063
<p>Any ideas on how to disable, but not uninstall Resharper 4.x or above?</p>
[ { "answer_id": 344447, "author": "mackenir", "author_id": 25457, "author_profile": "https://Stackoverflow.com/users/25457", "pm_score": 3, "selected": false, "text": "C:\\Program\n Files\\JetBrains\\ReSharper\\v4.0\\Bin\\Product.VisualStudio.80.AddIn C:\\Program\n Files\\JetBrains\\ReS...
2008/10/31
[ "https://Stackoverflow.com/questions/253063", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3834/" ]
253,064
<p>Are there any libraries out there (preferably a self contained Text Edit Control) for .NET that have Spell Check capabilities. I would like to add the typical red underline to miss-spelled words in the edit area of my application.</p> <p>Edit: To clarify, this is for WinForms</p>
[ { "answer_id": 26321325, "author": "Steve", "author_id": 3396597, "author_profile": "https://Stackoverflow.com/users/3396597", "pm_score": 2, "selected": false, "text": "using System;\nusing System.ComponentModel;\nusing System.Windows;\nusing System.Windows.Controls;\nusing System.Windo...
2008/10/31
[ "https://Stackoverflow.com/questions/253064", "https://Stackoverflow.com", "https://Stackoverflow.com/users/194/" ]
253,066
<p>How do you debug <a href="http://java.sun.com/javase/6/docs/api/java/lang/ClassLoader.html#getResource(java.lang.String)" rel="noreferrer">getResource</a>-style methods that are failing, returning null?</p> <p>I am sure the file it's looking for is there, but it's returning NULL. How do I know what it is looking fo...
[ { "answer_id": 253448, "author": "matt b", "author_id": 4249, "author_profile": "https://Stackoverflow.com/users/4249", "pm_score": 4, "selected": false, "text": "getResource() getResource() log.debug(\"classpath is: \" + System.getProperty(\"java.class.path\"));\n\n//the line that is re...
2008/10/31
[ "https://Stackoverflow.com/questions/253066", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6068/" ]
253,075
<p>Is there a csh script/command to list all the files in source source tree which have line endings that show up as "^M" in emacs (under linux).</p> <p>Thanks!</p>
[ { "answer_id": 253084, "author": "C. K. Young", "author_id": 13, "author_profile": "https://Stackoverflow.com/users/13", "pm_score": 0, "selected": false, "text": "find . -type f -exec grep $'\\r' {} +\n $'\\r'" }, { "answer_id": 253111, "author": "Rob Wells", "author_id"...
2008/10/31
[ "https://Stackoverflow.com/questions/253075", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5775/" ]