qid int64 4 19.1M | question stringlengths 18 48.3k | answers list | date stringlengths 10 10 | metadata list |
|---|---|---|---|---|
231,893 | <p>I have seen this syntax in MSDN: <a href="https://msdn.microsoft.com/en-us/library/9k7k7cf0.aspx" rel="noreferrer"><code>yield break</code></a>, but I don't know what it does. Does anyone know?</p>
| [
{
"answer_id": 231915,
"author": "Trap",
"author_id": 7839,
"author_profile": "https://Stackoverflow.com/users/7839",
"pm_score": 5,
"selected": false,
"text": "public interface INode\n{\n IEnumerable<Node> GetChildren();\n}\n\npublic class NodeWithTenChildren : INode\n{\n private ... | 2008/10/23 | [
"https://Stackoverflow.com/questions/231893",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14101/"
] |
231,912 | <p>I was about to add an extra signal handler to an app we have here and I noticed that the author had used <code>sigaction()</code> to set up the other signal handlers. I was going to use <code>signal()</code>. To follow convention I should use <code>sigaction()</code> but if I was writing from scratch, which should I... | [
{
"answer_id": 231933,
"author": "dmckee --- ex-moderator kitten",
"author_id": 2509,
"author_profile": "https://Stackoverflow.com/users/2509",
"pm_score": 2,
"selected": false,
"text": "signal(3) This signal() facility is a simplified interface to the more\n general sigaction(2) facili... | 2008/10/23 | [
"https://Stackoverflow.com/questions/231912",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20889/"
] |
231,917 | <p>This originally was a problem I ran into at work, but is now something I'm just trying to solve for my own curiosity.</p>
<p>I want to find out if int 'a' contains the int 'b' in the most efficient way possible. I wrote some code, but it seems no matter what I write, parsing it into a string and then using indexOf... | [
{
"answer_id": 231936,
"author": "FlySwat",
"author_id": 1965,
"author_profile": "https://Stackoverflow.com/users/1965",
"pm_score": 0,
"selected": false,
"text": "// Check if A is inside B lol\nbool Contains (int a, int b)\n{\n return (a <= b);\n}\n"
},
{
"answer_id": 231950,... | 2008/10/23 | [
"https://Stackoverflow.com/questions/231917",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14007/"
] |
231,937 | <p>I am trying to show and hide an inline element (eg a span) using jQuery.</p>
<p>If I just use toggle(), it works as expected but if I use toggle("slow") to give it an animation, it turns the span into a block element and therefore inserts breaks.</p>
<p>Is animation possible with inline elements? I would prefer a... | [
{
"answer_id": 232005,
"author": "nickf",
"author_id": 9021,
"author_profile": "https://Stackoverflow.com/users/9021",
"pm_score": 1,
"selected": false,
"text": "$('.toggle').click(function() {\n $('.hide:visible').animate(\n {opacity : 0},\n function() { $(this).hide();... | 2008/10/23 | [
"https://Stackoverflow.com/questions/231937",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/31012/"
] |
231,947 | <p>I have a project that is based on the Navigation Based Application template.
In the AppDelegate are the methods <code>-applicationDidFinishLoading:</code> and <code>-applicationWillTerminate:</code>. In those methods, I am loading and saving the application data, and storing it in an instance variable (it is actual... | [
{
"answer_id": 232016,
"author": "Ben Gottlieb",
"author_id": 6694,
"author_profile": "https://Stackoverflow.com/users/6694",
"pm_score": 4,
"selected": false,
"text": "UIWindow *mainWindow = [[[UIApplication sharedApplication] delegate] window];\n//do something with mainWindow\n"
},... | 2008/10/23 | [
"https://Stackoverflow.com/questions/231947",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
232,004 | <p>For the moment the best way that I have found to be able to manipulate DOM from a string that contain HTML is:</p>
<pre><code>WebBrowser webControl = new WebBrowser();
webControl.DocumentText = html;
HtmlDocument doc = webControl.Document;
</code></pre>
<p>There are two problems:</p>
<ol>
<li>Requires the <code>W... | [
{
"answer_id": 232021,
"author": "Jason Bunting",
"author_id": 1790,
"author_profile": "https://Stackoverflow.com/users/1790",
"pm_score": 3,
"selected": false,
"text": "XmlDocument System.Xml.XmlDocument x = new System.Xml.XmlDocument();\nx.LoadXml(html); // as long as html is well-form... | 2008/10/23 | [
"https://Stackoverflow.com/questions/232004",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13913/"
] |
232,008 | <p>I've been exploring the details of Django for about a week now and like what I see. However I've come upon some.. negativity in relation to fine-grained control of permissions to the CRUD interface.</p>
<p>What I'm writing is an Intranet client management web-app. The organisation is about 6 tiers, and I need to re... | [
{
"answer_id": 232051,
"author": "Jonny Buchanan",
"author_id": 6760,
"author_profile": "https://Stackoverflow.com/users/6760",
"pm_score": 2,
"selected": false,
"text": "has_add_permission has_change_permission has_delete_permission queryset admin admin admin admin admin"
}
] | 2008/10/23 | [
"https://Stackoverflow.com/questions/232008",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10583/"
] |
232,020 | <p>I am working on a project that I need to use the Infragistics WebGrid control for some lists of data. I am loading the data on the client-side using JavaScript for display on a Map, and then I need to display that same data within multiple WebGrids. All the data available will be displayed in the WebGrids, but only ... | [
{
"answer_id": 444340,
"author": "Tj Kellie",
"author_id": 54055,
"author_profile": "https://Stackoverflow.com/users/54055",
"pm_score": 2,
"selected": false,
"text": "var grid = igtbl_getGridById('dataGridControlID');\n var newRow = grid.Rows.addNew()\n var oCols = newRow.Band.Columns;\... | 2008/10/23 | [
"https://Stackoverflow.com/questions/232020",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7831/"
] |
232,030 | <p>I want a pure virtual parent class to call a child implementation of a function like so:</p>
<pre><code>class parent
{
public:
void Read() { //read stuff }
virtual void Process() = 0;
parent()
{
Read();
Process();
}
}
class child : public parent
{
public:
virtual void Pr... | [
{
"answer_id": 232042,
"author": "Adam Pierce",
"author_id": 5324,
"author_profile": "https://Stackoverflow.com/users/5324",
"pm_score": 2,
"selected": false,
"text": "class parent\n{\n public:\n void Read() { //read stuff }\n virtual void Process() { }\n parent() \n {\n ... | 2008/10/23 | [
"https://Stackoverflow.com/questions/232030",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/23829/"
] |
232,052 | <p>I have an MSBuild task to build a specific project in a solution file. It looks something like this:</p>
<pre><code><Target Name="Baz">
<MSBuild Projects="Foo.sln" Targets="bar:$(BuildCmd)" />
</Target>
</code></pre>
<p>From the command line, I can set my <code>BuildCmd</code> to either <code>R... | [
{
"answer_id": 233738,
"author": "CheGueVerra",
"author_id": 17787,
"author_profile": "https://Stackoverflow.com/users/17787",
"pm_score": 6,
"selected": true,
"text": "<PropertyGroup>\n <BuildCmd Condition=\" '$(BuildCmd)' == ''\">Build</BuildCmd>\n</PropertyGroup>\n <Target Name=\"Sta... | 2008/10/24 | [
"https://Stackoverflow.com/questions/232052",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
232,053 | <p>I'm writing javascript code that is read in as a string and executed via eval() by a firefox extension. Firebug does "see" my script so I am not able to use breakpoints, see objects, etc. </p>
<p>I am currently using Firefox's error console which I'm starting to find limiting. What are my other options? Ideally, I ... | [
{
"answer_id": 232206,
"author": "Christian C. Salvadó",
"author_id": 5445,
"author_profile": "https://Stackoverflow.com/users/5445",
"pm_score": 1,
"selected": false,
"text": "eval()"
},
{
"answer_id": 3483247,
"author": "knoopx",
"author_id": 62368,
"author_profile"... | 2008/10/24 | [
"https://Stackoverflow.com/questions/232053",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1227001/"
] |
232,075 | <p>In C and C++ a variable can be marked as <a href="http://en.wikipedia.org/wiki/Volatile_variable" rel="noreferrer"><strong>volatile</strong></a>, which means the compiler will not optimize it because it may be modified external to the declaring object. Is there an equivalent in Delphi programming? If not a keyword... | [
{
"answer_id": 232675,
"author": "Thomas Mueller",
"author_id": 21506,
"author_profile": "https://Stackoverflow.com/users/21506",
"pm_score": 0,
"selected": false,
"text": "var\n MyVarPtr: ^integer;\nbegin\n New(MyVarPtr);\n MyVarPtr^ := 5;\n...\n"
},
{
"answer_id": 37145389,
... | 2008/10/24 | [
"https://Stackoverflow.com/questions/232075",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/255/"
] |
232,078 | <p>I have three projects. One is a WCF Services Project, one is a WPF Project, and one is a Microsoft Unit Testing Project. I setup the WCF Services project with a data object that looks like this:</p>
<pre><code>[DataContract]
public enum Priority
{
Low,
Medium,
High
}
[DataContract]
public struct Time... | [
{
"answer_id": 234584,
"author": "Adron",
"author_id": 29345,
"author_profile": "https://Stackoverflow.com/users/29345",
"pm_score": 5,
"selected": true,
"text": "[DataContract]\npublic enum Priority\n{\n [EnumMember]\n Low,\n [EnumMember]\n Medium,\n [EnumMember]\n Hig... | 2008/10/24 | [
"https://Stackoverflow.com/questions/232078",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/29345/"
] |
232,083 | <p>Is there a way to know which file is being selected in windows explorer? I've been looking at the tutorial posted here <a href="https://stackoverflow.com/questions/140312/tutorial-for-windows-shell-extensions">Idiots guide to ...</a> but the actions described are:</p>
<p>hover</p>
<p>context </p>
<p>menu properti... | [
{
"answer_id": 234584,
"author": "Adron",
"author_id": 29345,
"author_profile": "https://Stackoverflow.com/users/29345",
"pm_score": 5,
"selected": true,
"text": "[DataContract]\npublic enum Priority\n{\n [EnumMember]\n Low,\n [EnumMember]\n Medium,\n [EnumMember]\n Hig... | 2008/10/24 | [
"https://Stackoverflow.com/questions/232083",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20654/"
] |
232,140 | <p>My <sub>crappy</sub> web host did some upgrades the other day and some settings have gone awry, because looking at our company's wiki (MediaWiki), every quote is being escaped with a backslashes. It's not even just data which is being posted (i.e.: the articles) which are affected, but also the standard MediaWiki te... | [
{
"answer_id": 232242,
"author": "Owen",
"author_id": 4853,
"author_profile": "https://Stackoverflow.com/users/4853",
"pm_score": 1,
"selected": false,
"text": "magic_quotes_gpc() if (ini_get('magic_quotes_gpc') ) {\n foreach($_GET as $key=>$value) {\n $_GET[$key] = stripslashes($val... | 2008/10/24 | [
"https://Stackoverflow.com/questions/232140",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9021/"
] |
232,141 | <p>I’m listening to the Hanselminutes Podcast; "StackOverflow uses ASP.NET MVC - Jeff Atwood and his technical team". During the course of the Podcast they are speaking about SQL server and say something along the lines of 'The days of the Stored Procedure are over'. </p>
<p>Now I'm not a DBA but this has taken me a b... | [
{
"answer_id": 232210,
"author": "mjallday",
"author_id": 6084,
"author_profile": "https://Stackoverflow.com/users/6084",
"pm_score": 1,
"selected": false,
"text": "select a from b where x = y\n"
}
] | 2008/10/24 | [
"https://Stackoverflow.com/questions/232141",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/26300/"
] |
232,144 | <p>I have a volunteers_2009 table that lists all the volunteers and a venues table that lists the venues that a volunteer can be assigned to, they are only assigned to one.</p>
<p>What I want to do, is print out the number of volunteers assigned to each venue.</p>
<p>I want it to print out like this:</p>
<p>Name of ... | [
{
"answer_id": 232159,
"author": "tvanfosson",
"author_id": 12950,
"author_profile": "https://Stackoverflow.com/users/12950",
"pm_score": 3,
"selected": true,
"text": "$sql = \"SELECT ven.venue_name as 'Venue', COUNT(vol.id) as 'Number Of \nVolunteers' FROM venues ven JOIN volunteers_200... | 2008/10/24 | [
"https://Stackoverflow.com/questions/232144",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/26130/"
] |
232,161 | <p>I'm currently developing an application that is comprised of five separate executables that communicate via ActiveMQ. I have a Visual Studio Solution that contains the five executable projects. One of the projects (the launcher.exe) launches the other four projects from their local folders as separate processes. ... | [
{
"answer_id": 232176,
"author": "Charlie",
"author_id": 18529,
"author_profile": "https://Stackoverflow.com/users/18529",
"pm_score": 4,
"selected": true,
"text": "while( !IsDebuggerPresent() )\n Sleep( 500 );\n while( !System.Diagnostics.Debugger.IsAttached )\n System.Threading.T... | 2008/10/24 | [
"https://Stackoverflow.com/questions/232161",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/191808/"
] |
232,162 | <p>I have a bunch of C files that are generated by a collection of python programs that have a number of shared python modules and I need to account for this in my make system.</p>
<p>It is easy enough to enumerate which python program need to be run to generate each C file. What I can't find a good solution for is de... | [
{
"answer_id": 232233,
"author": "S.Lott",
"author_id": 10661,
"author_profile": "https://Stackoverflow.com/users/10661",
"pm_score": 1,
"selected": false,
"text": "import import x, y, z\nfrom x import a, b, c\n PYTHONPATH sites sys.path -v >>> import math\n dlopen(\"/Library/Frameworks/... | 2008/10/24 | [
"https://Stackoverflow.com/questions/232162",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10471/"
] |
232,168 | <p>I'm trying to get a file with ant, using the get property. I'm running apache 2, and I can get the file from the indicated URL using wget and firefox, but ant gives me the following error:</p>
<pre><code>[get] Error opening connection java.io.IOException:
Server returned HTTP response code: 503 for URL: http://loc... | [
{
"answer_id": 232220,
"author": "Ken Gentle",
"author_id": 8709,
"author_profile": "https://Stackoverflow.com/users/8709",
"pm_score": 3,
"selected": true,
"text": "src verbose=\"true\" usetimestamp"
},
{
"answer_id": 232299,
"author": "mhawke",
"author_id": 21945,
"... | 2008/10/24 | [
"https://Stackoverflow.com/questions/232168",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3434/"
] |
232,171 | <p>I have an IQueryable and an object of type T.</p>
<p>I want to do IQueryable().Where(o => o.GetProperty(fieldName) == objectOfTypeT.GetProperty(fieldName))</p>
<p>so ...</p>
<pre><code>public IQueryable<T> DoWork<T>(string fieldName)
where T : EntityObject
{
...
T objectOfTypeT = ...;
... | [
{
"answer_id": 232304,
"author": "JTew",
"author_id": 25372,
"author_profile": "https://Stackoverflow.com/users/25372",
"pm_score": 0,
"selected": false,
"text": "IQueryable<T>().Where(t => \nMemberExpression.Property(MemberExpression.Constant(t), fieldName) == \nParameterExpression.Prop... | 2008/10/24 | [
"https://Stackoverflow.com/questions/232171",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/25372/"
] |
232,202 | <p>I was planning to implememt owner-drawn of CListCtrl. I thought that drawing an item is after the item is inserted into the control. So my method is declare a class which is derived from CListCtrl and override its DrawItem() method. The problem is DrawItem is never invoked after inserting an item. Is there anything ... | [
{
"answer_id": 232209,
"author": "Adam Pierce",
"author_id": 5324,
"author_profile": "https://Stackoverflow.com/users/5324",
"pm_score": 0,
"selected": false,
"text": "m_myListbox.ModifyStyle(0, LBS_OWNERDRAWFIXED, 0);\n"
},
{
"answer_id": 232428,
"author": "Adam Pierce",
... | 2008/10/24 | [
"https://Stackoverflow.com/questions/232202",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/26404/"
] |
232,212 | <p>I would guess most people on this site are familiar with tail, if not - it provides a "follow" mode that as text is appended to the file tail will dump those characters out to the terminal.</p>
<p>What I am looking for (and possibly to write myself if necessary) is a version of tail that works on binary files. Basi... | [
{
"answer_id": 232218,
"author": "Adam Pierce",
"author_id": 5324,
"author_profile": "https://Stackoverflow.com/users/5324",
"pm_score": 4,
"selected": false,
"text": "tail -f somefile | hexdump -C\n"
},
{
"answer_id": 232229,
"author": "mhawke",
"author_id": 21945,
"... | 2008/10/24 | [
"https://Stackoverflow.com/questions/232212",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/243/"
] |
232,222 | <p>Are there any Platform agnostic (not CLI) movements to get LINQ going for C++ in some fashion? </p>
<p>I mean a great part of server frameworks around the world run on flavors of UNIX and having access to LINQ for C++ on UNIX would probably make lots of people happy!</p>
| [
{
"answer_id": 2308031,
"author": "Chris",
"author_id": 36269,
"author_profile": "https://Stackoverflow.com/users/36269",
"pm_score": 2,
"selected": false,
"text": "auto"
},
{
"answer_id": 9160622,
"author": "Paolo Severini",
"author_id": 980602,
"author_profile": "ht... | 2008/10/24 | [
"https://Stackoverflow.com/questions/232222",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15124/"
] |
232,237 | <p>What's the best way to return a random line in a text file using C? It has to use the standard I/O library (<code><stdio.h></code>) because it's for Nintendo DS homebrew.</p>
<p><strong>Clarifications:</strong></p>
<ul>
<li>Using a header in the file to store the number of lines won't work for what I want to... | [
{
"answer_id": 232248,
"author": "Mark Ransom",
"author_id": 5987,
"author_profile": "https://Stackoverflow.com/users/5987",
"pm_score": 6,
"selected": true,
"text": "count = 0;\nwhile (fgets(line, length, stream) != NULL)\n{\n count++;\n if ((rand() * count) / RAND_MAX == 0)\n ... | 2008/10/24 | [
"https://Stackoverflow.com/questions/232237",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/813/"
] |
232,267 | <p>I've got a complex dialog, and it is full of whitespace and I can't shrink it. In Designer, it has lots of components that then get dynamically hidden, and a few which are dynamically added. I've added dumping of size policies, size hints, and minimum sizes, but still can't figure out why Qt won't let me drag it s... | [
{
"answer_id": 5357723,
"author": "Chris",
"author_id": 113450,
"author_profile": "https://Stackoverflow.com/users/113450",
"pm_score": 0,
"selected": false,
"text": "\nQHBoxLayout* layout = new QHBoxLayout;\nQPushButton* myBtn = new QPushButton(\"Test\");\n\nlayout->insertStretch(1);\nl... | 2008/10/24 | [
"https://Stackoverflow.com/questions/232267",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19193/"
] |
232,269 | <p>Is there a way to mount a Linux directory from a different PC to your local Linux PC? How?</p>
| [
{
"answer_id": 232286,
"author": "Community",
"author_id": -1,
"author_profile": "https://Stackoverflow.com/users/-1",
"pm_score": 4,
"selected": false,
"text": "/etc/exports mount -t nfs {remote_pc_address}:/remote/dir /some/local/dir\n man"
},
{
"answer_id": 232340,
"author... | 2008/10/24 | [
"https://Stackoverflow.com/questions/232269",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/16139/"
] |
232,271 | <p>I have an undefined number of display context and each will display a texture. When I call glGenTextures I get the same name returned across all display contexts. Will this work? Even though they have the same name will they still store and display different textures? If not what should do to get around this? </p>
| [
{
"answer_id": 232331,
"author": "Menkboy",
"author_id": 29539,
"author_profile": "https://Stackoverflow.com/users/29539",
"pm_score": 2,
"selected": false,
"text": "wglShareLists share aglCreateContext"
}
] | 2008/10/24 | [
"https://Stackoverflow.com/questions/232271",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/55638/"
] |
232,274 | <p>When I browse code in Vim, I need to see opening and closing parenthesis/
brackets, and pressing <kbd>%</kbd> seems unproductive.</p>
<p>I tried <code>:set showmatch</code>, but it makes the cursor jump back and forth
when you type in a bracket. But what to do if I am browsing already written code?</p>
| [
{
"answer_id": 232278,
"author": "jcoby",
"author_id": 2884,
"author_profile": "https://Stackoverflow.com/users/2884",
"pm_score": 5,
"selected": false,
"text": "set showmatch"
},
{
"answer_id": 232289,
"author": "Harley Holcombe",
"author_id": 1057,
"author_profile":... | 2008/10/24 | [
"https://Stackoverflow.com/questions/232274",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/29405/"
] |
232,280 | <p>Im having a problem with a final part of my assignment. We get in a stream of bits, etc etc, in the stream is an integer with the number of 1's in the text portion. I get that integer and its 24 which is correct, now i loop through the text data i get and i try to count all the 1's in there. But my proc is always re... | [
{
"answer_id": 232860,
"author": "Nils Pipenbrinck",
"author_id": 15955,
"author_profile": "https://Stackoverflow.com/users/15955",
"pm_score": 1,
"selected": false,
"text": " mov cx, 8\n mov dh, byte ptr [bx+si] \n@@innerLoop:\n add dh, dh \n adc ... | 2008/10/24 | [
"https://Stackoverflow.com/questions/232280",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18431/"
] |
232,316 | <p>I'm tinkering with Silverlight 2.0.</p>
<p>I have some images, which I currently have a static URL for the image source.
Is there a way to dynamically load the image from a URL path for the site that is hosting the control?</p>
<p>Alternatively, a configuration setting, stored in a single place, that holds the bas... | [
{
"answer_id": 232414,
"author": "Aaron Fischer",
"author_id": 5618,
"author_profile": "https://Stackoverflow.com/users/5618",
"pm_score": 5,
"selected": true,
"text": " Uri uri = new Uri(\"http://testsvr.com/hello.jpg\");\n YourImage.Source = new BitmapImage(uri);\n"
},
{
"ans... | 2008/10/24 | [
"https://Stackoverflow.com/questions/232316",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/24126/"
] |
232,318 | <p>Java requires that you catch all possible exceptions or declare them as thrown in the method signature. This isn't the case with C# but I still feel that it is a good practice to catch all exceptions. Does anybody know of a tool which can process a C# project and point out places where an exception is thrown but n... | [
{
"answer_id": 232354,
"author": "Community",
"author_id": -1,
"author_profile": "https://Stackoverflow.com/users/-1",
"pm_score": 0,
"selected": false,
"text": "Application.ThreadException += new ThreadExceptionEventHandler( Application_ThreadException );\n\nprivate static void Applicat... | 2008/10/24 | [
"https://Stackoverflow.com/questions/232318",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/361/"
] |
232,333 | <p>How long should it take to run </p>
<pre><code>ALTER DATABASE [MySite] SET READ_COMMITTED_SNAPSHOT ON
</code></pre>
<p>I just ran it and it's taken 10 minutes.</p>
<p>How can I check if it is applied?</p>
| [
{
"answer_id": 232358,
"author": "Rick",
"author_id": 14138,
"author_profile": "https://Stackoverflow.com/users/14138",
"pm_score": 7,
"selected": true,
"text": "sys.databases is_read_committed_snapshot_on sp_who sp_who2"
},
{
"answer_id": 1253452,
"author": "Community",
... | 2008/10/24 | [
"https://Stackoverflow.com/questions/232333",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/16940/"
] |
232,344 | <p>I have some code which ignores a specific exception. </p>
<pre><code>try
{
foreach (FileInfo fi in di.GetFiles())
{
collection.Add(fi.Name);
}
foreach (DirectoryInfo d in di.GetDirectories())
{
populateItems(collection, d);
}
}
catch (UnauthorizedAccessException ex)
{
//i... | [
{
"answer_id": 232350,
"author": "tvanfosson",
"author_id": 12950,
"author_profile": "https://Stackoverflow.com/users/12950",
"pm_score": 5,
"selected": true,
"text": "catch (UnauthorizedAccessException) {}\n"
},
{
"answer_id": 232363,
"author": "Booji Boy",
"author_id": ... | 2008/10/24 | [
"https://Stackoverflow.com/questions/232344",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/361/"
] |
232,347 | <p>Many programs include an auto-updater, where the program occasionally looks online for updates, and then downloads and applies any updates that are found. Program bugs are fixed, supporting files are modified, and things are (usually) made better.</p>
<p>Unfortunately no matter how hard I look, I can't find informa... | [
{
"answer_id": 339731,
"author": "abatishchev",
"author_id": 41956,
"author_profile": "https://Stackoverflow.com/users/41956",
"pm_score": 3,
"selected": false,
"text": "Version GetLatestVersion() {\nHttpWebRequestrequest = (HttpWebRequest)WebRequest.Create(new Uri(new Uri(http://example... | 2008/10/24 | [
"https://Stackoverflow.com/questions/232347",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/306/"
] |
232,386 | <p>I'm trying to make an item on ToolBar (specifically a Label, TextBlock, or a TextBox) That will fill all available horizontal space. I've gotten the ToolBar itself to stretch out by taking it out of its ToolBarTray, but I can't figure out how to make items stretch.</p>
<p>I tried setting Width to Percenatage or St... | [
{
"answer_id": 299786,
"author": "Robert Macnee",
"author_id": 19273,
"author_profile": "https://Stackoverflow.com/users/19273",
"pm_score": 4,
"selected": false,
"text": "<DockPanel>\n <ToolBar DockPanel.Dock=\"Top\">\n <ToolBar.Resources>\n <Style TargetType=\"{x:T... | 2008/10/24 | [
"https://Stackoverflow.com/questions/232386",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7649/"
] |
232,387 | <p>Suppose I have a table with a numeric column (lets call it "score").</p>
<p>I'd like to generate a table of counts, that shows how many times scores appeared in each range.</p>
<p>For example:</p>
<pre>
score range | number of occurrences
-------------------------------------
0-9 | 11
10-19 ... | [
{
"answer_id": 232405,
"author": "tvanfosson",
"author_id": 12950,
"author_profile": "https://Stackoverflow.com/users/12950",
"pm_score": 3,
"selected": false,
"text": "create table scores (\n user_id int,\n score int\n)\n\nselect t.range as [score range], count(*) as [number of occu... | 2008/10/24 | [
"https://Stackoverflow.com/questions/232387",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/31060/"
] |
232,395 | <p>I have a two-dimensional array (of Strings) which make up my data table (of rows and columns). I want to sort this array by any column. I tried to find an algorithm for doing this in C#, but have not been successful.</p>
<p>Any help is appreciated.</p>
| [
{
"answer_id": 232444,
"author": "MusiGenesis",
"author_id": 14606,
"author_profile": "https://Stackoverflow.com/users/14606",
"pm_score": 6,
"selected": true,
"text": "// assumes stringdata[row, col] is your 2D string array\nDataTable dt = new DataTable();\n// assumes first row contains... | 2008/10/24 | [
"https://Stackoverflow.com/questions/232395",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15052/"
] |
232,435 | <p>I have a two way foreign relation similar to the following</p>
<pre><code>class Parent(models.Model):
name = models.CharField(max_length=255)
favoritechild = models.ForeignKey("Child", blank=True, null=True)
class Child(models.Model):
name = models.CharField(max_length=255)
myparent = models.ForeignKey(Par... | [
{
"answer_id": 232644,
"author": "Eric Holscher",
"author_id": 4169,
"author_profile": "https://Stackoverflow.com/users/4169",
"pm_score": 4,
"selected": false,
"text": "class Parent(models.Model):\n name = models.CharField(max_length=255)\n\nclass Child(models.Model):\n name = models.... | 2008/10/24 | [
"https://Stackoverflow.com/questions/232435",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/25521/"
] |
232,445 | <p>I'm just starting to learn C++ so excuse me for this simple question. What I'm doing is reading in numbers from a file and then trying to add them to an array. My problem is how do you increase the size of the array? For example I thought might be able to just do:</p>
<pre><code>#include <iostream>
using name... | [
{
"answer_id": 232454,
"author": "C. K. Young",
"author_id": 13,
"author_profile": "https://Stackoverflow.com/users/13",
"pm_score": 5,
"selected": true,
"text": "vector push_back #include <iostream>\n#include <vector>\n\nint\nmain() {\n double value;\n std::vector<double> values;\... | 2008/10/24 | [
"https://Stackoverflow.com/questions/232445",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/38/"
] |
232,450 | <p>I wanted to see if folks were using decimal for financial applications instead of double. I have seen lots of folks using double all over the place with unintended consequences . .</p>
<p>Do you see others making this mistake . . .</p>
| [
{
"answer_id": 232460,
"author": "Marc Gravell",
"author_id": 23354,
"author_profile": "https://Stackoverflow.com/users/23354",
"pm_score": 3,
"selected": false,
"text": "float double decimal"
}
] | 2008/10/24 | [
"https://Stackoverflow.com/questions/232450",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4653/"
] |
232,472 | <p>In C and C++ what do the following declarations do?</p>
<pre><code>const int * i;
int * const i;
const volatile int ip;
const int *i;
</code></pre>
<p>Are any of the above declarations wrong?</p>
<p>If not what is the meaning and differences between them?</p>
<p>What are the useful uses of above declarations (I ... | [
{
"answer_id": 232479,
"author": "Adam Rosenfield",
"author_id": 9530,
"author_profile": "https://Stackoverflow.com/users/9530",
"pm_score": 5,
"selected": false,
"text": "const int * i; i i i int * const i; i i i const volatile int ip; ip const ip const_cast volatile ip volatile const v... | 2008/10/24 | [
"https://Stackoverflow.com/questions/232472",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
232,475 | <p>I need to add unit testing to some old scripts, the scripts are all basically in the following form:</p>
<pre><code>#!/usr/bin/perl
# Main code
foo();
bar();
# subs
sub foo {
}
sub bar {
}
</code></pre>
<p>If I try to 'require' this code in a unit test, the main section of the code will run, where as I want to... | [
{
"answer_id": 232552,
"author": "ysth",
"author_id": 17389,
"author_profile": "https://Stackoverflow.com/users/17389",
"pm_score": 4,
"selected": false,
"text": "use File::Slurp \"read_file\";\neval \"package Script; sub {\" . read_file(\"script\") . \"}\";\n\nis(Script::foo(), \"foo\")... | 2008/10/24 | [
"https://Stackoverflow.com/questions/232475",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3839/"
] |
232,486 | <p>I've used Slime within Emacs as my primary development environment for Common Lisp (or Aquamacs on OS X), but are there other compelling choices out there? I've heard about Lispworks, but is that [or something else] worth looking at? Or does anyone have tips to getting the most out of Emacs (e.g., hooking it up to t... | [
{
"answer_id": 232904,
"author": "Vebjorn Ljosa",
"author_id": 17498,
"author_profile": "https://Stackoverflow.com/users/17498",
"pm_score": 3,
"selected": false,
"text": "~/.emacs.el (require 'info-look)\n\n(info-lookup-add-help\n :mode 'lisp-mode\n :regexp \"[^][()'\\\" \\t\\n]+\"\n :i... | 2008/10/24 | [
"https://Stackoverflow.com/questions/232486",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/31049/"
] |
232,506 | <p>What tips and "standards" do you use in your Redmine project management process?</p>
<p>Do you have a standard wiki insert template you could share or a standard way to work a project using bugs features tasks and support issues?</p>
<p>Do you let issues and updates get emailed into Redmine?
Do you use the forums... | [
{
"answer_id": 10316605,
"author": "Scott Corscadden",
"author_id": 297472,
"author_profile": "https://Stackoverflow.com/users/297472",
"pm_score": 3,
"selected": false,
"text": "svn switch https//.../branches/1.3-stable . rake migrate svn ci -m \"This fixes #1733 @2.5, holy smoke what a... | 2008/10/24 | [
"https://Stackoverflow.com/questions/232506",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5281/"
] |
232,507 | <p>I'm a rookie designer having a few troubles with this page: <a href="http://www.resolvegroup.co.nz/javasurvey.php" rel="nofollow noreferrer">http://www.resolvegroup.co.nz/javasurvey.php</a></p>
<p>There are problems with the javascript operation of the expanded questions. For Internet Explorer (Version 7) the first... | [
{
"answer_id": 232514,
"author": "nickf",
"author_id": 9021,
"author_profile": "https://Stackoverflow.com/users/9021",
"pm_score": 2,
"selected": false,
"text": "$(\".score-list\").slideUp(speed);\n$(\".score-list\").removeClass(\"open\");\n$(\"a.open-answer\").removeClass(\"hidden\");\n... | 2008/10/24 | [
"https://Stackoverflow.com/questions/232507",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
232,508 | <p>I am currently using a dotted border for certain UI stuff such as instructions, notes, error boxes, etc.</p>
<p>But recently I changed to a solid border, due to a requirement, but I just find it kind of strange.</p>
<p>It seems that by making it solid it puts too much emphasis on page elements which are just infor... | [
{
"answer_id": 232522,
"author": "cowgod",
"author_id": 6406,
"author_profile": "https://Stackoverflow.com/users/6406",
"pm_score": 0,
"selected": false,
"text": "<abbr style=\"border-bottom:1px dotted #000;cursor:help;\">\n <span style=\"cursor:help;\" title=\"Cascading Style Sheets\... | 2008/10/24 | [
"https://Stackoverflow.com/questions/232508",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/25368/"
] |
232,519 | <p>What I can think of is pre-populating certain form input elements based on the user's geographical information.</p>
<p>What are other ways can you think of to speed up user input on long application forms?</p>
<p>Or at least keep them focus on completing the application form?</p>
| [
{
"answer_id": 249177,
"author": "Már Örlygsson",
"author_id": 16271,
"author_profile": "https://Stackoverflow.com/users/16271",
"pm_score": 1,
"selected": false,
"text": "reset"
}
] | 2008/10/24 | [
"https://Stackoverflow.com/questions/232519",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/25368/"
] |
232,524 | <p>How does one go about creating a virtual CD driver on Mac OS X programatically? </p>
<p>I can't find any relevant Cocoa APIs or any pure C BSD solutions. </p>
<p>Any help or information is appreciated.</p>
| [
{
"answer_id": 66885701,
"author": "malhal",
"author_id": 259521,
"author_profile": "https://Stackoverflow.com/users/259521",
"pm_score": 0,
"selected": false,
"text": "/Library/Extensions/DAEMONToolsVirtualSCSIBus.kext/Contents/MacOS/DAEMONToolsVirtualSCSIBus"
}
] | 2008/10/24 | [
"https://Stackoverflow.com/questions/232524",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
232,535 | <p>What's the best way to call a generic method when the type parameter isn't known at compile time, but instead is obtained dynamically at runtime?</p>
<p>Consider the following sample code - inside the <code>Example()</code> method, what's the most concise way to invoke <code>GenericMethod<T>()</code> using th... | [
{
"answer_id": 232621,
"author": "Jon Skeet",
"author_id": 22656,
"author_profile": "https://Stackoverflow.com/users/22656",
"pm_score": 11,
"selected": true,
"text": "MethodInfo method = typeof(Sample).GetMethod(nameof(Sample.GenericMethod));\nMethodInfo generic = method.MakeGenericMeth... | 2008/10/24 | [
"https://Stackoverflow.com/questions/232535",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/30280/"
] |
232,545 | <p>Say I have a rectangular string array - not a jagged array</p>
<pre><code>string[,] strings = new string[8, 3];
</code></pre>
<p>What's the best way to extract a one-dimensional array from this (either a single row or a single column)? I can do this with a for loop, of course, but I'm hoping .NET has a more elega... | [
{
"answer_id": 232553,
"author": "JaredPar",
"author_id": 23283,
"author_profile": "https://Stackoverflow.com/users/23283",
"pm_score": 1,
"selected": false,
"text": "static object[] GetColumn(string[][] source, int col) {\n return source.Iterate().Select(x => source[x.Index][col]).Ca... | 2008/10/24 | [
"https://Stackoverflow.com/questions/232545",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14606/"
] |
232,558 | <p>I noticed that the generic <code>IEnumerator<T></code> inherits from IDisposable, but the non-generic interface IEnumerator does not. Why is it designed in this way?</p>
<p>Usually, we use foreach statement to go through a <code>IEnumerator<T></code> instance. The generated code of foreach actually has ... | [
{
"answer_id": 232561,
"author": "BCS",
"author_id": 1343,
"author_profile": "https://Stackoverflow.com/users/1343",
"pm_score": -1,
"selected": false,
"text": "IEnumerable<T> IEnumerable IEnumerable"
},
{
"answer_id": 232616,
"author": "Jon Skeet",
"author_id": 22656,
... | 2008/10/24 | [
"https://Stackoverflow.com/questions/232558",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/26349/"
] |
232,575 | <p>How do I check if a column exists in SQL Server 2000?</p>
| [
{
"answer_id": 232582,
"author": "Christian C. Salvadó",
"author_id": 5445,
"author_profile": "https://Stackoverflow.com/users/5445",
"pm_score": 5,
"selected": false,
"text": "IF EXISTS ( SELECT * FROM INFORMATION_SCHEMA.COLUMNS\nWHERE TABLE_NAME='tablename' AND COLUMN_NAME='columname'... | 2008/10/24 | [
"https://Stackoverflow.com/questions/232575",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/31071/"
] |
232,622 | <p><strong>Update:</strong> So, this turns out to have nothing to do with Tortoise SVN. I use Mozy.com for off-site backups and their new version includes these icon overlays. They can be disabled via the config options...or see here <a href="http://forum.pcmech.com/showthread.php?p=1385433" rel="nofollow noreferrer">h... | [
{
"answer_id": 232628,
"author": "Mark Cidade",
"author_id": 1659,
"author_profile": "https://Stackoverflow.com/users/1659",
"pm_score": 1,
"selected": false,
"text": "%USERPROFILE%\\AppData\\Local attrib –h IconCache.db del IconCache.db"
}
] | 2008/10/24 | [
"https://Stackoverflow.com/questions/232622",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/689/"
] |
232,625 | <p>How to invoke the default browser with an URL from C#?</p>
| [
{
"answer_id": 232633,
"author": "Christian C. Salvadó",
"author_id": 5445,
"author_profile": "https://Stackoverflow.com/users/5445",
"pm_score": 3,
"selected": false,
"text": "System.Diagnostics.Process.Start(\"http://mysite.com\");\n"
},
{
"answer_id": 232634,
"author": "An... | 2008/10/24 | [
"https://Stackoverflow.com/questions/232625",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
232,651 | <p>While running a batch file in Windows XP I have found randomly occurring error message:</p>
<blockquote>
<p>The system cannot find the batch label specified name_of_label</p>
</blockquote>
<p>Of course label existed. What causes this error?</p>
| [
{
"answer_id": 232674,
"author": "VonC",
"author_id": 6309,
"author_profile": "https://Stackoverflow.com/users/6309",
"pm_score": 8,
"selected": true,
"text": ".bat .cmd CALL .bat vcvarsall.bat .gitattributes *.bat text eol=crlf\n"
},
{
"answer_id": 6419068,
"author": "Mars... | 2008/10/24 | [
"https://Stackoverflow.com/questions/232651",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/31086/"
] |
232,662 | <p>I have a function which launches a javascript window, like this</p>
<pre><code> function genericPop(strLink, strName, iWidth, iHeight) {
var parameterList = "location=0,directories=0,status=0,menubar=0,resizable=no, scrollbars=no,toolbar=0,maximize=0,width=" + iWidth + ", height=" + iHeight;
... | [
{
"answer_id": 232684,
"author": "Gene",
"author_id": 22673,
"author_profile": "https://Stackoverflow.com/users/22673",
"pm_score": 2,
"selected": false,
"text": "showDialog('title','content (can be html if encoded)','dialog_style/*4 predefined styles to choose from*/');\n"
},
{
... | 2008/10/24 | [
"https://Stackoverflow.com/questions/232662",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11602/"
] |
232,677 | <p>Could you tell me, please, if it's possible to preview (or at least retroview, for example, in a kind of a log file) SQL commands which SQL Server Management Studio Express is about to execute (or has just executed)?</p>
<p>In the past I used Embarcadero DBArtisan which shows SQL queries to be executed before actua... | [
{
"answer_id": 232700,
"author": "balexandre",
"author_id": 28004,
"author_profile": "https://Stackoverflow.com/users/28004",
"pm_score": 1,
"selected": false,
"text": "BEGIN TRAN\n\n INSERT INTO Clients \n SELECT 'Bruno', 'Alexandre';\n\nEND\n\nROLLBACK TRAN\n IF @@ERROR > 0 GOTO Error\... | 2008/10/24 | [
"https://Stackoverflow.com/questions/232677",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11256/"
] |
232,678 | <p>I am working on implementing tail for an assignment. I have it working correctly however I seem to be getting an error from free at random times.</p>
<p>I can't see, to track it down to a pattern or anything besides it is consistent.</p>
<p>For example if I call my program as "tail -24 test.in" I would get the the... | [
{
"answer_id": 232720,
"author": "Remo.D",
"author_id": 16827,
"author_profile": "https://Stackoverflow.com/users/16827",
"pm_score": 0,
"selected": false,
"text": " *(lines + slot) = (char *) malloc(len * sizeof(char));\n if((lines + slot) == NULL) exit(EXIT_FAILURE);\n lines[slot] (l... | 2008/10/24 | [
"https://Stackoverflow.com/questions/232678",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/25012/"
] |
232,681 | <p>I’ve almost 6 years of experience in application development using .net technologies. Over the years I have improved as a better OO programmer but when I see code written by other guys (especially the likes of Jeffrey Richter, Peter Golde, Ayende Rahien, Jeremy Miller etc), I feel there is a generation gap between m... | [
{
"answer_id": 232960,
"author": "Sébastien RoccaSerra",
"author_id": 2797,
"author_profile": "https://Stackoverflow.com/users/2797",
"pm_score": 1,
"selected": false,
"text": "self/this class/vtable/metatable class"
},
{
"answer_id": 10637273,
"author": "Webist",
"author... | 2008/10/24 | [
"https://Stackoverflow.com/questions/232681",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/31081/"
] |
232,682 | <p>I've already written a generator that does the trick, but I'd like to know the best possible way to implement the off-side rule.</p>
<p>Shortly: <a href="http://en.wikipedia.org/wiki/Off-side_rule" rel="noreferrer">Off-side rule</a> means in this context that indentation is getting recognized as a syntactic element... | [
{
"answer_id": 258167,
"author": "zaphod",
"author_id": 13871,
"author_profile": "https://Stackoverflow.com/users/13871",
"pm_score": 4,
"selected": true,
"text": "this line introduces an indented block of literal text:\n this line of the block is indented four spaces\n but this line... | 2008/10/24 | [
"https://Stackoverflow.com/questions/232682",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/21711/"
] |
232,688 | <pre><code><style type="text/css">
html, body {
background: #fff;
margin: 0;
padding: 0;
}
#nav {
font-family: Verdana, sans-serif;
height: 29px;
font-size: 12px;
padding: 0 0 0 10px; /* this is used for something else */
background-color: #456;
}
#nav ul, #nav ul li {
list-s... | [
{
"answer_id": 232699,
"author": "Gene",
"author_id": 22673,
"author_profile": "https://Stackoverflow.com/users/22673",
"pm_score": 0,
"selected": false,
"text": "#nav ul li a {\n color: #FFF;\n text-decoration: none;\n padding: 0px 0 0 20px;\n height: 29px;\n line-height:... | 2008/10/24 | [
"https://Stackoverflow.com/questions/232688",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/21559/"
] |
232,691 | <p>I've allocated an "array" of <code>mystruct</code> of size <code>n</code> like this:</p>
<pre><code>if (NULL == (p = calloc(sizeof(struct mystruct) * n,1))) {
/* handle error */
}
</code></pre>
<p>Later on, I only have access to <code>p</code>, and no longer have <code>n</code>. Is there a way to determine the le... | [
{
"answer_id": 232719,
"author": "Barry Wark",
"author_id": 2140,
"author_profile": "https://Stackoverflow.com/users/2140",
"pm_score": 7,
"selected": true,
"text": "malloc malloc n n void *p = calloc(sizeof(struct mystruct) * n + sizeof(unsigned long int),1));\n*((unsigned long int*)p) ... | 2008/10/24 | [
"https://Stackoverflow.com/questions/232691",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/31092/"
] |
232,693 | <p>Is it OK (or even recommended/good practice) to <code>#include</code> a <code>.c</code> file in another <code>.c</code> file?</p>
| [
{
"answer_id": 38953443,
"author": "milad",
"author_id": 4697004,
"author_profile": "https://Stackoverflow.com/users/4697004",
"pm_score": -1,
"selected": false,
"text": "#include <another.c>\n"
},
{
"answer_id": 39063753,
"author": "sumitroy",
"author_id": 6458680,
"... | 2008/10/24 | [
"https://Stackoverflow.com/questions/232693",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
232,722 | <p>When querying ntp servers with the command <strong>ntpdate</strong>, I can use the <strong>-u</strong> argument to make the source port an unrestricted port (port 1024 and above).</p>
<p>With ntpd, which is meant to run in the background, I can't seem to find a way to turn this option on. So the source port is alwa... | [
{
"answer_id": 29970572,
"author": "Daniel Alder",
"author_id": 1353930,
"author_profile": "https://Stackoverflow.com/users/1353930",
"pm_score": 1,
"selected": false,
"text": "ntpdate -q"
}
] | 2008/10/24 | [
"https://Stackoverflow.com/questions/232722",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15087/"
] |
232,732 | <p>How do I convert a string to DateTime format? For example, if I had a string like:</p>
<p><code>"24/10/2008"</code></p>
<p>How do I get that into DateTime format ?</p>
| [
{
"answer_id": 232739,
"author": "Jon Skeet",
"author_id": 22656,
"author_profile": "https://Stackoverflow.com/users/22656",
"pm_score": 4,
"selected": false,
"text": "string str = \"24/10/2008\";\nDateTime dt = DateTime.ParseExact(str, \"dd/MM/yyyy\", \n ... | 2008/10/24 | [
"https://Stackoverflow.com/questions/232732",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
232,736 | <p>Has anybody used a good obfuscator for PHP? I've tried some but they don't work for very big projects. They can't handle variables that are included in one file and used in another, for instance.</p>
<p>Or do you have any other tricks for stopping the spread of your code?</p>
| [
{
"answer_id": 232767,
"author": "Schwern",
"author_id": 14660,
"author_profile": "https://Stackoverflow.com/users/14660",
"pm_score": 7,
"selected": false,
"text": "perl -MO=Deparse some_program\n"
},
{
"answer_id": 3781356,
"author": "John",
"author_id": 456505,
"au... | 2008/10/24 | [
"https://Stackoverflow.com/questions/232736",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/29593/"
] |
232,744 | <p>Sometimes gdb prints "incomplete type" for some type of variables. What does this mean and how can we see that value?</p>
| [
{
"answer_id": 240856,
"author": "Daniel Cassidy",
"author_id": 31662,
"author_profile": "https://Stackoverflow.com/users/31662",
"pm_score": 6,
"selected": true,
"text": "struct hatstand;\nstruct hatstand *foo;\n foo hatstand foo lampshade print (struct lampshade *)foo\n print (void *)f... | 2008/10/24 | [
"https://Stackoverflow.com/questions/232744",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1692070/"
] |
232,747 | <p>I'm trying to read variables from a batch file for later use in the batch script, which is a Java launcher. I'd ideally like to have the same format for the settings file on all platforms (Unix, Windows), and also be a valid Java Properties file. That is, it should look like this:</p>
<pre><code>setting1=Value1
set... | [
{
"answer_id": 232813,
"author": "Joe",
"author_id": 13087,
"author_profile": "https://Stackoverflow.com/users/13087",
"pm_score": 6,
"selected": true,
"text": "setlocal\nFOR /F \"tokens=*\" %%i in ('type Settings.txt') do SET %%i\njava -Dsetting1=%setting1% ...\nendlocal\n"
},
{
... | 2008/10/24 | [
"https://Stackoverflow.com/questions/232747",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/22227/"
] |
232,748 | <p>User A logs into a ticket management system to edit content on "SomePage.aspx"</p>
<p>User B logs in 30 seconds later to edit the same ticket on "SomePage.aspx"</p>
<p>What are some of the best known practices(in a 3-tier architecture) for notifying each of the users that someone else is modifying the same content... | [
{
"answer_id": 232770,
"author": "balexandre",
"author_id": 28004,
"author_profile": "https://Stackoverflow.com/users/28004",
"pm_score": 1,
"selected": false,
"text": "SELECT * FROM Tickets WHERE TicketID = 897; \nUPDATE Tickets SET EditingBy = @UserID WHERE TicketID = 897;\n"
}
] | 2008/10/24 | [
"https://Stackoverflow.com/questions/232748",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4646/"
] |
232,775 | <p>This is one of those ajax "alternate flow" questions. Normally I expect my ajax request to return a part of the page. But sometimes it may return a full page with html, head and body tag. </p>
<p>At the time I return from my ajax-request I can detect if this is a full page, but is it possible to trigger a full page... | [
{
"answer_id": 232784,
"author": "Greg",
"author_id": 24181,
"author_profile": "https://Stackoverflow.com/users/24181",
"pm_score": 3,
"selected": true,
"text": "location.href = ..."
},
{
"answer_id": 232809,
"author": "gimel",
"author_id": 6491,
"author_profile": "ht... | 2008/10/24 | [
"https://Stackoverflow.com/questions/232775",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/23691/"
] |
232,781 | <p>can anybody show me how to build a string using checkbox. what would be the best way to do this.</p>
<p>for example i have 4 checkbox's each with its own value (valueA, valueB, valueC, valueD)
the thing is i want to display each result in different lines.</p>
<p>result if B & C is selected : </p>
<p>valueB <b... | [
{
"answer_id": 232801,
"author": "Unsliced",
"author_id": 2902,
"author_profile": "https://Stackoverflow.com/users/2902",
"pm_score": 0,
"selected": false,
"text": "\"if I saved this into a database\" ? \n"
},
{
"answer_id": 232803,
"author": "Jon Skeet",
"author_id": 226... | 2008/10/24 | [
"https://Stackoverflow.com/questions/232781",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/23491/"
] |
232,785 | <p>What are some uses of <code>#pragma</code> in C, with examples?</p>
| [
{
"answer_id": 232790,
"author": "Schildmeijer",
"author_id": 148909,
"author_profile": "https://Stackoverflow.com/users/148909",
"pm_score": 4,
"selected": false,
"text": "#pragma once #pragma once #ifndef MY_FILE #define MY_FILE ... #endif /* MY_FILE */"
},
{
"answer_id": 23279... | 2008/10/24 | [
"https://Stackoverflow.com/questions/232785",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
232,846 | <p>After installing asp.net (and aspnet_regIIS.exe -i) the site doesn't accept my default.aspx page. When trying to access it I get a 404.
When hitting directly to my mvc pages (/search.mvc for example) it works like a charm.</p>
<p>We checked the website configuration and noted that there are no .aspx references in t... | [
{
"answer_id": 232868,
"author": "Tomalak",
"author_id": 18771,
"author_profile": "https://Stackoverflow.com/users/18771",
"pm_score": 0,
"selected": false,
"text": "aspnet_regIIS.exe -i"
}
] | 2008/10/24 | [
"https://Stackoverflow.com/questions/232846",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
232,848 | <p>I'm writing code like this, doing a little quick and dirty timing:</p>
<pre><code>var sw = new Stopwatch();
sw.Start();
for (int i = 0; i < 1000; i++)
{
b = DoStuff(s);
}
sw.Stop();
Console.WriteLine(sw.ElapsedMilliseconds);
</code></pre>
<p>Surely there's a way to call this bit of timing code as a fancy-sc... | [
{
"answer_id": 232852,
"author": "Mark Ingram",
"author_id": 986,
"author_profile": "https://Stackoverflow.com/users/986",
"pm_score": 4,
"selected": false,
"text": "Stopwatch sw = MyObject.TimedFor(1000, () => DoStuff(s));\n public static Stopwatch TimedFor(this DependencyObject source,... | 2008/10/24 | [
"https://Stackoverflow.com/questions/232848",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1/"
] |
232,861 | <p>Generate the Fibonacci sequence in the fewest amount of characters possible. Any language is OK, except for one that you define with one operator, <code>f</code>, which prints the Fibonacci numbers.</p>
<p>Starting point: <strong><s>25</s> 14 characters</strong> in <strong>Haskell</strong>:</p>
<p><s> <code>f=0:1... | [
{
"answer_id": 232943,
"author": "Chris Young",
"author_id": 9417,
"author_profile": "https://Stackoverflow.com/users/9417",
"pm_score": 3,
"selected": false,
"text": "1[pdd5**v1++2/lxx]dsxx\n"
},
{
"answer_id": 233161,
"author": "C. K. Young",
"author_id": 13,
"autho... | 2008/10/24 | [
"https://Stackoverflow.com/questions/232861",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15055/"
] |
232,863 | <p>How can I check in C# if button.Click event has any handlers associated?
If (button.Click != null) throws compile error.</p>
| [
{
"answer_id": 232927,
"author": "Brody",
"author_id": 17131,
"author_profile": "https://Stackoverflow.com/users/17131",
"pm_score": 0,
"selected": false,
"text": "event System.EventHandler NewEvent;\n EventHandler handler = NewEvent;\n if(handler != null)\n {\n handler(th... | 2008/10/24 | [
"https://Stackoverflow.com/questions/232863",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
232,869 | <pre><code><style type="text/css">
body {
font-family:Helvetica, sans-serif;
font-size:12px;
}
p,
h1,
form,
button {
border: 0;
margin: 0;
padding: 0;
}
.spacer {
clear: both;
height: 1px;
}
/* ----------- My Form ----------- */
.myform {
margin: 0 auto;
width: 400px;
padding: 14px;... | [
{
"answer_id": 232880,
"author": "Greg",
"author_id": 24181,
"author_profile": "https://Stackoverflow.com/users/24181",
"pm_score": 0,
"selected": false,
"text": "name=\"textfield\" name=\"my_radio\""
},
{
"answer_id": 232910,
"author": "pilsetnieks",
"author_id": 6615,
... | 2008/10/24 | [
"https://Stackoverflow.com/questions/232869",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/21559/"
] |
232,881 | <p>In VS2005 and up, is it possible to specify which configuration should be selected by default?</p>
<p>I have several configurations in my solution but one of them should be used in most cases. Hence I'd like to make sure that devs who pull it out of Source Control use the right configuration(unless of course they s... | [
{
"answer_id": 31524307,
"author": "Ringil",
"author_id": 4882032,
"author_profile": "https://Stackoverflow.com/users/4882032",
"pm_score": 3,
"selected": false,
"text": "Debug Debug Test Test Debug Debug"
}
] | 2008/10/24 | [
"https://Stackoverflow.com/questions/232881",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12379/"
] |
232,884 | <p>Like most developers here and in the entire world, I have been developing software systems using object-oriented programming (OOP) techniques for many years. So when I read that aspect-oriented programming (AOP) addresses many of the problems that traditional OOP doesn't solve completely or directly, I pause and thi... | [
{
"answer_id": 232918,
"author": "Mecki",
"author_id": 15809,
"author_profile": "https://Stackoverflow.com/users/15809",
"pm_score": 9,
"selected": true,
"text": "void set...(...) {\n :\n :\n Display.update();\n}\n after() : set() {\n Display.update();\n}\n pointcut set() : ex... | 2008/10/24 | [
"https://Stackoverflow.com/questions/232884",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/30715/"
] |
232,895 | <p>I came across an interesting article which shows how we can transparently encrypt jdbc connections using java thin client. </p>
<p><a href="http://javasight.wordpress.com/2008/08/29/network-data-encryption-and-integrity-for-thin-jdbc-clients/" rel="nofollow noreferrer">http://javasight.wordpress.com/2008/08/29/netw... | [
{
"answer_id": 574473,
"author": "Franklin",
"author_id": 67517,
"author_profile": "https://Stackoverflow.com/users/67517",
"pm_score": 1,
"selected": false,
"text": "// Set the Client encryption level \n\"oracle.net.encryption_client\" = Service.getLevelString(level) \n\n// Set the Cl... | 2008/10/24 | [
"https://Stackoverflow.com/questions/232895",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
232,905 | <p>I got this logic in a control to create a correct url for an image. My control basically needs to diplay an image, but the src is actually a complex string based on different parameters pointing at an image-server.</p>
<p>So we decided to to create a control MyImage derived from asp:Image - it works like a charm. N... | [
{
"answer_id": 574473,
"author": "Franklin",
"author_id": 67517,
"author_profile": "https://Stackoverflow.com/users/67517",
"pm_score": 1,
"selected": false,
"text": "// Set the Client encryption level \n\"oracle.net.encryption_client\" = Service.getLevelString(level) \n\n// Set the Cl... | 2008/10/24 | [
"https://Stackoverflow.com/questions/232905",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11619/"
] |
232,926 | <p>For instance, winsock libs works great across all versions of the visual studio. But I am having real trouble to provide a consistent binary across all the versions. The dll compiled with VS 2005 won't work when linked to an application written in 2008. I upgraded both 2k5 and 2k8 to SP1, but the results haven't cha... | [
{
"answer_id": 232959,
"author": "Chris Becke",
"author_id": 27491,
"author_profile": "https://Stackoverflow.com/users/27491",
"pm_score": 5,
"selected": true,
"text": " struct IExportedMethods {\n virtual long __stdcall AMethod(void)=0;\n };\n // with the win32 macros:\n interfac... | 2008/10/24 | [
"https://Stackoverflow.com/questions/232926",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1781/"
] |
232,933 | <p>How do I multiply the values of a multi-dimensional array with weights and sum up the results into a new array in PHP or in general?</p>
<p>The boring way looks like this:</p>
<pre><code>$weights = array(0.25, 0.4, 0.2, 0.15);
$values = array
(
array(5,10,15),
array(20,25,30... | [
{
"answer_id": 232963,
"author": "Tomalak",
"author_id": 18771,
"author_profile": "https://Stackoverflow.com/users/18771",
"pm_score": 0,
"selected": false,
"text": "foreach($values as $index => $ary )\n $result[$index] = array_sum($ary) * $weights[$index];\n"
},
{
"answer_id": ... | 2008/10/24 | [
"https://Stackoverflow.com/questions/232933",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6260/"
] |
232,934 | <p>I want to subclass the built-in DropDownList in ASP.NET so that I can add functionality to it and use it in my pages. I tried doing this with a UserControl but found that it doesn't expose the internal DropDownList (logically, I guess). I've googled for the answer but can't find anything. </p>
<p>I've come as far a... | [
{
"answer_id": 232972,
"author": "Eoin Campbell",
"author_id": 30155,
"author_profile": "https://Stackoverflow.com/users/30155",
"pm_score": 5,
"selected": true,
"text": "namespace My.Namespace.Controls\n{\n[ToolboxData(\"<{0}:MyDropDownList runat=\\\"server\\\"></{0}:MyDropDownList>\")]... | 2008/10/24 | [
"https://Stackoverflow.com/questions/232934",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/614/"
] |
232,935 | <p>I want to find an SQL query to find rows where field1 does not contain $x. How can I do this?</p>
| [
{
"answer_id": 232942,
"author": "Greg",
"author_id": 24181,
"author_profile": "https://Stackoverflow.com/users/24181",
"pm_score": 5,
"selected": false,
"text": "SELECT * FROM table WHERE field1 NOT LIKE '%$x%'; NOT IN LIKE 'xxx%' LIKE '%xxx' LIKE '%xxx%'"
},
{
"answer_id": 2329... | 2008/10/24 | [
"https://Stackoverflow.com/questions/232935",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/26823/"
] |
232,938 | <p>I have a .rc file which is used to include some text data in my executable, like this:</p>
<pre><code>1234 RCDATA myfile.txt
</code></pre>
<p>This works fine: the content of the 'myfile.txt' is included in my executable.
The problem is that no 0-terminator is added to the string, and I cannot add it to the file. I... | [
{
"answer_id": 232992,
"author": "eugensk",
"author_id": 17495,
"author_profile": "https://Stackoverflow.com/users/17495",
"pm_score": 3,
"selected": true,
"text": "makeZ myfile.txt myfileZ.txt\n 1234 RCDATA myfileZ.txt\n"
},
{
"answer_id": 239279,
"author": "bugmagnet",
... | 2008/10/24 | [
"https://Stackoverflow.com/questions/232938",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12893/"
] |
232,945 | <p>I have an XML document which looks like this:</p>
<pre><code><xconnect>
<type>OK</type>
<response/>
<report>
<id>suppressionlist_get</id>
<name>Suppression List Get</name>
<timestamp>24 Oct 08 @ 10:16AM</timestamp>
<records type=\"... | [
{
"answer_id": 232954,
"author": "benPearce",
"author_id": 4490,
"author_profile": "https://Stackoverflow.com/users/4490",
"pm_score": 0,
"selected": false,
"text": "DataSet.LoadXml()"
},
{
"answer_id": 7355097,
"author": "jon3laze",
"author_id": 399770,
"author_profi... | 2008/10/24 | [
"https://Stackoverflow.com/questions/232945",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/30004/"
] |
232,979 | <p>I'm looking to get data such as Size/Capacity, Serial No, Model No, Heads Sectors, Manufacturer and possibly SMART data.</p>
| [
{
"answer_id": 232995,
"author": "Eoin Campbell",
"author_id": 30155,
"author_profile": "https://Stackoverflow.com/users/30155",
"pm_score": 4,
"selected": true,
"text": "ManagementObject disk = new ManagementObject(\"win32_logicaldisk.deviceid=\\\"c:\\\"\"); \ndisk.Get(); \nConsole.Writ... | 2008/10/24 | [
"https://Stackoverflow.com/questions/232979",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11538/"
] |
232,982 | <p>I'm looking to create an Intellij IDEA language support plugin for Erlang.</p>
<p>The first and biggest problem I've had is in making the JFlex Erlang syntax definition.</p>
<p>Does anyone know where can I get the EBNF or BNF for Erlang?</p>
| [
{
"answer_id": 240652,
"author": "a2800276",
"author_id": 27408,
"author_profile": "https://Stackoverflow.com/users/27408",
"pm_score": 1,
"selected": false,
"text": "lib/compiler/src/core_parse.yrl"
}
] | 2008/10/24 | [
"https://Stackoverflow.com/questions/232982",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17375/"
] |
232,986 | <p>I am attempting to bind a WPF textbox's Maxlength property to a known constant deep within a class. I am using c#.</p>
<p>The class has a structure not too dissimilar to the following:</p>
<pre><code>namespace Blah
{
public partial class One
{
public partial class Two
{
public ... | [
{
"answer_id": 232996,
"author": "Joachim Kerschbaumer",
"author_id": 20227,
"author_profile": "https://Stackoverflow.com/users/20227",
"pm_score": 0,
"selected": false,
"text": "{x:Static local:Sizes.Length1}\n"
},
{
"answer_id": 233017,
"author": "Ash",
"author_id": 311... | 2008/10/24 | [
"https://Stackoverflow.com/questions/232986",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/31128/"
] |
232,997 | <p>I have what is essentially a jagged array of name value pairs - i need to generate a set of unique name values from this. the jagged array is approx 86,000 x 11 values.
It does not matter to me what way I have to store a name value pair (a single string "name=value" or a specialised class for example KeyValuePair).<... | [
{
"answer_id": 233005,
"author": "Eoin Campbell",
"author_id": 30155,
"author_profile": "https://Stackoverflow.com/users/30155",
"pm_score": 0,
"selected": false,
"text": "Dictionary<System.Guid, KeyValuePair<string, string>> myDict \n = new Dictionary<Guid, KeyValuePair<string, string... | 2008/10/24 | [
"https://Stackoverflow.com/questions/232997",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/22100/"
] |
233,009 | <p>Ok: This is some of my table structure that matters here</p>
<pre><code>CaseStudyID int
Title nvarchar(50)
OverrideTitle nvarchar(50)
</code></pre>
<p>Part of my procedure</p>
<pre><code>Declare @Temp table(CaseStudyID int,
Title nvarchar(50))
Insert Into @Temp
SELECT CaseStudyID,Title
FROM CaseStu... | [
{
"answer_id": 233039,
"author": "splattne",
"author_id": 6461,
"author_profile": "https://Stackoverflow.com/users/6461",
"pm_score": 1,
"selected": false,
"text": "SELECT \n MIN(CaseStudyID) AS CaseStudyID, \n CASE WHEN count(*) = 1 THEN \n MIN(Title) \n ELSE\n MIN(... | 2008/10/24 | [
"https://Stackoverflow.com/questions/233009",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11394/"
] |
233,013 | <p>I recently started learning Python and I was rather surprised to find a 1000 deep recursion limit (by default). If you set it high enough, about 30000, it crashes with a segmentation fault just like C. Although, C seems to go quite a lot higher.</p>
<p>(The Python folks are quick to point out that you can always ... | [
{
"answer_id": 233028,
"author": "Greg",
"author_id": 24181,
"author_profile": "https://Stackoverflow.com/users/24181",
"pm_score": 2,
"selected": false,
"text": "Fatal error: Maximum function nesting level of '100' reached, aborting! ini_set('xdebug.max_nesting_level', 100000); [Fri Oct... | 2008/10/24 | [
"https://Stackoverflow.com/questions/233013",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/388466/"
] |
233,026 | <p>I have a database with a table which is full of conditions and error messages for checking another database.</p>
<p>I want to run a loop such that each of these conditions is checked against all the tables in the second database and generae a report which gives the errors.</p>
<p>Is this possible in ms access.</p>... | [
{
"answer_id": 233136,
"author": "Fionnuala",
"author_id": 2548,
"author_profile": "https://Stackoverflow.com/users/2548",
"pm_score": 0,
"selected": false,
"text": "Dim rs AS DAO.Recordset\nDim rs2 AS DAO.Recordset\n\nSet rs=CurrentDB.OpenRecordset(\"querycrit\")\n\nstrSQL=\"SELECT * Fr... | 2008/10/24 | [
"https://Stackoverflow.com/questions/233026",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/31132/"
] |
233,072 | <p><p>How to include any assembly code lines into my C program ?
<p>In turbo c is there a possibility to add an assembly code file (.asm) to a project of few .c files?</p>
| [
{
"answer_id": 233090,
"author": "xsl",
"author_id": 11387,
"author_profile": "https://Stackoverflow.com/users/11387",
"pm_score": 3,
"selected": true,
"text": "void wrapper_function()\n{\n asm\n {\n /* your assembly code */\n }\n}\n"
},
{
"answer_id": 4147512,
... | 2008/10/24 | [
"https://Stackoverflow.com/questions/233072",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/31116/"
] |
233,074 | <p>Please could someone help me with writing a regex expression to replace 0044 token which will be at the start of the string with a 0. Please note that I do not want to replace all 0044 tokens with 0, only those that appear at the start of the string.</p>
<p>Thanks a lot</p>
| [
{
"answer_id": 233076,
"author": "Graeme Perrow",
"author_id": 1821,
"author_profile": "https://Stackoverflow.com/users/1821",
"pm_score": 1,
"selected": false,
"text": "s/^0044/0/;\n ^"
},
{
"answer_id": 233442,
"author": "David Santamaria",
"author_id": 24097,
"auth... | 2008/10/24 | [
"https://Stackoverflow.com/questions/233074",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
233,088 | <p>The fundamental equation of weight loss/gain is:</p>
<pre><code>weight_change = convert_to_weight_diff(calories_consumed - calories_burnt);
</code></pre>
<p>I'm going on a health kick, and like a good nerd I thought I'd start keeping track of these things and write some software to process my data. I'm not attenti... | [
{
"answer_id": 9695826,
"author": "hetelek",
"author_id": 877651,
"author_profile": "https://Stackoverflow.com/users/877651",
"pm_score": 1,
"selected": false,
"text": "int convert_to_weight_diff(int calories)\n{\n return 0.000000000000046 * calories;\n}\n"
}
] | 2008/10/24 | [
"https://Stackoverflow.com/questions/233088",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6408/"
] |
233,113 | <p>How do I get the type of a generic typed class within the class?</p>
<p>An example:</p>
<p>I build a generic typed collection implementing <em>ICollection< T></em>. Within I have methods like </p>
<pre><code> public void Add(T item){
...
}
public void Add(IEnumerable<T> enumItems){
... | [
{
"answer_id": 233120,
"author": "Keith",
"author_id": 905,
"author_profile": "https://Stackoverflow.com/users/905",
"pm_score": 5,
"selected": false,
"text": "typeof(T) if (typeof(T) == typeof(object) ) {\n // Check for IEnumerable\n}\n"
},
{
"answer_id": 233146,
"author"... | 2008/10/24 | [
"https://Stackoverflow.com/questions/233113",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9470/"
] |
233,127 | <p>We have a function which a single thread calls into (we name this the main thread). Within the body of the function we spawn multiple worker threads to do CPU intensive work, wait for all threads to finish, then return the result on the main thread.</p>
<p>The result is that the caller can use the function naively,... | [
{
"answer_id": 233206,
"author": "n-alexander",
"author_id": 23420,
"author_profile": "https://Stackoverflow.com/users/23420",
"pm_score": 2,
"selected": false,
"text": "try\n{\n start thread();\n wait_finish( thread );\n}\ncatch(...)\n{\n // will catch exceptions generated within sta... | 2008/10/24 | [
"https://Stackoverflow.com/questions/233127",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/755/"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.