qid int64 4 19.1M | question stringlengths 18 48.3k | answers list | date stringlengths 10 10 | metadata list |
|---|---|---|---|---|
235,455 | <pre><code>string [] files = new string[2];
files[0] = "ThinkFarAhead.Example.Settings.Configuration_Local.xml";
files[1] = "ThinkFarAhead.Example.Settings.Configuration_Global.xml";
//Resharper complains this is an "access to modified closure"
for (int i = 0; i < files.Length; i++ )
{
// Resharper disable Acce... | [
{
"answer_id": 235459,
"author": "Jon Skeet",
"author_id": 22656,
"author_profile": "https://Stackoverflow.com/users/22656",
"pm_score": 9,
"selected": true,
"text": "i"
},
{
"answer_id": 15708331,
"author": "gerrard00",
"author_id": 1011470,
"author_profile": "https:... | 2008/10/24 | [
"https://Stackoverflow.com/questions/235455",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/28413/"
] |
235,470 | <p>I was wondering about implementing my own sessions (more for an exercise than anything else) for a GAE app I'm working ... at first I was thinking of using the datastore to store the session data. However, every time something needs to be added to the session 'bucket', it would require saving to the datastore. Obvio... | [
{
"answer_id": 259462,
"author": "massimo",
"author_id": 24489,
"author_profile": "https://Stackoverflow.com/users/24489",
"pm_score": 0,
"selected": false,
"text": "from gluon.contrib.gql import *\ndb=GQLDB()\nsession.connect(request,response,db=db)\n def index():\n session.c=session... | 2008/10/24 | [
"https://Stackoverflow.com/questions/235470",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10708/"
] |
235,484 | <p>Can anyone suggest some references or other resources that are useful in learning MCML?</p>
<p>I have a small pet project I have been working on for a while using C# and .Net 3.5. I have reached a point where I want to be able to send output from it to Windows Media Center, but I have been having a hard time findin... | [
{
"answer_id": 259462,
"author": "massimo",
"author_id": 24489,
"author_profile": "https://Stackoverflow.com/users/24489",
"pm_score": 0,
"selected": false,
"text": "from gluon.contrib.gql import *\ndb=GQLDB()\nsession.connect(request,response,db=db)\n def index():\n session.c=session... | 2008/10/24 | [
"https://Stackoverflow.com/questions/235484",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
235,498 | <p>Is there a way to show IE/Firefox Back button style, dropdown menu button?</p>
| [
{
"answer_id": 235646,
"author": "Jim McKeeth",
"author_id": 255,
"author_profile": "https://Stackoverflow.com/users/255",
"pm_score": 3,
"selected": false,
"text": "procedure TForm86.Button1Click(Sender: TObject);\nvar\n button: TControl;\n lowerLeft: TPoint;\nbegin\n if Sender is TC... | 2008/10/24 | [
"https://Stackoverflow.com/questions/235498",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
235,504 | <p>What is the best way to validate a crontab entry with PHP? Should I be using a regex, or an external library? I've got a PHP script that adds/removes entries from a crontab file, but want to have some way to verify that the time interval portion is in a valid format.</p>
| [
{
"answer_id": 235520,
"author": "Lucas Oman",
"author_id": 6726,
"author_profile": "https://Stackoverflow.com/users/6726",
"pm_score": 1,
"selected": false,
"text": "/^((\\*)|(\\d+((-\\d+)|(,\\d+)+))\\s+){5}/\n"
},
{
"answer_id": 235569,
"author": "joelhardi",
"author_id... | 2008/10/24 | [
"https://Stackoverflow.com/questions/235504",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5291/"
] |
235,515 | <p>Way back when I was working in an Oracle shop I took the CONNECT_BY for granted. Now I'm stuck working with SQL Server 2005 and have some nasty object hierarchies. Specifically, we have a self referencing table where all child records have a column with their parent's id. Currently we have a view that maps childr... | [
{
"answer_id": 235534,
"author": "Mark S. Rasmussen",
"author_id": 12469,
"author_profile": "https://Stackoverflow.com/users/12469",
"pm_score": 5,
"selected": false,
"text": "CREATE TABLE tblHierarchy (ID int, ParentID int NULL, Name varchar(128));\n\nINSERT INTO tblHierarchy VALUES (1,... | 2008/10/24 | [
"https://Stackoverflow.com/questions/235515",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/31336/"
] |
235,556 | <p>Using jQuery, how would you <code>show()</code> every <code>div.foo</code> on a page in a random order, with a new one appearing every X milliseconds?</p>
<p><strong>Clarification</strong>: I want to start with all these elements hidden and end with all of them showing, so it wouldn't make sense to <code>show()</co... | [
{
"answer_id": 235705,
"author": "Jason Bunting",
"author_id": 1790,
"author_profile": "https://Stackoverflow.com/users/1790",
"pm_score": 1,
"selected": false,
"text": "var intervalMilliseconds = X; // set to your value for X\nvar divFoos = $(\"div.foo\").get();\nvar intervalId = setInt... | 2008/10/24 | [
"https://Stackoverflow.com/questions/235556",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4376/"
] |
235,558 | <p>When a user clicks a link to download a file on my website, they go to <a href="http://viewsourcecode.org/viewsource/homebrew.php" rel="noreferrer">this PHP file</a> which increments a download counter for that file and then header()-redirects them to the actual file. I suspect that bots are following the download l... | [
{
"answer_id": 235609,
"author": "joelhardi",
"author_id": 11438,
"author_profile": "https://Stackoverflow.com/users/11438",
"pm_score": 2,
"selected": false,
"text": "grep -c logrotate"
}
] | 2008/10/24 | [
"https://Stackoverflow.com/questions/235558",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/813/"
] |
235,560 | <p>I've been getting some OutOfMemory errors lately in my application. Is it possible to detect ahead of time when the virtual machine is running low on memory? In other words to preemptively deal with OutOfMemory errors before they actually occur?</p>
| [
{
"answer_id": 235662,
"author": "TheMarko",
"author_id": 31099,
"author_profile": "https://Stackoverflow.com/users/31099",
"pm_score": 2,
"selected": false,
"text": "Runtime.getRuntime().freeMemory()\n"
},
{
"answer_id": 235701,
"author": "Darron",
"author_id": 22704,
... | 2008/10/24 | [
"https://Stackoverflow.com/questions/235560",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/23120/"
] |
235,564 | <p>I am using a mock object in RhinoMocks to represent a class that makes calls to MessageQueue.GetPublicQueues. I want to simulate the exception thrown when message queueing is operating in workgroup mode, which is a MessageQueueException, to ensure that I am catching the exception correctly</p>
<p>The MessageQueueEx... | [
{
"answer_id": 235703,
"author": "Hans Passant",
"author_id": 17034,
"author_profile": "https://Stackoverflow.com/users/17034",
"pm_score": 4,
"selected": true,
"text": "using System.Reflection;\nusing System.Messaging;\n...\n Type t = typeof(MessageQueueException);\n Const... | 2008/10/24 | [
"https://Stackoverflow.com/questions/235564",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/21862/"
] |
235,604 | <p>What is the best way to overwrite a specific line in a file? I basically want to search a file for the string '@parsethis' and overwrite the rest of that line with something else.</p>
| [
{
"answer_id": 235655,
"author": "Gaurav",
"author_id": 13492,
"author_profile": "https://Stackoverflow.com/users/13492",
"pm_score": -1,
"selected": false,
"text": "$cmd = \"grep '@parsethis' \" . $filename;\n$output = system($cmd, $result);\n$lines = explode(\"\\n\", $result);\n// Read... | 2008/10/24 | [
"https://Stackoverflow.com/questions/235604",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5291/"
] |
235,608 | <p>I have the following situation:</p>
<p>A user will define a certain filter on a page, and on postback I will query the database using that filter and return a bunch of matching records to the user, each with a checkbox next to it, so he can choose whether to act on each of those records.</p>
<p>In Classic ASP / PH... | [
{
"answer_id": 235849,
"author": "tvanfosson",
"author_id": 12950,
"author_profile": "https://Stackoverflow.com/users/12950",
"pm_score": 2,
"selected": false,
"text": "<script type='text/javascript'>\n function record(checkbox,item)\n {\n var context = { ctl : checkbox };\n ... | 2008/10/24 | [
"https://Stackoverflow.com/questions/235608",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3314/"
] |
235,616 | <p>Suppose a header file defines a function template. Now suppose two implementation files <code>#include</code> this header, and each of them has a call to the function template. In both implementation files the function template is instantiated with the same type.</p>
<pre><code>// header.hh
template <typename ... | [
{
"answer_id": 235640,
"author": "CAdaker",
"author_id": 30579,
"author_profile": "https://Stackoverflow.com/users/30579",
"pm_score": 1,
"selected": false,
"text": "extern"
}
] | 2008/10/24 | [
"https://Stackoverflow.com/questions/235616",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/456/"
] |
235,618 | <p>I received an error when an referenced .NET Framework 2.0 assembly tried to execute the following line of code in an IIS hosted WCF service:</p>
<p>Error Message:</p>
<blockquote>
<p>exePath must be specified when not
running inside a stand alone exe.</p>
</blockquote>
<p>Source Code:</p>
<pre><code>Configur... | [
{
"answer_id": 252356,
"author": "Michael Kniskern",
"author_id": 26327,
"author_profile": "https://Stackoverflow.com/users/26327",
"pm_score": 2,
"selected": false,
"text": "//Open app.config or web.config file\nif (HttpContext.Current != null)\n this.m_ConfigFile = WebConfigurationM... | 2008/10/24 | [
"https://Stackoverflow.com/questions/235618",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/26327/"
] |
235,650 | <p>There are many different styles of variable names that I've come across over the years.</p>
<p>The current wikipedia entry on naming conventions is fairly light... </p>
<p>I'd love to see a concise catalog of variable naming-conventions, identifying it by a name/description, and some examples. </p>
<p>If a conv... | [
{
"answer_id": 235666,
"author": "Bill the Lizard",
"author_id": 1288,
"author_profile": "https://Stackoverflow.com/users/1288",
"pm_score": 1,
"selected": false,
"text": "int i;\nchar c;\nfloat myWidth;\n"
},
{
"answer_id": 235710,
"author": ... | 2008/10/25 | [
"https://Stackoverflow.com/questions/235650",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/22329/"
] |
235,651 | <p>I have the following string expression in a PowerShell script:</p>
<pre><code>"select count(*) cnt from ${schema}.${table} where ${col.column_name} is null"
</code></pre>
<p>The schema and table resolve to the values of $schema and $table, respectively. However, an empty string is supplied for ${col.column_name}. ... | [
{
"answer_id": 235669,
"author": "Robert Gamble",
"author_id": 25222,
"author_profile": "https://Stackoverflow.com/users/25222",
"pm_score": 4,
"selected": true,
"text": "\"select count(*) cnt from $schema.$table where $($col.column_name) is null\"\n"
},
{
"answer_id": 235679,
... | 2008/10/25 | [
"https://Stackoverflow.com/questions/235651",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20625/"
] |
235,664 | <p>After looking at another question on SO (<a href="https://stackoverflow.com/questions/235386/using-nan-in-c">Using NaN in C++</a>) I became curious about <code>std::numeric_limits<double>::signaling_NaN()</code>.</p>
<p>I could not get signaling_NaN to throw an exception. I thought perhaps by signaling it rea... | [
{
"answer_id": 235677,
"author": "Menkboy",
"author_id": 29539,
"author_profile": "https://Stackoverflow.com/users/29539",
"pm_score": 1,
"selected": false,
"text": "cout << \"The signaling NaN for type float is: \"\n << numeric_limits<float>::signaling_NaN( )\n << endl;\n const d... | 2008/10/25 | [
"https://Stackoverflow.com/questions/235664",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/29703/"
] |
235,671 | <p>I wanted to add a UTF-8 font in Gvim but I could not find out how to do this.
I tried to follow the step on this manual but it still did not work.
<a href="http://www.inter-locale.com/whitepaper/learn/learn_to_type.html" rel="noreferrer">http://www.inter-locale.com/whitepaper/learn/learn_to_type.html</a> (vim sectio... | [
{
"answer_id": 237002,
"author": "HS.",
"author_id": 1398,
"author_profile": "https://Stackoverflow.com/users/1398",
"pm_score": 3,
"selected": false,
"text": " :set guifont=courier_new:h12\n"
},
{
"answer_id": 243943,
"author": "Zathrus",
"author_id": 16220,
"... | 2008/10/25 | [
"https://Stackoverflow.com/questions/235671",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18383/"
] |
235,685 | <p>How, in Java, to quickly (or generically) convert one class that implements an interface into another class that implements the same interface?</p>
<p>I mean, if they're a POJO one class setters should take the other class getters as arguments.</p>
<p>Is there a Pattern for this situation?</p>
| [
{
"answer_id": 235691,
"author": "Darron",
"author_id": 22704,
"author_profile": "https://Stackoverflow.com/users/22704",
"pm_score": 2,
"selected": false,
"text": "org.apache.commons.beanutils.BeanUtils\n .BeanUtils.copyProperties\n\npublic static void copyProperties(Object dest, Obj... | 2008/10/25 | [
"https://Stackoverflow.com/questions/235685",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
235,694 | <p>In the filesystem I have</p>
<pre>
/file.aspx
/directory/default.aspx
</pre>
<p>I want to configure IIS so that it returns the appropriate file (add the aspx extension) or directory (default content page) as follows:</p>
<pre>
/file -> /file.aspx
/directory -> /directory/default.aspx
/directo... | [
{
"answer_id": 248777,
"author": "Keltex",
"author_id": 28260,
"author_profile": "https://Stackoverflow.com/users/28260",
"pm_score": 1,
"selected": false,
"text": "<rewrite url=\"^/file$\" to=\"/file.aspx\" />\n"
}
] | 2008/10/25 | [
"https://Stackoverflow.com/questions/235694",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6944/"
] |
235,695 | <p>I have a script that slides a div down from behind the menu, when people click on the tab. However its in jquery and I want to use mootools (lots of reasons I wont go into here). However im stuck with mootools 1.1 at present. But for some reason my attempt is not working :(</p>
<p>The html</p>
<pre><code>print("co... | [
{
"answer_id": 248777,
"author": "Keltex",
"author_id": 28260,
"author_profile": "https://Stackoverflow.com/users/28260",
"pm_score": 1,
"selected": false,
"text": "<rewrite url=\"^/file$\" to=\"/file.aspx\" />\n"
}
] | 2008/10/25 | [
"https://Stackoverflow.com/questions/235695",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/28241/"
] |
235,759 | <p>I <em>think</em> I know how to create custom encrypted RSA keys, but how can I read one encrypted like ssh-keygen does?</p>
<p>I know I can do this:</p>
<pre><code>OpenSSL::PKey::RSA.new(File.read('private_key'))
</code></pre>
<p>But then OpenSSL asks me for the passphrase... How can I pass it to OpenSSL as a par... | [
{
"answer_id": 235847,
"author": "Ivan",
"author_id": 16957,
"author_profile": "https://Stackoverflow.com/users/16957",
"pm_score": -1,
"selected": true,
"text": "Net::SSH::KeyFactory.load_private_key 'keyfile', 'passphrase'\n"
}
] | 2008/10/25 | [
"https://Stackoverflow.com/questions/235759",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/16957/"
] |
235,787 | <p>Do you primarily think of reasons TO implement it, or reasons NOT TO implement it? What are the advantages of each?</p>
| [
{
"answer_id": 235836,
"author": "eyelidlessness",
"author_id": 17964,
"author_profile": "https://Stackoverflow.com/users/17964",
"pm_score": 0,
"selected": false,
"text": "feature product feature feature"
}
] | 2008/10/25 | [
"https://Stackoverflow.com/questions/235787",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18658/"
] |
235,822 | <p>How can my vbscript detect whether or not it is running in a UAC elevated context?</p>
<p>I have no problem detecting the user, and seeing if the user is within the Administrators group. But this still doesn't answer the question of whether the process has elevated privs or not, when running under Vista or Windows ... | [
{
"answer_id": 258070,
"author": "quux",
"author_id": 2383,
"author_profile": "https://Stackoverflow.com/users/2383",
"pm_score": 4,
"selected": true,
"text": "sub GetOSVersion\nDim strComputer, oWMIService, colOSInfo, oOSProperty, strCaption, strOSFamily\nstrComputer = \".\"\nSet oWMISe... | 2008/10/25 | [
"https://Stackoverflow.com/questions/235822",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2383/"
] |
235,839 | <p>It should be trivial, and it might even be in the help, but I can't figure out how to navigate it. How do I indent multiple lines quickly in vi?</p>
| [
{
"answer_id": 235841,
"author": "Greg Hewgill",
"author_id": 893,
"author_profile": "https://Stackoverflow.com/users/893",
"pm_score": 12,
"selected": true,
"text": "shiftwidth"
},
{
"answer_id": 235876,
"author": "Daniel Spiewak",
"author_id": 9815,
"author_profile"... | 2008/10/25 | [
"https://Stackoverflow.com/questions/235839",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2443/"
] |
235,851 | <p>Does anyone know if it is possible to convert a HTML page (url) to a PDF using iText?</p>
<p>If the answer is 'no' than that is OK as well since I will stop wasting my time trying to work it out and just spend some money on one of a number of components which I know can :)</p>
| [
{
"answer_id": 11960922,
"author": "Jes",
"author_id": 208344,
"author_profile": "https://Stackoverflow.com/users/208344",
"pm_score": 1,
"selected": false,
"text": "Paragraph Phrase Chunk ContentByte addTemplate"
},
{
"answer_id": 46033835,
"author": "Joris Schellekens",
... | 2008/10/25 | [
"https://Stackoverflow.com/questions/235851",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/31374/"
] |
235,855 | <p>I'm trying to get a background image of a HTML element (body, div, etc.) to stretch its entire width and height.</p>
<p>Not having much luck. Is it even possible or do I have to do it some other way besides it being a background image?</p>
<p>My current css is:</p>
<pre><code>body {
background-position: left ... | [
{
"answer_id": 241082,
"author": "Traingamer",
"author_id": 27609,
"author_profile": "https://Stackoverflow.com/users/27609",
"pm_score": 3,
"selected": false,
"text": "{ \nbackground-image: url(_images/home.jpg);\nbackground-repeat:no-repeat;\nbackground-position:center; \n}\n { \nbackg... | 2008/10/25 | [
"https://Stackoverflow.com/questions/235855",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8280/"
] |
235,868 | <p>Given this algorithm, I would like to know if there exists an iterative version. Also, I want to know if the iterative version can be faster.</p>
<p>This some kind of pseudo-python...</p>
<p>the algorithm returns a reference to root of the tree</p>
<pre><code>make_tree(array a)
if len(a) == 0
return Non... | [
{
"answer_id": 235939,
"author": "ephemient",
"author_id": 20713,
"author_profile": "https://Stackoverflow.com/users/20713",
"pm_score": 4,
"selected": true,
"text": "# naïve recursion\ndef fac(n):\n if n <= 1:\n return 1\n else:\n return n * fac(n - 1)\n\n# tail-recu... | 2008/10/25 | [
"https://Stackoverflow.com/questions/235868",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18300/"
] |
235,875 | <p>I get the following message in a VC6 project compile:</p>
<blockquote>
<p>OTE: WINVER has been defined as 0x0500 or greater which enables
Windows NT 5.0 and Windows 98 features. When these headers were released,
Windows NT 5.0 beta 1 and Windows 98 beta 2.1 were the current versions.
For this release when W... | [
{
"answer_id": 236209,
"author": "ChrisN",
"author_id": 3853,
"author_profile": "https://Stackoverflow.com/users/3853",
"pm_score": 2,
"selected": true,
"text": "WINVER 0x0500"
}
] | 2008/10/25 | [
"https://Stackoverflow.com/questions/235875",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10755/"
] |
235,880 | <p>How can I convert an <code>Int64</code> to an <code>Int32</code> type in F# without using the <code>Microsoft.FSharp.Compatibility.Int32.of_int64</code>?</p>
<p>I'm doing this because interactive doesn't seem to work when I try:</p>
<pre><code>open Microsoft.FSharp.Compatibility
</code></pre>
<p>With <code>FSharp... | [
{
"answer_id": 235893,
"author": "Thedric Walker",
"author_id": 26166,
"author_profile": "https://Stackoverflow.com/users/26166",
"pm_score": 5,
"selected": false,
"text": "let num = 1000\nlet num64 = int64(num)\n"
},
{
"answer_id": 235913,
"author": "Christian C. Salvadó",
... | 2008/10/25 | [
"https://Stackoverflow.com/questions/235880",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
235,927 | <p>I created a simple .NET windows application in Visual Studio 2005 and on just entering the main form load event my threads window is as in the following image:</p>
<p><a href="http://img519.imageshack.us/my.php?image=threadshh4.jpg" rel="nofollow noreferrer">http://img519.imageshack.us/my.php?image=threadshh4.jpg</... | [
{
"answer_id": 799074,
"author": "GregC",
"author_id": 90475,
"author_profile": "https://Stackoverflow.com/users/90475",
"pm_score": 0,
"selected": false,
"text": "public static class ThreadingHelper_NativeMethods\n{\n [DllImport(\"user32.dll\")]\n public static extern bool IsGUIThre... | 2008/10/25 | [
"https://Stackoverflow.com/questions/235927",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/25125/"
] |
235,940 | <p>Making a small app, and I want a function to execute 50% of the time. So if I were to dbl click the exe half the time the function would execute, and the other half it wouldn't. I can't seem to find anyway to easily do this, the one solution I tried seemed to determine the chance on compile rather than on run. Th... | [
{
"answer_id": 235948,
"author": "Nescio",
"author_id": 14484,
"author_profile": "https://Stackoverflow.com/users/14484",
"pm_score": 2,
"selected": false,
"text": "Private Sub Main()\n If Rnd > 0.5 Then\n ExecuteFunction ()\n End If\nEnd Sub\n"
},
{
"answer_id": 236... | 2008/10/25 | [
"https://Stackoverflow.com/questions/235940",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
235,950 | <p>I am writing an application where I will be accessing the database from django and from a stand alone application. Both need to do session verification and the session should be the same for both of them. Django has a built in authentication/session verification, which is what I am using, now I need to figure out ho... | [
{
"answer_id": 237206,
"author": "Peter Rowell",
"author_id": 17017,
"author_profile": "https://Stackoverflow.com/users/17017",
"pm_score": 6,
"selected": true,
"text": "django_session user_id django.contrib.session Session.post_save contrib.session.models.Session.save() super(Session, s... | 2008/10/25 | [
"https://Stackoverflow.com/questions/235950",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/26592/"
] |
235,959 | <p>I have a (derived) Menu control, that displays a rather large list of items from a custom data source. I need to disable ViewState on the menu to avoid the very annoying "Can't select a disabled or unselectable menu item" when some other control causes the current selection to change on a postback.</p>
<p>Unfortuna... | [
{
"answer_id": 237490,
"author": "sliderhouserules",
"author_id": 31385,
"author_profile": "https://Stackoverflow.com/users/31385",
"pm_score": 1,
"selected": true,
"text": "string str = HttpUtility.HtmlDecode(eventArgument);\n...\nMenuItem item = this.Items.FindItem(str.Split(new char[]... | 2008/10/25 | [
"https://Stackoverflow.com/questions/235959",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/31385/"
] |
235,967 | <p>I am working on a web page that is using jQuery. I have an Ajax call that gets data from the server and updates a div. Inside that data there is a jQuery function, but the function is not being called after the data is loaded into the page. I have the proper js files included in the page already.</p>
<p>This is wha... | [
{
"answer_id": 235990,
"author": "Christian C. Salvadó",
"author_id": 5445,
"author_profile": "https://Stackoverflow.com/users/5445",
"pm_score": 6,
"selected": true,
"text": "$.ajax({\n type: \"GET\",\n url: \"yourPage.htm\",\n dataType: \"html\"\n});\n $.ajax({\n type: \"GET\",\n ... | 2008/10/25 | [
"https://Stackoverflow.com/questions/235967",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1632/"
] |
235,972 | <p>I have a windows application running at the backend. I have functions in this applications mapped to hot keys. Like if I put a message box into this function and give hot key as <kbd>Alt</kbd>+<kbd>Ctrl</kbd>+<kbd>D</kbd>. then on pressing <kbd>Alt</kbd>, <kbd>Ctrl</kbd> and <kbd>D</kbd> together the message box com... | [
{
"answer_id": 273163,
"author": "Eduardo Molteni",
"author_id": 2385,
"author_profile": "https://Stackoverflow.com/users/2385",
"pm_score": 5,
"selected": true,
"text": "BOOL RegisterHotKey(\n HWND hWnd, // window to receive hot-key notification\n int id, // ide... | 2008/10/25 | [
"https://Stackoverflow.com/questions/235972",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20951/"
] |
235,982 | <p>The most favorite feature of StackOverflow for me is that it can automatically detect code in post and set appropriate color to the code.</p>
<p>I'm wondering how the color is set. When I do a <kbd>Ctrl</kbd>+<kbd>F5</kbd> on a page, the code seems first be black text, then change to be colorful. Is it done by jQue... | [
{
"answer_id": 236062,
"author": "dbr",
"author_id": 745,
"author_profile": "https://Stackoverflow.com/users/745",
"pm_score": 5,
"selected": true,
"text": "AFunction(\"a string\")\n1 + 4 # <- numbers\n # /\\ a comment\n // also a comment..\n / this [^\\s>/] # is highlighte... | 2008/10/25 | [
"https://Stackoverflow.com/questions/235982",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/26349/"
] |
236,001 | <p>My understanding is that in unix, when memory is freed, the memory doesn't get returned back to the operating system, it stays in the process to be used again for the next call to malloc.</p>
<p>On windows, I understand that the memory actually gets returned to the operating system.</p>
<p>Is there any big differe... | [
{
"answer_id": 236016,
"author": "paxdiablo",
"author_id": 14860,
"author_profile": "https://Stackoverflow.com/users/14860",
"pm_score": 1,
"selected": false,
"text": "brk() malloc() top malloc()"
},
{
"answer_id": 236112,
"author": "fizzer",
"author_id": 18167,
"auth... | 2008/10/25 | [
"https://Stackoverflow.com/questions/236001",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2147/"
] |
236,031 | <p>How can I implement a <code>diff</code> function, such as Stack Overflow's question revision history?</p>
| [
{
"answer_id": 236034,
"author": "VonC",
"author_id": 6309,
"author_profile": "https://Stackoverflow.com/users/6309",
"pm_score": 3,
"selected": true,
"text": "diffString( String oldFile, String newFile )\n"
},
{
"answer_id": 236041,
"author": "Vhaerun",
"author_id": 1123... | 2008/10/25 | [
"https://Stackoverflow.com/questions/236031",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20191/"
] |
236,035 | <p>I've been reading many a tutorial/article on unmanaged DLLs in C++. For the life of me, however, I cannot seem to grasp the concept. I'm easily confused by the seeming disagreement about whether it needs a header file, how to export it, whether I need a .lib file and what have you.</p>
<p>So, let's assume I have ju... | [
{
"answer_id": 236052,
"author": "QBziZ",
"author_id": 11572,
"author_profile": "https://Stackoverflow.com/users/11572",
"pm_score": 5,
"selected": true,
"text": "#ifdef SOME_CONDITION\n#define MYIMPORTEXPORT __declspec( dllexport )\n#else\n#define MYIMPORTEXPORT __declspec( dllimport )\... | 2008/10/25 | [
"https://Stackoverflow.com/questions/236035",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/31389/"
] |
236,038 | <p>I am facing this peculiar problem. My webapp, works fine on my localhost. Its a JSP/Struts-Tomcat-MySQL app. However, when I host it on hostjava.net (shared tomcat), it is unable to connect to the database.</p>
<p>After some debugging, I have identified the problem, to be with JNDI lookup for datasource. If you wan... | [
{
"answer_id": 236482,
"author": "Vincent Ramdhanie",
"author_id": 27439,
"author_profile": "https://Stackoverflow.com/users/27439",
"pm_score": 2,
"selected": false,
"text": "url=\"jdbc:mysql://localhost/[db name]?autoReconnect=true\"\n"
},
{
"answer_id": 237437,
"author": "... | 2008/10/25 | [
"https://Stackoverflow.com/questions/236038",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8056/"
] |
236,047 | <p>I need a code documentation tool similar to javadoc or c# xml doc for delphi code. What is the best tool? I prefer a technology, which is in the future compatible to the Microsoft sandcastle project.</p>
| [
{
"answer_id": 34854271,
"author": "Daniel Marschall",
"author_id": 488539,
"author_profile": "https://Stackoverflow.com/users/488539",
"pm_score": 1,
"selected": false,
"text": "/// <summary>\n/// Summary of the function / class\n/// </summary>\n/// <param name=\"param1\">Description of... | 2008/10/25 | [
"https://Stackoverflow.com/questions/236047",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/205962/"
] |
236,070 | <p>How can I check the version of my script against an online file to see if it's the latest version?</p>
<p><em>For clarification, I'm talking about a script I wrote, not the version of PHP. I'd like to incorporate a way for the end user to tell when I've updated the script.</em></p>
| [
{
"answer_id": 236100,
"author": "eyelidlessness",
"author_id": 17964,
"author_profile": "https://Stackoverflow.com/users/17964",
"pm_score": 2,
"selected": false,
"text": "// Substitue path to script with the version information in place of __FILE__ if necessary\n$script = file_get_cont... | 2008/10/25 | [
"https://Stackoverflow.com/questions/236070",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/27025/"
] |
236,073 | <p>Why do some sites (or advertisers that give clients javascript code) employ a technique of splitting the <code><script></code> and/or <code></script></code> tags up within <code>document.write()</code> calls?</p>
<p>I noticed that Amazon does this as well, for example:</p>
<pre><code><script type='t... | [
{
"answer_id": 236083,
"author": "Christian C. Salvadó",
"author_id": 5445,
"author_profile": "https://Stackoverflow.com/users/5445",
"pm_score": 4,
"selected": false,
"text": "var newScript = document.createElement(\"script\");\n...\n"
},
{
"answer_id": 236106,
"author": "bo... | 2008/10/25 | [
"https://Stackoverflow.com/questions/236073",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2929/"
] |
236,086 | <p>I've recently been trying to create units tests for some legacy code.</p>
<p>I've been taking the approach of using the linker to show me which functions cause link errors, greping the source to find the definition and creating a stub from that. </p>
<p>Is there an easier way?
Is there some kind of C++ parser tha... | [
{
"answer_id": 12546962,
"author": "linuxbuild",
"author_id": 241776,
"author_profile": "https://Stackoverflow.com/users/241776",
"pm_score": 2,
"selected": false,
"text": "abi-compliance-checker -lib NAME -dump VER.xml -headers-only -xml -stdout > api.xml\n VER.xml <version>\n 1.0\n</v... | 2008/10/25 | [
"https://Stackoverflow.com/questions/236086",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1575281/"
] |
236,097 | <p>In XEmacs this is done by the calling the function char-to-ucs on a character. GNU Emacs does not seem to have this function. In GNU Emacs, characters seem to be ordinary integers. Running C-x = on a latin character reveals that the Emacs codepoint is different from the Unicode codepoint for the corresponding cha... | [
{
"answer_id": 236160,
"author": "Dwight Holman",
"author_id": 2667,
"author_profile": "https://Stackoverflow.com/users/2667",
"pm_score": 6,
"selected": false,
"text": " character: ¢ (2210, #o4242, #x8a2, U+00A2)\n charset: latin-iso8859-1\n (Right-Hand Part of Latin Alphabe... | 2008/10/25 | [
"https://Stackoverflow.com/questions/236097",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
236,125 | <p>Suppose I have this Windows wchar_t string:</p>
<pre><code>L"\x4f60\x597d"
</code></pre>
<p>and</p>
<pre><code>L"\x00e4\x00a0\x597d"
</code></pre>
<p>and would like to convert it (not necessarily programmatically; it will be a one-time thing) to GCC/Linux wchar_t format, which is UTF-32 AFAIK. How do I do it? (a... | [
{
"answer_id": 236574,
"author": "Head Geek",
"author_id": 12193,
"author_profile": "https://Stackoverflow.com/users/12193",
"pm_score": 2,
"selected": false,
"text": "wchar_t wchar_t WideCharToMultiByte CP_UTF8 CodePage"
}
] | 2008/10/25 | [
"https://Stackoverflow.com/questions/236125",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9403/"
] |
236,129 | <p>How do I iterate over the words of a string composed of words separated by whitespace?</p>
<p>Note that I'm not interested in C string functions or that kind of character manipulation/access. I prefer elegance over efficiency. My current solution:</p>
<pre><code>#include <iostream>
#include <sstream>
#in... | [
{
"answer_id": 236137,
"author": "Community",
"author_id": -1,
"author_profile": "https://Stackoverflow.com/users/-1",
"pm_score": 6,
"selected": false,
"text": "strtok() std::string::c_str() void Tokenize(const string& str,\n vector<string>& tokens,\n const str... | 2008/10/25 | [
"https://Stackoverflow.com/questions/236129",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1630/"
] |
236,151 | <p>I recently started using Git as my version control system for some Cocoa projects I'm working on and wondered if there are best practices for working with version control systems on Cocoa projects.</p>
<p>There is the obvious "build" directory which I exclude from versioning as it's not important and can change qui... | [
{
"answer_id": 236189,
"author": "Colin Barrett",
"author_id": 23106,
"author_profile": "https://Stackoverflow.com/users/23106",
"pm_score": 4,
"selected": true,
"text": ".hgignore syntax: glob\n\n.DS_Store\n\n*.swp\n*~.nib\n\nbuild\n\n*.pbxuser\n*.perspective\n*.perspectivev3\n*.mode1v3... | 2008/10/25 | [
"https://Stackoverflow.com/questions/236151",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/29618/"
] |
236,166 | <p>I am using System.IO.Directory.GetCurrentDirectory() to get the current directory in my web service, but that does not give me the current directory. How do I get the current directory in a web service?</p>
<p>Thanks
Stuart </p>
| [
{
"answer_id": 236169,
"author": "driis",
"author_id": 13627,
"author_profile": "https://Stackoverflow.com/users/13627",
"pm_score": 6,
"selected": false,
"text": "HttpContext.Current.Server.MapPath(\"~/\") \n"
},
{
"answer_id": 236289,
"author": "dove",
"author_id": 3091... | 2008/10/25 | [
"https://Stackoverflow.com/questions/236166",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/23149/"
] |
236,172 | <p>I have several <code>std::vector</code>, all of the same length. I want to sort one of these vectors, and apply the same transformation to all of the other vectors. Is there a neat way of doing this? (preferably using the STL or Boost)? Some of the vectors hold <code>int</code>s and some of them <code>std::string<... | [
{
"answer_id": 236199,
"author": "Konrad Rudolph",
"author_id": 1968,
"author_profile": "https://Stackoverflow.com/users/1968",
"pm_score": 6,
"selected": true,
"text": "typedef vector<int>::const_iterator myiter;\n\nvector<pair<size_t, myiter> > order(Index.size());\n\nsize_t n = 0;\nfo... | 2008/10/25 | [
"https://Stackoverflow.com/questions/236172",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8331/"
] |
236,183 | <p>I want to be able to put preformatted text (i.e. containing line breaks) into a single cell of a FitNesse fixture table. Is there a way to manipulate the FitNesse wiki markup to do this?</p>
| [
{
"answer_id": 236207,
"author": "Matthew Murdoch",
"author_id": 4023,
"author_profile": "https://Stackoverflow.com/users/4023",
"pm_score": 2,
"selected": false,
"text": "!define sql { SELECT *\n FROM bar\n WHERE gaz = 14\n}\n\n|sql|\n|${sql}|\n"
},
{
"answer_id": 587889,
... | 2008/10/25 | [
"https://Stackoverflow.com/questions/236183",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4023/"
] |
236,203 | <p>I have a div with a <code><h1></code> tag in a div, with no margins. If I define any doctype, a white space appears above the div.</p>
<p>If I remove the <code><h1></code> tags, or remove the doctype definition, there is no space (as there should be. Why?</p>
<p>Example HTML:</p>
<pre><code><!DOCTY... | [
{
"answer_id": 236227,
"author": "Phil Ross",
"author_id": 5981,
"author_profile": "https://Stackoverflow.com/users/5981",
"pm_score": 4,
"selected": true,
"text": "#thediv{ background-color:green; border: 1px transparent solid; }\n"
},
{
"answer_id": 236678,
"author": "domgb... | 2008/10/25 | [
"https://Stackoverflow.com/questions/236203",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/745/"
] |
236,211 | <p>Is it good practice to let abstract classes define instance variables?</p>
<pre><code>public abstract class ExternalScript extends Script {
String source;
public abstract void setSource(String file);
public abstract String getSource();
}
</code></pre>
<p>The sub class, ExternalJavaScript.class, woul... | [
{
"answer_id": 236229,
"author": "Egwor",
"author_id": 25308,
"author_profile": "https://Stackoverflow.com/users/25308",
"pm_score": 6,
"selected": true,
"text": "public abstract class ExternalScript extends Script {\n\n private String source;\n\n public void setSource(String file)... | 2008/10/25 | [
"https://Stackoverflow.com/questions/236211",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/31518/"
] |
236,220 | <p>Is there a correct way in Windows Forms to flash a titlebar without having to drop to P/Invoking FlashWindow?</p>
<p>I'm using .NET 2.0 for compatibility and size reasons, so maybe I just missed the method because it's in newer versions of the .NET framework.</p>
| [
{
"answer_id": 236247,
"author": "Rune Grimstad",
"author_id": 30366,
"author_profile": "https://Stackoverflow.com/users/30366",
"pm_score": 4,
"selected": true,
"text": "FlashWindowEx"
}
] | 2008/10/25 | [
"https://Stackoverflow.com/questions/236220",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6061/"
] |
236,231 | <p>How should I choose an IPv4 multicast address for my application's use? I may need more than one (a whole range perhaps ultimately) but just want to avoid conflicts with other applications.</p>
<ul>
<li>Packets will be entirely contained within an administrative domain, probably a LAN</li>
<li>If several independen... | [
{
"answer_id": 258126,
"author": "Alnitak",
"author_id": 6782,
"author_profile": "https://Stackoverflow.com/users/6782",
"pm_score": 5,
"selected": false,
"text": "http://www.iana.org/assignments/multicast-addresses 239.255/16"
}
] | 2008/10/25 | [
"https://Stackoverflow.com/questions/236231",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13724/"
] |
236,235 | <p><em>(This question specifically in C#, but applies generally to .NET)</em> </p>
<p>I have a largish application that has a fairly good design, and is broken into major sections over interfaces (this was done to assist parallel development).</p>
<p>We now have a primary set of concrete classes that implement the re... | [
{
"answer_id": 236245,
"author": "Rune Grimstad",
"author_id": 30366,
"author_profile": "https://Stackoverflow.com/users/30366",
"pm_score": 2,
"selected": false,
"text": "Activator.CreateInstance"
}
] | 2008/10/25 | [
"https://Stackoverflow.com/questions/236235",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6408/"
] |
236,236 | <p>I have a select query that currently produces the following results:
<BR></p>
<pre><code>Description Code Price
Product 1 A 5
Product 1 B 4
Product 1 C 2
</code></pre>
<p>Using the following query: </p>
<pre><code>SELECT DISTINCT np.Description, p.promotionalCode, p.Price... | [
{
"answer_id": 236252,
"author": "John Lemp",
"author_id": 12915,
"author_profile": "https://Stackoverflow.com/users/12915",
"pm_score": 4,
"selected": true,
"text": "SELECT \n np.Id, \n np.Description, \n MIN(Case promotionalCode WHEN 'A' THEN Price ELSE NULL END) AS 'A',\n ... | 2008/10/25 | [
"https://Stackoverflow.com/questions/236236",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
236,239 | <p>I have an <em>SQLite</em> table that contains prices for various products. It's a snapshot table, so it contains the prices on 5 minute intervals. I would like to write a query that would return the difference in price from one row to the next on each item.</p>
<p>The columns are id (auto inc), record_id (id of the... | [
{
"answer_id": 236286,
"author": "Panos",
"author_id": 8049,
"author_profile": "https://Stackoverflow.com/users/8049",
"pm_score": 3,
"selected": false,
"text": "SELECT A.id, A.record_id, A.price, A.time, ISNULL(A.price - B.price, 0) AS difference\nFROM Table1 as A \n LEFT OUTER JOIN ... | 2008/10/25 | [
"https://Stackoverflow.com/questions/236239",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
236,279 | <pre><code><?php
function toconv(string)
{
$gogo = array("a" => "b","cd" => "e");
$string = str_replace(
array_keys( $gogo ),
array_values( $gogo ),
$string
);
return $string;
}
?>
</code></pre>
<p>How can I implement that in JavaScript?</p>
| [
{
"answer_id": 236287,
"author": "Vinko Vrsalovic",
"author_id": 5190,
"author_profile": "https://Stackoverflow.com/users/5190",
"pm_score": 2,
"selected": false,
"text": "<script>\nfunction toconv(str) {\n replacements = ['b','e'];\n regexes = [/a/g,/cd/g];\n\n for (i=0; i < re... | 2008/10/25 | [
"https://Stackoverflow.com/questions/236279",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/21559/"
] |
236,283 | <p>I am using the following function to load a PlayList of Songs from 'PlayListJSON.aspx' but somethings seems wrong,evrytime OnFailure is getting called, I am unable to debug it further. any help would be really gr8.</p>
<pre><code>Player.prototype.loadPlaylist = function(playlistId, play) {
req = new Ajax.Request(... | [
{
"answer_id": 236299,
"author": "Mark Biek",
"author_id": 305,
"author_profile": "https://Stackoverflow.com/users/305",
"pm_score": 1,
"selected": false,
"text": "req = new Ajax.Request('/PlaylistJSON.aspx', \n { \n\n method: 'GET', \n parameters: {\n ... | 2008/10/25 | [
"https://Stackoverflow.com/questions/236283",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
236,290 | <p>For example, say one was to include a 'delete' keyword in C# 4. Would it be possible to guarantee that you'd never have wild pointers, but still be able to rely on the garbage collecter, due to the reference-based system?</p>
<p>The only way I could see it possibly happening is if instead of references to memory lo... | [
{
"answer_id": 236304,
"author": "Toon Krijthe",
"author_id": 18061,
"author_profile": "https://Stackoverflow.com/users/18061",
"pm_score": 2,
"selected": false,
"text": "obj1 = new instance;\nobj2 = obj1;\n\n// \n\ndelete obj2;\n// obj1 now references the twilightzone.\n"
},
{
"... | 2008/10/25 | [
"https://Stackoverflow.com/questions/236290",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18658/"
] |
236,322 | <p>I'm using Visual Studio icon library (VS2008ImageLibrary), there are some BMP files with a pink background. How can I make the pink background become transparent? What software can I use to do this? Any free one? </p>
<p>Thanks</p>
| [
{
"answer_id": 21974614,
"author": "Mamad Asgari",
"author_id": 588149,
"author_profile": "https://Stackoverflow.com/users/588149",
"pm_score": 1,
"selected": false,
"text": "convert input.png -transparent magenta output.png\n"
}
] | 2008/10/25 | [
"https://Stackoverflow.com/questions/236322",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
236,323 | <p>I need to compare the integer part of two doubles for inequality and I'm currently doing this:</p>
<pre><code>int iA = (int)dA;
int iB = (int)dB;
if( iA != iB )
{
...
}
</code></pre>
<p>but I wonder if there's a better approach than this.</p>
<p>Thanks.</p>
<p>If I used Math.Truncate() instead of a cast to ... | [
{
"answer_id": 236333,
"author": "Ovid",
"author_id": 8003,
"author_profile": "https://Stackoverflow.com/users/8003",
"pm_score": 1,
"selected": false,
"text": "if ( (int)dA != (int)dB ) {\n ...\n}\n if ( (int)ageA != (int)idB ) {\n ...\n}\n"
},
{
"answer_id": 236340,
"... | 2008/10/25 | [
"https://Stackoverflow.com/questions/236323",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7839/"
] |
236,335 | <p>So, simple procedure, calculate a factorial number. Code is as follows.</p>
<pre><code>int calcFactorial(int num)
{
int total = 1;
if (num == 0)
{
return 0;
}
for (num; num > 0; num--)
{
total *= num;
}
return total;
}
</code></pre>
<p>Now, this works fine and ... | [
{
"answer_id": 236352,
"author": "Treb",
"author_id": 22114,
"author_profile": "https://Stackoverflow.com/users/22114",
"pm_score": 1,
"selected": false,
"text": "hex (3813186000) = E34899D0\nhex (-481781296) = FFFFFFFFE34899D0\n int i = 0"
}
] | 2008/10/25 | [
"https://Stackoverflow.com/questions/236335",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/31389/"
] |
236,349 | <p>What's the best way to handle a visitor constructing their own URL and replacing what we expect to be an ID with anything they like?</p>
<p>For example:</p>
<p><a href="https://stackoverflow.com/questions/236349">ASP.Net MVC - handling bad URL parameters</a></p>
<p>But the user could just as easily replace the UR... | [
{
"answer_id": 237232,
"author": "Schotime",
"author_id": 29376,
"author_profile": "https://Stackoverflow.com/users/29376",
"pm_score": 3,
"selected": false,
"text": "public ActionResult Edit(int? id)\n{}\n /Home/Edit/23\n /Home/Edit/Junk\n"
},
{
"answer_id": 237390,
"author"... | 2008/10/25 | [
"https://Stackoverflow.com/questions/236349",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5662/"
] |
236,354 | <p>I am a beginner in c++ and I have a small problem:</p>
<p>my code displays a simple menu to the user providing three options:</p>
<pre><code>cout << "\nQuadratic equation: a*X^2 + b*X + c = 0 main menu: ";
cout << "\n <r> Give new coefficients";
cout << "\n <c> Calculate equations... | [
{
"answer_id": 236366,
"author": "Martin York",
"author_id": 14065,
"author_profile": "https://Stackoverflow.com/users/14065",
"pm_score": 1,
"selected": false,
"text": "cout<<\"Enter choice : \" << std::endl;\n // ^^^^^^^^^^^^^^^\n cout<<\"Enter choice : \" << std::fl... | 2008/10/25 | [
"https://Stackoverflow.com/questions/236354",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
236,359 | <p>I know most of the ins and outs of Python's approach to private variables/members/functions/...</p>
<p>However, I can't make my mind up on how to distinguish between methods for external use or subclassing use.</p>
<p>Consider the following example:</p>
<pre><code>class EventMixin(object):
def subscribe(self,... | [
{
"answer_id": 236402,
"author": "bobince",
"author_id": 18936,
"author_profile": "https://Stackoverflow.com/users/18936",
"pm_score": 2,
"selected": false,
"text": "use no underscores for the external API,\none underscore for the subclassable API,\nand two underscores for the private/in... | 2008/10/25 | [
"https://Stackoverflow.com/questions/236359",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2900/"
] |
236,362 | <p>I have a web application that makes heavy use of the Session state to store information about the current user, their personal settings, record their session history and so on. </p>
<p>I have found myself retrieving this session information in my business layer, like so:</p>
<pre><code>((UserSession)HttpContext.Cu... | [
{
"answer_id": 236454,
"author": "Panos",
"author_id": 8049,
"author_profile": "https://Stackoverflow.com/users/8049",
"pm_score": 3,
"selected": true,
"text": "System.Web Session Session ((UserSession) DualContext.Current[\"UserSession\"]).User.Info\n public class DualContext \n{\n pr... | 2008/10/25 | [
"https://Stackoverflow.com/questions/236362",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/27805/"
] |
236,376 | <p>I remember reading somewhere that you can provide your own icons without having them pass them through the automatic gloss effect when compiling an iphone app, but I can't remember how to do it, and not sure where it was in the docs. Anyone here remembers?</p>
<p>thanks!</p>
| [
{
"answer_id": 236446,
"author": "Ben Gottlieb",
"author_id": 6694,
"author_profile": "https://Stackoverflow.com/users/6694",
"pm_score": 2,
"selected": false,
"text": " <key>UIPrerenderedIcon</key>\n <true/>\n"
}
] | 2008/10/25 | [
"https://Stackoverflow.com/questions/236376",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15124/"
] |
236,381 | <p>I have a web application that requires a server based component to periodically access POP3 email boxes and retrieve emails. The service then needs to process the emails which will involve:</p>
<ul>
<li>Validating the email against some business rules (does it contain a valid reference in the subject line, which us... | [
{
"answer_id": 2856484,
"author": "Pawel Lesnikowski",
"author_id": 80894,
"author_profile": "https://Stackoverflow.com/users/80894",
"pm_score": 2,
"selected": false,
"text": "using(Pop3 pop3 = new Pop3())\n{\n pop3.Connect(\"mail.host.com\"); // Connect to server\n pop3.Logi... | 2008/10/25 | [
"https://Stackoverflow.com/questions/236381",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/27805/"
] |
236,387 | <p>I'm not sure if the title is very clear, but basically what I have to do is read a line of text from a file and split it up into 8 different string variables. Each line will have the same 8 chunks in the same order (title, author, price, etc). So for each line of text, I want to end up with 8 strings.</p>
<p>The fi... | [
{
"answer_id": 236425,
"author": "Bill the Lizard",
"author_id": 1288,
"author_profile": "https://Stackoverflow.com/users/1288",
"pm_score": 3,
"selected": true,
"text": "String[] tokens = line.split(\"#\");\n tokens tokens.length()"
}
] | 2008/10/25 | [
"https://Stackoverflow.com/questions/236387",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/31429/"
] |
236,406 | <p>Is one more preferred, or performs better over the other?</p>
| [
{
"answer_id": 236411,
"author": "Robert Gamble",
"author_id": 25222,
"author_profile": "https://Stackoverflow.com/users/25222",
"pm_score": 8,
"selected": true,
"text": "is_int() ctype_digit() ┌──────────┬───────────┬────────────────┐\n│ │ is_int: │ ctype_digit: │\n├───────... | 2008/10/25 | [
"https://Stackoverflow.com/questions/236406",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
236,407 | <p>I would be interested to learn about large scale development in Python and especially in how do you maintain a large code base?</p>
<ul>
<li><p>When you make incompatibility changes to the signature of a method, how do you find all the places where that method is being called. In C++/Java the compiler will find it ... | [
{
"answer_id": 236445,
"author": "rony l",
"author_id": 16418,
"author_profile": "https://Stackoverflow.com/users/16418",
"pm_score": 5,
"selected": false,
"text": "__getattr__"
},
{
"answer_id": 236718,
"author": "S.Lott",
"author_id": 10661,
"author_profile": "https... | 2008/10/25 | [
"https://Stackoverflow.com/questions/236407",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
236,412 | <p>I have a web application that comprises the following:</p>
<ul>
<li>A web project (with a web.config file containing a connection string - but no data access code in the web project)</li>
<li>A data access project that uses LINQ-SQL classes to provide entities to the web project UI (this project has a settings file... | [
{
"answer_id": 236442,
"author": "TGnat",
"author_id": 25121,
"author_profile": "https://Stackoverflow.com/users/25121",
"pm_score": 2,
"selected": false,
"text": "<configSections>\n <sectionGroup name=\"applicationSettings\" type=\"System.Configuration.ApplicationSettingsGroup, Syste... | 2008/10/25 | [
"https://Stackoverflow.com/questions/236412",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/27805/"
] |
236,436 | <p>I made previously a question:
<a href="https://stackoverflow.com/questions/236354/error-handling-when-taking-user-input">error handling when taking user input</a></p>
<p>and I made the suggested changes:</p>
<pre><code>char displayMainMenu()
{
char mainMenuChoice;
cout << "\nQuadratic equation: a*X^2 + b*X +... | [
{
"answer_id": 236461,
"author": "Bill the Lizard",
"author_id": 1288,
"author_profile": "https://Stackoverflow.com/users/1288",
"pm_score": 2,
"selected": false,
"text": "displayMainMenu() char char str[101]\nstd::cin.getline(str, 101);\n cin >> mainMenuChoice;\n"
},
{
"answer_i... | 2008/10/25 | [
"https://Stackoverflow.com/questions/236436",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
236,439 | <p>Or is there a chance that the operation will fail?</p>
<p>Thanks.</p>
<p>I chose the wrong term and what I really meant was rounding to 0, not truncation.</p>
<p>The point is, I need to compare the integer part of two doubles and I'm just casting them to int and then using ==, but, as someone pointed out in one o... | [
{
"answer_id": 236479,
"author": "S.Lott",
"author_id": 10661,
"author_profile": "https://Stackoverflow.com/users/10661",
"pm_score": 2,
"selected": false,
"text": "== =="
}
] | 2008/10/25 | [
"https://Stackoverflow.com/questions/236439",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7839/"
] |
236,456 | <p>In honor of the <a href="http://prize.hutter1.net/" rel="noreferrer">Hutter Prize</a>,
what are the top algorithms (and a quick description of each) for text compression?</p>
<p>Note: The intent of this question is to get a description of compression algorithms, not of compression programs.</p>
| [
{
"answer_id": 236477,
"author": "Sören Kuklau",
"author_id": 1600,
"author_profile": "https://Stackoverflow.com/users/1600",
"pm_score": 3,
"selected": false,
"text": "DEFLATE LZMA"
},
{
"answer_id": 48366018,
"author": "serv-inc",
"author_id": 1587329,
"author_profi... | 2008/10/25 | [
"https://Stackoverflow.com/questions/236456",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3153/"
] |
236,463 | <p>When I type the following code in Emacs ruby-mode, the "#{foo}" is fontified in a different color than the enclosing string. How do I do this in my own Emacs mode? I tried to decipher the ruby-mode source code but couldn't understand it in a reasonable amount of time.</p>
<pre><code>"a #{foo} a"
</code></pre>
| [
{
"answer_id": 236592,
"author": "bmdhacks",
"author_id": 14032,
"author_profile": "https://Stackoverflow.com/users/14032",
"pm_score": 1,
"selected": false,
"text": "font-lock-syntactic-keywords (setq ruby-font-lock-syntactic-keywords\n '(\n ;; #{ }, #$hoge, #@foo are not comments\n... | 2008/10/25 | [
"https://Stackoverflow.com/questions/236463",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
236,493 | <p>The Zend Framework coding standard mentions the following:</p>
<blockquote>
For files that contain only PHP code, the closing tag ("?>") is never permitted. It is not required by PHP, and omitting it prevents the accidental injection of trailing whitespace into the response.
</blockquote>
<ul>
<li><a href="http://fr... | [
{
"answer_id": 245446,
"author": "Bob Fanger",
"author_id": 19165,
"author_profile": "https://Stackoverflow.com/users/19165",
"pm_score": 1,
"selected": false,
"text": "find . -name '*.php' | xargs cat | php -l\n find . -name '*.php' | while read filename; do php -l $filename | grep -v '... | 2008/10/25 | [
"https://Stackoverflow.com/questions/236493",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4512/"
] |
236,517 | <p>Is there any way to make Visual Studio word-wrap at 80 characters? I'm using VS2008.</p>
<p><a href="https://stackoverflow.com/questions/84209/vertical-line-after-a-certain-amount-characters-in-visual-studio">This post is loosely related.</a></p>
| [
{
"answer_id": 28883599,
"author": "Cory Koch",
"author_id": 1467005,
"author_profile": "https://Stackoverflow.com/users/1467005",
"pm_score": 5,
"selected": false,
"text": "Ctrl+E, Ctrl+W"
}
] | 2008/10/25 | [
"https://Stackoverflow.com/questions/236517",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/672/"
] |
236,530 | <p>I'd like to do the same in C#. Is there anyway of using properties in C# with parameters in the same way I've done with the parameter 'Key' in this VB.NET example?</p>
<blockquote>
<pre><code>Private Shared m_Dictionary As IDictionary(Of String, Object) = New Dictionary(Of String, Object)
</code></pre>
</blockquote... | [
{
"answer_id": 236539,
"author": "Konrad Rudolph",
"author_id": 1968,
"author_profile": "https://Stackoverflow.com/users/1968",
"pm_score": 5,
"selected": true,
"text": "public T this[string key] {\n get { return m_Dictionary[key]; }\n set { m_Dictionary[key] = value; }\n}\n String... | 2008/10/25 | [
"https://Stackoverflow.com/questions/236530",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/31434/"
] |
236,533 | <p>I want to be able to selectively copy a list of files and preserve their directory structure. The problem is that there are quite a few files that their path exceeds 256 character. How is this problem usually handled?</p>
<p>Edit:
I should make it clear that I only want to selectively copy files, not folders. I ... | [
{
"answer_id": 236536,
"author": "Tomalak",
"author_id": 18771,
"author_profile": "https://Stackoverflow.com/users/18771",
"pm_score": 3,
"selected": true,
"text": "subst C:\\a\\very\\long\\path\nsubst K: \"C:\\a\\very\\long\\path\"\n\nK:\\another\\very\\long\\path\nsubst L: \"K:\\anothe... | 2008/10/25 | [
"https://Stackoverflow.com/questions/236533",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1469014/"
] |
236,538 | <p>How do I get the directory where the rakefile.rb is located?</p>
<p>I want to use this as my root directory to locate everything off.</p>
| [
{
"answer_id": 236554,
"author": "TonyLa",
"author_id": 1295,
"author_profile": "https://Stackoverflow.com/users/1295",
"pm_score": 2,
"selected": false,
"text": " config.load_paths += %W( #{RAILS_ROOT}/extras )\n"
},
{
"answer_id": 236557,
"author": "craigb",
"author_id"... | 2008/10/25 | [
"https://Stackoverflow.com/questions/236538",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11755/"
] |
236,555 | <p>I built an application which displays the records from database in the window and checks the the database for new records every couple of seconds. The problem is that the window blinks each time I check for new records and I want to fix it. I have tried to compare the old datatable with the new one and refresh only ... | [
{
"answer_id": 236577,
"author": "Dave Markle",
"author_id": 24995,
"author_profile": "https://Stackoverflow.com/users/24995",
"pm_score": 3,
"selected": true,
"text": "//This assumes the datatables have the same schema...\n public bool DatatablesAreSame(DataTable t1, DataTable t2... | 2008/10/25 | [
"https://Stackoverflow.com/questions/236555",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/22996/"
] |
236,575 | <p>Given an EmployeeId, how can I construct a Linq to Sql query to find all of the ancestors of the employee? Each EmployeeId has an associated SupervisorId (see below).</p>
<p>For example, a query of the ancestors for EmployeeId 6 (Frank Black) should return Jane Doe, Bob Smith, Joe Bloggs, and Head Honcho.</p>
<p>... | [
{
"answer_id": 236577,
"author": "Dave Markle",
"author_id": 24995,
"author_profile": "https://Stackoverflow.com/users/24995",
"pm_score": 3,
"selected": true,
"text": "//This assumes the datatables have the same schema...\n public bool DatatablesAreSame(DataTable t1, DataTable t2... | 2008/10/25 | [
"https://Stackoverflow.com/questions/236575",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/24358/"
] |
236,593 | <p>How to do svn update of multiple files located across different directories ? </p>
<p>For committing multiple files from different directories, we can put them all up in a text file and give that file as an argument to svn commit and it will happily commit all those files. But <b>update</b> ?</p>
<p><b>EDIT:</b> M... | [
{
"answer_id": 236626,
"author": "Ken",
"author_id": 20074,
"author_profile": "https://Stackoverflow.com/users/20074",
"pm_score": 2,
"selected": false,
"text": "svn update docs foo/bar/ /repos/bar\n"
},
{
"answer_id": 236992,
"author": "rjray",
"author_id": 6421,
"au... | 2008/10/25 | [
"https://Stackoverflow.com/questions/236593",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/27474/"
] |
236,599 | <p>I am using C# 2.0 with Nunit Test. I have some object that needs to be serialized. These objects are quite complex (inheritance at different levels and contains a lot of objects, events and delegates).</p>
<p>How can I create a Unit Test to be sure that my object is safely serializable?</p>
| [
{
"answer_id": 236602,
"author": "Patrick Desjardins",
"author_id": 13913,
"author_profile": "https://Stackoverflow.com/users/13913",
"pm_score": 5,
"selected": true,
"text": "MyComplexObject dto = new MyComplexObject();\nMemoryStream mem = new MemoryStream();\nBinaryFormatter b = new Bi... | 2008/10/25 | [
"https://Stackoverflow.com/questions/236599",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/21386/"
] |
236,624 | <p>For instance in the snippet below - how do I access the h1 element knowing the ID of parent element (header-inner div)?</p>
<pre><code><div id='header-inner'>
<div class='titlewrapper'>
<h1 class='title'>
Some text I want to change
</h1>
</div>
</div>... | [
{
"answer_id": 236655,
"author": "Shog9",
"author_id": 811,
"author_profile": "https://Stackoverflow.com/users/811",
"pm_score": 6,
"selected": true,
"text": "function findFirstDescendant(parent, tagname)\n{\n parent = document.getElementById(parent);\n var descendants = parent.getEl... | 2008/10/25 | [
"https://Stackoverflow.com/questions/236624",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1311500/"
] |
236,629 | <p>I may be in the minority here, but I very much enjoy <a href="https://perldoc.perl.org/perlform" rel="nofollow noreferrer">Perl's formats</a>. I especially like being able to wrap a long piece of text within a column ("~~ ^<<<<<<<<<<<<<<<<" type stuff). Ar... | [
{
"answer_id": 236651,
"author": "dsm",
"author_id": 7780,
"author_profile": "https://Stackoverflow.com/users/7780",
"pm_score": 2,
"selected": false,
"text": "(format ...) (defparameter *english-list*\n \"~{~#[~;~a~;~a and ~a~:;~@{~a~#[~;, and ~:;, ~]~}~]~}\")\n\n(format nil *english-l... | 2008/10/25 | [
"https://Stackoverflow.com/questions/236629",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5922/"
] |
236,630 | <p>I have a web page that displays a long line graph inside a div with overflow-x: scroll.
This works well as a web page allowing the use to scroll back and forward through the graph.</p>
<p>However, when printing the page the scroll position is reset to zero.
Is there a way to overcome this?</p>
| [
{
"answer_id": 236641,
"author": "Michael Stum",
"author_id": 91,
"author_profile": "https://Stackoverflow.com/users/91",
"pm_score": 2,
"selected": false,
"text": "<link rel=\"stylesheet\" type=\"text/css” href=\"sheet.css\" media=\"print\" />\n"
},
{
"answer_id": 236690,
"a... | 2008/10/25 | [
"https://Stackoverflow.com/questions/236630",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7011/"
] |
236,632 | <p>Please help me with a sanity check. Assuming a many-to-many relationship:</p>
<p><a href="http://www.codingthewheel.com/pics/many_to_many.gif" rel="nofollow noreferrer">Post, PostTagAssoc, Tag http://www.codingthewheel.com/pics/many_to_many.gif</a></p>
<p>What's the most succinct way (using LINQ to SQL) to get a r... | [
{
"answer_id": 236680,
"author": "James Curran",
"author_id": 12725,
"author_profile": "https://Stackoverflow.com/users/12725",
"pm_score": 4,
"selected": true,
"text": " from pta in db.PostTagAssoc\n group pta by pta.PostID into t\n select new {PostID = t.Key, TagCount=t.Count()}\n"
}... | 2008/10/25 | [
"https://Stackoverflow.com/questions/236632",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
236,644 | <p>I created the setup project for the application and I can see that the later modifications of the configuration file (Application.exe.config) don't affect the application execution.</p>
<p>I am developing an application with the database file included and I want to enable users to move the database file and modify ... | [
{
"answer_id": 236822,
"author": "Alan",
"author_id": 31223,
"author_profile": "https://Stackoverflow.com/users/31223",
"pm_score": 3,
"selected": true,
"text": " <connectionStrings>\n <add name=\"YourApp.Properties.Settings.DatabaseConnectionString\"\n connectionString=\"Data Source=l... | 2008/10/25 | [
"https://Stackoverflow.com/questions/236644",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/22996/"
] |
236,668 | <p>I have been slowly learning SQL the last few weeks. I've picked up all of the relational algebra and the basics of how relational databases work. What I'm trying to do now is learn how it's implemented.</p>
<p>A stumbling block I've come across in this, is foreign keys in MySQL. I can't seem to find much about the ... | [
{
"answer_id": 236677,
"author": "DOK",
"author_id": 27637,
"author_profile": "https://Stackoverflow.com/users/27637",
"pm_score": 3,
"selected": false,
"text": "CREATE TABLE parent (\n id INT NOT NULL,\n PRIMARY KEY (id)\n) ENGINE=INNODB;\n\nCREATE TABLE child (\n id INT, \n ... | 2008/10/25 | [
"https://Stackoverflow.com/questions/236668",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1063/"
] |
236,675 | <p>How to cancel a keypress event in a textbox after pressing the return key.</p>
| [
{
"answer_id": 236687,
"author": "lacop",
"author_id": 894,
"author_profile": "https://Stackoverflow.com/users/894",
"pm_score": 3,
"selected": true,
"text": "private void keypressed(Object o, KeyPressEventArgs e)\n{\n if (e.KeyChar == (char)Keys.Return)\n {\n e.Handled = tr... | 2008/10/25 | [
"https://Stackoverflow.com/questions/236675",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/26087/"
] |
236,676 | <p>I have an IList of type Breadcrumb which is just a lightweight class that has NavigationTitle, NavigationUrl and IsCurrent properties. It is cached on the webserver. I have a method that builds out the current breadcrumb trail up until the first Breadcrumb that has IsCurrent set to true... using the code below. Its ... | [
{
"answer_id": 236701,
"author": "James Curran",
"author_id": 12725,
"author_profile": "https://Stackoverflow.com/users/12725",
"pm_score": 1,
"selected": false,
"text": "IList<Breadcrumb> crumbs = new List<Breadcrumb>();\nfor (int a = 0; a < cachedCrumbs.Count; a++)\n{\n crumbs.Add(c... | 2008/10/25 | [
"https://Stackoverflow.com/questions/236676",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6350/"
] |
236,692 | <p>I have a device that supports 4-color graphics (much like CGA in the old days).</p>
<p>I wanted to use <a href="http://www.pythonware.com/products/pil/" rel="noreferrer">PIL</a> to read the image and convert it using my 4-color palette (of red, green, yellow, black), but I can't figure out if it's even possible at ... | [
{
"answer_id": 237193,
"author": "tzot",
"author_id": 6899,
"author_profile": "https://Stackoverflow.com/users/6899",
"pm_score": 5,
"selected": true,
"text": "import Image\n\ndef estimate_color(c, bit, c_error):\n c_new= c - c_error\n if c_new > 127:\n c_bit= bit\n ... | 2008/10/25 | [
"https://Stackoverflow.com/questions/236692",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2900/"
] |
236,713 | <p>Please help, I am stuck here ---</p>
<pre><code>irb> a = "line of text\n line two\n line three"
irb> system("cat > test_file << #{a}")
cat: of: No such file or directory
cat: text: No such file or directory
=> false
</code></pre>
| [
{
"answer_id": 236727,
"author": "Ivan",
"author_id": 16957,
"author_profile": "https://Stackoverflow.com/users/16957",
"pm_score": 3,
"selected": true,
"text": "system(\"cat > test_file << \\\"#{a}\\\"\")\n system(\"echo \\\"#{a}\\\" >> test_file\")\n"
},
{
"answer_id": 236729,
... | 2008/10/25 | [
"https://Stackoverflow.com/questions/236713",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/31347/"
] |
236,715 | <p>I am using Ruby on Rails.</p>
<p>I want to create a filter field on a page such that whenever the input field's value changes I filter a list shown below via ajax. (Exaclty like the Users search works in Stackoverflow)</p>
<p>For now, I made it run with a form_remote_tag containing a text_field_tag and a submit_ta... | [
{
"answer_id": 236721,
"author": "Ricardo Acras",
"author_id": 19224,
"author_profile": "https://Stackoverflow.com/users/19224",
"pm_score": 3,
"selected": true,
"text": "<%= text_field_tag 'filter' %>\n<%= observe_field 'filter', \n :url => {:controller => 'your_controller', :action ... | 2008/10/25 | [
"https://Stackoverflow.com/questions/236715",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2534/"
] |
236,737 | <p>Perl and PHP do this with backticks. For example,</p>
<pre><code>$output = `ls`;
</code></pre>
<p>Returns a directory listing. A similar function, <code>system("foo")</code>, returns the operating system return code for the given command foo. I'm talking about a variant that returns whatever foo prints to stdout.<... | [
{
"answer_id": 236740,
"author": "dreeves",
"author_id": 4234,
"author_profile": "https://Stackoverflow.com/users/4234",
"pm_score": 3,
"selected": true,
"text": "$output = `foo`;\n"
},
{
"answer_id": 236742,
"author": "dreeves",
"author_id": 4234,
"author_profile": "... | 2008/10/25 | [
"https://Stackoverflow.com/questions/236737",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4234/"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.