qid int64 4 22.2M | question stringlengths 18 48.3k | answers list | date stringlengths 10 10 | metadata list |
|---|---|---|---|---|
326,202 | <p>What is a generic list manipulation function in C?
(I saw this when I was going through some materials.)</p>
<p>What is the difference between this function and a function which can accept elements of any kind?</p>
<p>Are they same...? How can we implement them individually if they are not same?</p>
| [
{
"answer_id": 326211,
"author": "Jonathan Leffler",
"author_id": 15168,
"author_profile": "https://Stackoverflow.com/users/15168",
"pm_score": 4,
"selected": true,
"text": "typedef struct list_item list_item;\n\nstruct list_item\n{\n list_item *next;\n ...data for node...\n};\n"
... | 2008/11/28 | [
"https://Stackoverflow.com/questions/326202",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/31116/"
] |
326,205 | <p>What is forward reference in C with respect to pointers?</p>
<p>Can I get an example?</p>
| [
{
"answer_id": 326214,
"author": "strager",
"author_id": 39992,
"author_profile": "https://Stackoverflow.com/users/39992",
"pm_score": 5,
"selected": true,
"text": "struct MyStruct;\nstruct MyStruct *ptr;\nstruct MyStruct var; // ILLEGAL\nptr->member; // ILLEGAL\n\nstruct MyStruct {\n ... | 2008/11/28 | [
"https://Stackoverflow.com/questions/326205",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/31116/"
] |
326,206 | <p>I'm developing a web tool using JSP, where there are many users of multiple kind (i.e. administrators, guest, write-enabled users, ...). Since this will be a subscription based system (i.e. user pay for a 3/6/12 month subscription), I need to enforce at most 1 login per user at the same time.
For example, say Mr. Jo... | [
{
"answer_id": 493992,
"author": "Peter Hilton",
"author_id": 2670,
"author_profile": "https://Stackoverflow.com/users/2670",
"pm_score": 1,
"selected": false,
"text": "HttpSession.getId()"
}
] | 2008/11/28 | [
"https://Stackoverflow.com/questions/326206",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
326,223 | <p>I have an abstract base class and I want to declare a field or a property that will have a different value in each class that inherits from this parent class. </p>
<p>I want to define it in the baseclass so I can reference it in a base class method - for example overriding ToString to say "This object is of type <i... | [
{
"answer_id": 326230,
"author": "Winston Smith",
"author_id": 35086,
"author_profile": "https://Stackoverflow.com/users/35086",
"pm_score": 0,
"selected": false,
"text": "abstract class Base \n{\n protected int myInt;\n protected abstract void setMyInt();\n}\n\nclass Derived : Base \n{\... | 2008/11/28 | [
"https://Stackoverflow.com/questions/326223",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11534/"
] |
326,233 | <p>I have a GridView populated from an ObjectDataSource with two items in its DataKeyNames field. One is the primary key, ID, the other is a category field (the category field is used to add header rows to delineate categories).</p>
<p>Displaying works fine, but I'm trying to create a Delete action. The object's del... | [
{
"answer_id": 9117075,
"author": "Ken Parker",
"author_id": 1185766,
"author_profile": "https://Stackoverflow.com/users/1185766",
"pm_score": 1,
"selected": false,
"text": "ObjectDataSource"
}
] | 2008/11/28 | [
"https://Stackoverflow.com/questions/326233",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7856/"
] |
326,277 | <p>I'm trying to verify that a parameter is an instance of a specific class in Rails:</p>
<pre><code>def schedule(action, *args)
if arg.is_a? Aircraft
...
end
end
</code></pre>
<p>I'm doing this in a library class (the file is in <em>lib/</em>) and I get an <strong>uninitialized constant Aircraft</strong> err... | [
{
"answer_id": 326395,
"author": "Mike Breen",
"author_id": 22346,
"author_profile": "https://Stackoverflow.com/users/22346",
"pm_score": 2,
"selected": false,
"text": "require File.dirname(__FILE__) + \"/../app/models/aircraft\"\n"
},
{
"answer_id": 326471,
"author": "Daniel... | 2008/11/28 | [
"https://Stackoverflow.com/questions/326277",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/341/"
] |
326,309 | <pre><code>abstract class Foo
{
private List<Object> container;
private bool update;
Foo Foo()
{
container = new List<object>();
update = false;
}
public abstract Bar CreateBar();
public void BeginUpdate()
{
if (!update)
{
Thread... | [
{
"answer_id": 326319,
"author": "krosenvold",
"author_id": 23691,
"author_profile": "https://Stackoverflow.com/users/23691",
"pm_score": 3,
"selected": true,
"text": "public List<Object> Objects\n{\n get\n {\n lock (container)\n {\n return this.container;\... | 2008/11/28 | [
"https://Stackoverflow.com/questions/326309",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
326,321 | <p>I am trying to create an expression tree that represents the following:</p>
<pre><code>myObject.childObjectCollection.Any(i => i.Name == "name");
</code></pre>
<p>Shortened for clarity, I have the following:</p>
<pre><code>//'myObject.childObjectCollection' is represented here by 'propertyExp'
//'i => i.Nam... | [
{
"answer_id": 326496,
"author": "Barry Kelly",
"author_id": 3712,
"author_profile": "https://Stackoverflow.com/users/3712",
"pm_score": 7,
"selected": true,
"text": "GetAnyExpression<T>"
},
{
"answer_id": 18129261,
"author": "Aaron Heusser",
"author_id": 2662996,
"au... | 2008/11/28 | [
"https://Stackoverflow.com/questions/326321",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/27805/"
] |
326,339 | <p>I've heard some people saying that enums are evil and shouldn't be used in web services because of the mismatches that could occur between the server and the client if some values are assigned, or if the enum is marked with the <a href="http://msdn.microsoft.com/en-us/library/system.flagsattribute(VS.71).aspx" rel="... | [
{
"answer_id": 375054,
"author": "Greg Beech",
"author_id": 13552,
"author_profile": "https://Stackoverflow.com/users/13552",
"pm_score": 3,
"selected": false,
"text": "xsd:enumeration"
},
{
"answer_id": 21148284,
"author": "BalintN",
"author_id": 1617585,
"author_pro... | 2008/11/28 | [
"https://Stackoverflow.com/questions/326339",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/29407/"
] |
326,344 | <p>I've read a little bit about unit testing and was wondering how YOU unit test. Apparently unit testing is supposed to break a program down into very small "units" and test functionality from there.</p>
<p>But I'm wondering, is it enough to unit test a class? Or do you take it even further and unit test algorithms... | [
{
"answer_id": 326624,
"author": "Mr.Ree",
"author_id": 37946,
"author_profile": "https://Stackoverflow.com/users/37946",
"pm_score": 1,
"selected": false,
"text": "template<class TYPE> inline TYPE MIN(const TYPE & x, const TYPE & y) { return x > y ? y : x; }\ntemplate<class TYPE> inline... | 2008/11/28 | [
"https://Stackoverflow.com/questions/326344",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/38317/"
] |
326,350 | <p>I want to do a simple role authentication in .NET - but am lost in the profusion of apis...</p>
<p>I would like to have a web.config per directory with role access like:</p>
<pre><code><authorization>
<allow roles="admin"/>
<deny users="*"/>
</authorization>
</code></pre>
<p>And in... | [
{
"answer_id": 362838,
"author": "J c",
"author_id": 25837,
"author_profile": "https://Stackoverflow.com/users/25837",
"pm_score": 0,
"selected": false,
"text": "<connectionStrings>\n <add name=\"LocalPolicyStore\" connectionString=\"msxml://C:/AzManStore.xml\"/>\n</connectionStrings>\n... | 2008/11/28 | [
"https://Stackoverflow.com/questions/326350",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/37955/"
] |
326,352 | <p>I'm using some meta-programming to generate a bunch of methods in ruby like so:</p>
<pre><code>class EmotionalObject
def self.mood( name, *details )
define_method(name) do
# ...
end
end
mood :happy, #...
mood :sad, #...
mood :ebuillent, #...
#...
end
</code></pre>
<p>I know that I can p... | [
{
"answer_id": 362838,
"author": "J c",
"author_id": 25837,
"author_profile": "https://Stackoverflow.com/users/25837",
"pm_score": 0,
"selected": false,
"text": "<connectionStrings>\n <add name=\"LocalPolicyStore\" connectionString=\"msxml://C:/AzManStore.xml\"/>\n</connectionStrings>\n... | 2008/11/28 | [
"https://Stackoverflow.com/questions/326352",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9859/"
] |
326,365 | <p>Is there a way to change the connection string of a DataBase object in Enterprise Library at runtime? I've found <a href="http://blog.benday.com/archive/2005/05/05/357.aspx" rel="nofollow noreferrer">this</a> link but its a little bit outdated (2005)</p>
<p>I've also found <a href="https://stackoverflow.com/questio... | [
{
"answer_id": 2028370,
"author": "Junior Mayhé",
"author_id": 66708,
"author_profile": "https://Stackoverflow.com/users/66708",
"pm_score": 2,
"selected": false,
"text": "using Microsoft.Practices.EnterpriseLibrary.Data;\nusing Microsoft.Practices.EnterpriseLibrary.Configuration;\nusing... | 2008/11/28 | [
"https://Stackoverflow.com/questions/326365",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14533/"
] |
326,384 | <p>Yesterday I've tried to get serious about rightly caching some PHP generated pages (think "Articles with comments"). Big fail.</p>
<p>Long story short: I set the ETag header, set the Last-Modified one and check server side every Article browser request with them to see if I can send back a 304.</p>
<p>The problem ... | [
{
"answer_id": 334224,
"author": "mkoeller",
"author_id": 33433,
"author_profile": "https://Stackoverflow.com/users/33433",
"pm_score": -1,
"selected": false,
"text": "about:cache\n"
}
] | 2008/11/28 | [
"https://Stackoverflow.com/questions/326384",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/27958/"
] |
326,387 | <p>I'm watching Stephen A Bohlen's excellent <a href="http://www.summerofnhibernate.com/" rel="nofollow noreferrer">Summer of NHibernate</a> series, and have been watching him interact with CodeRush. I've recently installed ReSharper (I'm a ReSharper newbie), and I'm trying to find some of the ReSharper productivity e... | [
{
"answer_id": 327778,
"author": "Howard Pinsley",
"author_id": 7961,
"author_profile": "https://Stackoverflow.com/users/7961",
"pm_score": 0,
"selected": false,
"text": "Class1 c = new Class1();\n"
},
{
"answer_id": 426810,
"author": "SwampyFox",
"author_id": 32044,
... | 2008/11/28 | [
"https://Stackoverflow.com/questions/326387",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7961/"
] |
326,390 | <p>I've been using the idiom below for some time now. And it seems to be the most wide-spread, at least on the sites I've visited.</p>
<p>Is there a better/different way to read a file into a string in Java?</p>
<pre><code>private String readFile(String file) throws IOException {
BufferedReader reader = new Buffe... | [
{
"answer_id": 326413,
"author": "DaWilli",
"author_id": 33974,
"author_profile": "https://Stackoverflow.com/users/33974",
"pm_score": 9,
"selected": false,
"text": "org.apache.commons.io.FileUtils.readFileToString()"
},
{
"answer_id": 326430,
"author": "Claudiu",
"author... | 2008/11/28 | [
"https://Stackoverflow.com/questions/326390",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20654/"
] |
326,392 | <p>I'm using a MSSQL database and would like to create a column that only has 4 possible values. Is there any way to define a 2-bit column? I see the bit datatype and then the next smallest is tinyint which is 1 full byte.</p>
<p>If there is no such field, I'd be interesting in finding out why not.</p>
<p>Thanks.... | [
{
"answer_id": 326521,
"author": "Charles Bretana",
"author_id": 32632,
"author_profile": "https://Stackoverflow.com/users/32632",
"pm_score": 1,
"selected": false,
"text": "CREATE TABLE [dbo].[testTable](\n [colA] [bit] NOT NULL,\n [colB] [bit] NOT NULL,\n [CalcCol] AS (case [... | 2008/11/28 | [
"https://Stackoverflow.com/questions/326392",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/41662/"
] |
326,393 | <p>Can someone show me how to fix the width of a column in a datatable with JSF?</p>
<p>My code currently reads:</p>
<pre><code><h:column>
<f:facet name="header">
<h:outputText value="Data Field 1" />
</f:facet>
<h:commandLink id="dataLink" action="#{pc_SearchResultsFrag... | [
{
"answer_id": 326565,
"author": "Grant Wagner",
"author_id": 9254,
"author_profile": "https://Stackoverflow.com/users/9254",
"pm_score": -1,
"selected": true,
"text": "<h:column>\n <f:facet name=\"header\">\n <h:outputText value=\"Data Field 1\" />\n </f:facet>\n <h:comm... | 2008/11/28 | [
"https://Stackoverflow.com/questions/326393",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/23249/"
] |
326,396 | <p>I am working with:</p>
<pre><code>#top ul li.corner span.right-corner:hover
{
background-image:url("images/corner-right-over.gif");
width:4px;
height:15px;
float:left;
}
#top ul li.corner span.left-corner:hover
{
background-image:url("images/corner-left-over.gif");
float:left;
width:4px... | [
{
"answer_id": 326427,
"author": "Greg",
"author_id": 24181,
"author_profile": "https://Stackoverflow.com/users/24181",
"pm_score": 0,
"selected": false,
"text": ":hover"
},
{
"answer_id": 326515,
"author": "defeated",
"author_id": 16997,
"author_profile": "https://St... | 2008/11/28 | [
"https://Stackoverflow.com/questions/326396",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
326,405 | <p>I have an abstract base class and derived class:</p>
<pre><code>type TInterfaceMethod = class
public
destructor Destroy; virtual; abstract;
procedure Calculate; virtual; abstract;
procedure PrepareForWork; virtual; abstract;
end;
type ConcreteMethod = class(TInterfaceMethod)
private
matrix: TMin... | [
{
"answer_id": 326456,
"author": "gabr",
"author_id": 4997,
"author_profile": "https://Stackoverflow.com/users/4997",
"pm_score": 3,
"selected": true,
"text": "type\n TInterfaceMethod = class abstract\n public\n destructor Destroy; override; abstract;\n procedure Calculate; virtu... | 2008/11/28 | [
"https://Stackoverflow.com/questions/326405",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/28298/"
] |
326,425 | <p>I have a problem with formatting the data when doing an query to an Oracle database.</p>
<p>What I want to do is to export some data into the formatbelow into a textfile;</p>
<pre><code> 1IN20071001 40005601054910101200 1 65
</code></pre>
<ul>
<li>First number (1 above) = Company number (posi... | [
{
"answer_id": 326459,
"author": "hamishmcn",
"author_id": 3590,
"author_profile": "https://Stackoverflow.com/users/3590",
"pm_score": 2,
"selected": false,
"text": "TO_CHAR(t.clockindatetime, 'YYYYMMDD')"
},
{
"answer_id": 326758,
"author": "Community",
"author_id": -1,
... | 2008/11/28 | [
"https://Stackoverflow.com/questions/326425",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
326,429 | <p>I teach the third required intro course in a CS department. One of my homework assignments asks students to speed up code they have written for a previous assignment. Factor-of-ten speedups are routine; factors of 100 or 1000 are not unheard of. (For a factor of 1000 speedup you have to have made rookie mistakes ... | [
{
"answer_id": 885773,
"author": "cjs",
"author_id": 107294,
"author_profile": "https://Stackoverflow.com/users/107294",
"pm_score": 2,
"selected": false,
"text": "$ svnadmin create /home/cjs/repo\n$ mkdir my-project\n$ cd my-project\n$ vi hello.c\n [...hack hack hack...]\n$ svn import ... | 2008/11/28 | [
"https://Stackoverflow.com/questions/326429",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/41661/"
] |
326,450 | <p>I want to test my Entities that are built using Entity Framework.
My concern is that using Entity Framework means directly working with data source.
So any ideas how to unit testing Entity Framework based components?</p>
| [
{
"answer_id": 7860963,
"author": "James McLachlan",
"author_id": 217499,
"author_profile": "https://Stackoverflow.com/users/217499",
"pm_score": 3,
"selected": false,
"text": "<add name=\"DrinksEntities\" \n connectionString=\"metadata=res://*/Model.csdl|res://*/Model.ssdl|res://*/M... | 2008/11/28 | [
"https://Stackoverflow.com/questions/326450",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18908/"
] |
326,454 | <p>In this abbreviated code, the inline event works - the "event" is passed to the testKeyPress function </p>
<pre><code><textarea id="source"
onkeydown= "showCursPos(this);
var tf=testKeyPress(event);
document.onkeypress=function(){return tf};
document.onkeydown=function(){return tf}; " ></... | [
{
"answer_id": 326473,
"author": "Dennis C",
"author_id": 40214,
"author_profile": "https://Stackoverflow.com/users/40214",
"pm_score": 3,
"selected": true,
"text": "var e=arguments[0] || event; // Firefox via the argument, but IE don't\n"
},
{
"answer_id": 326673,
"author": ... | 2008/11/28 | [
"https://Stackoverflow.com/questions/326454",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
326,463 | <p>A remote site is supplying a data structure in a js file.</p>
<p>I can include this file in my page to access the data and display it in my page.</p>
<pre><code><head>
<script type="text/javascript" src="http://www.example.co.uk/includes/js/data.js"></script>
</head>
</code></pre>
<p>D... | [
{
"answer_id": 326469,
"author": "Vinko Vrsalovic",
"author_id": 5190,
"author_profile": "https://Stackoverflow.com/users/5190",
"pm_score": 3,
"selected": true,
"text": "<?php\n$url = \"http://www.example.co.uk/includes/js/data.js\";\ncurl_setopt($ch, CURLOPT_URL, $url);\ncurl_setopt($c... | 2008/11/28 | [
"https://Stackoverflow.com/questions/326463",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/33167/"
] |
326,476 | <p>Given numbers like 499, 73433, 2348 what VBA can I use to round to the nearest 5 or 10? or an arbitrary number?</p>
<p>By 5:</p>
<pre><code> 499 -> 500
2348 -> 2350
7343 -> 7345
</code></pre>
<p>By 10:</p>
<pre><code> 499 -> 500
2348 -> 2350
7343 -> 7340
</code></pre>
<p>etc.</p>
| [
{
"answer_id": 326489,
"author": "Fredou",
"author_id": 40868,
"author_profile": "https://Stackoverflow.com/users/40868",
"pm_score": 0,
"selected": false,
"text": "'nearest\n n = 5\n 'n = 10\n\n 'value\n v = 496\n 'v = 499 \n 'v = 2348 \n 'v = 7343\n\n 'mod\n m = (v \\ n) * n\n\n 'diff ... | 2008/11/28 | [
"https://Stackoverflow.com/questions/326476",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14420/"
] |
326,487 | <p>I am working on a program which manipulates images of different sizes. Many of these manipulations read pixel data from an input and write to a separate output (e.g. blur). This is done on a per-pixel basis.</p>
<p>Such image mapulations are very stressful on the CPU. I would like to use multithreading to speed ... | [
{
"answer_id": 326493,
"author": "Johannes Schaub - litb",
"author_id": 34509,
"author_profile": "https://Stackoverflow.com/users/34509",
"pm_score": 3,
"selected": false,
"text": "boost::thread"
},
{
"answer_id": 326523,
"author": "Vilx-",
"author_id": 41360,
"author... | 2008/11/28 | [
"https://Stackoverflow.com/questions/326487",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/39992/"
] |
326,509 | <p>I am looking for the best way to make my desktop java program run in the background (<strong>daemon/service</strong>?) across most platforms (Windows, Mac OS, Linux [Ubuntu in particular]).</p>
<p>By "best way" I am hoping to find a way that will:</p>
<ol>
<li>require a <strong>minimum</strong> amount of platform-... | [
{
"answer_id": 398959,
"author": "pro",
"author_id": 352728,
"author_profile": "https://Stackoverflow.com/users/352728",
"pm_score": 4,
"selected": false,
"text": "* void load(String[] arguments): Here open the configuration files, create the trace file, create the ServerSockets, the Thr... | 2008/11/28 | [
"https://Stackoverflow.com/questions/326509",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/24998/"
] |
326,558 | <p>If I have srand(2) declared in my main of my driver file,
do I need to declare srand(2) in my code file which is being linked with my driver?</p>
<p>Thanks.</p>
<p><strong>edit</strong></p>
<p>(from user's comment below)</p>
<p>If I do,</p>
<pre><code>srand(2);
srand(2);
</code></pre>
<p>will I get the seed as... | [
{
"answer_id": 326564,
"author": "Eclipse",
"author_id": 8701,
"author_profile": "https://Stackoverflow.com/users/8701",
"pm_score": 1,
"selected": false,
"text": "#include <stdlib.h>"
},
{
"answer_id": 1343298,
"author": "Brian",
"author_id": 2831,
"author_profile": ... | 2008/11/28 | [
"https://Stackoverflow.com/questions/326558",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
326,571 | <p>I have a string with a length that is a multiple of 8 that contains only 0's and 1's. I want to convert the string into a byte array suitable for writing to a file. For instance, if I have the string "0010011010011101", I want to get the byte array [0x26, 0x9d], which, when written to file, will give 0x269d as the... | [
{
"answer_id": 326587,
"author": "Greg Hewgill",
"author_id": 893,
"author_profile": "https://Stackoverflow.com/users/893",
"pm_score": 3,
"selected": false,
"text": ">>> s = \"0010011010011101\"\n>>> [int(s[x:x+8], 2) for x in range(0, len(s), 8)]\n[38, 157]\n"
},
{
"answer_id":... | 2008/11/28 | [
"https://Stackoverflow.com/questions/326571",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5624/"
] |
326,580 | <p>I am using the following jquery code:</p>
<pre><code>$("#top ul li.corner").mouseover(function(){
$("span.left-corner").addClass("left-corner-hover");
$("span.right-corner").addClass("right-corner-hover");
$("span.content").addClass("content-hover");
}).mouseout(function(){
$("span.left-corner").rem... | [
{
"answer_id": 326587,
"author": "Greg Hewgill",
"author_id": 893,
"author_profile": "https://Stackoverflow.com/users/893",
"pm_score": 3,
"selected": false,
"text": ">>> s = \"0010011010011101\"\n>>> [int(s[x:x+8], 2) for x in range(0, len(s), 8)]\n[38, 157]\n"
},
{
"answer_id":... | 2008/11/28 | [
"https://Stackoverflow.com/questions/326580",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
326,596 | <p>I'm writing a global error handling "module" for one of my applications.</p>
<p>One of the features I want to have is to be able to easily wrap a function with a <code>try{} catch{}</code> block, so that all calls to that function will automatically have the error handling code that'll call my global logging method... | [
{
"answer_id": 326693,
"author": "Eugene Lazutkin",
"author_id": 26394,
"author_profile": "https://Stackoverflow.com/users/26394",
"pm_score": 7,
"selected": true,
"text": "var makeSafe = function(fn){\n return function(){\n try{\n return fn.apply(this, arguments);\n }catch(e... | 2008/11/28 | [
"https://Stackoverflow.com/questions/326596",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3314/"
] |
326,628 | <p>What is prefered way of setting html title (in head) for view when using master pages?</p>
<p>One way is by using Page.Title in .aspx file, but that requires in master page which can mess with HTML code. So, lets assume no server side controls, only pure html. Any better ideas? </p>
<p>UPDATE: I would like to set... | [
{
"answer_id": 326848,
"author": "dtc",
"author_id": 32892,
"author_profile": "https://Stackoverflow.com/users/32892",
"pm_score": 2,
"selected": false,
"text": "<head>"
},
{
"answer_id": 326918,
"author": "hugoware",
"author_id": 17091,
"author_profile": "https://Sta... | 2008/11/28 | [
"https://Stackoverflow.com/questions/326628",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/28912/"
] |
326,634 | <p>I had a discussion with a colleague at work, it was about SQL queries and sorting. He has the opinion that you should let the server do any sorting before returning the rows to the client. I on the other hand thinks that the server is probably busy enough as it is, and it must be better for performance to let the cl... | [
{
"answer_id": 635179,
"author": "Walden Leverich",
"author_id": 2673770,
"author_profile": "https://Stackoverflow.com/users/2673770",
"pm_score": 2,
"selected": false,
"text": "SELECT TOP 1 price \nFROM itemprice \nWHERE ItemNumber = ? \n AND effectivedate <= getdate() \nORDER BY effe... | 2008/11/28 | [
"https://Stackoverflow.com/questions/326634",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4422/"
] |
326,650 | <p>The line-height property usually takes care of vertical alignment, but not with inputs. Is there a way to automatically center text without playing around with padding?</p>
| [
{
"answer_id": 327509,
"author": "Chris Hawes",
"author_id": 22776,
"author_profile": "https://Stackoverflow.com/users/22776",
"pm_score": 6,
"selected": false,
"text": "height : 36px; //for other browsers\nline-height: 36px; // for IE\n"
},
{
"answer_id": 327620,
"author": "... | 2008/11/28 | [
"https://Stackoverflow.com/questions/326650",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/29595/"
] |
326,672 | <p>I'm trying to use System.IO.File.Replace to update a file, and it's throwing System.IOException if the destination file is on a NAS.</p>
<p>According to <a href="http://msdn.microsoft.com/en-us/library/9d9h163f(VS.80).aspx" rel="nofollow noreferrer">MSDN</a>, if the destination file is on a different volume, this m... | [
{
"answer_id": 326785,
"author": "Sanjaya R",
"author_id": 9353,
"author_profile": "https://Stackoverflow.com/users/9353",
"pm_score": 2,
"selected": true,
"text": "catch IOException\n File.Copy( src,dest+\".tmp\", true )\n File.Replace( dest+\".tmp\", dest, dest_backup )\n"
}
] | 2008/11/28 | [
"https://Stackoverflow.com/questions/326672",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/22437/"
] |
326,675 | <p>I know that most people recommend using HttpRuntime.Cache because it has more flexibility... etc. But what if you want the object to persist in the cache for the life of the application? Is there any big downside to using the Application[] object to cache things?</p>
| [
{
"answer_id": 326766,
"author": "Tom Jelen",
"author_id": 28399,
"author_profile": "https://Stackoverflow.com/users/28399",
"pm_score": 5,
"selected": true,
"text": "HttpApplicationState"
}
] | 2008/11/28 | [
"https://Stackoverflow.com/questions/326675",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/343/"
] |
326,679 | <p>I'm writing a bit of code to display a bar (or line) graph in our software. Everything's going fine. The thing that's got me stumped is labeling the Y axis.</p>
<p>The caller can tell me how finely they want the Y scale labeled, but I seem to be stuck on exactly what to label them in an "attractive" kind of way. ... | [
{
"answer_id": 326734,
"author": "Pyrolistical",
"author_id": 21838,
"author_profile": "https://Stackoverflow.com/users/21838",
"pm_score": 3,
"selected": false,
"text": "1. 2^n, for some integer n. eg. ..., .25, .5, 1, 2, 4, 8, 16, ...\n2. 10^n, for some integer n. eg. ..., .01, .1, 1, ... | 2008/11/28 | [
"https://Stackoverflow.com/questions/326679",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8173/"
] |
326,686 | <p>Just came across this quote in a book on OOP that I'm reading,</p>
<blockquote>
<p>A child is only allowed to augment
functionality and add functionality.
A child is never allowed to remove
functionality. If you do find that a
child need to remove functionality,
this is an indication that the child
... | [
{
"answer_id": 326704,
"author": "Charles Bretana",
"author_id": 32632,
"author_profile": "https://Stackoverflow.com/users/32632",
"pm_score": 0,
"selected": false,
"text": "namespace CompanyA {\n class Phone {\n public void Dial() {\n // do work to dial the phone here\n ... | 2008/11/28 | [
"https://Stackoverflow.com/questions/326686",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/38317/"
] |
326,689 | <p>So I started with a web services project (just a dynamic web project) that builds and debugs correctly from eclipse. We've pulled a chunk of common code out that we want to put into a shared library so now those classes are going into a separate jar project that the web project references.</p>
<p>On the web projec... | [
{
"answer_id": 7908055,
"author": "Anoop Isaac",
"author_id": 1015324,
"author_profile": "https://Stackoverflow.com/users/1015324",
"pm_score": 3,
"selected": false,
"text": "properties > deployment assembly > add > project"
}
] | 2008/11/28 | [
"https://Stackoverflow.com/questions/326689",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/409/"
] |
326,754 | <p>It seems that I can't control the NSApp delegate from within a System Preferences pane, which is understandable. Is there any other way I can have my object notified when the program becomes active?</p>
| [
{
"answer_id": 326777,
"author": "Marc Charbonneau",
"author_id": 35136,
"author_profile": "https://Stackoverflow.com/users/35136",
"pm_score": 2,
"selected": false,
"text": "mainViewDidLoad:"
},
{
"answer_id": 326878,
"author": "Peter Hosey",
"author_id": 30461,
"aut... | 2008/11/28 | [
"https://Stackoverflow.com/questions/326754",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4103/"
] |
326,757 | <p>I'm trying to update a hashtable in a loop but getting an error: System.InvalidOperationException: Collection was modified; enumeration operation may not execute.</p>
<pre><code>private Hashtable htSettings_m = new Hashtable();
htSettings_m.Add("SizeWidth", "728");
htSettings_m.Add("SizeHeight", "450");
string sKey... | [
{
"answer_id": 326767,
"author": "Rob Walker",
"author_id": 3631,
"author_profile": "https://Stackoverflow.com/users/3631",
"pm_score": 1,
"selected": false,
"text": "deEntry.Value = sValue\n"
},
{
"answer_id": 326768,
"author": "Davy Landman",
"author_id": 11098,
"au... | 2008/11/28 | [
"https://Stackoverflow.com/questions/326757",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/28098/"
] |
326,764 | <p>Is there a shortcut for giving a limit and order when accessing a has_many relation in an ActiveRecord model?</p>
<p>For example, here's what I'd like to express:</p>
<pre><code>@user.posts(:limit => 5, :order => "title")
</code></pre>
<p>As opposed to the longer version:</p>
<pre><code>Post.find(:all, :li... | [
{
"answer_id": 326795,
"author": "Dustin",
"author_id": 39975,
"author_profile": "https://Stackoverflow.com/users/39975",
"pm_score": 3,
"selected": false,
"text": " has_many :posts, :class_name => \"BlogPost\", :foreign_key => \"owner_id\",\n :order => \"items.published_at desc\", :... | 2008/11/28 | [
"https://Stackoverflow.com/questions/326764",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19964/"
] |
326,770 | <p>I have a python module that defines a number of classes:</p>
<pre><code>class A(object):
def __call__(self):
print "ran a"
class B(object):
def __call__(self):
print "ran b"
class C(object):
def __call__(self):
print "ran c"
</code></pre>
<p>From within the module, how might I... | [
{
"answer_id": 326789,
"author": "Igal Serban",
"author_id": 25737,
"author_profile": "https://Stackoverflow.com/users/25737",
"pm_score": 4,
"selected": true,
"text": "import sys\ngetattr(sys.modules[__name__], 'A')\n"
},
{
"answer_id": 326796,
"author": "strager",
"auth... | 2008/11/28 | [
"https://Stackoverflow.com/questions/326770",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/39975/"
] |
326,775 | <p>Suppose there were several projects mostly maintained by smart interns, who eventually leave after a period of time. Scripts are used here and there in key parts, for example, to back up a database, rename it, zip it, move it over ssh, unzip it, and then to restore it with different settings. You know, the scripting... | [
{
"answer_id": 21688853,
"author": "mbirth",
"author_id": 3293109,
"author_profile": "https://Stackoverflow.com/users/3293109",
"pm_score": 1,
"selected": false,
"text": "Progress, b2 m, ACME App, Doing some magic...\n"
}
] | 2008/11/28 | [
"https://Stackoverflow.com/questions/326775",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3827/"
] |
326,778 | <p>OK,</p>
<p>Here is my problem, I have a master page with a HEAD section that contains my JS includes. I have one JS include </p>
<pre><code><script src="Includes/js/browser.js" language="javascript" type="text/javascript"></script>
</code></pre>
<p>In my page i consume it like this:</p>
<pre><code>&... | [
{
"answer_id": 326866,
"author": "Ates Goral",
"author_id": 23501,
"author_profile": "https://Stackoverflow.com/users/23501",
"pm_score": 1,
"selected": false,
"text": "alert()"
}
] | 2008/11/28 | [
"https://Stackoverflow.com/questions/326778",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/36269/"
] |
326,794 | <p>Is there a way in Python to handle XML files similar to the way PHP's SimpleXML extension does them?</p>
<p>Ideally I just want to be able to access certain xml datas from a list object.</p>
| [
{
"answer_id": 9926389,
"author": "LXj",
"author_id": 292080,
"author_profile": "https://Stackoverflow.com/users/292080",
"pm_score": 0,
"selected": false,
"text": "In [1]: from lxml import objectify\n\nIn [2]: x = objectify.fromstring(\"\"\"<response><version>1.2</version><amount>1.01</... | 2008/11/28 | [
"https://Stackoverflow.com/questions/326794",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/32933/"
] |
326,797 | <p>I was wondering if there is a smart way to find out</p>
<p>There is a 1/4 chance something happens.</p>
<p>I know we can do this with rand() % 4 and checking if it is equal to 0, but is there a way without using rand()? In c++, thanks.</p>
| [
{
"answer_id": 326801,
"author": "Vilx-",
"author_id": 41360,
"author_profile": "https://Stackoverflow.com/users/41360",
"pm_score": 0,
"selected": false,
"text": "rand()"
},
{
"answer_id": 326814,
"author": "coppro",
"author_id": 16855,
"author_profile": "https://Sta... | 2008/11/28 | [
"https://Stackoverflow.com/questions/326797",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
326,802 | <p>For those who like a good WPF binding challenge:</p>
<p>I have a nearly functional example of two-way binding a <code>CheckBox</code> to an individual bit of a flags enumeration (thanks Ian Oakes, <a href="http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/c05b7e7e-25cd-4a41-8bf5-e35d2caff797/" rel="nofollow ... | [
{
"answer_id": 375288,
"author": "PaulJ",
"author_id": 11308,
"author_profile": "https://Stackoverflow.com/users/11308",
"pm_score": 7,
"selected": true,
"text": "Enum"
},
{
"answer_id": 384756,
"author": "Steve Cadwallader",
"author_id": 41693,
"author_profile": "htt... | 2008/11/28 | [
"https://Stackoverflow.com/questions/326802",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/41693/"
] |
326,818 | <p>I want to validate a set of credentials against the domain controller. e.g.:</p>
<pre><code>Username: STACKOVERFLOW\joel
Password: splotchy
</code></pre>
<h2>Method 1. Query Active Directory with Impersonation</h2>
<p>A lot of people suggest querying the Active Directory for something. If an exception is thrown, ... | [
{
"answer_id": 327073,
"author": "tvanfosson",
"author_id": 12950,
"author_profile": "https://Stackoverflow.com/users/12950",
"pm_score": 8,
"selected": true,
"text": " bool valid = false;\n using (PrincipalContext context = new PrincipalContext(ContextType.Domain))\n {\n valid = con... | 2008/11/28 | [
"https://Stackoverflow.com/questions/326818",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12597/"
] |
326,820 | <p>I know that you cannot return anonymous types from methods but I am wondering how the Select extension method returns an anonymous type. Is it just a compiler trick?</p>
<p>Edit</p>
<p>Suppose L is a List. How does this work?</p>
<pre><code>L.Select(s => new { Name = s })
</code></pre>
<p>The return type is I... | [
{
"answer_id": 326831,
"author": "Jon Skeet",
"author_id": 22656,
"author_profile": "https://Stackoverflow.com/users/22656",
"pm_score": 3,
"selected": false,
"text": "List<string> x = new List<string>();\n\n// The compiler converts this:\nx.Select(y => y.Length);\n\n// Into this, using ... | 2008/11/28 | [
"https://Stackoverflow.com/questions/326820",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3927/"
] |
326,821 | <p>Everyone in my office uses Macs and therefore most use Safari. </p>
<p>We have a page that has 30 checkboxes on it, I didn't even do the HTML myself but no matter if I use the html input checkbox with a label or an asp:Checkbox usig the text property for the label my boss is irritated because the checkbox is a litt... | [
{
"answer_id": 326837,
"author": "Owen",
"author_id": 4853,
"author_profile": "https://Stackoverflow.com/users/4853",
"pm_score": 3,
"selected": true,
"text": "label {\n vertical-align: bottom;\n}\n"
}
] | 2008/11/28 | [
"https://Stackoverflow.com/questions/326821",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4140/"
] |
326,822 | <p>I want to serialize the following Xml structure:</p>
<pre><code> <XmlRootElement>
<Company name="Acme Widgets LLC">
<DbApplication name="ApplicationA" vendor="oracle">
<ConnSpec environment="DEV"
server="DBOraDev1201"
database... | [
{
"answer_id": 328778,
"author": "Darin Dimitrov",
"author_id": 29407,
"author_profile": "https://Stackoverflow.com/users/29407",
"pm_score": 3,
"selected": true,
"text": "public class XmlRootElement\n{\n [XmlElement(ElementName=\"Company\")]\n public Company[] Company { get; set; ... | 2008/11/28 | [
"https://Stackoverflow.com/questions/326822",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/32632/"
] |
326,825 | <p>How can I pass a variable number of args to a yield.
I don't want to pass an array (as the following code does), I'd actually like to pass them as a programmatic number of args to the block.</p>
<pre><code>def each_with_attributes(attributes, &block)
results[:matches].each_with_index do |match, index|
yie... | [
{
"answer_id": 326836,
"author": "Dustin",
"author_id": 39975,
"author_profile": "https://Stackoverflow.com/users/39975",
"pm_score": 2,
"selected": false,
"text": "def test(a, b)\n puts \"#{a} + #{b} = #{a + b}\"\nend\n\nargs = [1, 2]\n\ntest *args\n"
},
{
"answer_id": 326843,
... | 2008/11/28 | [
"https://Stackoverflow.com/questions/326825",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6705/"
] |
326,828 | <p>In Flash when you set text in a TextField object with the htmlText property, changing the alpha value no longer works. Is there a way around that?</p>
| [
{
"answer_id": 329483,
"author": "aaaidan",
"author_id": 26331,
"author_profile": "https://Stackoverflow.com/users/26331",
"pm_score": 2,
"selected": false,
"text": "alpha"
},
{
"answer_id": 332158,
"author": "Jesse Millikan",
"author_id": 7526,
"author_profile": "htt... | 2008/11/28 | [
"https://Stackoverflow.com/questions/326828",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/28672/"
] |
326,857 | <p>Problem:</p>
<pre><code>edited files on windows, using git-bash, to fix IE7 problems
committed, pushed to github repo
booted back into linux
pulled from repo
merge conflict in dozens of files
used 'git reset --hard'
</code></pre>
<p>What can I do to get back on track?</p>
<p>UPDATE: please look at the follow... | [
{
"answer_id": 326863,
"author": "Greg Hewgill",
"author_id": 893,
"author_profile": "https://Stackoverflow.com/users/893",
"pm_score": 4,
"selected": true,
"text": "git config core.autocrlf true\n"
},
{
"answer_id": 327835,
"author": "Paul",
"author_id": 23356,
"auth... | 2008/11/28 | [
"https://Stackoverflow.com/questions/326857",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/33287/"
] |
326,862 | <p>For example, if I wanted to do it from the command line I would use "a.exe > out.txt". Is it possible to do something similar in Visual Studio when I debug (F5)?</p>
| [
{
"answer_id": 326935,
"author": "call me Steve",
"author_id": 24334,
"author_profile": "https://Stackoverflow.com/users/24334",
"pm_score": 1,
"selected": false,
"text": "#include <iostream>\n#include <string>\n#include <fstream>\n\nusing namespace std;\n\nint main ()\n{\n#ifdef _DEBUG\... | 2008/11/28 | [
"https://Stackoverflow.com/questions/326862",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
326,885 | <p>I want to create the 26 neighbors of a cubic-voxel-node in 3-d space. The inputs are the x,y,z position of the node and the size of the cube side . I am trying to do this using a for loop but haven't managed yet. I am quite newbie in programming please help me.</p>
| [
{
"answer_id": 326889,
"author": "Matt Cruikshank",
"author_id": 8643,
"author_profile": "https://Stackoverflow.com/users/8643",
"pm_score": 3,
"selected": false,
"text": "for (int dz = z - 1; dz <= z + 1; ++dz)\n{\n for (int dy = y - 1; dy <= y + 1; ++dy)\n {\n for (int dx = x - 1;... | 2008/11/28 | [
"https://Stackoverflow.com/questions/326885",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/41706/"
] |
326,891 | <p>Is there an easy way to parse the user's HTTP_ACCEPT_LANGUAGE and set the locale in PHP?</p>
<p>I know the Zend framework has a method to do this, but I'd rather not install the whole framework just to use that one bit of functionality.</p>
<p>The PEAR I18Nv2 package is in beta and hasn't been changed for almost t... | [
{
"answer_id": 327042,
"author": "Kornel",
"author_id": 27009,
"author_profile": "https://Stackoverflow.com/users/27009",
"pm_score": 3,
"selected": true,
"text": "en_US, en;q=0.8, fr_CA;q=0.2, *;q=0.1\n"
},
{
"answer_id": 327419,
"author": "Stefan Gehrig",
"author_id": 1... | 2008/11/28 | [
"https://Stackoverflow.com/questions/326891",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/29394/"
] |
326,910 | <p>I come from the Java world, where you can hide variables and functions and then run unit tests against them using reflection. I have used nested functions to hide implementation details of my classes so that only the public API is visible. I am trying to write unit tests against these nested functions to make sure... | [
{
"answer_id": 326912,
"author": "Dustin",
"author_id": 39975,
"author_profile": "https://Stackoverflow.com/users/39975",
"pm_score": 4,
"selected": false,
"text": "def outer(a):\n b = compute_something_from(a)\n def inner():\n do_something_with(a, b)\n"
},
{
"answer... | 2008/11/28 | [
"https://Stackoverflow.com/questions/326910",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5624/"
] |
326,919 | <p>I have a row of buttons, which all create a pdf file which I want to open in a new tab.
This way the button page stays on top, and the pdf's open to get printed. To prevent clicking a button twice I disable the button, like this (I use python):</p>
<pre><code><input type='submit' value='Factureren' name='submitb... | [
{
"answer_id": 326923,
"author": "netadictos",
"author_id": 31791,
"author_profile": "https://Stackoverflow.com/users/31791",
"pm_score": 3,
"selected": false,
"text": " <input type='submit' value='Factureren' name='submitbutton' id='%s' \nonclick=\"this.disabled=true; this.className=... | 2008/11/28 | [
"https://Stackoverflow.com/questions/326919",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/37986/"
] |
326,937 | <p>I have been using TortoiseSVN, svn, and subclipse and I think I understand the basics, but there's one thing that's been bugging me for a while: Merging introduces unwanted code. Here's the steps.</p>
<p><code>trunk/test.txt@r2</code>. A test file was created with 'A' and a return:</p>
<pre><code>A
[EOF]
</code></... | [
{
"answer_id": 326945,
"author": "orip",
"author_id": 37020,
"author_profile": "https://Stackoverflow.com/users/37020",
"pm_score": 5,
"selected": false,
"text": "svnmerge.py merge -r4,7,11-15\n"
},
{
"answer_id": 365976,
"author": "Eugene Yokota",
"author_id": 3827,
... | 2008/11/29 | [
"https://Stackoverflow.com/questions/326937",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3827/"
] |
326,941 | <p>I am planning on generating a Word document on the webserver dynamically. Is there good way of doing this in c#? I know I could script Word to do this but I would prefer another option.</p>
| [
{
"answer_id": 326952,
"author": "Christian C. Salvadó",
"author_id": 5445,
"author_profile": "https://Stackoverflow.com/users/5445",
"pm_score": 3,
"selected": false,
"text": "Paragraph p = new Paragraph();\np.Runs.Add(new Run(\"Text can have multiple format styles, they can be \"));\np... | 2008/11/29 | [
"https://Stackoverflow.com/questions/326941",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4491/"
] |
326,942 | <p>My bash script doesn't work the way I want it to:</p>
<pre><code>#!/bin/bash
total="0"
count="0"
#FILE="$1" This is the easier way
for FILE in $*
do
# Start processing all processable files
while read line
do
if [[ "$line" =~ ^Total ]];
then
tmp=$(echo $line | cut -d':' -f2)... | [
{
"answer_id": 326964,
"author": "Dustin",
"author_id": 39975,
"author_profile": "https://Stackoverflow.com/users/39975",
"pm_score": 1,
"selected": false,
"text": "#!/bin/sh\n\nprocess() {\n echo \"doing something with $1\"\n}\n\nfor i in \"$@\" # Note use of \"$@\" to not break on f... | 2008/11/29 | [
"https://Stackoverflow.com/questions/326942",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/40120/"
] |
326,960 | <p>Here's my problem.I have 2 xmlfiles with identical structure, with the second xml containing only few node compared to first.</p>
<p>File1</p>
<pre><code> <root>
<alpha>111</alpha>
<beta>22</beta>
<gamma></gamma>
<delta></delta>
</root>... | [
{
"answer_id": 326985,
"author": "Alastair",
"author_id": 31038,
"author_profile": "https://Stackoverflow.com/users/31038",
"pm_score": 2,
"selected": false,
"text": "document()"
}
] | 2008/11/29 | [
"https://Stackoverflow.com/questions/326960",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/28773/"
] |
326,987 | <p>I am trying to find out how to use usercontrols in asp.net mvc. I know how to add a usercontrol to a view and how to pass data to it. What I haven't been able to figure out is how do you do this without having to retrieve and pass the data in every single controller?</p>
<p>For example, if I have a user control t... | [
{
"answer_id": 327057,
"author": "tvanfosson",
"author_id": 12950,
"author_profile": "https://Stackoverflow.com/users/12950",
"pm_score": 0,
"selected": false,
"text": " ViewData[\"RecentPosts\"] = RecentPosts.GetRecentPosts( this.GetType() );\n"
},
{
"answer_id": 327088,
"au... | 2008/11/29 | [
"https://Stackoverflow.com/questions/326987",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/32892/"
] |
326,991 | <p>What's the best way to get a function like the following to work:</p>
<pre><code>def getNearest(zipCode, miles):
</code></pre>
<p>That is, given a zipcode (07024) and a radius, return all zipcodes which are within that radius?</p>
| [
{
"answer_id": 37577689,
"author": "Glenn Van Schil",
"author_id": 4614788,
"author_profile": "https://Stackoverflow.com/users/4614788",
"pm_score": 0,
"selected": false,
"text": "public List<City> findCityInRange(GeoPoint geoPoint, double distance) {\n List<City> cities = new ArrayLi... | 2008/11/29 | [
"https://Stackoverflow.com/questions/326991",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15055/"
] |
326,992 | <p>Given that I only have one monitor, what's the best way to debug a program which uses the entire screen (such as a DirectX application)? Tools such as the step-by-step debugger seem useless in this context. Also, printing to the console isn't as effective, since you can only look at the console once the application ... | [
{
"answer_id": 327018,
"author": "BCS",
"author_id": 1343,
"author_profile": "https://Stackoverflow.com/users/1343",
"pm_score": 0,
"selected": false,
"text": "fprint(logfile,\"%s:%d\\n\",__FILE__,__LINE__);\n"
}
] | 2008/11/29 | [
"https://Stackoverflow.com/questions/326992",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15055/"
] |
327,002 | <p>I've been wondering this for some time. As the title say, which is faster, the actual function or simply raising to the half power?</p>
<p><b>UPDATE</b></p>
<p>This is not a matter of premature optimization. This is simply a question of how the underlying code actually works. What is the theory of how Python code ... | [
{
"answer_id": 327011,
"author": "Claudiu",
"author_id": 15055,
"author_profile": "https://Stackoverflow.com/users/15055",
"pm_score": 8,
"selected": true,
"text": "math.sqrt(x)"
},
{
"answer_id": 327024,
"author": "JimB",
"author_id": 32880,
"author_profile": "https:... | 2008/11/29 | [
"https://Stackoverflow.com/questions/327002",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/41718/"
] |
327,010 | <p>A problem that we need to solve regularly at my workplace is how to build sql statements based on user supplied table/column names. The issue I am trying to address is the commas between column names. </p>
<p>One technique looks something like this.</p>
<pre><code>selectSql = "SELECT ";
for (z = 0; z < colu... | [
{
"answer_id": 327022,
"author": "Jonathan Leffler",
"author_id": 15168,
"author_profile": "https://Stackoverflow.com/users/15168",
"pm_score": 1,
"selected": false,
"text": "pad = \"\"\nstmt = \"SELECT \"\n\nfor (i = 0; i < number; i++)\n{\n stmt += pad + item[i]\n pad = \", \"\n}... | 2008/11/29 | [
"https://Stackoverflow.com/questions/327010",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7734/"
] |
327,026 | <p>I use something like this:
screen.addstr(text, color_pair(1) | A_BOLD), but it doesn't seem to work..
However, A_REVERSE and all others attribute does work! </p>
<p>In fact, I'm trying to print something in white, but the COLOR_WHITE prints it gray.. and after a while of searching, it seems that printing it gray +... | [
{
"answer_id": 327072,
"author": "jfs",
"author_id": 4279,
"author_profile": "https://Stackoverflow.com/users/4279",
"pm_score": 3,
"selected": false,
"text": "#!/usr/bin/env python\nfrom itertools import cycle\nimport curses, contextlib, time\n\n@contextlib.contextmanager\ndef curses_sc... | 2008/11/29 | [
"https://Stackoverflow.com/questions/327026",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/41722/"
] |
327,035 | <p>I have a particular PHP page that, for various reasons, needs to save ~200 fields to a database. These are 200 separate insert and/or update statements. Now the obvious thing to do is reduce this number but, like I said, for reasons I won't bother going into I can't do this.</p>
<p>I wasn't expecting this problem... | [
{
"answer_id": 327159,
"author": "UnkwnTech",
"author_id": 115,
"author_profile": "https://Stackoverflow.com/users/115",
"pm_score": 1,
"selected": false,
"text": "mysql_query('INSERT INTO tableName VALUES(...)');\nmysql_query('INSERT INTO tableName VALUES(...)');\nmysql_query('INSERT IN... | 2008/11/29 | [
"https://Stackoverflow.com/questions/327035",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18393/"
] |
327,043 | <p>I can find tutorials about mapping textures to polygons specifying vertices etc. but nothing regarding how to apply a texture to a cube (or other stuff) drawn with glut (glutSolidCube).</p>
<p>I am doing something like:</p>
<pre><code>glTexEnvfv(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, decal);
glTexParameterfv(GL_TEXT... | [
{
"answer_id": 327135,
"author": "Adam Rosenfield",
"author_id": 9530,
"author_profile": "https://Stackoverflow.com/users/9530",
"pm_score": 5,
"selected": true,
"text": "glutSolidCube()"
},
{
"answer_id": 5011345,
"author": "Humayun",
"author_id": 618847,
"author_pro... | 2008/11/29 | [
"https://Stackoverflow.com/questions/327043",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1311500/"
] |
327,047 | <p>Recently I've been doing a lot of modal window pop-ups and what not, for which I used jQuery. The method that I used to create the new elements on the page has overwhelmingly been along the lines of: </p>
<pre><code>$("<div></div>");
</code></pre>
<p>However, I'm getting the feeling that this isn't the... | [
{
"answer_id": 327061,
"author": "tvanfosson",
"author_id": 12950,
"author_profile": "https://Stackoverflow.com/users/12950",
"pm_score": 4,
"selected": false,
"text": " $(\"<div/>\");\n"
},
{
"answer_id": 327065,
"author": "Owen",
"author_id": 4853,
"author_profile":... | 2008/11/29 | [
"https://Stackoverflow.com/questions/327047",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/32943/"
] |
327,052 | <p>I'm working on a CakePHP 1.2 application. I have a model "User" defined with a few HABTM relationships with other tables through a join table.</p>
<p>I'm now tasked with finding User information based on the data stored in one of these HABTM tables. Unfortunately, when the query executes, my condition is rejected w... | [
{
"answer_id": 3431591,
"author": "Asif Zardari",
"author_id": 413985,
"author_profile": "https://Stackoverflow.com/users/413985",
"pm_score": 3,
"selected": false,
"text": "$this->Recipe->Tag->find('all', array(\n 'conditions' => array('Tag.name' => 'Dessert')));\n"
}
] | 2008/11/29 | [
"https://Stackoverflow.com/questions/327052",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
327,060 | <p>I have a need to evaluate user-defined logical expressions of arbitrary complexity on some PHP pages. Assuming that form fields are the primary variables, it would need to:</p>
<ul>
<li>substitute"varibles" for form
fields values;</li>
<li>handle comparison operators,
minimally ==, <, <=, >= and > by
symbol,... | [
{
"answer_id": 31758193,
"author": "Cam",
"author_id": 1386788,
"author_profile": "https://Stackoverflow.com/users/1386788",
"pm_score": 4,
"selected": false,
"text": "composer require symfony/expression-language"
}
] | 2008/11/29 | [
"https://Stackoverflow.com/questions/327060",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18393/"
] |
327,066 | <p>I have a custom XML schema defined for page display that puts elements on the page by evaluating XML elements on the page. This is currently implemented using the preg regex functions, primarily the excellent preg_replace_callback function, eg:</p>
<pre><code>...
$s = preg_replace_callback("!<field>(.*?)<... | [
{
"answer_id": 327407,
"author": "Stefan Gehrig",
"author_id": 11354,
"author_profile": "https://Stackoverflow.com/users/11354",
"pm_score": 3,
"selected": true,
"text": "XSLTProcessor"
}
] | 2008/11/29 | [
"https://Stackoverflow.com/questions/327066",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18393/"
] |
327,082 | <p>When deploying the application to the device, the program will quit after a few cycles with the following error:</p>
<pre><code>Program received signal: "EXC_BAD_ACCESS".
</code></pre>
<p>The program runs without any issue on the iPhone simulator, it will also debug and run as long as I step through the instructio... | [
{
"answer_id": 327147,
"author": "Adam Rosenfield",
"author_id": 9530,
"author_profile": "https://Stackoverflow.com/users/9530",
"pm_score": 4,
"selected": false,
"text": "pthread_join()"
},
{
"answer_id": 328164,
"author": "philsquared",
"author_id": 32136,
"author_p... | 2008/11/29 | [
"https://Stackoverflow.com/questions/327082",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19617/"
] |
327,093 | <p>I'm racking my brain trying to come up with an elegant solution to a DLL load problem. I have an application that statically links to other lib files which load DLLs. I'm not loading the DLLs directly. I'd like to have some DLLs in another folder other than the folder that the executable is in. Something like %worki... | [
{
"answer_id": 327118,
"author": "Adam Rosenfield",
"author_id": 9530,
"author_profile": "https://Stackoverflow.com/users/9530",
"pm_score": 2,
"selected": false,
"text": "main"
},
{
"answer_id": 22712256,
"author": "David Woo",
"author_id": 1773790,
"author_profile":... | 2008/11/29 | [
"https://Stackoverflow.com/questions/327093",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
327,097 | <p>I'm building a with-source system which I am giving out on the 'net for providing adoptable virtual pets. The system will be owned mainly by kids. Since I want it to be usable for absolute beginner programmers, there are several complexity constraints on my system: It can't use libraries that don't commonly ship wit... | [
{
"answer_id": 327103,
"author": "SoapBox",
"author_id": 36384,
"author_profile": "https://Stackoverflow.com/users/36384",
"pm_score": 5,
"selected": true,
"text": "petvar = (petvar^rnd)<<16 | rnd;"
},
{
"answer_id": 327206,
"author": "Community",
"author_id": -1,
"au... | 2008/11/29 | [
"https://Stackoverflow.com/questions/327097",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14431/"
] |
327,100 | <p>I have been attempting to create a new directory for my apache server. As I tried to access the new directory, I type:</p>
<p>sudo /etc/init.d/apache2 restart</p>
<p>But I obtain this error in the Ubuntu Terminal:</p>
<p>Syntax Error on line 1 of /etc/apache2/conf.d/fqdn.save:
ServerName takes one argument, the H... | [
{
"answer_id": 327126,
"author": "genehack",
"author_id": 39933,
"author_profile": "https://Stackoverflow.com/users/39933",
"pm_score": 2,
"selected": false,
"text": "sudo cat /etc/apache2/conf.d/fqdn.save\n"
}
] | 2008/11/29 | [
"https://Stackoverflow.com/questions/327100",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
327,122 | <p>Using Morph Labs' Appspace to deploy a site means no automated way to redirect 'myapp.com' to 'www.myapp.com' (and no access to .htacess).</p>
<p>Is there an in-rails way to do this? Would I need a plugin like <a href="http://github.com/mbleigh/subdomain-fu/tree/master" rel="nofollow noreferrer">subdomain-fu</a>?</... | [
{
"answer_id": 327127,
"author": "Stepan Mazurov",
"author_id": 40786,
"author_profile": "https://Stackoverflow.com/users/40786",
"pm_score": 0,
"selected": false,
"text": " head :moved_permanently, :location => ‘http://www.newdomain.com’\n"
},
{
"answer_id": 327154,
"author"... | 2008/11/29 | [
"https://Stackoverflow.com/questions/327122",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19527/"
] |
327,151 | <p>I have an ASP.NET page that uses a repeater nested within another repeater to generate a listing of data. It's to the effect of the following:</p>
<pre><code><asp:Repeater>
<ItemTemplate>
<span><%#Eval("Data1") %></span>
<!-- and many more -->
<asp:... | [
{
"answer_id": 327362,
"author": "Aleris",
"author_id": 20417,
"author_profile": "https://Stackoverflow.com/users/20417",
"pm_score": 2,
"selected": false,
"text": "<asp:Repeater runat=\"server\" DataSource='<%#Eval(\"Data2\")%>' \n Visible='<%# ((IEnumerable)Eval(\"Data2\")).GetEnume... | 2008/11/29 | [
"https://Stackoverflow.com/questions/327151",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11912/"
] |
327,162 | <p>I have been trying to encrypt soap message and send to the server, so that the server can decrypt, process the message, encrypt the response again and send back to the client...</p>
<p>I short i want to implement security in ASMX web services....</p>
<p>Please help me</p>
<p>Thanks
Sandeep</p>
| [
{
"answer_id": 327167,
"author": "Steven A. Lowe",
"author_id": 9345,
"author_profile": "https://Stackoverflow.com/users/9345",
"pm_score": 1,
"selected": true,
"text": "[WebMethod]\npublic string SecureMethodX(string secureInput)\n{\n string plainText = decrypt(secureInput);\n //d... | 2008/11/29 | [
"https://Stackoverflow.com/questions/327162",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/41740/"
] |
327,191 | <p>The list <code>sort()</code> method is a modifier function that returns <code>None</code>.</p>
<p>So if I want to iterate through all of the keys in a dictionary I cannot do:</p>
<pre><code>for k in somedictionary.keys().sort():
dosomething()
</code></pre>
<p>Instead, I must:</p>
<pre><code>keys = somedictio... | [
{
"answer_id": 327210,
"author": "Dustin",
"author_id": 39975,
"author_profile": "https://Stackoverflow.com/users/39975",
"pm_score": 5,
"selected": true,
"text": "for k in sorted(somedictionary.keys()):\n doSomething(k)\n"
},
{
"answer_id": 856272,
"author": "odwl",
"... | 2008/11/29 | [
"https://Stackoverflow.com/questions/327191",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/31060/"
] |
327,216 | <p><a href="http://thedailywtf.com/Articles/nice_num,-mean_programmer.aspx" rel="nofollow noreferrer">The Daily WTF</a> for 2008-11-28 pillories the following code:</p>
<pre><code>static char *nice_num(long n)
{
int neg = 0, d = 3;
char *buffer = prtbuf;
int bufsize = 20;
if (n < 0)
{
n... | [
{
"answer_id": 327240,
"author": "Adam Rosenfield",
"author_id": 9530,
"author_profile": "https://Stackoverflow.com/users/9530",
"pm_score": 5,
"selected": true,
"text": "static int nice_num(char *buffer, size_t len, int32_t n)\n{\n int neg = 0, d = 3;\n char buf[16];\n size_t bufsize... | 2008/11/29 | [
"https://Stackoverflow.com/questions/327216",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15168/"
] |
327,223 | <p>In one of my current side projects, I am scanning through some text looking at the frequency of word triplets. In my first go at it, I used the default dictionary three levels deep. In other words, <code>topDict[word1][word2][word3]</code> returns the number of times these words appear in the text, <code>topDict[w... | [
{
"answer_id": 327254,
"author": "user39307",
"author_id": 39307,
"author_profile": "https://Stackoverflow.com/users/39307",
"pm_score": 1,
"selected": false,
"text": "topDictionary[word1+delimiter+word2+delimiter+word3]\n"
},
{
"answer_id": 327285,
"author": "Dustin",
"a... | 2008/11/29 | [
"https://Stackoverflow.com/questions/327223",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/121/"
] |
327,231 | <p>i am trying to find the best way to display results on my page via an Ajax call using jQuery, do you think the best way is to pass it as JSON or plain text? I have worked with ajax calls before, but not sure which is preferred over the other and for the JSON version what is the best way to read from a JSON file gene... | [
{
"answer_id": 327282,
"author": "strager",
"author_id": 39992,
"author_profile": "https://Stackoverflow.com/users/39992",
"pm_score": 2,
"selected": false,
"text": "$.getJSON(url, data, function(json) {\n $(json).each(function() {\n /* YOUR CODE HERE */\n });\n});\n"
},
... | 2008/11/29 | [
"https://Stackoverflow.com/questions/327231",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
327,249 | <p>I'm thinking of asking my students to use git for pair programming. Because student work has to be secret, a public repo is out of the question. Instead, each student will have a private repo they maintain themselves, and they will need to exchange patches using git-format-patch. I've read the man page but I'm a ... | [
{
"answer_id": 327258,
"author": "Dustin",
"author_id": 39975,
"author_profile": "https://Stackoverflow.com/users/39975",
"pm_score": 5,
"selected": true,
"text": "tar cvf - mytree | gzip -9vc > /tmp/mytree.tgz\n# mail /tmp/mytree.tgz\ngit tag last-send\n# hack, commit, hack, commit\ngit... | 2008/11/29 | [
"https://Stackoverflow.com/questions/327249",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/41661/"
] |
327,251 | <p>The documentation of the Python <a href="http://www.python.org/doc/2.5.2/lib/module-readline.html" rel="noreferrer"><code>readline</code></a> module says "Availability: Unix". However, it doesn't appear to be available on OS X, although other modules marked as Unix are available. Here is what I'm using:</p>
<pre>
$... | [
{
"answer_id": 327292,
"author": "tegbains",
"author_id": 19419,
"author_profile": "https://Stackoverflow.com/users/19419",
"pm_score": 4,
"selected": true,
"text": "py-readline"
},
{
"answer_id": 1114882,
"author": "Telemachus",
"author_id": 26702,
"author_profile": ... | 2008/11/29 | [
"https://Stackoverflow.com/questions/327251",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/893/"
] |
327,274 | <p>How would you write a prepared MySQL statement in PHP that takes a differing number of arguments each time? An example such query is:</p>
<pre class="lang-sql prettyprint-override"><code>SELECT `age`, `name` FROM `people` WHERE id IN (12, 45, 65, 33)
</code></pre>
<p>The <code>IN</code> clause will have a differen... | [
{
"answer_id": 327384,
"author": "Zoredache",
"author_id": 20267,
"author_profile": "https://Stackoverflow.com/users/20267",
"pm_score": 6,
"selected": true,
"text": "$dbh=new PDO($dbConnect, $dbUser, $dbPass);\n$parms=array(12, 45, 65, 33);\n$parmcount=count($parms); // = 4\n$inclause... | 2008/11/29 | [
"https://Stackoverflow.com/questions/327274",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/41757/"
] |
327,286 | <p>I have a huge dictionary of blank values in a variable called current like so:</p>
<pre><code>struct movieuser {blah blah blah}
Dictionary<movieuser, float> questions = new Dictionary<movieuser, float>();
</code></pre>
<p>So I am looping through this dictionary and need to fill in the "answers", like s... | [
{
"answer_id": 327291,
"author": "Matt Campbell",
"author_id": 41110,
"author_profile": "https://Stackoverflow.com/users/41110",
"pm_score": 2,
"selected": false,
"text": "foreach(var key in someListOfKeys)\n{\n questions.Add(key, retrieveGuess(key.userID, key.movieID);\n}\n"
},
{... | 2008/11/29 | [
"https://Stackoverflow.com/questions/327286",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2504/"
] |
327,310 | <p>In Visual c# Express Edition, is it possible to make some (but not all) items in a ListBox bold? I can't find any sort of option for this in the API.</p>
| [
{
"answer_id": 327320,
"author": "Mindaugas Mozūras",
"author_id": 26408,
"author_profile": "https://Stackoverflow.com/users/26408",
"pm_score": 6,
"selected": true,
"text": " public partial class Form1 : Form\n {\n public Form1()\n {\n InitializeComponent();\n\n List... | 2008/11/29 | [
"https://Stackoverflow.com/questions/327310",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13877/"
] |
327,311 | <p>Does anyone know how the built in dictionary type for python is implemented? My understanding is that it is some sort of hash table, but I haven't been able to find any sort of definitive answer.</p>
| [
{
"answer_id": 9022835,
"author": "Praveen Gollakota",
"author_id": 553995,
"author_profile": "https://Stackoverflow.com/users/553995",
"pm_score": 9,
"selected": false,
"text": "dict"
},
{
"answer_id": 44509302,
"author": "Russia Must Remove Putin",
"author_id": 541136,
... | 2008/11/29 | [
"https://Stackoverflow.com/questions/327311",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/121/"
] |
327,321 | <p>I am working on some sort of CRM application which has huge sales data with all the customer leads etc (ASP.NET 2.0/Ajax)</p>
<p>I want to create a dashboard which will have four separate data containers each container will have different sort of data and each container has to update it self after some configured ... | [
{
"answer_id": 327418,
"author": "rodbv",
"author_id": 79101,
"author_profile": "https://Stackoverflow.com/users/79101",
"pm_score": 3,
"selected": true,
"text": "window.setTimeout(\"Button1.click()\",5000)"
}
] | 2008/11/29 | [
"https://Stackoverflow.com/questions/327321",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/41524/"
] |
327,324 | <p>I'm using Junit 4.4 and Ant 1.7. If a test case fails with an error (for example because a method threw an unexpected exception) I don't get any details about what the error was.</p>
<p>My build.xml looks like this:</p>
<pre><code><target name="test" depends="compile">
<junit printsummary="withOutAndErr"... | [
{
"answer_id": 327334,
"author": "user41762",
"author_id": 41762,
"author_profile": "https://Stackoverflow.com/users/41762",
"pm_score": 5,
"selected": false,
"text": "<formatter type=\"plain\" usefile=\"false\" />\n"
},
{
"answer_id": 327619,
"author": "Jeffrey Fredrick",
... | 2008/11/29 | [
"https://Stackoverflow.com/questions/327324",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/41762/"
] |
327,326 | <p>I have a problem redrawing a custom view in simple cocoa application. Drawing is based on one parameter that is being changed by a simple NSSlider. However, although i implement -setParameter: and -parameter methods and bind slider's value to that parameter in interface builder i cannot seem to make a custom view to... | [
{
"answer_id": 327338,
"author": "e.James",
"author_id": 33686,
"author_profile": "https://Stackoverflow.com/users/33686",
"pm_score": 4,
"selected": true,
"text": "[self setNeedsDisplay:YES]"
},
{
"answer_id": 1865196,
"author": "Eric",
"author_id": 174691,
"author_p... | 2008/11/29 | [
"https://Stackoverflow.com/questions/327326",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/41761/"
] |
327,337 | <pre><code>mysql> desc categories;
+-------+-------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-------+-------------+------+-----+---------+----------------+
| id | int(11) | NO | PRI | NULL | auto_increment |
| name | varchar(80) | YE... | [
{
"answer_id": 327574,
"author": "François Beausoleil",
"author_id": 7355,
"author_profile": "https://Stackoverflow.com/users/7355",
"pm_score": 2,
"selected": false,
"text": "Expense.find(:all,\n :select => \"categories.name name, sum(amount) total_amount\",\n :joins => \"categories o... | 2008/11/29 | [
"https://Stackoverflow.com/questions/327337",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1695/"
] |
327,358 | <p>I am new to .net and would like to know whether .net has the java equivalent of AtomicInteger, ConcurrentLinkedQueue, etc?</p>
<p>I did a bit of search and couldnt come up with anything.</p>
<p>The lock free algorithms need some sort of a CAS instruction, which is provided through the undocumented Unsafe class in ... | [
{
"answer_id": 327391,
"author": "Marc Gravell",
"author_id": 23354,
"author_profile": "https://Stackoverflow.com/users/23354",
"pm_score": 0,
"selected": false,
"text": "Interlocked"
},
{
"answer_id": 327400,
"author": "pdeva",
"author_id": 14316,
"author_profile": "... | 2008/11/29 | [
"https://Stackoverflow.com/questions/327358",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14316/"
] |
327,361 | <p>How can I add an input form in an Excel sheet. I want to insert values into an Excel cell using the form.</p>
| [
{
"answer_id": 327396,
"author": "Oddthinking",
"author_id": 8014,
"author_profile": "https://Stackoverflow.com/users/8014",
"pm_score": 2,
"selected": false,
"text": " A B C\n1 Name Age Favourite Animal\n2 Jane 11 Horse\n"
}
] | 2008/11/29 | [
"https://Stackoverflow.com/questions/327361",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/38931/"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.