qid int64 4 19.1M | question stringlengths 18 48.3k | answers list | date stringlengths 10 10 | metadata list |
|---|---|---|---|---|
103,519 | <p>I'm running some JUnit tests on my applications. Every test has a for loop calling respective method 10000 times.
The tested methods produce a lot of log.
These logs are also automatically collected by JUnit as test output.
This situation takes to OutOfMemoryError because the string buffer where JUnit keeps the out... | [
{
"answer_id": 103535,
"author": "matt b",
"author_id": 4249,
"author_profile": "https://Stackoverflow.com/users/4249",
"pm_score": 1,
"selected": false,
"text": "-Xmx <some number>M -Xmx 256M"
},
{
"answer_id": 106252,
"author": "shoover",
"author_id": 18356,
"author... | 2008/09/19 | [
"https://Stackoverflow.com/questions/103519",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18119/"
] |
103,532 | <p>If you need to open a SqlConnection before issuing queries, can you simply handle all non-Open ConnectionStates in the same way? For example:</p>
<pre><code> if (connection.State != ConnectionState.Open)
{
connection.Open();
}
</code></pre>
<p>I read somewhere that for ConnectionState.Broken th... | [
{
"answer_id": 103832,
"author": "Joe",
"author_id": 13087,
"author_profile": "https://Stackoverflow.com/users/13087",
"pm_score": 3,
"selected": false,
"text": "using(SqlConnection connection = new SqlConnection(...))\n{\n connection.Open();\n // ... do your stuff here\n\n} // Conn... | 2008/09/19 | [
"https://Stackoverflow.com/questions/103532",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/815/"
] |
103,560 | <p>I have an ASP.net application that works fine in the development environment but in the production environment throws the following exception when clicking a link that performs a postback. Any ideas?</p>
<blockquote>
<p>Invalid postback or callback argument.
Event validation is enabled using
in configurat... | [
{
"answer_id": 103599,
"author": "azamsharp",
"author_id": 3797,
"author_profile": "https://Stackoverflow.com/users/3797",
"pm_score": 0,
"selected": false,
"text": "<%@ Page ... EnableEventValidation = \"false\" />\n"
},
{
"answer_id": 278893,
"author": "dnord",
"author_... | 2008/09/19 | [
"https://Stackoverflow.com/questions/103560",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3111/"
] |
103,561 | <p>I am taking on a maintenance team and would like to introduce tools like FxCop and StyleCop to help improve the code and introduce the developers to better programming techniques and standards. Since we are maintaining code and not making significant enhancements, we will probably only deal with a couple of methods/... | [
{
"answer_id": 168262,
"author": "alexandrul",
"author_id": 19756,
"author_profile": "https://Stackoverflow.com/users/19756",
"pm_score": 3,
"selected": true,
"text": "/types:<type list> [Short form: /t:<type list>]\nAnalyze only these types and members.\n"
}
] | 2008/09/19 | [
"https://Stackoverflow.com/questions/103561",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3262/"
] |
103,564 | <p>I am working on an application and one design approach involves extremely heavy use of the <code>instanceof</code> operator. While I know that OO design generally tries to avoid using <code>instanceof</code>, that is a different story and this question is purely related to performance. I was wondering if there is an... | [
{
"answer_id": 103602,
"author": "Paul Tomblin",
"author_id": 3333,
"author_profile": "https://Stackoverflow.com/users/3333",
"pm_score": 2,
"selected": false,
"text": "if (o instanceof Class1)\n doThis();\nelse if (o instanceof Class2)\n doThat();\n//...\n o.doEverything();\n"
},
... | 2008/09/19 | [
"https://Stackoverflow.com/questions/103564",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2204759/"
] |
103,569 | <p>I've looked for some other articles on this problem and even tried some of the ideas in <a href="https://stackoverflow.com/questions/8440/visual-studio-optimizations#8539">this thread</a>; however, nothing has solved the issue yet. So, on to the issue.</p>
<p>Something happens when working in Visual Studio (usually... | [
{
"answer_id": 13626423,
"author": "Yash Gadhiya",
"author_id": 1026511,
"author_profile": "https://Stackoverflow.com/users/1026511",
"pm_score": 3,
"selected": false,
"text": "<script src=\"//translate.google.com/translate_a... //"
}
] | 2008/09/19 | [
"https://Stackoverflow.com/questions/103569",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/312/"
] |
103,575 | <p>I am trying to validate the WPF form against an object. The validation fires when I type something in the textbox lose focus come back to the textbox and then erase whatever I have written. But if I just load the WPF application and tab off the textbox without writing and erasing anything from the textbox, then it i... | [
{
"answer_id": 914289,
"author": "w4g3n3r",
"author_id": 36745,
"author_profile": "https://Stackoverflow.com/users/36745",
"pm_score": 3,
"selected": false,
"text": "<Binding \n Source=\"{StaticResource CustomerKey}\" \n Path=\"LastName\" \n ValidatesOnExceptions=\"True\" \n ... | 2008/09/19 | [
"https://Stackoverflow.com/questions/103575",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3797/"
] |
103,576 | <p>I'm trying a very basic XPath on <a href="http://pastebin.com/f14a20a30" rel="noreferrer">this xml</a> (same as below), and it doesn't find anything.
I'm trying both .NET and <a href="http://www.xmlme.com/XpathTool.aspx" rel="noreferrer">this website</a>, and XPaths such as <code>//PropertyGroup</code>, <code>/Prope... | [
{
"answer_id": 103905,
"author": "Jesse Millikan",
"author_id": 7526,
"author_profile": "https://Stackoverflow.com/users/7526",
"pm_score": 2,
"selected": false,
"text": "using System;\nusing System.Xml;\n\npublic class XPathNamespace {\n public static void Main(string[] args) {\n ... | 2008/09/19 | [
"https://Stackoverflow.com/questions/103576",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11236/"
] |
103,583 | <p>This is written in PHP, but it's really language agnostic.</p>
<pre><code>try
{
try
{
$issue = new DM_Issue($core->db->escape_string($_GET['issue']));
}
catch(DM_Exception $e)
{
throw new Error_Page($tpl, ERR_NOT_FOUND, $e->getMessage());
}
}
catch(Error_Page $e)
{
... | [
{
"answer_id": 103625,
"author": "oglester",
"author_id": 2017,
"author_profile": "https://Stackoverflow.com/users/2017",
"pm_score": 2,
"selected": false,
"text": "try{\n Something();\n}\ncatch( SpecificException se )\n{blah();}\ncatch( AnotherException ae )\n{blah();}\n"
},
{
... | 2008/09/19 | [
"https://Stackoverflow.com/questions/103583",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2025/"
] |
103,593 | <p>I have:</p>
<pre><code><?php
$file=fopen(date("Y-m-d").".txt","r+") or exit("Unable to open file!");
if ($_POST["lastname"] <> "")
{
fwrite($file,$_POST["lastname"]."\n");
}
fclose($file);
?>
</code></pre>
<p>but it overwrites the beginning of the file. How do I make it insert?</p>
| [
{
"answer_id": 103609,
"author": "ConroyP",
"author_id": 2287,
"author_profile": "https://Stackoverflow.com/users/2287",
"pm_score": 6,
"selected": true,
"text": "a+ r+ $file=fopen(date(\"Y-m-d\").\".txt\",\"a+\") or exit(\"Unable to open file!\");\n\nif ($_POST[\"lastname\"] <> \"\")\n{... | 2008/09/19 | [
"https://Stackoverflow.com/questions/103593",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
103,598 | <p>Why was the <code>arguments.callee.caller</code> property deprecated in JavaScript?</p>
<p>It was added and then deprecated in JavaScript, but it was omitted altogether by ECMAScript. Some browser (Mozilla, IE) have always supported it and don't have any plans on the map to remove support. Others (Safari, Opera) ... | [
{
"answer_id": 103961,
"author": "Zach",
"author_id": 9128,
"author_profile": "https://Stackoverflow.com/users/9128",
"pm_score": 5,
"selected": false,
"text": " function foo () {\n ... foo() ...\n }\n function () {\n ... arguments.callee() ...\n }\n function foo () {\n ale... | 2008/09/19 | [
"https://Stackoverflow.com/questions/103598",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15992/"
] |
103,630 | <p>Is it possible to use an <a href="http://en.wikipedia.org/wiki/ASP.NET" rel="noreferrer">ASP.NET</a> web.sitemap with a jQuery <a href="http://users.tpg.com.au/j_birch/plugins/superfish/" rel="noreferrer">Superfish</a> menu? </p>
<p>If not, are there any standards based browser agnostic plugins available that work... | [
{
"answer_id": 647656,
"author": "Conceptdev",
"author_id": 25673,
"author_profile": "https://Stackoverflow.com/users/25673",
"pm_score": 6,
"selected": true,
"text": "siteMap Masterpage.master head <head runat=\"server\">\n <script type=\"text/javascript\" src=\"/script/jquery-1.3.2.... | 2008/09/19 | [
"https://Stackoverflow.com/questions/103630",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3742/"
] |
103,633 | <p><a href="http://en.wikibooks.org/wiki/Combinatorics/Subsets_of_a_set-The_Binomial_Coefficient" rel="nofollow noreferrer">Pascal's rule</a> on counting the subset's of a set works great, when the set contains unique entities.</p>
<p>Is there a modification to this rule for when the set contains duplicate items?</p>
... | [
{
"answer_id": 104046,
"author": "Thomas Andrews",
"author_id": 7061,
"author_profile": "https://Stackoverflow.com/users/7061",
"pm_score": 2,
"selected": false,
"text": "p1^a1.p2^a2....pn^an\n"
},
{
"answer_id": 104091,
"author": "user11318",
"author_id": 11318,
"aut... | 2008/09/19 | [
"https://Stackoverflow.com/questions/103633",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13824/"
] |
103,654 | <p>In several modern programming languages (including C++, Java, and C#), the language allows <a href="http://en.wikipedia.org/wiki/Integer_overflow" rel="noreferrer">integer overflow</a> to occur at runtime without raising any kind of error condition.</p>
<p>For example, consider this (contrived) C# method, which doe... | [
{
"answer_id": 103711,
"author": "Doug T.",
"author_id": 8123,
"author_profile": "https://Stackoverflow.com/users/8123",
"pm_score": 4,
"selected": false,
"text": "int main()\n{\n uint32_t shipsHeadingInDegrees= 0;\n\n // Rotate by a bunch of degrees\n shipsHeadingInDegrees += 0... | 2008/09/19 | [
"https://Stackoverflow.com/questions/103654",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12484/"
] |
103,679 | <p>First off: I'm using a rather obscure implementation of javascript embedded as a scripting engine for Adobe InDesign CS3. This implementation sometimes diverges from "standard" javascript, hence my problem.</p>
<p>I'm using <a href="http://ejohn.org/projects/javascript-diff-algorithm/" rel="nofollow noreferrer">Joh... | [
{
"answer_id": 104018,
"author": "Joel Anair",
"author_id": 7441,
"author_profile": "https://Stackoverflow.com/users/7441",
"pm_score": 1,
"selected": false,
"text": "if(object.hasOwnProperty('testProperty')){\n // do something\n}\n"
}
] | 2008/09/19 | [
"https://Stackoverflow.com/questions/103679",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18950/"
] |
103,725 | <p>I'm working on a project that generates PDFs that can contain fairly complex math and science formulas. The text is rendered in Times New Roman, which has pretty good Unicode coverage, but not complete. We have a system in place to swap in a more Unicode complete font for code points that don't have a glyph in TNR ... | [
{
"answer_id": 103858,
"author": "Scott Nichols",
"author_id": 4299,
"author_profile": "https://Stackoverflow.com/users/4299",
"pm_score": 4,
"selected": false,
"text": "[DllImport(\"gdi32.dll\")]\npublic static extern uint GetFontUnicodeRanges(IntPtr hdc, IntPtr lpgs);\n\n[DllImport(\"g... | 2008/09/19 | [
"https://Stackoverflow.com/questions/103725",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19074/"
] |
103,727 | <p>As an example, Google App Engine uses Google Datastore, not a standard database, to store data. Does anybody have any tips for using Google Datastore instead of databases? It seems I've trained my mind to think 100% in object relationships that map directly to table structures, and now it's hard to see anything di... | [
{
"answer_id": 711322,
"author": "Community",
"author_id": -1,
"author_profile": "https://Stackoverflow.com/users/-1",
"pm_score": 5,
"selected": false,
"text": "class League(BaseModel):\n name = db.StringProperty() \n managers = db.ListProperty(db.Key) #all the users who can vi... | 2008/09/19 | [
"https://Stackoverflow.com/questions/103727",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/681/"
] |
103,765 | <p>Here's the situation: I have a label's text set, immediately followed by a response.redirect() call as follows (this is just an example, but I believe it describes my situation accurately):</p>
<p>aspx:</p>
<pre><code><asp:Label runat="server" Text="default text" />
</code></pre>
<p>Code-behind (code called... | [
{
"answer_id": 103816,
"author": "Adrian Clark",
"author_id": 148,
"author_profile": "https://Stackoverflow.com/users/148",
"pm_score": 2,
"selected": false,
"text": "Response.Redirect Response.Redirect"
}
] | 2008/09/19 | [
"https://Stackoverflow.com/questions/103765",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13578/"
] |
103,766 | <p>I need to store user entered changes to a particular table, but not show those changes until they have been viewed and approved by an administrative user. While those changes are still in a pending state, I would still display the old version of the data. What would be the best way of storing these changes waitin... | [
{
"answer_id": 104402,
"author": "borjab",
"author_id": 16206,
"author_profile": "https://Stackoverflow.com/users/16206",
"pm_score": 2,
"selected": false,
"text": " CREATE OR REPLACE VIEW AS \n\n SELECT * FROM my_table where approved = 1\n"
}
] | 2008/09/19 | [
"https://Stackoverflow.com/questions/103766",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19090/"
] |
103,785 | <p>I've found that on some occasions I can edit the source while debugging. Are there any other advantages of using the Visual Studio built-in webserver instead of a virtual directory in IIS?</p>
<p>I'm using Windows XP on my development environment, and a local instance of IIS 5. I work on several projects,... | [
{
"answer_id": 103879,
"author": "Simon_Weaver",
"author_id": 16940,
"author_profile": "https://Stackoverflow.com/users/16940",
"pm_score": 3,
"selected": false,
"text": "// http://localhost:52632/main//images/logo.jpg //"
},
{
"answer_id": 103959,
"author": "Simon_Weaver",
... | 2008/09/19 | [
"https://Stackoverflow.com/questions/103785",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5018/"
] |
103,791 | <p>A coworker has been struggling with this problem.</p>
<p>The desired result is an installable plugin for Notes that will add a button emails with attachments that will let users save the attachment to a document management system.</p>
<p>Finding documentation on doing this for Notes has been an uphill battle to sa... | [
{
"answer_id": 1063575,
"author": "stwissel",
"author_id": 131021,
"author_profile": "https://Stackoverflow.com/users/131021",
"pm_score": 0,
"selected": false,
"text": "@Command([ToolsRunMacro];\"(ExportDocumentsTo[yourSystemNameHere])\")\n"
}
] | 2008/09/19 | [
"https://Stackoverflow.com/questions/103791",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2719/"
] |
103,829 | <p>Given the following:</p>
<pre><code>declare @a table
(
pkid int,
value int
)
declare @b table
(
otherID int,
value int
)
insert into @a values (1, 1000)
insert into @a values (1, 1001)
insert into @a values (2, 1000)
insert into @a values (2, 1001)
insert into @a values (2, 1002)
insert into @b ... | [
{
"answer_id": 103910,
"author": "Cruachan",
"author_id": 7315,
"author_profile": "https://Stackoverflow.com/users/7315",
"pm_score": 0,
"selected": false,
"text": "create view qryMyUinion as\nselect * from table1 \nunion all\nselect * from table2\n select count( * ), [field list here] \... | 2008/09/19 | [
"https://Stackoverflow.com/questions/103829",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4068/"
] |
103,844 | <p>List Comprehension for me seems to be like the opaque block of granite that regular expressions are for me. I need pointers.</p>
<p>Say, I have a 2D list:</p>
<pre><code>li = [[0,1,2],[3,4,5],[6,7,8]]
</code></pre>
<p>I would like to merge this either into one long list</p>
<pre><code>li2 = [0,1,2,3,4,5,6,7,8]
<... | [
{
"answer_id": 103873,
"author": "joeld",
"author_id": 19104,
"author_profile": "https://Stackoverflow.com/users/19104",
"pm_score": 0,
"selected": false,
"text": "import itertools\nitertools.flatten( li )\n"
},
{
"answer_id": 103883,
"author": "Eli Bendersky",
"author_id... | 2008/09/19 | [
"https://Stackoverflow.com/questions/103844",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/577/"
] |
103,918 | <p>I am trying to install the ibm_db gem so that I can access DB2 from Ruby. When I try:</p>
<pre><code>sudo gem install ibm_db
</code></pre>
<p>I get the following request for clarification:</p>
<pre>
Select which gem to install for your platform (i486-linux)
1. ibm_db 0.10.0 (ruby)
2. ibm_db 0.10.0 (mswin32)
3... | [
{
"answer_id": 104102,
"author": "John Topley",
"author_id": 1450,
"author_profile": "https://Stackoverflow.com/users/1450",
"pm_score": 1,
"selected": false,
"text": "sudo gem install --platform ruby ibm_db\n gem help install\n"
},
{
"answer_id": 104163,
"author": "paradoja"... | 2008/09/19 | [
"https://Stackoverflow.com/questions/103918",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/122/"
] |
103,919 | <p>I want to store the current URL in a session variable to reference the previous visited page.</p>
<p>If I store every URL (via a before_filter on ApplicationController), also actions which end in a redirect (create, update, etc) are considered as last visited page.</p>
<p>Is there a way to tell Rails only to execu... | [
{
"answer_id": 103975,
"author": "kch",
"author_id": 13989,
"author_profile": "https://Stackoverflow.com/users/13989",
"pm_score": 0,
"selected": false,
"text": "@performed_render\n@performed_redirect\n after_filter"
},
{
"answer_id": 104460,
"author": "kch",
"author_id":... | 2008/09/19 | [
"https://Stackoverflow.com/questions/103919",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11231/"
] |
103,938 | <p>I've been doing code review (mostly using tools like FindBugs) of one of our pet projects and FindBugs marked following code as erroneous (pseudocode):</p>
<pre><code>Connection conn = dataSource.getConnection();
try{
PreparedStatement stmt = conn.prepareStatement();
//initialize the statement
stmt.exe... | [
{
"answer_id": 103994,
"author": "neu242",
"author_id": 13365,
"author_profile": "https://Stackoverflow.com/users/13365",
"pm_score": 5,
"selected": false,
"text": "\"ORA-01000: maximum open cursors exceeded\"\n"
},
{
"answer_id": 104123,
"author": "Aaron",
"author_id": 1... | 2008/09/19 | [
"https://Stackoverflow.com/questions/103938",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7918/"
] |
103,945 | <p>I've implemented a custom item renderer that I'm using with a combobox on a flex project I'm working on. It displays and icon and some text for each item. The only problem is that when the text is long the width of the menu is not being adjusted properly and the text is being truncated when displayed. I've tried twe... | [
{
"answer_id": 104314,
"author": "defmeta",
"author_id": 10875,
"author_profile": "https://Stackoverflow.com/users/10875",
"pm_score": 0,
"selected": false,
"text": "protected override function calculatePreferredSizeFromData(count:int):Object\n"
},
{
"answer_id": 1432078,
"au... | 2008/09/19 | [
"https://Stackoverflow.com/questions/103945",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2327/"
] |
103,980 | <p>I'm working on a document "wizard" for the company that I work for. It's a .dot file with a header consisting of some text and some form fields, and a lot of VBA code. The body of the document is pulled in as an OLE object from a separate .doc file.</p>
<p>Currently, this is being done as a <code>Shape</code>, rath... | [
{
"answer_id": 104116,
"author": "GSerg",
"author_id": 11683,
"author_profile": "https://Stackoverflow.com/users/11683",
"pm_score": 3,
"selected": true,
"text": "ThisDocument.Range(15).InlineShapes.AddPicture \"1.gif\"\n"
},
{
"answer_id": 128344,
"author": "Branan",
"au... | 2008/09/19 | [
"https://Stackoverflow.com/questions/103980",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13894/"
] |
103,989 | <p>I need to implement an in-memory tuple-of-strings matching feature in C. There will be large list of tuples associated with different actions and a high volume of events to be matched against the list.</p>
<p>List of tuples:</p>
<pre><code>("one", "four")
("one")
("three")
("four", "five")
("six")
</code></pr... | [
{
"answer_id": 104182,
"author": "Frosty",
"author_id": 7476,
"author_profile": "https://Stackoverflow.com/users/7476",
"pm_score": 3,
"selected": true,
"text": "unsigned int hash(char *value){...}\n\ntypedef struct _tuple {\n unsigned int bitvalues;\n void * data\n} tuple;\n\ntupl... | 2008/09/19 | [
"https://Stackoverflow.com/questions/103989",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7223/"
] |
104,009 | <p>I'm wanting to get the full value of a char[] variable in the VC6 watch window, but it only shows a truncated version. I can copy the value from a debug memory window, but that contains mixed lines of hex and string values. Surely there is a better way??</p>
| [
{
"answer_id": 104045,
"author": "Doug T.",
"author_id": 8123,
"author_profile": "https://Stackoverflow.com/users/8123",
"pm_score": 1,
"selected": false,
"text": "char bigArray[1000];\n &bigArray[0]\n&bigArray[100]\n&bigArray[200]\n...\n"
},
{
"answer_id": 104338,
"author": ... | 2008/09/19 | [
"https://Stackoverflow.com/questions/104009",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19125/"
] |
104,022 | <p>I'm currently using <code>.resx</code> files to manage my server side resources for .NET.</p>
<p>the application that I am dealing with also allows developers to plugin JavaScript into various event handlers for client side validation, etc.. What is the best way for me to localize my JavaScript messages and strings... | [
{
"answer_id": 104051,
"author": "Diodeus - James MacFarlane",
"author_id": 12579,
"author_profile": "https://Stackoverflow.com/users/12579",
"pm_score": 2,
"selected": false,
"text": "var phrases={};\nphrases['fatalError'] ='On no!';\n"
},
{
"answer_id": 104080,
"author": "J... | 2008/09/19 | [
"https://Stackoverflow.com/questions/104022",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7215/"
] |
104,055 | <p>I know how to use rpm to list the contents of a package (<code>rpm -qpil package.rpm</code>). However, this requires knowing the location of the .rpm file on the filesystem. A more elegant solution would be to use the package manager, which in my case is YUM. How can YUM be used to achieve this?</p>
| [
{
"answer_id": 104087,
"author": "Thomi",
"author_id": 1304,
"author_profile": "https://Stackoverflow.com/users/1304",
"pm_score": 5,
"selected": false,
"text": "rpm -qlp /path/to/fileToList.rpm\n rpm -ql packageName\n"
},
{
"answer_id": 107520,
"author": "Thomas Vander Stich... | 2008/09/19 | [
"https://Stackoverflow.com/questions/104055",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/742/"
] |
104,063 | <p>I noticed in another post, someone had done something like:</p>
<pre><code>double d = 3.1415;
int i = Convert.ToInt32(Math.Floor(d));
</code></pre>
<p>Why did they use the convert function, rather than:</p>
<pre><code>double d = 3.1415;
int i = (int)d;
</code></pre>
<p>which has an implicit floor and convert.</p... | [
{
"answer_id": 104180,
"author": "NotDan",
"author_id": 3291,
"author_profile": "https://Stackoverflow.com/users/3291",
"pm_score": 1,
"selected": false,
"text": "int i = Convert.ToInt32(\"1234\");\n Convert.ToInt32(\"1234NonNumber\");\n"
},
{
"answer_id": 104387,
"author": "... | 2008/09/19 | [
"https://Stackoverflow.com/questions/104063",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15261/"
] |
104,068 | <p>Let's say we have the following method declaration:</p>
<pre><code>Public Function MyMethod(ByVal param1 As Integer, _
Optional ByVal param2 As Integer = 0, _
Optional ByVal param3 As Integer = 1) As Integer
Return param1 + param2 + param3
End Function
</code></pre>
<p>How does VB.NET make the optiona... | [
{
"answer_id": 104094,
"author": "John Rudy",
"author_id": 14048,
"author_profile": "https://Stackoverflow.com/users/14048",
"pm_score": 3,
"selected": false,
"text": ".method public static int32 MyMethod(int32 param1,\n [opt] int32 param2,\n ... | 2008/09/19 | [
"https://Stackoverflow.com/questions/104068",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14048/"
] |
104,115 | <p>In most modern IDEs there is a parameter that you can set to ensure javac gets enough heap memory to do its compilation. For reasons that are not worth going into here, we are tied for the time being to JBuilder 2005/2006, and it appears the amount of source code has exceeded what can be handled by javac.</p>
<p>P... | [
{
"answer_id": 580326,
"author": "Alex B",
"author_id": 6180,
"author_profile": "https://Stackoverflow.com/users/6180",
"pm_score": 0,
"selected": false,
"text": "vmparam -Xms256m \nvmparam -Xmx256m\n"
},
{
"answer_id": 10959286,
"author": "lvr",
"author_id": 1445908,
... | 2008/09/19 | [
"https://Stackoverflow.com/questions/104115",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17123/"
] |
104,122 | <p>I have a crash dump of an application that is supposedly leaking GDI. The app is running on XP and I have no problems loading it into WinDbg to look at it. Previously we have use the <a href="http://msdn.microsoft.com/en-us/library/cc267206.aspx" rel="noreferrer">Gdikdx.dll extension</a> to look at Gdi information... | [
{
"answer_id": 104150,
"author": "Kris Kumler",
"author_id": 4281,
"author_profile": "https://Stackoverflow.com/users/4281",
"pm_score": 3,
"selected": true,
"text": "!poolused"
}
] | 2008/09/19 | [
"https://Stackoverflow.com/questions/104122",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5882/"
] |
104,158 | <p>I came across this recently, up until now I have been happily overriding the equality operator (<strong>==</strong>) and/or <strong>Equals</strong> method in order to see if two references types actually contained the same <strong>data</strong> (i.e. two different instances that look the same).</p>
<p>I have been us... | [
{
"answer_id": 104197,
"author": "Matt J",
"author_id": 18528,
"author_profile": "https://Stackoverflow.com/users/18528",
"pm_score": 6,
"selected": true,
"text": "class TwoDPoint : System.Object\n{\n public readonly int x, y;\n\n public TwoDPoint(int x, int y) //constructor\n ... | 2008/09/19 | [
"https://Stackoverflow.com/questions/104158",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/832/"
] |
104,184 | <p>There is a case where a map will be constructed, and once it is initialized, it will never be modified again. It will however, be accessed (via get(key) only) from multiple threads. Is it safe to use a <code>java.util.HashMap</code> in this way?</p>
<p>(Currently, I'm happily using a <code>java.util.concurrent.Co... | [
{
"answer_id": 1702190,
"author": "Will",
"author_id": 207084,
"author_profile": "https://Stackoverflow.com/users/207084",
"pm_score": 2,
"selected": false,
"text": "Collections.unmodifiableMap(originalMap)"
},
{
"answer_id": 39746361,
"author": "TomWolk",
"author_id": 10... | 2008/09/19 | [
"https://Stackoverflow.com/questions/104184",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3093/"
] |
104,223 | <p>I have noticed that cURL in PHP returns different data when told to output to a file via <code>CURLOPT_FILE</code> as it does when told to send the output to a string via <code>CURLOPT_RETURNTRANSFER</code>.</p>
<p><code>_RETURNTRANSFER</code> seems to strip newlines and extra white space as if parsing it for displ... | [
{
"answer_id": 104750,
"author": "p4bl0",
"author_id": 12043,
"author_profile": "https://Stackoverflow.com/users/12043",
"pm_score": 0,
"selected": false,
"text": "ob_start(); ob_get_clean(); $ch = curl_init(...);\n// ...\nob_start();\ncurl_exec($ch);\n$yourResult = ob_get_clean();\ncurl... | 2008/09/19 | [
"https://Stackoverflow.com/questions/104223",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1536217/"
] |
104,224 | <p>I'm working on a WPF application that sometimes exhibits odd problems and appears to <em>hang</em> in the UI. It is inconsistent, it happens in different pages, but it happens often enough that it is a big problem. I should mention that it is not a true hang as described below.</p>
<p>My first thought was that th... | [
{
"answer_id": 1908286,
"author": "EightyOne Unite",
"author_id": 5559,
"author_profile": "https://Stackoverflow.com/users/5559",
"pm_score": 1,
"selected": false,
"text": "AllowsTransparency"
}
] | 2008/09/19 | [
"https://Stackoverflow.com/questions/104224",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/312/"
] |
104,225 | <p>I have a co-worker that maintains that TRUE used to be defined as 0 and all other values were FALSE. I could swear that every language I've worked with, if you could even get a value for a boolean, that the value for FALSE is 0. Did TRUE used to be 0? If so, when did we switch?</p>
| [
{
"answer_id": 104274,
"author": "GSerg",
"author_id": 11683,
"author_profile": "https://Stackoverflow.com/users/11683",
"pm_score": 0,
"selected": false,
"text": "TRUE 0 0 TRUE 1 -1"
},
{
"answer_id": 104280,
"author": "Dima",
"author_id": 13313,
"author_profile": "h... | 2008/09/19 | [
"https://Stackoverflow.com/questions/104225",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10887/"
] |
104,230 | <p>Situation: A PHP application with multiple installable modules creates a new table in database for each, in the style of mod_A, mod_B, mod_C etc. Each has the column section_id.</p>
<p>Now, I am looking for all entries for a specific section_id, and I'm hoping there's another way besides "Select * from mod_a, mod_b... | [
{
"answer_id": 104257,
"author": "borjab",
"author_id": 16206,
"author_profile": "https://Stackoverflow.com/users/16206",
"pm_score": 1,
"selected": false,
"text": "SELECT * FROM mod_a WHERE section_id=value\nUNION ALL\nSELECT * FROM mod_b WHERE section_id=value\nUNION ALL\nSELECT * FROM... | 2008/09/19 | [
"https://Stackoverflow.com/questions/104230",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4224/"
] |
104,235 | <p>What is the syntax and which namespace/class needs to be imported? Give me sample code if possible. It would be of great help.</p>
| [
{
"answer_id": 104262,
"author": "MagicKat",
"author_id": 8505,
"author_profile": "https://Stackoverflow.com/users/8505",
"pm_score": 5,
"selected": false,
"text": "System.Diagnostics.Debugger.Break();\n"
},
{
"answer_id": 104263,
"author": "Quintin Robinson",
"author_id"... | 2008/09/19 | [
"https://Stackoverflow.com/questions/104235",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13432/"
] |
104,238 | <p>I'm having an issue with my regex.</p>
<p>I want to capture <% some stuff %> and i need what's inside the <% and the %></p>
<p>This regex works quite well for that.</p>
<pre><code>$matches = preg_split("/<%[\s]*(.*?)[\s]*%>/i",$markup,-1,(PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE));
</code></pr... | [
{
"answer_id": 104295,
"author": "e-satis",
"author_id": 9951,
"author_profile": "https://Stackoverflow.com/users/9951",
"pm_score": 4,
"selected": true,
"text": "preg_match(\"#((?:<|<)%)([\\s]*(?:[^ø]*)[\\s]*?)(%(?:>|>))#i\",$markup, $out);\nprint_r($out);\n\nArray\n(\n [0] => ... | 2008/09/19 | [
"https://Stackoverflow.com/questions/104238",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/144/"
] |
104,254 | <p>I use the Eclipse IDE to develop, compile, and run my Java projects. Today, I'm trying to use the <code>java.io.Console</code> class to manage output and, more importantly, user input.</p>
<p>The problem is that <code>System.console()</code> returns <code>null</code> when an application is run "through" Eclipse. Ec... | [
{
"answer_id": 105403,
"author": "McDowell",
"author_id": 304,
"author_profile": "https://Stackoverflow.com/users/304",
"pm_score": 7,
"selected": true,
"text": "java -cp workspace\\p1\\bin;workspace\\p2\\bin foo.Main\n workspace\\project\\\n \\.classpath\n ... | 2008/09/19 | [
"https://Stackoverflow.com/questions/104254",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19147/"
] |
104,267 | <p>in short: <strong>is there any way to find the current directory full path of a xul application?</strong></p>
<p>long explanation:</p>
<p>I would like to open some html files in a xul browser application. The path to the html files should be set programmatically from the xul application. The html files reside outs... | [
{
"answer_id": 104950,
"author": "rec",
"author_id": 14022,
"author_profile": "https://Stackoverflow.com/users/14022",
"pm_score": 3,
"selected": true,
"text": "var DIR_SERVICE = new Components.Constructor(\"@mozilla.org/file/directory_service;1\", \"nsIProperties\");\nvar path = (new DI... | 2008/09/19 | [
"https://Stackoverflow.com/questions/104267",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14022/"
] |
104,293 | <p>I'm getting a 404 error when trying to run another web service on an IIS 6 server which is also running Sharepoint 2003. I'm pretty sure this is an issue with sharepoint taking over IIS configuration. Is there a way to make a certain web service or web site be ignored by whatever Sharepoint is doing?</p>
| [
{
"answer_id": 104410,
"author": "Stimy",
"author_id": 8852,
"author_profile": "https://Stackoverflow.com/users/8852",
"pm_score": 3,
"selected": true,
"text": "STSADM.EXE -o addpath -url http://localhost/<your web service/app> -type exclusion\n"
}
] | 2008/09/19 | [
"https://Stackoverflow.com/questions/104293",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8852/"
] |
104,313 | <p>I'm implementing an Apache 2.0.x module in C, to interface with an existing product we have. I need to handle FORM data, most likely using POST but I want to handle the GET case as well.</p>
<p>Nick Kew's <A href="https://rads.stackoverflow.com/amzn/click/com/0132409674" rel="nofollow noreferrer" rel="nofollow nore... | [
{
"answer_id": 12989352,
"author": "mlibby",
"author_id": 13468,
"author_profile": "https://Stackoverflow.com/users/13468",
"pm_score": 0,
"selected": false,
"text": "ap_parse_form_data read_post mod_form"
}
] | 2008/09/19 | [
"https://Stackoverflow.com/questions/104313",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4761/"
] |
104,322 | <p>How do you install Boost on MacOS?
Right now I can't find bjam for the Mac.</p>
| [
{
"answer_id": 104389,
"author": "dies",
"author_id": 19170,
"author_profile": "https://Stackoverflow.com/users/19170",
"pm_score": 8,
"selected": true,
"text": "sudo port install boost \n"
},
{
"answer_id": 104647,
"author": "dmckee --- ex-moderator kitten",
"author_id":... | 2008/09/19 | [
"https://Stackoverflow.com/questions/104322",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15124/"
] |
104,323 | <p>I am quite new to JavaScript libraries. I wanted to replace my current code with jQuery. My current code looks like this:</p>
<pre><code>var req;
function createRequest() {
var key = document.getElementById("key");
var keypressed = document.getElementById("keypressed");
keypressed.value = key.value;
va... | [
{
"answer_id": 104347,
"author": "ceejayoz",
"author_id": 1902010,
"author_profile": "https://Stackoverflow.com/users/1902010",
"pm_score": 2,
"selected": false,
"text": "url, data, callback url, callback"
},
{
"answer_id": 104408,
"author": "Lasar",
"author_id": 9438,
... | 2008/09/19 | [
"https://Stackoverflow.com/questions/104323",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
104,329 | <p>What kind of performance implications are there to consider when using try-catch statements in php 5? </p>
<p>I've read some old and seemingly conflicting information on this subject on the web before. A lot of the framework I currently have to work with was created on php 4 and lacks many of the niceties of php 5.... | [
{
"answer_id": 445094,
"author": "jmucchiello",
"author_id": 44065,
"author_profile": "https://Stackoverflow.com/users/44065",
"pm_score": 6,
"selected": false,
"text": "function no_except($a, $b) { \n $a += $b;\n return $a;\n}\nfunction except($a, $b) { \n try {\n $a += ... | 2008/09/19 | [
"https://Stackoverflow.com/questions/104329",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14959/"
] |
104,330 | <p>I have a table with a "Date" column, and I would like to do a query that does the following:</p>
<p>If the date is a <strong>Monday</strong>, <strong>Tuesday</strong>, <strong>Wednesday</strong>, or <strong>Thursday</strong>, the displayed date should be shifted up by 1 day, as in <pre>DATEADD(day, 1, [Date])</pre>... | [
{
"answer_id": 104362,
"author": "Dave Costa",
"author_id": 6568,
"author_profile": "https://Stackoverflow.com/users/6568",
"pm_score": 1,
"selected": false,
"text": "CASE\n WHEN [Date] is a Friday THEN DATEADD( day, 3, [Date] )\n ELSE DATEADD( day, 1, [Date] )\nEND\n"
},
{
"an... | 2008/09/19 | [
"https://Stackoverflow.com/questions/104330",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10675/"
] |
104,339 | <p>I'm doing some Objective-C programming that involves parsing an NSXmlDocument and populating an objects properties from the result.</p>
<p>First version looked like this:</p>
<pre><code>if([elementName compare:@"companyName"] == 0)
[character setCorporationName:currentElementText];
else if([elementName compare... | [
{
"answer_id": 104610,
"author": "Palmin",
"author_id": 5949,
"author_profile": "https://Stackoverflow.com/users/5949",
"pm_score": 2,
"selected": false,
"text": "if-else switch if-else"
},
{
"answer_id": 109702,
"author": "Barry Wark",
"author_id": 2140,
"author_prof... | 2008/09/19 | [
"https://Stackoverflow.com/questions/104339",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18590/"
] |
104,363 | <p>I'm trying to upgrade a package using yum on Fedora 8. The package is <code>elfutils</code>. Here's what I have installed locally:</p>
<pre><code>$ yum info elfutils
Installed Packages
Name : elfutils
Arch : x86_64
Version: 0.130
Release: 3.fc8
Size : 436 k
Repo : installed
Summary: A collection of utilitie... | [
{
"answer_id": 104479,
"author": "ethyreal",
"author_id": 18159,
"author_profile": "https://Stackoverflow.com/users/18159",
"pm_score": 1,
"selected": false,
"text": "yum remove elfutils\n yum install elfutils\n yum update\n yum upgrade\n"
},
{
"answer_id": 104801,
"author": ... | 2008/09/19 | [
"https://Stackoverflow.com/questions/104363",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/742/"
] |
104,373 | <p>I wrote an application in Java and when it runs on one customer's computer running OS X The Save and Export buttons are disabled. (Everything else works in the application.)</p>
<p>Both of these buttons open up a standard save file dialog.</p>
<p>Any ideas?</p>
| [
{
"answer_id": 104611,
"author": "Angelo van der Sijpt",
"author_id": 19144,
"author_profile": "https://Stackoverflow.com/users/19144",
"pm_score": 2,
"selected": false,
"text": "setEnabled false setEnabled false"
}
] | 2008/09/19 | [
"https://Stackoverflow.com/questions/104373",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/363822/"
] |
104,383 | <p>In Visual Basic 6, when I attempt to access <em>Project > References</em>, it throws an error:</p>
<blockquote>
<p>Error accessing system registry</p>
</blockquote>
<p>I am:</p>
<ul>
<li>Logged in as the local computer administrator </li>
<li>running Windows XP Professional and </li>
<li>I can execute <code>reg... | [
{
"answer_id": 1884282,
"author": "Jim Lang",
"author_id": 194002,
"author_profile": "https://Stackoverflow.com/users/194002",
"pm_score": 3,
"selected": false,
"text": "HKCR\\TypeLib\\{00020905-0000-0000-C000-000000000046}\\8.5 ACCESS DENIED psexec -i -d -s c:\\windows\\regedit.exe psex... | 2008/09/19 | [
"https://Stackoverflow.com/questions/104383",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18853/"
] |
104,395 | <p>I need some info on how to use margins and how exactly <em>padding</em> works.</p>
<p>For example: Should I put a line to occupy the whole width of the page (no matter what resolution is used to display the web page) letting just a small border on each side, how could I achieve this?</p>
| [
{
"answer_id": 104536,
"author": "Thomas Koschel",
"author_id": 2012356,
"author_profile": "https://Stackoverflow.com/users/2012356",
"pm_score": 0,
"selected": false,
"text": "<table width=\"100%\" cellpadding=\"5\">\n <tr>\n <td>\nOne, two, three ... One, two, three ... One, two, t... | 2008/09/19 | [
"https://Stackoverflow.com/questions/104395",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19159/"
] |
104,420 | <p>How do I generate all the permutations of a list? For example:</p>
<pre><code>permutations([])
[]
permutations([1])
[1]
permutations([1, 2])
[1, 2]
[2, 1]
permutations([1, 2, 3])
[1, 2, 3]
[1, 3, 2]
[2, 1, 3]
[2, 3, 1]
[3, 1, 2]
[3, 2, 1]
</code></pre>
| [
{
"answer_id": 104426,
"author": "Ricardo Reyes",
"author_id": 3399,
"author_profile": "https://Stackoverflow.com/users/3399",
"pm_score": 5,
"selected": false,
"text": "def permutations (orig_list):\n if not isinstance(orig_list, list):\n orig_list = list(orig_list)\n\n yie... | 2008/09/19 | [
"https://Stackoverflow.com/questions/104420",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3399/"
] |
104,439 | <p>The Eclipse projects are all stored in the Eclipse Foundation CVS servers. Using the source is a great way to debug your code and to figure out how to do new things. </p>
<p>Unfortunately in a large software project like BIRT, it can be difficult to know which projects and versions are required for a particular ... | [
{
"answer_id": 104426,
"author": "Ricardo Reyes",
"author_id": 3399,
"author_profile": "https://Stackoverflow.com/users/3399",
"pm_score": 5,
"selected": false,
"text": "def permutations (orig_list):\n if not isinstance(orig_list, list):\n orig_list = list(orig_list)\n\n yie... | 2008/09/19 | [
"https://Stackoverflow.com/questions/104439",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5412/"
] |
104,448 | <p>I'm trying to create a map application similar to <a href="http://flashden.net/item/zoom-pan-controls-with-dynamic-image-settings/15713" rel="nofollow noreferrer">this</a>. Click the SWF Preview tab on the left of the image. Specifically, noticed how you can pan around, and the clickable buttons on the map move with... | [
{
"answer_id": 104855,
"author": "hasseg",
"author_id": 4111,
"author_profile": "https://Stackoverflow.com/users/4111",
"pm_score": 2,
"selected": false,
"text": "_siblings private var _dragStartCoordinates:Point = null;\nprivate var _siblingsDragStartCoordinates:Dictionary = null;\n\npr... | 2008/09/19 | [
"https://Stackoverflow.com/questions/104448",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/557/"
] |
104,458 | <p>How can styles be applied to CheckBoxList ListItems. Unlike other controls, such as the Repeater where you can specify <code><ItemStyle></code>, you can't seem to specify a style for each individual control.</p>
<p>Is there some sort of work around?</p>
| [
{
"answer_id": 104502,
"author": "Andrew Burgess",
"author_id": 12096,
"author_profile": "https://Stackoverflow.com/users/12096",
"pm_score": 4,
"selected": false,
"text": ".chkboxlist td \n{\n font-size:x-large;\n}\n <asp:CheckBoxList ID=\"chkboxlist1\" runat=\"server\" CssClass=\"ch... | 2008/09/19 | [
"https://Stackoverflow.com/questions/104458",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12096/"
] |
104,485 | <p>I'm trying to skin HTML output which I don't have control over. One of the elements is a <code>div</code> with a <code>style="overflow: auto"</code> attribute.<br>
Is there a way in CSS to force that <code>div</code> to use <code>overflow: hidden;</code>?</p>
| [
{
"answer_id": 104499,
"author": "Magnar",
"author_id": 1123,
"author_profile": "https://Stackoverflow.com/users/1123",
"pm_score": 7,
"selected": true,
"text": "!important element {\n overflow: hidden !important;\n}\n"
},
{
"answer_id": 104501,
"author": "John Millikin",
... | 2008/09/19 | [
"https://Stackoverflow.com/questions/104485",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4898/"
] |
104,487 | <p>Right now I'm doing something like this:</p>
<pre><code>RewriteRule ^/?logout(/)?$ logout.php
RewriteRule ^/?config(/)?$ config.php
</code></pre>
<p>I would much rather have one rules that would do the same thing for each url, so I don't have to keep adding them every time I add a new file.</p>
<p>Also, I like to... | [
{
"answer_id": 104596,
"author": "Jason Terk",
"author_id": 12582,
"author_profile": "https://Stackoverflow.com/users/12582",
"pm_score": 1,
"selected": false,
"text": "RewriteEngine on\nRewriteMap quux-map prg:/path/to/map.quux.pl\nRewriteRule ^/~quux/(.*)$ /~quux/${quux-map... | 2008/09/19 | [
"https://Stackoverflow.com/questions/104487",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15000/"
] |
104,516 | <p>In PHP, the HEREDOC string declarations are really useful for outputting a block of html. You can have it parse in variables just by prefixing them with $, but for more complicated syntax (like $var[2][3]), you have to put your expression inside {} braces.</p>
<p>In PHP 5, it <em>is</em> possible to actually make ... | [
{
"answer_id": 104556,
"author": "boxxar",
"author_id": 15732,
"author_profile": "https://Stackoverflow.com/users/15732",
"pm_score": 6,
"selected": false,
"text": "$string = <<< heredoc\nplain text and now a function: %s\nheredoc;\n$string = sprintf($string, testfunction());\n"
},
{... | 2008/09/19 | [
"https://Stackoverflow.com/questions/104516",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9330/"
] |
104,520 | <p>I have been seriously disappointed with WPF validation system. Anyway! How can I validate the complete form by clicking the "button"? </p>
<p>For some reason everything in WPF is soo complicated! I can do the validation in 1 line of code in ASP.NET which requires like 10-20 lines of code in WPF!!</p>
<p>I can do t... | [
{
"answer_id": 157665,
"author": "Christopher Bennage",
"author_id": 6855,
"author_profile": "https://Stackoverflow.com/users/6855",
"pm_score": 0,
"selected": false,
"text": " <StackPanel> \n <TextBox Text=\"{Binding CurrentCustomer.FirstName}\" />\n <TextBox Text=\"{Binding Cur... | 2008/09/19 | [
"https://Stackoverflow.com/questions/104520",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3797/"
] |
104,525 | <p>We have a warm sql backup. full backup nightly, txn logs shipped every so often during the day and restored. I need to move the data files to another disk. These DB's are in a "warm backup" state (such that I can't unmark them as read-only - "Error 5063: Database '<dbname>' is in warm standby. A warm-standby d... | [
{
"answer_id": 104762,
"author": "boes",
"author_id": 17746,
"author_profile": "https://Stackoverflow.com/users/17746",
"pm_score": 3,
"selected": true,
"text": "backup database activedb to disk='somefile'\n restore database warmbackup from disk='somefile'\n with norecovery, replac... | 2008/09/19 | [
"https://Stackoverflow.com/questions/104525",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10235/"
] |
104,550 | <p>Are <code>.css</code> files always needed? Or may I have a <code>.css</code> "basic" file and define other style items inside the HTML page?</p>
<p>Does <code>padding</code>, <code>borders</code> and so on always have to be defined in a <code>.css</code> file that is stored separately, or may I embed then into an H... | [
{
"answer_id": 104595,
"author": "Michael",
"author_id": 13379,
"author_profile": "https://Stackoverflow.com/users/13379",
"pm_score": 3,
"selected": false,
"text": "<style> <head> <head>\n <style type=\"text/css\">\n body{ background-color: blue; }\n </style>\n</head>\n"
}
] | 2008/09/19 | [
"https://Stackoverflow.com/questions/104550",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19159/"
] |
104,568 | <p>Is there any way that my script can retrieve metadata values that are declared in its own header? I don't see anything promising in the API, except perhaps <code>GM_getValue()</code>. That would of course involve a special name syntax. I have tried, for example: <code>GM_getValue("@name")</code>.</p>
<p>The motivat... | [
{
"answer_id": 104814,
"author": "Athena",
"author_id": 17846,
"author_profile": "https://Stackoverflow.com/users/17846",
"pm_score": 4,
"selected": true,
"text": "GM_info var metadata=<> \n// ==UserScript==\n// @name Reading metadata\n// @namespace http://www.afunamatata.... | 2008/09/19 | [
"https://Stackoverflow.com/questions/104568",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14749/"
] |
104,587 | <p>Everywhere I look always the same explanation pop ups.<br/>
Configure the view resolver.</p>
<pre><code><bean id="viewMappings"
class="org.springframework.web.servlet.view.ResourceBundleViewResolver">
<property name="basename" value="views" />
</bean>
</code></pre>
<p>And then put a fil... | [
{
"answer_id": 105554,
"author": "Brian Matthews",
"author_id": 1969,
"author_profile": "https://Stackoverflow.com/users/1969",
"pm_score": 0,
"selected": false,
"text": "logout *.htm web.xml *.jsp"
}
] | 2008/09/19 | [
"https://Stackoverflow.com/questions/104587",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2024/"
] |
104,599 | <p>I need to write a Java Comparator class that compares Strings, however with one twist. If the two strings it is comparing are the same at the beginning and end of the string are the same, and the middle part that differs is an integer, then compare based on the numeric values of those integers. For example, I want... | [
{
"answer_id": 104693,
"author": "sblundy",
"author_id": 4893,
"author_profile": "https://Stackoverflow.com/users/4893",
"pm_score": 0,
"selected": false,
"text": "int"
},
{
"answer_id": 104926,
"author": "Paul Brinkley",
"author_id": 18160,
"author_profile": "https:/... | 2008/09/19 | [
"https://Stackoverflow.com/questions/104599",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3333/"
] |
104,601 | <p>I want to do a <code>Response.Redirect("MyPage.aspx")</code> but have it open in a new browser window. I've done this before without using the JavaScript register script method. I just can't remember how?</p>
| [
{
"answer_id": 104660,
"author": "JamesSugrue",
"author_id": 1075,
"author_profile": "https://Stackoverflow.com/users/1075",
"pm_score": 5,
"selected": false,
"text": "response.write(\"<script>\");\nresponse.write(\"window.open('page.html','_blank')\");\nresponse.write(\"</script>\");\n"... | 2008/09/19 | [
"https://Stackoverflow.com/questions/104601",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
104,603 | <p>Is there a way to iterate (through foreach preferably) over a collection using reflection? I'm iterating over the properties in an object using reflection, and when the program gets to a type that is a collection, I'd like it to iterate over the contents of the collection and be able to access the objects in the co... | [
{
"answer_id": 104664,
"author": "Darren Kopp",
"author_id": 77,
"author_profile": "https://Stackoverflow.com/users/77",
"pm_score": 6,
"selected": true,
"text": "if (item is IEnumerable)\n{\n foreach (object o in (item as IEnumerable))\n {\n\n }\n} else {\n // reflect over it... | 2008/09/19 | [
"https://Stackoverflow.com/questions/104603",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12999/"
] |
104,612 | <p>I want to copy a live production database into my local development database. Is there a way to do this without locking the production database?</p>
<p>I'm currently using:</p>
<pre class="lang-none prettyprint-override"><code>mysqldump -u root --password=xxx -h xxx my_db1 | mysql -u root --password=xxx -h localh... | [
{
"answer_id": 104628,
"author": "John Millikin",
"author_id": 3560,
"author_profile": "https://Stackoverflow.com/users/3560",
"pm_score": 10,
"selected": true,
"text": "--lock-tables=false --single-transaction --lock-tables, -l\n\nLock all tables before dumping them. The tables are lock... | 2008/09/19 | [
"https://Stackoverflow.com/questions/104612",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13009/"
] |
104,618 | <p>I've been trying to get into F# on and off for a while but I keep getting put off. Why?</p>
<p>Because no matter which 'beginners' resource I try to look at I see very simple examples that start using the operator <code>-></code>.</p>
<p>However, nowhere have I found as yet that provides a clear simple explana... | [
{
"answer_id": 104744,
"author": "Blair Conrad",
"author_id": 1199,
"author_profile": "https://Stackoverflow.com/users/1199",
"pm_score": 4,
"selected": false,
"text": "> List.map (fun x -> x % 2 = 0) [1 .. 10];;\nval it : bool list\n= [false; true; false; true; false; true; false; true;... | 2008/09/19 | [
"https://Stackoverflow.com/questions/104618",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17516/"
] |
104,640 | <p>By default when using a webapp server in Eclipse Web Tools, the server startup will fail after a timeout of 45 seconds. I can increase this timeout in the server instance properties, but I don't see a way to disable the timeout entirely (useful when debugging application startup). Is there a way to do this?</p>
| [
{
"answer_id": 65708767,
"author": "Jason Pyeron",
"author_id": 58794,
"author_profile": "https://Stackoverflow.com/users/58794",
"pm_score": 0,
"selected": false,
"text": ".metadata/.plugins/org.eclipse.wst.server.core/servers.xml start-timeout -1"
}
] | 2008/09/19 | [
"https://Stackoverflow.com/questions/104640",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5586/"
] |
104,674 | <p>It's known that you should declare events that take as parameters <code>(object sender, EventArgs args)</code>. Why?</p>
| [
{
"answer_id": 105519,
"author": "fryguybob",
"author_id": 4592,
"author_profile": "https://Stackoverflow.com/users/4592",
"pm_score": 2,
"selected": false,
"text": "(sender, e)"
}
] | 2008/09/19 | [
"https://Stackoverflow.com/questions/104674",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11236/"
] |
104,725 | <p>Joel Spolsky <a href="http://www.joelonsoftware.com/articles/PleaseLinker.html" rel="noreferrer">praised</a> native-code versions of programs that have no dependencies on runtimes. </p>
<p>What native-code compilers are available for functional languages?</p>
| [
{
"answer_id": 104956,
"author": "nlucaroni",
"author_id": 157,
"author_profile": "https://Stackoverflow.com/users/157",
"pm_score": 3,
"selected": false,
"text": "ocamlc ocamlopt GCL"
}
] | 2008/09/19 | [
"https://Stackoverflow.com/questions/104725",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17569/"
] |
104,747 | <p>I have a members table in MySQL</p>
<pre><code>CREATE TABLE `members` (
`id` int(10) unsigned NOT NULL auto_increment,
`name` varchar(65) collate utf8_unicode_ci NOT NULL,
`order` tinyint(3) unsigned NOT NULL default '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB;
</code></pre>
<p>And I would like to let users ... | [
{
"answer_id": 104961,
"author": "Harrison Fisk",
"author_id": 16111,
"author_profile": "https://Stackoverflow.com/users/16111",
"pm_score": 3,
"selected": true,
"text": "order"
},
{
"answer_id": 105217,
"author": "user10340",
"author_id": 10340,
"author_profile": "ht... | 2008/09/19 | [
"https://Stackoverflow.com/questions/104747",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19217/"
] |
104,764 | <p>Are there any prebuilt modules for this? Is there an event thats called everytime a page is loaded? I'm just trying to secure one of my more important admin sections.</p>
| [
{
"answer_id": 104839,
"author": "AaronS",
"author_id": 26932,
"author_profile": "https://Stackoverflow.com/users/26932",
"pm_score": 0,
"selected": false,
"text": " Request.ServerVariables[\"REMOTE_ADDR\"]\n"
},
{
"answer_id": 105373,
"author": "Chris Cudmore",
"autho... | 2008/09/19 | [
"https://Stackoverflow.com/questions/104764",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8456/"
] |
104,791 | <p>The SQL-LDR documentation states that you need to do a convetional Path Load:</p>
<blockquote>
<p>When you want to apply SQL functions
to data fields. SQL functions are not
available during a direct path load</p>
</blockquote>
<p>I have TimeStamp data stored in a CSV file that I'm loading with SQL-LDR by des... | [
{
"answer_id": 104839,
"author": "AaronS",
"author_id": 26932,
"author_profile": "https://Stackoverflow.com/users/26932",
"pm_score": 0,
"selected": false,
"text": " Request.ServerVariables[\"REMOTE_ADDR\"]\n"
},
{
"answer_id": 105373,
"author": "Chris Cudmore",
"autho... | 2008/09/19 | [
"https://Stackoverflow.com/questions/104791",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9940/"
] |
104,797 | <p>What is the best way to create a webservice for accepting an image.
The image might be quite big and I do not want to change the default receive size for the web application.
I have written one that accepts a binary image but that I feel that there has to be a better alternative.</p>
| [
{
"answer_id": 104902,
"author": "core",
"author_id": 11574,
"author_profile": "https://Stackoverflow.com/users/11574",
"pm_score": 3,
"selected": true,
"text": "using System.Drawing;\nusing System.IO;\nusing System.Net;\nusing System.Net.Sockets;\n\n[OperationContract]\npublic void Fetc... | 2008/09/19 | [
"https://Stackoverflow.com/questions/104797",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/403/"
] |
104,799 | <p>Why isn't <a href="http://java.sun.com/javase/6/docs/api/java/util/Collection.html#remove(java.lang.Object)" rel="noreferrer">Collection.remove(Object o)</a> generic? </p>
<p>Seems like <code>Collection<E></code> could have <code>boolean remove(E o);</code> </p>
<p>Then, when you accidentally try to remove ... | [
{
"answer_id": 104943,
"author": "noah",
"author_id": 12034,
"author_profile": "https://Stackoverflow.com/users/12034",
"pm_score": -1,
"selected": false,
"text": "Set stringSet = new HashSet();\n// do some stuff...\nObject o = \"foobar\";\nstringSet.remove(o);\n"
},
{
"answer_id... | 2008/09/19 | [
"https://Stackoverflow.com/questions/104799",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15816/"
] |
104,803 | <p>I've got a (mostly) working plugin developed, but since its function is directly related to the project it processes, how do you develop unit and integration tests for the plugin. The best idea I've had is to create an integration test project for the plugin that uses the plugin during its lifecycle and has tests t... | [
{
"answer_id": 105259,
"author": "Brian Matthews",
"author_id": 1969,
"author_profile": "https://Stackoverflow.com/users/1969",
"pm_score": 4,
"selected": true,
"text": "src/test/resources"
}
] | 2008/09/19 | [
"https://Stackoverflow.com/questions/104803",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17008/"
] |
104,837 | <p>I'd like to have some rails apps over different servers sharing the same session. I can do it within the same server but don't know if it is possible to share over different servers. Anyone already did or knows how to do it?</p>
<p>Thanks</p>
| [
{
"answer_id": 105001,
"author": "webmat",
"author_id": 6349,
"author_profile": "https://Stackoverflow.com/users/6349",
"pm_score": 3,
"selected": false,
"text": "rake db:sessions:create\n config.action_controller.session_store = :active_record_store\n"
}
] | 2008/09/19 | [
"https://Stackoverflow.com/questions/104837",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19224/"
] |
104,844 | <p>I'm looking for a way to find the name of the Windows default printer using unmanaged C++ (found plenty of .NET examples, but no success unmanaged). Thanks.</p>
| [
{
"answer_id": 104882,
"author": "Doug T.",
"author_id": 8123,
"author_profile": "https://Stackoverflow.com/users/8123",
"pm_score": 3,
"selected": true,
"text": "char szPrinterName[255];\nunsigned long lPrinterNameLength;\nGetDefaultPrinter( szPrinterName, &lPrinterNameLength );\nHDC hP... | 2008/09/19 | [
"https://Stackoverflow.com/questions/104844",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8117/"
] |
104,850 | <p>I want to try to convert a string to a Guid, but I don't want to rely on catching exceptions (</p>
<ul>
<li>for performance reasons - exceptions are expensive</li>
<li>for usability reasons - the debugger pops up </li>
<li>for design reasons - the expected is not exceptional</li>
</ul>
<p>In other words the code:<... | [
{
"answer_id": 104932,
"author": "pdavis",
"author_id": 7819,
"author_profile": "https://Stackoverflow.com/users/7819",
"pm_score": 3,
"selected": false,
"text": "^[A-Fa-f0-9]{32}$|^({|\\\\()?[A-Fa-f0-9]{8}-([A-Fa-f0-9]{4}-){3}[A-Fa-f0-9]{12}(}|\\\\))?$|^({)?[0xA-Fa-f0-9]{3,10}(, {0,1}[0... | 2008/09/19 | [
"https://Stackoverflow.com/questions/104850",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12597/"
] |
104,854 | <p>When I start Tomcat (6.0.18) from Eclipse (3.4), I receive this message (first in the log):</p>
<blockquote>
<p>WARNING:
[SetPropertiesRule]{Server/Service/Engine/Host/Context}
Setting property 'source' to
'org.eclipse.jst.jee.server: (project name)'
did not find a matching property.</p>
</blockquote>
<p... | [
{
"answer_id": 355378,
"author": "Community",
"author_id": -1,
"author_profile": "https://Stackoverflow.com/users/-1",
"pm_score": 1,
"selected": false,
"text": "<wb-resource deploy-path=\"/WEB-INF/classes\" source-path=\"/src/main/resources\"/>\n"
}
] | 2008/09/19 | [
"https://Stackoverflow.com/questions/104854",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17585/"
] |
104,866 | <p>Looking for C# class which wraps calls to do the following:</p>
<p>read and write a key value
read & write a key entry</p>
<p>enumerate the entries in a key. This is important. For example, need to list all entries in:
HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\ODBC Data Sources</p>
<p>(I scanned through some ... | [
{
"answer_id": 104912,
"author": "Clinton Pierce",
"author_id": 8173,
"author_profile": "https://Stackoverflow.com/users/8173",
"pm_score": 2,
"selected": false,
"text": " Registry.CurrentUser.OpenSubKey()\n Registry.CurrentUser.CreateSubKey()\n"
}
] | 2008/09/19 | [
"https://Stackoverflow.com/questions/104866",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5232/"
] |
104,872 | <p>I'm working on a <code>PHP</code> application that links into the <code>Protx VSP Direct payment gateway</code>. To handle "3D Secure" requests from the credit card processing company, I need to forward the user to a different website, mimicking a form that has been posted. I'm trying to use the <code>cURL</code> li... | [
{
"answer_id": 104887,
"author": "neu242",
"author_id": 13365,
"author_profile": "https://Stackoverflow.com/users/13365",
"pm_score": 3,
"selected": true,
"text": "<html> \n <head> \n <title>Processing your request...</title> \n </head> \n <body OnLoad=\"OnLoadEvent();\">... | 2008/09/19 | [
"https://Stackoverflow.com/questions/104872",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19232/"
] |
104,918 | <p>My question is related to the command pattern, where we have the following abstraction (C# code) :</p>
<pre><code>public interface ICommand
{
void Execute();
}
</code></pre>
<p>Let's take a simple concrete command, which aims to delete an entity from our application. A <code>Person</code> instance, for example... | [
{
"answer_id": 104940,
"author": "Matt Dillard",
"author_id": 863,
"author_profile": "https://Stackoverflow.com/users/863",
"pm_score": 0,
"selected": false,
"text": "DeletePersonCommand Execute()"
},
{
"answer_id": 104946,
"author": "Joel Martinez",
"author_id": 5416,
... | 2008/09/19 | [
"https://Stackoverflow.com/questions/104918",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4687/"
] |
104,952 | <p>I am using VS2005 VC++ for unmanaged C++. I have VSTS and am trying to use the code coverage tool to accomplish two things with regards to unit tests:</p>
<ol>
<li>See how much of my referenced code under test is getting executed</li>
<li>See how many methods of my code under test (if any) are not unit tested at al... | [
{
"answer_id": 105238,
"author": "Adam Rosenfield",
"author_id": 9530,
"author_profile": "https://Stackoverflow.com/users/9530",
"pm_score": 1,
"selected": false,
"text": "\nint main(int argc, char **argv)\n{\n if(argv == NULL) // C runtime says this won't happen\n someMethodWhichIs... | 2008/09/19 | [
"https://Stackoverflow.com/questions/104952",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
104,953 | <p>I'm trying to create a horizontal 100% stacked bar graph using HTML and CSS. I'd like to create the bars using <code>DIVs</code> with background colors and percentage widths depending on the values I want to graph. I also want to have a grid lines to mark an arbitrary position along the graph.</p>
<p>In my experime... | [
{
"answer_id": 104965,
"author": "Stephen Deken",
"author_id": 7154,
"author_profile": "https://Stackoverflow.com/users/7154",
"pm_score": 4,
"selected": false,
"text": "div.parent{\n position: relative;\n left: 0px; /* stick it wherever it was positioned by default */\n top: 0... | 2008/09/19 | [
"https://Stackoverflow.com/questions/104953",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3488/"
] |
104,959 | <p>If I have a <code>std::vector</code> or <code>std::map</code> variable, and I want to see the contents, it's a big pain to see the nth element while debugging. Is there a plugin, or some trick to making it easier to watch STL container variables while debugging <code>(VS2003/2005/2008)</code>?</p>
| [
{
"answer_id": 105563,
"author": "Adam Rosenfield",
"author_id": 9530,
"author_profile": "https://Stackoverflow.com/users/9530",
"pm_score": 4,
"selected": false,
"text": "(v._Myfirst)[startIndex], count"
},
{
"answer_id": 29318546,
"author": "1''",
"author_id": 1397061,
... | 2008/09/19 | [
"https://Stackoverflow.com/questions/104959",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10705/"
] |
104,960 | <p>What is the best way to interact with a database using Haskell? I'm accustomed to using some sort of ORM (Django's ORM, hibernate, etc.) and something similar would be nice when creating apps with <a href="http://www.happs.org/" rel="noreferrer">HAppS</a>.</p>
<p><strong>Edit:</strong> I'd like to be free to choos... | [
{
"answer_id": 16802511,
"author": "John Wiegley",
"author_id": 370902,
"author_profile": "https://Stackoverflow.com/users/370902",
"pm_score": 3,
"selected": false,
"text": "User\n name Text\n age Int\n\nLogin\n user UserId\n login Text\n passwd Text\n Just (Entity uid _)... | 2008/09/19 | [
"https://Stackoverflow.com/questions/104960",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3446/"
] |
104,967 | <p>As a pet-project, I'd like to attempt to implement a basic language of my own design that can be used as a web-scripting language. It's trivial to run a C++ program as an Apache CGI, so the real work lies in how to parse an input file containing non-code (HTML/CSS markup) and server-side code.</p>
<p>In my undergra... | [
{
"answer_id": 105082,
"author": "Kris Erickson",
"author_id": 3798,
"author_profile": "https://Stackoverflow.com/users/3798",
"pm_score": 2,
"selected": false,
"text": "zend_language_scanner.l"
},
{
"answer_id": 111218,
"author": "eduffy",
"author_id": 7536,
"author_... | 2008/09/19 | [
"https://Stackoverflow.com/questions/104967",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8636/"
] |
104,971 | <p>I have a table with a "Date" column. Each Date may appear multiple times. How do I select only the dates that appear < k number of times?</p>
| [
{
"answer_id": 104984,
"author": "Joel Coehoorn",
"author_id": 3043,
"author_profile": "https://Stackoverflow.com/users/3043",
"pm_score": 3,
"selected": false,
"text": "SELECT * FROM [MyTable] WHERE [Date] IN\n(\n SELECT [Date] \n FROM [MyTable] \n GROUP By [Date] \n HAVING ... | 2008/09/19 | [
"https://Stackoverflow.com/questions/104971",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10675/"
] |
104,983 | <p>In Python specifically, how do variables get shared between threads?</p>
<p>Although I have used <code>threading.Thread</code> before I never really understood or saw examples of how variables got shared. Are they shared between the main thread and the children or only among the children? When would I need to use ... | [
{
"answer_id": 105025,
"author": "Thomas Wouters",
"author_id": 17624,
"author_profile": "https://Stackoverflow.com/users/17624",
"pm_score": 8,
"selected": true,
"text": "Thread Thread Thread threading.local threading.local"
},
{
"answer_id": 106560,
"author": "Aaron Maenpaa... | 2008/09/19 | [
"https://Stackoverflow.com/questions/104983",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19215/"
] |
105,007 | <p>I have read <a href="https://stackoverflow.com/questions/34571/whats-the-best-way-of-unit-testing-private-methods">this post</a> about how to test private methods. I usually do not test them, because I always thought it's faster to test only public methods that will be called from outside the object. Do you test pri... | [
{
"answer_id": 7239814,
"author": "eddy147",
"author_id": 30759,
"author_profile": "https://Stackoverflow.com/users/30759",
"pm_score": 6,
"selected": false,
"text": "class Detective {\n public function investigate() {}\n private function sleepWithSuspect($suspect) {}\n}\nAltered versi... | 2008/09/19 | [
"https://Stackoverflow.com/questions/105007",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13913/"
] |
105,014 | <p>A while ago I came across some code that marked a member variable of a class with the <code>mutable</code> keyword. As far as I can see it simply allows you to modify a variable in a <code>const</code> method:</p>
<pre><code>class Foo
{
private:
mutable bool done_;
public:
void doSomething() cons... | [
{
"answer_id": 105052,
"author": "John Millikin",
"author_id": 3560,
"author_profile": "https://Stackoverflow.com/users/3560",
"pm_score": 5,
"selected": false,
"text": "const mutable"
},
{
"answer_id": 105056,
"author": "Adam Rosenfield",
"author_id": 9530,
"author_p... | 2008/09/19 | [
"https://Stackoverflow.com/questions/105014",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9236/"
] |
105,031 | <p>Using C#, I want to get the total amount of RAM that my computer has.
With the PerformanceCounter I can get the amount of Available ram, by setting:</p>
<pre><code>counter.CategoryName = "Memory";
counter.Countername = "Available MBytes";
</code></pre>
<p>But I can't seem to find a way to get the total amount of m... | [
{
"answer_id": 105084,
"author": "MagicKat",
"author_id": 8505,
"author_profile": "https://Stackoverflow.com/users/8505",
"pm_score": 8,
"selected": false,
"text": "Microsoft.VisualBasic using Microsoft.VisualBasic.Devices; ComputerInfo"
},
{
"answer_id": 105099,
"author": "C... | 2008/09/19 | [
"https://Stackoverflow.com/questions/105031",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13713/"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.