qid int64 4 22.2M | question stringlengths 18 48.3k | answers list | date stringlengths 10 10 | metadata list |
|---|---|---|---|---|
384,634 | <p>I'm trying to load an image from the Firefox cache as the title suggests. I'm running Ubuntu, so the location of my cache is /home/me/.mozilla/firefox/xxxxxx.default/Cache</p>
<p>However, in the Cache (and this is on Mac, too) the filenames are just ridiculous combinations of letters and numbers. Is there a way to ... | [
{
"answer_id": 1882960,
"author": "Jason Orendorff",
"author_id": 94977,
"author_profile": "https://Stackoverflow.com/users/94977",
"pm_score": 1,
"selected": false,
"text": "img src="
}
] | 2008/12/21 | [
"https://Stackoverflow.com/questions/384634",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
384,639 | <p>The task seems to be pretty easy: how to include a Javascript file in xml-document so that at least Opera and Firefox could actually parse it and execute the code?</p>
| [
{
"answer_id": 1451526,
"author": "Tim Babych",
"author_id": 176270,
"author_profile": "https://Stackoverflow.com/users/176270",
"pm_score": 5,
"selected": false,
"text": "<xhtml:script xmlns:xhtml=\"http://www.w3.org/1999/xhtml\"\n src=\"file.js\"\n type=\"... | 2008/12/21 | [
"https://Stackoverflow.com/questions/384639",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/34134/"
] |
384,690 | <pre><code> TMyDataList<T: TBaseDatafile, constructor> = class(TObjectList<TBaseDatafile>)
public
constructor Create;
procedure upload(db: TDataSet);
end;
</code></pre>
<p>I read in a blog post (I don't remember where now) that this is the way to declare a generic-based class with a spe... | [
{
"answer_id": 384822,
"author": "Toon Krijthe",
"author_id": 18061,
"author_profile": "https://Stackoverflow.com/users/18061",
"pm_score": 2,
"selected": false,
"text": "TObjectList<T: class> = class(TList<T>)\n"
}
] | 2008/12/21 | [
"https://Stackoverflow.com/questions/384690",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/32914/"
] |
384,737 | <p>Lambda syntax in C# 3 makes it really convenient to create one-liner anonymous methods. They're a definite improvement over the wordier anonymous delegate syntax that C# 2 gave us. The convenience of lambdas, however, brings with it a temptation to use them in places where we don't necessarily need the functional ... | [
{
"answer_id": 23081744,
"author": "nerophon",
"author_id": 2000762,
"author_profile": "https://Stackoverflow.com/users/2000762",
"pm_score": 0,
"selected": false,
"text": "public class UserIsUnhappy : Notification { public int unhappiness; }\n"
}
] | 2008/12/21 | [
"https://Stackoverflow.com/questions/384737",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/36388/"
] |
384,743 | <p>There are times when I want to test new code from the forums or when I need to help my friends with specific C# problem. The problem is I don't want to create new "project" in Visual Studio each time just to code/run only this small code.</p>
<p>Java & Eclipse IDE comes up with "Scrapbook" feature which allows ... | [
{
"answer_id": 26877712,
"author": "twasbrillig",
"author_id": 2213647,
"author_profile": "https://Stackoverflow.com/users/2213647",
"pm_score": 4,
"selected": false,
"text": "Project Type: MVC"
},
{
"answer_id": 38698819,
"author": "Richard Bos",
"author_id": 1900305,
... | 2008/12/21 | [
"https://Stackoverflow.com/questions/384743",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12460/"
] |
384,755 | <p>I use LINQ-to-SQL to load data from a database that has two tables in a one-to-many relationship (one Recipe has many Ingredients).</p>
<p>I load a Recipe and LINQ retrieves Ingredient objects into an EntitySet that is binded into a ListBox.</p>
<p>If I want to delete some Ingredients off a Recipe, I get a "An att... | [
{
"answer_id": 388239,
"author": "mjwills",
"author_id": 34092,
"author_profile": "https://Stackoverflow.com/users/34092",
"pm_score": 3,
"selected": false,
"text": " try\n {\n // Needed for existing records, but will fail for new records\n yourLINQDat... | 2008/12/21 | [
"https://Stackoverflow.com/questions/384755",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/48159/"
] |
384,759 | <p>How do I convert a PIL <code>Image</code> back and forth to a NumPy array so that I can do faster pixel-wise transformations than PIL's <code>PixelAccess</code> allows? I can convert it to a NumPy array via:</p>
<pre><code>pic = Image.open("foo.jpg")
pix = numpy.array(pic.getdata()).reshape(pic.size[0], pi... | [
{
"answer_id": 384926,
"author": "dF.",
"author_id": 3002,
"author_profile": "https://Stackoverflow.com/users/3002",
"pm_score": 10,
"selected": true,
"text": "putdata()"
},
{
"answer_id": 1095878,
"author": "endolith",
"author_id": 125507,
"author_profile": "https://... | 2008/12/21 | [
"https://Stackoverflow.com/questions/384759",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/145/"
] |
384,762 | <p>I used MySQL Workbench to generate a database and now I inserted it into the command-line client using:</p>
<blockquote>
<p>mysql> . C:\Documents and
Settings\kdegroote\My
Documents\School\2008-2009\ICT2
\Gegevensbanken\Labo\Hoofdstuk 3 oef
6\pizzasecondtry.sql</p>
</blockquote>
<p>For some reason, the l... | [
{
"answer_id": 384768,
"author": "derobert",
"author_id": 27727,
"author_profile": "https://Stackoverflow.com/users/27727",
"pm_score": 1,
"selected": false,
"text": "use PizzaDelivery"
},
{
"answer_id": 384884,
"author": "Bill Karwin",
"author_id": 20860,
"author_pro... | 2008/12/21 | [
"https://Stackoverflow.com/questions/384762",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11795/"
] |
384,771 | <p>for writing an offline client to the Google Reader service I would like to know how to best sync with the service. </p>
<p>There doesn't seem to be official documentation yet and the best source I found so far is this: <a href="http://code.google.com/p/pyrfeed/wiki/GoogleReaderAPI" rel="noreferrer">http://code.goog... | [
{
"answer_id": 1023109,
"author": "cjs",
"author_id": 107294,
"author_profile": "https://Stackoverflow.com/users/107294",
"pm_score": 4,
"selected": true,
"text": "<gr:continuation>CArhxxjRmNsC</gr:continuation>`\n"
}
] | 2008/12/21 | [
"https://Stackoverflow.com/questions/384771",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/45867/"
] |
384,775 | <p>I'm learning iPhone programming from Erica Sadun's The iPhone Developer's Cookbook. When I run the app I created by following the steps in the Temperature Conversion Example starting on page 81 in the simulator, it terminates due to an uncaught exception. (See <a href="http://groups.google.com/group/iphonesdk/brow... | [
{
"answer_id": 384795,
"author": "Lily Ballard",
"author_id": 582,
"author_profile": "https://Stackoverflow.com/users/582",
"pm_score": 7,
"selected": true,
"text": "objc_exception_throw"
},
{
"answer_id": 9138988,
"author": "samwize",
"author_id": 242682,
"author_pro... | 2008/12/21 | [
"https://Stackoverflow.com/questions/384775",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4766/"
] |
384,776 | <p>I've seen on the internet quite a few examples of binding a boolean to the Visibility property of a control in XAML. Most of the good examples use a BooleanToVisibiliy converter.</p>
<p>I'd like to just set the Visible property on the control to bind to a System.Windows.Visibility property in the code-behind, but ... | [
{
"answer_id": 384952,
"author": "NR.",
"author_id": 48142,
"author_profile": "https://Stackoverflow.com/users/48142",
"pm_score": 3,
"selected": false,
"text": " public Visibility ActionsVisible\n {\n get { return (Visibility)GetValue(ActionsVisibleProperty); }\n ... | 2008/12/21 | [
"https://Stackoverflow.com/questions/384776",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/24841/"
] |
384,789 | <p>I've got few files in resources (xsd files) that i use for validating received xml messages. The resource file i use is named <strong>AppResources.resx</strong> and it contains a file called <strong>clientModels.xsd</strong>. When i try to use the file like this: AppResources.clientModels, i get a string with the fi... | [
{
"answer_id": 401620,
"author": "dbones",
"author_id": 47642,
"author_profile": "https://Stackoverflow.com/users/47642",
"pm_score": 1,
"selected": false,
"text": "//Namespace reference\nusing System;\nusing System.Resources;\n\n\n#region ReadResourceFile\n/// <summary>\n/// method for ... | 2008/12/21 | [
"https://Stackoverflow.com/questions/384789",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/40872/"
] |
384,797 | <p>Firstly, <em>Real World Haskell</em>, which I am reading, says to never use <code>foldl</code> and instead use <code>foldl'</code>. So I trust it. </p>
<p>But I'm hazy on when to use <code>foldr</code> vs. <code>foldl'</code>. Though I can see the structure of how they work differently laid out in front of me, I'm... | [
{
"answer_id": 384802,
"author": "Konrad Rudolph",
"author_id": 1968,
"author_profile": "https://Stackoverflow.com/users/1968",
"pm_score": 5,
"selected": false,
"text": "foldl"
},
{
"answer_id": 384803,
"author": "mattiast",
"author_id": 8272,
"author_profile": "http... | 2008/12/21 | [
"https://Stackoverflow.com/questions/384797",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/38803/"
] |
384,809 | <p>I have a mac with a custom PHP 5 install that built from about a year ago. I remember it took all Sunday and I had to compile about 20 times to get it right. The MySQL I have is from entropy and was precompiled.</p>
<p>Now I need to get PDO with the MySQL driver working and the driver is not installed. I tried the ... | [
{
"answer_id": 384893,
"author": "ieure",
"author_id": 45224,
"author_profile": "https://Stackoverflow.com/users/45224",
"pm_score": 4,
"selected": true,
"text": "/usr/local/mysql"
}
] | 2008/12/21 | [
"https://Stackoverflow.com/questions/384809",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/577/"
] |
384,811 | <p>I'm trying to choose a hash algorithm for comparing about max 20 different text data. </p>
<p>Which hash is better for these requirements?</p>
<ul>
<li>Less CPU Consumption</li>
<li>Small footprint (<=32 bytes)</li>
<li>Collision is not a big deal</li>
<li>Can be generated from .NET Framework 2 (shouldn't be a ... | [
{
"answer_id": 384915,
"author": "Marc Gravell",
"author_id": 23354,
"author_profile": "https://Stackoverflow.com/users/23354",
"pm_score": 0,
"selected": false,
"text": "GetHashCode()"
}
] | 2008/12/21 | [
"https://Stackoverflow.com/questions/384811",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/40322/"
] |
384,820 | <p>Is there a way to specify some JavaScript to execute on the OnBlur event of an ASP.NET text box? It seems to me like if I add any event handlers to the TextBox object they will just cause postbacks to the server isntead of doing what I want. Basically, I just want to be able to have the textbox be rendered in this... | [
{
"answer_id": 384826,
"author": "FlySwat",
"author_id": 1965,
"author_profile": "https://Stackoverflow.com/users/1965",
"pm_score": 4,
"selected": false,
"text": "myTextBox.Attributes.Add(\"onblur\",\"alert('1234');\");\n"
},
{
"answer_id": 384848,
"author": "Tom Jelen",
... | 2008/12/21 | [
"https://Stackoverflow.com/questions/384820",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14101/"
] |
384,851 | <p>I've been tasked with designing a very simple SSO (single sign-on) process. My employer has specified that it should be implemented in SAML. I'd like to create messages that are absolutely as simple as possible while confirming to the SAML spec. </p>
<p>I'd be really grateful if some of you would look at my request... | [
{
"answer_id": 419221,
"author": "metadaddy",
"author_id": 33905,
"author_profile": "https://Stackoverflow.com/users/33905",
"pm_score": 4,
"selected": false,
"text": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<samlp:AuthnRequest xmlns:samlp=\"urn:oasis:names:tc:SAML:2.0:protocol\"\n ... | 2008/12/21 | [
"https://Stackoverflow.com/questions/384851",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/44683/"
] |
384,862 | <p>My web site is hosted at Dreamhost and there they only get zlib installed along with PHP. I couldn't figure out how to unzip files with the commom methods from this extension as described here : <a href="http://php.net/zlib" rel="nofollow noreferrer">http://php.net/zlib</a></p>
<p>Does anyone knows how can I unzip ... | [
{
"answer_id": 384872,
"author": "strager",
"author_id": 39992,
"author_profile": "https://Stackoverflow.com/users/39992",
"pm_score": 2,
"selected": false,
"text": "fopen"
}
] | 2008/12/21 | [
"https://Stackoverflow.com/questions/384862",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
384,871 | <p>I need to build an assembler for a CPU architecture that I've built. The architecture is similar to MIPS, but this is of no importance.</p>
<p>I started using C#, although C++ would be more appropriate. (C# means faster development time for me).</p>
<p>My only problem is that I can't come with a good design for th... | [
{
"answer_id": 384896,
"author": "plinth",
"author_id": 20481,
"author_profile": "https://Stackoverflow.com/users/20481",
"pm_score": 5,
"selected": true,
"text": "nothing\n[label] [instruction] [comment]\n[label] [directive] [comment]\n"
}
] | 2008/12/21 | [
"https://Stackoverflow.com/questions/384871",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/47117/"
] |
384,873 | <p>I am looking at some javascript code and it has this in a function:</p>
<pre><code>$$('.CssClass').each(function(x) { .... } )
</code></pre>
<p>I get that the intent is to apply the anonymous function to each element with a class of CssClass, but I can't work what the $$ refers to ... and can't google for $$!</p>... | [
{
"answer_id": 384878,
"author": "Johannes Schaub - litb",
"author_id": 34509,
"author_profile": "https://Stackoverflow.com/users/34509",
"pm_score": 1,
"selected": false,
"text": "$"
},
{
"answer_id": 384885,
"author": "Tom Haigh",
"author_id": 22224,
"author_profile... | 2008/12/21 | [
"https://Stackoverflow.com/questions/384873",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3631/"
] |
384,874 | <p>My problem is very similar to eight queens puzzle.</p>
<p>I've got 2-dimensional array (N x N) that for example, looks like this:</p>
<pre><code>0,0,0,0,1 y
0,0,0,0,0 |
0,0,0,0,0 V
0,0,0,1,0
0,0,0,0,0
x->
</code></pre>
<p>I'm checking horizontally, vertically and diagonally for occurrences of 1</p>
<pre><code... | [
{
"answer_id": 384887,
"author": "dF.",
"author_id": 3002,
"author_profile": "https://Stackoverflow.com/users/3002",
"pm_score": 5,
"selected": true,
"text": "def collision(x1, y1, x2, y2):\n return x1 == x2 or y1 == y2 or abs(x1-x2) == abs(y1-y2)\n"
},
{
"answer_id": 384908,
... | 2008/12/21 | [
"https://Stackoverflow.com/questions/384874",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9099/"
] |
384,898 | <p>I have read that private variables in a base class are technically inherited by child classes, but are not accessible.</p>
<p>If this is correct, why do we say they are inherited when presumably they can only be accessed by reflection?</p>
| [
{
"answer_id": 384906,
"author": "Marc Gravell",
"author_id": 23354,
"author_profile": "https://Stackoverflow.com/users/23354",
"pm_score": 5,
"selected": true,
"text": "Foo"
}
] | 2008/12/21 | [
"https://Stackoverflow.com/questions/384898",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/38522/"
] |
384,900 | <p>I'm looking to stream some audio files I have on my server to an iPhone-client application I'm writing. Some of the audio files can be rather large in size, even after compression. My question is, is there a Cocoa framework that helps me with buffering the audio so it becomes available to the user while the rest is ... | [
{
"answer_id": 8765033,
"author": "Hivebrain",
"author_id": 149898,
"author_profile": "https://Stackoverflow.com/users/149898",
"pm_score": 3,
"selected": false,
"text": "NSURL *theURL = [NSURL urlWithString:@\"http://yourdomain.com/yourmediafile.mp3\"];\n\nMPMoviePlayerController* yourP... | 2008/12/21 | [
"https://Stackoverflow.com/questions/384900",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/40882/"
] |
384,913 | <p>I need to work with array from several threads, so I use CRITICAL SECTION to give it an exclusive access to the data.<br>
Here is my template:<br></p>
<pre><code>#include "stdafx.h"
#ifndef SHAREDVECTOR_H
#define SHAREDVECTOR_H
#include <vector>
#include <windows.h>
template<class T>
class Share... | [
{
"answer_id": 384922,
"author": "Arnout",
"author_id": 3496,
"author_profile": "https://Stackoverflow.com/users/3496",
"pm_score": 1,
"selected": false,
"text": "EnterCriticalSection"
},
{
"answer_id": 384924,
"author": "Eclipse",
"author_id": 8701,
"author_profile":... | 2008/12/21 | [
"https://Stackoverflow.com/questions/384913",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/28298/"
] |
384,916 | <p>I'm setting up a site where users have their own "profile". I'm using routes for neat URLs and I wondered what are the pros/cons to the following:</p>
<pre><code>example.com/:username
</code></pre>
<p>Or should I include a static route to filter that it's a profile page request?</p>
<pre><code>example.com/u/:user... | [
{
"answer_id": 384921,
"author": "DanSingerman",
"author_id": 43965,
"author_profile": "https://Stackoverflow.com/users/43965",
"pm_score": 2,
"selected": false,
"text": "example.com/:username\n"
}
] | 2008/12/21 | [
"https://Stackoverflow.com/questions/384916",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/31399/"
] |
384,918 | <p>The following method does not compile. Visual Studio warns "An out parameter may not be used within an anonymous method". The <code>WithReaderLock(Proc action)</code> method takes a <code>delegate void Proc()</code>.</p>
<pre><code>public Boolean TryGetValue(TKey key, out TValue value)
{
Boolean got = false;
... | [
{
"answer_id": 384920,
"author": "Anthony Mastrean",
"author_id": 3619,
"author_profile": "https://Stackoverflow.com/users/3619",
"pm_score": 1,
"selected": false,
"text": "public Boolean TryGetValue(TKey key, out TValue value)\n{\n internalLock.AcquireReaderLock(Timeout.Infine);\n ... | 2008/12/21 | [
"https://Stackoverflow.com/questions/384918",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3619/"
] |
384,923 | <p>I have the below query, which basically it retrieves the 5 top most books sold:</p>
<pre><code> select top 5 count(id_book_orddetails) 'books_sold', bk.*
from orderdetails_orddetails ord inner join books_book bk
on ord.id_book_orddetails = bk.id_book
group by id_book, name_book,author_book,desc_book,... | [
{
"answer_id": 384951,
"author": "Jonas Lincoln",
"author_id": 17436,
"author_profile": "https://Stackoverflow.com/users/17436",
"pm_score": 0,
"selected": false,
"text": "desc_book"
},
{
"answer_id": 384957,
"author": "Bill Karwin",
"author_id": 20860,
"author_profil... | 2008/12/21 | [
"https://Stackoverflow.com/questions/384923",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/44084/"
] |
384,931 | <p>I'm creating an WPF app, so I'm mostly working with the ImageSource class for icons. However, the system tray icon has to be of type <code>System.Drawing.Icon</code>. Is it possible to create such an object from a png image?</p>
<p>I have tried the following:</p>
<pre><code>private static System.Drawing.Icon _pngI... | [
{
"answer_id": 385000,
"author": "Vilx-",
"author_id": 41360,
"author_profile": "https://Stackoverflow.com/users/41360",
"pm_score": 2,
"selected": false,
"text": "public void Convert(string pngPath, string icoPath)\n{\n MultiIcon mIcon = new MultiIcon();\n SingleIcon sIcon = mIcon... | 2008/12/21 | [
"https://Stackoverflow.com/questions/384931",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4055/"
] |
384,935 | <p>On a recent episode of <a href="http://www.dotnetrocks.com/about.aspx" rel="nofollow noreferrer">.NET Rocks</a> (<a href="http://www.dotnetrocks.com/default.aspx?showNum=404" rel="nofollow noreferrer">episode 404)</a>, they mentioned that a lot of Visual Studio issues could be reduced if you set the platform target ... | [
{
"answer_id": 385094,
"author": "Colby Africa",
"author_id": 47164,
"author_profile": "https://Stackoverflow.com/users/47164",
"pm_score": 2,
"selected": false,
"text": "/platform:"
}
] | 2008/12/21 | [
"https://Stackoverflow.com/questions/384935",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1632/"
] |
384,939 | <p>In Javascript, I want my onmouseout event to sleep/pause/wait/ (not sure of the proper terminology here) for three seconds before taking effect. How is that accomplished?</p>
<p>thanks</p>
| [
{
"answer_id": 384946,
"author": "Georg Schölly",
"author_id": 24587,
"author_profile": "https://Stackoverflow.com/users/24587",
"pm_score": 3,
"selected": true,
"text": "function outfunction(event) {\n var that = this; // to be able to use this later.\n window.setTimeout(function(... | 2008/12/21 | [
"https://Stackoverflow.com/questions/384939",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/45429/"
] |
384,955 | <p>Which method do you think is the "best".</p>
<ul>
<li>Use the <code>System.IO.Packaging</code> namespace?</li>
<li>Use interop with the Shell?</li>
<li>Third party library for .NET?</li>
<li>Interop with open source unmanaged DLL?</li>
</ul>
<p>[I can target Framework 3.5; best = easiest to design, implement, and ... | [
{
"answer_id": 384963,
"author": "configurator",
"author_id": 9536,
"author_profile": "https://Stackoverflow.com/users/9536",
"pm_score": 1,
"selected": false,
"text": "System.IO.Packaging"
},
{
"answer_id": 410404,
"author": "Cheeso",
"author_id": 48082,
"author_prof... | 2008/12/21 | [
"https://Stackoverflow.com/questions/384955",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17595/"
] |
384,962 | <p>I have an iPhone app that's shipping (<em>vConqr</em> - you should go and buy it :-) ).
I build the project on several different machines, including a colleague's, and it's been working fine.
However, just recently, on my second dev machine my build fails every time with the error:</p>
<p><code>
/Developer/Libr... | [
{
"answer_id": 5970680,
"author": "grumpit",
"author_id": 325187,
"author_profile": "https://Stackoverflow.com/users/325187",
"pm_score": 1,
"selected": false,
"text": "#!/usr/bin/ruby\n"
}
] | 2008/12/21 | [
"https://Stackoverflow.com/questions/384962",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/32136/"
] |
384,969 | <p>I have an object not written by myself that I need to clone in memory. The object is not tagged <code>ICloneable</code> or <code>Serializable</code> so deep cloning through the interface or serialization will not work. Is there anyway to deep clone this object? A non-safe win32 API call maybe?</p>
| [
{
"answer_id": 384983,
"author": "JoshBerke",
"author_id": 26160,
"author_profile": "https://Stackoverflow.com/users/26160",
"pm_score": 4,
"selected": true,
"text": "ICloneable"
}
] | 2008/12/21 | [
"https://Stackoverflow.com/questions/384969",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4244/"
] |
384,974 | <p>Folks,</p>
<p>I have a webservice that returns data in ISO-8859-1 encoding - since it's not mine, I can't change that :-(</p>
<p>For auditing purposes, I'd like to store the resulting XML from these calls into a SQL Server 2005 table, in which I have a field of type "XML NULL".</p>
<p>From my C# code, I try to st... | [
{
"answer_id": 384985,
"author": "Nathan Koop",
"author_id": 18821,
"author_profile": "https://Stackoverflow.com/users/18821",
"pm_score": 1,
"selected": false,
"text": "_cmd.Parameters.Add(\"@XmlContents\", SqlDbType.Xml);\n"
},
{
"answer_id": 384993,
"author": "Marc Gravell... | 2008/12/21 | [
"https://Stackoverflow.com/questions/384974",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13302/"
] |
384,981 | <p>I want put a div by iframe over a video containing an active player</p>
<p>is it possible ?</p>
| [
{
"answer_id": 384985,
"author": "Nathan Koop",
"author_id": 18821,
"author_profile": "https://Stackoverflow.com/users/18821",
"pm_score": 1,
"selected": false,
"text": "_cmd.Parameters.Add(\"@XmlContents\", SqlDbType.Xml);\n"
},
{
"answer_id": 384993,
"author": "Marc Gravell... | 2008/12/21 | [
"https://Stackoverflow.com/questions/384981",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/48193/"
] |
384,991 | <p>I want to find out which algorithm is the best that can be used for downsizing a raster picture. With best I mean the one that gives the nicest-looking results. I know of bicubic, but is there something better yet? For example, I've heard from some people that Adobe Lightroom has some kind of proprietary algorithm w... | [
{
"answer_id": 60584355,
"author": "tav",
"author_id": 2692494,
"author_profile": "https://Stackoverflow.com/users/2692494",
"pm_score": 0,
"selected": false,
"text": "void area_averaging_image_scale(uint32_t *dst, int dst_width, int dst_height, const uint32_t *src, int src_width, int sr... | 2008/12/21 | [
"https://Stackoverflow.com/questions/384991",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/41360/"
] |
385,023 | <p>I haven't written any C++ in years and now I'm trying to get back into it. I then ran across this and thought about giving up:</p>
<pre><code>typedef enum TokenType
{
blah1 = 0x00000000,
blah2 = 0X01000000,
blah3 = 0X02000000
} TokenType;
</code></pre>
<p>What is this? Why is the <code>typedef</c... | [
{
"answer_id": 385033,
"author": "Ryan Fox",
"author_id": 55,
"author_profile": "https://Stackoverflow.com/users/55",
"pm_score": 7,
"selected": false,
"text": "TokenType my_type;\n"
},
{
"answer_id": 385045,
"author": "mat",
"author_id": 42083,
"author_profile": "htt... | 2008/12/21 | [
"https://Stackoverflow.com/questions/385023",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/36706/"
] |
385,039 | <p>Bjarne Stroustrup writes in his <a href="http://www.research.att.com/~bs/bs_faq2.html#finally" rel="nofollow noreferrer">C++ Style and Technique FAQ</a>, emphasis mine:</p>
<blockquote>
<p>Because C++ supports an alternative that is <strong><em>almost always better</em></strong>: The "resource acquisition is init... | [
{
"answer_id": 385076,
"author": "Matthew Crumley",
"author_id": 2214,
"author_profile": "https://Stackoverflow.com/users/2214",
"pm_score": 4,
"selected": true,
"text": "class RAII_Wrapper\n{\n Resource *resource;\n\npublic:\n RAII_Wrapper() : resource(aquire_resource()) {}\n\n ... | 2008/12/21 | [
"https://Stackoverflow.com/questions/385039",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19100/"
] |
385,042 | <p>I'm a MySQL guy working on a SQL Server project, trying to get a datetime field to show the current time. In MySQL I'd use NOW() but it isn't accepting that.</p>
<pre><code>INSERT INTO timelog (datetime_filed) VALUES (NOW())
</code></pre>
| [
{
"answer_id": 385051,
"author": "Daniel Schaffer",
"author_id": 2596,
"author_profile": "https://Stackoverflow.com/users/2596",
"pm_score": 9,
"selected": true,
"text": "getdate()"
},
{
"answer_id": 385133,
"author": "Ian Varley",
"author_id": 37539,
"author_profile"... | 2008/12/21 | [
"https://Stackoverflow.com/questions/385042",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/428190/"
] |
385,052 | <p>Hi I need some help with the following scenario in php. I have a db with users every user has an ID, have_card and want_card. I know how to make a direct match (one user trades with another user). But if there is no direct match but there is a circular swap like:</p>
<p>User #1 has card A wants card B</p>
<p>User ... | [
{
"answer_id": 385062,
"author": "Alex Renz",
"author_id": 48188,
"author_profile": "https://Stackoverflow.com/users/48188",
"pm_score": 1,
"selected": false,
"text": "- if user two wants, what user one has, everything is fine an we're done\n- if not, continue\n"
},
{
"answer_id"... | 2008/12/21 | [
"https://Stackoverflow.com/questions/385052",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
385,061 | <p>I have an NSAttributedString <code>s</code> and an integer <code>i</code> and I'd like a function that takes <code>s</code> and <code>i</code> and returns a new NSAttributedString that has a (stringified) <code>i</code> prepended to <code>s</code>.</p>
<p>It looks like some combination of <code>-stringWithFormat:</... | [
{
"answer_id": 385211,
"author": "Georg Schölly",
"author_id": 24587,
"author_profile": "https://Stackoverflow.com/users/24587",
"pm_score": 3,
"selected": false,
"text": "// convert it to a mutable string\nNSMutableAttributedString *newString;\nnewString = [[NSMutableAttributedString al... | 2008/12/21 | [
"https://Stackoverflow.com/questions/385061",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4234/"
] |
385,082 | <p>I was working on a project that missbehaved, for some reasons no exception was thrown even when it should have. Deep down I have found this kind of error handling:</p>
<pre><code>try {
m.invoke(parentObject, paramObj);
} catch (IllegalArgumentException e) {
new CaseLibException(e);
} catch (IllegalAccessExc... | [
{
"answer_id": 385101,
"author": "Ed S.",
"author_id": 1053,
"author_profile": "https://Stackoverflow.com/users/1053",
"pm_score": 4,
"selected": false,
"text": "if (x = 0) {\n...\n}\n"
},
{
"answer_id": 385159,
"author": "Tom Hawtin - tackline",
"author_id": 4725,
"a... | 2008/12/21 | [
"https://Stackoverflow.com/questions/385082",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/48181/"
] |
385,088 | <p>Are there any good tools available to track memory usage In a tomcat java webapp? I'm looking for something that can give a breakdown by class or package.</p>
<p>Thanks, J</p>
| [
{
"answer_id": 385210,
"author": "Kire Haglin",
"author_id": 2049208,
"author_profile": "https://Stackoverflow.com/users/2049208",
"pm_score": 2,
"selected": false,
"text": "jrcmd <pid> print_object_summary"
}
] | 2008/12/21 | [
"https://Stackoverflow.com/questions/385088",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/44721/"
] |
385,095 | <p>I have a samba network share on a FreeBSD box that I use for development.</p>
<p>I have it set up as a shared drive on my WinXP box, and it works fine.</p>
<p>However, if I reboot the xp box, the shared drive will not be accessible until I click on it and enter the password, even though I have set it to use the co... | [
{
"answer_id": 386212,
"author": "Grey Panther",
"author_id": 1265,
"author_profile": "https://Stackoverflow.com/users/1265",
"pm_score": 2,
"selected": false,
"text": "NET USE \\\\computer\\share \"password\" /USER:user\n"
},
{
"answer_id": 386236,
"author": "Alnitak",
"... | 2008/12/21 | [
"https://Stackoverflow.com/questions/385095",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/27580/"
] |
385,098 | <p>I am trying to read CSS selectors in my stylesheets with the <code>document.styleSheets</code> array. It works fine with <code><link></code> and <code><style></code> tags, but when I use <code>@import</code> inside a <code><style></code> it doesn't show up in the array - only as a cssRule (style is... | [
{
"answer_id": 385104,
"author": "Christoph",
"author_id": 48015,
"author_profile": "https://Stackoverflow.com/users/48015",
"pm_score": 5,
"selected": true,
"text": "document.styleSheets[0].cssRules[0].styleSheet.cssRules;\n"
},
{
"answer_id": 386049,
"author": "joolss",
... | 2008/12/21 | [
"https://Stackoverflow.com/questions/385098",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/27741/"
] |
385,099 | <p>I'm building an app that pulls data in from an excel .csv file and applying various levels of formatting, moving and mapping. Most everything is figured out except for one hitch with cleaning the data. Here is an example of the data from Excel:</p>
<ol>
<li>GREAT PERFORMANCES,GREAT PERFORMANCES,57744 ROUND LAKE R... | [
{
"answer_id": 385113,
"author": "Bill Karwin",
"author_id": 20860,
"author_profile": "https://Stackoverflow.com/users/20860",
"pm_score": 3,
"selected": false,
"text": "LOAD DATA INFILE 'mydata.csv'\n FIELDS TERMINATED BY ','\n OPTIONALLY ENCLOSED BY '\"';\n"
}
] | 2008/12/21 | [
"https://Stackoverflow.com/questions/385099",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/42979/"
] |
385,132 | <p>In a system level programming language like C, C++ or D, what is the best type/encoding for storing latitude and longitude?</p>
<p>The options I see are:</p>
<ul>
<li>IEEE-754 FP as degrees or radians</li>
<li>degrees or radians stored as a fixed point value in an 32 or 64 bit int</li>
<li>mapping of an integer ra... | [
{
"answer_id": 9059066,
"author": "Pykler",
"author_id": 742390,
"author_profile": "https://Stackoverflow.com/users/742390",
"pm_score": 4,
"selected": false,
"text": "0 decimal places, 1.0 = 111 km\n...\n7 decimal places, 0.0000001 = 1.11 cm\n8 decimal places, 0.00000001 = 1.11 mm\n"
... | 2008/12/21 | [
"https://Stackoverflow.com/questions/385132",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1343/"
] |
385,141 | <p>I have a WPF application that is using a custom style. In it I have a set of buttons that each have a custom background image. For each button, I'm supplying a normal and a mouse down image. Is there a simple way to do this with a single style (and customize each button on a case by case basis)? </p>
<p>Current... | [
{
"answer_id": 385671,
"author": "justin.m.chase",
"author_id": 12958,
"author_profile": "https://Stackoverflow.com/users/12958",
"pm_score": 0,
"selected": false,
"text": "<Style x:Key=\"imageButton\" ControlType=\"{x:Type Button}\">\n ...\n</Style>\n\n<Button Style=\"{DynamicResourc... | 2008/12/21 | [
"https://Stackoverflow.com/questions/385141",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10086/"
] |
385,150 | <p>I have here a piece of PHP code that deletes a directory and all files in it if present.
However, I'm not too sure about it, it looks to me like it'll delete all sub-maps too and then files in those and so on...</p>
<p>I basically want to give and optional true/false parameter to select wheter or not to delete sub ... | [
{
"answer_id": 385169,
"author": "troelskn",
"author_id": 18180,
"author_profile": "https://Stackoverflow.com/users/18180",
"pm_score": 4,
"selected": true,
"text": "realpath"
},
{
"answer_id": 385172,
"author": "nickf",
"author_id": 9021,
"author_profile": "https://S... | 2008/12/21 | [
"https://Stackoverflow.com/questions/385150",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11795/"
] |
385,193 | <p>I previously <a href="https://stackoverflow.com/questions/322659/sendmail-and-mx-records-when-mail-server-is-not-on-web-host">asked a question regarding MX records</a> (and appreciate the thoughtful answers I received from SO'ers). Now that that problem is resolved, I want to step back and ask why there are MX reco... | [
{
"answer_id": 385280,
"author": "Alnitak",
"author_id": 6782,
"author_profile": "https://Stackoverflow.com/users/6782",
"pm_score": 6,
"selected": true,
"text": "MX"
}
] | 2008/12/21 | [
"https://Stackoverflow.com/questions/385193",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/32168/"
] |
385,195 | <p>We've licensed a commercial product (product not important in this context), which is limited by the number of concurrent users. Users access this product by going through a Spring Controller.</p>
<p>We have N licenses for this product, and if N+1 users access it, they get a nasty error message about needing to bu... | [
{
"answer_id": 385689,
"author": "TRF",
"author_id": 48230,
"author_profile": "https://Stackoverflow.com/users/48230",
"pm_score": 4,
"selected": true,
"text": "public class CommercialObjectFactory extends BasePoolableObjectFactory { \n // for makeObject we'll simply return a new comm... | 2008/12/21 | [
"https://Stackoverflow.com/questions/385195",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/48208/"
] |
385,203 | <p>I've read a few posts where people have stated (not suggested, not discussed, not offered) that PHP should not be used for large projects.</p>
<p>Being a primarily PHP developer, I ask two questions:</p>
<ol>
<li>What defines a "large project"?</li>
<li>Why not? What are the pitfalls of using PHP</li>
</ol>
<p>I... | [
{
"answer_id": 385224,
"author": "cletus",
"author_id": 18393,
"author_profile": "https://Stackoverflow.com/users/18393",
"pm_score": 4,
"selected": false,
"text": "function get_users($surname) {\n mysql_query(\"select * from users where surname = '$surname'\");\n ...\n}\n"
},
{
... | 2008/12/21 | [
"https://Stackoverflow.com/questions/385203",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/42979/"
] |
385,219 | <p>I have this code..</p>
<pre><code> Models.Person p = new testmvc.Models.Person { Firstname = "yongeks", Lastname = "ucab" };
Models.Person p2 = new testmvc.Models.Person { Firstname = "lyn", Lastname = "torreon" };
string q = JavaScriptConvert.SerializeObject(new String[] { JavaScriptConver... | [
{
"answer_id": 385232,
"author": "Mike Scott",
"author_id": 43649,
"author_profile": "https://Stackoverflow.com/users/43649",
"pm_score": 3,
"selected": false,
"text": "Models.Person p2 = new testmvc.Models.Person { Firstname = \"lyn\", Lastname = \"torreon\" };\nreturn Json( p2 );\n"
... | 2008/12/21 | [
"https://Stackoverflow.com/questions/385219",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/31445/"
] |
385,237 | <p>I know this is a simple question, I'm just curious.</p>
| [
{
"answer_id": 385232,
"author": "Mike Scott",
"author_id": 43649,
"author_profile": "https://Stackoverflow.com/users/43649",
"pm_score": 3,
"selected": false,
"text": "Models.Person p2 = new testmvc.Models.Person { Firstname = \"lyn\", Lastname = \"torreon\" };\nreturn Json( p2 );\n"
... | 2008/12/22 | [
"https://Stackoverflow.com/questions/385237",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2484/"
] |
385,238 | <blockquote>
<p>Edit again:
I think I get it now. All I need to do then is use the current class colon the class I want to be able to access? Person : Student, or person : teacher
Is that correct?</p>
</blockquote>
<p>I'm currently trying to learn the ins and outs of object oriented programming. Currently I hav... | [
{
"answer_id": 385247,
"author": "Lasse V. Karlsen",
"author_id": 267,
"author_profile": "https://Stackoverflow.com/users/267",
"pm_score": 2,
"selected": false,
"text": "public class Student\n{\n int grade; //0 - 100 as opposed to the characters A, B, C, etc.\n string teacher; //F... | 2008/12/22 | [
"https://Stackoverflow.com/questions/385238",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/48214/"
] |
385,253 | <p>I know this is supposed to output what kind of shell I'm using, which I think it does, because it outputs "bash-3.2", but it doesn't quite do that, because it actually changes my prompt to "bash-3.2$". What else is going on? When I do Ctrl+D, I go back to my original prompt. Is this starting the bash shell? I th... | [
{
"answer_id": 385263,
"author": "Charlie Martin",
"author_id": 35092,
"author_profile": "https://Stackoverflow.com/users/35092",
"pm_score": 2,
"selected": false,
"text": "$ $SHELL\n"
},
{
"answer_id": 385264,
"author": "Bill Karwin",
"author_id": 20860,
"author_prof... | 2008/12/22 | [
"https://Stackoverflow.com/questions/385253",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2484/"
] |
385,262 | <p>I want to send a custom "Accept" header in my request when using urllib2.urlopen(..). How do I do that?</p>
| [
{
"answer_id": 385411,
"author": "pantsgolem",
"author_id": 9261,
"author_profile": "https://Stackoverflow.com/users/9261",
"pm_score": 8,
"selected": true,
"text": "Request"
},
{
"answer_id": 32026467,
"author": "Pedro Lobito",
"author_id": 797495,
"author_profile": ... | 2008/12/22 | [
"https://Stackoverflow.com/questions/385262",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/16432/"
] |
385,269 | <p>I have tried to use some of the widgets in <code>JQuery UI</code> on an <code>Asp.Net MVC</code> site without luck.</p>
<p>For example the basic datepicker from <a href="http://ui.jquery.com/repository/tags/latest/demos/functional/#ui.datepicker" rel="nofollow noreferrer">jQuery UI - functional demos</a>.</p>
<p>I... | [
{
"answer_id": 385283,
"author": "Andy Hume",
"author_id": 46460,
"author_profile": "https://Stackoverflow.com/users/46460",
"pm_score": 2,
"selected": false,
"text": "#basics"
},
{
"answer_id": 385288,
"author": "Frank Krueger",
"author_id": 338,
"author_profile": "h... | 2008/12/22 | [
"https://Stackoverflow.com/questions/385269",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/459417/"
] |
385,272 | <p>I have a simple structured XML file like this:</p>
<pre><code><ttest ID="ttest00001", NickName="map00001"/>
<ttest ID="ttest00002", NickName="map00002"/>
<ttest ID="ttest00003", NickName="map00003"/>
<ttest ID="ttest00004", NickName="map00004"/>
</code></pre>
<p>.....
This xml file can be a... | [
{
"answer_id": 385289,
"author": "Eric Rosenberger",
"author_id": 41624,
"author_profile": "https://Stackoverflow.com/users/41624",
"pm_score": 0,
"selected": false,
"text": "var nicknames = new Dictionary<string, string>();\n\nforeach (XmlNode node in MyXmlDoc.ChildNodes)\n{\n if (no... | 2008/12/22 | [
"https://Stackoverflow.com/questions/385272",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
385,292 | <p>Ive install wamp server on my PC(it has no internet or intranet connection, Windows XP -OS).
But when I access MYSQL this error popup.
Can you give any idea on how can i resolve this error.
thank you very much.</p>
<p>Cant connect to MYSQL server on 'localhost' (10061)</p>
| [
{
"answer_id": 385460,
"author": "Wouter van Nifterick",
"author_id": 38813,
"author_profile": "https://Stackoverflow.com/users/38813",
"pm_score": 3,
"selected": false,
"text": "telnet localhost 3306\n"
}
] | 2008/12/22 | [
"https://Stackoverflow.com/questions/385292",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
385,298 | <p>I want to overload operators < and > to allow the searching of an int value inside a BST (which ain't designed to store ints but rather words).</p>
<p>For those who are wondering why is this overload being done on the first place please check <a href="https://stackoverflow.com/questions/384587/c-im-stuck-filling... | [
{
"answer_id": 385432,
"author": "e.James",
"author_id": 33686,
"author_profile": "https://Stackoverflow.com/users/33686",
"pm_score": 2,
"selected": true,
"text": "DataType"
},
{
"answer_id": 385524,
"author": "Flame",
"author_id": 5387,
"author_profile": "https://St... | 2008/12/22 | [
"https://Stackoverflow.com/questions/385298",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/45963/"
] |
385,300 | <p>I'm trying to create a route for the following urls:
www.mysite.com/user/username
www.mysite.com/user/username/pictures</p>
<p>I tried doing that with the following code:</p>
<pre><code>routes.MapRoute(
"UserProfile",
"user/{sn}/{action}",
new { controller = "User", action = "In... | [
{
"answer_id": 385432,
"author": "e.James",
"author_id": 33686,
"author_profile": "https://Stackoverflow.com/users/33686",
"pm_score": 2,
"selected": true,
"text": "DataType"
},
{
"answer_id": 385524,
"author": "Flame",
"author_id": 5387,
"author_profile": "https://St... | 2008/12/22 | [
"https://Stackoverflow.com/questions/385300",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/23695/"
] |
385,305 | <p>For a game I am developing I need an algorithm that can calculate intersections. I have solved the problem, but the way I have done it is really nasty and I am hoping someone here might have a more elegant solution.</p>
<p>A pair of points represent the end points of a line drawn between them. Given two pairs of po... | [
{
"answer_id": 385319,
"author": "Graviton",
"author_id": 3834,
"author_profile": "https://Stackoverflow.com/users/3834",
"pm_score": 2,
"selected": false,
"text": "public struct PointD\n{\n public double X { get; set; }\n public double Y { get; set; }\n}\n\n/// <summary>\n/// Find... | 2008/12/22 | [
"https://Stackoverflow.com/questions/385305",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
385,306 | <p>I've got a very strange bug cropping up in some PHP code I've got. The page is managing student enrolments in courses. On the page is a table of the student's courses, and each row has a number of dates: when they enrolled, when they completed, when they passed the assessment and when they picked up their certificat... | [
{
"answer_id": 385453,
"author": "OIS",
"author_id": 36175,
"author_profile": "https://Stackoverflow.com/users/36175",
"pm_score": 3,
"selected": true,
"text": "e.resultDate = new Date(year, month - 1, day);\n"
}
] | 2008/12/22 | [
"https://Stackoverflow.com/questions/385306",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9021/"
] |
385,325 | <p>I'm looking for a way to convert numbers to string format, dropping any redundant '.0' </p>
<p>The input data is a mix of floats and strings. Desired output:</p>
<p>0 --> '0'</p>
<p>0.0 --> '0'</p>
<p>0.1 --> '0.1'</p>
<p>1.0 --> '1'</p>
<p>I've come up with the following generator expression, but I wonder ... | [
{
"answer_id": 385360,
"author": "Daniel Naab",
"author_id": 32638,
"author_profile": "https://Stackoverflow.com/users/32638",
"pm_score": 2,
"selected": false,
"text": "from decimal import Decimal\n\ndef format_number(i):\n return '%g' % (Decimal(str(i)))\n"
},
{
"answer_id":... | 2008/12/22 | [
"https://Stackoverflow.com/questions/385325",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/22893/"
] |
385,327 | <p>I recently started using vim 7 (previously vim 6) and the <code>smartindent</code> setting. For the most part, it works well, though I'm so used to typing a tab after an open brace that it is almost counter-productive.</p>
<p>However, there is one piece of maniacal behaviour. When editing a shell script, I try to... | [
{
"answer_id": 385694,
"author": "Jonathan Leffler",
"author_id": 15168,
"author_profile": "https://Stackoverflow.com/users/15168",
"pm_score": 2,
"selected": false,
"text": ":set cindent"
},
{
"answer_id": 385728,
"author": "PolyThinker",
"author_id": 47707,
"author_... | 2008/12/22 | [
"https://Stackoverflow.com/questions/385327",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15168/"
] |
385,332 | <p>I am writing a simple application that lets a user upload images. After the upload, the user can tag them or remove them.</p>
<p>I figured out how to upload the files and save them once the files are uploaded. I am keeping tracking of a global path where images are kept. In the database I keep the meta data about t... | [
{
"answer_id": 385500,
"author": "TRF",
"author_id": 48230,
"author_profile": "https://Stackoverflow.com/users/48230",
"pm_score": 0,
"selected": false,
"text": "import java.io.BufferedInputStream;\nimport java.io.BufferedOutputStream;\nimport java.io.File;\nimport java.io.FileInputStrea... | 2008/12/22 | [
"https://Stackoverflow.com/questions/385332",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/48230/"
] |
385,345 | <p>How would you access the cache from a jQuery ajax call? </p>
<p>I'm using jquery to do some data verification and quick data access. I have a static web-method that jquery is calling via json to return a value. I don't want to call to the database everytime so I'd like to cache the data I'm hitting, but I can't det... | [
{
"answer_id": 385383,
"author": "Mark Brackett",
"author_id": 2199,
"author_profile": "https://Stackoverflow.com/users/2199",
"pm_score": 6,
"selected": true,
"text": "System.Web.HttpContext.Current.Cache"
}
] | 2008/12/22 | [
"https://Stackoverflow.com/questions/385345",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7870/"
] |
385,361 | <p>What are the different types of encapsulation?</p>
<p>Am I right in thinking this basically refers to central OO concepts such as Abstraction, Polymorphism and Inheritance?</p>
<p>My understanding of encapsulation is that it is a method of hiding data / functionality, but I never really considered Polymorphism or ... | [
{
"answer_id": 38035733,
"author": "Abhijeet",
"author_id": 452708,
"author_profile": "https://Stackoverflow.com/users/452708",
"pm_score": 0,
"selected": false,
"text": "class Person {\n String name;\n int age;\n\n void talk() {\n }\n\n void think() {\n }\n\n void w... | 2008/12/22 | [
"https://Stackoverflow.com/questions/385361",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/40848/"
] |
385,367 | <p>Is there a standard for what actions <kbd>F5</kbd> and <kbd>Ctrl</kbd>+<kbd>F5</kbd> trigger in web browsers?</p>
<p>I once did experiment in IE6 and Firefox 2.x. The <kbd>F5</kbd> refresh would trigger a HTTP request sent to the server with an <code>If-Modified-Since</code> header, while <kbd>Ctrl</kbd>+<kbd>F5</k... | [
{
"answer_id": 385491,
"author": "some",
"author_id": 36866,
"author_profile": "https://Stackoverflow.com/users/36866",
"pm_score": 9,
"selected": false,
"text": "Cache-Control: max-age=0"
},
{
"answer_id": 1163919,
"author": "mermshaus",
"author_id": 90237,
"author_p... | 2008/12/22 | [
"https://Stackoverflow.com/questions/385367",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/26349/"
] |
385,370 | <p>I have some code in MS VC++ 6.0 that I am debugging. For some reason, at this certain point where I am trying to delete some dynamically allocated memory, it breaks and I get a pop up message box saying "User Breakpoint called from code at blah blah".. then the Disassembly window pops up and I see</p>
<pre><code>*... | [
{
"answer_id": 385373,
"author": "Michael Burr",
"author_id": 12711,
"author_profile": "https://Stackoverflow.com/users/12711",
"pm_score": 4,
"selected": true,
"text": "_CrtIsValidHeapPointer()"
},
{
"answer_id": 385387,
"author": "Klaim",
"author_id": 2368,
"author_... | 2008/12/22 | [
"https://Stackoverflow.com/questions/385370",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/29482/"
] |
385,394 | <p>I have a small project I want to try porting to Python 3 - how do I go about this?</p>
<p>I have made made the code run without warnings using <code>python2.6 -3</code> (mostly removing <code>.has_key()</code> calls), but I am not sure of the best way to use the 2to3 tool.</p>
<blockquote>
<p>Use the 2to3 tool t... | [
{
"answer_id": 385397,
"author": "dbr",
"author_id": 745,
"author_profile": "https://Stackoverflow.com/users/745",
"pm_score": 4,
"selected": true,
"text": "patch"
}
] | 2008/12/22 | [
"https://Stackoverflow.com/questions/385394",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/745/"
] |
385,401 | <p>What would you suggest as a replacement to the Maven Java build toolset? Just plain Ant scripts? SCons?</p>
| [
{
"answer_id": 385498,
"author": "Limbic System",
"author_id": 1274957,
"author_profile": "https://Stackoverflow.com/users/1274957",
"pm_score": 4,
"selected": true,
"text": "maven-ant-plugin"
}
] | 2008/12/22 | [
"https://Stackoverflow.com/questions/385401",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18741/"
] |
385,403 | <p>I come from classes object orientation languages and recently I have been learning those fancy dynamic languages (JavaScript, Python and Lua) and I want some tips about how to use OO in those languages. It would be useful to know the pitfalls and the shortcomings of such approach and the advantages compared to tradi... | [
{
"answer_id": 385467,
"author": "Eugene Lazutkin",
"author_id": 26394,
"author_profile": "https://Stackoverflow.com/users/26394",
"pm_score": 3,
"selected": false,
"text": "var foo = {\n property: 42,\n inc: function(){\n ++this.counter;\n },\n dec: function(){\n ... | 2008/12/22 | [
"https://Stackoverflow.com/questions/385403",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3485/"
] |
385,408 | <p>I want to execute something in a linux shell under a few different conditions, and be able to output the execution time of each execution.</p>
<p>I know I could write a perl or python script that would do this, but is there a way I can do it in the shell? (which happens to be bash)</p>
| [
{
"answer_id": 385418,
"author": "Robert Gamble",
"author_id": 25222,
"author_profile": "https://Stackoverflow.com/users/25222",
"pm_score": 10,
"selected": true,
"text": "time"
},
{
"answer_id": 385422,
"author": "grepsedawk",
"author_id": 14388,
"author_profile": "h... | 2008/12/22 | [
"https://Stackoverflow.com/questions/385408",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/41613/"
] |
385,420 | <p>Does PHP have the ability to watch a variable (or object property) and run a function when its value changes, similar to <a href="https://developer.mozilla.org/En/Core_JavaScript_1.5_Reference/Global_Objects/Object/Watch" rel="nofollow noreferrer">Gecko's Javascript <code>watch</code> function</a>?</p>
| [
{
"answer_id": 385450,
"author": "ieure",
"author_id": 45224,
"author_profile": "https://Stackoverflow.com/users/45224",
"pm_score": 1,
"selected": false,
"text": "public function __set($var, $val)\n{\n if ($var == 'interesting') {\n echo \"$var set to: \";\n var_dump($v... | 2008/12/22 | [
"https://Stackoverflow.com/questions/385420",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9021/"
] |
385,441 | <p>This is a sql newbie question.</p>
<p>Basically, I want an extra column to return with my select statement to number the rows.
I'm using mysql.</p>
<p>Eg: </p>
<pre><code>select * from friends
David
Steve
Joe
</code></pre>
<p>What is the syntax to get:</p>
<pre><code>1 David
2 Steve
3 Joe
</code></pre>
| [
{
"answer_id": 385448,
"author": "Eugene Yokota",
"author_id": 3827,
"author_profile": "https://Stackoverflow.com/users/3827",
"pm_score": 0,
"selected": false,
"text": "CREATE TABLE #Foo (\n [FooId] [int] IDENTITY(1,1) NOT NULL,\n [Name] varchar(255)\n)\n\nSELECT *\nFROM F... | 2008/12/22 | [
"https://Stackoverflow.com/questions/385441",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/45066/"
] |
385,451 | <p>I have a WCF RESTFul service declared thus:</p>
<pre><code>[ServiceContract]
public interface IGasPriceService
{
[OperationContract]
[WebGet
(ResponseFormat = WebMessageFormat.Xml,
BodyStyle = WebMessageBodyStyle.Bare,
UriTemplate = "/GetGasPrice/For/ZipCode/{zipCode}"
)]
... | [
{
"answer_id": 385458,
"author": "tvanfosson",
"author_id": 12950,
"author_profile": "https://Stackoverflow.com/users/12950",
"pm_score": 3,
"selected": false,
"text": " http://localhost:7002/SetGasPrice/For/ZipCode/45678/Price/7.80\n"
},
{
"answer_id": 625019,
"author": "Com... | 2008/12/22 | [
"https://Stackoverflow.com/questions/385451",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
385,497 | <p>My situation is as follow:</p>
<ol>
<li>I have an application that can be started only a fixed number of times (less than 50).</li>
<li>A separate central process to manage other processes is not allowed due to business requirement. (ie. if a nice solution that involves ONLY the application processes is still accep... | [
{
"answer_id": 385662,
"author": "gimel",
"author_id": 6491,
"author_profile": "https://Stackoverflow.com/users/6491",
"pm_score": 0,
"selected": false,
"text": "using System;\nusing System.Collections.Generic;\nusing System.Collections.Specialized;\nusing System.Text;\nusing System.Mana... | 2008/12/22 | [
"https://Stackoverflow.com/questions/385497",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/48254/"
] |
385,506 | <p>As Knuth said,</p>
<blockquote>
<p>We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil.</p>
</blockquote>
<p>This is something which often comes up in Stack Overflow answers to questions like "which is the most efficient loop mechanism", "SQL optim... | [
{
"answer_id": 385529,
"author": "Norman Ramsey",
"author_id": 41661,
"author_profile": "https://Stackoverflow.com/users/41661",
"pm_score": 8,
"selected": true,
"text": "for (p = q; p < lim; p++)\n"
},
{
"answer_id": 385767,
"author": "PhiLho",
"author_id": 15459,
"a... | 2008/12/22 | [
"https://Stackoverflow.com/questions/385506",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9021/"
] |
385,530 | <p><code>AVFoundation.framework</code> is not where the documentation says it should be. I have iPhone SDK 2.2 installed (never had previous sdk versions installed) and I can't find that folder under <code>/System/Library/Frameworks</code></p>
<p>I did find it under</p>
<pre><code> /Developer/Platforms/iPhoneOS.platf... | [
{
"answer_id": 385820,
"author": "rustyshelf",
"author_id": 6044,
"author_profile": "https://Stackoverflow.com/users/6044",
"pm_score": 5,
"selected": true,
"text": "#import <AVFoundation/AVAudioPlayer.h>\n"
},
{
"answer_id": 580736,
"author": "user70242",
"author_id": 70... | 2008/12/22 | [
"https://Stackoverflow.com/questions/385530",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/44091/"
] |
385,531 | <p>I have several functions that I wrote and I use regularly on my servers, is there a way I can add them to the core so I don't have to include them from external files?</p>
<p>I am running PHP5</p>
| [
{
"answer_id": 385701,
"author": "OIS",
"author_id": 36175,
"author_profile": "https://Stackoverflow.com/users/36175",
"pm_score": 0,
"selected": false,
"text": "use My\\Functions\\Math as Math;\nMath::calcThis($i);\n"
}
] | 2008/12/22 | [
"https://Stackoverflow.com/questions/385531",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/115/"
] |
385,532 | <p>Is there a way to set up a second persistence.xml file in a Maven project such that it is used for testing instead of the normal one that is used for deployment?</p>
<p>I tried putting a persistence.xml into src/test/resources/META-INF, which gets copied into target/test-classes/META-INF, but it seems target/classe... | [
{
"answer_id": 1158769,
"author": "macbutch",
"author_id": 141923,
"author_profile": "https://Stackoverflow.com/users/141923",
"pm_score": 1,
"selected": false,
"text": "final Thread currentThread = Thread.currentThread();\nfinal ClassLoader saveClassLoader = currentThread.getContextClas... | 2008/12/22 | [
"https://Stackoverflow.com/questions/385532",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19820/"
] |
385,539 | <p>Mostly for my amusement, I created a <code>makefile</code> in my <code>$HOME/bin</code> directory called <code>rebuild.mk</code>, and made it executable, and the first lines of the file read:</p>
<pre><code>#!/bin/make -f
#
# Comments on what the makefile is for
...
all: ${SCRIPTS} ${LINKS} ...
...
</code></pre>... | [
{
"answer_id": 385548,
"author": "Greg Hewgill",
"author_id": 893,
"author_profile": "https://Stackoverflow.com/users/893",
"pm_score": 4,
"selected": true,
"text": "make"
},
{
"answer_id": 385557,
"author": "dF.",
"author_id": 3002,
"author_profile": "https://Stackov... | 2008/12/22 | [
"https://Stackoverflow.com/questions/385539",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15168/"
] |
385,551 | <p>This is a purely theoretical question.</p>
<p>Given three simple classes:</p>
<pre><code>class Base {
}
class Sub extends Base {
}
class SubSub extends Sub {
}
</code></pre>
<p>And a function meant to operate on these classes:</p>
<pre><code>public static void doSomething(Base b) {
System.out.println("BA... | [
{
"answer_id": 385615,
"author": "Peter Becker",
"author_id": 19820,
"author_profile": "https://Stackoverflow.com/users/19820",
"pm_score": 4,
"selected": true,
"text": "method(Base, Sub)"
}
] | 2008/12/22 | [
"https://Stackoverflow.com/questions/385551",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15055/"
] |
385,556 | <p>Say I have three classes:</p>
<pre><code>class X{};
class Y{};
class Both : public X, public Y {};
</code></pre>
<p>I mean to say I have two classes, and then a third class which extends both (multiple-inheritance).</p>
<p>Now say I have a function defined in another class:</p>
<pre><code>void doIt(X *arg) { }
v... | [
{
"answer_id": 385565,
"author": "Paige Ruten",
"author_id": 813,
"author_profile": "https://Stackoverflow.com/users/813",
"pm_score": 3,
"selected": false,
"text": "jeremy@jeremy-desktop:~/Desktop$ g++ -o test test.cpp\ntest.cpp: In function ‘int main(int, char**)’:\ntest.cpp:18: error:... | 2008/12/22 | [
"https://Stackoverflow.com/questions/385556",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15055/"
] |
385,558 | <p>How do I extract a double value from a string using regex.</p>
<pre><code>import re
pattr = re.compile(???)
x = pattr.match("4.5")
</code></pre>
| [
{
"answer_id": 385597,
"author": "jfs",
"author_id": 4279,
"author_profile": "https://Stackoverflow.com/users/4279",
"pm_score": 6,
"selected": false,
"text": "perldoc perlretut"
},
{
"answer_id": 386177,
"author": "S.Lott",
"author_id": 10661,
"author_profile": "http... | 2008/12/22 | [
"https://Stackoverflow.com/questions/385558",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10522/"
] |
385,572 | <p>I need to convert strings in Python to other types such as unsigned and signed 8, 16, 32, and 64 bit ints, doubles, floats, and strings.</p>
<p>How can I do this?</p>
| [
{
"answer_id": 385580,
"author": "Paige Ruten",
"author_id": 813,
"author_profile": "https://Stackoverflow.com/users/813",
"pm_score": 2,
"selected": false,
"text": "int"
},
{
"answer_id": 385583,
"author": "Adam Rosenfield",
"author_id": 9530,
"author_profile": "http... | 2008/12/22 | [
"https://Stackoverflow.com/questions/385572",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/46646/"
] |
385,605 | <p>If a form in Access DB is set as hidden. Then how to unhide it? so that we can manipulate the form programmentically using vb.net.</p>
<p>Thank you.</p>
| [
{
"answer_id": 385929,
"author": "Fionnuala",
"author_id": 2548,
"author_profile": "https://Stackoverflow.com/users/2548",
"pm_score": 1,
"selected": false,
"text": "Sub FormHidden()\nDim frm\n\n For Each frm In CurrentProject.AllForms\n SetHiddenAttribute acForm, frm.Name, Fal... | 2008/12/22 | [
"https://Stackoverflow.com/questions/385605",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/45255/"
] |
385,614 | <p>We have a data entry portlet that occassionally generates urls in excess of the 2k limit enforced by Internet Explorer. </p>
<p>Is there any way to stop these excessively long urls from being generated without loss of functionality?</p>
| [
{
"answer_id": 385929,
"author": "Fionnuala",
"author_id": 2548,
"author_profile": "https://Stackoverflow.com/users/2548",
"pm_score": 1,
"selected": false,
"text": "Sub FormHidden()\nDim frm\n\n For Each frm In CurrentProject.AllForms\n SetHiddenAttribute acForm, frm.Name, Fal... | 2008/12/22 | [
"https://Stackoverflow.com/questions/385614",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/33889/"
] |
385,620 | <p>I'm programming in PHP and would like to create web pages which have email addresses that are easily read by humans but not easily harvested by spammers. The email addresses are coming from user input, and I think I can identify an address by using a regular expression, but I'm not clear exactly how I should replac... | [
{
"answer_id": 385663,
"author": "M.N",
"author_id": 18615,
"author_profile": "https://Stackoverflow.com/users/18615",
"pm_score": 3,
"selected": false,
"text": "<?php\n header(\"Content-type: image/png\");\n $im = @imagecreate(110, 20)or die(\"Cannot Initialize new GD image stream\");... | 2008/12/22 | [
"https://Stackoverflow.com/questions/385620",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/31671/"
] |
385,629 | <p>I am rendering an OpenGL scene that include some bitmap text. It is my understanding the order I draw things in will determine which items are on top.</p>
<p>However, my bitmap text, even though I draw it last, is not on top!</p>
<p>For instance, I am drawing:</p>
<p>1) Background<br>
2) Buttons<br>
3) Text</p>
... | [
{
"answer_id": 385643,
"author": "Nils Pipenbrinck",
"author_id": 15955,
"author_profile": "https://Stackoverflow.com/users/15955",
"pm_score": 4,
"selected": true,
"text": " glDisable (GL_DEPTH_TEST); // or something related..\n"
}
] | 2008/12/22 | [
"https://Stackoverflow.com/questions/385629",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/407725/"
] |
385,632 | <p>I'm working a piece of code to turn phone numbers into links for mobile phone - I've got it but it feels really dirty.</p>
<pre><code>import re
from string import digits
PHONE_RE = re.compile('([(]{0,1}[2-9]\d{2}[)]{0,1}[-_. ]{0,1}[2-9]\d{2}[-_. ]{0,1}\d{4})')
def numbers2links(s):
result = ""
last_match_... | [
{
"answer_id": 385869,
"author": "Tomalak",
"author_id": 18771,
"author_profile": "https://Stackoverflow.com/users/18771",
"pm_score": 1,
"selected": false,
"text": "((00|\\+)?1)?"
},
{
"answer_id": 387101,
"author": "Kenan Banks",
"author_id": 43089,
"author_profile"... | 2008/12/22 | [
"https://Stackoverflow.com/questions/385632",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/37522/"
] |
385,656 | <p>We have a table, name <em>'employeeReg'</em> with fields</p>
<pre><code>employeeNo | employeeName | Registered_on
</code></pre>
<p>Here <em>Registered_on</em> is a timestamp.</p>
<p>We require an hourly pattern of registrations, over a period of days. eg.</p>
<blockquote>
<p>01 Jan 08 : 12 - 01 PM : 1592 regis... | [
{
"answer_id": 385669,
"author": "Jonathan Leffler",
"author_id": 15168,
"author_profile": "https://Stackoverflow.com/users/15168",
"pm_score": 3,
"selected": true,
"text": "TO_CHAR()"
},
{
"answer_id": 386015,
"author": "M.N",
"author_id": 18615,
"author_profile": "h... | 2008/12/22 | [
"https://Stackoverflow.com/questions/385656",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18615/"
] |
385,658 | <p>I have a page, where I want to dynamically add asp.net user controls.
The scenario is that we want that on specific event of a control, It disposes itself and loads another control in the page.</p>
<p>I am not able to have solution about how to do this?</p>
<p>Anyone have decent idea?</p>
| [
{
"answer_id": 385669,
"author": "Jonathan Leffler",
"author_id": 15168,
"author_profile": "https://Stackoverflow.com/users/15168",
"pm_score": 3,
"selected": true,
"text": "TO_CHAR()"
},
{
"answer_id": 386015,
"author": "M.N",
"author_id": 18615,
"author_profile": "h... | 2008/12/22 | [
"https://Stackoverflow.com/questions/385658",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
385,661 | <p>Notepad++ has a convenient feature: if you select a word in your text (not necessarily a keyword), the word is highlighted throughout the text. Can this be done in Emacs as well? And if so, how? </p>
<p>It doesn't necessarily have to work exactly like Notepad++ (i.e., via selection); ideally, I would like to set up... | [
{
"answer_id": 385673,
"author": "dancavallaro",
"author_id": 42891,
"author_profile": "https://Stackoverflow.com/users/42891",
"pm_score": 3,
"selected": false,
"text": "(global-hi-lock-mode 1)\n"
},
{
"answer_id": 385810,
"author": "ShreevatsaR",
"author_id": 4958,
... | 2008/12/22 | [
"https://Stackoverflow.com/questions/385661",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/45269/"
] |
385,681 | <p>I am developing a web app. which will generate a random link pointing to an image on my server. something like -<a href="http://dummy.com/Images/Image1.jpg?id=19234" rel="nofollow noreferrer">http://dummy.com/Images/Image1.jpg?id=19234</a></p>
<p>Here this link can then be used by anybody on their site, now I just ... | [
{
"answer_id": 385686,
"author": "Oddthinking",
"author_id": 8014,
"author_profile": "https://Stackoverflow.com/users/8014",
"pm_score": 2,
"selected": false,
"text": "link:http://dummy.com/Images/Image1.jpg?id=19234\n"
},
{
"answer_id": 385948,
"author": "Zhaph - Ben Duguid"... | 2008/12/22 | [
"https://Stackoverflow.com/questions/385681",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
385,688 | <h1>Background</h1>
<p>In a C# command-line app I'm writing, several of the parameters have "yes" and "no" as the possible values.</p>
<p>I am storing their input using the Enum type shown below.</p>
<pre><code>enum YesNo
{
Yes,
No
}
</code></pre>
<p>Which is fine - the code works. No problem there. </p>
... | [
{
"answer_id": 385751,
"author": "Jon Skeet",
"author_id": 22656,
"author_profile": "https://Stackoverflow.com/users/22656",
"pm_score": 2,
"selected": false,
"text": "public enum UserWtf\n{\n No,\n Yes,\n FileNotFound\n}\n"
},
{
"answer_id": 385934,
"author": "Danie... | 2008/12/22 | [
"https://Stackoverflow.com/questions/385688",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13477/"
] |
385,707 | <p>How can I tell unix "find" to include in it's recursive search a folder which is softlinked? </p>
| [
{
"answer_id": 385779,
"author": "Jonathan Leffler",
"author_id": 15168,
"author_profile": "https://Stackoverflow.com/users/15168",
"pm_score": 0,
"selected": false,
"text": "-L"
}
] | 2008/12/22 | [
"https://Stackoverflow.com/questions/385707",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4038/"
] |
385,709 | <p>When an application is launched, I need to know for certain methods when they are fired. How to do this using attributes and AOP techniques?</p>
<p>The simplest way is to record the time in the event method such as this:</p>
<pre><code>private void Page_load()
{
DateTime dt = DateTime.Now;
}
</code></pre>
<p>An... | [
{
"answer_id": 385747,
"author": "Jon Skeet",
"author_id": 22656,
"author_profile": "https://Stackoverflow.com/users/22656",
"pm_score": 1,
"selected": false,
"text": "public static void LogEventRaised(string event)\n{\n ...\n}\n"
}
] | 2008/12/22 | [
"https://Stackoverflow.com/questions/385709",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3834/"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.