qid int64 4 19.1M | question stringlengths 18 48.3k | answers list | date stringlengths 10 10 | metadata list |
|---|---|---|---|---|
223,149 | <p>Say you create a form using ASP.NET MVC that has a dynamic number of form elements.</p>
<p>For instance, you need a checkbox for each product, and the number of products changes day by day.</p>
<p>How would you handle that form data being posted back to the controller? You can't set up parameters on the action met... | [
{
"answer_id": 223158,
"author": "leppie",
"author_id": 15541,
"author_profile": "https://Stackoverflow.com/users/15541",
"pm_score": 0,
"selected": false,
"text": "string[]"
},
{
"answer_id": 223168,
"author": "Craig Stuntz",
"author_id": 7714,
"author_profile": "htt... | 2008/10/21 | [
"https://Stackoverflow.com/questions/223149",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7837/"
] |
223,151 | <p>I'd like to write a Ruby snippet that gets run when my Gem is first installed via <code>[sudo ]gem install mygem</code>. Can it be done?</p>
| [
{
"answer_id": 226438,
"author": "IDBD",
"author_id": 7403,
"author_profile": "https://Stackoverflow.com/users/7403",
"pm_score": -1,
"selected": false,
"text": "irb(main):001:0> system 'gem list | grep rails'\nrails (2.1.1, 2.1.0)\n=> true\nirb(main):002:0> system 'gem list | grep rails... | 2008/10/21 | [
"https://Stackoverflow.com/questions/223151",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1190/"
] |
223,153 | <p>I am trying to call a COM object from PHP using the COM interop extension. One function requires an OLE_COLOR as an argument? Is there any way to pass this kind of value from PHP?</p>
<p>I have tried passing a simple integer value with no success.</p>
<pre><code>$this->oBuilder->Font->Color = 255;
</code>... | [
{
"answer_id": 432916,
"author": "Bob Fanger",
"author_id": 19165,
"author_profile": "https://Stackoverflow.com/users/19165",
"pm_score": 2,
"selected": true,
"text": "$Color = new COM('ColorClass');\n$Color->set_color_function($red, $green, $blue);\n"
}
] | 2008/10/21 | [
"https://Stackoverflow.com/questions/223153",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1508/"
] |
223,162 | <p>How do I pull out the filename from a full path using regular expressions in C#?</p>
<p>Say I have the full path <code>C:\CoolDirectory\CoolSubdirectory\CoolFile.txt</code>.</p>
<p>How do I get out CoolFile.txt using the .NET flavor of regular expressions? I'm not really good with regular expressions, and my RegEx... | [
{
"answer_id": 223172,
"author": "Dour High Arch",
"author_id": 22437,
"author_profile": "https://Stackoverflow.com/users/22437",
"pm_score": 5,
"selected": false,
"text": "Path.GetFileName()"
},
{
"answer_id": 223176,
"author": "bdukes",
"author_id": 2688,
"author_pr... | 2008/10/21 | [
"https://Stackoverflow.com/questions/223162",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18927/"
] |
223,173 | <p>I've got two directories containing ~20 GB of music files (mostly mp3, some ogg), and I would like to detect all duplicate songs. There are two complicating factors:</p>
<ol>
<li>A song may have different filenames in the two directories.</li>
<li>Two files containing the same song may have different ID3 tags and t... | [
{
"answer_id": 71106818,
"author": "derat",
"author_id": 6882947,
"author_profile": "https://Stackoverflow.com/users/6882947",
"pm_score": 0,
"selected": false,
"text": "fpcalc"
}
] | 2008/10/21 | [
"https://Stackoverflow.com/questions/223173",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13051/"
] |
223,187 | <pre><code>SqlConnection connection = new SqlConnection(FROM_CONFIGURATION)
SqlCommand command = new SqlCommand("SomeSQL", connection);
connection.Open();
command.ExecuteNonQuery();
command.Dispose();
connection.Dispose();
</code></pre>
<p>It is recommended that the code above should include try/catch (or using) ... | [
{
"answer_id": 223213,
"author": "Kon",
"author_id": 22303,
"author_profile": "https://Stackoverflow.com/users/22303",
"pm_score": 2,
"selected": false,
"text": "using using (SqlConnection connection = new SqlConnection(FROM_CONFIGURATION))\nusing (SqlCommand command = new SqlCommand(\"S... | 2008/10/21 | [
"https://Stackoverflow.com/questions/223187",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
223,189 | <p>How can I create a Delphi TSpeedButton or SpeedButton in C# 2.0?</p>
| [
{
"answer_id": 2244350,
"author": "reSPAWNed",
"author_id": 71793,
"author_profile": "https://Stackoverflow.com/users/71793",
"pm_score": 3,
"selected": false,
"text": "public class ButtonNoFocus : Button\n{\n public ButtonNoFocus()\n : base()\n {\n base.SetStyle(Cont... | 2008/10/21 | [
"https://Stackoverflow.com/questions/223189",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
223,195 | <p>If A references assembly B 1.1 and C, and C references B 1.2, how do you avoid assembly conflicts?</p>
<p>I nievely assumed C's references would be encapsulated away and would not cause any problems, but it appears all the dll's are copied to the bin, which is where the problem occurs.</p>
<p>I understand the two ... | [
{
"answer_id": 223276,
"author": "Joe",
"author_id": 13087,
"author_profile": "https://Stackoverflow.com/users/13087",
"pm_score": 1,
"selected": false,
"text": "<configuration>\n <runtime>\n <assemblyBinding xmlns=\"urn:schemas-microsoft-com:asm.v1\">\n <dependentAssembly... | 2008/10/21 | [
"https://Stackoverflow.com/questions/223195",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/230/"
] |
223,215 | <p>At a previous employer, we were writing binary messages that had to go "over the wire" to other computers. Each message had a standard header something like:</p>
<pre><code>class Header
{
int type;
int payloadLength;
};
</code></pre>
<p>All of the data was contiguous (header, immediately followed by data)... | [
{
"answer_id": 223224,
"author": "Menkboy",
"author_id": 29539,
"author_profile": "https://Stackoverflow.com/users/29539",
"pm_score": 4,
"selected": false,
"text": "#pragma pack"
},
{
"answer_id": 223230,
"author": "James Curran",
"author_id": 12725,
"author_profile"... | 2008/10/21 | [
"https://Stackoverflow.com/questions/223215",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17975/"
] |
223,219 | <p>I want to do something like </p>
<pre><code>insert into my table (select * from anothertable where id < 5)
</code></pre>
<p>What is the correct MSSQL syntax?</p>
<p>Thanks!</p>
| [
{
"answer_id": 223236,
"author": "Ed Altorfer",
"author_id": 26552,
"author_profile": "https://Stackoverflow.com/users/26552",
"pm_score": 4,
"selected": true,
"text": "INSERT INTO MyTable\nSELECT * FROM AnotherTable\nWHERE AnotherTable.ID < 5\n"
},
{
"answer_id": 223239,
"au... | 2008/10/21 | [
"https://Stackoverflow.com/questions/223219",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/22471/"
] |
223,238 | <p>Which Oracle database role will allow a user to select from a table in another schema without specifying the schema identifier?
i.e., as user A- Grant select on A.table to user B;
B can then- "Select * from table" without specifying the 'A'.
One of our databases allows this, the other returns a 'table or view doe... | [
{
"answer_id": 223278,
"author": "asalamon74",
"author_id": 21348,
"author_profile": "https://Stackoverflow.com/users/21348",
"pm_score": 2,
"selected": false,
"text": "alter session set current_schema=A"
},
{
"answer_id": 225107,
"author": "hamishmcn",
"author_id": 3590,... | 2008/10/21 | [
"https://Stackoverflow.com/questions/223238",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
223,249 | <p>In Visual Studio, two files are created when you create a new Windows Form in your solution (e.g. if you create MyForm.cs, MyForm.Designer.cs and MyForm.resx are also created). These second two files are displayed as a subtree in the Solution Explorer.</p>
<p><strong>Is there any way to add files to the sub-tree or... | [
{
"answer_id": 223254,
"author": "Jeff Yates",
"author_id": 23234,
"author_profile": "https://Stackoverflow.com/users/23234",
"pm_score": 3,
"selected": false,
"text": "<Compile Include=\"MyForm.MyCoolSubFile.cs\">\n <DependentUpon>MyForm.cs</DependentUpon>\n</Compile>\n"
},
{
"... | 2008/10/21 | [
"https://Stackoverflow.com/questions/223249",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5692/"
] |
223,253 | <p>I have a requirement to install multiple web setup projects (using VS2005 and ASP.Net/C#) into the same virtual folder. The projects share some assembly references (the file systems are all structured to use the same 'bin' folder), making deployment of changes to those assemblies problematic since the MS installer... | [
{
"answer_id": 224116,
"author": "David White",
"author_id": 30183,
"author_profile": "https://Stackoverflow.com/users/30183",
"pm_score": 3,
"selected": false,
"text": "<FileUpdate \nFiles=\"$(WebDir)\\Properties\\AssemblyInfo.cs\"\nRegex=\"(\\d+)\\.(\\d+)\\.(\\d+)\\.(\\d+)\"\nReplaceme... | 2008/10/21 | [
"https://Stackoverflow.com/questions/223253",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7388/"
] |
223,268 | <p>I know there is built-in Internet explorer, but what I'm looking for is to open Firefox/Mozilla window (run the application) with specified URL. Anyone can tell me how to do that in C# (.nET) ?</p>
| [
{
"answer_id": 223307,
"author": "Tom Ritter",
"author_id": 8435,
"author_profile": "https://Stackoverflow.com/users/8435",
"pm_score": 0,
"selected": false,
"text": "C:\\Program Files\\Mozilla Firefox>firefox.exe http://google.com\n"
},
{
"answer_id": 223320,
"author": "Hall... | 2008/10/21 | [
"https://Stackoverflow.com/questions/223268",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/21209/"
] |
223,272 | <p>I have a simple query like this:</p>
<pre><code>select * from mytable where id > 8
</code></pre>
<p>I want to make the 8 a variable. There's some syntax like </p>
<pre><code>declare @myvar int
myvar = 8
</code></pre>
<p>but I don't know the exact syntax.</p>
<p>What is it?</p>
<p>Thanks!</p>
| [
{
"answer_id": 223280,
"author": "Austin Salonen",
"author_id": 4068,
"author_profile": "https://Stackoverflow.com/users/4068",
"pm_score": 1,
"selected": false,
"text": "declare @myvar int\n\nselect @myvar = 8\n"
},
{
"answer_id": 223281,
"author": "Ed Altorfer",
"author... | 2008/10/21 | [
"https://Stackoverflow.com/questions/223272",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/22471/"
] |
223,283 | <p>Even a simple <a href="http://en.wikipedia.org/wiki/Notepad_%28software%29" rel="noreferrer">Notepad</a> application in C# consumes megabytes of RAM as seen in the task manager. On minimizing the application the memory size in the task manager goes down considerably and is back up when the application is maximized.<... | [
{
"answer_id": 223300,
"author": "Ed Altorfer",
"author_id": 26552,
"author_profile": "https://Stackoverflow.com/users/26552",
"pm_score": 6,
"selected": true,
"text": "[DllImport(\"psapi.dll\")]\nstatic extern int EmptyWorkingSet(IntPtr hwProc);\n\nstatic void MinimizeFootprint()\n{\n ... | 2008/10/21 | [
"https://Stackoverflow.com/questions/223283",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/29443/"
] |
223,285 | <p>I am using the following code:</p>
<pre><code><?php
$stock = $_GET[s]; //returns stock ticker symbol eg GOOG or YHOO
$first = $stock[0];
$url = "http://biz.yahoo.com/research/earncal/".$first."/".$stock.".html";
$data = file_get_contents($url);
$r_header = '/Prev. Week(.+?)Next Week/';
$r_date = '/\<b\>(... | [
{
"answer_id": 223358,
"author": "mohammedn",
"author_id": 29268,
"author_profile": "https://Stackoverflow.com/users/29268",
"pm_score": 0,
"selected": false,
"text": "<a href=\"...\">Prev. Week</a> ..."
},
{
"answer_id": 223366,
"author": "J.T. Grimes",
"author_id": 1676... | 2008/10/21 | [
"https://Stackoverflow.com/questions/223285",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/30098/"
] |
223,308 | <p>I am trying to use page methods in my asp.net page. I have enable page methods set to true on the script manager, the webmethod attribute defined on the method, the function is public static string, I know the function works because when I run it from my code behind it generates the expected result, but when I call... | [
{
"answer_id": 223464,
"author": "Chris Westbrook",
"author_id": 16891,
"author_profile": "https://Stackoverflow.com/users/16891",
"pm_score": 0,
"selected": false,
"text": " function getName()\n {\n var ddlAdCodes=$get('<%=ddlAdCodes.ClientID %>');\n var value=ddlAdCodes.options[d... | 2008/10/21 | [
"https://Stackoverflow.com/questions/223308",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/16891/"
] |
223,312 | <p>Quite simple really:</p>
<pre><code>var req:URLRequest=new URLRequest();
req.url="http://somesite.com";
var header:URLRequestHeader=new URLRequestHeader("my-bespoke-header","1");
req.requestHeaders.push(header);
req.method=URLRequestMethod.GET;
stream.load(req);
</code></pre>
<p>Yet, if I inspect the traffic with ... | [
{
"answer_id": 223464,
"author": "Chris Westbrook",
"author_id": 16891,
"author_profile": "https://Stackoverflow.com/users/16891",
"pm_score": 0,
"selected": false,
"text": " function getName()\n {\n var ddlAdCodes=$get('<%=ddlAdCodes.ClientID %>');\n var value=ddlAdCodes.options[d... | 2008/10/21 | [
"https://Stackoverflow.com/questions/223312",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14357/"
] |
223,313 | <p>What is MySQL equivalent of the <code>Nz</code> Function in Microsoft Access? Is <code>Nz</code> a SQL standard?</p>
<p>In Access, the <code>Nz</code> function lets you return a value when a variant is null. <a href="http://www.techonthenet.com/access/functions/advanced/nz.php" rel="nofollow noreferrer">Source</a><... | [
{
"answer_id": 223329,
"author": "Mike Wills",
"author_id": 2535,
"author_profile": "https://Stackoverflow.com/users/2535",
"pm_score": 2,
"selected": false,
"text": "IFNULL COALESCE IFNULL"
},
{
"answer_id": 223560,
"author": "Bill Karwin",
"author_id": 20860,
"autho... | 2008/10/21 | [
"https://Stackoverflow.com/questions/223313",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/30076/"
] |
223,316 | <p>In an effort to satisfy "The Joel Test" question #2 "Can you make a build in one step?", I'm trying to complete a release candidate build script with the creation of a CD iso from the collection of files gathered and generated by the installer creator.</p>
<p>There seem to be many good tools (many free) out there t... | [
{
"answer_id": 224991,
"author": "monkut",
"author_id": 24718,
"author_profile": "https://Stackoverflow.com/users/24718",
"pm_score": 2,
"selected": false,
"text": "add_option = '-a'\nadd_option_value = installer_fullpath\nresponse_option = '-py' # answer yes to all options \n\n\n# Get t... | 2008/10/21 | [
"https://Stackoverflow.com/questions/223316",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5496/"
] |
223,317 | <p>This may not be the correct way to use controllers, but I did notice this problem and hadn't figured out a way to correct it. </p>
<pre><code>public JsonResult SomeControllerAction() {
//The current method has the HttpContext just fine
bool currentIsNotNull = (this.HttpContext == null); //which is false ... | [
{
"answer_id": 223334,
"author": "mmacaulay",
"author_id": 22152,
"author_profile": "https://Stackoverflow.com/users/22152",
"pm_score": 0,
"selected": false,
"text": "\nreturn RedirectToAction(\"SomeAction\", \"SomeOtherController\", new {param1 = \"Something\" });\n"
},
{
"answ... | 2008/10/21 | [
"https://Stackoverflow.com/questions/223317",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17091/"
] |
223,322 | <p>I'm trying to have a new layer appear above existing content on my site when a link/button is clicked. I am using jquery - but the code I have doesn't seem to work as expected.</p>
<p>Here is what I have:</p>
<pre><code> $(document).ready(function(){
$("#button").click(function () {
$("#showme").insertAfter("... | [
{
"answer_id": 223330,
"author": "eyelidlessness",
"author_id": 17964,
"author_profile": "https://Stackoverflow.com/users/17964",
"pm_score": 0,
"selected": false,
"text": "#showme position static"
},
{
"answer_id": 223379,
"author": "tags2k",
"author_id": 192,
"autho... | 2008/10/21 | [
"https://Stackoverflow.com/questions/223322",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
223,325 | <p>Building a java application that supports different Locales, but would like to customize the <code>DateFormat</code> display beyond what is available between <code>FULL</code>, <code>LONG</code>, <code>MEDIUM</code>, and <code>SHORT</code> DateFormat options. Would like to do things like place a character between t... | [
{
"answer_id": 223343,
"author": "Paul Tomblin",
"author_id": 3333,
"author_profile": "https://Stackoverflow.com/users/3333",
"pm_score": 0,
"selected": false,
"text": " // This is an incredibly ugly hack, but it's based on the fact that\n // Java for some reason decided that Italy use... | 2008/10/21 | [
"https://Stackoverflow.com/questions/223325",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
223,328 | <p>I have been trying to strip out some data from HTML files. I have the logic coded to get the right cells. Now I am struggling to get the actual contents of the 'cell':</p>
<p>here is my HTML snippet:</p>
<p>headerRows[0][10].contents</p>
<pre><code> [<font size="+0"><font face="serif" size="1"><b... | [
{
"answer_id": 223534,
"author": "Jonny Buchanan",
"author_id": 6760,
"author_profile": "https://Stackoverflow.com/users/6760",
"pm_score": 3,
"selected": false,
"text": "findNext headerRows[0][10].findNext('b').string\n <b> findAll NavigableString >>> s = BeautifulSoup(u'<p>Test 1 <span... | 2008/10/21 | [
"https://Stackoverflow.com/questions/223328",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/30105/"
] |
223,352 | <p>I'm trying to determine the reason for a stalled process on Linux. It's a telecom application, running under fairly heavy load. There is a separate process for each of 8 T1 spans. Every so often, one of the processes will get very unresponsive - up to maybe 50 seconds before an event is noted in the normally very... | [
{
"answer_id": 223592,
"author": "ADEpt",
"author_id": 10105,
"author_profile": "https://Stackoverflow.com/users/10105",
"pm_score": 3,
"selected": false,
"text": "strace -f -o LOG -p <pid>\n strace -e file -f -o LOG ....\n"
}
] | 2008/10/21 | [
"https://Stackoverflow.com/questions/223352",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
223,354 | <p>I've got a really simple rails question here but I can't seem to find the answer anywhere. I guess some of the problems stem from me following a tutorial for Rails 1.2 with Rails 2.1. Anyway..</p>
<p>I'm writing a blog system and I'm implementing the comments bit. I have comments displaying fine once I've created t... | [
{
"answer_id": 223515,
"author": "Vitalie",
"author_id": 27913,
"author_profile": "https://Stackoverflow.com/users/27913",
"pm_score": -1,
"selected": false,
"text": " form_for :comment, :url => { :post_id => @post } do |f|\n f.text_area :body\n submit_tag \"Post\"\n end\n ge... | 2008/10/21 | [
"https://Stackoverflow.com/questions/223354",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1912/"
] |
223,360 | <p>How does the Chinese GB18030 code set differ from Unicode?</p>
<p>What special techniques are required for handling GB18030?</p>
<p>Are there any (open source) libraries for handling GB18030?</p>
| [
{
"answer_id": 3224578,
"author": "dan04",
"author_id": 287586,
"author_profile": "https://Stackoverflow.com/users/287586",
"pm_score": 4,
"selected": false,
"text": "find index"
}
] | 2008/10/21 | [
"https://Stackoverflow.com/questions/223360",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15168/"
] |
223,373 | <p>I would like my GWT program to be able to determine whether it's in hosted mode or in web mode. Is there a way to do this?</p>
<p>Thanks! </p>
| [
{
"answer_id": 1066457,
"author": "Chris Ruffalo",
"author_id": 128339,
"author_profile": "https://Stackoverflow.com/users/128339",
"pm_score": 0,
"selected": false,
"text": "if(GWT.isScript()) {\n //some code not in the JRE emulation here\n}\n"
}
] | 2008/10/21 | [
"https://Stackoverflow.com/questions/223373",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10333/"
] |
223,384 | <p>I have a static object at runtime that is basically a list of other objects (ints, strings, Dictionary, other objects, etc). Is there way to determine the memory used by my static "list of other objects" object at runtime? This would be handy for instrumentation and reporting purposes.</p>
| [
{
"answer_id": 226224,
"author": "Bullines",
"author_id": 27870,
"author_profile": "https://Stackoverflow.com/users/27870",
"pm_score": 0,
"selected": false,
"text": "using (MemoryStream memstream = new MemoryStream())\n{\n BinaryFormatter formatter = new BinaryFormatter();\n\n try... | 2008/10/21 | [
"https://Stackoverflow.com/questions/223384",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/27870/"
] |
223,393 | <p>What is the Perl equivalent of <code>strlen()</code>?</p>
| [
{
"answer_id": 223401,
"author": "Paul Tomblin",
"author_id": 3333,
"author_profile": "https://Stackoverflow.com/users/3333",
"pm_score": 7,
"selected": true,
"text": "length($string)"
},
{
"answer_id": 224035,
"author": "JDrago",
"author_id": 29060,
"author_profile":... | 2008/10/21 | [
"https://Stackoverflow.com/questions/223393",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18511/"
] |
223,395 | <p>If I HTML encode any data entered by website users when I redisplay it, will this prevent CSS vulnerabilities? </p>
<p>Also, is there a tool/product available that will sanitize my user input for me, so that I don't have to write my own routines.</p>
| [
{
"answer_id": 223492,
"author": "Edward Z. Yang",
"author_id": 23845,
"author_profile": "https://Stackoverflow.com/users/23845",
"pm_score": 3,
"selected": false,
"text": "< > \" ' &"
}
] | 2008/10/21 | [
"https://Stackoverflow.com/questions/223395",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
223,400 | <p>I've just started learning linq and lambda expressions, and they seem to be a good fit for finding duplicates in a complex object collection, but I'm getting a little confused and hope someone can help put me back on the path to happy coding.</p>
<p>My object is structured like list.list.uniqueCustomerIdentifier</p... | [
{
"answer_id": 223414,
"author": "smaclell",
"author_id": 22914,
"author_profile": "https://Stackoverflow.com/users/22914",
"pm_score": 2,
"selected": false,
"text": "var results = from item in list\n group item by item.id into g\n select g.First();\n"
},
{
... | 2008/10/21 | [
"https://Stackoverflow.com/questions/223400",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/22706/"
] |
223,421 | <p>My question is quite relevant to <a href="https://stackoverflow.com/questions/42785/how-do-you-retrofit-unit-tests-into-a-code-base">something asked before</a> but I need some practical advice.</p>
<p>I have "Working effectively with legacy code" in my hands and I 'm using advice from the book as I read it in the p... | [
{
"answer_id": 223595,
"author": "Paul Nathan",
"author_id": 26227,
"author_profile": "https://Stackoverflow.com/users/26227",
"pm_score": 2,
"selected": false,
"text": "all: tests executables\n\nrun-tests: tests\n <commands to run the test suite>\n\nexecutables: <file list>\n <com... | 2008/10/21 | [
"https://Stackoverflow.com/questions/223421",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6403/"
] |
223,431 | <p>Which industry-class database has the most <strong>unique</strong> features? (with "unique" meaning that no other RDBMS has them)</p>
<p>I think my choice here is Oracle 11g:</p>
<ol>
<li>Flashback query (you can estract data as it was a moment in the past)</li>
<li>ASM - automatic storage management</li>
<li>Nati... | [
{
"answer_id": 224892,
"author": "onedaywhen",
"author_id": 15354,
"author_profile": "https://Stackoverflow.com/users/15354",
"pm_score": 2,
"selected": false,
"text": "CHECK DOMAIN ASSERTION"
}
] | 2008/10/21 | [
"https://Stackoverflow.com/questions/223431",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/23034/"
] |
223,433 | <p>I get to dust off my VBScript hat and write some classic ASP to query a SQL Server 2000 database.</p>
<p>Here's the scenario:</p>
<ul>
<li>I have two <em>datetime</em> fields called <strong>fieldA</strong> and <strong>fieldB</strong>.</li>
<li><strong>fieldB</strong> will never have a year value that's greater tha... | [
{
"answer_id": 223446,
"author": "tvanfosson",
"author_id": 12950,
"author_profile": "https://Stackoverflow.com/users/12950",
"pm_score": 2,
"selected": false,
"text": "select *\nfrom t\nwhere datepart(month,t.fieldA) >= datepart(month,t.fieldB)\n or (datepart(month,t.fieldA) = date... | 2008/10/21 | [
"https://Stackoverflow.com/questions/223433",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/305/"
] |
223,468 | <p>Question: </p>
<pre><code>((lambda (x y) (x y)) (lambda (x) (* x x)) (* 3 3))
</code></pre>
<p>This was #1 on the midterm, I put "81 9" he thought I forgot to cross one out lawl, so I cross out 81, and he goes aww. Anyways, I dont understand why it's 81.</p>
<p>I understand why <code>(lambda (x) (* x x)) (* 3 3) ... | [
{
"answer_id": 223484,
"author": "ddaa",
"author_id": 11549,
"author_profile": "https://Stackoverflow.com/users/11549",
"pm_score": 4,
"selected": true,
"text": "((lambda (x y) (x y))\n (lambda (x) (* x x))\n (* 3 3))\n (lambda (x y) (x y)) x y (lambda (x) (* x x)) (* 3 3) ((lambda (x) (... | 2008/10/21 | [
"https://Stackoverflow.com/questions/223468",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18431/"
] |
223,472 | <p>Aspell-net is a port of the GNU Aspell for .Net Framework. The library itself is open source, and is under the LGPL license, but the english dictionary for aspell is mentioned as copyrighted on the sourceforge.net project home page at <a href="http://aspell-net.sourceforge.net/" rel="nofollow noreferrer">http://aspe... | [
{
"answer_id": 223484,
"author": "ddaa",
"author_id": 11549,
"author_profile": "https://Stackoverflow.com/users/11549",
"pm_score": 4,
"selected": true,
"text": "((lambda (x y) (x y))\n (lambda (x) (* x x))\n (* 3 3))\n (lambda (x y) (x y)) x y (lambda (x) (* x x)) (* 3 3) ((lambda (x) (... | 2008/10/21 | [
"https://Stackoverflow.com/questions/223472",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
223,480 | <p>Simple question that keeps bugging me.</p>
<p>Should I HTML encode user input right away and store the encoded contents in the database, or should I store the raw values and HTML encode when displaying?</p>
<p>Storing encoded data greatly reduces the risk of a developer forgetting to encode the data when it's bein... | [
{
"answer_id": 223494,
"author": "Owen",
"author_id": 4853,
"author_profile": "https://Stackoverflow.com/users/4853",
"pm_score": 6,
"selected": true,
"text": "sanitize user input -> protect against sql injection -> db -> encode for display\n"
},
{
"answer_id": 223518,
"autho... | 2008/10/21 | [
"https://Stackoverflow.com/questions/223480",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12469/"
] |
223,490 | <p>My company requires me to use Outlook for my E-mail. Outlook does virtually nothing the way I want to do it and it frustrates me greatly. (I'm not trying to start a flame war here, it must do exactly what thousands of CEO's want it to do, but I'm not a CEO.)</p>
<p>I would like to be able to automatically extract... | [
{
"answer_id": 223542,
"author": "StubbornMule",
"author_id": 13341,
"author_profile": "https://Stackoverflow.com/users/13341",
"pm_score": 4,
"selected": true,
"text": " private RDOSession _MailSession = new RDOSession();\n private RDOFolder _IncommingInbox;\n private RDOFolder... | 2008/10/21 | [
"https://Stackoverflow.com/questions/223490",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10722/"
] |
223,495 | <p>Is there a way to Invoke an overloaded method using reflection in .NET (2.0). I have an application that dynamically instantiates classes that have been derived from a common base class. For compatibility purposes, this base class contains 2 methods of the same name, one with parameters, and one without. I need t... | [
{
"answer_id": 223505,
"author": "Keith",
"author_id": 905,
"author_profile": "https://Stackoverflow.com/users/905",
"pm_score": 4,
"selected": false,
"text": "Type tp = myInstance.GetType();\n\n//call parameter-free overload\ntp.InvokeMember( \"methodName\", BindingFlags.InvokeMethod, \... | 2008/10/21 | [
"https://Stackoverflow.com/questions/223495",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13611/"
] |
223,526 | <p>I'm writing a small application in VB.NET and I would like some of the classes to be able to write themselves out to XML to serve as a "save" feature. I have seen XSD files used to generate VB classes that can serialize themselves into and out of XML very easily. How would I do this if I do have any pre-existing X... | [
{
"answer_id": 223567,
"author": "nimish",
"author_id": 3926,
"author_profile": "https://Stackoverflow.com/users/3926",
"pm_score": 4,
"selected": true,
"text": "[XmlRoot(\"foo\")]\npublic class Foo\n{\n [XmlAttribute(\"bar\")] \n public string bar;\n [XmlAttribute(\"baz\")] ... | 2008/10/21 | [
"https://Stackoverflow.com/questions/223526",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5904/"
] |
223,533 | <p>I am looking for a solution or recommendation to a problem I am having. I have a bunch of ASPX pages that will be localized and have a bunch of text that needs to be supported in 6 languages.</p>
<p>The people doing the translation will not have access to Visual Studio and the likely easiest tool is Excel. If we ... | [
{
"answer_id": 224214,
"author": "Jared",
"author_id": 7388,
"author_profile": "https://Stackoverflow.com/users/7388",
"pm_score": 2,
"selected": false,
"text": "namespace SampleResourceImport\n{\n class Program\n {\n static void Main(string[] args)\n {\n\n ... | 2008/10/21 | [
"https://Stackoverflow.com/questions/223533",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2305/"
] |
223,535 | <p>Is there a way to manually increase / decrease the timeout of a specific aspx page?</p>
| [
{
"answer_id": 223551,
"author": "mohammedn",
"author_id": 29268,
"author_profile": "https://Stackoverflow.com/users/29268",
"pm_score": 4,
"selected": true,
"text": " <configuration>\n <location path=\"~/Default.aspx\">\n <system.web>\n <httpRuntime executionTimeo... | 2008/10/21 | [
"https://Stackoverflow.com/questions/223535",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1574/"
] |
223,548 | <p>I have been reading the <a href="http://msdn.microsoft.com/en-us/library/ms997565.aspx" rel="nofollow noreferrer">MSDN</a> documentation on subclassing and I have been successful in handling events in a subclass</p>
<p>My issue is with passing messages back to the original WndProc.</p>
<p>As an example, if I have... | [
{
"answer_id": 223858,
"author": "ChrisN",
"author_id": 3853,
"author_profile": "https://Stackoverflow.com/users/3853",
"pm_score": 3,
"selected": true,
"text": "SubClassFunc CallWindowProc window window group_box PostMessage SubClassFunc WM_COMMAND WM_NOTIFY window SetClassLong BUTTON B... | 2008/10/21 | [
"https://Stackoverflow.com/questions/223548",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2067/"
] |
223,549 | <p>We have a product but we are doing some rebranding so we need to be able to build and maintain two versions. I used resource files combined with some #if stuff to solve the strings, images, and whatever else, but the program icon is giving me trouble. I couldn't figure it out from msdn or a google search. Thanks!... | [
{
"answer_id": 223597,
"author": "Hallgrim",
"author_id": 15454,
"author_profile": "https://Stackoverflow.com/users/15454",
"pm_score": 2,
"selected": false,
"text": "copy \"$(ProjectDir)$(ConfigurationName).app.ico\" \"$(ProjectDir)app.ico\"\n"
},
{
"answer_id": 223599,
"aut... | 2008/10/21 | [
"https://Stackoverflow.com/questions/223549",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
223,556 | <p>Say I need some very special multiplication operator. It may be implemented in following macro:</p>
<pre><code>macro @<<!(op1, op2)
{
<[ ( $op1 * $op2 ) ]>
}
</code></pre>
<p>And I can use it like</p>
<pre><code>def val = 2 <<! 3
</code></pre>
<p>And its work.</p>
<p>But what I really want... | [
{
"answer_id": 223626,
"author": "ADEpt",
"author_id": 10105,
"author_profile": "https://Stackoverflow.com/users/10105",
"pm_score": 4,
"selected": true,
"text": "namespace Nemerle.English\n{\n [assembly: Nemerle.Internal.OperatorAttribute (\"Nemerle.English\", \"and\", false, 160, 161)... | 2008/10/21 | [
"https://Stackoverflow.com/questions/223556",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9198/"
] |
223,559 | <p>I want to know how to use variables for objects and function names in Python. In PHP, you can do this:</p>
<pre><code>$className = "MyClass";
$newObject = new $className();
</code></pre>
<p>How do you do this sort of thing in Python? Or, am I totally not appreciating some fundamental difference with Python, and i... | [
{
"answer_id": 223566,
"author": "Greg Hewgill",
"author_id": 893,
"author_profile": "https://Stackoverflow.com/users/893",
"pm_score": 6,
"selected": true,
"text": "className = MyClass\nnewObject = className()\n className MyClass MyClass className >>> className = list\n>>> newObject = c... | 2008/10/21 | [
"https://Stackoverflow.com/questions/223559",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/577/"
] |
223,611 | <p>When I try to create a new RegionInfo with certain ISO 3166 country codes ("BD" for Bangladesh, "SO" for Somalia, "LK" for Sri Lanka), I get an ArgumentException that says it's not recognized.</p>
<p>What's the deal? The Intellisense of RegionInfo(string) says it conforms to ISO 3166, but these country/region codes... | [
{
"answer_id": 19362724,
"author": "Jeppe Stig Nielsen",
"author_id": 1336654,
"author_profile": "https://Stackoverflow.com/users/1336654",
"pm_score": 2,
"selected": false,
"text": "RegionInfo foreach (var ri in CultureInfo.GetCultures(CultureTypes.SpecificCultures).Select(ci => new Reg... | 2008/10/21 | [
"https://Stackoverflow.com/questions/223611",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11574/"
] |
223,614 | <p>How to copy file(s) from one solaris 9 machine to another solaris 9 machine using only java?</p>
<p>We have ssh access to both machines. The java program will run on one of those two machines.</p>
<p>Update: rsync is not really an option. can't install it easily (UNIX team is, hum, hard to deal with)</p>
| [
{
"answer_id": 19362724,
"author": "Jeppe Stig Nielsen",
"author_id": 1336654,
"author_profile": "https://Stackoverflow.com/users/1336654",
"pm_score": 2,
"selected": false,
"text": "RegionInfo foreach (var ri in CultureInfo.GetCultures(CultureTypes.SpecificCultures).Select(ci => new Reg... | 2008/10/21 | [
"https://Stackoverflow.com/questions/223614",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/479/"
] |
223,618 | <p>First of all (in case this is important) I'm using ActiveState's Perl (v5.8.7 built for MSWin32-x86-multi-thread).</p>
<p>I've just emerged from a three hour long debugging session, trying to find the source of an error. I found there was simply no error, but for some reason ADO's connection object was getting the ... | [
{
"answer_id": 227041,
"author": "Joe Pineda",
"author_id": 21258,
"author_profile": "https://Stackoverflow.com/users/21258",
"pm_score": 1,
"selected": false,
"text": "sub execute_SQL {\n # $conn is an already opened ADO connection object\n # pointing to my SQL Server\n # $sql is the... | 2008/10/21 | [
"https://Stackoverflow.com/questions/223618",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/21258/"
] |
223,627 | <p>I'm trying to get a query working that takes the values (sometimes just the first part of a string) from a form control. The problem I have is that it only returns records when the full string is typed in.</p>
<p>i.e. in the surname box, I should be able to type gr, and it brings up </p>
<p>green
grey
graham</p>
... | [
{
"answer_id": 223648,
"author": "Mitchel Sellers",
"author_id": 13279,
"author_profile": "https://Stackoverflow.com/users/13279",
"pm_score": 0,
"selected": false,
"text": ",[Forms]![FrmSearchCustomer]![SearchFore] Like ([customerforname] & \"*\"))=True\n"
},
{
"answer_id": 2237... | 2008/10/21 | [
"https://Stackoverflow.com/questions/223627",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/30140/"
] |
223,628 | <p>I have derived a TabControl with the express purpose of enabling double buffering, except nothing is working as expected. Here is the TabControl code:</p>
<pre><code>class DoubleBufferedTabControl : TabControl
{
public DoubleBufferedTabControl() : base()
{
this.DoubleBuffered = true;
this.Se... | [
{
"answer_id": 277872,
"author": "Eric W",
"author_id": 14972,
"author_profile": "https://Stackoverflow.com/users/14972",
"pm_score": 0,
"selected": false,
"text": "this.DoubleBuffered = true"
},
{
"answer_id": 278958,
"author": "Peter Crabtree",
"author_id": 36283,
"... | 2008/10/21 | [
"https://Stackoverflow.com/questions/223628",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13227/"
] |
223,631 | <p>I'm trying to make a combo box that behaves somewhat like the Firefox 3 Awesomebar, with the following behavior:</p>
<ol>
<li>Type in text</li>
<li>Asynchronously bring back results</li>
<li>Up and down selects results in the list, <strong>BUT</strong> leaves the text that was typed in the entry box so the user can... | [
{
"answer_id": 277872,
"author": "Eric W",
"author_id": 14972,
"author_profile": "https://Stackoverflow.com/users/14972",
"pm_score": 0,
"selected": false,
"text": "this.DoubleBuffered = true"
},
{
"answer_id": 278958,
"author": "Peter Crabtree",
"author_id": 36283,
"... | 2008/10/21 | [
"https://Stackoverflow.com/questions/223631",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/27614/"
] |
223,634 | <p>The other day I set up an Ubuntu installation in a VM and went to gather the tools and libraries I figured I would need for programming mostly in C++.</p>
<p>I had a problem though, where to put things such as 3rd party source libraries, etc. From what I can gather, a lot of source distributions assume that a lot o... | [
{
"answer_id": 223637,
"author": "Paul Nathan",
"author_id": 26227,
"author_profile": "https://Stackoverflow.com/users/26227",
"pm_score": 3,
"selected": false,
"text": "/usr/local/lib\n/usr/local/include\n"
},
{
"answer_id": 223654,
"author": "Jake McGraw",
"author_id": ... | 2008/10/21 | [
"https://Stackoverflow.com/questions/223634",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/29049/"
] |
223,640 | <p>My class is implementing a super-class method which which returns <code>List<JComponent></code>. The list being returned is read-only:</p>
<pre><code>public abstract class SuperClass {
public abstract List<JComponent> getComponents();
}
</code></pre>
<p>In my class, I want to return a field which ... | [
{
"answer_id": 223653,
"author": "Adam Rosenfield",
"author_id": 9530,
"author_profile": "https://Stackoverflow.com/users/9530",
"pm_score": 3,
"selected": false,
"text": "getComponents() public List<? extends JComponent> getComponents()\n"
},
{
"answer_id": 223670,
"author":... | 2008/10/21 | [
"https://Stackoverflow.com/questions/223640",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
223,643 | <p>I'm currently adding some new extended classes to this code:</p>
<pre><code>foreach (BaseType b in CollectionOfExtendedTypes) {
if (b is ExtendedType1) {
((ExtendedType1) b).foo = this;
}
else if (b is ExtendedType2) {
((ExtenedType2) b).foo = this;
}
else {
b.foo = this;
}
}
</code></pr... | [
{
"answer_id": 223658,
"author": "JaredPar",
"author_id": 23283,
"author_profile": "https://Stackoverflow.com/users/23283",
"pm_score": 2,
"selected": false,
"text": "\nTypeSwitch.Do(\n sender,\n TypeSwitch.Case<Button>(() => textBox1.Text = \"Hit a Button\"),\n TypeSwitch.Case<... | 2008/10/21 | [
"https://Stackoverflow.com/questions/223643",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/21387/"
] |
223,644 | <p>Sometimes whenever I write a program in Linux and it crashes due to a bug of some sort, it will become an uninterruptible process and continue running forever until I restart my computer (even if I log out). My questions are:</p>
<ul>
<li>What causes a process to become uninterruptible?</li>
<li>How do I stop that... | [
{
"answer_id": 223727,
"author": "ddaa",
"author_id": 11549,
"author_profile": "https://Stackoverflow.com/users/11549",
"pm_score": 9,
"selected": true,
"text": "read()"
},
{
"answer_id": 224042,
"author": "CesarB",
"author_id": 28258,
"author_profile": "https://Stack... | 2008/10/21 | [
"https://Stackoverflow.com/questions/223644",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2147/"
] |
223,652 | <p>I was wondering if there is any way to escape a CDATA end token (<code>]]></code>) within a CDATA section in an xml document. Or, more generally, if there is some escape sequence for using within a CDATA (but if it exists, I guess it'd probably only make sense to escape begin or end tokens, anyway). </p>
<p>Basi... | [
{
"answer_id": 223773,
"author": "S.Lott",
"author_id": 10661,
"author_profile": "https://Stackoverflow.com/users/10661",
"pm_score": 7,
"selected": false,
"text": "]]> <![CDATA[]]]]><![CDATA[>]]> <![CDATA[]]]]> ]] <![CDATA[>]]> >"
},
{
"answer_id": 223782,
"author": "ddaa",
... | 2008/10/21 | [
"https://Stackoverflow.com/questions/223652",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/24170/"
] |
223,666 | <p>I am looking for the cleanest way. I am tempted to use delegates not sure though.</p>
| [
{
"answer_id": 223746,
"author": "Simon Buchan",
"author_id": 20135,
"author_profile": "https://Stackoverflow.com/users/20135",
"pm_score": 2,
"selected": true,
"text": "class A\n{\n public int Value;\n public int Add(int a) { return a + Value; }\n public int Mul(int a) { return... | 2008/10/21 | [
"https://Stackoverflow.com/questions/223666",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/438/"
] |
223,673 | <p>Alright, I am going to state up front that this question may be too involved (amount of detail not complexity) for this medium. But I figured this was the best place to start.</p>
<p>I am attempting to setup a proof of concept project and my BIND configuration is my first big hurdle. I want to setup 3 DNS servers... | [
{
"answer_id": 226685,
"author": "nsayer",
"author_id": 13757,
"author_profile": "https://Stackoverflow.com/users/13757",
"pm_score": 0,
"selected": false,
"text": ";Should this be ns1.itchy.bogus or ns1.itchy.internal.bogus??\nitchy NS ns1-itchy.bogus.\nns1-itchy.... | 2008/10/21 | [
"https://Stackoverflow.com/questions/223673",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/30145/"
] |
223,677 | <p>I have a regexp I'm using with sed, but now I need to make it work in PHP also. I can't use system calls as they are disabled.</p>
<pre>
$ cat uglynumber.txt:
Ticket number : 303905694, FOO:BAR:BAR: Some text
Case ID:123,456,789:Foobar - Some other text
303867970;[FOOBAR] Some text goes here
Case Ref: 303658850 - S... | [
{
"answer_id": 226685,
"author": "nsayer",
"author_id": 13757,
"author_profile": "https://Stackoverflow.com/users/13757",
"pm_score": 0,
"selected": false,
"text": ";Should this be ns1.itchy.bogus or ns1.itchy.internal.bogus??\nitchy NS ns1-itchy.bogus.\nns1-itchy.... | 2008/10/21 | [
"https://Stackoverflow.com/questions/223677",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/30141/"
] |
223,678 | <p>Given the hash of a blob, is there a way to get a list of commits that have this blob in their tree?</p>
| [
{
"answer_id": 223870,
"author": "Greg Hewgill",
"author_id": 893,
"author_profile": "https://Stackoverflow.com/users/893",
"pm_score": 3,
"selected": false,
"text": "#!/usr/bin/perl -w\n\nuse strict;\n\nmy @commits;\nmy %trees;\nmy $blob;\n\nsub blob_in_tree {\n my $tree = $_[0];\n ... | 2008/10/21 | [
"https://Stackoverflow.com/questions/223678",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4883/"
] |
223,679 | <p>I am trying to prevent data races in a multihreaded server. My problem is the following: there is a <code>List<RServer></code>, the type <code>RServer</code> is a class with several fields. Now, the server has several threads all running at the same time and they can modify both the <code>List</code> (adding m... | [
{
"answer_id": 224552,
"author": "Jonathan C Dickinson",
"author_id": 24064,
"author_profile": "https://Stackoverflow.com/users/24064",
"pm_score": 2,
"selected": false,
"text": " /// <summary>\n /// Opens the specified reader writer lock in read mode,\n /// specifying whether o... | 2008/10/21 | [
"https://Stackoverflow.com/questions/223679",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14759/"
] |
223,692 | <p>Well this is incredibly frustrating. After being nagged by Rails that I need to install the C-based MySQL adaptor, I did so... and then discovered that it won't work with MySQL under version 6. Now 'gem uninstall mysql' results in 'unknown gem mysql'. </p>
<p>I just spent half an hour trying to get the thing to... | [
{
"answer_id": 224552,
"author": "Jonathan C Dickinson",
"author_id": 24064,
"author_profile": "https://Stackoverflow.com/users/24064",
"pm_score": 2,
"selected": false,
"text": " /// <summary>\n /// Opens the specified reader writer lock in read mode,\n /// specifying whether o... | 2008/10/21 | [
"https://Stackoverflow.com/questions/223692",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/23965/"
] |
223,700 | <p>I have a class that I need to binary serialize. The class contains one field as below:</p>
<pre><code>private T[,] m_data;
</code></pre>
<p>These multi-dimensional arrays can be fairly large (hundreds of thousands of elements) and of any primitive type. When I tried standard .net serialization on an object the fil... | [
{
"answer_id": 224008,
"author": "TheSoftwareJedi",
"author_id": 18941,
"author_profile": "https://Stackoverflow.com/users/18941",
"pm_score": 4,
"selected": true,
"text": " int width = 1000;\n int height = 10000;\n List<int[]> list = new List<int[]>();\n for ... | 2008/10/21 | [
"https://Stackoverflow.com/questions/223700",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/30132/"
] |
223,713 | <p>I've just started working with ASP.NET MVC now that it's in beta. In my code, I'm running a simple LINQ to SQL query to get a list of results and passing that to my view. This sort of thing:</p>
<pre><code>var ords = from o in db.Orders
where o.OrderDate == DateTime.Today
select o;
return Vie... | [
{
"answer_id": 224005,
"author": "Haacked",
"author_id": 598,
"author_profile": "https://Stackoverflow.com/users/598",
"pm_score": 6,
"selected": true,
"text": "public ActionResult Foo() {\n return View(new {Something=\"Hey, it worked!\"});\n}\n\n//Using a normal ViewPage\n\n<%= Html.Te... | 2008/10/21 | [
"https://Stackoverflow.com/questions/223713",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/615/"
] |
223,738 | <p>I have a DataSet consisting of XML data, I can easily output this to a file:</p>
<pre><code>DataSet ds = new DataSet();
DataTable dt = new DataTable();
ds.Tables.Add(dt);
ds.Load(reader, LoadOption.PreserveChanges, ds.Tables[0]);
ds.WriteXml("C:\\test.xml");
</code></pre>
<p>However what I want to do is compress t... | [
{
"answer_id": 223764,
"author": "Matt Hamilton",
"author_id": 615,
"author_profile": "https://Stackoverflow.com/users/615",
"pm_score": 4,
"selected": true,
"text": "public void WriteFile(string fileName)\n{\n using (FileStream fs = new FileStream(fileName, FileMode.Create))\n {\n... | 2008/10/21 | [
"https://Stackoverflow.com/questions/223738",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15144/"
] |
223,748 | <p>I have a nice little file upload control I wrote for ASP.NET webforms that utilizes an IFrame and ASP.NET AJAX.</p>
<p>However, on large uploads, the browser times out before it can finish posting the form.</p>
<p>Is there a way I can increase this?</p>
<p>I'm not really interesting in alternative solutions, so d... | [
{
"answer_id": 230916,
"author": "Godeke",
"author_id": 28006,
"author_profile": "https://Stackoverflow.com/users/28006",
"pm_score": 4,
"selected": false,
"text": "<system.web>\n <httpRuntime maxRequestLength=\"10240\" executionTimeout=\"360\"/>\n</system.web>\n"
},
{
"answer_... | 2008/10/21 | [
"https://Stackoverflow.com/questions/223748",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1965/"
] |
223,750 | <p>I'm pretty sure stackoverflow.com is created with ASP.NET, but no matter where I click I see no .aspx extension in the address bar.
How it is done and is there a particular reason for this?</p>
| [
{
"answer_id": 223762,
"author": "vfilby",
"author_id": 24279,
"author_profile": "https://Stackoverflow.com/users/24279",
"pm_score": 2,
"selected": false,
"text": "posts/edit/<postnumber> editPost.aspx?postNumber=<postnumber>"
},
{
"answer_id": 29619854,
"author": "Musakkhir... | 2008/10/21 | [
"https://Stackoverflow.com/questions/223750",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/28098/"
] |
223,761 | <p>I have an API consisting of ASP.NET webservices callable through GET/POST/SOAP.</p>
<p>A new functionality will require me to accept files through this webservice. Basically I'm allowing users to upload files to a file archive through the API, which they'd otherwise do by logging into our browser based administrati... | [
{
"answer_id": 223828,
"author": "S.Lott",
"author_id": 10661,
"author_profile": "https://Stackoverflow.com/users/10661",
"pm_score": 2,
"selected": false,
"text": "HttpWebRequest HttpWebRequest"
}
] | 2008/10/21 | [
"https://Stackoverflow.com/questions/223761",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12469/"
] |
223,771 | <p>So, no matter what I seem to do, I cannot seem to avoid having Dev C++ spew out numerous Multiple Definition errors as a result of me including the same header file in multiple source code files in the same project. I'd strongly prefer to avoid having to dump all my source code into one file and only include the he... | [
{
"answer_id": 223785,
"author": "Gerald",
"author_id": 19404,
"author_profile": "https://Stackoverflow.com/users/19404",
"pm_score": 3,
"selected": false,
"text": "extern MYSTRUCT Job_Grunt;\n"
},
{
"answer_id": 223798,
"author": "Head Geek",
"author_id": 12193,
"aut... | 2008/10/21 | [
"https://Stackoverflow.com/questions/223771",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
223,777 | <p><em>Note: I found this <a href="https://stackoverflow.com/questions/10412/creating-a-word-doc-in-cnet">"Creating a Word Doc in C#.NET"</a>, but that is not what I want.</em></p>
<p>Do you know how to create a <strong>.odt</strong> to create file from C# .NET?<br>
Is there a .NET component or wrapper for an OpenOffi... | [
{
"answer_id": 15763461,
"author": "CloudyMarble",
"author_id": 395659,
"author_profile": "https://Stackoverflow.com/users/395659",
"pm_score": 0,
"selected": false,
"text": "private XComponentContext oStrap = uno.util.Bootstrap.bootstrap();\nXMultiServiceFactory oServMan = (XmultiServic... | 2008/10/21 | [
"https://Stackoverflow.com/questions/223777",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4358/"
] |
223,788 | <p>In a previous question, I asked about various ORM libraries. It turns out Kohana looks very clean yet functional for the purposes of ORM. I already have an MVC framework that I am working in though. If I don't want to run it as a framework, what is the right fileset to include to just give me the DB and ORM base cla... | [
{
"answer_id": 224341,
"author": "Zak",
"author_id": 2112692,
"author_profile": "https://Stackoverflow.com/users/2112692",
"pm_score": 2,
"selected": false,
"text": "From Kohana.php in the system directory:\n\n<-- snip if ($extension = self::find_file($type, self::$configuration['core'][... | 2008/10/21 | [
"https://Stackoverflow.com/questions/223788",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2112692/"
] |
223,797 | <p>Is there a way to merge two primary keys into one and then cascade update all affected relationships? Here's the scenario:</p>
<p>Customers (idCustomer int PK, Company varchar(50), etc)</p>
<p>CustomerContacts (idCustomerContact int PK, idCustomer int FK, Name varchar(50), etc)</p>
<p>CustomerNotes (idCustomerNo... | [
{
"answer_id": 224094,
"author": "Cade Roux",
"author_id": 18255,
"author_profile": "https://Stackoverflow.com/users/18255",
"pm_score": 3,
"selected": true,
"text": "INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS INFORMATION_SCHEMA.KEY_COLUMN_USAGE INFORMATION_SCHEMA.TABLE_CONSTRAINTS INFOR... | 2008/10/21 | [
"https://Stackoverflow.com/questions/223797",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13843/"
] |
223,800 | <p><a href="http://www.php.net/features.safe-mode" rel="noreferrer">open_basedir</a> limits the files that can be opened by PHP within a directory-tree.</p>
<p>I am storing several class libraries and configuration files outside of my web root directory. This way the web server does not make them publicly accessible.... | [
{
"answer_id": 223834,
"author": "Tom Haigh",
"author_id": 22224,
"author_profile": "https://Stackoverflow.com/users/22224",
"pm_score": 5,
"selected": true,
"text": "<Directory /var/www/vhosts/domain.tld/httpdocs>\nphp_admin_value open_basedir \"/var/www/vhosts/domain.tld/httpdocs:/var/... | 2008/10/21 | [
"https://Stackoverflow.com/questions/223800",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9290/"
] |
223,802 | <p>I am new to MySQL and PHP(as you can probably tell) and I was wondering if anybody knew an easy way to import a CSV file into a MySQL table.</p>
<blockquote>
<p>"There are any number of ways to input
csv into mysql depending in what kind
of access you have, if you can use the
mysql client directly there is ... | [
{
"answer_id": 223817,
"author": "Zak",
"author_id": 2112692,
"author_profile": "https://Stackoverflow.com/users/2112692",
"pm_score": 1,
"selected": false,
"text": "LOAD DATA INFILE 'data.txt' INTO TABLE db2.my_table;\n"
}
] | 2008/10/21 | [
"https://Stackoverflow.com/questions/223802",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/29912/"
] |
223,804 | <p>Suppose you have two models, User and City, joined by a third model CityPermission:</p>
<pre><code>class CityPermission < ActiveRecord::Base
belongs_to :city
belongs_to :user
end
class City < ActiveRecord::Base
has_many :city_permissions
has_many :users, :through => :city_permissions
end
class Us... | [
{
"answer_id": 223812,
"author": "madlep",
"author_id": 14160,
"author_profile": "https://Stackoverflow.com/users/14160",
"pm_score": 3,
"selected": true,
"text": "has_and_belongs_to_many"
},
{
"answer_id": 223818,
"author": "jcnnghm",
"author_id": 4767,
"author_profi... | 2008/10/21 | [
"https://Stackoverflow.com/questions/223804",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4767/"
] |
223,832 | <p>What is the most efficient way in C# 2.0 to check each character in a string and return true if they are all valid hexadecimal characters and false otherwise?</p>
<h3>Example</h3>
<pre><code>void Test()
{
OnlyHexInString("123ABC"); // Returns true
OnlyHexInString("123def"); // Returns tru... | [
{
"answer_id": 223843,
"author": "itsmatt",
"author_id": 7862,
"author_profile": "https://Stackoverflow.com/users/7862",
"pm_score": 3,
"selected": false,
"text": "Int32.TryParse()"
},
{
"answer_id": 223847,
"author": "Matt J",
"author_id": 18528,
"author_profile": "h... | 2008/10/21 | [
"https://Stackoverflow.com/questions/223832",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1463/"
] |
223,833 | <p>This is what I have, which works in IE7, but not in Firefox:</p>
<pre><code>@media screen { @import 'screen.css'; }
</code></pre>
<p>It works outside of the @media block in Firefox:</p>
<pre><code>@import 'screen.css';
</code></pre>
<p><strong>UPDATE:</strong> </p>
<p>This works:</p>
<pre><code>@media screen ... | [
{
"answer_id": 223949,
"author": "Peter Coulton",
"author_id": 117,
"author_profile": "https://Stackoverflow.com/users/117",
"pm_score": 1,
"selected": false,
"text": "@import 'stylesheet.css' media_type;\n @import 'firefox-screen.css' screen;\n@media screen { @import 'IE7-screen.css'; }... | 2008/10/21 | [
"https://Stackoverflow.com/questions/223833",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/117/"
] |
223,844 | <p>I can't find a definitive answer. Since C# 2.0 you've been able to declare</p>
<pre><code>int? i = 125;
</code></pre>
<p>as shorthand for</p>
<pre><code>Nullable<int> i = Nullable<int>(123);
</code></pre>
<p>I recall reading somewhere that VB.NET did not allow this shortcut. But low and behold, I t... | [
{
"answer_id": 224110,
"author": "Jason Jackson",
"author_id": 13103,
"author_profile": "https://Stackoverflow.com/users/13103",
"pm_score": 5,
"selected": true,
"text": "Dim x as Nullable(of Integer)\n Dim x as Integer?\n"
},
{
"answer_id": 302422,
"author": "user23462",
... | 2008/10/21 | [
"https://Stackoverflow.com/questions/223844",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/337/"
] |
223,866 | <p>I need to parse a transcript of a live chat conversation. My first thought on seeing the file was to throw regular expressions at the problem but I was wondering what other approaches people have used. </p>
<p>I put elegant in the title as i've previously found that this type of task has a danger of getting hard to... | [
{
"answer_id": 223904,
"author": "dalyons",
"author_id": 16925,
"author_profile": "https://Stackoverflow.com/users/16925",
"pm_score": 2,
"selected": false,
"text": "visitor = text.find(/Visitor:(.*)/)\noperator = text.find(/Operator:(.*)/)\nbody = text.find(/whatever....)\n text.match(/... | 2008/10/21 | [
"https://Stackoverflow.com/questions/223866",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2178/"
] |
223,875 | <p>I am starting to develop an Eclipse plugin (technically, an OSGi plugin) and one of the first problems I've run into is that I can't seem to control the commons-logging output as I normally would.</p>
<p>I've included the commons-logging package in the plugin dependencies, and indeed, when I log something (at INFO ... | [
{
"answer_id": 224821,
"author": "VonC",
"author_id": 6309,
"author_profile": "https://Stackoverflow.com/users/6309",
"pm_score": 4,
"selected": false,
"text": "java -jar org.eclipse.osgi_3.3.0.v20070530.jar -console -noExit -clean\n"
},
{
"answer_id": 235532,
"author": "rcre... | 2008/10/21 | [
"https://Stackoverflow.com/questions/223875",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3446/"
] |
223,878 | <p>In my question <a href="https://stackoverflow.com/questions/184729/as-a-mockist-tdd-practitioner-should-i-mock-other-methods-in-the-same-class-as">As a “mockist” TDD practitioner, should I mock other methods in the same class as the method under test?</a>, <a href="https://stackoverflow.com/users/20487/avdi">Avdi</a... | [
{
"answer_id": 224821,
"author": "VonC",
"author_id": 6309,
"author_profile": "https://Stackoverflow.com/users/6309",
"pm_score": 4,
"selected": false,
"text": "java -jar org.eclipse.osgi_3.3.0.v20070530.jar -console -noExit -clean\n"
},
{
"answer_id": 235532,
"author": "rcre... | 2008/10/21 | [
"https://Stackoverflow.com/questions/223878",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4766/"
] |
223,902 | <p>Take the following generics example</p>
<pre><code>import java.util.List;
import java.util.ArrayList;
public class GenericsTest {
private List<Animal> myList;
public static void main(String args[]) {
new GenericsTest(new ArrayList<Animal>()).add(new Dog());
}
public GenericsTe... | [
{
"answer_id": 223923,
"author": "Greg Cottman",
"author_id": 10496,
"author_profile": "https://Stackoverflow.com/users/10496",
"pm_score": 4,
"selected": true,
"text": "public class GenericsTest<T extends Animal>\n{\n private List<T> myList;\n\n public static void main(String args[])\... | 2008/10/21 | [
"https://Stackoverflow.com/questions/223902",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/25891/"
] |
223,918 | <p>We all know you can't do the following because of <code>ConcurrentModificationException</code>:</p>
<pre><code>for (Object i : l) {
if (condition(i)) {
l.remove(i);
}
}
</code></pre>
<p>But this apparently works sometimes, but not always. Here's some specific code:</p>
<pre class="lang-java pretty... | [
{
"answer_id": 223927,
"author": "Claudiu",
"author_id": 15055,
"author_profile": "https://Stackoverflow.com/users/15055",
"pm_score": 8,
"selected": false,
"text": "Iterator<Integer> iter = l.iterator();\nwhile (iter.hasNext()) {\n if (iter.next() == 5) {\n iter.remove();\n ... | 2008/10/21 | [
"https://Stackoverflow.com/questions/223918",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15055/"
] |
223,919 | <p>I've figured out how to set VC++ to compile code into a .lib file instead of a .exe, but I'm having trouble getting a lib to link together with my other .obj files.</p>
<p>Here is how I have the library and application folders set up. (I'm not sure if this is right)</p>
<pre><code>AppFolder
App.sln
App.ncb
... | [
{
"answer_id": 223943,
"author": "1800 INFORMATION",
"author_id": 3146,
"author_profile": "https://Stackoverflow.com/users/3146",
"pm_score": 4,
"selected": true,
"text": "#pragma comment(lib, \"Library\")\n"
},
{
"answer_id": 223947,
"author": "Nils Pipenbrinck",
"author... | 2008/10/21 | [
"https://Stackoverflow.com/questions/223919",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2222/"
] |
223,921 | <p>How do you get Pro*c to work within MSVC 6?</p>
<p>In otherwords compile a .pc file into a .cpp file.</p>
| [
{
"answer_id": 285934,
"author": "EvilTeach",
"author_id": 7734,
"author_profile": "https://Stackoverflow.com/users/7734",
"pm_score": 1,
"selected": true,
"text": "$(ProjDir)\\$(InputName).cpp\n call vcvars32.bat \nproc sqlcheck=semantics userid=scott/tiger@instance code=cpp char_map=... | 2008/10/21 | [
"https://Stackoverflow.com/questions/223921",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7734/"
] |
223,931 | <p>What are your favorite ways to encapsulate LINQ to SQL entity classes and data-context classes into business objects?</p>
<p>What have you found to work in a given situation?</p>
<p>Have you invented or taken to any specific patterns?</p>
| [
{
"answer_id": 1495281,
"author": "cllpse",
"author_id": 20946,
"author_profile": "https://Stackoverflow.com/users/20946",
"pm_score": 3,
"selected": true,
"text": "DeleteOnSubmit Delete /// <summary>\n/// This class extends BusinessLogicDataContext.Products entity class\n/// </summary>\... | 2008/10/21 | [
"https://Stackoverflow.com/questions/223931",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20946/"
] |
223,940 | <p>I researched this a while ago and can't remember how to do it. I want to be able to prevent Firefox from running it's spell-checking functionality on certain input fields from within the page. I know it's possible but can't remember how to set it up.</p>
| [
{
"answer_id": 223948,
"author": "Wilco",
"author_id": 5291,
"author_profile": "https://Stackoverflow.com/users/5291",
"pm_score": 7,
"selected": true,
"text": "<textarea spellcheck=\"false\"></textarea>\n"
}
] | 2008/10/21 | [
"https://Stackoverflow.com/questions/223940",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5291/"
] |
223,946 | <p>I have two LINQ objects which have exactly the same columns and I would like to be able to update one with the fields from the other. I first create a new object from some data in a file, then I query the database for an existing item with the same ID. What I would like to be able to do is update the existing obje... | [
{
"answer_id": 228465,
"author": "Nathan W",
"author_id": 6335,
"author_profile": "https://Stackoverflow.com/users/6335",
"pm_score": 0,
"selected": false,
"text": " Dim _OldCallerProperties = OldCaller.GetType().GetProperties(Reflection.BindingFlags.Public)\n Dim _NewCalle... | 2008/10/21 | [
"https://Stackoverflow.com/questions/223946",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6335/"
] |
223,952 | <p>Is there a way to create an instance of a class based on the fact I know the name of the class at runtime. Basically I would have the name of the class in a string.</p>
| [
{
"answer_id": 223967,
"author": "Ray Li",
"author_id": 28952,
"author_profile": "https://Stackoverflow.com/users/28952",
"pm_score": 6,
"selected": false,
"text": "System.Reflection.Assembly.GetExecutingAssembly().CreateInstance(string className)\n"
},
{
"answer_id": 224077,
... | 2008/10/21 | [
"https://Stackoverflow.com/questions/223952",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/16989/"
] |
223,964 | <p>Note: I am just consuming webservice I have no control over webservice code.</p>
<p>So in .net 2.0 I reference the webservice and see a class in the webservice namespace, say foobar. It's defined as:</p>
<pre><code>public class foobar : System.Web.Services.Protocols.SoapHttpClientProtocol
</code></pre>
<p>but in ... | [
{
"answer_id": 223979,
"author": "Andrew Moore",
"author_id": 26210,
"author_profile": "https://Stackoverflow.com/users/26210",
"pm_score": 1,
"selected": false,
"text": "Wsdl.exe wsdl.exe /language:cs http://www.example.com/FooService.wsdl"
},
{
"answer_id": 224174,
"author"... | 2008/10/21 | [
"https://Stackoverflow.com/questions/223964",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
223,966 | <p>I have an application which allows for multiple NSDocuments to be open. In this application is a single utility window that contains some functionality that I want to apply to the frontmost document.</p>
<p>I am trying to use bindings here, so the trick is how to cleanly bind the user interface of the utility wind... | [
{
"answer_id": 226866,
"author": "Ben Stiglitz",
"author_id": 6298,
"author_profile": "https://Stackoverflow.com/users/6298",
"pm_score": 2,
"selected": false,
"text": "mainWindow.document mainYourKindOfWindow mainWindow"
},
{
"answer_id": 226872,
"author": "Peter Hosey",
... | 2008/10/21 | [
"https://Stackoverflow.com/questions/223966",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/25560/"
] |
223,971 | <p>Is there an easy way to convert between color models in Java (RGB, HSV and Lab). </p>
<p>Assuming RGB color model:</p>
<ul>
<li>How do I calculate black body spectrum color palette? I want to use it for a heatmap chart.</li>
<li>How about single-wavelength spectrum?</li>
</ul>
<p><strong>Edit:</strong> I found th... | [
{
"answer_id": 224284,
"author": "luke",
"author_id": 25920,
"author_profile": "https://Stackoverflow.com/users/25920",
"pm_score": 5,
"selected": false,
"text": "public Color[] generateColors(int n)\n{\n Color[] cols = new Color[n];\n for(int i = 0; i < n; i++)\n {\n col... | 2008/10/21 | [
"https://Stackoverflow.com/questions/223971",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18187/"
] |
223,990 | <p>I need to perform a filtered query from within a django template, to get a set of objects equivalent to python code within a view:</p>
<pre><code>queryset = Modelclass.objects.filter(somekey=foo)
</code></pre>
<p>In my template I would like to do</p>
<pre><code>{% for object in data.somekey_set.FILTER %}
</code><... | [
{
"answer_id": 224003,
"author": "Eli Courtwright",
"author_id": 1694,
"author_profile": "https://Stackoverflow.com/users/1694",
"pm_score": 8,
"selected": true,
"text": "render_to_response {% for object in data.filtered_set %}"
},
{
"answer_id": 12350892,
"author": "mrmagooe... | 2008/10/21 | [
"https://Stackoverflow.com/questions/223990",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11527/"
] |
223,991 | <p>Because of several iframes, XUL browser elements, and so forth, I have a number of window objects in my XULRunner application. I'm looking for the best way to find the window object that a specified node belongs to using JavaScript.</p>
<p>So, to be more specific, given node x, I need to find the specific window ob... | [
{
"answer_id": 224002,
"author": "keparo",
"author_id": 19468,
"author_profile": "https://Stackoverflow.com/users/19468",
"pm_score": 2,
"selected": false,
"text": "<body>\n<div id=\"example\">Example!</div>\n<script type=\"text/javascript\">\n window.onload = function () {\n v... | 2008/10/21 | [
"https://Stackoverflow.com/questions/223991",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7441/"
] |
223,993 | <p>I'm in the process of trying to move our company from SalesForce to SugarCRM, but I've run in to a nasty bug (the moment I add a custom field to Accounts, all accounts stop showing up). We've paid for support from the SugarCRM people, but they only have take-forever-then-get-a-worthless-response-level tech support ... | [
{
"answer_id": 238875,
"author": "Kevin",
"author_id": 40,
"author_profile": "https://Stackoverflow.com/users/40",
"pm_score": 0,
"selected": false,
"text": "$this class Test {\n\n var $tmp;\n\n function __construct() {\n $this->tmp = 42; \n }\n}\n"
},
{
"answe... | 2008/10/21 | [
"https://Stackoverflow.com/questions/223993",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5921/"
] |
224,009 | <p>Session variables are normally keept in the web server RAM memory.</p>
<p>In a cluster, each request made by a client can be handled by a different cluster node. right?!</p>
<p>So, in this case... </p>
<ul>
<li>What happens with session variables? Aren't they stored in the nodes RAM memory? </li>
<li>How the oth... | [
{
"answer_id": 224015,
"author": "ine",
"author_id": 4965,
"author_profile": "https://Stackoverflow.com/users/4965",
"pm_score": 3,
"selected": false,
"text": "<sessionState\n mode=\"StateServer\"\n stateConnectionString=\"tcpip=127.0.0.1:42424\"\n sqlConnectionString=\"data sou... | 2008/10/22 | [
"https://Stackoverflow.com/questions/224009",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1100/"
] |
224,026 | <p>I've started to use constructs like these:</p>
<pre><code>class DictObj(object):
def __init__(self):
self.d = {}
def __getattr__(self, m):
return self.d.get(m, None)
def __setattr__(self, m, v):
super.__setattr__(self, m, v)
</code></pre>
<p>Update: based on this thread, I've re... | [
{
"answer_id": 224080,
"author": "hlzr",
"author_id": 19139,
"author_profile": "https://Stackoverflow.com/users/19139",
"pm_score": 4,
"selected": false,
"text": "DictObj class Container(object):\n pass\n\n>>> myContainer = Container()\n>>> myContainer.spam = \"in a can\"\n>>> myConta... | 2008/10/22 | [
"https://Stackoverflow.com/questions/224026",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13055/"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.