qid int64 4 19.1M | question stringlengths 18 48.3k | answers list | date stringlengths 10 10 | metadata list |
|---|---|---|---|---|
30,319 | <p>Is there a tag in HTML that will only display its content if JavaScript is enabled? I know <code><noscript></code> works the opposite way around, displaying its HTML content when JavaScript is turned off. But I would like to only display a form on a site if JavaScript is available, telling them why they can't ... | [
{
"answer_id": 35318,
"author": "cpm",
"author_id": 3674,
"author_profile": "https://Stackoverflow.com/users/3674",
"pm_score": 0,
"selected": false,
"text": "document.getElementById(id).innerHTML = \"My Content\""
},
{
"answer_id": 37782,
"author": "Shadow2531",
"author_... | 2008/08/27 | [
"https://Stackoverflow.com/questions/30319",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2098/"
] |
30,321 | <p>I am looking for a method of storing Application Messages, such as</p>
<ul>
<li>"You have logged in successfully"</li>
<li>"An error has occurred, please call the helpdesk on x100"</li>
<li>"You do not have the authority to reset all system passwords" etc</li>
</ul>
<p>So that "when" the users decide they don't li... | [
{
"answer_id": 30326,
"author": "FlySwat",
"author_id": 1965,
"author_profile": "https://Stackoverflow.com/users/1965",
"pm_score": 4,
"selected": true,
"text": "<appSettings file=\"StringKeys.config\">\n"
}
] | 2008/08/27 | [
"https://Stackoverflow.com/questions/30321",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/982/"
] |
30,328 | <p>How do you OCR an tiff file using Tesseract's interface in c#?<br>
Currently I only know how to do it using the executable.</p>
| [
{
"answer_id": 17017418,
"author": "linquize",
"author_id": 1031218,
"author_profile": "https://Stackoverflow.com/users/1031218",
"pm_score": 3,
"selected": false,
"text": "Process process = Process.Start(\"tesseract.exe\", \"out\");\nprocess.WaitForExit();\nif (process.ExitCode == 0)\n{... | 2008/08/27 | [
"https://Stackoverflow.com/questions/30328",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3249/"
] |
30,337 | <p>Is there an online resource somewhere that maintains statistics on the install-base of Java including JRE version information? If not, is there any recent report that has some numbers?</p>
<p>I'm particularly interested in Windows users, but all other OS's are welcome too.</p>
| [
{
"answer_id": 17017418,
"author": "linquize",
"author_id": 1031218,
"author_profile": "https://Stackoverflow.com/users/1031218",
"pm_score": 3,
"selected": false,
"text": "Process process = Process.Start(\"tesseract.exe\", \"out\");\nprocess.WaitForExit();\nif (process.ExitCode == 0)\n{... | 2008/08/27 | [
"https://Stackoverflow.com/questions/30337",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2881/"
] |
30,346 | <p>Header, footer and sidebars have fixed position. In the center a content area with both scroll bars. No outer scroll bars on the browser. I have a layout that works in IE7 and FF. I need to add IE6 support. How can I make this work?</p>
<p>Here is an approximation of my current CSS.</p>
<pre class="lang-html prettyp... | [
{
"answer_id": 30932,
"author": "palotasb",
"author_id": 3063,
"author_profile": "https://Stackoverflow.com/users/3063",
"pm_score": 1,
"selected": false,
"text": "<head> <!--[if lte IE 6]>\n<style type=\"text/css\">\nhtml, body {\n height: 100%;\n overflow: auto;\n}\n.ie6fixed {\n... | 2008/08/27 | [
"https://Stackoverflow.com/questions/30346",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3211/"
] |
30,354 | <p>In one of my VB6 forms, I create several other Form objects and store them in member variables.</p>
<pre><code>Private m_frm1 as MyForm
Private m_frm2 as MyForm
// Later...
Set m_frm1 = New MyForm
Set m_frm2 = New MyForm
</code></pre>
<p>I notice that I'm leaking memory whenever this (parent) form is created and ... | [
{
"answer_id": 30383,
"author": "Josh Miller",
"author_id": 2818,
"author_profile": "https://Stackoverflow.com/users/2818",
"pm_score": 2,
"selected": false,
"text": "Dim y As Long\nFor y = 0 To Forms.Count -1\n Unload Forms(x)\nNext\n"
},
{
"answer_id": 30398,
"author": "... | 2008/08/27 | [
"https://Stackoverflow.com/questions/30354",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/863/"
] |
30,373 | <p>I remember first learning about vectors in the STL and after some time, I wanted to use a vector of bools for one of my projects. After seeing some strange behavior and doing some research, I learned that <a href="http://www.informit.com/guides/content.aspx?g=cplusplus&seqNum=98" rel="noreferrer">a vector of boo... | [
{
"answer_id": 48676,
"author": "Motti",
"author_id": 3848,
"author_profile": "https://Stackoverflow.com/users/3848",
"pm_score": 2,
"selected": false,
"text": "virtual class bar {\n vector<int> vec_;\n unsigned size_; // Note size_ declared *after* vec_\npublic:\n bar(unsigned ... | 2008/08/27 | [
"https://Stackoverflow.com/questions/30373",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2328/"
] |
30,379 | <p>We have a Windows Server Web Edition 2003 Web Farm. </p>
<p>What can we use that handles replication across the servers for:</p>
<p>Content & IIS Configuration (App Pools, Virtual Directories, etc...)</p>
<p>We will be moving to Windows 2008 in the near future, so I guess what options are there on Windows 200... | [
{
"answer_id": 48676,
"author": "Motti",
"author_id": 3848,
"author_profile": "https://Stackoverflow.com/users/3848",
"pm_score": 2,
"selected": false,
"text": "virtual class bar {\n vector<int> vec_;\n unsigned size_; // Note size_ declared *after* vec_\npublic:\n bar(unsigned ... | 2008/08/27 | [
"https://Stackoverflow.com/questions/30379",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2349/"
] |
30,397 | <p>I am trying to set up dynamic per-item menus (Edit Control Block) in SharePoint 2007. My goal is to have certain features that are available based on the current user's group membership.</p>
<p>I know that the CustomAction tag that controls the creation of this menu item has a Rights attribute. The problem that I... | [
{
"answer_id": 48676,
"author": "Motti",
"author_id": 3848,
"author_profile": "https://Stackoverflow.com/users/3848",
"pm_score": 2,
"selected": false,
"text": "virtual class bar {\n vector<int> vec_;\n unsigned size_; // Note size_ declared *after* vec_\npublic:\n bar(unsigned ... | 2008/08/27 | [
"https://Stackoverflow.com/questions/30397",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2470/"
] |
30,494 | <p>Here is my code, which takes two version identifiers in the form "1, 5, 0, 4" or "1.5.0.4" and determines which is the newer version.</p>
<p>Suggestions or improvements, please!</p>
<pre><code> /// <summary>
/// Compares two specified version strings and returns an integer that
/// indicates thei... | [
{
"answer_id": 30510,
"author": "Darren Kopp",
"author_id": 77,
"author_profile": "https://Stackoverflow.com/users/77",
"pm_score": 5,
"selected": false,
"text": "Version a = new Version(\"1.0.0.0\");\nVersion b = new Version(\"2.0.0.0\");\n\nConsole.WriteLine(string.Format(\"Newer: {0}\... | 2008/08/27 | [
"https://Stackoverflow.com/questions/30494",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1490/"
] |
30,504 | <p>I know there is a registry key indicating the install directory, but I don't remember what it is off-hand.</p>
<p>I am currently interested in Visual Studio 2008 install directory, though it wouldn't hurt to list others for future reference.</p>
| [
{
"answer_id": 30524,
"author": "Emperor XLII",
"author_id": 2495,
"author_profile": "https://Stackoverflow.com/users/2495",
"pm_score": 3,
"selected": false,
"text": "VS*COMNTOOLS $vs = Join-Path $env:VS90COMNTOOLS '..\\IDE\\devenv.exe'\n HKLM\\Software\\Microsoft\\VisualStudio $vsRegPa... | 2008/08/27 | [
"https://Stackoverflow.com/questions/30504",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2495/"
] |
30,505 | <p>I frequently work with multiple instances of Visual Studio, often working on different branches of the same solution.</p>
<p><a href="https://en.wikipedia.org/wiki/Microsoft_Visual_C%2B%2B#Strictly_32-bit_versions" rel="noreferrer">Visual C++ 6.0</a> used to display the full path of the current source file in its t... | [
{
"answer_id": 5870729,
"author": "Drew Miller",
"author_id": 459949,
"author_profile": "https://Stackoverflow.com/users/459949",
"pm_score": 3,
"selected": false,
"text": "Private timer As System.Threading.Timer\n\nDeclare Auto Function SetWindowText Lib \"user32\" (ByVal hWnd As System... | 2008/08/27 | [
"https://Stackoverflow.com/questions/30505",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1739/"
] |
30,529 | <p>How could i implement Type-Safe Enumerations in Delphi in a COM scenario ? Basically, i'd like to replace a set of primitive constants of a enumeration with a set of static final object references encapsulated in a class ? .
In Java, we can do something like:</p>
<pre><code>public final class Enum
{
public sta... | [
{
"answer_id": 30654,
"author": "Lars Truijens",
"author_id": 1242,
"author_profile": "https://Stackoverflow.com/users/1242",
"pm_score": 2,
"selected": false,
"text": "type\n TMyEnum = (Item1, Item2, Item3);\n\nif MyEnum <> Item1 then...\n type\n TMyEnum = sealed class\n public\n ... | 2008/08/27 | [
"https://Stackoverflow.com/questions/30529",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2015/"
] |
30,539 | <p>I'm looking for a good way to enumerate all the Video codecs on a Windows XP/Vista machine.</p>
<p>I need present the user with a set of video codecs, including the compressors and decompressors. The output would look something like</p>
<pre>
Available Decoders
DiVX Version 6.0
XVID
Motion JPEG
CompanyX's MPEG-2 ... | [
{
"answer_id": 30596,
"author": "Christopher",
"author_id": 3186,
"author_profile": "https://Stackoverflow.com/users/3186",
"pm_score": 4,
"selected": true,
"text": "HRESULT extractFriendlyName( IMoniker* pMk, std::wstring& str )\n{\n assert( pMk != 0 );\n IPropertyBag* pBag = 0;\n HR... | 2008/08/27 | [
"https://Stackoverflow.com/questions/30539",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2813/"
] |
30,540 | <p>This error just started popping up all over our site.</p>
<p><strong><em>Permission denied to call method to Location.toString</em></strong></p>
<p>I'm seeing google posts that suggest that this is related to flash and our crossdomain.xml. What caused this to occur and how do you fix?</p>
| [
{
"answer_id": 30561,
"author": "Grey Panther",
"author_id": 1265,
"author_profile": "https://Stackoverflow.com/users/1265",
"pm_score": 4,
"selected": true,
"text": "<iframe name=\"foo\" src=\"foo.com/script.js\">\n<iframe name=\"bar\" src=\"bar.com/script.js\">\n window[\"foo\"].Locati... | 2008/08/27 | [
"https://Stackoverflow.com/questions/30540",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1940/"
] |
30,563 | <p>I have one field that I need to sum lets say named items
However that field can be part of group a or b
In the end I need to have all of the items summed for group a and group b</p>
<p>when I say grouped I mean there is a LEFT OUTER JOIN to another table the previous table has a type for the items and the one being... | [
{
"answer_id": 30578,
"author": "Allain Lalonde",
"author_id": 2443,
"author_profile": "https://Stackoverflow.com/users/2443",
"pm_score": 3,
"selected": true,
"text": "SELECT groupname, SUM(value)\nFROM items\nWHERE groupname IN ('a', 'b')\nGROUP BY groupname\n SELECT SUM(value)\nFROM i... | 2008/08/27 | [
"https://Stackoverflow.com/questions/30563",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2486/"
] |
30,569 | <p>Does anyone have the secret formula to resizing transparent images (mainly GIFs) <em>without</em> ANY quality loss - what so ever?</p>
<p>I've tried a bunch of stuff, the closest I get is not good enough.</p>
<p>Take a look at my main image:</p>
<p><a href="http://www.thewallcompany.dk/test/main.gif" rel="norefer... | [
{
"answer_id": 30582,
"author": "Dillie-O",
"author_id": 71,
"author_profile": "https://Stackoverflow.com/users/71",
"pm_score": 3,
"selected": false,
"text": "/// <summary>\n/// Resize image with GDI+ so that image is nice and clear with required size.\n/// </summary>\n/// <param nam... | 2008/08/27 | [
"https://Stackoverflow.com/questions/30569",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2972/"
] |
30,571 | <p>In Maven, dependencies are usually set up like this:</p>
<pre class="lang-xml prettyprint-override"><code><dependency>
<groupId>wonderful-inc</groupId>
<artifactId>dream-library</artifactId>
<version>1.2.3</version>
</dependency>
</code></pre>
<p>Now, if you ar... | [
{
"answer_id": 30628,
"author": "Martin Klinke",
"author_id": 1793,
"author_profile": "https://Stackoverflow.com/users/1793",
"pm_score": 7,
"selected": false,
"text": "<version>[1.2.3,)</version>\n"
},
{
"answer_id": 1172371,
"author": "Rich Seller",
"author_id": 123582,... | 2008/08/27 | [
"https://Stackoverflow.com/questions/30571",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1709/"
] |
30,585 | <p>Has anyone ever set up Cruise Control to build an OS X Cocoa/Objective-C project?</p>
<p>If so, is there a preferred flavor of CruiseControl (CruiseControl.rb or just regular CruiseControl) that would be easier to do this with. </p>
<p>I currently have a Ruby rake file that has steps for doing building and running... | [
{
"answer_id": 30705,
"author": "Chris Blackwell",
"author_id": 1329401,
"author_profile": "https://Stackoverflow.com/users/1329401",
"pm_score": 4,
"selected": true,
"text": "<exec> <project name=\"cocoathing\" default=\"build\">\n <target name=\"build\">\n <exec executable=\"xcodeb... | 2008/08/27 | [
"https://Stackoverflow.com/questions/30585",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2813/"
] |
30,627 | <p>I'm looking for the best method to parse various XML documents using a Java application. I'm currently doing this with SAX and a custom content handler and it works great - zippy and stable. </p>
<p>I've decided to explore the option having the same program, that currently recieves a single format XML document, re... | [
{
"answer_id": 30689,
"author": "Bernie Perez",
"author_id": 1992,
"author_profile": "https://Stackoverflow.com/users/1992",
"pm_score": 2,
"selected": false,
"text": "public class DataStructure {\n\n List<ProductStructure> products;\n\n List<StoreStructure> stors;\n\n List<Mana... | 2008/08/27 | [
"https://Stackoverflow.com/questions/30627",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/828/"
] |
30,651 | <p>I would like to know if I can open 2 different diagrams using MS Visio and each diagram have its own window. I've tried in several ways, but I always end up with 1 Visio window ...</p>
<p>I'm using a triple monitor setup and I'd like to put one diagram to each side of my main monitor.</p>
<p>[]'s</p>
<p>André Cas... | [
{
"answer_id": 7533665,
"author": "J D",
"author_id": 961821,
"author_profile": "https://Stackoverflow.com/users/961821",
"pm_score": 5,
"selected": false,
"text": "Tools -> Options -> Advanced File -> Options -> Advanced HKEY_CURRENT_USER\\Software\\Microsoft\\Office\\12.0\\Visio\\Appli... | 2008/08/27 | [
"https://Stackoverflow.com/questions/30651",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1213/"
] |
30,660 | <p>I'm running a master-slave MySQL binary log replication system (phew!) that, for some data, is not in sync (meaning, the master holds more data than the slave). But the slave stops very frequently on the slightest MySQL error, can this be disabled? (perhaps a my.cnf setting for the replicating slave ignore-replicati... | [
{
"answer_id": 30714,
"author": "thelsdj",
"author_id": 163,
"author_profile": "https://Stackoverflow.com/users/163",
"pm_score": 2,
"selected": false,
"text": "mysqldump --master-data --single-transaction"
},
{
"answer_id": 60722,
"author": "Erik",
"author_id": 4484,
... | 2008/08/27 | [
"https://Stackoverflow.com/questions/30660",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/547/"
] |
30,686 | <p>How can you get the version information from a <code>.dll</code> or <code>.exe</code> file in PowerShell?</p>
<p>I am specifically interested in <code>File Version</code>, though other version information (that is, <code>Company</code>, <code>Language</code>, <code>Product Name</code>, etc.) would be helpful as wel... | [
{
"answer_id": 30702,
"author": "EBGreen",
"author_id": 1358,
"author_profile": "https://Stackoverflow.com/users/1358",
"pm_score": 3,
"selected": false,
"text": "[System.Diagnostics.FileVersionInfo]::GetVersionInfo(\"Path\\To\\File.dll\")\n"
},
{
"answer_id": 30708,
"author"... | 2008/08/27 | [
"https://Stackoverflow.com/questions/30686",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2495/"
] |
30,710 | <p>I've heard that unit testing is "totally awesome", "really cool" and "all manner of good things" but 70% or more of my files involve database access (some read and some write) and I'm not sure how to write a unit test for these files.</p>
<p>I'm using PHP and Python but I think it's a question that applies to most/... | [
{
"answer_id": 30715,
"author": "Sean Chambers",
"author_id": 2993,
"author_profile": "https://Stackoverflow.com/users/2993",
"pm_score": 5,
"selected": false,
"text": "NHibernate"
},
{
"answer_id": 30759,
"author": "Marcin",
"author_id": 3105,
"author_profile": "http... | 2008/08/27 | [
"https://Stackoverflow.com/questions/30710",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1384652/"
] |
30,729 | <p>I want to create a simple http proxy server that does some very basic processing on the http headers (i.e. if header x == y, do z). The server may need to support hundreds of users. I can write the server in C# (pretty easy) or c++ (much harder). However, would a C# version have as good of performance as a C++ ve... | [
{
"answer_id": 30755,
"author": "Brian Ensink",
"author_id": 1254,
"author_profile": "https://Stackoverflow.com/users/1254",
"pm_score": 0,
"selected": false,
"text": "if header x == y, do z\n"
}
] | 2008/08/27 | [
"https://Stackoverflow.com/questions/30729",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3291/"
] |
30,754 | <p>Reading <a href="https://stackoverflow.com/questions/437/what-is-your-solution-to-the-fizzbuzz-problem">this question</a> I found this as (note the quotation marks) "code" to solve the problem (that's perl by the way). </p>
<pre><code>100,{)..3%!'Fizz'*\5%!'Buzz'*+\or}%n*
</code></pre>
<p>Obviously this is an inte... | [
{
"answer_id": 188736,
"author": "Lev",
"author_id": 7224,
"author_profile": "https://Stackoverflow.com/users/7224",
"pm_score": 0,
"selected": false,
"text": "typedef Pixel PixelModifierFunction(Pixel);\n\nvoid ModifyAllPixels(PixelModifierFunction);\n"
}
] | 2008/08/27 | [
"https://Stackoverflow.com/questions/30754",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2695/"
] |
30,763 | <p>I have class method that returns a list of employees that I can iterate through. What's the best way to return the list? Typically I just return an ArrayList. However, as I understand, interfaces are better suited for this type of action. Which would be the best interface to use? Also, why is it better to return a... | [
{
"answer_id": 30774,
"author": "levand",
"author_id": 3044,
"author_profile": "https://Stackoverflow.com/users/3044",
"pm_score": 1,
"selected": false,
"text": "<Employee"
},
{
"answer_id": 30780,
"author": "Marcin",
"author_id": 3105,
"author_profile": "https://Stac... | 2008/08/27 | [
"https://Stackoverflow.com/questions/30763",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2121/"
] |
30,781 | <p>What are the ways to retrieve data submitted to the web server from a form in the client HTML in ASP.NET?</p>
| [
{
"answer_id": 30784,
"author": "Adam",
"author_id": 1341,
"author_profile": "https://Stackoverflow.com/users/1341",
"pm_score": 0,
"selected": false,
"text": "value = Request.Form(\"formElementID\")\n value = Request.QueryString(\"formElementID\")\n"
},
{
"answer_id": 30792,
... | 2008/08/27 | [
"https://Stackoverflow.com/questions/30781",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1341/"
] |
30,835 | <p>Is there any Visual Studio Express plug ins for source versioning? I am starting a project on my own and only have the Express version of Visual Studio 2008.</p>
| [
{
"answer_id": 3732029,
"author": "Wil",
"author_id": 321053,
"author_profile": "https://Stackoverflow.com/users/321053",
"pm_score": 5,
"selected": false,
"text": "Title: HG New Repositry \nCommand: C:\\Program Files\\TortoiseHg\\hgtk.exe\nArguments: --nofork init Initial\ndirectory: $(... | 2008/08/27 | [
"https://Stackoverflow.com/questions/30835",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2535/"
] |
30,847 | <p>How does one go about authoring a <em><strong>Regular Expression</strong></em> that matches against all strings that are valid URIs, while failing to match against all strings that are invalid URIs?</p>
<p>To be specific about what I am referencing when I say URI, I have added a link below for the most current URI R... | [
{
"answer_id": 30910,
"author": "Daren Thomas",
"author_id": 2260,
"author_profile": "https://Stackoverflow.com/users/2260",
"pm_score": 5,
"selected": true,
"text": "/^([a-z0-9+.-]+):(?://(?:((?:[a-z0-9-._~!$&'()*+,;=:]|%[0-9A-F]{2})*)@)?((?:[a-z0-9-._~!$&'()*+,;=]|%[0-9A-F]{2})*)(?::(\... | 2008/08/27 | [
"https://Stackoverflow.com/questions/30847",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/80/"
] |
30,856 | <p>How do I write the results from a mysql query to file? I just need something quick. Output can be CSV, XML, HTML, etc.</p>
| [
{
"answer_id": 30868,
"author": "Matt Rogish",
"author_id": 2590,
"author_profile": "https://Stackoverflow.com/users/2590",
"pm_score": 5,
"selected": true,
"text": "SELECT a,b,a+b \n FROM test_table\n INTO OUTFILE '/tmp/result.txt'\n FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '\... | 2008/08/27 | [
"https://Stackoverflow.com/questions/30856",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2363/"
] |
30,861 | <p>Given a username and a password for a domain user, what would be the best way to authenticate that user programatically?</p>
| [
{
"answer_id": 31665,
"author": "David J. Sokol",
"author_id": 1390,
"author_profile": "https://Stackoverflow.com/users/1390",
"pm_score": 3,
"selected": false,
"text": "Try\n Dim directoryEntry as New DirectoryEntry(\"LDAP://DomainController:389/dc=domain,dc=suffix\", \"username\", \... | 2008/08/27 | [
"https://Stackoverflow.com/questions/30861",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1194/"
] |
30,877 | <p>I actually have an answer to my question but it is not parallelized so I am interested in ways to improve the algorithm. Anyway it might be useful as-is for some people.</p>
<pre><code>int Until = 20000000;
BitArray PrimeBits = new BitArray(Until, true);
/*
* Sieve of Eratosthenes
* PrimeBits is a simple BitArra... | [
{
"answer_id": 31604423,
"author": "Raj",
"author_id": 3872129,
"author_profile": "https://Stackoverflow.com/users/3872129",
"pm_score": -1,
"selected": false,
"text": " void PrimeNumber(long number)\n {\n bool IsprimeNumber = true;\n long value = Convert.ToInt32(Mat... | 2008/08/27 | [
"https://Stackoverflow.com/questions/30877",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3063/"
] |
30,879 | <p>Is there a pattern using Linq to dynamically create a filter?</p>
<p>I have the need to create custom filtering on a list, in the past I would just dynamically create the SQL...it doesn't seem like this is possible with Linq.</p>
| [
{
"answer_id": 30887,
"author": "Geoff",
"author_id": 1097,
"author_profile": "https://Stackoverflow.com/users/1097",
"pm_score": 5,
"selected": true,
"text": "Dim Northwind As New NorthwindDataContext\nDim query = From q In Northwind.Products Where p.CategoryID = 2 And p.UnitPrice > 3 O... | 2008/08/27 | [
"https://Stackoverflow.com/questions/30879",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2858/"
] |
30,884 | <p>Suppose you have two seperate ASP.NET Web Application projects that both need to use a common MasterPage.</p>
<p>What's the best way to share the MasterPage across projects without having to duplicate code? Preferably without having to resort to source control or file system hacks.</p>
| [
{
"answer_id": 94027,
"author": "Chris James",
"author_id": 3193,
"author_profile": "https://Stackoverflow.com/users/3193",
"pm_score": 0,
"selected": false,
"text": "System.Web.UI.MasterPage\n"
}
] | 2008/08/27 | [
"https://Stackoverflow.com/questions/30884",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/247/"
] |
30,903 | <p>Is there a good, native Mac tool to view Mercurial repositories, similar to gitnub for Git?</p>
| [
{
"answer_id": 30943,
"author": "nlucaroni",
"author_id": 157,
"author_profile": "https://Stackoverflow.com/users/157",
"pm_score": 1,
"selected": false,
"text": "hg view TCL fetch"
}
] | 2008/08/27 | [
"https://Stackoverflow.com/questions/30903",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3071/"
] |
30,928 | <p>[We have a Windows Forms database front-end application that, among other things, can be used as a CMS; clients create the structure, fill it, and then use a ASP.NET WebForms-based site to present the results to publicly on the Web. For added flexibility, they are sometimes forced to input actual HTML markup right i... | [
{
"answer_id": 58964550,
"author": "KyleMit",
"author_id": 1366033,
"author_profile": "https://Stackoverflow.com/users/1366033",
"pm_score": 4,
"selected": false,
"text": "SplitContainer Form Dock = Fill TextBox Dock = Fill Multiline = True WebBrowser Dock = Fill TextChanged DocumentText... | 2008/08/27 | [
"https://Stackoverflow.com/questions/30928",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1600/"
] |
30,931 | <p>I'm developing a Linux application that has its own file format. I want my app to open when you double-click on those files.</p>
<p>How can I register a file extension and associate it with my application on Linux? I'm looking for a way that is standard (works with GNOME and KDE based systems) and can be done autom... | [
{
"answer_id": 31836,
"author": "skolima",
"author_id": 3205,
"author_profile": "https://Stackoverflow.com/users/3205",
"pm_score": 7,
"selected": true,
"text": "xdg-utils xdg-icon-resource install --context mimetypes --size 48 myicon-file-type.png x-application-mytype\n <?xml version=\"... | 2008/08/27 | [
"https://Stackoverflow.com/questions/30931",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3306/"
] |
30,946 | <p>What is a good, simple encryption scheme for protecting passwords in a database? I don't necessarily need anything that's hyper-secure nor do I need anything that's lightning fast, but those things would be nice. Primarily, I just want something that's easy to implement without being terribly slow or insecure.</p>... | [
{
"answer_id": 30952,
"author": "Keith",
"author_id": 905,
"author_profile": "https://Stackoverflow.com/users/905",
"pm_score": 3,
"selected": false,
"text": "MD5CryptoServiceProvider hasher = new MD5CryptoServiceProvider();\nstring addSalt = string.Concat( \"ummm salty \", password );\n... | 2008/08/27 | [
"https://Stackoverflow.com/questions/30946",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2147/"
] |
30,985 | <p>I recently had to solve this problem and find I've needed this info many times in the past so I thought I would post it. Assuming the following table def, how would you write a query to find all differences between the two?</p>
<p>table def:</p>
<pre><code>CREATE TABLE feed_tbl
(
code varchar(15),
name varchar(40... | [
{
"answer_id": 31043,
"author": "wcm",
"author_id": 2173,
"author_profile": "https://Stackoverflow.com/users/2173",
"pm_score": 0,
"selected": false,
"text": "union where (ISNULL(feed_tbl.name, 'NONAME') <> ISNULL(data_tbl.name, 'NONAME')) OR\n(ISNULL(data_tbl.status, 'NOSTATUS') <> ISNU... | 2008/08/27 | [
"https://Stackoverflow.com/questions/30985",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/292/"
] |
30,998 | <p>I like to use static functions in C++ as a way to categorize them, like C# does.</p>
<pre><code>Console::WriteLine("hello")
</code></pre>
<p>Is this good or bad? If the functions are used often I guess it doesn't matter, but if not do they put pressure on memory?</p>
<p>What about <code>static const</code>?</p>
| [
{
"answer_id": 31004,
"author": "Frank Krueger",
"author_id": 338,
"author_profile": "https://Stackoverflow.com/users/338",
"pm_score": 3,
"selected": false,
"text": "static class"
},
{
"answer_id": 31119,
"author": "Tim Frey",
"author_id": 1471,
"author_profile": "ht... | 2008/08/27 | [
"https://Stackoverflow.com/questions/30998",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2566/"
] |
31,007 | <p>I build up an array of strings with</p>
<pre><code>string[] parts = string.spilt(" ");
</code></pre>
<p>And get an array with X parts in it, I would like to get a copy of the array of strings starting at element </p>
<pre><code>parts[x-2]
</code></pre>
<p>Other than the obvious brute force approach (make a new a... | [
{
"answer_id": 31025,
"author": "Frank Krueger",
"author_id": 338,
"author_profile": "https://Stackoverflow.com/users/338",
"pm_score": -1,
"selected": false,
"text": "string[] less = new string[parts.Length - (x - 2)];\nArray.Copy(parts, x - 2, less, 0, less.Length);\n"
},
{
"an... | 2008/08/27 | [
"https://Stackoverflow.com/questions/31007",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2723/"
] |
31,031 | <p>What's the best way to allow a user to browse for a file in C#?</p>
| [
{
"answer_id": 31036,
"author": "Ryan Farley",
"author_id": 1627,
"author_profile": "https://Stackoverflow.com/users/1627",
"pm_score": 5,
"selected": true,
"text": "using (OpenFileDialog dlg = new OpenFileDialog())\n{\n dlg.Title = \"Select a file\";\n if (dlg.ShowDialog()== Dialo... | 2008/08/27 | [
"https://Stackoverflow.com/questions/31031",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/177/"
] |
31,044 | <p>How can I check the existence of an element in jQuery?</p>
<p>The current code that I have is this:</p>
<pre><code>if ($(selector).length > 0) {
// Do something
}
</code></pre>
<p>Is there a more elegant way to approach this? Perhaps a plugin or a function?</p>
| [
{
"answer_id": 31047,
"author": "Jake McGraw",
"author_id": 302,
"author_profile": "https://Stackoverflow.com/users/302",
"pm_score": 10,
"selected": false,
"text": "jQuery.fn.exists = function(){ return this.length > 0; }\n\nif ($(selector).exists()) {\n // Do something\n}\n"
},
... | 2008/08/27 | [
"https://Stackoverflow.com/questions/31044",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/302/"
] |
31,053 | <p>How can I replace lone instances of \n with \r\n (LF alone with CRLF) using a regular expression in C#?</p>
<p>I know to do it using plan <code>String.Replace</code>, like:</p>
<pre><code>myStr.Replace("\n", "\r\n");
myStr.Replace("\r\r\n", "\r\n");
</code></pre>
<p>However, t... | [
{
"answer_id": 31056,
"author": "chakrit",
"author_id": 3055,
"author_profile": "https://Stackoverflow.com/users/3055",
"pm_score": 7,
"selected": true,
"text": "[^\\r]\\n\n ([^\\r]|$)\\n\n myStr = Regex.Replace(myStr, \"(?<!\\r)\\n\", \"\\r\\n\");\n"
},
{
"answer_id": 31074,
... | 2008/08/27 | [
"https://Stackoverflow.com/questions/31053",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/838/"
] |
31,057 | <p>I didn't see any similar questions asked on this topic, and I had to research this for something I'm working on right now. Thought I would post the answer for it in case anyone else had the same question.</p>
| [
{
"answer_id": 31063,
"author": "Mark Struzinski",
"author_id": 1284,
"author_profile": "https://Stackoverflow.com/users/1284",
"pm_score": 9,
"selected": true,
"text": "CHAR(13) DECLARE @text NVARCHAR(100)\nSET @text = 'This is line 1.' + CHAR(13) + 'This is line 2.'\nSELECT @text\n"
... | 2008/08/27 | [
"https://Stackoverflow.com/questions/31057",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1284/"
] |
31,059 | <p>In VS .NET, when you are selecting a folder for a project, a dialog that looks like an OpenFileDialog or SaveFileDialog is displayed, but is set up to accept only folders. Ever since I've seen this I've wanted to know how it's done. I am aware of the FolderBrowserDialog, but I've never really liked that dialog. I... | [
{
"answer_id": 31082,
"author": "Ryan Farley",
"author_id": 1627,
"author_profile": "https://Stackoverflow.com/users/1627",
"pm_score": 5,
"selected": false,
"text": "using (FolderBrowserDialog dlg = new FolderBrowserDialog())\n{\n dlg.Description = \"Select a folder\";\n if (dlg.S... | 2008/08/27 | [
"https://Stackoverflow.com/questions/31059",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2547/"
] |
31,068 | <p>How do I find the 'temp' directory in Linux? I am writing a platform neutral C++ function that returns the temp directory. In Mac and Windows, there is an API that returns these results. In Linux, I'm stumped.
</p>
| [
{
"answer_id": 31081,
"author": "Greg Hewgill",
"author_id": 893,
"author_profile": "https://Stackoverflow.com/users/893",
"pm_score": 4,
"selected": false,
"text": "/tmp"
},
{
"answer_id": 31083,
"author": "Adam Wright",
"author_id": 1200,
"author_profile": "https://... | 2008/08/27 | [
"https://Stackoverflow.com/questions/31068",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3313/"
] |
31,075 | <p>I have an executable (compiled by someone else) that is hitting an assertion near my code. I work on the code in Visual C++ 2003, but I don't have a project file for this particular executable (the code is used to build many different tools). Is it possible to launch the binary in Visual C++'s debugger and just tell... | [
{
"answer_id": 31148,
"author": "Anders Sandvig",
"author_id": 1709,
"author_profile": "https://Stackoverflow.com/users/1709",
"pm_score": 0,
"selected": false,
"text": ".exe winamp.exe"
}
] | 2008/08/27 | [
"https://Stackoverflow.com/questions/31075",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1891/"
] |
31,088 | <p>I'm trying to set up an inheritance hierarchy similar to the following:</p>
<pre><code>abstract class Vehicle
{
public string Name;
public List<Axle> Axles;
}
class Motorcycle : Vehicle
{
}
class Car : Vehicle
{
}
abstract class Axle
{
public int Length;
public void Turn(int numTurns) { ... }
}
cl... | [
{
"answer_id": 31110,
"author": "Lars Truijens",
"author_id": 1242,
"author_profile": "https://Stackoverflow.com/users/1242",
"pm_score": 4,
"selected": true,
"text": "abstract class Vehicle<T> where T : Axle\n{\n public string Name;\n public List<T> Axles;\n}\n\nclass Motorcycle : Veh... | 2008/08/27 | [
"https://Stackoverflow.com/questions/31088",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/327/"
] |
31,090 | <p>The <code>Open</code> button on the open file dialog used in certain windows applications includes a dropdown arrow with a list of additional options — namely <code>Open With..</code>. </p>
<p><a href="https://i.stack.imgur.com/GLM3T.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/GLM3T.pn... | [
{
"answer_id": 31202,
"author": "Nick",
"author_id": 1490,
"author_profile": "https://Stackoverflow.com/users/1490",
"pm_score": 2,
"selected": false,
"text": "using System;\nusing System.Collections.Generic;\nusing System.Text;\nusing System.Windows.Forms;\nusing System.Windows.Forms.Vi... | 2008/08/27 | [
"https://Stackoverflow.com/questions/31090",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3043/"
] |
31,096 | <p>I'm trying to find out how much memory my own .Net server process is using (for monitoring and logging purposes).</p>
<p>I'm using:</p>
<pre><code>Process.GetCurrentProcess().PrivateMemorySize64
</code></pre>
<p>However, the Process object has several different properties that let me read the memory space used:
P... | [
{
"answer_id": 31164,
"author": "Lars Truijens",
"author_id": 1242,
"author_profile": "https://Stackoverflow.com/users/1242",
"pm_score": 5,
"selected": true,
"text": "GC.GetTotalMemory(true)\n Process.GetCurrentProcess().PrivateMemorySize64\n Process.GetCurrentProcess().WorkingSet64\n"
... | 2008/08/27 | [
"https://Stackoverflow.com/questions/31096",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3314/"
] |
31,097 | <p>Visual Basic code does not render correctly with <a href="https://code.google.com/archive/p/google-code-prettify" rel="nofollow noreferrer">prettify.js</a> from Google.</p>
<p>on Stack Overflow:</p>
<pre><code>Partial Public Class WebForm1
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As ... | [
{
"answer_id": 31860,
"author": "Konrad Rudolph",
"author_id": 1968,
"author_profile": "https://Stackoverflow.com/users/1968",
"pm_score": 4,
"selected": true,
"text": "GetXmlNamespace var highlightVB = function(code) {\n var regex = /(\"(?:\"\"|[^\"])+\"c?)|('.*$)|#.+?#|(&[HO])?\... | 2008/08/27 | [
"https://Stackoverflow.com/questions/31097",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/83/"
] |
31,127 | <p>When running a Java app from eclipse my ImageIcon shows up just fine.</p>
<p>But after creating a jar the path to the image obviously gets screwed up.</p>
<p>Is there a way to extract an image from the jar at runtime so I can then open it up? Or, is there a better way to do this?</p>
<p>I'd like to distribute a ... | [
{
"answer_id": 31146,
"author": "Tim Frey",
"author_id": 1471,
"author_profile": "https://Stackoverflow.com/users/1471",
"pm_score": 5,
"selected": false,
"text": "InputStream stream = this.getClass().getClassLoader().getResourceAsStream(\"/images/image.jpg\");\n"
},
{
"answer_id... | 2008/08/27 | [
"https://Stackoverflow.com/questions/31127",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2598/"
] |
31,128 | <p>The HTML standard defines a clear separation of concerns between CSS (presentation) and HTML (semantics or structure).</p>
<p>Does anyone use a coding standards document for CSS and XHTML that has clauses which help to maintain this separation? What would be good clauses to include in such a coding standards docume... | [
{
"answer_id": 32478,
"author": "Lee Theobald",
"author_id": 1900,
"author_profile": "https://Stackoverflow.com/users/1900",
"pm_score": 3,
"selected": true,
"text": "CSS"
}
] | 2008/08/27 | [
"https://Stackoverflow.com/questions/31128",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2822/"
] |
31,129 | <p>I want to return <code>StudentId</code> to use elsewhere outside of the <em>scope</em> of the <code>$.getJSON()</code></p>
<pre><code>j.getJSON(url, data, function(result)
{
var studentId = result.Something;
});
//use studentId here
</code></pre>
<p>I would imagine this has to do with scoping, but it doesn't ... | [
{
"answer_id": 31153,
"author": "Jason Bunting",
"author_id": 1790,
"author_profile": "https://Stackoverflow.com/users/1790",
"pm_score": 6,
"selected": true,
"text": "var studentId = null;\nj.getJSON(url, data, function(result)\n{\n studentId = result.Something;\n});\n\n// studentId ... | 2008/08/27 | [
"https://Stackoverflow.com/questions/31129",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2993/"
] |
31,140 | <p>A number of forms in my project inherit from a base form. It is easy to get at the Controls collection of the derived forms, but I have not found a simple way to access the Components collection, since VS marks this as private. </p>
<p>I assume this could be done with reflection, but I'm not really sure how best to... | [
{
"answer_id": 17007925,
"author": "Albert",
"author_id": 2090753,
"author_profile": "https://Stackoverflow.com/users/2090753",
"pm_score": 0,
"selected": false,
"text": " public void SetComponentsStyle()\n {\n if (null != this.components)\n {\n foreach... | 2008/08/27 | [
"https://Stackoverflow.com/questions/31140",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2899/"
] |
31,151 | <p>Alright.</p>
<p>So I figure it's about time I get into unit testing, since everyone's been banging on about it for long enough. I've installed NUnit and gone through a few "intro to unit testing" type tutorials.</p>
<p>I'm currently putting together a small framework to help with the rebuild of one of our web app... | [
{
"answer_id": 31160,
"author": "chakrit",
"author_id": 3055,
"author_profile": "https://Stackoverflow.com/users/3055",
"pm_score": 3,
"selected": false,
"text": "assembly:InternalsVisibleTo [assembly:InternalsVisibleTo(\"YourTestProjectName\")]\n"
},
{
"answer_id": 49176870,
... | 2008/08/27 | [
"https://Stackoverflow.com/questions/31151",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/366/"
] |
31,163 | <p>In Visual Studio 2005, whenever I would view a file in the main editor, the Solution Explorer would find and highlight that file. Some time ago, this stopped working and the Solution Explorer would do nothing.</p>
<p>This has become quite a pain since following a chain of "Go To Definition"s can lead you all over ... | [
{
"answer_id": 46193,
"author": "Owen",
"author_id": 4790,
"author_profile": "https://Stackoverflow.com/users/4790",
"pm_score": 5,
"selected": false,
"text": "Imports System\nImports EnvDTE\nImports EnvDTE80\nImports EnvDTE90\nImports System.Diagnostics\n\nPublic Module SyncItem\n\n ... | 2008/08/27 | [
"https://Stackoverflow.com/questions/31163",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3259/"
] |
31,173 | <p>What's the most useful hack you've discovered for Mozilla's new <a href="https://wiki.mozilla.org/Labs/Ubiquity" rel="nofollow noreferrer">Ubiquity</a> tool?
</p>
| [
{
"answer_id": 35506,
"author": "Jörg W Mittag",
"author_id": 2988,
"author_profile": "https://Stackoverflow.com/users/2988",
"pm_score": 2,
"selected": false,
"text": "makeSearchCommand({\n name: \"stackoverflow-tagsearch\",\n author: { name: \"Jörg W Mittag\", email: \"JoergWMittag+U... | 2008/08/27 | [
"https://Stackoverflow.com/questions/31173",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1372/"
] |
31,201 | <p>I'm currently creating an explicit reference to this in the outer class so that I have a name to refer to in the anonymous inner class. Is there a better way to do this?</p>
| [
{
"answer_id": 31216,
"author": "John Topley",
"author_id": 1450,
"author_profile": "https://Stackoverflow.com/users/1450",
"pm_score": 4,
"selected": false,
"text": "EnclosingClass.this"
},
{
"answer_id": 31218,
"author": "Frank Krueger",
"author_id": 338,
"author_pr... | 2008/08/27 | [
"https://Stackoverflow.com/questions/31201",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1288/"
] |
31,215 | <p>I have a Person object with two constructors - one takes an int (personId), the other a string (logonName). I would like another constructor that takes a string (badgeNumber). I know this can't be done, but seems it might be a common situation. Is there a graceful way of handling this? I suppose this would apply... | [
{
"answer_id": 31220,
"author": "Zack Peterson",
"author_id": 83,
"author_profile": "https://Stackoverflow.com/users/83",
"pm_score": 4,
"selected": true,
"text": "public Person(LogonName ln)\n{\n this.Load(ln.ToString());\n}\n\npublic Person(BadgeNumber bn)\n{\n //load logic here.... | 2008/08/27 | [
"https://Stackoverflow.com/questions/31215",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1865/"
] |
31,221 | <p>I have a method that where I want to redirect the user back to a login page located at the root of my web application.</p>
<p>I'm using the following code:</p>
<pre><code>Response.Redirect("~/Login.aspx?ReturnPath=" + Request.Url.ToString());
</code></pre>
<p>This doesn't work though. My assumption was that ASP.... | [
{
"answer_id": 31248,
"author": "Marshall",
"author_id": 1302,
"author_profile": "https://Stackoverflow.com/users/1302",
"pm_score": -1,
"selected": false,
"text": "Response.Redirect(String.Format(\"http://{0}/Login.aspx?ReturnPath={1}\", Request.ServerVariables[\"SERVER_NAME\"], Request... | 2008/08/27 | [
"https://Stackoverflow.com/questions/31221",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1226/"
] |
31,226 | <p>I am writing a basic word processing application and am trying to settle on a native "internal" format, the one that my code parses in order to render to the screen. I'd like this to be XML so that I can, in the future, just write XSLT to convert it to ODF or XHTML or whatever.</p>
<p>When searching for existing st... | [
{
"answer_id": 35517,
"author": "gz.",
"author_id": 3665,
"author_profile": "https://Stackoverflow.com/users/3665",
"pm_score": 4,
"selected": true,
"text": "<yourcontainer xmlns:fo=\"http://www.w3.org/1999/XSL/Format\">\n <fo:block font-family=\"Arial, sans-serif\" font-weight=\"bold... | 2008/08/27 | [
"https://Stackoverflow.com/questions/31226",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3044/"
] |
31,238 | <p>What I have is a collection of classes that all implement the same interface but can be pretty wildly different under the hood. I want to have a config file control which of the classes go into the collection upon starting the program, taking something that looks like :</p>
<pre><code><class1 prop1="foo" prop2="... | [
{
"answer_id": 31252,
"author": "Frank Krueger",
"author_id": 338,
"author_profile": "https://Stackoverflow.com/users/338",
"pm_score": 2,
"selected": false,
"text": "Type Activator Type Type"
},
{
"answer_id": 31258,
"author": "Markus Olsson",
"author_id": 2114,
"aut... | 2008/08/27 | [
"https://Stackoverflow.com/questions/31238",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/634/"
] |
31,249 | <p>Using WPF, I have a TreeView control that I want to set its ItemTemplate dynamically through procedural code. How do I do this? I assume I need to find the resource somewhere.</p>
<pre><code>myTreeViewControl.ItemTemplate = ??
</code></pre>
| [
{
"answer_id": 31260,
"author": "Matt Hamilton",
"author_id": 615,
"author_profile": "https://Stackoverflow.com/users/615",
"pm_score": 5,
"selected": true,
"text": "myTreeViewControl.ItemTemplate = this.Resources[\"SomeTemplate\"] as DataTemplate;\n myTreeViewControl.ItemTemplate = this... | 2008/08/27 | [
"https://Stackoverflow.com/questions/31249",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3047/"
] |
31,250 | <p>What is the content type for MHT files?</p>
| [
{
"answer_id": 3262124,
"author": "Luke Quinane",
"author_id": 18437,
"author_profile": "https://Stackoverflow.com/users/18437",
"pm_score": 3,
"selected": false,
"text": "message/rfc822"
},
{
"answer_id": 13154862,
"author": "feeela",
"author_id": 341201,
"author_pro... | 2008/08/27 | [
"https://Stackoverflow.com/questions/31250",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2141/"
] |
31,297 | <p>I developed a program in a mobile device (Pocket PC 2003) to access a web service, the web service is installed on a Windows XP SP2 PC with IIS, the PC has the IP 192.168.5.2. </p>
<p>The device obtains from the wireless network the IP 192.168.5.118 and the program works OK, it calls the method from the web service... | [
{
"answer_id": 31724,
"author": "Shaun Austin",
"author_id": 1120,
"author_profile": "https://Stackoverflow.com/users/1120",
"pm_score": 0,
"selected": false,
"text": "255.255.255.0\n 255.255.0.0\n"
}
] | 2008/08/27 | [
"https://Stackoverflow.com/questions/31297",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1130097/"
] |
31,312 | <p>I am working on a rails project. Using the tag observe_field, I am taking text typed into a text area, processing it in a control, and displaying the result in a div (very similar to the preview in stack overflow). Everything works fine until I type certain special chars.</p>
<ol>
<li>? => causes the variable not t... | [
{
"answer_id": 287822,
"author": "waldo",
"author_id": 4870,
"author_profile": "https://Stackoverflow.com/users/4870",
"pm_score": 3,
"selected": true,
"text": " :with => \"'postbody=' + encodeURIComponent(value)\"\n def textile_to_html\n text = URI.unescape(params['postbody'])\n ...\... | 2008/08/27 | [
"https://Stackoverflow.com/questions/31312",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1632/"
] |
31,320 | <p>What is the best way to profile a controller action in Ruby on Rails. Currently I am using the brute-force method of throwing in <code>puts Time.now</code> calls between what I think will be a bottleneck. But that feels really, really dirty. There has got to be a better way.</p>
| [
{
"answer_id": 31359,
"author": "Chris Bunch",
"author_id": 422,
"author_profile": "https://Stackoverflow.com/users/422",
"pm_score": 3,
"selected": false,
"text": "def test_do_something\n elapsed_time = Benchmark.realtime do\n 100.downto(1) do |index|\n # do something here\n ... | 2008/08/27 | [
"https://Stackoverflow.com/questions/31320",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/757/"
] |
31,326 | <p>I have a few internal .net web application here that require users to "log out" of them. I know this may seem moot on an Intranet application, but nonetheless it is there.</p>
<p>We are using Windows authentication for our Intranet apps, so we tie in to our Active Directory with Basic Authentication and the credent... | [
{
"answer_id": 6289660,
"author": "Keith",
"author_id": 905,
"author_profile": "https://Stackoverflow.com/users/905",
"pm_score": 4,
"selected": false,
"text": "$j.ajax({\n url: '<%:Url.Action(\"LogOff401\", new { id = random })%>',\n type: 'POST',\n username: '<%:random%>',\n ... | 2008/08/27 | [
"https://Stackoverflow.com/questions/31326",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/71/"
] |
31,340 | <p>I've been trying to wrap my head around how threads work in Python, and it's hard to find good information on how they operate. I may just be missing a link or something, but it seems like the official documentation isn't very thorough on the subject, and I haven't been able to find a good write-up.</p>
<p>From wha... | [
{
"answer_id": 31358,
"author": "mmattax",
"author_id": 1638,
"author_profile": "https://Stackoverflow.com/users/1638",
"pm_score": 4,
"selected": false,
"text": "import threading\nclass Foo (threading.Thread):\n def __init__(self,x):\n self.__x = x\n threading.Thread.__... | 2008/08/27 | [
"https://Stackoverflow.com/questions/31340",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/242853/"
] |
31,346 | <p>The MediaElement doesn't support rounded corners (radiusx, radiusy). Should I use a VideoBrush on a Rectangle with rounded corners?</p>
| [
{
"answer_id": 31454,
"author": "Jonas Follesø",
"author_id": 1199387,
"author_profile": "https://Stackoverflow.com/users/1199387",
"pm_score": 3,
"selected": true,
"text": "<MediaElement \n Height=\"132\" Width=\"176\" Source=\"Egypt2007.wmv\" \n Clip=\"M0.5,24.5 C0.5,11.2... | 2008/08/27 | [
"https://Stackoverflow.com/questions/31346",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5/"
] |
31,366 | <p>I am performing a find and replace on the line feed character (<code>&#10;</code>) and replacing it with the paragraph close and paragraph open tags using the following code:</p>
<pre><code><xsl:template match="/STORIES/STORY">
<component>
<xsl:if test="boolean(ARTICLEBODY)">
... | [
{
"answer_id": 31517,
"author": "Mike Haboustak",
"author_id": 2146,
"author_profile": "https://Stackoverflow.com/users/2146",
"pm_score": 1,
"selected": false,
"text": "<xsl:value-of \n select=\"replace(string(.), ' (\\s| )*', '</p><p>')\" />\n <xsl:when test=\"co... | 2008/08/27 | [
"https://Stackoverflow.com/questions/31366",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/274/"
] |
31,380 | <p>I currently use the following function to do a simple HTTP GET.</p>
<pre><code>public static String download(String url) throws java.io.IOException {
java.io.InputStream s = null;
java.io.InputStreamReader r = null;
//java.io.BufferedReader b = null;
StringBuilder content = new StringBuilder();
... | [
{
"answer_id": 32509,
"author": "McDowell",
"author_id": 304,
"author_profile": "https://Stackoverflow.com/users/304",
"pm_score": 3,
"selected": true,
"text": " InputStream stream = new FileInputStream(\"in\");\n try { //no operations between open stream and try block\n //w... | 2008/08/28 | [
"https://Stackoverflow.com/questions/31380",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/338/"
] |
31,394 | <p>I see many similar questions, however I want to find the Username of the currently logged in user using Java.</p>
<p>Its probably something like:</p>
<pre><code>System.getProperty(current.user);
</code></pre>
<p>But, I'm not quite sure.</p>
| [
{
"answer_id": 31401,
"author": "Chris Bunch",
"author_id": 422,
"author_profile": "https://Stackoverflow.com/users/422",
"pm_score": 6,
"selected": true,
"text": "System.getProperty(\"user.name\")\n"
},
{
"answer_id": 41463,
"author": "John Meagher",
"author_id": 3535,
... | 2008/08/28 | [
"https://Stackoverflow.com/questions/31394",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2598/"
] |
31,412 | <p>I am developing a GPL-licensed application in Python and need to know if the GPL allows my program to use proprietary plug-ins. This is <a href="http://www.gnu.org/licenses/gpl-faq.html" rel="noreferrer">what the FSF has to say</a> on the issue:</p>
<blockquote>
<p><strong>If a program released under the GPL uses pl... | [
{
"answer_id": 31420,
"author": "dmckee --- ex-moderator kitten",
"author_id": 2509,
"author_profile": "https://Stackoverflow.com/users/2509",
"pm_score": 1,
"selected": false,
"text": "import"
}
] | 2008/08/28 | [
"https://Stackoverflow.com/questions/31412",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3002/"
] |
31,415 | <p>Using regular expressions, what is the simplest way to fetch a websites HTML and find the value inside this tag (or any attribute's value for that matter):</p>
<pre><code><html>
<head>
[snip]
<meta name="generator" value="thevalue i'm looking for" />
[snip]
</code></pre>
| [
{
"answer_id": 31432,
"author": "Mike Haboustak",
"author_id": 2146,
"author_profile": "https://Stackoverflow.com/users/2146",
"pm_score": 4,
"selected": true,
"text": "StringBuilder html = new StringBuilder();\njava.net.URL url = new URL(\"http://www.google.com/\");\nBufferedReader inpu... | 2008/08/28 | [
"https://Stackoverflow.com/questions/31415",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2644/"
] |
31,424 | <p>When creating a criteria in NHibernate I can use</p>
<p>Restriction.In() or<br>
Restriction.InG()</p>
<p>What is the difference between them?</p>
| [
{
"answer_id": 87823,
"author": "Gareth",
"author_id": 1313,
"author_profile": "https://Stackoverflow.com/users/1313",
"pm_score": 5,
"selected": true,
"text": "In(string propertyName, ICollection values)\n InG<T>(string propertyName, ICollection<T> values)\n"
}
] | 2008/08/28 | [
"https://Stackoverflow.com/questions/31424",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/493/"
] |
31,446 | <p>What would be the easiest way to detach a specific JPA Entity Bean that was acquired through an EntityManager. Alternatively, could I have a query return detached objects in the first place so they would essentially act as 'read only'?</p>
<p>The reason why I want to do this is becuase I want to modify the data wit... | [
{
"answer_id": 31553,
"author": "tonygambone",
"author_id": 3344,
"author_profile": "https://Stackoverflow.com/users/3344",
"pm_score": 1,
"selected": false,
"text": "public Thing(Thing oldBean) {\n this.setPropertyOne(oldBean.getPropertyOne());\n // and so on\n}\n Thing newBean = new ... | 2008/08/28 | [
"https://Stackoverflow.com/questions/31446",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/506/"
] |
31,462 | <p>Without the use of any external library, what is the simplest way to fetch a website's HTML content into a String?</p>
| [
{
"answer_id": 31463,
"author": "pek",
"author_id": 2644,
"author_profile": "https://Stackoverflow.com/users/2644",
"pm_score": 7,
"selected": true,
"text": "String content = null;\nURLConnection connection = null;\ntry {\n connection = new URL(\"http://www.google.com\").openConnection... | 2008/08/28 | [
"https://Stackoverflow.com/questions/31462",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2644/"
] |
31,465 | <p>When you get a badge or aren't logged in to stack overflow there's a groovy little notification bar at the top of the page that lets you know there's something going on.</p>
<p>I know the SOflow team use JQuery, but I was wondering if anyone knew of an implementation of the same style of notification system in asp.... | [
{
"answer_id": 31463,
"author": "pek",
"author_id": 2644,
"author_profile": "https://Stackoverflow.com/users/2644",
"pm_score": 7,
"selected": true,
"text": "String content = null;\nURLConnection connection = null;\ntry {\n connection = new URL(\"http://www.google.com\").openConnection... | 2008/08/28 | [
"https://Stackoverflow.com/questions/31465",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/493/"
] |
31,494 | <p>I have got a simple contacts database but I'm having problems with users entering in duplicate data. I have implemented a simple data comparison but unfortunately the duplicated data that is being entered is not exactly the same. For example, names are incorrectly spelled or one person will put in 'Bill Smith' and a... | [
{
"answer_id": 56507233,
"author": "Community",
"author_id": -1,
"author_profile": "https://Stackoverflow.com/users/-1",
"pm_score": 0,
"selected": false,
"text": "rank John Smith & Apartment A John Smith & Apartment B"
}
] | 2008/08/28 | [
"https://Stackoverflow.com/questions/31494",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/486/"
] |
31,496 | <p>I would like to enable/disable some code based on a custom solution configuration I added in Visual Studio. How do I check this value at runtime?</p>
| [
{
"answer_id": 31507,
"author": "CiNN",
"author_id": 2566,
"author_profile": "https://Stackoverflow.com/users/2566",
"pm_score": 3,
"selected": false,
"text": "#ifdef _ENABLE_CODE1_\nconst codeconfig = 1;\n#else\nconst codeconfig = 2;\n#endif\n"
}
] | 2008/08/28 | [
"https://Stackoverflow.com/questions/31496",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/327/"
] |
31,497 | <p>What are some real world places that call for delegates? I'm curious what situations or patterns are present where this method is the best solution. No code required.</p>
| [
{
"answer_id": 31549,
"author": "Jon Limjap",
"author_id": 372,
"author_profile": "https://Stackoverflow.com/users/372",
"pm_score": 4,
"selected": false,
"text": "myList.Foreach( i => i.DoSomething());\n myList.FindAll( i => i.Name == \"Bob\"); \nmyList.RemoveAll( i => i.Name == \"Bo... | 2008/08/28 | [
"https://Stackoverflow.com/questions/31497",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1635/"
] |
31,498 | <p>I have a generic class that should allow any type, primitive or otherwise. The only problem with this is using <code>default(T)</code>. When you call default on a value type or a string, it initializes it to a reasonable value (such as empty string). When you call <code>default(T)</code> on an object, it returns nul... | [
{
"answer_id": 31512,
"author": "FlySwat",
"author_id": 1965,
"author_profile": "https://Stackoverflow.com/users/1965",
"pm_score": 4,
"selected": false,
"text": "if (typeof(T).IsValueType || typeof(T) == typeof(String))\n{\n return default(T);\n}\nelse\n{\n return Activator.Crea... | 2008/08/28 | [
"https://Stackoverflow.com/questions/31498",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/67/"
] |
31,500 | <p>If I have a query like:</p>
<pre><code>Select EmployeeId
From Employee
Where EmployeeTypeId IN (1,2,3)
</code></pre>
<p>and I have an index on the <code>EmployeeTypeId</code> field, does SQL server still use that index?</p>
| [
{
"answer_id": 31520,
"author": "Kibbee",
"author_id": 1862,
"author_profile": "https://Stackoverflow.com/users/1862",
"pm_score": 6,
"selected": true,
"text": "Employee EmployeeTypeId EmployeeTypeId EmployeeId SELECT EmployeeId FROM Employee WITH (Index(Index_EmployeeTypeId )) WHERE Emp... | 2008/08/28 | [
"https://Stackoverflow.com/questions/31500",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/493/"
] |
31,535 | <p>I'm trying to fetch some HTML from various blogs and have noticed that different providers use the same tag in different ways.</p>
<p>For example, here are two major providers that use the meta name generator tag differently:</p>
<ul>
<li>Blogger: <code><meta content='blogger' name='generator'/></code> (cont... | [
{
"answer_id": 31595,
"author": "martinatime",
"author_id": 1353,
"author_profile": "https://Stackoverflow.com/users/1353",
"pm_score": 0,
"selected": false,
"text": "/<meta\\s.*content=.*>/"
},
{
"answer_id": 31622,
"author": "dwestbrook",
"author_id": 3119,
"author_... | 2008/08/28 | [
"https://Stackoverflow.com/questions/31535",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2644/"
] |
31,551 | <p>Using SqlServer, and trying to update rows from within the same table. I want to use a table alias for readability.
This is the way I am doing it at the moment:</p>
<pre><code>UPDATE ra
SET ra.ItemValue = rb.ItemValue
FROM dbo.Rates ra, dbo.Rates rb
WHERE ra.ResourceID = rb.ResourceID
AND ra.PriceSched = 't8'
AND r... | [
{
"answer_id": 835999,
"author": "Community",
"author_id": -1,
"author_profile": "https://Stackoverflow.com/users/-1",
"pm_score": 5,
"selected": false,
"text": "UPDATE ra \n SET ra.ItemValue = rb.ItemValue\n FROM dbo.Rates ra\n INNER JOIN dbo.Rates rb\n ON ra.ResourceID = rb.... | 2008/08/28 | [
"https://Stackoverflow.com/questions/31551",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2027/"
] |
31,559 | <p><a href="http://www.devexpress.com/Products/NET/ORM/" rel="noreferrer">XPO</a> is the object relational mapper of choice at my company. Any thoughts on the pros and cons?</p>
<hr>
<p>I was just looking for general feeling and anecdotes about the product. We are not switching to XPO. We are just getting rid of hard... | [
{
"answer_id": 2686616,
"author": "Roman Eremin",
"author_id": 318097,
"author_profile": "https://Stackoverflow.com/users/318097",
"pm_score": 0,
"selected": false,
"text": "using System;\nusing DevExpress.Xpo;\nusing DevExpress.Data.Filtering;\nusing NUnit.Framework;\n\nnamespace XpoTdd... | 2008/08/28 | [
"https://Stackoverflow.com/questions/31559",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1455/"
] |
31,561 | <p>Depending on my mood I seem to waffle back and forth between wanting a Lisp-1 and a Lisp-2. Unfortunately beyond the obvious name space differences, this leaves all kinds of amusing function name/etc problems you run into. Case in point, trying to write some code tonight I tried to do (map #'function listvar) whic... | [
{
"answer_id": 31603,
"author": "Alasdair",
"author_id": 2654,
"author_profile": "https://Stackoverflow.com/users/2654",
"pm_score": 4,
"selected": true,
"text": "(map 'list #'function listvar)\n"
}
] | 2008/08/28 | [
"https://Stackoverflow.com/questions/31561",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3326/"
] |
31,567 | <p>I'm trying to wrap my head around reflection, so I decided to add plugin capability to a program that I'm writing. The only way to understand a concept is to get your fingers dirty and write the code, so I went the route of creating a simple interface library consisting of the IPlugin and IHost interfaces, a plugin ... | [
{
"answer_id": 31576,
"author": "Haacked",
"author_id": 598,
"author_profile": "https://Stackoverflow.com/users/598",
"pm_score": 0,
"selected": false,
"text": "Activator.CreateInstance(type, true);\n"
},
{
"answer_id": 178205,
"author": "Community",
"author_id": -1,
... | 2008/08/28 | [
"https://Stackoverflow.com/questions/31567",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1880/"
] |
31,572 | <p>I'm working on a .net solution that is run completely inside a single network. When users make a change to the system, I want to launch an announcement and have everyone else hear it and act accordingly. Is there a way that we can broadcast out messages like this (like UDP will let you do) while keeping guaranteed ... | [
{
"answer_id": 2099535,
"author": "Matthew Herrmann",
"author_id": 232066,
"author_profile": "https://Stackoverflow.com/users/232066",
"pm_score": 1,
"selected": false,
"text": "read(max_size=2) read(max_size=s)"
}
] | 2008/08/28 | [
"https://Stackoverflow.com/questions/31572",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3259/"
] |
31,584 | <p>For classes that have a long list of setters that are used frequently, I found this way very useful (although I have recently read about the <a href="http://en.wikipedia.org/wiki/Builder_pattern" rel="noreferrer">Builder pattern</a> in <em>Effective Java</em> that is kinda the same).</p>
<p>Basically, all setter met... | [
{
"answer_id": 31606,
"author": "martinatime",
"author_id": 1353,
"author_profile": "https://Stackoverflow.com/users/1353",
"pm_score": -1,
"selected": false,
"text": " MyClass\n .setInt(1)\n .setString(\"test\")\n .setBoolean(true)\n ;\n new MyClass(1,\"test\",true);\n"
}... | 2008/08/28 | [
"https://Stackoverflow.com/questions/31584",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2644/"
] |
31,672 | <p>I've recently come to maintain a large amount of scientific calculation-intensive FORTRAN code. I'm having difficulties getting a handle on all of the, say, nuances, of a forty year old language, despite google & two introductory level books. The code is rife with "performance enhancing improvements". Does an... | [
{
"answer_id": 67624,
"author": "user7116",
"author_id": 7116,
"author_profile": "https://Stackoverflow.com/users/7116",
"pm_score": 7,
"selected": true,
"text": "myloop: do ii = 1, nloops\n ! do something\nenddo myloop\n"
},
{
"answer_id": 8818294,
"author": "J . A. Maruh... | 2008/08/28 | [
"https://Stackoverflow.com/questions/31672",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1390/"
] |
31,673 | <p>Wifi support on Vista is fine, but <a href="http://msdn.microsoft.com/en-us/library/bb204766.aspx" rel="nofollow noreferrer">Native Wifi on XP</a> is half baked. <a href="http://msdn.microsoft.com/en-us/library/aa504121.aspx" rel="nofollow noreferrer">NDIS 802.11 Wireless LAN Miniport Drivers</a> only gets you part ... | [
{
"answer_id": 67624,
"author": "user7116",
"author_id": 7116,
"author_profile": "https://Stackoverflow.com/users/7116",
"pm_score": 7,
"selected": true,
"text": "myloop: do ii = 1, nloops\n ! do something\nenddo myloop\n"
},
{
"answer_id": 8818294,
"author": "J . A. Maruh... | 2008/08/28 | [
"https://Stackoverflow.com/questions/31673",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2514/"
] |
31,693 | <p>I mostly use Java and generics are relatively new. I keep reading that Java made the wrong decision or that .NET has better implementations etc. etc.</p>
<p>So, what are the main differences between C++, C#, Java in generics? Pros/cons of each?</p>
| [
{
"answer_id": 31758,
"author": "Konrad Rudolph",
"author_id": 1968,
"author_profile": "https://Stackoverflow.com/users/1968",
"pm_score": 6,
"selected": false,
"text": "template <unsigned int N>\nstruct product {\n static unsigned int const VALUE = N * product<N - 1>::VALUE;\n};\n\nt... | 2008/08/28 | [
"https://Stackoverflow.com/questions/31693",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2644/"
] |
31,701 | <p>I have a mapping application that needs to draw a path, and then display icons on top of the path. I can't find a way to control the order of virtual earth layers, other than the order in which they are added. </p>
<p>Does anyone know how to change the z index of Virtual Earth shape layers, or force a layer to the ... | [
{
"answer_id": 31758,
"author": "Konrad Rudolph",
"author_id": 1968,
"author_profile": "https://Stackoverflow.com/users/1968",
"pm_score": 6,
"selected": false,
"text": "template <unsigned int N>\nstruct product {\n static unsigned int const VALUE = N * product<N - 1>::VALUE;\n};\n\nt... | 2008/08/28 | [
"https://Stackoverflow.com/questions/31701",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2785/"
] |
31,708 | <p>I am using LINQ to query a generic dictionary and then use the result as the datasource for my ListView (WebForms).</p>
<p>Simplified code:</p>
<pre><code>Dictionary<Guid, Record> dict = GetAllRecords();
myListView.DataSource = dict.Values.Where(rec => rec.Name == "foo");
myListView.DataBind();
</code></p... | [
{
"answer_id": 31710,
"author": "Matt Hamilton",
"author_id": 615,
"author_profile": "https://Stackoverflow.com/users/615",
"pm_score": 6,
"selected": true,
"text": "var matches = dict.Values.Where(rec => rec.Name == \"foo\").ToList();\n"
},
{
"answer_id": 31712,
"author": "l... | 2008/08/28 | [
"https://Stackoverflow.com/questions/31708",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/202/"
] |
31,722 | <p>I'm interested in seeing a good diff algorithm, possibly in Javascript, for rendering a side-by-side diff of two HTML pages. The idea would be that the diff would show the differences of the <em>rendered</em> HTML.</p>
<p>To clarify, I want to be able to see the side-by-side diffs <em>as</em> rendered output. So if... | [
{
"answer_id": 31728,
"author": "Josh",
"author_id": 257,
"author_profile": "https://Stackoverflow.com/users/257",
"pm_score": 1,
"selected": false,
"text": "<font face=\"Arial\">Hi Mom</font>\n <span style=\"font-family:Arial;\">Hi Mom</span>\n"
},
{
"answer_id": 33500,
"aut... | 2008/08/28 | [
"https://Stackoverflow.com/questions/31722",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/598/"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.