qid
int64
4
22.2M
question
stringlengths
18
48.3k
answers
list
date
stringlengths
10
10
metadata
list
399,893
<p>I want to use php in console mode and create an environment to test my functions. </p> <p>I do not want to be forced to use a web browser and create a new file each time I want to test a function. </p> <p>I want to access the function in the console and then it return the result.</p> <p>How do I do this?</p> <p>...
[ { "answer_id": 400019, "author": "PEZ", "author_id": 44639, "author_profile": "https://Stackoverflow.com/users/44639", "pm_score": 0, "selected": false, "text": "php -a\n" }, { "answer_id": 400020, "author": "mark", "author_id": 47573, "author_profile": "https://Stack...
2008/12/30
[ "https://Stackoverflow.com/questions/399893", "https://Stackoverflow.com", "https://Stackoverflow.com/users/47090/" ]
399,897
<p>After having solved the problem of getting the editor to launch when there's a merge conflict - <a href="https://stackoverflow.com/questions/399606/mercurial-no-editor-appears-when-merge-conflicts-are-detected">Mercurial: No editor appears when merge conflicts are detected</a></p> <p>I now have another problem, the...
[ { "answer_id": 400019, "author": "PEZ", "author_id": 44639, "author_profile": "https://Stackoverflow.com/users/44639", "pm_score": 0, "selected": false, "text": "php -a\n" }, { "answer_id": 400020, "author": "mark", "author_id": 47573, "author_profile": "https://Stack...
2008/12/30
[ "https://Stackoverflow.com/questions/399897", "https://Stackoverflow.com", "https://Stackoverflow.com/users/37196/" ]
399,907
<p>I'm writing a sparse matrix class in C++ in which every row and column are arrays of linked lists from a class I created (aptly named: LinkedList).</p> <p>I want to write a class that is a "smart" pointer to one cell in this matrix.</p> <p>In that class, let say <code>LIPointer</code>, I will implement a <code>++<...
[ { "answer_id": 400019, "author": "PEZ", "author_id": 44639, "author_profile": "https://Stackoverflow.com/users/44639", "pm_score": 0, "selected": false, "text": "php -a\n" }, { "answer_id": 400020, "author": "mark", "author_id": 47573, "author_profile": "https://Stack...
2008/12/30
[ "https://Stackoverflow.com/questions/399907", "https://Stackoverflow.com", "https://Stackoverflow.com/users/49500/" ]
399,910
<p>I am trying to create a form in Rails 2.2.2 that populates a field based on a choice a user has made in an 'auto_complete' field. It looks as though the observe_field functionality is what I need to use but I'm stuck on how to update the value of an existing text field.</p> <p>The sequence of events I am trying to ...
[ { "answer_id": 400019, "author": "PEZ", "author_id": 44639, "author_profile": "https://Stackoverflow.com/users/44639", "pm_score": 0, "selected": false, "text": "php -a\n" }, { "answer_id": 400020, "author": "mark", "author_id": 47573, "author_profile": "https://Stack...
2008/12/30
[ "https://Stackoverflow.com/questions/399910", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6218/" ]
399,914
<p>Whats the best practice approach to creating a form that is used to both create new models and edit existing models?</p> <p>Are there any tutorials that people can point me in the direction of?</p>
[ { "answer_id": 4874247, "author": "Mariano Desanze", "author_id": 146513, "author_profile": "https://Stackoverflow.com/users/146513", "pm_score": 5, "selected": false, "text": "<%@ Page Language=\"C#\" Inherits=\"System.Web.Mvc.ViewPage<NerdDinner.Models.Dinner>\" MasterPageFile=\"~/View...
2008/12/30
[ "https://Stackoverflow.com/questions/399914", "https://Stackoverflow.com", "https://Stackoverflow.com/users/46616/" ]
399,932
<p>So, I have been working on this domain name regular expression. So far, it seems to pick up domain names with SLDs and TLDs (with the optional ccTLD), but there is duplication of the TLD listing. Can this be refactored any further?</p> <pre><code>params[:domain_name].downcase.strip.match(/^[a-z0-9\-]{2,63} \.((a[cd...
[ { "answer_id": 399949, "author": "annakata", "author_id": 13018, "author_profile": "https://Stackoverflow.com/users/13018", "pm_score": -1, "selected": false, "text": "(\\.<tldpart>){1,2}" }, { "answer_id": 401499, "author": "Steve Losh", "author_id": 13498, "author_p...
2008/12/30
[ "https://Stackoverflow.com/questions/399932", "https://Stackoverflow.com", "https://Stackoverflow.com/users/40644/" ]
399,937
<p>I need a method that takes a linkedlist as a parameter and return true or false if it is circular or not.</p> <p>ex:circular linkedlist means there is node pointes to any previous node. I forgot to tell some constraints, I can not use any datastructure or dynmaic memory allocations. I can use local variables only ...
[ { "answer_id": 399968, "author": "Cheery", "author_id": 21711, "author_profile": "https://Stackoverflow.com/users/21711", "pm_score": 0, "selected": false, "text": "previousnodes ← set()\npreviousnodes.add(firstnode)\ncurrentnode ← firstnode.next\nwhile (currentnode in previousnodes) || ...
2008/12/30
[ "https://Stackoverflow.com/questions/399937", "https://Stackoverflow.com", "https://Stackoverflow.com/users/42749/" ]
399,942
<p>In the following code, g++ gives this error : 1.cpp: In member function <code>void W::test()': 1.cpp:6: error:</code>int F::glob' is private 1.cpp:19: error: within this context</p> <p>But, shouldn't the globally declared variable 'glob' be used here, instead of the "private" "glob"?</p> <pre><code> #include &lt...
[ { "answer_id": 399947, "author": "Marc", "author_id": 27947, "author_profile": "https://Stackoverflow.com/users/27947", "pm_score": 2, "selected": false, "text": "::glob--;" }, { "answer_id": 399960, "author": "strager", "author_id": 39992, "author_profile": "https://...
2008/12/30
[ "https://Stackoverflow.com/questions/399942", "https://Stackoverflow.com", "https://Stackoverflow.com/users/49560/" ]
399,946
<p>I just started reading Effective C++ today and got to the point where the author talks about the operator new.</p> <p>The book explains very well how you can catch (with various degrees of elegance) the std::bad_alloc exception that the operator new can raise if you run out of memory.</p> <p>My question is: How of...
[ { "answer_id": 400007, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 2, "selected": false, "text": "malloc()" }, { "answer_id": 400074, "author": "Johannes Schaub - litb", "author_id": 34509, "author_profil...
2008/12/30
[ "https://Stackoverflow.com/questions/399946", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23824/" ]
399,956
<p>A little background:</p> <ul> <li><a href="http://www.python.org/dev/peps/pep-0008/" rel="noreferrer">PEP 8</a> is the <em>Style Guide for Python Code</em>. It contains the conventions all python programmers should follow.</li> <li><a href="http://pypi.python.org/pypi/pep8" rel="noreferrer">pep8.py</a> is a (very u...
[ { "answer_id": 2296249, "author": "Dmitry Kochkin", "author_id": 153623, "author_profile": "https://Stackoverflow.com/users/153623", "pm_score": 5, "selected": false, "text": "pycodestyle" }, { "answer_id": 8532188, "author": "Fabio Zadrozny", "author_id": 110451, "au...
2008/12/30
[ "https://Stackoverflow.com/questions/399956", "https://Stackoverflow.com", "https://Stackoverflow.com/users/30300/" ]
399,957
<p>I'm trying to write a circuit schematic drawing tool in Python. I'm creating a simple database based on dictionaries which holds all the components and their properties. I'm also trying to create a simple query language where you can select, for example, all resistors with value>100ohms or footprint='0402' </p> ...
[ { "answer_id": 399997, "author": "James Brady", "author_id": 29903, "author_profile": "https://Stackoverflow.com/users/29903", "pm_score": 2, "selected": false, "text": "components = [\n { 'name': 'resistor', 'footprint': '0402', },\n { 'name': 'LED', 'footprint': '0100', },\n {...
2008/12/30
[ "https://Stackoverflow.com/questions/399957", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
399,971
<p>I need a script to run on Vista Ultimate to share an external drive and assign full control to Everyone. I've got a batch file to create the share using <code>net share</code>, but there doesn't seem to be a way to change the permissions. I reckon this must be possible in PowerShell, but I have no idea where to star...
[ { "answer_id": 12166869, "author": "Aaron Jensen", "author_id": 125356, "author_profile": "https://Stackoverflow.com/users/125356", "pm_score": 3, "selected": false, "text": "Install-SmbShare -Name MyShare -Path X:\\ -FullAccess 'Everybody' `\n -Description 'My super-awes...
2008/12/30
[ "https://Stackoverflow.com/questions/399971", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5744/" ]
399,972
<p>I'm setting up a new 64 bit machine to run as a build server. When I try to load my NUnit test assembly into NUnit GUI I get the following error.</p> <p>There is nothing obvious missing, all the dependencies seem to be present. All the DLLs are compiled for the x86 platform.</p> <p>Using NUnit 2.4.7. I have trie...
[ { "answer_id": 399981, "author": "David Schmitt", "author_id": 4918, "author_profile": "https://Stackoverflow.com/users/4918", "pm_score": 2, "selected": false, "text": "fuslogvw.exe" } ]
2008/12/30
[ "https://Stackoverflow.com/questions/399972", "https://Stackoverflow.com", "https://Stackoverflow.com/users/44950/" ]
399,975
<p>I am new to Excel macros. I have some columns with headings scattered in many sheets. I would like to type a heading in some column which has the cursor and have the column with that heading copy-pasted to the column with the cursor. </p> <p>Is it possible to do this by recording a macro? How? If not, how do I do i...
[ { "answer_id": 401983, "author": "Fionnuala", "author_id": 2548, "author_profile": "https://Stackoverflow.com/users/2548", "pm_score": 2, "selected": true, "text": "Dim ws As Worksheet\nDim r As Range\nDim CopyTo As String\n\n'You must run the code from a suitable active cell '\nstrFind ...
2008/12/30
[ "https://Stackoverflow.com/questions/399975", "https://Stackoverflow.com", "https://Stackoverflow.com/users/34596/" ]
399,982
<p>I've realised for the first time a couple of weeks ago that when setting an http cookie, while the domain name is not case sensitive, the path is. </p> <p>So a while a cookie stored for</p> <p><code>http://SomeWebSite.com</code></p> <p>can be read using</p> <p><code>http://somewebsite.com</code></p> <p>a cookie...
[ { "answer_id": 400013, "author": "strager", "author_id": 39992, "author_profile": "https://Stackoverflow.com/users/39992", "pm_score": 5, "selected": true, "text": "http://example.com/x" } ]
2008/12/30
[ "https://Stackoverflow.com/questions/399982", "https://Stackoverflow.com", "https://Stackoverflow.com/users/43541/" ]
399,991
<p>When I pass the options in the program (a computational biology experiment) I usually pass them through a .py file.<br> So I have this .py file that reads like:</p> <pre><code>starting_length=9 starting_cell_size=1000 LengthofExperiments=5000000 </code></pre> <p>Then I execute the file and get the data. Since the ...
[ { "answer_id": 400046, "author": "S.Lott", "author_id": 10661, "author_profile": "https://Stackoverflow.com/users/10661", "pm_score": 0, "selected": false, "text": "def writeoptions(directory):\n options=\"\"\n options+=\"starting_length=%s%s\"%(starting_length,os.linesep)\n opt...
2008/12/30
[ "https://Stackoverflow.com/questions/399991", "https://Stackoverflow.com", "https://Stackoverflow.com/users/46634/" ]
400,016
<p>I want to record audio using the iphone (&lt; 2 minutes) and save it to a file. I looked at SpeakHere, but it confuses me. Which classes do I use? What delegate methods do I create?</p> <p>Thanks!</p>
[ { "answer_id": 10908060, "author": "Bharathi D", "author_id": 1409804, "author_profile": "https://Stackoverflow.com/users/1409804", "pm_score": 2, "selected": false, "text": "NSMutableDictionary* recordSetting = [[NSMutableDictionary alloc] init];\n [recordSetting setValue :[NSNum...
2008/12/30
[ "https://Stackoverflow.com/questions/400016", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
400,022
<p>What is the point of having a dynamic class on which you can call methods that may, or may not be there?</p>
[ { "answer_id": 400039, "author": "Jon Skeet", "author_id": 22656, "author_profile": "https://Stackoverflow.com/users/22656", "pm_score": 3, "selected": true, "text": "FindByAuthor" }, { "answer_id": 6718767, "author": "konrad.kruczynski", "author_id": 549315, "author_...
2008/12/30
[ "https://Stackoverflow.com/questions/400022", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
400,050
<p>Using Python, how would I go about reading in (be from a string, file or url) a mathematical expression (1 + 1 is a good start) and executing it? </p> <p>Aside from grabbing a string, file or url I have no idea of where to start with this.</p>
[ { "answer_id": 400062, "author": "Alex Coventry", "author_id": 1941213, "author_profile": "https://Stackoverflow.com/users/1941213", "pm_score": 1, "selected": false, "text": "eval" }, { "answer_id": 400081, "author": "Cheery", "author_id": 21711, "author_profile": "h...
2008/12/30
[ "https://Stackoverflow.com/questions/400050", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1384652/" ]
400,051
<p>I have a basic test web form with a DataList and a DetailsView and two XmlDataSource components for each of them.</p> <p>The binding of the DataList to the underlying XML document was easy to set up, but I'm struggling with getting the DetailsView hooked up. The idea is that there is a master/details relationship b...
[ { "answer_id": 400062, "author": "Alex Coventry", "author_id": 1941213, "author_profile": "https://Stackoverflow.com/users/1941213", "pm_score": 1, "selected": false, "text": "eval" }, { "answer_id": 400081, "author": "Cheery", "author_id": 21711, "author_profile": "h...
2008/12/30
[ "https://Stackoverflow.com/questions/400051", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2732/" ]
400,097
<p>I'm currently using NHibernate as my data access layer, using Fluent NHibernate to create the mapping files for me. I have two classes, TripItem and TripItemAttributeValue, which have a many-to-many relation between them.</p> <p>The mapping is as follows:</p> <pre><code>public class TripItemMap : ClassMap&lt;TripI...
[ { "answer_id": 406838, "author": "kͩeͣmͮpͥ ͩ", "author_id": 26479, "author_profile": "https://Stackoverflow.com/users/26479", "pm_score": 2, "selected": false, "text": "TripItems" }, { "answer_id": 406889, "author": "Jeff", "author_id": 23902, "author_profile": "https...
2008/12/30
[ "https://Stackoverflow.com/questions/400097", "https://Stackoverflow.com", "https://Stackoverflow.com/users/50145/" ]
400,099
<p>I'm trying to get a WCF Client assembly deploy in SQL 2005. This means I need to create/register the dependencies for my WCF Client, which are:</p> <ul> <li>System.Runtime.Serialization</li> <li>System.Web</li> <li>System.ServiceModel</li> </ul> <p>With this script:</p> <pre><code>CREATE ASSEMBLY System_Runtime_S...
[ { "answer_id": 403837, "author": "Sander Rijken", "author_id": 5555, "author_profile": "https://Stackoverflow.com/users/5555", "pm_score": 4, "selected": true, "text": "CREATE ASSEMBLY System_Runtime_Serialization FROM 'C:\\Windows\\Microsoft.NET\\Framework\\v3.0\\Windows Communication F...
2008/12/30
[ "https://Stackoverflow.com/questions/400099", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5555/" ]
400,100
<p>I have a Linq to Entities query like this one:</p> <pre><code>var results = from r in entities.MachineRevision where r.Machine.IdMachine == pIdMachine &amp;&amp; r.Category == (int)pCategory select r; </code></pre> <p>Usually, I use the code below to check if some resul...
[ { "answer_id": 400105, "author": "NikolaiDante", "author_id": 39643, "author_profile": "https://Stackoverflow.com/users/39643", "pm_score": 0, "selected": false, "text": "IENumerable<MachineRevision> results = from r in entities.MachineRevision\n...\n" }, { "answer_id": 400124, ...
2008/12/30
[ "https://Stackoverflow.com/questions/400100", "https://Stackoverflow.com", "https://Stackoverflow.com/users/29544/" ]
400,113
<p>I'm looking for a best way to implement common Windows keyboard shortcuts (for example <kbd>Ctrl</kbd>+<kbd>F</kbd>, <kbd>Ctrl</kbd>+<kbd>N</kbd>) in my <a href="http://en.wikipedia.org/wiki/Windows_Forms" rel="noreferrer">Windows Forms</a> application in C#.</p> <p>The application has a main form which hosts many ...
[ { "answer_id": 400119, "author": "Konrad Rudolph", "author_id": 1968, "author_profile": "https://Stackoverflow.com/users/1968", "pm_score": 4, "selected": false, "text": "Click" }, { "answer_id": 400325, "author": "Hans Passant", "author_id": 17034, "author_profile": ...
2008/12/30
[ "https://Stackoverflow.com/questions/400113", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5290/" ]
400,114
<p>Looks like the TSQLConnection only connects to existing databases, and I could not find another component that allows me to send commands to the database server.</p> <p>I'm using Delphi 2009 with Firebird and MSSQL.</p> <p>One idea that came was to connect to a system database (master or tempdb in MSSQL for exampl...
[ { "answer_id": 955631, "author": "user114285", "author_id": 114285, "author_profile": "https://Stackoverflow.com/users/114285", "pm_score": -1, "selected": false, "text": "dbxcommons.pas" } ]
2008/12/30
[ "https://Stackoverflow.com/questions/400114", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2089/" ]
400,115
<p>I need to work with MSMQ (Microsoft Message Queuing). What is it, what is it for, how does it work? How is it different from web services?</p>
[ { "answer_id": 400315, "author": "Ahmed", "author_id": 42749, "author_profile": "https://Stackoverflow.com/users/42749", "pm_score": 3, "selected": false, "text": "MessageQueue" } ]
2008/12/30
[ "https://Stackoverflow.com/questions/400115", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22162/" ]
400,116
<p>What is the purpose of <code>__builtin_offsetof</code> operator (or <code>_FOFF</code> operator in Symbian) in C++?</p> <p>In addition what does it return? Pointer? Number of bytes?</p>
[ { "answer_id": 400127, "author": "Johannes Schaub - litb", "author_id": 34509, "author_profile": "https://Stackoverflow.com/users/34509", "pm_score": 5, "selected": true, "text": "offsetof" }, { "answer_id": 400142, "author": "JesperE", "author_id": 13051, "author_pro...
2008/12/30
[ "https://Stackoverflow.com/questions/400116", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16177/" ]
400,130
<p>Let's say I have a class that implements the <strong>IDisposable</strong> interface. Something like this:</p> <p><img src="https://farm4.static.flickr.com/3199/3149605015_f090f20185_o.png" alt="http://www.flickr.com/photos/garthof/3149605015/"></p> <p><strong>MyClass</strong> uses some unmanaged resources, hence t...
[ { "answer_id": 400145, "author": "Cristian Libardo", "author_id": 16526, "author_profile": "https://Stackoverflow.com/users/16526", "pm_score": 3, "selected": false, "text": "// The async method taks an on-completed callback delegate\nmyClass.AsyncDoSomething(delegate { myClass.Dispose()...
2008/12/30
[ "https://Stackoverflow.com/questions/400130", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1679/" ]
400,135
<p>Can anyone explain to me why I would want to use IList over List in C#?</p> <p><em>Related question: <a href="https://stackoverflow.com/questions/387937">Why is it considered bad to expose <code>List&lt;T&gt;</code></a></em></p>
[ { "answer_id": 400144, "author": "tvanfosson", "author_id": 12950, "author_profile": "https://Stackoverflow.com/users/12950", "pm_score": 10, "selected": true, "text": "List<T>" }, { "answer_id": 400147, "author": "Diadistis", "author_id": 47401, "author_profile": "ht...
2008/12/30
[ "https://Stackoverflow.com/questions/400135", "https://Stackoverflow.com", "https://Stackoverflow.com/users/47036/" ]
400,140
<p>What's a good way to ensure that a temp file is deleted if my application closes or crashes? Ideally, I would like to obtain a temp file, use it, and then forget about it.</p> <p>Right now, I keep a list of my temp files and delete them with an EventHandler that's triggered on Application.ApplicationExit.</p> <p>Is ...
[ { "answer_id": 400391, "author": "Marc Gravell", "author_id": 23354, "author_profile": "https://Stackoverflow.com/users/23354", "pm_score": 7, "selected": true, "text": "using" }, { "answer_id": 400433, "author": "David Grant", "author_id": 26829, "author_profile": "h...
2008/12/30
[ "https://Stackoverflow.com/questions/400140", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17413/" ]
400,146
<p>I've got a couple of ASP.Net Usercontrols that I am using in different locations of my new website. These usercontrols had links like this : </p> <pre><code>&lt;a href="daily/panchang/"&gt;&lt;/a&gt; </code></pre> <p>If the usercontrol is used in pages in various subdirectories the relative path just doesn't work...
[ { "answer_id": 400153, "author": "Andreas Grech", "author_id": 44084, "author_profile": "https://Stackoverflow.com/users/44084", "pm_score": 2, "selected": false, "text": "runat=\"server\"" }, { "answer_id": 400160, "author": "Diadistis", "author_id": 47401, "author_p...
2008/12/30
[ "https://Stackoverflow.com/questions/400146", "https://Stackoverflow.com", "https://Stackoverflow.com/users/33052/" ]
400,167
<p>I want to move the form title, icon and close, and help buttons from left side to right side (change the layout).</p> <p>I moved the form controls manually to keep background image but now I want to change the form title.</p> <p>When I set rightToLeft property to yes and rightToLeftLayout to true in the form prope...
[ { "answer_id": 400358, "author": "Hans Passant", "author_id": 17034, "author_profile": "https://Stackoverflow.com/users/17034", "pm_score": 2, "selected": false, "text": "protected override void OnPaintBackground(PaintEventArgs e) {\n Rectangle rc = new Rectangle(Point.Empty, this.Clien...
2008/12/30
[ "https://Stackoverflow.com/questions/400167", "https://Stackoverflow.com", "https://Stackoverflow.com/users/42782/" ]
400,180
<p>I'm trying to create a Shared Addin using VS 2008 for Office XP (Excel to be precise). However, after creating the project in Visual studio and changing the references to Office XP (apart from Extensibility which I don't seem to be able to find a copy for office xp) and adding excel.exe to the references as well. I ...
[ { "answer_id": 406456, "author": "Henry B", "author_id": 6414, "author_profile": "https://Stackoverflow.com/users/6414", "pm_score": 2, "selected": true, "text": "extensibilityMSM.msi - installs the extensibility.dll\nlockbagRegKey.msi - adds a fix to a registry key\n" } ]
2008/12/30
[ "https://Stackoverflow.com/questions/400180", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6414/" ]
400,181
<p>I've faced strange problem. While user change of check box input element on form produces adequate event programmatic change don't. How should I face this challenge? Code following:</p> <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt; &lt...
[ { "answer_id": 400217, "author": "AnthonyWJones", "author_id": 17516, "author_profile": "https://Stackoverflow.com/users/17516", "pm_score": 1, "selected": false, "text": "jQuery(document).ready(\n function() {\n\n jQuery(\"#cb\").change(\n function() {\n changeLogicForcb...
2008/12/30
[ "https://Stackoverflow.com/questions/400181", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2313/" ]
400,191
<p>In C++, how can I retrieve the location of a mounted drive? for example, if I have mounted drive s: to c:\temp (using subst in the command line) "subst c:\temp s:" how can I get "c:\temp" by passing "s:"</p> <p>I would also like to know how can it be done for a network drive. (if s: is mounted to "\MyComputer\Hell...
[ { "answer_id": 400431, "author": "Stefan", "author_id": 48003, "author_profile": "https://Stackoverflow.com/users/48003", "pm_score": 0, "selected": false, "text": "wstring ConvertToUNC(wstring sPath)\n{\n WCHAR temp;\n UNIVERSAL_NAME_INFO * puni = NULL;\n DWORD bufsize = 0;\n ...
2008/12/30
[ "https://Stackoverflow.com/questions/400191", "https://Stackoverflow.com", "https://Stackoverflow.com/users/44521/" ]
400,197
<p>I have done jQuery and Ajax, but I am not able to get the response into a Div element. This is the code:</p> <p><strong>Index.html</strong></p> <pre><code>$.ajax({ type:"POST", url: "ajax.php", data:"id="+id , success: function(html){ $("#response").html(data); } }); </code></pre> <p>I...
[ { "answer_id": 400232, "author": "redsquare", "author_id": 6440, "author_profile": "https://Stackoverflow.com/users/6440", "pm_score": 7, "selected": true, "text": ".filter" }, { "answer_id": 402718, "author": "redsquare", "author_id": 6440, "author_profile": "https:/...
2008/12/30
[ "https://Stackoverflow.com/questions/400197", "https://Stackoverflow.com", "https://Stackoverflow.com/users/44984/" ]
400,209
<p>Given a collection of random points within a grid, how do you check <strong>efficiently</strong> that they are all lie within a fixed range of other points. ie: Pick any one random point you can then navigate to any other point in the grid.</p> <p>To clarify further: If you have a 1000 x 1000 grid and randomly plac...
[ { "answer_id": 400319, "author": "Jason S", "author_id": 44330, "author_profile": "https://Stackoverflow.com/users/44330", "pm_score": 2, "selected": false, "text": "P_j" }, { "answer_id": 400411, "author": "Jason S", "author_id": 44330, "author_profile": "https://Sta...
2008/12/30
[ "https://Stackoverflow.com/questions/400209", "https://Stackoverflow.com", "https://Stackoverflow.com/users/342/" ]
400,212
<p>How do I copy text to the clipboard (multi-browser)?</p> <p>Related: <em><a href="https://stackoverflow.com/questions/17527870/how-does-trello-access-the-users-clipboard">How does Trello access the user&#39;s clipboard?</a></em></p>
[ { "answer_id": 400252, "author": "bandi", "author_id": 49388, "author_profile": "https://Stackoverflow.com/users/49388", "pm_score": 7, "selected": false, "text": " <script type=\"text/javascript\">\n function select_all(obj) {\n var text_val=eval(obj);\n ...
2008/12/30
[ "https://Stackoverflow.com/questions/400212", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4264/" ]
400,235
<p>I'm trying to get to grips with Java ME development for the Pocket PC. I'm running the NSIcom CrE-ME emulator and building my application with NetBeans 6.5.</p> <p>The application is based around three tab panels, each of which have Swing components. The contents Swing components are updated at various points in th...
[ { "answer_id": 400709, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 1, "selected": false, "text": "this.tableSurvey = new JTable(new DefaultTableModel(data, columnNames)); \nthis.scrollPaneSurvey.setViewportView(this.ta...
2008/12/30
[ "https://Stackoverflow.com/questions/400235", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
400,236
<p>I have a simple ASP.NET 3.5 SP1 Web Forms app... I've added the System.Web.Routing DLL, and I've made a simple route that returns a standard ASP.NET Page as the "IHttpHandler".</p> <p>All is good... except that HttpContext.Current.User is <strong>null</strong> ???</p> <p>So, I did a little more digging (I put brea...
[ { "answer_id": 400289, "author": "Timothy Khouri", "author_id": 11917, "author_profile": "https://Stackoverflow.com/users/11917", "pm_score": 2, "selected": false, "text": "RouteTable.Routes.Add(\"Blah\", new Route(\"Blah/{reportName}\", new MyHandler());\n" } ]
2008/12/30
[ "https://Stackoverflow.com/questions/400236", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11917/" ]
400,240
<p>I would like to get a list of the wireless networks available. Ideally this would be via some C call, but I don't mind if I have to kludge it with a system call. Even better if the required C call or program doesn't require some exotic 3rd party package.</p> <p>The internet seems to suggest I use <code>sudo iwlist ...
[ { "answer_id": 16752895, "author": "David Matlack", "author_id": 1437994, "author_profile": "https://Stackoverflow.com/users/1437994", "pm_score": 5, "selected": false, "text": "iw_set_ext" }, { "answer_id": 59097125, "author": "Guy Luz", "author_id": 10242854, "autho...
2008/12/30
[ "https://Stackoverflow.com/questions/400240", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4596/" ]
400,242
<p>Can I call a remote webservice from a Stored Procedure and use the values that areretuned?</p>
[ { "answer_id": 400351, "author": "Cade Roux", "author_id": 18255, "author_profile": "https://Stackoverflow.com/users/18255", "pm_score": 0, "selected": false, "text": "sp_OACreate" }, { "answer_id": 5317860, "author": "Sunny Rajwadi", "author_id": 319544, "author_prof...
2008/12/30
[ "https://Stackoverflow.com/questions/400242", "https://Stackoverflow.com", "https://Stackoverflow.com/users/49971/" ]
400,255
<p>Is there any way to get around the Oracle 10g limitation of 1000 items in a static IN clause? I have a comma delimited list of many of IDs that I want to use in an IN clause, Sometimes this list can exceed 1000 items, at which point Oracle throws an error. The query is similar to this...</p> <pre><code>select * ...
[ { "answer_id": 400267, "author": "rics", "author_id": 21047, "author_profile": "https://Stackoverflow.com/users/21047", "pm_score": 6, "selected": false, "text": "select * from table1 where ID in (1,2,3,4,...,1000)\nunion all\nselect * from table1 where ID in (1001,1002,...)\n" }, { ...
2008/12/30
[ "https://Stackoverflow.com/questions/400255", "https://Stackoverflow.com", "https://Stackoverflow.com/users/24908/" ]
400,256
<p>How can i draw a box in css? I want a box like the green one used to display the number of answers to a question in stackoverflow?</p>
[ { "answer_id": 400265, "author": "Konrad Rudolph", "author_id": 1968, "author_profile": "https://Stackoverflow.com/users/1968", "pm_score": 2, "selected": false, "text": "div" }, { "answer_id": 400278, "author": "Jon", "author_id": 47895, "author_profile": "https://St...
2008/12/30
[ "https://Stackoverflow.com/questions/400256", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20894/" ]
400,257
<p>I'm using an API that requires me to pass a function pointer as a callback. I'm trying to use this API from my class but I'm getting compilation errors. </p> <p>Here is what I did from my constructor:</p> <pre><code>m_cRedundencyManager-&gt;Init(this-&gt;RedundencyManagerCallBack); </code></pre> <p>This doesn't c...
[ { "answer_id": 400261, "author": "Konrad Rudolph", "author_id": 1968, "author_profile": "https://Stackoverflow.com/users/1968", "pm_score": 2, "selected": false, "text": "Init" }, { "answer_id": 400279, "author": "ofer", "author_id": 33030, "author_profile": "https://...
2008/12/30
[ "https://Stackoverflow.com/questions/400257", "https://Stackoverflow.com", "https://Stackoverflow.com/users/33030/" ]
400,274
<p>I want to access the session of a user from a different domain than the one that I initiated the session. Can I use session.session_id of the user and then retrieve the session hash of that user ?</p> <p>Thank you</p>
[ { "answer_id": 401273, "author": "sammich", "author_id": 50276, "author_profile": "https://Stackoverflow.com/users/50276", "pm_score": -1, "selected": false, "text": "CGI::Session::ActiveRecordStore::SqlBypass::find_by_session_id(session_id)\n" }, { "answer_id": 401367, "auth...
2008/12/30
[ "https://Stackoverflow.com/questions/400274", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1438479/" ]
400,276
<p>I´m trying to make a regular expression to match a whitespace and so far I´m doing this:</p> <pre><code>Powered[\s]*[bB]y.*MyBB </code></pre> <p>I know it should work because I've tried it with Regex Buddy and it says it does but when I try to run it with Eclipse it marks an error saying it's not a valid escape se...
[ { "answer_id": 400305, "author": "Raymond Roestenburg", "author_id": 50142, "author_profile": "https://Stackoverflow.com/users/50142", "pm_score": 2, "selected": false, "text": "import java.util.regex.Matcher;\nimport java.util.regex.Pattern;\n\nimport org.junit.Assert;\nimport org.junit...
2008/12/30
[ "https://Stackoverflow.com/questions/400276", "https://Stackoverflow.com", "https://Stackoverflow.com/users/28586/" ]
400,283
<p>I want to filter values from database based on date.</p> <p>Date in a database contains values like this: 2008-12-28 18:00:00. And my class has a DateTime variable depending on which I want to filter. Ideally it would work like this: <code>myBindingSource.Filter = "DATE(myDateField) = myDateTime.Date"</code> + adju...
[ { "answer_id": 400344, "author": "DCNYAM", "author_id": 30419, "author_profile": "https://Stackoverflow.com/users/30419", "pm_score": 0, "selected": false, "text": "myBindingSource.Filter = \"myDateField = \" & myDateTime.Date.ToString()\n" }, { "answer_id": 400406, "author":...
2008/12/30
[ "https://Stackoverflow.com/questions/400283", "https://Stackoverflow.com", "https://Stackoverflow.com/users/50173/" ]
400,288
<p>I'm looking for an algorithm to efficiently place all-day/multi-day event banners, much like the month view in Outlook or Google Calendar. I have a number of events with a begin and end date, ordered by increasing begin (and then end) date (or any other order you please, I'm gathering events from a database table). ...
[ { "answer_id": 400445, "author": "Wes P", "author_id": 13611, "author_profile": "https://Stackoverflow.com/users/13611", "pm_score": 0, "selected": false, "text": " bbb\naa cc\n" }, { "answer_id": 404078, "author": "joel.neely", "author_id": 3525, "author_profile": "h...
2008/12/30
[ "https://Stackoverflow.com/questions/400288", "https://Stackoverflow.com", "https://Stackoverflow.com/users/50175/" ]
400,304
<p>When I run my tests in Visual Studio individually, they all pass without a problem. However, when I run all of them at once some pass and some fail. I tried putting in a pause of 1 second in between each test method with no success.</p> <p>Any ideas? Thanks in advance for your help...</p>
[ { "answer_id": 25435470, "author": "james2code", "author_id": 184390, "author_profile": "https://Stackoverflow.com/users/184390", "pm_score": 0, "selected": false, "text": "[ClassInitialize]\npublic static void ClassInit(TestContext testContext)\n{\n HttpContext.Current = new HttpCont...
2008/12/30
[ "https://Stackoverflow.com/questions/400304", "https://Stackoverflow.com", "https://Stackoverflow.com/users/50177/" ]
400,314
<p>I have a VB background and I'm converting to C# for my new job. I'm also trying to get better at .NET in general. I've seen the keyword "T" used a lot in samples people post. What does the "T" mean in C#? For example:</p> <pre><code>public class SomeBase&lt;T&gt; where T : SomeBase&lt;T&gt;, new() </code></pre>...
[ { "answer_id": 400322, "author": "Rob Walker", "author_id": 3631, "author_profile": "https://Stackoverflow.com/users/3631", "pm_score": 6, "selected": false, "text": "Public Class SomeBase(Of T As {Class, New}))\n" }, { "answer_id": 400326, "author": "user39603", "author_...
2008/12/30
[ "https://Stackoverflow.com/questions/400314", "https://Stackoverflow.com", "https://Stackoverflow.com/users/681/" ]
400,330
<p>While attempting to use the following code, I am receiving the following error : Already working for different url, error code 155000.</p> <pre><code>string targetPath = @"C:\Documents and Settings\Admin\My Documents\CPM Creator\"; //" for prettify client.Authenticatio​n.DefaultCredentials​ = new NetworkCredential...
[ { "answer_id": 400322, "author": "Rob Walker", "author_id": 3631, "author_profile": "https://Stackoverflow.com/users/3631", "pm_score": 6, "selected": false, "text": "Public Class SomeBase(Of T As {Class, New}))\n" }, { "answer_id": 400326, "author": "user39603", "author_...
2008/12/30
[ "https://Stackoverflow.com/questions/400330", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
400,338
<p>This may be a naive question, but I am new to both the junit and hibernate frameworks and I was wondering what the best way to go about unit testing an application that is largely calls to hibernate, or if it is even necessary to do so? </p> <p>What is the best practice here?</p> <p><strong>EDIT:</strong><br> Spri...
[ { "answer_id": 31351351, "author": "GlenPeterson", "author_id": 1128668, "author_profile": "https://Stackoverflow.com/users/1128668", "pm_score": 0, "selected": false, "text": "reallyUpdate" } ]
2008/12/30
[ "https://Stackoverflow.com/questions/400338", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20774/" ]
400,346
<p>Does anyone know how to disable an ASP.NET validator using JavaScript? I'm using javascript style.display = 'none' to disable parts of a web page. However these disabled parts have asp.net validators that are still firing and I need to disable then without doing a round trip to the server. Thanks.</p>
[ { "answer_id": 400353, "author": "Andreas Grech", "author_id": 44084, "author_profile": "https://Stackoverflow.com/users/44084", "pm_score": 7, "selected": true, "text": "function doSomething()\n{\n var myVal = document.getElementById('myValidatorClientID');\n ValidatorEnable(myVal, fa...
2008/12/30
[ "https://Stackoverflow.com/questions/400346", "https://Stackoverflow.com", "https://Stackoverflow.com/users/47036/" ]
400,359
<p>Let's say that I have written a custom e-mail management application for the company that I work for. It reads e-mails from the company's support account and stores cleaned-up, plain text versions of them in a database, doing other neat things like associating it with customer accounts and orders in the process. Whe...
[ { "answer_id": 400387, "author": "Ole", "author_id": 49540, "author_profile": "https://Stackoverflow.com/users/49540", "pm_score": 3, "selected": true, "text": "(maxlength - 15) <= length <= maxlength" }, { "answer_id": 401259, "author": "Nicholas Piasecki", "author_id": ...
2008/12/30
[ "https://Stackoverflow.com/questions/400359", "https://Stackoverflow.com", "https://Stackoverflow.com/users/32187/" ]
400,364
<h3>The Problem</h3> <p>What is the proper way to check for the <code>foo</code> parameter in the following url's querystring using asp.net? Is this even possible?</p> <pre><code>http://example.com?bar=3&amp;foo </code></pre> <p>I have tried checking <code>Request[&quot;foo&quot;]</code> as well as <code>Request.Query...
[ { "answer_id": 400370, "author": "Andreas Grech", "author_id": 44084, "author_profile": "https://Stackoverflow.com/users/44084", "pm_score": 3, "selected": false, "text": "foo" }, { "answer_id": 400390, "author": "James Curran", "author_id": 12725, "author_profile": "...
2008/12/30
[ "https://Stackoverflow.com/questions/400364", "https://Stackoverflow.com", "https://Stackoverflow.com/users/208/" ]
400,395
<p>Using xaml ( wpf ) I'm trying to get rid of the line under the tab control as show in the "Illustration A" below so that it ends up looking like "Illustration B":</p> <p>Illustration A</p> <p><a href="http://www.arulerforwindows.com/images/peskylinea.png">http://www.arulerforwindows.com/images/peskylinea.png</a></...
[ { "answer_id": 400601, "author": "Jab", "author_id": 29676, "author_profile": "https://Stackoverflow.com/users/29676", "pm_score": 2, "selected": false, "text": "<MultiTrigger>\n <MultiTrigger.Conditions>\n <Condition Property=\"Selector.IsSelected\">\n <Condition.Value>\n ...
2008/12/30
[ "https://Stackoverflow.com/questions/400395", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18735/" ]
400,407
<p>I am writing a web server application in C# and using StreamReader class to read from an underlying NetworkStream:</p> <pre><code> NetworkStream ns = new NetworkStream(clientSocket); StreamReader sr = new StreamReader(ns); String request = sr.ReadLine(); </code></pre> <p>This code is prone to DoS attacks because...
[ { "answer_id": 400419, "author": "Marc Gravell", "author_id": 23354, "author_profile": "https://Stackoverflow.com/users/23354", "pm_score": 4, "selected": true, "text": "Read(char[], int, int)" }, { "answer_id": 400424, "author": "Gant", "author_id": 12460, "author_pr...
2008/12/30
[ "https://Stackoverflow.com/questions/400407", "https://Stackoverflow.com", "https://Stackoverflow.com/users/50191/" ]
400,413
<p>I've got a simple asmx web service that just needs to log some information to a transactional database. However it is timing out for the client. The call to update the database just calls 1 stored procedure and I don't beleive it could be optimized further for better performance. I've been reduced to just logging...
[ { "answer_id": 400419, "author": "Marc Gravell", "author_id": 23354, "author_profile": "https://Stackoverflow.com/users/23354", "pm_score": 4, "selected": true, "text": "Read(char[], int, int)" }, { "answer_id": 400424, "author": "Gant", "author_id": 12460, "author_pr...
2008/12/30
[ "https://Stackoverflow.com/questions/400413", "https://Stackoverflow.com", "https://Stackoverflow.com/users/50186/" ]
400,421
<p>In VB6 code, I have the following:</p> <pre><code>dim I as Long I = Weekday(Now, vbFriday) </code></pre> <p>I want the equivalent in C#. Can any one help?</p>
[ { "answer_id": 400426, "author": "Lasse V. Karlsen", "author_id": 267, "author_profile": "https://Stackoverflow.com/users/267", "pm_score": 2, "selected": false, "text": "DayOfWeek dow = DateTime.Now.DayOfWeek;\n" }, { "answer_id": 400429, "author": "Charles Bretana", "au...
2008/12/30
[ "https://Stackoverflow.com/questions/400421", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14299/" ]
400,428
<p>I can't seem to get my head around this one. I'm using HttpWebRequest to try and send some data out to another site. I'm attempting to figure out the best way to get our firewalls configured, but I'm at a loss. By watching the NetMon trace, it appears as though it's ignoring what I tell it; the HTTP headers I see go...
[ { "answer_id": 400474, "author": "Wes P", "author_id": 13611, "author_profile": "https://Stackoverflow.com/users/13611", "pm_score": 0, "selected": false, "text": "HttpWebRequest" } ]
2008/12/30
[ "https://Stackoverflow.com/questions/400428", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1212/" ]
400,432
<p>I have this <code>If</code> condition in VB6 </p> <pre><code>If ( X AND ( 2 ^ Y)) Then a = a + " 1" Else a = a + " 0" </code></pre> <p>I want the same equivalent in C# </p> <p>I tried doing like </p> <pre><code>if ( X &amp;&amp; ( 2 ^ Y)) // ERROR: &amp;&amp; can not be used between int to int a = a +...
[ { "answer_id": 400440, "author": "Stefan", "author_id": 48003, "author_profile": "https://Stackoverflow.com/users/48003", "pm_score": 0, "selected": false, "text": "if ( 1 & ( 2 ^ 1))\n a = a + \"1\";\nelse\n a= a+ \"0\";\n" }, { "answer_id": 400441, "author": "Michael Mead...
2008/12/30
[ "https://Stackoverflow.com/questions/400432", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14299/" ]
400,464
<p>The following code loads a gig, clears out the gigs acts collection and then adds a new act.</p> <pre><code> Data.LinqToSQL.Gig dbGig = DBContext.Gigs.Where(x =&gt; x.ID == myGigID).SingleOrDefault(); //Remove all references to the current acts if(dbGig.Acts!=null) { ...
[ { "answer_id": 400486, "author": "Marc Gravell", "author_id": 23354, "author_profile": "https://Stackoverflow.com/users/23354", "pm_score": 0, "selected": false, "text": "dbGig.Acts.Add(dbAct);\n" } ]
2008/12/30
[ "https://Stackoverflow.com/questions/400464", "https://Stackoverflow.com", "https://Stackoverflow.com/users/46616/" ]
400,475
<p>I want a hyperlink on my main page to launch an HTML help page in a new browser window. However I want the new window to only have an address bar, i.e. not have a menu, toolbars or status bar, and better still not even have an editable address bar. </p> <p>I have seen this done on quite a few sites but can't figu...
[ { "answer_id": 400478, "author": "Otávio Décio", "author_id": 48684, "author_profile": "https://Stackoverflow.com/users/48684", "pm_score": 3, "selected": false, "text": "<SCRIPT LANGUAGE=\"javascript\">\n<!--\nwindow.open ('titlepage.html', 'newwindow', config='height=100,\nwidth=400, t...
2008/12/30
[ "https://Stackoverflow.com/questions/400475", "https://Stackoverflow.com", "https://Stackoverflow.com/users/24039/" ]
400,495
<p>How can I retuen a Object from a web service:</p> <p>[WebMethod] public DataSet GetVendors(string Database) { SqlConnection sqlConn = new SqlConnection();</p> <pre><code> sqlConn.ConnectionString = GetConnString(Database); // build query string strSQL = @" SELEC...
[ { "answer_id": 400523, "author": "Wes P", "author_id": 13611, "author_profile": "https://Stackoverflow.com/users/13611", "pm_score": 2, "selected": true, "text": "DataSet" }, { "answer_id": 400605, "author": "Alex Fort", "author_id": 12624, "author_profile": "https://...
2008/12/30
[ "https://Stackoverflow.com/questions/400495", "https://Stackoverflow.com", "https://Stackoverflow.com/users/49971/" ]
400,522
<p>I'm trying to match the parts of a version number (Major.Minor.Build.Revision) with C# regular expressions. However, I'm pretty new to writing Regex and even using Expresso is proving to be a little difficult. Right now, I have this:</p> <pre><code>(?&lt;Major&gt;\d*)\.(?&lt;Minor&gt;\d*)\.(?&lt;Build&gt;\d*)\.(?&l...
[ { "answer_id": 400534, "author": "Jonathan Leffler", "author_id": 15168, "author_profile": "https://Stackoverflow.com/users/15168", "pm_score": 5, "selected": true, "text": "(?<Major>\\d*)\\.(?<Minor>\\d*)(\\.(?<Build>\\d*)(\\.(?<Revision>\\d*))?)?\n" }, { "answer_id": 400547, ...
2008/12/30
[ "https://Stackoverflow.com/questions/400522", "https://Stackoverflow.com", "https://Stackoverflow.com/users/31516/" ]
400,552
<p>I can't seem to find a .NET answer to this problem, which I would have thought would be fairly common.<br> What is the best pattern for unit testing an asynchronous method?</p> <p>Obviously I need to call the method and then see if the callback fires, but is there a better way than simply sleeping for a bit and the...
[ { "answer_id": 400578, "author": "ctacke", "author_id": 13154, "author_profile": "https://Stackoverflow.com/users/13154", "pm_score": 4, "selected": true, "text": "[TestMethod]\n[WorkItem(244)]\n[Description(\"Ensures calling SetRemoteTableName with a valid name works \n AND...
2008/12/30
[ "https://Stackoverflow.com/questions/400552", "https://Stackoverflow.com", "https://Stackoverflow.com/users/50204/" ]
400,557
<p>How can i convert this to a decimal in SQL? Below is the equation and i get the answer as 78 (integer) but the real answer is 78.6 (with a decimal) so i need to show this as otherwise the report won't tally up to 100%</p> <pre><code>(100 * [TotalVisit1]/[TotalVisits]) AS Visit1percent </code></pre>
[ { "answer_id": 400573, "author": "LeppyR64", "author_id": 16592, "author_profile": "https://Stackoverflow.com/users/16592", "pm_score": 5, "selected": false, "text": "(100.0 * [TotalVisit1]/[TotalVisits]) AS Visit1percent\n" }, { "answer_id": 400590, "author": "Kent Fredric",...
2008/12/30
[ "https://Stackoverflow.com/questions/400557", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
400,562
<p>I have a table where one column has duplicate records but other columns are distinct. so something like this</p> <p>Code SubCode version status</p> <p>1234 D1 1 A</p> <p>1234 D1 0 P</p> <p>1234 DA 1 A</p> <p>1234 DB 1 P</p> ...
[ { "answer_id": 400596, "author": "Charles Bretana", "author_id": 32632, "author_profile": "https://Stackoverflow.com/users/32632", "pm_score": 0, "selected": false, "text": "Select [stuff]\nFrom Table T\nWhere Exists\n (Select * From Table \n Where Code = T.Code\n And Statu...
2008/12/30
[ "https://Stackoverflow.com/questions/400562", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
400,565
<p>I'm currently trying to modify some HttpWebRequest functions, but I can't do it through inheritance because HttpWebRequest has no public constructors (besides the deserialization constructor). Is there a workaround to do this?</p> <p>My objective is to code something like the example below, but this class objects m...
[ { "answer_id": 400757, "author": "Raymond Roestenburg", "author_id": 50142, "author_profile": "https://Stackoverflow.com/users/50142", "pm_score": 4, "selected": false, "text": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Net;\nusing System.Text;\n\...
2008/12/30
[ "https://Stackoverflow.com/questions/400565", "https://Stackoverflow.com", "https://Stackoverflow.com/users/48465/" ]
400,566
<p>Does anyone know of existing code that lets you draw fully justified text in Java2D?</p> <p>For example, if I said, <code>drawString("sample text here", x, y, width)</code>, is there an existing library that could figure out how much of that text fits within the width, do some inter-character spacing to make the te...
[ { "answer_id": 400676, "author": "coobird", "author_id": 17172, "author_profile": "https://Stackoverflow.com/users/17172", "pm_score": 5, "selected": true, "text": "Font" } ]
2008/12/30
[ "https://Stackoverflow.com/questions/400566", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2197/" ]
400,567
<p>Our ssl certificate recently expired, so we were issued a new one by the CA. Unfortunately, when biztalk uses this certificate to access a server, the server rejects it, giving us a 403.17 error (Expired or not yet valid). </p> <p>So I checked the dates of the certificate and it seems okay. But to really check if t...
[ { "answer_id": 400676, "author": "coobird", "author_id": 17172, "author_profile": "https://Stackoverflow.com/users/17172", "pm_score": 5, "selected": true, "text": "Font" } ]
2008/12/30
[ "https://Stackoverflow.com/questions/400567", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20526/" ]
400,575
<p>I'm not quite sure when selecting only a certain number of rows would be better than simply making a more specific select statement. I have a feeling I'm missing something pretty straight forward but I can't figure it out. I have less than 6 months experience with any SQL and it's been cursory at that so I'm sorry...
[ { "answer_id": 400811, "author": "Amy B", "author_id": 8155, "author_profile": "https://Stackoverflow.com/users/8155", "pm_score": 4, "selected": true, "text": "SELECT top 10 CustomerName\nFROM Customer\nWHERE CustomerID > 200 --start of page\nORDER BY CustomerID\n" } ]
2008/12/30
[ "https://Stackoverflow.com/questions/400575", "https://Stackoverflow.com", "https://Stackoverflow.com/users/33911/" ]
400,609
<p>In my work I have come across syntax like global:: (C#) or G:Loading($value) in Php, what do they mean?</p>
[ { "answer_id": 400626, "author": "Greg Beech", "author_id": 13552, "author_profile": "https://Stackoverflow.com/users/13552", "pm_score": 4, "selected": true, "text": "::" }, { "answer_id": 400629, "author": "biozinc", "author_id": 30698, "author_profile": "https://St...
2008/12/30
[ "https://Stackoverflow.com/questions/400609", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3834/" ]
400,616
<p>Like every other web developer on the planet, I have an issue with users double clicking the submit button on my forms. My understanding is that the conventional way to handle this issue, is to disable the button immediately after the first click, however when I do this, <strong>it doesn't post</strong>.</p> <p>I ...
[ { "answer_id": 400633, "author": "Kon", "author_id": 22303, "author_profile": "https://Stackoverflow.com/users/22303", "pm_score": 2, "selected": false, "text": ".hiddenButton\n{\n position: absolute;\n top: -1000px;\n left: -1000px;\n}\n" }, { "answer_id": 400716, "author...
2008/12/30
[ "https://Stackoverflow.com/questions/400616", "https://Stackoverflow.com", "https://Stackoverflow.com/users/29043/" ]
400,628
<p>I have a VS 2008 project under TortoiseSVN source control. I am the only person using it at present.</p> <p>I was trying to commit my latest changes when I received the message "File abc is out of date - please update". When I try to update the project, I get a whole set of file conflicts (binary and text). Since I...
[ { "answer_id": 400679, "author": "Ole", "author_id": 49540, "author_profile": "https://Stackoverflow.com/users/49540", "pm_score": 3, "selected": true, "text": ">>>>>> theirs" } ]
2008/12/30
[ "https://Stackoverflow.com/questions/400628", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6939/" ]
400,631
<p>How can I place a banner on webpage with one application to all pages of a website?</p>
[ { "answer_id": 400649, "author": "ConroyP", "author_id": 2287, "author_profile": "https://Stackoverflow.com/users/2287", "pm_score": 2, "selected": false, "text": "banner.inc.php:\n<?php\n // echo out banner here...\n?>\n" } ]
2008/12/30
[ "https://Stackoverflow.com/questions/400631", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
400,655
<p>What exactly is a "Format String Vulnerability" in a Windows System, how does it work, and how can I protect against it?</p>
[ { "answer_id": 400722, "author": "some", "author_id": 36866, "author_profile": "https://Stackoverflow.com/users/36866", "pm_score": 2, "selected": false, "text": "string s=getUserInput();\nwrite(s)\n" }, { "answer_id": 400726, "author": "Roger Lipscombe", "author_id": 844...
2008/12/30
[ "https://Stackoverflow.com/questions/400655", "https://Stackoverflow.com", "https://Stackoverflow.com/users/50216/" ]
400,674
<p>I'm trying to reproduce the functionality of built-in Mail application when a new message arrives while you are listening to iPod music.</p> <p>What happens with the Mail app is:</p> <ol> <li>iPod's volume lowers a bit</li> <li>Mail app plays a short sound and vibration</li> <li>iPod's volume goes back to normal</...
[ { "answer_id": 1003744, "author": "Aleksandar Vacić", "author_id": 108859, "author_profile": "https://Stackoverflow.com/users/108859", "pm_score": 2, "selected": false, "text": "[[MPMusicPlayerController iPodMusicPlayer] setVolume:x.y]\n" } ]
2008/12/30
[ "https://Stackoverflow.com/questions/400674", "https://Stackoverflow.com", "https://Stackoverflow.com/users/44091/" ]
400,691
<p>I'm struggling to create an OU for Active Directory using the code below.</p> <pre><code>strPath = "OU=TestOU,DC=Internal,DC=Com" DirectoryEntry objOU; objOU = ADentry.Children.Add(strPath, "OrganizationalUnit"); objOU.CommitChanges(); </code></pre> <p>The problem is strPath contains the full path 'OU=TestOU,DC=...
[ { "answer_id": 400787, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 4, "selected": false, "text": "using System;\nusing System.DirectoryServices;\n\nnamespace ADAM_Examples\n{\n class CreateOU\n {\n /// <summary>...
2008/12/30
[ "https://Stackoverflow.com/questions/400691", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
400,706
<p>I'm trying to run down a memory leak in a windows forms application. I'm looking now at a form which contains several embedded forms. What worries me is that the child forms, in their constructor, take a reference to the parent form, and keep it in a private member field. So it seems to me that come garbage-colle...
[ { "answer_id": 6473482, "author": "user814688", "author_id": 814688, "author_profile": "https://Stackoverflow.com/users/814688", "pm_score": 2, "selected": false, "text": "interface IEventSource\n{\n event EventHandler SomethingHappened;\n}\n" } ]
2008/12/30
[ "https://Stackoverflow.com/questions/400706", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18071/" ]
400,712
<p>How can I limit a result set to <em>n</em> distinct values of a given column(s), where the actual number of rows may be higher?</p> <p>Input table:</p> <pre><code>client_id, employer_id, other_value 1, 2, abc 1, 3, defg 2, 3, dkfjh 3, 1, ldkfjkj 4, 4, dlkfjk 4, 5, 342 4, 6, dkj 5, 1, dlkfj 6, 1, 34kjf 7, 7, 34kjf ...
[ { "answer_id": 400721, "author": "Vinko Vrsalovic", "author_id": 5190, "author_profile": "https://Stackoverflow.com/users/5190", "pm_score": 5, "selected": true, "text": "select * from table where client_id in \n(select distinct client_id from table order by client_id limit 5)\n" }, ...
2008/12/30
[ "https://Stackoverflow.com/questions/400712", "https://Stackoverflow.com", "https://Stackoverflow.com/users/41613/" ]
400,717
<p>What can be done to resolve the exception:</p> <p>CrystalDecisions.CrystalReports.Engine.InternalException: Failed to open a rowset.</p>
[ { "answer_id": 3995720, "author": "fritterfatboy", "author_id": 385382, "author_profile": "https://Stackoverflow.com/users/385382", "pm_score": 0, "selected": false, "text": "Try\n 'your code here\nCatch\n Throw new exception(\"Hey, here's a really friendly but completely useless err...
2008/12/30
[ "https://Stackoverflow.com/questions/400717", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19308/" ]
400,728
<p>I'm working with a jQuery dialog that contains a form. In ie6, there are a couple unexplained inches of padding above the form. When I eliminate the form from the markup, the most serious layout problems go away. I've tried it with no theme (default), Flora, and my themeroller theme and they all seem to have the sam...
[ { "answer_id": 402551, "author": "Soviut", "author_id": 46914, "author_profile": "https://Stackoverflow.com/users/46914", "pm_score": 3, "selected": true, "text": "form {\n margin: 0;\n padding: 0;\n overflow: hidden;\n}\n" }, { "answer_id": 413674, "author": "tanath...
2008/12/30
[ "https://Stackoverflow.com/questions/400728", "https://Stackoverflow.com", "https://Stackoverflow.com/users/47096/" ]
400,732
<p>How do you determine the length of a string of text in Arial Bold font, and then center it in VB6?</p> <p>We are not using a "label" or "picture box" to print the text to the screen. We are sizing the text on the fly, and allowing the user to scale the size of our application to their liking. We write the text to s...
[ { "answer_id": 400760, "author": "Neil Barnwell", "author_id": 26414, "author_profile": "https://Stackoverflow.com/users/26414", "pm_score": 1, "selected": false, "text": "MeasureString" }, { "answer_id": 400775, "author": "RS Conley", "author_id": 7890, "author_profi...
2008/12/30
[ "https://Stackoverflow.com/questions/400732", "https://Stackoverflow.com", "https://Stackoverflow.com/users/40091/" ]
400,733
<p>I want to get the ASCII value of characters in a string in C#.</p> <p>If my string has the value "9quali52ty3", I want an array with the ASCII values of each of the 11 characters.</p> <p>How can I get ASCII values in C#?</p>
[ { "answer_id": 400738, "author": "LeppyR64", "author_id": 16592, "author_profile": "https://Stackoverflow.com/users/16592", "pm_score": 6, "selected": false, "text": "string s = \"9quali52ty3\";\nforeach(char c in s)\n{\n Console.WriteLine((int)c);\n}\n" }, { "answer_id": 400742...
2008/12/30
[ "https://Stackoverflow.com/questions/400733", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14299/" ]
400,739
<p>Does * have a special meaning in Python as it does in C? I saw a function like this in the Python Cookbook:</p> <pre><code>def get(self, *a, **kw) </code></pre> <p>Would you please explain it to me or point out where I can find an answer (Google interprets the * as wild card character and thus I cannot find a sati...
[ { "answer_id": 400753, "author": "S.Lott", "author_id": 10661, "author_profile": "https://Stackoverflow.com/users/10661", "pm_score": 9, "selected": true, "text": "*identifier" }, { "answer_id": 400790, "author": "HUAGHAGUAH", "author_id": 27233, "author_profile": "ht...
2008/12/30
[ "https://Stackoverflow.com/questions/400739", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8203/" ]
400,759
<p>Is there an easy way to do a <code>GROUP BY DATE(timestamp)</code> that includes all days in a period of time, regardless of whether there are any records associated with that date?</p> <p>Basically, I need to generate a report like this:</p> <pre><code>24 Dec - 0 orders 23 Dec - 10 orders 22 Dec - 8 orders 21 Dec...
[ { "answer_id": 400779, "author": "ChrisW", "author_id": 49942, "author_profile": "https://Stackoverflow.com/users/49942", "pm_score": 3, "selected": true, "text": "24 Dec\n23 Dec\n22 Dec\n21 Dec\n20 Dec\n" }, { "answer_id": 400789, "author": "Charles Bretana", "author_id"...
2008/12/30
[ "https://Stackoverflow.com/questions/400759", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1902010/" ]
400,772
<p>I want to improve integration tests methods where I work and I would like to know how this process happens in other places.<br> Things like:<br> - When test plans writing begin<br> - Proportion between testers, developers and stuff (entire applications or modifications) to be tested<br> - What kind of methods are...
[ { "answer_id": 400779, "author": "ChrisW", "author_id": 49942, "author_profile": "https://Stackoverflow.com/users/49942", "pm_score": 3, "selected": true, "text": "24 Dec\n23 Dec\n22 Dec\n21 Dec\n20 Dec\n" }, { "answer_id": 400789, "author": "Charles Bretana", "author_id"...
2008/12/30
[ "https://Stackoverflow.com/questions/400772", "https://Stackoverflow.com", "https://Stackoverflow.com/users/37650/" ]
400,778
<p>I'm trying to create a UserControl that inherits from a generic class. It does not directly inherit from a generic class, but through an intermediate class that does not use generics. This compiles and works at runtime, but I get an error at design time.</p> <p>Here's my generic parent class:</p> <pre><code>Publ...
[ { "answer_id": 400842, "author": "Steven Evers", "author_id": 48553, "author_profile": "https://Stackoverflow.com/users/48553", "pm_score": 1, "selected": false, "text": "\nclass GenericObject[T] : UserControl\n{\n}\n\nclass StaticObject : GenericObject[Int32]\n{\n public Int32 wide {...
2008/12/30
[ "https://Stackoverflow.com/questions/400778", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16625/" ]
400,788
<p>I need to resize jpg images with Python without losing the original image's EXIF data (metadata about date taken, camera model etc.). All google searches about python and images point to the PIL library which I'm currently using, but doesn't seem to be able to retain the metadata. The code I have so far (using PIL) ...
[ { "answer_id": 400838, "author": "jfs", "author_id": 4279, "author_profile": "https://Stackoverflow.com/users/4279", "pm_score": 5, "selected": true, "text": "import jpeg\njpeg.setExif(jpeg.getExif('foo.jpg'), 'foo-resized.jpg') \n" }, { "answer_id": 4270949, "author": "Maksy...
2008/12/30
[ "https://Stackoverflow.com/questions/400788", "https://Stackoverflow.com", "https://Stackoverflow.com/users/35716/" ]
400,794
<p>I needed an algorithm to generate all possible partitions of a positive number, and I came up with one (posted as an answer), but it's exponential time.</p> <p>The algorithm should return all the possible ways a number can be expressed as the sum of positive numbers less than or equal to itself. So for example for ...
[ { "answer_id": 400796, "author": "Can Berk Güder", "author_id": 2119, "author_profile": "https://Stackoverflow.com/users/2119", "pm_score": 5, "selected": false, "text": "q = { 1: [[1]] }\n\ndef decompose(n):\n try:\n return q[n]\n except:\n pass\n\n result = [[n]]...
2008/12/30
[ "https://Stackoverflow.com/questions/400794", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2119/" ]
400,798
<p>I have a WCF service that I call from a windows service.</p> <p>The WCF service runs a SSIS package, and that package can take a while to complete and I don't want my windows service to have to wait around for it to finish.</p> <p>How can I make my WCF service call asynchronous? (or is it asynchronous by default?...
[ { "answer_id": 5828828, "author": "Bahamut", "author_id": 730580, "author_profile": "https://Stackoverflow.com/users/730580", "pm_score": 4, "selected": false, "text": "Add Service Reference > click Advanced button > check the Generate Asynchronous Operations" }, { "answer_id": 3...
2008/12/30
[ "https://Stackoverflow.com/questions/400798", "https://Stackoverflow.com", "https://Stackoverflow.com/users/39677/" ]
400,799
<p>I'm having a major issue trying to configure a new install of BizTalk Server 2006 (not R2). The server had BizTalk installed on it before, and it was working fine. I've uninstalled BizTalk, removed the databases and jobs from the SQL server, which is a separate machine, and re-installed BizTalk. The install was s...
[ { "answer_id": 5828828, "author": "Bahamut", "author_id": 730580, "author_profile": "https://Stackoverflow.com/users/730580", "pm_score": 4, "selected": false, "text": "Add Service Reference > click Advanced button > check the Generate Asynchronous Operations" }, { "answer_id": 3...
2008/12/30
[ "https://Stackoverflow.com/questions/400799", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16683/" ]
400,802
<p>How to fetch HTML in C or C++? with Sockets. Can you give me a Example code pls?</p> <p>NOTE - I originally closed this, but reopened. To the poster - Please see:</p> <p><a href="https://stackoverflow.com/questions/400688/fetch-web-page-in-c">https://stackoverflow.com/questions/400688/fetch-web-page-in-c</a></p> ...
[ { "answer_id": 400825, "author": "Johann Gerell", "author_id": 6345, "author_profile": "https://Stackoverflow.com/users/6345", "pm_score": 1, "selected": false, "text": "URLDownloadToFile" } ]
2008/12/30
[ "https://Stackoverflow.com/questions/400802", "https://Stackoverflow.com", "https://Stackoverflow.com/users/50216/" ]
400,805
<p>I'm looking for the name of the PHP function to build a query string from an array of key value pairs. Please note, I am looking for <em>the built in PHP</em> function to do this, not a homebrew one (that's all a google search seems to return). There is one, I just can't remember its name or find it on php.net. IIRC...
[ { "answer_id": 400814, "author": "TJ L", "author_id": 12605, "author_profile": "https://Stackoverflow.com/users/12605", "pm_score": 9, "selected": true, "text": "http_build_query()" }, { "answer_id": 5997082, "author": "0x6A75616E", "author_id": 62747, "author_profile...
2008/12/30
[ "https://Stackoverflow.com/questions/400805", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1349865/" ]
400,819
<p>I would like to call a sql statement such as:</p> <pre><code>Select * From Table Where Column in ('value1', 'value2', 'value3') </code></pre> <p>Is it as simple as setting a command parameter's value equal to "<code>('value1', 'value2', 'value3')</code>"?</p>
[ { "answer_id": 400831, "author": "JoshBerke", "author_id": 26160, "author_profile": "https://Stackoverflow.com/users/26160", "pm_score": 0, "selected": false, "text": "select * from \ntable inner join\ndbo.fn_stringToTable(@params)\n" }, { "answer_id": 400854, "author": "Char...
2008/12/30
[ "https://Stackoverflow.com/questions/400819", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9150/" ]
400,822
<p>I've got some shell stuff set up that dynamically defines aliases depending on what sort of VC repo the CWD contains -- so, for example, 'd' runs 'svn diff' or 'git diff', depending. (Based on <a href="http://muness.blogspot.com/2008/06/stop-presses-bash-said-to-embrace.html" rel="nofollow noreferrer">this blog post...
[ { "answer_id": 400932, "author": "codelogic", "author_id": 43427, "author_profile": "https://Stackoverflow.com/users/43427", "pm_score": 3, "selected": false, "text": "git config" }, { "answer_id": 401725, "author": "Pieter", "author_id": 49401, "author_profile": "htt...
2008/12/30
[ "https://Stackoverflow.com/questions/400822", "https://Stackoverflow.com", "https://Stackoverflow.com/users/39933/" ]
400,834
<p>I am loading a Microsoft CRM 4.0 window from an Intranet page using window.open(...).</p> <p>When the window closes, I need it to programmatically press a button on the page that opened it. I can do this from my own form by getting the button (whose name is passed in the querystring) and executing its click method ...
[ { "answer_id": 415473, "author": "brendan", "author_id": 225, "author_profile": "https://Stackoverflow.com/users/225", "pm_score": 2, "selected": true, "text": "if(window.opener.DoSomeFunction != null)\n {\n window.opener.DoSomeFunction;\n }\n" } ]
2008/12/30
[ "https://Stackoverflow.com/questions/400834", "https://Stackoverflow.com", "https://Stackoverflow.com/users/44938/" ]
400,843
<p>I have created some rounded navigation tabs using CSS and am having trouble when implementingn <code>hover</code>.</p> <p>Firstly here is a link to the site <a href="http://www.ronnieweb.byethost10.com/test/index.html" rel="nofollow noreferrer">Tabs</a> as it is quite difficult to explain. Please, hover over the le...
[ { "answer_id": 400877, "author": "annakata", "author_id": 13018, "author_profile": "https://Stackoverflow.com/users/13018", "pm_score": 3, "selected": true, "text": "a" }, { "answer_id": 400919, "author": "Mg.", "author_id": 314728, "author_profile": "https://Stackove...
2008/12/30
[ "https://Stackoverflow.com/questions/400843", "https://Stackoverflow.com", "https://Stackoverflow.com/users/50057/" ]