qid
int64
4
19.1M
question
stringlengths
18
48.3k
answers
list
date
stringlengths
10
10
metadata
list
178,751
<p>Here is the sample:</p> <pre><code> Dim TestString As String = "Hello," &amp; Chr(0) &amp; "World" MsgBox(TestString, , "TestString.Length=" &amp; TestString.Length.ToString) </code></pre> <p>Result - Messagebox shows "Hello," with title says TestString.Length=12 </p> <p>I guess the chr(0) is treated as th...
[ { "answer_id": 178784, "author": "Ryan", "author_id": 17917, "author_profile": "https://Stackoverflow.com/users/17917", "pm_score": 1, "selected": false, "text": "TestString.Replace(chr(0), \" \")" }, { "answer_id": 67020757, "author": "UnhandledException-InvalidChar", "a...
2008/10/07
[ "https://Stackoverflow.com/questions/178751", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12369/" ]
178,762
<p>Sorry, I couldn't figure out a good way to phrase my real question.</p> <p>I run a high-traffic ASP.NET site on a 64-bit machine. I have IIS running in 32-bit mode, however, due to some legacy components of the app. I am running this particular web app inside an application pool that has the web garden option on ...
[ { "answer_id": 250065, "author": "Pure.Krome", "author_id": 30674, "author_profile": "https://Stackoverflow.com/users/30674", "pm_score": 1, "selected": false, "text": "0:027 !runaway\nUser Mode Time\nThread Time\n18:704 0 days 0:00:17.843 <-- Thread #18\n19:9f4 0 day...
2008/10/07
[ "https://Stackoverflow.com/questions/178762", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22299/" ]
178,809
<p>I am trying to fix some bugs in a product I inherited, and I have this snippet of javascript that is supposed to hilight a couple of boxes and pop up a confirm box. What currently happens is I see the boxes change color and there is a 5 or so second delay, then it's as if the missing confirm just accepts itself. D...
[ { "answer_id": 178825, "author": "Joel Coehoorn", "author_id": 3043, "author_profile": "https://Stackoverflow.com/users/3043", "pm_score": 1, "selected": false, "text": ".focus() .style.background .focus()" }, { "answer_id": 178832, "author": "Gordon Bell", "author_id": 1...
2008/10/07
[ "https://Stackoverflow.com/questions/178809", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13593/" ]
178,821
<p>I have seen arguments for using explicit interfaces as a method of locking a classes usage to that interface. The argument seems to be that by forcing others to program to the interface you can ensure better decoupling of the classes and allow easier testing.</p> <p>Example:</p> <pre><code>public interface ICut {...
[ { "answer_id": 178830, "author": "skaffman", "author_id": 21234, "author_profile": "https://Stackoverflow.com/users/21234", "pm_score": 0, "selected": false, "text": "Cut() ICut" }, { "answer_id": 178843, "author": "Mitch Wheat", "author_id": 16076, "author_profile": ...
2008/10/07
[ "https://Stackoverflow.com/questions/178821", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23855/" ]
178,837
<p>I am looking for a regex that will find repeating letters. So any letter twice or more, for example:</p> <pre><code>booooooot or abbott </code></pre> <p>I won't know the letter I am looking for ahead of time. </p> <p>This is a question I was asked in interviews and then asked in interviews. Not so many people get...
[ { "answer_id": 178851, "author": "Jonathan Lonowski", "author_id": 15031, "author_profile": "https://Stackoverflow.com/users/15031", "pm_score": 3, "selected": false, "text": "/(\\w)\\1+/g\n" }, { "answer_id": 178854, "author": "Joseph Pecoraro", "author_id": 792, "au...
2008/10/07
[ "https://Stackoverflow.com/questions/178837", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3208/" ]
178,838
<p>Structs seem like a useful way to parse a binary blob of data (ie a file or network packet). This is fine and dandy until you have variable size arrays in the blob. For instance:</p> <pre><code>struct nodeheader{ int flags; int data_size; char data[]; }; </code></pre> <p>This allows me to...
[ { "answer_id": 178896, "author": "Adam Rosenfield", "author_id": 9530, "author_profile": "https://Stackoverflow.com/users/9530", "pm_score": 2, "selected": false, "text": "nodeheader *nh = (nodeheader *)malloc(sizeof(nodeheader) + max_data_size);\n struct nodeheader\n{\n char *data;\n ...
2008/10/07
[ "https://Stackoverflow.com/questions/178838", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13257/" ]
178,845
<p>Is there some simple way to calculate a Weeknumber value from a date value stored in XML?</p> <p>It needs to be pure XSLT solution. I cannot use any code :(</p>
[ { "answer_id": 178885, "author": "Mark", "author_id": 5904, "author_profile": "https://Stackoverflow.com/users/5904", "pm_score": -1, "selected": false, "text": "Dim SomeDate As Date = ReadDateFromXML()\nDim YearStart As New Date(Year(SomeDate), 1, 1)\nDim WeekNumber As Integer = DateDif...
2008/10/07
[ "https://Stackoverflow.com/questions/178845", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15626/" ]
178,846
<p>I installed the ReSharper evaluation version and uninstalled it. Afterwards Visual Studio's Intellisense stopped working. I have restarted computer but I still have this problem. </p> <p>Can anyone please help me here?</p> <p>I am using Visual Studio 2005. Thanks.</p>
[ { "answer_id": 178893, "author": "Gordon Bell", "author_id": 16473, "author_profile": "https://Stackoverflow.com/users/16473", "pm_score": 6, "selected": true, "text": "devenv.exe /ResetSettings\n" } ]
2008/10/07
[ "https://Stackoverflow.com/questions/178846", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20933/" ]
178,857
<p>Is it possible to get the text of an <code>OleDbCommand</code> with all parameters replaced with their values? E.g. in the code below I'm looking for a way to get the query text </p> <pre><code>SELECT * FROM my_table WHERE c1 = 'hello' and c2 = 'world' </code></pre> <p>after I finished assigning the parameters.</p...
[ { "answer_id": 178883, "author": "Joel Coehoorn", "author_id": 3043, "author_profile": "https://Stackoverflow.com/users/3043", "pm_score": 4, "selected": true, "text": "? @parametername .ComposeSQL()" } ]
2008/10/07
[ "https://Stackoverflow.com/questions/178857", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11387/" ]
178,860
<p>I'm trying to use a Microsoft Access database for a demo project that I'm thinking of doing in either CodeIgniter or CakePHP. Ignoring the possible folly of using Microsoft Access, I haven't been able to figure out precisely how the connection string corresponds to the frameworks' database settings. In straight PHP,...
[ { "answer_id": 260567, "author": "JayTee", "author_id": 20153, "author_profile": "https://Stackoverflow.com/users/20153", "pm_score": 3, "selected": true, "text": "$db['access']['hostname'] = \"<dsn name>\";\n$db['access']['username'] = \"\";\n$db['access']['password'] = \"\";\n$db['acce...
2008/10/07
[ "https://Stackoverflow.com/questions/178860", "https://Stackoverflow.com", "https://Stackoverflow.com/users/24197/" ]
178,863
<p>I am building a product that we are eventually going to white-label. Right now I am trying to figure out the best way to facilitate these requirements programmatically so the user can update the basic design of the site (ie header color, etc) via their profile/settings form. </p> <p>Requirements: </p> <ol> <li>Use...
[ { "answer_id": 178891, "author": "y0mbo", "author_id": 417, "author_profile": "https://Stackoverflow.com/users/417", "pm_score": -1, "selected": false, "text": "<style>" }, { "answer_id": 179001, "author": "Mr. Shiny and New 安宇", "author_id": 7867, "author_profile": "...
2008/10/07
[ "https://Stackoverflow.com/questions/178863", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12442/" ]
178,876
<p>In this asp.net I'm cleaning up it's possible for deadlocks to occur. I want to make sure that the code deals with them properly, so I'm trying to write NUnit tests which trigger a deadlock.....</p> <p>The DAO is split by entity. Each entity has a set of tests which are surrounded by Startup() and Teardown() meth...
[ { "answer_id": 185025, "author": "Josh Kodroff", "author_id": 549, "author_profile": "https://Stackoverflow.com/users/549", "pm_score": 3, "selected": true, "text": "MockObject mo = MockManager.MockObject(typeof(MyDeadlockException));\nmock.ExpectAndThrow(\"MyMethod\", (MyDeadlockExcepti...
2008/10/07
[ "https://Stackoverflow.com/questions/178876", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6969/" ]
178,887
<p>Is it is possible, with <a href="http://en.wikipedia.org/wiki/Windows_Forms" rel="nofollow noreferrer">Windows Forms</a> in .NET, to change the opacity of a form without it automatically changing the opacity of the controls within the form?</p> <p>I have a form that is running maximized, that contains a flowlayoutp...
[ { "answer_id": 179022, "author": "Jeff Yates", "author_id": 23234, "author_profile": "https://Stackoverflow.com/users/23234", "pm_score": 0, "selected": false, "text": "Opacity Form Control" } ]
2008/10/07
[ "https://Stackoverflow.com/questions/178887", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6165/" ]
178,888
<p>This is a minor bug (one I'm willing to live with in the interest of go-live, frankly), but I'm wondering if anyone else has ideas to fix it.</p> <p>I have a C# WinForms application. When the app is launched via the executable (not via the debugger), the first thing the user sees is a console window, followed by th...
[ { "answer_id": 178955, "author": "Stephen Deken", "author_id": 7154, "author_profile": "https://Stackoverflow.com/users/7154", "pm_score": 1, "selected": false, "text": "AllocConsole() UseShellExecute=false; CreateNoWindow=true;" }, { "answer_id": 179084, "author": "John Rudy...
2008/10/07
[ "https://Stackoverflow.com/questions/178888", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14048/" ]
178,898
<p>I have a program that uses the built in webbrowser control. At some point during the usage of this, I'm not sure at what point, but it appears to be random, I get the following error:</p> <pre><code>System.AccessViolationException FullText = System.AccessViolationException: Attempted to read or write protected me...
[ { "answer_id": 1920554, "author": "Darkmage", "author_id": 173728, "author_profile": "https://Stackoverflow.com/users/173728", "pm_score": 0, "selected": false, "text": "\"bcdedit.exe /set {current} nx AlwaysOff\"\n" }, { "answer_id": 5223166, "author": "Filip Navara", "a...
2008/10/07
[ "https://Stackoverflow.com/questions/178898", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12969/" ]
178,899
<p>I have a collection of classes that I want to serialize out to an XML file. It looks something like this:</p> <pre><code>public class Foo { public List&lt;Bar&gt; BarList { get; set; } } </code></pre> <p>Where a bar is just a wrapper for a collection of properties, like this:</p> <pre><code>public class Bar { ...
[ { "answer_id": 178931, "author": "Carl", "author_id": 951280, "author_profile": "https://Stackoverflow.com/users/951280", "pm_score": 6, "selected": true, "text": "public partial class Form1 : Form\n{\n public Form1()\n {\n InitializeComponent();\n }\n\n private void b...
2008/10/07
[ "https://Stackoverflow.com/questions/178899", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4019/" ]
178,904
<pre><code>var something = { wtf: null, omg: null }; </code></pre> <p>My JavaScript knowledge is still horribly patchy since I last programmed with it, but I think I've relearned most of it now. Except for this. I don't recall ever seeing this before. What is it? And where can I learn more about it?</p>
[ { "answer_id": 178916, "author": "Aaron Maenpaa", "author_id": 2603, "author_profile": "https://Stackoverflow.com/users/2603", "pm_score": 4, "selected": false, "text": "var something = new Object();\nsomething.wtf = null;\nsomething.omg = null;\n" }, { "answer_id": 178918, "...
2008/10/07
[ "https://Stackoverflow.com/questions/178904", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19825/" ]
178,909
<p>I have a C# form into which I've placed a left-docked <code>MenuStrip</code>. This <code>MenuStrip</code> contains some menu items which contain submenus, and some menu items which are effectively buttons (clicking on them results in an action taking place; n.b., I realize this is not a good design).</p> <p>I woul...
[ { "answer_id": 179087, "author": "Stephen Deken", "author_id": 7154, "author_profile": "https://Stackoverflow.com/users/7154", "pm_score": 0, "selected": false, "text": "protected override void OnRenderItemText(ToolStripItemTextRenderEventArgs e)\n{\n base.OnRenderItemText(e);\n if...
2008/10/07
[ "https://Stackoverflow.com/questions/178909", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7154/" ]
178,913
<p>Here's the jist of the problem: Given a list of sets, such as:</p> <pre><code>[ (1,2,3), (5,2,6), (7,8,9), (6,12,13), (21,8,34), (19,20) ] </code></pre> <p>Return a list of groups of the sets, such that sets that have a shared element are in the same group.</p> <pre><code>[ [ (1,2,3), (5,2,6), (6,12,13) ], [ (7,8...
[ { "answer_id": 178940, "author": "Matt Price", "author_id": 852, "author_profile": "https://Stackoverflow.com/users/852", "pm_score": 1, "selected": false, "text": "nodes = [ [1,2,3], [2,4,5], [6,7,8], [10,11,12], [7,10,13], [12], [] ]\nlinks = [ set() for x in nodes ]\n\n#first find the...
2008/10/07
[ "https://Stackoverflow.com/questions/178913", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7581/" ]
178,915
<p>What do I need to do to save an image my program has generated (possibly from the camera, possibly not) to the system photo library on the iPhone?</p>
[ { "answer_id": 179066, "author": "Martin Gordon", "author_id": 2481, "author_profile": "https://Stackoverflow.com/users/2481", "pm_score": 10, "selected": true, "text": "UIImageWriteToSavedPhotosAlbum(UIImage *image, \n id completionTarget, \n ...
2008/10/07
[ "https://Stackoverflow.com/questions/178915", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20626/" ]
178,921
<p>I have the following code in my file to load a div with HTML from an AJAX call:</p> <pre><code>$('#searchButton').click( function() { $('#inquiry').load('/search.php?pid=' + $('#searchValue').val()); }); </code></pre> <p>This works fine in Firefox and Google Chrome, but whenever I do the search in IE I get red...
[ { "answer_id": 178942, "author": "Steve g", "author_id": 12092, "author_profile": "https://Stackoverflow.com/users/12092", "pm_score": 2, "selected": false, "text": "$('#searchButton').click( function(e) {\n $('#inquiry').load('/search.php?pid=' + $('#searchValue').val());\n e.prev...
2008/10/07
[ "https://Stackoverflow.com/questions/178921", "https://Stackoverflow.com", "https://Stackoverflow.com/users/204/" ]
178,934
<p>In the STL library some containers have iterators and it is commonly held that they are a superior way of iterating through these containers rather than simple for loops e.g.</p> <pre><code>for ( int i=0; i &lt; vecVector.size(); i++ ) { .. } </code></pre> <p>Can anyone tell me why and in what cases I should use...
[ { "answer_id": 178989, "author": "Dave Van den Eynde", "author_id": 455874, "author_profile": "https://Stackoverflow.com/users/455874", "pm_score": 1, "selected": false, "text": "#include <algorithm>\n\nvoid printvalue(double s)\n{\n // Do something with s\n}\n\nint _tmain(int argc, _...
2008/10/07
[ "https://Stackoverflow.com/questions/178934", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18664/" ]
178,936
<p>I am working on a build system. The build system posts the results as a zip file in a directory. Unfortunately I have no easy way to know the name of the zip file, because it is timestamped. For the next operation, I must decompress this zip file to some specific location and then do some more file operations.</p...
[ { "answer_id": 179016, "author": "David Webb", "author_id": 3171, "author_profile": "https://Stackoverflow.com/users/3171", "pm_score": 5, "selected": true, "text": "FOR /F usebackq %%i IN (`DIR /B /O-D *.ZIP`) DO UNZIP %%i && GOTO DONE || GOTO DONE\n:DONE\n DIR /B /O-D *.ZIP FOR /F useb...
2008/10/07
[ "https://Stackoverflow.com/questions/178936", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2309/" ]
178,948
<p>I have a repeater that outputs divs like the following for every item returned from some method.</p> <pre><code>&lt;div class="editor-area"&gt; &lt;div class="title"&gt;the title&lt;/div&gt; &lt;div&gt;the description&lt;/div&gt; &lt;div class="bottom-bar"&gt; &lt;a href="link"&gt;Modify&lt;/a&g...
[ { "answer_id": 179021, "author": "Craig Stuntz", "author_id": 7714, "author_profile": "https://Stackoverflow.com/users/7714", "pm_score": 4, "selected": true, "text": "$(\"div.title\").hide();\n $(\"div.title:contains(searchText)\").show();\n" } ]
2008/10/07
[ "https://Stackoverflow.com/questions/178948", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3226/" ]
178,952
<p>In the code below I use <code>mpf_add</code> to add the string representation of two floating values. What I don't understand at this point is why <code>2.2 + 3.2 = 5.39999999999999999999999999999999999999</code>. I would have thought that <code>gmp</code> was smart enough to give <code>5.4</code>. </p> <p>What am ...
[ { "answer_id": 184167, "author": "bugmagnet", "author_id": 426, "author_profile": "https://Stackoverflow.com/users/426", "pm_score": 1, "selected": false, "text": "2.1 3.457 2.100 mpz_add 2100 3457 5557 5.557 function fadd( n1, n2 )\n dim s1, s2, max, mul, res\n normalise3 n1, n2, ...
2008/10/07
[ "https://Stackoverflow.com/questions/178952", "https://Stackoverflow.com", "https://Stackoverflow.com/users/426/" ]
178,963
<p>I have this working definition:</p> <pre><code>IDENTIFIER [a-zA-Z][a-zA-Z0-9]* </code></pre> <p>I don't want to keep repeating the [a-zA-Z] and [0-9], so I made two new definitions</p> <pre><code>DIGIT [0-9] VALID [a-zA-Z] </code></pre> <p>How can I rewrite the IDENTIFIER rule to use the DIGIT and VALID ...
[ { "answer_id": 178987, "author": "Keng", "author_id": 730, "author_profile": "https://Stackoverflow.com/users/730", "pm_score": -1, "selected": false, "text": "(?:[a-zA-Z])+(?:[0-9])+\n" }, { "answer_id": 179058, "author": "Ben Doom", "author_id": 12267, "author_profi...
2008/10/07
[ "https://Stackoverflow.com/questions/178963", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18403/" ]
178,964
<p><a href="https://stackoverflow.com/q/133925">JavaScript post request like a form submit</a> shows you how to submit a form that you create via POST in JavaScript. Below is my modified code.</p> <pre><code>var form = document.createElement("form"); form.setAttribute("method", "post"); form.setAttribute("action", "t...
[ { "answer_id": 179015, "author": "liggett78", "author_id": 19762, "author_profile": "https://Stackoverflow.com/users/19762", "pm_score": 9, "selected": true, "text": "<form target=\"_blank\" ...></form>\n form.setAttribute(\"target\", \"_blank\");\n" }, { "answer_id": 180999, ...
2008/10/07
[ "https://Stackoverflow.com/questions/178964", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
178,973
<p>I'm a big fan of <a href="http://logging.apache.org/log4net" rel="noreferrer">log4net</a>, but recently, some (in my department) have questioned its inclusion in our projects because of the seemingly heaviness of each logging method. I would argue that there are better techniques than others, but that's another ques...
[ { "answer_id": 179120, "author": "Will Hartung", "author_id": 13663, "author_profile": "https://Stackoverflow.com/users/13663", "pm_score": 5, "selected": true, "text": "log.debug(\"Runtime error. Order #\" + order.getOrderNo() + \" is not posted.\");\n log.debug(\"Something wrong with t...
2008/10/07
[ "https://Stackoverflow.com/questions/178973", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5619/" ]
178,976
<p>I am wondering what everyone thinks the best method of handling results from your own database is. Other teams may be involved and there is always the chance the procedure/data could be altered and erroneous results would occur. My question is this. Is it better to let and exception occur, catch and log it or try to...
[ { "answer_id": 182550, "author": "AJ.", "author_id": 7211, "author_profile": "https://Stackoverflow.com/users/7211", "pm_score": 0, "selected": false, "text": "try // wrap everything in a try/catch to handle things I haven't thought of\n{\n\n if ( !dr.Table.Columns.Contains(\"column\"...
2008/10/07
[ "https://Stackoverflow.com/questions/178976", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8873/" ]
178,977
<p>In the Ajax toolkit you can use a Tab Container and add TabPanels to this. </p> <p>I have some controls that I want to be able to use across all tabs and the tailor the tabs with other controls as neccessary. </p> <p>My question is how do I reuse a panel on multiple tabs? Essentially I after something like this</...
[ { "answer_id": 179246, "author": "Andy Brudtkuhl", "author_id": 12442, "author_profile": "https://Stackoverflow.com/users/12442", "pm_score": 2, "selected": true, "text": "<TabContainer>\n <tabPanel1>\n <contentTemplate>\n <uc1:MyControl id=\"myControl\" runat=\"server\" />\n ...
2008/10/07
[ "https://Stackoverflow.com/questions/178977", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11802/" ]
179,004
<p>Every time I make a project I develop several generic routines/modules/libraries that I expect I'll be using with other projects.</p> <p>Due to the speed of development I don't spend a lot of time making these modules perfect - just good enough for this project, and well enough documented and isolatable that I can ...
[ { "answer_id": 179116, "author": "ephemient", "author_id": 20713, "author_profile": "https://Stackoverflow.com/users/20713", "pm_score": 5, "selected": true, "text": "svn:externals svn://svn/shared svn:externals shared shared shared svn:externals shared svn:externals" } ]
2008/10/07
[ "https://Stackoverflow.com/questions/179004", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2915/" ]
179,014
<p>I am using PHP with Apache on Linux, with Sendmail. I use the PHP <a href="http://php.net/manual/en/function.mail.php" rel="noreferrer"><code>mail</code></a> function. The email is sent, but the envelope has the <code>Apache_user@localhostname</code> in <code>MAIL FROM</code> (example nobody@conniptin.internal) and ...
[ { "answer_id": 179061, "author": "Lucas Oman", "author_id": 6726, "author_profile": "https://Stackoverflow.com/users/6726", "pm_score": 7, "selected": true, "text": "mail('to@blah.com','subject!','body!','From: from@blah.com','-f from@blah.com');\n" }, { "answer_id": 179069, ...
2008/10/07
[ "https://Stackoverflow.com/questions/179014", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13667/" ]
179,026
<p>In Gmail, I have a bunch of labeled messages.</p> <p>I'd like to use an IMAP client to get those messages, but I'm not sure what the search incantation is.</p> <pre><code>c = imaplib.IMAP4_SSL('imap.gmail.com') c.list() ('OK', [..., '(\\HasNoChildren) "/" "GM"', ...]) c.search(???) </code></pre> <p>I'm not findin...
[ { "answer_id": 421752, "author": "cdleary", "author_id": 3594, "author_profile": "https://Stackoverflow.com/users/3594", "pm_score": 5, "selected": true, "text": "imaplib SELECT IMAP4.list imaplib r'(\\HasNoChildren) \"/\"' /" }, { "answer_id": 3101260, "author": "Avadhesh", ...
2008/10/07
[ "https://Stackoverflow.com/questions/179026", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17732/" ]
179,054
<p>I'm writing an app which for various reasons involves Internet Explorer (IE7, for the record), ActiveX controls, and a heroic amount of JavaScript, which is spread across multiple .js includes. </p> <p>One of our remote testers is experiencing an error message and IE's error message says something to the effect of:...
[ { "answer_id": 179101, "author": "EndangeredMassa", "author_id": 106, "author_profile": "https://Stackoverflow.com/users/106", "pm_score": 2, "selected": false, "text": "View > Source > Dom (Page)\n" }, { "answer_id": 179115, "author": "dlamblin", "author_id": 459, "a...
2008/10/07
[ "https://Stackoverflow.com/questions/179054", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2577/" ]
179,063
<p>How can dynamic Key-value pairs of objects be stored in app.config in using the application settings api, at runtime?</p> <p>I've been trying to get my head around, and I can't find any meaningful example or documentation.</p> <p>I seems that .Net dictionary classes can't be serialized in XML to store them in app....
[ { "answer_id": 179136, "author": "Nick", "author_id": 22407, "author_profile": "https://Stackoverflow.com/users/22407", "pm_score": 2, "selected": false, "text": "// Open App.Config of executable\nSystem.Configuration.Configuration config = ConfigurationManager.OpenExeConfiguration(Confi...
2008/10/07
[ "https://Stackoverflow.com/questions/179063", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4685/" ]
179,085
<p>What is the difference between creating one index across multiple columns versus creating multiple indexes, one <em>per</em> column?</p> <p>Are there reasons why one should be used over the other?</p> <p>For example:</p> <pre><code>Create NonClustered Index IX_IndexName On TableName (Column1 Asc, Column2 Asc, Column...
[ { "answer_id": 179133, "author": "MobyDX", "author_id": 3923, "author_profile": "https://Stackoverflow.com/users/3923", "pm_score": 6, "selected": false, "text": "SELECT *\nFROM TableName\nWHERE Column1=1 AND Column2=2 AND Column3=3\n" } ]
2008/10/07
[ "https://Stackoverflow.com/questions/179085", "https://Stackoverflow.com", "https://Stackoverflow.com/users/383/" ]
179,102
<p>I want to get a <code>System.Type</code> given only the type name in a <code>string</code>.</p> <p>For instance, if I have an object:</p> <pre><code>MyClass abc = new MyClass(); </code></pre> <p>I can then say:</p> <pre><code>System.Type type = abc.GetType(); </code></pre> <p>But what if all I have is:</p> <pr...
[ { "answer_id": 179110, "author": "Chris Marasti-Georg", "author_id": 96, "author_profile": "https://Stackoverflow.com/users/96", "pm_score": 5, "selected": false, "text": "Type type = Type.GetType(\"foo.bar.MyClass, foo.bar\");\n" }, { "answer_id": 179111, "author": "jalbert"...
2008/10/07
[ "https://Stackoverflow.com/questions/179102", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10722/" ]
179,105
<p>I recall reading somewhere that using references to smart pointers can cause memory corruption. Is this simply because of using the reference of the smart pointer after its been destroyed? Or does the reference counting get messed up?</p> <p>Thanks for clarifying</p>
[ { "answer_id": 19118453, "author": "John Morrison", "author_id": 2835233, "author_profile": "https://Stackoverflow.com/users/2835233", "pm_score": 0, "selected": false, "text": "const smart_ptr<T>&\n" } ]
2008/10/07
[ "https://Stackoverflow.com/questions/179105", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16496/" ]
179,112
<p>I'm using Exchange Web Services to Find, Create, Update, and Delete appointments from the calendars for one or more people. The application would be used by a manager to view employees' vacation time, as well as assign appointments based on availability.</p> <p>In order for this to all work, an authenticated user's...
[ { "answer_id": 6224082, "author": "Pooli", "author_id": 288967, "author_profile": "https://Stackoverflow.com/users/288967", "pm_score": 1, "selected": false, "text": "public static ExchangeService GetService()\n{\n var webCredentials = new WebCredentials(CredentialCache.DefaultNetwork...
2008/10/07
[ "https://Stackoverflow.com/questions/179112", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3018/" ]
179,113
<p>Say I've got two scheduled processes: A and B.</p> <p>Given that B should not run until A has completed, how might I gracefully enforce this dependency?</p> <p>Approaches that have been considered:</p> <ol> <li><p>Have A schedule B upon completion. This has the downside of B never being scheduled if for some reas...
[ { "answer_id": 179118, "author": "warren", "author_id": 4418, "author_profile": "https://Stackoverflow.com/users/4418", "pm_score": 3, "selected": true, "text": "A && B\n" } ]
2008/10/07
[ "https://Stackoverflow.com/questions/179113", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4061/" ]
179,119
<p>I am learning and using Emacs. What I found annoying is that Ctrl-Space input will be stolen by Windows XP to switch the language bar instead of setting the mark in Emacs. The "language bar" is the native input languages selection such as Chinese keyboard other than English keyboard. Is there a way to temporarily...
[ { "answer_id": 12675127, "author": "Kache", "author_id": 234593, "author_profile": "https://Stackoverflow.com/users/234593", "pm_score": 3, "selected": false, "text": "Start regedit HKEY_CURRENT_USER/Control Panel/Input Method/Hot Keys 00000070 Chinese (Traditional) IME - Ime/NonIme Togg...
2008/10/07
[ "https://Stackoverflow.com/questions/179119", "https://Stackoverflow.com", "https://Stackoverflow.com/users/24020/" ]
179,123
<p>I wrote the wrong thing in a commit message.</p> <p>How can I change the message? The commit has not been pushed yet.</p>
[ { "answer_id": 179147, "author": "EfForEffort", "author_id": 14113, "author_profile": "https://Stackoverflow.com/users/14113", "pm_score": 15, "selected": true, "text": "git commit --amend\n git commit --amend -m \"New commit message\"\n git push <remote> <branch> --force\n# Or\ngit push...
2008/10/07
[ "https://Stackoverflow.com/questions/179123", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7473/" ]
179,128
<p>I'm starting a project which requires reading outlook msg files in c#. I have the specs for compound documents but am having trouble reading them in c#. Any pointers would be greatly appreciated.</p> <p>Thanks.</p>
[ { "answer_id": 179323, "author": "Jorge Ferreira", "author_id": 6508, "author_profile": "https://Stackoverflow.com/users/6508", "pm_score": 5, "selected": true, "text": "namespace cs_console_app\n{\n using System;\n using System.Runtime.InteropServices;\n using System.Runtime.In...
2008/10/07
[ "https://Stackoverflow.com/questions/179128", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16834/" ]
179,173
<p>I have an XmlDocument that already exists and is read from a file. </p> <p>I would like to add a chunk of Xml to a node in the document. Is there a good way to create and add all the nodes without cluttering my code with many .CreateNote and .AppendChild calls?</p> <p>I would like some way of making a string or st...
[ { "answer_id": 179191, "author": "user7116", "author_id": 7116, "author_profile": "https://Stackoverflow.com/users/7116", "pm_score": 8, "selected": true, "text": "XmlDocument xdoc = new XmlDocument();\nxdoc.LoadXml(@\"<MyXml><Employee></Employee></MyXml>\");\n\nXmlDocumentFragment xfrag...
2008/10/07
[ "https://Stackoverflow.com/questions/179173", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2871/" ]
179,213
<p>This is a multiple question for the same pre-processing instruction.</p> <h2>1 - &lt;&gt; or &quot;&quot; ?</h2> <p>Apart from the info found in the MSDN:</p> <p><a href="https://msdn.microsoft.com/en-us/library/36k2cdd4.aspx" rel="noreferrer" title="#include Directive (C-C++)">#include Directive (C-C++)</a></p> <p>...
[ { "answer_id": 179248, "author": "Evan Teran", "author_id": 13430, "author_profile": "https://Stackoverflow.com/users/13430", "pm_score": 3, "selected": false, "text": "#include <SDL/whatever.h>\n #include <sys/io.h>\n#include <linux/limits.h>\n" }, { "answer_id": 179261, "au...
2008/10/07
[ "https://Stackoverflow.com/questions/179213", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14089/" ]
179,223
<p>I want to add my own member to the StringBuilder class, but when I go to create it IntelliSense doesn't bring it up.</p> <pre><code>public class myStringBuilder() Inherits System.Text.[StringBuilder should be here] .... end class </code></pre> <p>Is it even possible? thanks</p>
[ { "answer_id": 179240, "author": "Jeff Yates", "author_id": 23234, "author_profile": "https://Stackoverflow.com/users/23234", "pm_score": 5, "selected": true, "text": "StringBuilder NotInheritable sealed StringBuilder" }, { "answer_id": 179406, "author": "Jeff B", "author...
2008/10/07
[ "https://Stackoverflow.com/questions/179223", "https://Stackoverflow.com", "https://Stackoverflow.com/users/25515/" ]
179,254
<p>Has anyone got this working in a web application? </p> <p>No matter what I do it seems that my appSettings section (redirected from web.config using appSettings file=".\Site\site.config") does not get reloaded. </p> <p>Am I doomed to the case of having to just restart the application? I was hoping this method woul...
[ { "answer_id": 494972, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": -1, "selected": false, "text": "Dim config As System.Configuration.Configuration = WebConfigurationManager.OpenWebConfiguration(\"~\")\n Return config.AppSe...
2008/10/07
[ "https://Stackoverflow.com/questions/179254", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5777/" ]
179,255
<p>If I have an Address object which implements IEditableObject, I might have EndEdit implementation like this:</p> <pre><code>public void EndEdit() { // BeginEdit would set _editInProgress and update *Editing fields; if (_editInProgress) { _line1 = _line1Editing; _line2 = _line2Editing; ...
[ { "answer_id": 179458, "author": "akmad", "author_id": 1314, "author_profile": "https://Stackoverflow.com/users/1314", "pm_score": 1, "selected": false, "text": "try {\n //do stuff\n}\ncatch (Exception ex) {\n //reset\n\n //rethrow exception\n throw;\n}\n" }, { "answer_id": 3...
2008/10/07
[ "https://Stackoverflow.com/questions/179255", "https://Stackoverflow.com", "https://Stackoverflow.com/users/25856/" ]
179,259
<p>In my app I have these Hibernate-mapped types (general case):</p> <pre><code>class RoleRule { private Role role; private PermissionAwareEntity entity; // hibernate-mapped entity for which permission is granted private PermissionType permissionType; // enum @ManyToOne @JoinColumn(name = "ROLE_ID") publi...
[ { "answer_id": 179324, "author": "toolkit", "author_id": 3295, "author_profile": "https://Stackoverflow.com/users/3295", "pm_score": 2, "selected": false, "text": "@OneToMany(mappedBy = \"role\")\n @Entity\n@org.hibernate.annotations.Entity(\n dynamicInsert = true, dynamicUpdate = tru...
2008/10/07
[ "https://Stackoverflow.com/questions/179259", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2819/" ]
179,264
<p>I have an ASP.Net 3.5 platform and windows 2003 server with all the updates. </p> <p>There is a limit with .Net that it cannot handle more than <a href="http://forums.iis.net/p/1105360/1689855.aspx" rel="noreferrer">260 characters</a>. Moreover if you look it up on web, you will find that IE 6 fails to work if it i...
[ { "answer_id": 179283, "author": "Adam Davis", "author_id": 2915, "author_profile": "https://Stackoverflow.com/users/2915", "pm_score": 2, "selected": false, "text": " Note: Servers ought to be cautious about depending on URI\n lengths above 255 bytes, because some older client or prox...
2008/10/07
[ "https://Stackoverflow.com/questions/179264", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9498/" ]
179,287
<p>Let's say I have an existing trivial XML file named 'MyData.xml' that contains the following:</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt; &lt;myElement&gt;foo&lt;/myElement&gt; </code></pre> <p>I want to change the text value of 'foo' to 'bar' resulting in the following:</p> <pre><code>&lt;?xml v...
[ { "answer_id": 179305, "author": "Javier", "author_id": 11649, "author_profile": "https://Stackoverflow.com/users/11649", "pm_score": 2, "selected": false, "text": "import p4x\ndoc = p4x.P4X (open(file).read)\ndoc.myElement = 'bar'\n" }, { "answer_id": 180433, "author": "Ray"...
2008/10/07
[ "https://Stackoverflow.com/questions/179287", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4872/" ]
179,288
<p>Say I have 3 frames in a frameset arranged in 3 rows. Frames 1 and 3 are from my site and frame 2 (the central one) is from an external website. Is there a cunning way to force the browser to centre align the data in frame 2?</p> <p>I've found a small work-around which uses a frameset within a frameset which has 2 ...
[ { "answer_id": 73977121, "author": "Christopher M", "author_id": 20177451, "author_profile": "https://Stackoverflow.com/users/20177451", "pm_score": 1, "selected": false, "text": "<frameset rows=\"10%,65,25%\" border=0 frameborder=\"no\">\n <frameset rows=\"10%,65px,25%\" border=0 frameb...
2008/10/07
[ "https://Stackoverflow.com/questions/179288", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21299/" ]
179,291
<p>I'm looking to call a subprocess with a file descriptor opened to a given pipe such that the open() call does not hang waiting for the other side of the pipe to receive a connection.</p> <p>To demonstrate:</p> <pre><code>$ mkfifo /tmp/foobar.pipe $ some_program --command-fd=5 5&lt;/tmp/foobar.pipe </code></pre> <...
[ { "answer_id": 179345, "author": "Sec", "author_id": 20555, "author_profile": "https://Stackoverflow.com/users/20555", "pm_score": 2, "selected": false, "text": "mkfifo /tmp/foobar.in\nmkfifo /tmp/foobar.out\n( cat </tmp/foobar.in ) >/tmp/foobar.out &\nsome_program --command-fd=5 5</tmp/...
2008/10/07
[ "https://Stackoverflow.com/questions/179291", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14122/" ]
179,295
<p>I'm implementing a class that wraps around an xml document with a very strictly defined schema. I don't control the schema. </p> <p>One of the properties in the class is for an element value that the schema indicates must match a certain regular expression. In the setter for the property, if a string doesn't mat...
[ { "answer_id": 179312, "author": "Chris Cudmore", "author_id": 18907, "author_profile": "https://Stackoverflow.com/users/18907", "pm_score": 0, "selected": false, "text": "Element <elementname> must match /regex/\n" }, { "answer_id": 183090, "author": "Joel Coehoorn", "au...
2008/10/07
[ "https://Stackoverflow.com/questions/179295", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3043/" ]
179,337
<p>In c#</p> <pre><code>double tmp = 3.0 * 0.05; </code></pre> <p>tmp = 0.15000000000000002</p> <p>This has to do with money. The value is really $0.15, but the system wants to round it up to $0.16. 0.151 should probably be rounded up to 0.16, but not 0.15000000000000002</p> <p>What are some ways I can get the corr...
[ { "answer_id": 179392, "author": "Jon Skeet", "author_id": 22656, "author_profile": "https://Stackoverflow.com/users/22656", "pm_score": 3, "selected": false, "text": "decimal float double" }, { "answer_id": 179435, "author": "spoulson", "author_id": 3347, "author_pro...
2008/10/07
[ "https://Stackoverflow.com/questions/179337", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3800/" ]
179,355
<p>How do you delete all the cookies for the current domain using JavaScript?</p>
[ { "answer_id": 179386, "author": "ConroyP", "author_id": 2287, "author_profile": "https://Stackoverflow.com/users/2287", "pm_score": 4, "selected": false, "text": "var mydate = new Date();\nmydate.setTime(mydate.getTime() - 1);\ndocument.cookie = \"username=; expires=\" + mydate.toGMTStr...
2008/10/07
[ "https://Stackoverflow.com/questions/179355", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3636/" ]
179,365
<p>I am trying this:</p> <pre><code>Provider=MSDASQL.1;Persist Security Info=False;User ID=sys;Password=pwd;Initial Catalog=DATABASE;Data Source=OdbcDataSource;DBA Privilege=SYSDBA </code></pre> <p>But I get the error:</p> <pre><code>[Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed </code></pre> <...
[ { "answer_id": 179416, "author": "David Basarab", "author_id": 2469, "author_profile": "https://Stackoverflow.com/users/2469", "pm_score": 0, "selected": false, "text": "Data Source=oracl;User Id=userID;Password=password;Integrated Security=no\n" }, { "answer_id": 61949624, "...
2008/10/07
[ "https://Stackoverflow.com/questions/179365", "https://Stackoverflow.com", "https://Stackoverflow.com/users/672/" ]
179,369
<p>I have a simple Python script that I want to stop executing if a condition is met.</p> <p>For example:</p> <pre><code>done = True if done: # quit/stop/exit else: # do other stuff </code></pre> <p>Essentially, I am looking for something that behaves equivalently to the 'return' keyword in the body of a fun...
[ { "answer_id": 179387, "author": "gimel", "author_id": 6491, "author_profile": "https://Stackoverflow.com/users/6491", "pm_score": 4, "selected": false, "text": "import sys\nsys.exit()\n" }, { "answer_id": 179516, "author": "David Locke", "author_id": 1447, "author_pr...
2008/10/07
[ "https://Stackoverflow.com/questions/179369", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4872/" ]
179,405
<p>Can anyone explain what this mod_rewrite rule is doing?</p> <p>I'm trying to comment the file, but the code seems to state the opposite of what I think it's doing</p> <pre><code># Enable rewriting of URLs RewriteEngine on # Allow specified file types to be accessed # Thing to test = URL # Condition = not startin...
[ { "answer_id": 179419, "author": "Roel", "author_id": 11449, "author_profile": "https://Stackoverflow.com/users/11449", "pm_score": 3, "selected": true, "text": "^ = begin of line\n( = begin group\n.* = any character, any number of times\n) = end group\n" } ]
2008/10/07
[ "https://Stackoverflow.com/questions/179405", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4196/" ]
179,415
<p>Assuming we always use a Sun JVM (say, 1.5+), is it always safe to cast a Graphics reference to Graphics2D? </p> <p>I haven't seen it cause any problems yet and, to my understanding, the Graphics class is legacy code but the Java designers didn't want to change the interfaces for Swing and AWT classes in order to ...
[ { "answer_id": 179431, "author": "Jorge Ferreira", "author_id": 6508, "author_profile": "https://Stackoverflow.com/users/6508", "pm_score": 6, "selected": true, "text": "Graphics Graphics2D" }, { "answer_id": 180237, "author": "Roland Schneider", "author_id": 16515, "...
2008/10/07
[ "https://Stackoverflow.com/questions/179415", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1471/" ]
179,427
<p>Seems like the subtraction is triggering some kind of issue and the resulting value is wrong.</p> <pre><code>double tempCommission = targetPremium.doubleValue()*rate.doubleValue()/100d; </code></pre> <p>78.75 = 787.5 * 10.0/100d</p> <pre><code>double netToCompany = targetPremium.doubleValue() - tempCommission; </...
[ { "answer_id": 179453, "author": "Eric Weilnau", "author_id": 13342, "author_profile": "https://Stackoverflow.com/users/13342", "pm_score": 8, "selected": true, "text": "import java.math.BigDecimal;\n\nBigDecimal premium = BigDecimal.valueOf(\"1586.6\");\nBigDecimal netToCompany = BigDec...
2008/10/07
[ "https://Stackoverflow.com/questions/179427", "https://Stackoverflow.com", "https://Stackoverflow.com/users/25881/" ]
179,439
<p>I checked out a project from SVN and did not specify the project type, so it checked out as a "default" project. What is the easiest way to quickly convert this into a "Java" project?</p> <p>I'm using Eclipse version 3.3.2.</p>
[ { "answer_id": 179450, "author": "Chris Marasti-Georg", "author_id": 96, "author_profile": "https://Stackoverflow.com/users/96", "pm_score": 8, "selected": true, "text": "<projectDescription>\n <buildSpec>\n <buildCommand>\n <name>org.eclipse.jdt.core.javabuilder</na...
2008/10/07
[ "https://Stackoverflow.com/questions/179439", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5917/" ]
179,441
<p>I'm modifying a mature CGI application written in Perl and the question of content encoding has come up. The browser reports that the content is iso-8859-1 encoded and the application is declaring iso-8859-1 as the charset in the HTTP headers but doesn't ever seem to <em>actually do</em> the encoding. None of the ...
[ { "answer_id": 179490, "author": "moritz", "author_id": 14132, "author_profile": "https://Stackoverflow.com/users/14132", "pm_score": 4, "selected": true, "text": "uc lc" } ]
2008/10/07
[ "https://Stackoverflow.com/questions/179441", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20790/" ]
179,460
<p>If I have a class that needs to implement an interface but one or more of the methods on that interface don't make sense in the context of this particular class, what should I do?</p> <p>For example, lets say I'm implementing an adapter pattern where I want to create a wrapper class that implements <a href="http://...
[ { "answer_id": 179465, "author": "Chris Marasti-Georg", "author_id": 96, "author_profile": "https://Stackoverflow.com/users/96", "pm_score": 3, "selected": false, "text": "UnsupportedOperationException NotImplementedException" } ]
2008/10/07
[ "https://Stackoverflow.com/questions/179460", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1247/" ]
179,466
<p>I'm creating a self updating app where I have the majority of the code in a seperate DLL. It's command line and will eventually be run on Mono. I'm just trying to get this code to work in C# on windows at the command line.</p> <p>How can I create a c# application that I can delete a supporting dll while its running...
[ { "answer_id": 924702, "author": "RandomNickName42", "author_id": 67819, "author_profile": "https://Stackoverflow.com/users/67819", "pm_score": 1, "selected": false, "text": "MOVEFILE_DELAY_UNTIL_REBOOT MOVEFILE_COPY_ALLOWED MOVEFILE_DELAY_UNTIL_REBOOT" } ]
2008/10/07
[ "https://Stackoverflow.com/questions/179466", "https://Stackoverflow.com", "https://Stackoverflow.com/users/253/" ]
179,468
<p>What I want to do is set the focus to a specific control (specifically a <code>TextBox</code>) on a tab page when that tab page is selected.</p> <p>I've tried to call <code>Focus</code> during the Selected event of the containing tab control, but that isn't working. After that I tried to call focus during the <code...
[ { "answer_id": 179499, "author": "itsmatt", "author_id": 7862, "author_profile": "https://Stackoverflow.com/users/7862", "pm_score": 4, "selected": true, "text": "SelectedIndexChanged tabControl tabControl1.SelectedIndex textBox.Focus(); private void tabControl1_selectedIndexChanged(obje...
2008/10/07
[ "https://Stackoverflow.com/questions/179468", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1440933/" ]
179,472
<p>I need to export a SL DataGrid to HTML so my users can then print it. Can someone put me in the right direction?</p> <p>Upate: After reading Rob's answer I am changing my question. Instead of Silverlight Grid to HTML, I now just want to export it to PDF. Has anyone used any 3rd party PDF generators with Silverlight...
[ { "answer_id": 179499, "author": "itsmatt", "author_id": 7862, "author_profile": "https://Stackoverflow.com/users/7862", "pm_score": 4, "selected": true, "text": "SelectedIndexChanged tabControl tabControl1.SelectedIndex textBox.Focus(); private void tabControl1_selectedIndexChanged(obje...
2008/10/07
[ "https://Stackoverflow.com/questions/179472", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23663/" ]
179,480
<p>Provided I have admin access, I need a way to manage (Create, modify, remove) local accounts in a remote machine from an ASP.NET client.</p> <p>I'm clueless in how to approach this. Is WMI a possibility (System.Management namespace)? Any pointers?</p>
[ { "answer_id": 180678, "author": "Matt Hanson", "author_id": 5473, "author_profile": "https://Stackoverflow.com/users/5473", "pm_score": 3, "selected": true, "text": "DirectoryEntry directoryEntry = new DirectoryEntry(\"WinNT://ComputerName\" & \",computer\", \"AdminUN\", \"AdminPW\");\n...
2008/10/07
[ "https://Stackoverflow.com/questions/179480", "https://Stackoverflow.com", "https://Stackoverflow.com/users/25885/" ]
179,488
<p>Is there a list somewhere on common Attributes which are used in objects like <code>Serializable</code>?</p> <p>Thanks</p> <p>Edit ~ The reason I asked is that I came across an StoredProcedure attribute in ntiers ORMS.</p>
[ { "answer_id": 179496, "author": "StingyJack", "author_id": 16391, "author_profile": "https://Stackoverflow.com/users/16391", "pm_score": 5, "selected": true, "text": "using System;\nusing System.Collections.Generic;\nusing System.Diagnostics;\nusing System.Reflection;\n\nnamespace Conso...
2008/10/07
[ "https://Stackoverflow.com/questions/179488", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23667/" ]
179,492
<p>F# is derived from OCaml, but what major items are missing or added? Specifically I'm curious as to whether the resources available for learning OCaml are also useful to someone who wants to learn F#.</p>
[ { "answer_id": 2485277, "author": "Tomas Petricek", "author_id": 33518, "author_profile": "https://Stackoverflow.com/users/33518", "pm_score": 7, "selected": false, "text": "+" } ]
2008/10/07
[ "https://Stackoverflow.com/questions/179492", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16942/" ]
179,500
<p>I've seen a lot of questions around that use improperly the expression "C/C++". The reasons in my opinion are: </p> <ul> <li>Newbie C and C++ programmers probably don't understand the difference between the two languages.</li> <li>People don't really care about it since they want a generic, quick and "dirty" answer...
[ { "answer_id": 179949, "author": "PhiLho", "author_id": 15459, "author_profile": "https://Stackoverflow.com/users/15459", "pm_score": 1, "selected": false, "text": "sprintf" } ]
2008/10/07
[ "https://Stackoverflow.com/questions/179500", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23890/" ]
179,510
<p>Is there a way to get rid of the selection rectangle when clicking a link which does not refresh the current page entirely?</p>
[ { "answer_id": 179525, "author": "Lou Franco", "author_id": 3937, "author_profile": "https://Stackoverflow.com/users/3937", "pm_score": 3, "selected": false, "text": "onclick=\"this.blur()\"\n" }, { "answer_id": 179532, "author": "Ross", "author_id": 2025, "author_pro...
2008/10/07
[ "https://Stackoverflow.com/questions/179510", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16440/" ]
179,539
<p>If I have $var defined in Page1.php and in Page2.php I have</p> <pre> //Page2.php include('Page1.php'); echo $var; </pre> <p>For what reasons will it not print the value of $var to the screen? The files are in the same directory so paths shouldn't be the issue. I've checked the php.ini file and nothing really ...
[ { "answer_id": 179552, "author": "Oli", "author_id": 12870, "author_profile": "https://Stackoverflow.com/users/12870", "pm_score": 2, "selected": false, "text": "$var $var" }, { "answer_id": 179572, "author": "andyuk", "author_id": 2108, "author_profile": "https://Sta...
2008/10/07
[ "https://Stackoverflow.com/questions/179539", "https://Stackoverflow.com", "https://Stackoverflow.com/users/24059/" ]
179,543
<p>for a FILE* stream, if I read as much data as possible, feof(stream) returns me non-zero. Then, If I fclose stream, it feof(stream) will continue to returns me a non-zero value? Is it GUARANTEED?</p>
[ { "answer_id": 180193, "author": "Dan Lenski", "author_id": 20789, "author_profile": "https://Stackoverflow.com/users/20789", "pm_score": 2, "selected": false, "text": "feof() comp.lang.c" } ]
2008/10/07
[ "https://Stackoverflow.com/questions/179543", "https://Stackoverflow.com", "https://Stackoverflow.com/users/25888/" ]
179,556
<p>Like the title says, If I place an <code>app_offline.htm</code> in the application root, will it cut off currently running requests, or just new ones?</p>
[ { "answer_id": 179686, "author": "Gabe Sumner", "author_id": 12689, "author_profile": "https://Stackoverflow.com/users/12689", "pm_score": 6, "selected": true, "text": "protected void Page_Load(object sender, EventArgs e)\n{\n Response.BufferOutput = false;\n Response.Write(\"Step ...
2008/10/07
[ "https://Stackoverflow.com/questions/179556", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16172/" ]
179,565
<p>If yes, on which operating system, shell or whatever?</p> <p>Consider the following java program (I'm using java just as an example, any language would be good for this question, which is more about operation systems):</p> <pre><code>public class ExitCode { public static void main(String args[]) { Syst...
[ { "answer_id": 179652, "author": "Jonathan Leffler", "author_id": 15168, "author_profile": "https://Stackoverflow.com/users/15168", "pm_score": 6, "selected": true, "text": "wait() waitpid() wait() waitpid() sigaction() SA_SIGINFO sigaction() <signal.h> exit() #include <errno.h>\n#includ...
2008/10/07
[ "https://Stackoverflow.com/questions/179565", "https://Stackoverflow.com", "https://Stackoverflow.com/users/25891/" ]
179,582
<p>I'm primarily interested in pgsql for this, but I was wondering if there is a way in any RDBMS to do an insert operation, <em>without</em> disabling and re-enabling any FOREIGN KEY or NOT NULL constraints, on two tables that refer to each other. (You might think of this as a chicken that was somehow born from its o...
[ { "answer_id": 179651, "author": "Neall", "author_id": 619, "author_profile": "https://Stackoverflow.com/users/619", "pm_score": 3, "selected": true, "text": "BEGIN;\n SET CONSTRAINTS ALL DEFERRED;\nINSERT INTO questions (questionid, answerid, question)\n VALUES (1, 100, 'How long are ...
2008/10/07
[ "https://Stackoverflow.com/questions/179582", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16777/" ]
179,619
<p>Why is it that there are two kinds of references in xaml.</p> <p>One looks like this:</p> <pre><code>xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" </code></pre> <p>But mine look like this:</p> <pre><code>xmlns:WPFToolKit="clr-namespace:Microsoft.Windows.Controls;assembly=WPFToolkit" </code></pre> <p>W...
[ { "answer_id": 179632, "author": "user7116", "author_id": 7116, "author_profile": "https://Stackoverflow.com/users/7116", "pm_score": 4, "selected": true, "text": "[assembly:XmlnsDefinition(\"http://myschema.mydomain.com/MyControlNamespace\", \"My.Control.Namespace\")]\n" } ]
2008/10/07
[ "https://Stackoverflow.com/questions/179619", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17744/" ]
179,625
<p>In SQL Server 2017, you can use this syntax, but not in earlier versions:</p> <pre><code>SELECT Name = TRIM(Name) FROM dbo.Customer; </code></pre>
[ { "answer_id": 179630, "author": "Ben Hoffstein", "author_id": 4482, "author_profile": "https://Stackoverflow.com/users/4482", "pm_score": 9, "selected": true, "text": "SELECT LTRIM(RTRIM(Names)) AS Names FROM Customer\n" }, { "answer_id": 179637, "author": "Kibbee", "aut...
2008/10/07
[ "https://Stackoverflow.com/questions/179625", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6522/" ]
179,653
<p>I want to take the value stored in a 32 bit unsigned int, put it into four chars and then store the integer value of each of these chars in a string.</p> <p>I think the first part goes like this:</p> <pre><code>char a = orig &lt;&lt; 8; char b = orig &lt;&lt; 8; char c = orig &lt;&lt; 8; char d = orig &lt;&lt; 8; ...
[ { "answer_id": 179666, "author": "Paul Tomblin", "author_id": 3333, "author_profile": "https://Stackoverflow.com/users/3333", "pm_score": 1, "selected": false, "text": "char a = orig & 0xff;\norig >>= 8;\nchar b = orig & 0xff;\norig >>= 8;\nchar c = orig & 0xff;\norig >>= 8;\nchar d = or...
2008/10/07
[ "https://Stackoverflow.com/questions/179653", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1449/" ]
179,665
<p>I have an array <code>NSMutableArray</code> with happy objects. These objects viciously turn on (leak) me whenever I try to clear the array of all the objects and repopulate it.</p> <p>It's allocated in the init function like so</p> <pre><code>self.list = [NSMutableArray array]; </code></pre> <p>The different met...
[ { "answer_id": 179695, "author": "Elfred", "author_id": 12636, "author_profile": "https://Stackoverflow.com/users/12636", "pm_score": 2, "selected": false, "text": "@property @property(retain) (EXC\\_BAD\\_ACCESS)" }, { "answer_id": 179892, "author": "Nathan Kinsinger", "...
2008/10/07
[ "https://Stackoverflow.com/questions/179665", "https://Stackoverflow.com", "https://Stackoverflow.com/users/25004/" ]
179,668
<p>I tried doing this:</p> <pre><code>root.addEventListener("click", function () { navigateToURL(ClickURLRequest,"_self"); }); </code></pre> <p>And it does add the event listener. I like using closures because they work well in this situation,</p> <p>however, removing the event listener requires a...
[ { "answer_id": 179842, "author": "JustLogic", "author_id": 21664, "author_profile": "https://Stackoverflow.com/users/21664", "pm_score": 0, "selected": false, "text": "root.removeEventListener(\"click\", arguments.callee );\n" }, { "answer_id": 179905, "author": "BefittingThe...
2008/10/07
[ "https://Stackoverflow.com/questions/179668", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1965/" ]
179,676
<p>What is the best way to get a file (in this case, a .PDF, but any file will do) from a WebResponse and put it into a MemoryStream? Using .GetResponseStream() from WebResponse gets a Stream object, but if you want to convert that Stream to a specific type of stream, what do you do?</p>
[ { "answer_id": 179990, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 0, "selected": false, "text": "//---------- Start HttpResponse\nif(objHttpWebResponse.StatusCode == HttpStatusCode.OK)\n {\n //Get response stream\...
2008/10/07
[ "https://Stackoverflow.com/questions/179676", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
179,700
<p>Is there a way to take a class name and convert it to a string in C#? </p> <p>As part of the Entity Framework, the .Include method takes in a dot-delimited list of strings to join on when performing a query. I have the class model of what I want to join, and for reasons of refactoring and future code maintenance, I...
[ { "answer_id": 179711, "author": "Max Schmeling", "author_id": 3226, "author_profile": "https://Stackoverflow.com/users/3226", "pm_score": 7, "selected": false, "text": ".GetType() GetType typeof(Foo).Name\n typeof(Foo).AssemblyQualifiedName\n" }, { "answer_id": 179715, "auth...
2008/10/07
[ "https://Stackoverflow.com/questions/179700", "https://Stackoverflow.com", "https://Stackoverflow.com/users/24841/" ]
179,706
<p>I am writing a site that uses strongly typed datasets. </p> <p>The DBA who created the table made gave a column a value that represents a negative. The column is 'Do_Not_Estimate_Flag' where the column can contain 'T' or 'F'. I can't change the underlying table or the logic that fills it. What I want to do is to ad...
[ { "answer_id": 179820, "author": "Joe", "author_id": 13087, "author_profile": "https://Stackoverflow.com/users/13087", "pm_score": 2, "selected": true, "text": "<%#FormatFlag(DataBinder.Eval(Container.DataItem, \"Do_Not_Estimate_Flag\" ))%>\n protected string FormatFlag(object doNotEstim...
2008/10/07
[ "https://Stackoverflow.com/questions/179706", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4491/" ]
179,708
<p>Can anybody recommend a good method for determining the Rect of some wrapped text on an iPhone? I've tried all the built-in methods for NSString in the 2.1 SDK to no avail. The size methods never return sizes that allow me to completely fit wrapped text in my custom view.</p> <p>I'm drawing some user customizable...
[ { "answer_id": 179963, "author": "Mike McMaster", "author_id": 544, "author_profile": "https://Stackoverflow.com/users/544", "pm_score": 2, "selected": false, "text": "CGSize sizeForText = [theText sizeWithFont:theFont constrainedToSize:CGSizeMake(myMaxWidth, 9999)];\n" } ]
2008/10/07
[ "https://Stackoverflow.com/questions/179708", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
179,713
<p>How can you change the <code>href</code> attribute (link target) for a hyperlink using jQuery?</p>
[ { "answer_id": 179717, "author": "Shog9", "author_id": 811, "author_profile": "https://Stackoverflow.com/users/811", "pm_score": 12, "selected": true, "text": "$(\"a\").attr(\"href\", \"http://www.google.com/\")\n <a name=\"MyLinks\"></a>\n<a href=\"http://www.codeproject.com/\">The Code...
2008/10/07
[ "https://Stackoverflow.com/questions/179713", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3747/" ]
179,716
<p>I have a series of datetime objects and would like to calculate the average delta between them.</p> <p>For example, if the input was <code>(2008-10-01 12:15:00, 2008-10-01 12:25:00, 2008-10-01 12:35:00)</code>, then the average delta would be exactly 00:10:00, or 10 minutes.</p> <p>Any suggestions on how to calcul...
[ { "answer_id": 179738, "author": "Randy", "author_id": 9361, "author_profile": "https://Stackoverflow.com/users/9361", "pm_score": 4, "selected": false, "text": "mx = max(a)\nmn = min(a)\navg = (mx-mn)/(len(a)-1)\n" }, { "answer_id": 181239, "author": "Claudiu", "author_i...
2008/10/07
[ "https://Stackoverflow.com/questions/179716", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1155/" ]
179,720
<p>On Windows NTFS there is a nice but mostly unused feature called "Alternate Data Streams" (ADS) which I recently used in a hobby-dev project.</p> <p>On Mac HFS+ there is also a similarly nice but mostly unused feature called "named forks".</p> <p>I am thinking of porting this project to Linux, but I do not know i...
[ { "answer_id": 179734, "author": "Peter Shinners", "author_id": 17209, "author_profile": "https://Stackoverflow.com/users/17209", "pm_score": 0, "selected": false, "text": "extended attributes xattr xattrs" } ]
2008/10/07
[ "https://Stackoverflow.com/questions/179720", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23264/" ]
179,723
<p>By that I mean, what do I need to do to have useful assertions in my code?</p> <p>MFC is quite easy, i just use ASSERT(something).</p> <p>What's the non-MFC way?</p> <p><strong>Edit:</strong> Is it possible to stop assert breaking in assert.c rather than than my file which called assert()?</p> <p><strong>Edit:</...
[ { "answer_id": 179733, "author": "Ferruccio", "author_id": 4086, "author_profile": "https://Stackoverflow.com/users/4086", "pm_score": 6, "selected": true, "text": "#include <cassert>\n\nassert(something);\n #include <boost/static_assert.hpp>\n\nBOOST_STATIC_ASSERT(sizeof(int) == 4); //...
2008/10/07
[ "https://Stackoverflow.com/questions/179723", "https://Stackoverflow.com", "https://Stackoverflow.com/users/986/" ]
179,742
<p>VB 2008.</p> <p>I have several text boxes on a form and I want each of them to use the same event handler. I know how to manually wire each one up to the handler, but I'm looking for a more generic way so if I add more text boxes they will automatically be hooked up to the event handler.</p> <p>Ideas?</p> <p>EDIT...
[ { "answer_id": 179824, "author": "MusiGenesis", "author_id": 14606, "author_profile": "https://Stackoverflow.com/users/14606", "pm_score": 4, "selected": true, "text": "private void Form1_Load(object sender, EventArgs e)\n{\n foreach (Control ctrl in this.Controls)\n {\n if ...
2008/10/07
[ "https://Stackoverflow.com/questions/179742", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2441/" ]
179,745
<p>This is really two questions, but they are so similar, and to keep it simple, I figured I'd just roll them together:</p> <ul> <li><p><strong>Firstly</strong>: Given an established Java project, what are some decent ways to speed it up beyond just plain in-code optimization?</p></li> <li><p><strong>Secondly</strong>...
[ { "answer_id": 179841, "author": "Vinnie", "author_id": 2890, "author_profile": "https://Stackoverflow.com/users/2890", "pm_score": 1, "selected": false, "text": "-xmx -xms" } ]
2008/10/07
[ "https://Stackoverflow.com/questions/179745", "https://Stackoverflow.com", "https://Stackoverflow.com/users/145/" ]
179,752
<p>Lets say on my page I have this function:</p> <pre><code> function ReturnFoo(bar) { return bar.toString() + "foo"; } </code></pre> <p>Now, I would like to have this called from ASP .NET, hopefully with the ASP .NET AJAX framework, as I am already using it in this codebase (I have already spent the 100k, might...
[ { "answer_id": 233007, "author": "Timothy Khouri", "author_id": 11917, "author_profile": "https://Stackoverflow.com/users/11917", "pm_score": 0, "selected": false, "text": "private void Page_Load()\n{\n string someValue = EXECUTE_JS_ON_CLIENT_AND_GET_RESULT();\n\n // do some stuff ...
2008/10/07
[ "https://Stackoverflow.com/questions/179752", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7952/" ]
179,768
<p>A few questions on MS Access databases -</p> <p>Size: Are there limits to the size of an access database? The reason i ask is that we have an access database that has a few simple tables. The size of the db is about 1GB. When I do a query on it, i see it taking over 10 minutes to run. </p> <p>With proper indexi...
[ { "answer_id": 183775, "author": "David-W-Fenton", "author_id": 9787, "author_profile": "https://Stackoverflow.com/users/9787", "pm_score": 0, "selected": false, "text": "WHERE Year([MyTable].[MyDate]) = 2002\n WHERE MyTable.MyDate Between #1/1/2002# And #12/31/2002#\n" } ]
2008/10/07
[ "https://Stackoverflow.com/questions/179768", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4653/" ]
179,779
<p>I am writing code for a search results page that needs to highlight search terms. The terms happen to occur within table cells (the app is iterating through GridView Row Cells), and these table cells may have HTML.</p> <p>Currently, my code looks like this (relevant hunks shown below):</p> <pre><code>const string ...
[ { "answer_id": 181882, "author": "Julien Hoarau", "author_id": 12248, "author_profile": "https://Stackoverflow.com/users/12248", "pm_score": 5, "selected": true, "text": "(?<!<[^>]*)(regex you want to check: Fred|span) <[^>]* const string notInsideBracketsRegex = @\"(?<!<[^>]*)\";\nconst...
2008/10/07
[ "https://Stackoverflow.com/questions/179779", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13700/" ]
179,796
<p>In a VS2008 web site project, I have a page open in split view. I try to drag an Infragistics web control onto the page's design surface. Nothing happens. I try to drag same onto the htmlz. Dialog box with </p> <blockquote> <p>The operation could not be completed. Invalid formatetc structure. </p> </blockquote> ...
[ { "answer_id": 6169841, "author": "Gabriel Oliva", "author_id": 775410, "author_profile": "https://Stackoverflow.com/users/775410", "pm_score": 1, "selected": false, "text": "<system.web>\n <!-- \n Set compilation debug=\"true\" to insert debugging \n symbols into the co...
2008/10/07
[ "https://Stackoverflow.com/questions/179796", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2637/" ]
179,799
<p>Yesterday I tried to get started with Java RMI. I found this sun tutorial (<a href="http://java.sun.com/docs/books/tutorial/rmi/index.html" rel="nofollow noreferrer">http://java.sun.com/docs/books/tutorial/rmi/index.html</a>) and started with the server implemantation. But everytime I start the pogram (the rmiregist...
[ { "answer_id": 180176, "author": "Tom Hawtin - tackline", "author_id": 4725, "author_profile": "https://Stackoverflow.com/users/4725", "pm_score": 3, "selected": false, "text": "-Djava.rmi.server.codebase=file://C:/ProjX/server/serverProj/bin/usermanager/\n \"file:///C:/...\" \"file:/C:/...
2008/10/07
[ "https://Stackoverflow.com/questions/179799", "https://Stackoverflow.com", "https://Stackoverflow.com/users/25913/" ]
179,826
<p>Does anyone know of crossbrowser equivalent of explicitOriginalTarget event parameter? This parameter is Mozilla specific and it gives me the element that caused the blur. Let's say i have a text input and a link on my page. Text input has the focus. If I click on the link, text input's blur event gives me the link ...
[ { "answer_id": 9607278, "author": "Kotei", "author_id": 1255475, "author_profile": "https://Stackoverflow.com/users/1255475", "pm_score": 0, "selected": false, "text": "srcElement if( !selectTag.explicitOriginalTarget )\n selectTag.explicitOriginalTarget = selectTag.srcElement;\n" }...
2008/10/07
[ "https://Stackoverflow.com/questions/179826", "https://Stackoverflow.com", "https://Stackoverflow.com/users/25768/" ]
179,834
<p>I have a multi-timezone web application that stores all of the datetime values in UTC in the database, when actions happen on the server, I can easily convert the time into UTC.</p> <p>However, when a client enters a time or time span, what is the best way to detect and store it?</p> <p>I am currently doing the fo...
[ { "answer_id": 179866, "author": "Mnebuerquo", "author_id": 5114, "author_profile": "https://Stackoverflow.com/users/5114", "pm_score": 3, "selected": true, "text": "each()" }, { "answer_id": 179873, "author": "Hermooz", "author_id": 25912, "author_profile": "https://...
2008/10/07
[ "https://Stackoverflow.com/questions/179834", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8360/" ]
179,839
<p>Basically, I'm trying to selectively copy a table from one database to another. I have two different [Oracle] databases (e.g., running on different hosts) with the same schema. I'm interested in a efficient way to load Table A in DB1 with the result of running a select on Table A in DB2. I'm using JDBC, if that's re...
[ { "answer_id": 179870, "author": "CaptainPicard", "author_id": 15203, "author_profile": "https://Stackoverflow.com/users/15203", "pm_score": 4, "selected": true, "text": "create database link other_db connect to remote_user identified by remote_passwd using remote_tnsname;\n\ncreate tabl...
2008/10/07
[ "https://Stackoverflow.com/questions/179839", "https://Stackoverflow.com", "https://Stackoverflow.com/users/25915/" ]