qid int64 4 19.1M | question stringlengths 18 48.3k | answers list | date stringlengths 10 10 | metadata list |
|---|---|---|---|---|
179,845 | <p>I know it's bad to use HTML Tables for everything... and that tables should be used only to present tabular data and not to achieve some style goal. </p>
<p>My question is, how do you make HTML forms with CSS so they look nice and aligned like when using tables?</p>
| [
{
"answer_id": 10179810,
"author": "random",
"author_id": 9314,
"author_profile": "https://Stackoverflow.com/users/9314",
"pm_score": 2,
"selected": false,
"text": "<label> clear:left; <div> <p> .formlabel{\n clear:left;\n display:block;\n float:left;\n margin:0 0 1em 0;\n ... | 2008/10/07 | [
"https://Stackoverflow.com/questions/179845",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7595/"
] |
179,868 | <p>It seems that the </p>
<ul>
<li><a href="https://msdn.microsoft.com/en-us/library/system.diagnostics.debug(v=vs.110).aspx" rel="noreferrer"><code>System.Diagnostics.Debug</code></a>, and </li>
<li><a href="https://msdn.microsoft.com/en-us/library/system.diagnostics.trace(v=vs.110).aspx" rel="noreferrer"><code>Syste... | [
{
"answer_id": 179886,
"author": "Cory Foy",
"author_id": 4083,
"author_profile": "https://Stackoverflow.com/users/4083",
"pm_score": 1,
"selected": false,
"text": "Debug.WriteLine(\"Connecting to DB with username: blah and PW: pass\");\n"
}
] | 2008/10/07 | [
"https://Stackoverflow.com/questions/179868",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3279/"
] |
179,904 | <p>I've been recently asked to learn some MATLAB basics for a class.</p>
<p>What does make it so cool for researchers and people that works in university?
I saw it's cool to work with matrices and plotting things... (things that can be done easily in Python using some libraries).</p>
<p>Writing a function or parsing ... | [
{
"answer_id": 8347327,
"author": "Oli",
"author_id": 1052189,
"author_profile": "https://Stackoverflow.com/users/1052189",
"pm_score": 5,
"selected": false,
"text": "ind2sub im2col hist(Im(:)) unique(list) bsxfun(@plus,M,V) convn(A) tic; %%code; toc imcrop(im) imagesc(matrix) bsxfun(@ti... | 2008/10/07 | [
"https://Stackoverflow.com/questions/179904",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/21384/"
] |
179,927 | <p>In visual studio, I have an asp.net 3.5 project that is using MS Enterprise Library 4.0 application blocks. </p>
<p>When I have my web config file open, my Error list fills up with 99 messages with things like </p>
<pre><code>Could not find schema information for the element 'dataConfiguration'.
Could not find s... | [
{
"answer_id": 179945,
"author": "Franci Penov",
"author_id": 17028,
"author_profile": "https://Stackoverflow.com/users/17028",
"pm_score": 1,
"selected": false,
"text": "<configSections>\n <section name=\"loggingConfiguration\" type=\"Microsoft.Practices.EnterpriseLibrary.Logging.Con... | 2008/10/07 | [
"https://Stackoverflow.com/questions/179927",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/16391/"
] |
179,934 | <p>This is my first time attempting to call an ASP.NET page method from jQuery. I am getting a status 500 error with the responseText message that the web method cannot be found. Here is my jQuery $.ajax call:</p>
<pre><code>function callCancelPlan(activePlanId, ntLogin) {
var paramList = '{"activePlanId":"' + act... | [
{
"answer_id": 17837848,
"author": "Tukaram",
"author_id": 2613382,
"author_profile": "https://Stackoverflow.com/users/2613382",
"pm_score": 2,
"selected": false,
"text": "public static [WebMethod]\npublic static string MethodName() {} \n"
},
{
"answer_id": 66999229,
"author... | 2008/10/07 | [
"https://Stackoverflow.com/questions/179934",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1284/"
] |
179,938 | <p>i'm want to have a repeater generate a bunch of checkboxes, e.g.:</p>
<pre><code><tr><td><input type="checkbox" name="t" value="11cbf4deb87" /> <input type="checkbox" name="a" value="33cbf4deb87" />stackoverflow.com</td></tr>
<tr><td><input type="checkbox" name="t"... | [
{
"answer_id": 180307,
"author": "Robert Paulson",
"author_id": 14033,
"author_profile": "https://Stackoverflow.com/users/14033",
"pm_score": 5,
"selected": true,
"text": " <asp:CheckBox id=\"whatever\" runat=\"Server\" />\n CheckBox checkBox = (CheckBox)e.Item.FindControl(\"whatever\");... | 2008/10/07 | [
"https://Stackoverflow.com/questions/179938",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12597/"
] |
179,940 | <p>We are developing a C# application for a web-service client. This will run on Windows XP PC's.</p>
<p>One of the fields returned by the web service is a DateTime field. The server returns a field in GMT format i.e. with a "Z" at the end.</p>
<p>However, we found that .NET seems to do some kind of implicit conversi... | [
{
"answer_id": 179966,
"author": "coder1",
"author_id": 3018,
"author_profile": "https://Stackoverflow.com/users/3018",
"pm_score": 6,
"selected": false,
"text": "TimeZone.CurrentTimeZone.ToLocalTime(date);\n"
},
{
"answer_id": 180105,
"author": "rbrayb",
"author_id": 992... | 2008/10/07 | [
"https://Stackoverflow.com/questions/179940",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9922/"
] |
179,955 | <p>Many Java Apps don't use anti-aliased fonts by default, despite the capability of Swing to provide them. How can you coerce an arbitrary java application to use AA fonts? (both for applications I'm running, and applications I'm developing)</p>
| [
{
"answer_id": 179971,
"author": "rcreswick",
"author_id": 3446,
"author_profile": "https://Stackoverflow.com/users/3446",
"pm_score": 7,
"selected": true,
"text": " // enable anti-aliased text:\n System.setProperty(\"awt.useSystemAAFontSettings\",\"on\");\n -Dawt.useSystemAAFontSettin... | 2008/10/07 | [
"https://Stackoverflow.com/questions/179955",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3446/"
] |
179,969 | <p>We are migrating our test report data (unit, regression, integration, etc..) from an XML format to a database format for better analysis. Right now the majority of our test analysis is done using the CruiseControl.NET dashboard, but this is limited to primarily the most recent test data. Older test data can be acces... | [
{
"answer_id": 1797104,
"author": "O. Jones",
"author_id": 205608,
"author_profile": "https://Stackoverflow.com/users/205608",
"pm_score": 0,
"selected": false,
"text": " select * \n from test \n where failed='yes' \n order by testno, date desc\n select max(date), min(date), testno \... | 2008/10/07 | [
"https://Stackoverflow.com/questions/179969",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13688/"
] |
179,985 | <p>We have a database library in C# that we can use like this:</p>
<pre><code>DatabaseConnection conn = DatabaseConnection.FromConnectionString("...");
</code></pre>
<p>This library hides many of the differences between different database engines, like SQL function names, parameter names and specifications, etc.</p>
... | [
{
"answer_id": 180009,
"author": "Andru Luvisi",
"author_id": 5922,
"author_profile": "https://Stackoverflow.com/users/5922",
"pm_score": 4,
"selected": true,
"text": "class class1:\n def greet(self):\n print \"hi\"\n\nclass class2:\n def greet(self):\n print \"hello\"\n\nmaker =... | 2008/10/07 | [
"https://Stackoverflow.com/questions/179985",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/267/"
] |
179,987 | <p>I am in a situation where I must update an existing database structure from varchar to nvarchar using a script. Since this script is run everytime a configuration application is run, I would rather determine if a column has already been changed to nvarchar and not perform an alter on the table. The databases which... | [
{
"answer_id": 180022,
"author": "Peter",
"author_id": 5189,
"author_profile": "https://Stackoverflow.com/users/5189",
"pm_score": 3,
"selected": true,
"text": "IF EXISTS \n (SELECT *\n FROM sysobjects syo\n JOIN syscolumns syc ON\n syc.id = syo.id\n JOIN systypes syt ON\n ... | 2008/10/07 | [
"https://Stackoverflow.com/questions/179987",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4441/"
] |
179,988 | <p>Wanted to see peoples thoughts on best way to organize directory and project structure on a project / solution for a winforms C# app. </p>
<p>Most people agree its best to seperate view, business logic, data objects, interfaces but wanted to see how different people tackle this. In addition, isolate third party d... | [
{
"answer_id": 180029,
"author": "Bill",
"author_id": 14547,
"author_profile": "https://Stackoverflow.com/users/14547",
"pm_score": 0,
"selected": false,
"text": "\\XCENT\n\\XCENT\\App1\n\\XCENT\\App1\\UI\n\\XCENT\\App1\\UI\\Test //test harness for UI\n\\XCENT\\App1\\Data\n\\XCENT\\App1\... | 2008/10/07 | [
"https://Stackoverflow.com/questions/179988",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4653/"
] |
180,003 | <p>I would like a code sample for a function that takes a tDateTime and an integer as input and sets the system time using setlocaltime after advancing that tDateTime by (int) months. The time should stay the same.</p>
<p>pseudo code example</p>
<pre><code>SetNewTime(NOW,2);
</code></pre>
<p>The issues I'm running i... | [
{
"answer_id": 180065,
"author": "JosephStyons",
"author_id": 672,
"author_profile": "https://Stackoverflow.com/users/672",
"pm_score": 4,
"selected": true,
"text": "program OneMonth;\n\n{$APPTYPE CONSOLE}\n\nuses\n SysUtils,\n Windows,\n Messages;\n\nprocedure SetLocalSystemTime(sett... | 2008/10/07 | [
"https://Stackoverflow.com/questions/180003",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/172/"
] |
180,005 | <p>This Linq to SQL query ...</p>
<pre><code> Return (From t In Db.Concessions Where t.Country = "ga" Select t.ConcessionID, t.Title, t.Country)
</code></pre>
<p>... is generating this SQL:</p>
<pre><code>SELECT [t0].[ConcessionID], [t0].[Title], [t0].[Country]
FROM [dbo].[Concessions] AS [t0]
WHERE [t0].[Country... | [
{
"answer_id": 180035,
"author": "Jeff Mc",
"author_id": 25521,
"author_profile": "https://Stackoverflow.com/users/25521",
"pm_score": -1,
"selected": false,
"text": "Select New With {t.ConcessionID, t.Title, t.Country}\n Select t.ConcessionID, t.Title, t.Country\n"
},
{
"answer_... | 2008/10/07 | [
"https://Stackoverflow.com/questions/180005",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/239663/"
] |
180,007 | <p>How would you configure/handle extraneous/optional URLs entities (aliases, maybe)?</p>
<p>SO is a good example:</p>
<ul>
<li>stackoverflow.com/questions/99999999/</li>
<li>stackoverflow.com/questions/99999999/<strong>question-goes-here</strong> (bad example, but I couldn't think of better)</li>
</ul>
<p>Amazon UR... | [
{
"answer_id": 180068,
"author": "eyelidlessness",
"author_id": 17964,
"author_profile": "https://Stackoverflow.com/users/17964",
"pm_score": 1,
"selected": false,
"text": "RewriteRule ^([^\\/]+)\\/([^\\/]+)\\/(.*) index.php?controller=$1&view=$2&args=$3\n"
}
] | 2008/10/07 | [
"https://Stackoverflow.com/questions/180007",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15031/"
] |
180,030 | <p>In windows XP "FileInfo.LastWriteTime" will return the date a picture is taken - regardless of how many times the file is moved around in the filesystem.</p>
<p>In Vista it instead returns the date that the picture is copied from the camera.</p>
<p>How can I find out when a picture is taken in Vista? In windows ex... | [
{
"answer_id": 180455,
"author": "sepang",
"author_id": 25930,
"author_profile": "https://Stackoverflow.com/users/25930",
"pm_score": 4,
"selected": false,
"text": "Image myImage = Image.FromFile(@\"C:\\temp\\IMG_0325.JPG\");\nPropertyItem propItem = myImage.GetPropertyItem(306);\nDateTi... | 2008/10/07 | [
"https://Stackoverflow.com/questions/180030",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/25930/"
] |
180,032 | <p>Right now, I have a SQL Query like this one:</p>
<pre><code>SELECT X, Y FROM POINTS
</code></pre>
<p>It returns results like so:</p>
<pre><code>X Y
----------
12 3
15 2
18 12
20 29
</code></pre>
<p>I'd like to return results all in one row, like this (suitable for using in an HTML <AREA> tag):</... | [
{
"answer_id": 180053,
"author": "Peter",
"author_id": 5189,
"author_profile": "https://Stackoverflow.com/users/5189",
"pm_score": 1,
"selected": false,
"text": "DECLARE @s VarChar(8000)\nSET @s = ''\n\nSELECT @s = @s + ',' + CAST(X AS VarChar) + ',' + CAST(Y AS VarChar) \nFROM POINTS\n\... | 2008/10/07 | [
"https://Stackoverflow.com/questions/180032",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8409/"
] |
180,052 | <p>Is it possible to check out subdirectories of a repository in Git?</p>
<p>Imagine I am setting up a new WordPress installation. I will create two new directories for my plugin and theme customization:</p>
<ul>
<li><code>wordpress/wp-content/plugins/myplugins/</code> </li>
<li><code>wordpress/wp-content/themes/myth... | [
{
"answer_id": 180150,
"author": "Aristotle Pagaltzis",
"author_id": 9410,
"author_profile": "https://Stackoverflow.com/users/9410",
"pm_score": 4,
"selected": false,
"text": "mytheme myplugins"
},
{
"answer_id": 184675,
"author": "Pat Notz",
"author_id": 825,
"author... | 2008/10/07 | [
"https://Stackoverflow.com/questions/180052",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7675/"
] |
180,064 | <p>Error message:</p>
<blockquote>
<p>fatal: git checkout: updating paths is incompatible with switching branches/forcing</p>
</blockquote>
<p>How to get past this Git checkout error?</p>
| [
{
"answer_id": 180229,
"author": "Aristotle Pagaltzis",
"author_id": 9410,
"author_profile": "https://Stackoverflow.com/users/9410",
"pm_score": 3,
"selected": true,
"text": "git checkout HEAD $blah git checkout $blah"
},
{
"answer_id": 414223,
"author": "Community",
"aut... | 2008/10/07 | [
"https://Stackoverflow.com/questions/180064",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
180,075 | <p>If I create a Stored Procedure in SQL and call it (<code>EXEC spStoredProcedure</code>) within the BEGIN/END TRANSACTION, does this other stored procedure also fall into the transaction?</p>
<p>I didn't know if it worked like try/catches in C#.</p>
| [
{
"answer_id": 180195,
"author": "Miles",
"author_id": 21828,
"author_profile": "https://Stackoverflow.com/users/21828",
"pm_score": 4,
"selected": false,
"text": " BEGIN TRY\n BEGIN TRANSACTION\n\n DO SOMETHING\n\n COMMIT\n END TRY\n BEGIN CATCH\n IF @@TR... | 2008/10/07 | [
"https://Stackoverflow.com/questions/180075",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/21828/"
] |
180,095 | <p>I've written a simple multi-threaded game server in python that creates a new thread for each client connection. I'm finding that every now and then, the server will crash because of a broken-pipe/SIGPIPE error. I'm pretty sure it is happening when the program tries to send a response back to a client that is no l... | [
{
"answer_id": 180152,
"author": "S.Lott",
"author_id": 10661,
"author_profile": "https://Stackoverflow.com/users/10661",
"pm_score": 6,
"selected": true,
"text": "try:\n # do something\nexcept socket.error, e:\n # A socket error\nexcept IOError, e:\n if e.errno == errno.EPIPE:\... | 2008/10/07 | [
"https://Stackoverflow.com/questions/180095",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/24208/"
] |
180,097 | <p>I need to make some reflective method calls in Java. Those calls will include methods that have arguments that are primitive types (int, double, etc.). The way to specify such types when looking up the method reflectively is int.class, double.class, etc.</p>
<p>The challenge is that I am accepting input from an out... | [
{
"answer_id": 180139,
"author": "Daniel Spiewak",
"author_id": 9815,
"author_profile": "https://Stackoverflow.com/users/9815",
"pm_score": 5,
"selected": false,
"text": "Class int.class Integer.TYPE TYPE forName Class clazz = Class.forName(\"java.lang.Integer\");\nClass intClass = clazz... | 2008/10/07 | [
"https://Stackoverflow.com/questions/180097",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3005/"
] |
180,103 | <p>I am using some nested layouts in Ruby on Rails, and in one of the layouts i have a need to read in a string from a div and set that as the title of the document. What is correct way (if any) to set the title of the document?</p>
<pre><code><script type="text/javascript">
$(document).ready(function() {
/... | [
{
"answer_id": 180118,
"author": "cllpse",
"author_id": 20946,
"author_profile": "https://Stackoverflow.com/users/20946",
"pm_score": 5,
"selected": false,
"text": "$(document).ready(function ()\n{\n document.title = \"Hello World!\";\n});\n $(function ()\n{\n // this is a shorthan... | 2008/10/07 | [
"https://Stackoverflow.com/questions/180103",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18811/"
] |
180,107 | <p>I have an HTML wrapper that contains a Flex application, is there an Event that I can listen on, that is triggered when a user leaves the HTML wrapper either by navigation arrows or closing the browser?</p>
<p>Thanks. </p>
| [
{
"answer_id": 180219,
"author": "eyelidlessness",
"author_id": 17964,
"author_profile": "https://Stackoverflow.com/users/17964",
"pm_score": 1,
"selected": false,
"text": "window.onbeforeunload = function(e) {\n // Browser will pop up a confirmation dialog, with some text before\n ... | 2008/10/07 | [
"https://Stackoverflow.com/questions/180107",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1638/"
] |
180,119 | <p>I recently started working on a small game for my own amusement, using Microsoft XNA and C#. My question is in regards to designing a game object and the objects that inherit it. I'm going to define a game object as something that can be rendered on screen. So for this, I decided to make a base class which all other... | [
{
"answer_id": 180382,
"author": "Parappa",
"author_id": 9974,
"author_profile": "https://Stackoverflow.com/users/9974",
"pm_score": 1,
"selected": false,
"text": "// main loop\nwhile (true) {\n ProcessInput(); // handle input events\n UpdateGameWorld(); // update game objects\n ... | 2008/10/07 | [
"https://Stackoverflow.com/questions/180119",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19649/"
] |
180,158 | <ol>
<li>How do I get a method's execution time? </li>
<li>Is there a <code>Timer</code> utility class for things like timing how long a task takes, etc? </li>
</ol>
<p>Most of the searches on Google return results for timers that schedule threads and tasks, which is not what I want.</p>
| [
{
"answer_id": 180179,
"author": "MBCook",
"author_id": 18189,
"author_profile": "https://Stackoverflow.com/users/18189",
"pm_score": 8,
"selected": false,
"text": "long startTime = System.currentTimeMillis();\n\ndoReallyLongThing();\n\nlong endTime = System.currentTimeMillis();\n\nSyste... | 2008/10/07 | [
"https://Stackoverflow.com/questions/180158",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13140/"
] |
180,172 | <p>Is there any good reason that an empty set of round brackets (parentheses) isn't valid for calling the default constructor in C++?</p>
<pre><code>MyObject object; // ok - default ctor
MyObject object(blah); // ok
MyObject object(); // error
</code></pre>
<p>I seem to type "()" automatically everytime. Is the... | [
{
"answer_id": 180185,
"author": "Nemanja Trifunovic",
"author_id": 8899,
"author_profile": "https://Stackoverflow.com/users/8899",
"pm_score": 6,
"selected": false,
"text": "object MyObject"
},
{
"answer_id": 180189,
"author": "1800 INFORMATION",
"author_id": 3146,
"... | 2008/10/07 | [
"https://Stackoverflow.com/questions/180172",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10897/"
] |
180,211 | <p>To make click-able divs, I do:</p>
<pre><code><div class="clickable" url="http://google.com">
blah blah
</div>
</code></pre>
<p>and then </p>
<pre><code>$("div.clickable").click(
function()
{
window.location = $(this).attr("url");
});
</code></pre>
<p>I don't know if this is the best way, but... | [
{
"answer_id": 180246,
"author": "Sergey Ilinsky",
"author_id": 23815,
"author_profile": "https://Stackoverflow.com/users/23815",
"pm_score": 3,
"selected": false,
"text": "\n$(\"div.clickable\").click(\nfunction(event)\n{\n window.location = $(this).attr(\"url\");\n event.preventD... | 2008/10/07 | [
"https://Stackoverflow.com/questions/180211",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2721/"
] |
180,242 | <p>We are making a Ruby On Rails webapp where every customer gets their own database.<br>
The database needs to be created after they fill out a form on our website.</p>
<p>We have a template database that has all of the tables and columns that we need to copy. How can I do this in programatically from ruby on rails?... | [
{
"answer_id": 180282,
"author": "Tilendor",
"author_id": 1470,
"author_profile": "https://Stackoverflow.com/users/1470",
"pm_score": 4,
"selected": true,
"text": " def copy_template_database\n template_name = \"customerdb1\" # Database to copy from\n new_name = \"temp\" #d... | 2008/10/07 | [
"https://Stackoverflow.com/questions/180242",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1470/"
] |
180,245 | <p>I have this CheckBoxList on a page:</p>
<pre><code><asp:checkboxlist runat="server" id="Locations" datasourceid="LocationsDatasource"
datatextfield="CountryName" datavaluefield="CountryCode" />
</code></pre>
<p>I'd like to loop through the checkbox elements on the client using Javascript and grab the valu... | [
{
"answer_id": 222147,
"author": "rjarmstrong",
"author_id": 25809,
"author_profile": "https://Stackoverflow.com/users/25809",
"pm_score": 2,
"selected": false,
"text": "<asp:Repeater ID=\"rptItems\" runat=\"server\" DataSourceID=\"odsDataSource\">\n<ItemTemplate>\n<input id=\"iptCheckBo... | 2008/10/07 | [
"https://Stackoverflow.com/questions/180245",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/239663/"
] |
180,266 | <p>How do you think, is it a good idea to have such an enum:</p>
<pre><code>enum AvailableSpace {
Percent10,
Percent20,
SqF500,
SqF600
}
</code></pre>
<p>The question is about the semantics of the values names, i.e. both percentage and square feet. I really believe that it's not a good idea, but I could n... | [
{
"answer_id": 180284,
"author": "Chris Wenham",
"author_id": 5548,
"author_profile": "https://Stackoverflow.com/users/5548",
"pm_score": 3,
"selected": false,
"text": "public enum OperatingSystem\n{\n Windows95,\n Windows98,\n Windows2000,\n WindowsXP,\n WindowsVista,\n ... | 2008/10/07 | [
"https://Stackoverflow.com/questions/180266",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8220/"
] |
180,272 | <p>Is it even possible?</p>
<p>Basically, there's a remote repository from which I pull using just:</p>
<pre><code>git pull
</code></pre>
<p>Now, I'd like to preview what this pull would change (a diff) without touching anything on my side. The reason is that thing I'm pulling might not be "good" and I want someone ... | [
{
"answer_id": 180329,
"author": "Brian Gianforcaro",
"author_id": 3415,
"author_profile": "https://Stackoverflow.com/users/3415",
"pm_score": 6,
"selected": false,
"text": "git fetch http://host.xz/path/to/repo.git/ \n git log origin \n git merge origin\n git log -p //log with diff\n"
... | 2008/10/07 | [
"https://Stackoverflow.com/questions/180272",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14690/"
] |
180,283 | <p>I've got an ASP.NET page that has a bunch of controls that need to be populated (e.g. dropdown lists).</p>
<p>I'd like to make a single trip to the db and bring back multiple recordsets instead of making a round-trip for each control.</p>
<p>I could bring back multiple tables in a DataSet, or I could bring back a ... | [
{
"answer_id": 180650,
"author": "wprl",
"author_id": 17847,
"author_profile": "https://Stackoverflow.com/users/17847",
"pm_score": 2,
"selected": false,
"text": "DataReader DataReader DataTable DataSet DataSet DataReader"
},
{
"answer_id": 4222922,
"author": "Shiv Kumar",
... | 2008/10/07 | [
"https://Stackoverflow.com/questions/180283",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6624/"
] |
180,297 | <p>I'm learning Java and I'm wondering what everyone's Java rules are. The rules that you know intrinsically and if you see someone breaking them you try to correct them. Things to keep you out of trouble or help improve things. Things you should never do. Things you should always do. The rules that a beginner woul... | [
{
"answer_id": 180357,
"author": "Jon Schneider",
"author_id": 12484,
"author_profile": "https://Stackoverflow.com/users/12484",
"pm_score": 3,
"selected": false,
"text": "== .equals() (string1 == string2) string1 string2"
},
{
"answer_id": 180376,
"author": "Synoli",
"au... | 2008/10/07 | [
"https://Stackoverflow.com/questions/180297",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
180,320 | <p>I've been programming in C++ for a few years, and I've used STL quite a bit and have created my own template classes a few times to see how it's done.</p>
<p>Now I'm trying to integrate templates deeper into my OO design, and a nagging thought keeps coming back to me: They're just a macros, really... You could impl... | [
{
"answer_id": 180539,
"author": "Jeff B",
"author_id": 25879,
"author_profile": "https://Stackoverflow.com/users/25879",
"pm_score": 5,
"selected": false,
"text": "template<int d,int t> class Unit\n{\n double value;\npublic:\n Unit(double n)\n {\n value = n;\n }\n ... | 2008/10/07 | [
"https://Stackoverflow.com/questions/180320",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1737/"
] |
180,330 | <p>I've got a save dialog box which pops up when i press a button. However i dont want to save a file at that point, i want to take the name and place it in the text box next to the button, for the name to be used later. </p>
<p>Can anybody tell me how to obtain the file path from the save dialog box to use it later?<... | [
{
"answer_id": 180332,
"author": "Patrick Desjardins",
"author_id": 13913,
"author_profile": "https://Stackoverflow.com/users/13913",
"pm_score": 7,
"selected": true,
"text": "SaveFileDialog saveFileDialog1 = new SaveFileDialog(); \nsaveFileDialog1.InitialDirectory = Convert.ToString(Env... | 2008/10/07 | [
"https://Stackoverflow.com/questions/180330",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14441/"
] |
180,349 | <p>In our program, each customer gets their own database. We e-mail them a link that connects them to their database. The link contains a GUID that lets the program know which database to connect to.</p>
<p>How do I dynamically and programatically connect ActiveRecord to the right db?</p>
| [
{
"answer_id": 180355,
"author": "Tilendor",
"author_id": 1470,
"author_profile": "https://Stackoverflow.com/users/1470",
"pm_score": 4,
"selected": false,
"text": " ActiveRecord::Base.establish_connection({:adapter => \"mysql\", :database => new_name, :host => \"olddev\",\n :username... | 2008/10/07 | [
"https://Stackoverflow.com/questions/180349",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1470/"
] |
180,358 | <p>I'm a pretty experienced Java programmer that's been doing quite a bit of Win32 stuff in the last couple of years. Mainly I've been using VB6, but I really need to move to something better.</p>
<p>I've spent a month or so playing with Delphi 2009. I like the VCL GUI stuff, Delphi seems more suited to Windows API ... | [
{
"answer_id": 180449,
"author": "Tim Jarvis",
"author_id": 10387,
"author_profile": "https://Stackoverflow.com/users/10387",
"pm_score": 3,
"selected": false,
"text": "MyObj = TMyObj.Create;\n\ntry\n MyObj.DoSomething;\nfinally\n MyObj.Free;\nend\n"
}
] | 2008/10/07 | [
"https://Stackoverflow.com/questions/180358",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11961/"
] |
180,363 | <p>I have a custom control that I created for my project. In this control there are several child controls like a Label, a PictureBox, and a LinkLabel. Other then the LinkLabel, I want the mouse over event currently on the parent control and have the control respond to the mouse over. The background color changes when ... | [
{
"answer_id": 180490,
"author": "Fox Diller",
"author_id": 24017,
"author_profile": "https://Stackoverflow.com/users/24017",
"pm_score": 1,
"selected": false,
"text": "private void Control_Click(object sender, EventArgs e)\n{\n // this is the parent control.\n InvokeOnClick(this, ... | 2008/10/07 | [
"https://Stackoverflow.com/questions/180363",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/24017/"
] |
180,366 | <p>I have a Page that has a single instance of a UserControl that itself has a single UpdatePanel. Inside the UpdatePanel are several Button controls. The Click event for these controls are wired up in the code-behind, in the Init event of the UserControl.</p>
<p>I get the Click event for the first button I push, ev... | [
{
"answer_id": 4248741,
"author": "Orson",
"author_id": 207756,
"author_profile": "https://Stackoverflow.com/users/207756",
"pm_score": 0,
"selected": false,
"text": "LinkButton dgPatients_ItemDataBound PostBackUrl LinkButton HyperLink"
}
] | 2008/10/07 | [
"https://Stackoverflow.com/questions/180366",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/35/"
] |
180,370 | <p>I am aware of the <a href="http://msdn.microsoft.com/en-us/library/system.timezone(VS.80).aspx" rel="noreferrer">System.TimeZone</a> class as well as the many uses of the <a href="http://msdn.microsoft.com/en-us/library/system.datetime.tostring(VS.80).aspx" rel="noreferrer">DateTime.ToString()</a> method. What I ha... | [
{
"answer_id": 180559,
"author": "Gerald",
"author_id": 19404,
"author_profile": "https://Stackoverflow.com/users/19404",
"pm_score": 0,
"selected": false,
"text": "string[] words = tzname.Split(\" \".ToCharArray());\nstring tzabbr = \"\";\nforeach (string word in words)\n tzabbr += wo... | 2008/10/07 | [
"https://Stackoverflow.com/questions/180370",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7290/"
] |
180,373 | <p>Is there any way instead of a JS hack where I can post from an iframe to another page outside the iframe?</p>
<p>the iframe is posting data to a 3rd party and then just responding back with a URL which is the redirection URl thus we cannot set the form target. We are PCI compliant and thus we cannot use <code>windo... | [
{
"answer_id": 180387,
"author": "Greg",
"author_id": 24181,
"author_profile": "https://Stackoverflow.com/users/24181",
"pm_score": 0,
"selected": false,
"text": "<form>"
},
{
"answer_id": 180390,
"author": "tpower",
"author_id": 18107,
"author_profile": "https://Stac... | 2008/10/07 | [
"https://Stackoverflow.com/questions/180373",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/24958/"
] |
180,398 | <p>I'd like to have it yell hooray whenever an assert statement succeeds, or at the very least have it display the number of successful assert statements that were encountered.</p>
<p>I'm using JUnit4.</p>
<p>Any suggestions?</p>
| [
{
"answer_id": 10710348,
"author": "rzrelyea",
"author_id": 1241450,
"author_profile": "https://Stackoverflow.com/users/1241450",
"pm_score": 4,
"selected": false,
"text": "<junit showoutput=\"true\" printsummary=\"on\" enabletestlistenerevents=\"true\" fork=\"@{fork}\" forkmode=\"once\"... | 2008/10/07 | [
"https://Stackoverflow.com/questions/180398",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2443/"
] |
180,401 | <p>I've recently decided that I just have to finally learn C/C++, and there is one thing I do not really understand about pointers or more precisely, their definition.</p>
<p>How about these examples:</p>
<ol>
<li><code>int* test;</code></li>
<li><code>int *test;</code></li>
<li><code>int * test;</code></li>
<li><cod... | [
{
"answer_id": 180409,
"author": "Milan Babuškov",
"author_id": 14690,
"author_profile": "https://Stackoverflow.com/users/14690",
"pm_score": 8,
"selected": true,
"text": "int *test, *test2;\n int* test;\nint* test2;\n"
},
{
"answer_id": 180417,
"author": "1800 INFORMATION",
... | 2008/10/07 | [
"https://Stackoverflow.com/questions/180401",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/91/"
] |
180,405 | <p>I've got a User table with a bitmask that contains the user's roles. The linq query below returns all the users whose roles include 1, 4 or 16. </p>
<pre><code>var users = from u in dc.Users
where ((u.UserRolesBitmask & 1) == 1)
|| ((u.UserRolesBitmask & 4) == 4)
||... | [
{
"answer_id": 180447,
"author": "Dylan Beattie",
"author_id": 5017,
"author_profile": "https://Stackoverflow.com/users/5017",
"pm_score": 2,
"selected": false,
"text": "private List<User> GetUsersFromRoles(uint[] UserRoles) {\n uint roleMask = 0;\n for (var i = 0; i < UserRoles.Le... | 2008/10/07 | [
"https://Stackoverflow.com/questions/180405",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14072/"
] |
180,422 | <p>I'm trying to determine which records to delete from a database when a user submits a form.
The page has two CheckBoxList one representing the records before modification and one after.</p>
<p>I can easily get the selected values that need to be deleted like this...</p>
<pre><code>//get the items not selected that... | [
{
"answer_id": 180706,
"author": "Lucas",
"author_id": 24231,
"author_profile": "https://Stackoverflow.com/users/24231",
"pm_score": 3,
"selected": true,
"text": "var itemsToDelete = from specialNeed in db.SpecialNeeds\n where oldSelectedItems.Contains(specialNeed.Spec... | 2008/10/07 | [
"https://Stackoverflow.com/questions/180422",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6161/"
] |
180,430 | <p>I'm refactoring some PHP code and discovered that certain nested combinations of </p>
<pre><code>if () :
</code></pre>
<p>and </p>
<pre><code>if () {
</code></pre>
<p>generate syntax errors. Not that I would normally mix the two, but I like to do frequent syntax checks as I'm writing code and I kept getting a s... | [
{
"answer_id": 180507,
"author": "I GIVE CRAP ANSWERS",
"author_id": 25083,
"author_profile": "https://Stackoverflow.com/users/25083",
"pm_score": 3,
"selected": true,
"text": "else else endif if"
},
{
"answer_id": 180995,
"author": "dmazzoni",
"author_id": 7193,
"aut... | 2008/10/07 | [
"https://Stackoverflow.com/questions/180430",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/24190/"
] |
180,451 | <p>Using answers to <a href="https://stackoverflow.com/questions/57522/javascript-array-with-a-mix-of-literals-and-arrays">this question</a>, I have been able to populate a select box based on the selection of another select box. ( <a href="https://stackoverflow.com/questions/57522/javascript-array-with-a-mix-of-litera... | [
{
"answer_id": 180926,
"author": "Marko Dumic",
"author_id": 5817,
"author_profile": "https://Stackoverflow.com/users/5817",
"pm_score": 7,
"selected": true,
"text": "var carMakers = [\n { name: 'Honda', models: [\n { name: 'Accord', features: ['2dr', '4dr'] },\n ... | 2008/10/07 | [
"https://Stackoverflow.com/questions/180451",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2755/"
] |
180,452 | <p>I have a c# form (let's call it MainForm) with a number of custom controls on it. I'd like to have the MainForm.OnClick() method fire anytime someone clicks on the form regardless of whether the click happened on the form or if the click was on one of the custom controls. I'm looking for behavior similar to the KeyP... | [
{
"answer_id": 180558,
"author": "Community",
"author_id": -1,
"author_profile": "https://Stackoverflow.com/users/-1",
"pm_score": 3,
"selected": true,
"text": "Private Sub Example_ControlAdded(ByVal sender As Object, ByVal e As System.Windows.Forms.ControlEventArgs) Handles Me.ControlAd... | 2008/10/07 | [
"https://Stackoverflow.com/questions/180452",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2191/"
] |
180,464 | <p>I'm running PHP on Windows/IIS.</p>
<p>My session variables don't seem to be preserved from page-to-page.</p>
<p>This code…</p>
<pre><code>//echos out the session variables in a nice format for inspection
echo "<p><pre>";
print_r($_SESSION);
echo "</pre></p>";
</code></pre>
<p>&hel... | [
{
"answer_id": 180486,
"author": "Owen",
"author_id": 4853,
"author_profile": "https://Stackoverflow.com/users/4853",
"pm_score": 1,
"selected": false,
"text": "session_start() save_path session_start()"
},
{
"answer_id": 180495,
"author": "Zack Peterson",
"author_id": 83... | 2008/10/07 | [
"https://Stackoverflow.com/questions/180464",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/83/"
] |
180,470 | <p>Right now our test and production databases are on the same server, but with different names. Deploying has meant editing Web.config to change all the connection strings for the correct database. A step which I forget all too frequently... </p>
<p>We've finally created a new database server for testing, and I'm m... | [
{
"answer_id": 180502,
"author": "John Sheehan",
"author_id": 1786,
"author_profile": "https://Stackoverflow.com/users/1786",
"pm_score": 3,
"selected": false,
"text": "<Target Name=\"AfterBuild\">\n <Copy Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \" SourceFiles=... | 2008/10/07 | [
"https://Stackoverflow.com/questions/180470",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17145/"
] |
180,516 | <p>I have roughly the following code. Could this be made nicer or more efficient? Perhaps using <code>std::remove_if</code>? Can you remove items from the map while traversing it? Can we avoid using the temporary map?</p>
<pre><code>typedef std::map<Action, What> Actions;
static Actions _actions;
bool expired(c... | [
{
"answer_id": 180616,
"author": "Mark Ransom",
"author_id": 5987,
"author_profile": "https://Stackoverflow.com/users/5987",
"pm_score": 6,
"selected": true,
"text": "Actions::iterator it = _actions.begin();\nwhile (it != _actions.end())\n{\n if (expired(*it))\n {\n bar(*it);\n A... | 2008/10/07 | [
"https://Stackoverflow.com/questions/180516",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3146/"
] |
180,518 | <p>I've just discovered that Oracle lets you do the following:</p>
<pre><code>SELECT foo.a, (SELECT c
FROM bar
WHERE foo.a = bar.a)
from foo
</code></pre>
<p>As long as only one row in bar matches any row in foo.</p>
<p>The explain plan I get from PL/SQL developer is this:</p>
<pre>... | [
{
"answer_id": 180588,
"author": "WW.",
"author_id": 14663,
"author_profile": "https://Stackoverflow.com/users/14663",
"pm_score": 3,
"selected": true,
"text": "--------------------------------------------------------------------------\n| Id | Operation | Name | Rows | Bytes | ... | 2008/10/07 | [
"https://Stackoverflow.com/questions/180518",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15962/"
] |
180,549 | <p>Being an aspiring Apple developer, I want to get the opinions of the community if it is better to learn C first before moving into Objective-C and ultimately the Cocoa Framework?</p>
<p>My gut says learn C, which will give me a good foundation.</p>
| [
{
"answer_id": 3681154,
"author": "Sven",
"author_id": 431526,
"author_profile": "https://Stackoverflow.com/users/431526",
"pm_score": 1,
"selected": false,
"text": "NSString *string = [[NSString alloc] init];\nstring = @\"something\";\n"
}
] | 2008/10/07 | [
"https://Stackoverflow.com/questions/180549",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8804/"
] |
180,563 | <p>I'd like to bold the text for a tab page under certain conditions (not, necessarily, GotFocus). Is it true the only 'er easiest way to do this is by overriding the DrawItem event for the tab control?</p>
<p><a href="http://www.vbforums.com/showthread.php?t=355093" rel="noreferrer">http://www.vbforums.com/showthrea... | [
{
"answer_id": 180637,
"author": "John Rudy",
"author_id": 14048,
"author_profile": "https://Stackoverflow.com/users/14048",
"pm_score": 3,
"selected": false,
"text": "tabControl.TabPages(index).Font = New Font(Me.Font, FontStyle.Bold)\n tabControl.Font = New Font(Me.Font, FontStyle.Bold... | 2008/10/07 | [
"https://Stackoverflow.com/questions/180563",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/81/"
] |
180,572 | <p>My situation is as follows:</p>
<p>I have a normalized database, in which I hold geographic information about airports. The structure is:</p>
<pre><code>airport --is in--> city --is in--> country --is in--> continent
</code></pre>
<p>Now I want to let users administrate this data, without giving them dir... | [
{
"answer_id": 184512,
"author": "Ed Greaves",
"author_id": 26262,
"author_profile": "https://Stackoverflow.com/users/26262",
"pm_score": 4,
"selected": true,
"text": "<insert airport=\"JFK\" city=\"New York\" country=\"USA\" continent=\"North America\" />\n <insert URL=\"airport?city=Ch... | 2008/10/07 | [
"https://Stackoverflow.com/questions/180572",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/25253/"
] |
180,601 | <p>My style of coding includes the following idiom:</p>
<pre><code>class Derived : public Base
{
public :
typedef Base super; // note that it could be hidden in
// protected/private section, instead
// Etc.
} ;
</code></pre>
<p>This enables me to use "super" as ... | [
{
"answer_id": 180613,
"author": "James Hopkin",
"author_id": 11828,
"author_profile": "https://Stackoverflow.com/users/11828",
"pm_score": 2,
"selected": false,
"text": "boost::iterator_adaptor"
},
{
"answer_id": 180627,
"author": "Kristopher Johnson",
"author_id": 1175,... | 2008/10/07 | [
"https://Stackoverflow.com/questions/180601",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14089/"
] |
180,606 | <p>I've got a list in a Python program that contains a series of numbers, which are themselves ASCII values. How do I convert this into a "regular" string that I can echo to the screen?</p>
| [
{
"answer_id": 180615,
"author": "Thomas Wouters",
"author_id": 17624,
"author_profile": "https://Stackoverflow.com/users/17624",
"pm_score": 8,
"selected": true,
"text": ">>> L = [104, 101, 108, 108, 111, 44, 32, 119, 111, 114, 108, 100]\n>>> ''.join(chr(i) for i in L)\n'hello, world'\n... | 2008/10/07 | [
"https://Stackoverflow.com/questions/180606",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19074/"
] |
180,624 | <p>I'm developing a solution which uses an ActiveX control (a commercial one which we bought and that I did not develop). I need to develop the proper installation pages to simulate what happens when a user who has never visited the site and does not have the add-on installed comes to the page.</p>
<p>I've found the "... | [
{
"answer_id": 180640,
"author": "dummy",
"author_id": 6297,
"author_profile": "https://Stackoverflow.com/users/6297",
"pm_score": 4,
"selected": true,
"text": "regsvr32 /u badboy.ocx\n"
},
{
"answer_id": 6303168,
"author": "Prasi",
"author_id": 792300,
"author_profil... | 2008/10/07 | [
"https://Stackoverflow.com/questions/180624",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2577/"
] |
180,626 | <p>I am hosting a service within a Windows Service. </p>
<p>The following snippet instantiates the ServiceHost object:</p>
<pre><code>Host = new ServiceHost(typeof(Services.DocumentInfoService));
</code></pre>
<p>The DocumentInfoService class implements a contract interface that has methods that invoke business obj... | [
{
"answer_id": 180645,
"author": "Mark Cidade",
"author_id": 1659,
"author_profile": "https://Stackoverflow.com/users/1659",
"pm_score": 2,
"selected": false,
"text": "ServiceHost"
}
] | 2008/10/07 | [
"https://Stackoverflow.com/questions/180626",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7961/"
] |
180,629 | <p>I am using VS 2008/C# and binding a local List of helper classes as the DataSource for a DataGridView control. Calling the Remove() method on my List of helper classes fires the CellFormatting event of the DataGridView, which makes sense (a bit). </p>
<p>When removing whatever happens to be the DataBoundItem of t... | [
{
"answer_id": 3862495,
"author": "inam101",
"author_id": 407339,
"author_profile": "https://Stackoverflow.com/users/407339",
"pm_score": 0,
"selected": false,
"text": "private void dgViewItems_RowsRemoved(object sender, DataGridViewRowsRemovedEventArgs e)\n{\n dataAdapter.Update((Da... | 2008/10/07 | [
"https://Stackoverflow.com/questions/180629",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/25971/"
] |
180,638 | <p>My database application is going to be deployed at multiple sites in different time zones.</p>
<p>I need a T-SQL function that will determine the UTC timestamp of midnight on January 1 of the current year for YTD calculations. All of the data is stored in UTC timestamps.</p>
<p>For example, Chicago is UTC-6 with ... | [
{
"answer_id": 180694,
"author": "Ron Savage",
"author_id": 12476,
"author_profile": "https://Stackoverflow.com/users/12476",
"pm_score": 0,
"selected": false,
"text": "(timestamp + (getutcdate() - getdate())) > cast('01/01/2008' as datetime)\n getdate()"
},
{
"answer_id": 180700... | 2008/10/07 | [
"https://Stackoverflow.com/questions/180638",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8785/"
] |
180,647 | <p>I am hoping to find a resource for lining up input elements in a HTML page. I find it difficult to get a select element and a text box to be the same width even when using the width style attribute, and it is even more difficult across browsers. Finally, file inputs seem impossible to get to the same width cross bro... | [
{
"answer_id": 180660,
"author": "Matthew Scharley",
"author_id": 15537,
"author_profile": "https://Stackoverflow.com/users/15537",
"pm_score": 1,
"selected": false,
"text": "input, select {\n width: 100px;\n margin: 0px;\n border: 1px solid;\n}\n"
},
{
"answer_id": 1815... | 2008/10/07 | [
"https://Stackoverflow.com/questions/180647",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18926/"
] |
180,658 | <p>When 'val' below is not a <code>bool</code> I get an exception, I believe I can use <code>TryParse</code> but I'm not sure how best to use it with my code below. Can anyone help?</p>
<pre><code>checkBox.Checked = Convert.ToBoolean(val);
</code></pre>
<p>Thanks</p>
| [
{
"answer_id": 180663,
"author": "Greg Beech",
"author_id": 13552,
"author_profile": "https://Stackoverflow.com/users/13552",
"pm_score": 4,
"selected": false,
"text": "val Checked bool result;\nif (bool.TryParse(val, out result))\n{\n // val does represent a Boolean\n checkBox.Che... | 2008/10/07 | [
"https://Stackoverflow.com/questions/180658",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
180,741 | <p>How do you iterate over each file in a directory with a .bat or .cmd file?</p>
<p>For simplicity please provide an answer that just echoes the filename or file path.</p>
| [
{
"answer_id": 180749,
"author": "Franci Penov",
"author_id": 17028,
"author_profile": "https://Stackoverflow.com/users/17028",
"pm_score": 10,
"selected": true,
"text": "for /f %f in ('dir /b c:\\') do echo %f\n for /f %%f in ('dir /b c:\\') do echo %%f\n for /f for /f \"delims=|\" %%f ... | 2008/10/07 | [
"https://Stackoverflow.com/questions/180741",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3153/"
] |
180,746 | <p>I have an upcoming project which will have to be able to print simple reports from its data. It'll be WPF-based, and I'm wondering which way to go.</p>
<p>I know that WPF introduces its own printing technology (based on XPS) which looks quite easy to use. However, part of me wonders whether it would just be easier ... | [
{
"answer_id": 2830252,
"author": "Ray Burns",
"author_id": 199245,
"author_profile": "https://Stackoverflow.com/users/199245",
"pm_score": 5,
"selected": false,
"text": "DocumentPaginator Dispatcher.BeginInvoke(DispatcherPriority.ApplicationIdle, new Action(() => {} ));"
}
] | 2008/10/07 | [
"https://Stackoverflow.com/questions/180746",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/615/"
] |
180,750 | <p>Is there a way to take substrings of a string with .bat/.cmd files?</p>
<p>For example given the string "hello.txt" is there a way to strip the .txt?</p>
<p>EDIT: Also is there a more general way to do this, not under the assumption that it is a file name or file path?</p>
| [
{
"answer_id": 180766,
"author": "Andrew",
"author_id": 15127,
"author_profile": "https://Stackoverflow.com/users/15127",
"pm_score": 4,
"selected": true,
"text": "test.bat\n----------\necho %~n1 %~n2\n\nc:\\> test.bat myfile.txt my.long.file.bat\n myfile my.long.file\n echo %variable:0... | 2008/10/07 | [
"https://Stackoverflow.com/questions/180750",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3153/"
] |
180,760 | <p>Can someone explain how to use if-then statements and for loops in Makefiles? I can't seem to find any good documentation with examples.</p>
| [
{
"answer_id": 180775,
"author": "Mark Roddy",
"author_id": 9940,
"author_profile": "https://Stackoverflow.com/users/9940",
"pm_score": 4,
"selected": false,
"text": "ifeq ($(strip $(OS)),Linux)\n PYTHON = /usr/bin/python\n FIND = /usr/bin/find\nendif\n"
},
{
"answe... | 2008/10/07 | [
"https://Stackoverflow.com/questions/180760",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2039/"
] |
180,777 | <p>I have a ListBox which displays items of variable height. I want to show as many items as will fit in the available space, without showing a vertical scrollbar. Other than surgery on the ListBox item template, is there a way to only show the number of items which will fit without scrolling?</p>
| [
{
"answer_id": 180824,
"author": "Brian Leahy",
"author_id": 580,
"author_profile": "https://Stackoverflow.com/users/580",
"pm_score": 5,
"selected": true,
"text": " <ListBox ScrollViewer.VerticalScrollBarVisibility=\"Auto\" /> \n"
}
] | 2008/10/07 | [
"https://Stackoverflow.com/questions/180777",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5/"
] |
180,793 | <p>I need to clip out all the occurances of the pattern '--' that are <em>inside</em> single quotes in long string (leaving intact the ones that are outside single quotes). </p>
<p>Is there a RegEx way of doing this?
(using it with an iterator from the language is OK).</p>
<p>For example, starting with</p>
<pre><cod... | [
{
"answer_id": 180837,
"author": "tzot",
"author_id": 6899,
"author_profile": "https://Stackoverflow.com/users/6899",
"pm_score": 0,
"selected": false,
"text": "(?( ) | ) def remove_double_dashes_in_apostrophes(text):\n return \"'\".join(\n part.replace(\"--\", \"\") if (ix&1) else... | 2008/10/07 | [
"https://Stackoverflow.com/questions/180793",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17251/"
] |
180,796 | <p>I have a servlet which is in the same web application as the JSF servlet.
How do I replace (rather than redirect) the servlet response with the JSF response? </p>
| [
{
"answer_id": 180903,
"author": "Martin",
"author_id": 24364,
"author_profile": "https://Stackoverflow.com/users/24364",
"pm_score": 1,
"selected": false,
"text": "public void service(ServletRequest req, ServletResponse res) throws ServletException, IOException {\n // Do stuff\n ... | 2008/10/07 | [
"https://Stackoverflow.com/questions/180796",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
180,809 | <p>Just wondering if there is an easy way to add the functionality to duplicate an existing listing in the admin interface?</p>
<p>In data entry we have run into a situation where a lot of items share generic data with another item, and to save time it would be very nice to quickly duplicate an existing listing and on... | [
{
"answer_id": 180816,
"author": "Harley Holcombe",
"author_id": 1057,
"author_profile": "https://Stackoverflow.com/users/1057",
"pm_score": 8,
"selected": true,
"text": "save_as = True\n"
},
{
"answer_id": 49752122,
"author": "kontextify",
"author_id": 2231950,
"auth... | 2008/10/07 | [
"https://Stackoverflow.com/questions/180809",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/23366/"
] |
180,814 | <p>Here's my situation.</p>
<p>I have a button on my ASP.NET webform. This button creates a new browser window pointing to a page which has a lot of hidden fields (which are dynamically generated). This form submits itself to SQL Reporting Services on the bodies onload event. This works fine and the report is displaye... | [
{
"answer_id": 180826,
"author": "Milan Babuškov",
"author_id": 14690,
"author_profile": "https://Stackoverflow.com/users/14690",
"pm_score": 1,
"selected": false,
"text": "function getReport(excelFormat)\n{\n if (excelFormat)\n document.form1.target = '_blank';\n else\n ... | 2008/10/07 | [
"https://Stackoverflow.com/questions/180814",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/233/"
] |
180,841 | <p>Here are some gems:</p>
<p>Literals:</p>
<pre><code>var obj = {}; // Object literal, equivalent to var obj = new Object();
var arr = []; // Array literal, equivalent to var arr = new Array();
var regex = /something/; // Regular expression literal, equivalent to var regex = new RegExp('something');
</code></pre>
<... | [
{
"answer_id": 180866,
"author": "Chris Noe",
"author_id": 14749,
"author_profile": "https://Stackoverflow.com/users/14749",
"pm_score": 4,
"selected": false,
"text": "==="
},
{
"answer_id": 180867,
"author": "levik",
"author_id": 4465,
"author_profile": "https://Stac... | 2008/10/07 | [
"https://Stackoverflow.com/questions/180841",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17964/"
] |
180,844 | <p>How would you reference the models (Accord, CRV, Prius, etc) in this structure?
Is this a bad structure to be able to extract the makes...then use a make to get the models...then use the model to get the options?</p>
<pre><code>var cars = [
{
"makes" : "Honda",
"models" : [
{'Ac... | [
{
"answer_id": 180850,
"author": "Jonathan Lonowski",
"author_id": 15031,
"author_profile": "https://Stackoverflow.com/users/15031",
"pm_score": 3,
"selected": false,
"text": "cars.Honda.Accord\ncars.Toyota.Prius\n var cars = {\n Honda : {\n Accord : [\"2dr\", \"4dr\"],\n CRV :... | 2008/10/07 | [
"https://Stackoverflow.com/questions/180844",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2755/"
] |
180,853 | <p>What is the maximum length for the text string contained in a CEdit control in MFC? I get a beep when trying to add a character after the character 30001 is this documented anywhere? Can I display longer texts in a CEdit? Should I use another control?</p>
<p>As "Windows programmer" says down below, the text length ... | [
{
"answer_id": 184484,
"author": "rec",
"author_id": 14022,
"author_profile": "https://Stackoverflow.com/users/14022",
"pm_score": 5,
"selected": true,
"text": "CWnd* pWnd = dlg.GetDlgItem(nItemId);\nCEdit *edit = static_cast<CEdit*>(pWnd); //dynamic_cast does not work\nif(edit != 0)\n{\... | 2008/10/07 | [
"https://Stackoverflow.com/questions/180853",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14022/"
] |
180,887 | <p>Sorry if this sounds like a really stupid question, but I need to make a link change colour when you are on the page it links to.</p>
<p>For example, when you are on the "Questions" page of StackOverflow, the link at the top changes colour. How do you do this?</p>
| [
{
"answer_id": 180892,
"author": "John Millikin",
"author_id": 3560,
"author_profile": "https://Stackoverflow.com/users/3560",
"pm_score": 4,
"selected": true,
"text": "class=\"youarehere\""
},
{
"answer_id": 180897,
"author": "John Sheehan",
"author_id": 1786,
"autho... | 2008/10/07 | [
"https://Stackoverflow.com/questions/180887",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/25695/"
] |
180,910 | <p>If a file is set to read only mode, how do I change it to write mode and vice versa from within Emacs?</p>
| [
{
"answer_id": 187917,
"author": "jfm3",
"author_id": 11138,
"author_profile": "https://Stackoverflow.com/users/11138",
"pm_score": 4,
"selected": false,
"text": "C-x C-q toggle-read-only C-x C-f find-file dired C-h i (emacs)dired RET"
},
{
"answer_id": 208787,
"author": "Veb... | 2008/10/08 | [
"https://Stackoverflow.com/questions/180910",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4872/"
] |
180,924 | <p>Working in Eclipse on a Dynamic Web Project (using Tomcat (v5.5) as the app server), is there some way I can configure things so Tomcat will start with security turned on (i.e. as if I ran catalina.sh start -security)?</p>
| [
{
"answer_id": 181401,
"author": "Matt Sheppard",
"author_id": 797,
"author_profile": "https://Stackoverflow.com/users/797",
"pm_score": 4,
"selected": true,
"text": "-Djava.security.manager -Djava.security.policy=\"XXXX\\conf\\catalina.policy\"\n C:\\Program Files\\Apache Software Found... | 2008/10/08 | [
"https://Stackoverflow.com/questions/180924",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/797/"
] |
180,929 | <p>I want to programmatically create a new column in an MS Access table. I've tried many permutations of <code>ALTER TABLE MyTable Add MyField DECIMAL (9,4) NULL;</code> and got: </p>
<blockquote>
<p>Syntax Error in Field Definition</p>
</blockquote>
<p>I can easily create a number field that goes to a <code>Doub... | [
{
"answer_id": 181169,
"author": "Chris OC",
"author_id": 11041,
"author_profile": "https://Stackoverflow.com/users/11041",
"pm_score": 3,
"selected": false,
"text": "ALTER TABLE MyTable\n Add COLUMN MyField DECIMAL (9,4) NULL;\n Dim conn As ADODB.Connection\n\nSet conn = CurrentProject... | 2008/10/08 | [
"https://Stackoverflow.com/questions/180929",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12897/"
] |
180,930 | <p>I am attempting to use linq to shape list of data into a particular shape to be returned as Json from an ajax call.</p>
<p>Given this data:</p>
<pre><code>var data = new List<string>();
data.Add("One");
data.Add("Two");
data.Add("Three");
</code></pre>
<p>And this code: ** Which is not correct and is what n... | [
{
"answer_id": 181169,
"author": "Chris OC",
"author_id": 11041,
"author_profile": "https://Stackoverflow.com/users/11041",
"pm_score": 3,
"selected": false,
"text": "ALTER TABLE MyTable\n Add COLUMN MyField DECIMAL (9,4) NULL;\n Dim conn As ADODB.Connection\n\nSet conn = CurrentProject... | 2008/10/08 | [
"https://Stackoverflow.com/questions/180930",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/410357/"
] |
180,935 | <p>I've got a LOT of tests written for a piece of software (which is a GREAT thing) but it was built essentially as a standalone test in C#. While this works well enough, it suffers from a few shortcomings, not the least of which is that it isn't using a standard testing framework and ends up requiring the person runn... | [
{
"answer_id": 180977,
"author": "Robert Rossney",
"author_id": 19403,
"author_profile": "https://Stackoverflow.com/users/19403",
"pm_score": 3,
"selected": true,
"text": "[Test] Assert [Test]\npublic void MyTest()\n{\n string msg;\n bool result = OldTestClass.MyTest(out msg);\n if... | 2008/10/08 | [
"https://Stackoverflow.com/questions/180935",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7862/"
] |
180,937 | <p>It's my understanding that common wisdom says to only use exceptions for truly exceptional conditions (In fact, I've seen that statement here at SO several times). </p>
<p>However, Krzysztof Cwalina says:</p>
<blockquote>
<blockquote>
<p>One of the biggest misconceptions about exceptions is that they are for... | [
{
"answer_id": 181014,
"author": "coobird",
"author_id": 17172,
"author_profile": "https://Stackoverflow.com/users/17172",
"pm_score": 3,
"selected": false,
"text": "getHeader(File f) FileHeader null null TRUE FALSE FILE_NOT_FOUND FileNotFound DeviceNotReady InvalidUserInput"
}
] | 2008/10/08 | [
"https://Stackoverflow.com/questions/180937",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/781/"
] |
180,947 | <p>Is there a freely available Base64 decoding code snippet in C++?</p>
| [
{
"answer_id": 180949,
"author": "John Millikin",
"author_id": 3560,
"author_profile": "https://Stackoverflow.com/users/3560",
"pm_score": 8,
"selected": true,
"text": "/*\n base64.cpp and base64.h\n\n Copyright (C) 2004-2008 René Nyffenegger\n\n This source code is provided 'as-is... | 2008/10/08 | [
"https://Stackoverflow.com/questions/180947",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19104/"
] |
180,979 | <p>I am getting very frustrated because I cannot seem to figure out why Collections shuffling is not working properly.</p>
<p>Lets say that I am trying to shuffle the <code>randomizer</code> array. </p>
<pre><code>int[] randomizer = new int[] {200,300,212,111,6,2332};
Collections.shuffle(Arrays.asList(randomizer));... | [
{
"answer_id": 180990,
"author": "C. K. Young",
"author_id": 13,
"author_profile": "https://Stackoverflow.com/users/13",
"pm_score": 5,
"selected": true,
"text": "Arrays.asList Integer[] randomizer = new Integer[] {200,300,212,111,6,2332}; \nCollections.shuffle(Arrays.asList(randomizer))... | 2008/10/08 | [
"https://Stackoverflow.com/questions/180979",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14013/"
] |
180,985 | <p>Why does tempuri.org exist? Why does each XML Webservice require its own namespace, unique from any other on the web?</p>
| [
{
"answer_id": 181006,
"author": "Kev",
"author_id": 419,
"author_profile": "https://Stackoverflow.com/users/419",
"pm_score": 6,
"selected": false,
"text": "tempuri.org archive.org [WebService(Namespace=\"http://microsoft.com/webservices/\")]\npublic class MyWebService {\n // implemen... | 2008/10/08 | [
"https://Stackoverflow.com/questions/180985",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7644/"
] |
180,986 | <p>What is the difference between the <code>search()</code> and <code>match()</code> functions in the Python <code>re</code> module?</p>
<p>I've read the <a href="https://docs.python.org/2/library/re.html?highlight=matching%20searching#search-vs-match" rel="nofollow noreferrer">Python 2 documentation</a> (<a href="http... | [
{
"answer_id": 180993,
"author": "nosklo",
"author_id": 17160,
"author_profile": "https://Stackoverflow.com/users/17160",
"pm_score": 10,
"selected": true,
"text": "re.match ^ MatchObject None search() re.search MatchObject None match search match search match search match search '^' '^'... | 2008/10/08 | [
"https://Stackoverflow.com/questions/180986",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4766/"
] |
181,015 | <p>I am just checking out F#, so apologies if this is a silly question, but in the VS2008 F# CTP 1.9.6.2 'Tutorial' project, both // and /// are used for commenting code.</p>
<p>Is there a functional difference between the two slash vs three slash commenting, or is it convention (as it appears in the tutorial code) to... | [
{
"answer_id": 181172,
"author": "Dean Rather",
"author_id": 14966,
"author_profile": "https://Stackoverflow.com/users/14966",
"pm_score": 3,
"selected": false,
"text": "/* comment */ /** documented comment */"
}
] | 2008/10/08 | [
"https://Stackoverflow.com/questions/181015",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5302/"
] |
181,018 | <p>My application has no forms. It runs by calling Application.Run();</p>
| [
{
"answer_id": 181020,
"author": "Haim Bender",
"author_id": 44972,
"author_profile": "https://Stackoverflow.com/users/44972",
"pm_score": 3,
"selected": true,
"text": "System.Windows.Forms.Application.Exit();\n"
},
{
"answer_id": 181098,
"author": "Ryan Taylor",
"author_... | 2008/10/08 | [
"https://Stackoverflow.com/questions/181018",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/44972/"
] |
181,029 | <p>Has anyone been able to implement the JQuery grid plugin, jqGrid? I'm trying to implement the JSON paging, and I feel like I'm getting close, but that I am also being swamped by inconsequential details. If anyone could post some sample code, I would greatly appreciate it.</p>
| [
{
"answer_id": 181072,
"author": "tsimon",
"author_id": 1685,
"author_profile": "https://Stackoverflow.com/users/1685",
"pm_score": 0,
"selected": false,
"text": " [WebMethod]\n [ScriptMethod(ResponseFormat = ResponseFormat.Json)]\n public static object GetData() {\n Test... | 2008/10/08 | [
"https://Stackoverflow.com/questions/181029",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1685/"
] |
181,036 | <p>I'm trying to get this simple PowerShell script working, but I think something is fundamentally wrong. ;-)</p>
<pre><code>ls | ForEach { "C:\Working\tools\custom-tool.exe" $_ }
</code></pre>
<p>I basically want to get files in a directory, and pass them one by one as arguments to the custom tool.</p>
| [
{
"answer_id": 181065,
"author": "slipsec",
"author_id": 1635,
"author_profile": "https://Stackoverflow.com/users/1635",
"pm_score": 6,
"selected": true,
"text": "ls | %{C:\\Working\\tools\\custom-tool.exe $_}\n"
},
{
"answer_id": 182154,
"author": "Jeffery Hicks",
"autho... | 2008/10/08 | [
"https://Stackoverflow.com/questions/181036",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18437/"
] |
181,038 | <p>I installed Ruby and Ruby on Rails yesterday on Vista 32bit using the directions on this site: <a href="http://rubyonrails.org/down" rel="nofollow noreferrer">http://rubyonrails.org/down</a></p>
<p>So I downloaded the installer, then Gems, then I downloaded rails with Gems.</p>
<p>Now I can't use the Gem or Ruby com... | [
{
"answer_id": 181053,
"author": "Kev",
"author_id": 419,
"author_profile": "https://Stackoverflow.com/users/419",
"pm_score": 2,
"selected": false,
"text": "PATH ruby.exe PATH c:\\ruby c:\\ruby\\bin\\"
},
{
"answer_id": 181071,
"author": "Orion Edwards",
"author_id": 234... | 2008/10/08 | [
"https://Stackoverflow.com/questions/181038",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13713/"
] |
181,046 | <p>I am trying to learn some of the basic and advanced features of visual studio, Anyone find sites that have this type of information ?</p>
<p>I see this:</p>
<p><a href="https://stackoverflow.com/questions/86355/best-way-to-learn-visual-studio-power-features">https://stackoverflow.com/questions/86355/best-way-to-le... | [
{
"answer_id": 181053,
"author": "Kev",
"author_id": 419,
"author_profile": "https://Stackoverflow.com/users/419",
"pm_score": 2,
"selected": false,
"text": "PATH ruby.exe PATH c:\\ruby c:\\ruby\\bin\\"
},
{
"answer_id": 181071,
"author": "Orion Edwards",
"author_id": 234... | 2008/10/08 | [
"https://Stackoverflow.com/questions/181046",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3208/"
] |
181,064 | <p>For my current C++ project I need to detect a unique string for every monitor that is connected and active on a large number of computers. </p>
<p>Research has pointed to 2 options</p>
<ol>
<li><p>Use WMI and query the Win32_DesktopMonitor for all active monitors. Use the PNPDeviceID for unique identification of m... | [
{
"answer_id": 183284,
"author": "Head Geek",
"author_id": 12193,
"author_profile": "https://Stackoverflow.com/users/12193",
"pm_score": 0,
"selected": false,
"text": "EnumDisplayDevices"
},
{
"answer_id": 183620,
"author": "akalenuk",
"author_id": 25459,
"author_prof... | 2008/10/08 | [
"https://Stackoverflow.com/questions/181064",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17174/"
] |
181,082 | <p>I have followed all the instructions here: <a href="http://www.tonyspencer.com/2003/10/22/curl-with-php-and-apache-on-windows/" rel="noreferrer">http://www.tonyspencer.com/2003/10/22/curl-with-php-and-apache-on-windows/</a></p>
<p>to install & config apache
get the PHP5 packages
and get the CURL packages.</p>
... | [
{
"answer_id": 181220,
"author": "boxoft",
"author_id": 23773,
"author_profile": "https://Stackoverflow.com/users/23773",
"pm_score": 4,
"selected": false,
"text": ";extension=php_curl.dll ;"
},
{
"answer_id": 526025,
"author": "TrentCoder",
"author_id": 63908,
"autho... | 2008/10/08 | [
"https://Stackoverflow.com/questions/181082",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/196874/"
] |
181,090 | <p>I have a tree of active record objects, something like:</p>
<pre><code>class Part < ActiveRecord::Base
has_many :sub_parts, :class_name => "Part"
def complicated_calculation
if sub_parts.size > 0
return self.sub_parts.inject(0){ |sum, current| sum + current.complicated_calculation }
else... | [
{
"answer_id": 181502,
"author": "Patrick McKenzie",
"author_id": 15046,
"author_profile": "https://Stackoverflow.com/users/15046",
"pm_score": 4,
"selected": true,
"text": "Part.sweep_complicated_cache(some_part) complicated_calculation class Part < ActiveRecord::Base\n has_many :sub_p... | 2008/10/08 | [
"https://Stackoverflow.com/questions/181090",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/23899/"
] |
181,091 | <p>I have an array of hashes, and I want the unique values out of it. Calling <code>Array.uniq</code> doesn't give me what I expect.</p>
<pre><code>a = [{:a => 1},{:a => 2}, {:a => 1}]
a.uniq # => [{:a => 1}, {:a => 2}, {:a => 1}]
</code></pre>
<p>Where I expected:</p>
<pre><code>[{:a => 1},... | [
{
"answer_id": 181096,
"author": "Aaron Hinni",
"author_id": 12086,
"author_profile": "https://Stackoverflow.com/users/12086",
"pm_score": 6,
"selected": true,
"text": "inject a = [{:a => 1},{:a => 2}, {:a => 1}]\na.inject([]) { |result,h| result << h unless result.include?(h); result }\... | 2008/10/08 | [
"https://Stackoverflow.com/questions/181091",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12086/"
] |
181,095 | <p>I would like to extract from a general HTML page, all the text (displayed or not).</p>
<p>I would like to <strong>remove</strong> </p>
<ul>
<li>any HTML tags</li>
<li>Any javascript</li>
<li>Any CSS styles</li>
</ul>
<p>Is there a regular expression (one or more) that will achieve that?</p>
| [
{
"answer_id": 181101,
"author": "Matthew Scharley",
"author_id": 15537,
"author_profile": "https://Stackoverflow.com/users/15537",
"pm_score": 2,
"selected": false,
"text": "!<body.*?>(.*)</body>!smi\n !<script.*?</script>!!smi\n!<[^>]+/[ \\t]*>!!smi\n!</?([a-z]+).*?>!!smi\n/<!--.*?-->/... | 2008/10/08 | [
"https://Stackoverflow.com/questions/181095",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1363/"
] |
181,097 | <p>I wanted to do something like this:</p>
<pre><code><asp:Label ID="lblMyLabel" onclick="lblMyLabel_Click" runat="server">My Label</asp:Label>
</code></pre>
<p>I know that in Javascript I can do:</p>
<pre><code><span onclick="foo();">My Label</span>
</code></pre>
<p>So I'm wondering why I c... | [
{
"answer_id": 181103,
"author": "Brian Kim",
"author_id": 5704,
"author_profile": "https://Stackoverflow.com/users/5704",
"pm_score": 7,
"selected": true,
"text": "lblMyLabel.Attributes.Add(\"onclick\", \"foo();\"); foo(); System.Web.UI.WebControls.Label LinkButton <asp:LinkButton ID=\"... | 2008/10/08 | [
"https://Stackoverflow.com/questions/181097",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10708/"
] |
181,106 | <p>Is a new (or different) instance of <code>TestCase</code> object is used to run each test method in a JUnit test case? Or one instance is reused for all the tests?</p>
<pre><code>public class MyTest extends TestCase {
public void testSomething() { ... }
public void testSomethingElse() { ... }
}
</code></pre>
... | [
{
"answer_id": 181311,
"author": "Olaf Kock",
"author_id": 13447,
"author_profile": "https://Stackoverflow.com/users/13447",
"pm_score": 2,
"selected": false,
"text": "public class MyTest extends TestCase {\n public MyTest() { System.out.println(\"MyTest Constructor\");\n public void s... | 2008/10/08 | [
"https://Stackoverflow.com/questions/181106",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13326/"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.