qid
int64
4
22.2M
question
stringlengths
18
48.3k
answers
list
date
stringlengths
10
10
metadata
list
325,301
<p>You are given a heap of code in your favorite language which combines to form a rather complicated application. It runs rather slowly, and your boss has asked you to optimize it. <strong>What are the steps you follow to most efficiently optimize the code?</strong> </p> <p>What strategies have you found to be <stron...
[ { "answer_id": 797848, "author": "Mike Dunlavey", "author_id": 23771, "author_profile": "https://Stackoverflow.com/users/23771", "pm_score": 1, "selected": false, "text": "call _main" } ]
2008/11/28
[ "https://Stackoverflow.com/questions/325301", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15055/" ]
325,305
<p>I just set up SSHd through Cygwin on a Windows XP Pro box overseas using a RAT and discluded the openssh package from the install. I ran the cywin shell (from c:\cywin) and ran Now, It's under a port I know is safe and fowarded properly, but I won't share it's number. It's not a common port, but it's under 40000. Fi...
[ { "answer_id": 797848, "author": "Mike Dunlavey", "author_id": 23771, "author_profile": "https://Stackoverflow.com/users/23771", "pm_score": 1, "selected": false, "text": "call _main" } ]
2008/11/28
[ "https://Stackoverflow.com/questions/325305", "https://Stackoverflow.com", "https://Stackoverflow.com/users/36076/" ]
325,323
<p>I was just working on a localizable Lua string solution, when I came up with this hack, problem is I don't know how to avoid getting hacked by it :) So I was wondering if anyone, has done something similar and or knows how to protect from this kind of attack. (in user code)</p> <p>Since we can do this:</p> <pre><c...
[ { "answer_id": 326323, "author": "Alexander Gladysh", "author_id": 6236, "author_profile": "https://Stackoverflow.com/users/6236", "pm_score": 4, "selected": true, "text": "__metatable" }, { "answer_id": 359081, "author": "akauppi", "author_id": 14455, "author_profile...
2008/11/28
[ "https://Stackoverflow.com/questions/325323", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15124/" ]
325,325
<p>I have an intermittent problem with some code that writes to a Windows Event Log, using C# and .Net's <code>EventLog</code> class.</p> <p>Basically, this code works day-to-day perfectly, but very occasionally, we start getting errors like this:</p> <blockquote> <p>"System.ArgumentException: Only the first eigh...
[ { "answer_id": 325381, "author": "bruno conde", "author_id": 31136, "author_profile": "https://Stackoverflow.com/users/31136", "pm_score": 3, "selected": true, "text": "Log" } ]
2008/11/28
[ "https://Stackoverflow.com/questions/325325", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6004/" ]
325,328
<p>Do you know any documentation about the rules of using update sites? I have managed the last 2 and a half years the update site of our company, and these are the problems I have to address:</p> <ul> <li>Not all projects use the same eclipse version. We had projects that used eclipse 2.1 (WSAD), eclipse 3.0 (RAD 6),...
[ { "answer_id": 325422, "author": "jamesh", "author_id": 4737, "author_profile": "https://Stackoverflow.com/users/4737", "pm_score": 1, "selected": false, "text": "|\n+-WSAD-2-1 Category\n| |\n| +- Checkstyle 3.1 Feature\n| |\n| `- Team Checkstyle configuration for Checkstyle 3.1\...
2008/11/28
[ "https://Stackoverflow.com/questions/325328", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2603665/" ]
325,337
<p>I have below a list of text, it is from a popular online game called EVE Online and this basically gets mailed to you when you kill a person in-game. I'm building a tool to parse these using PHP to extract all relevant information. I will need all pieces of information shown and i'm writting classes to nicely break ...
[ { "answer_id": 325477, "author": "e-satis", "author_id": 9951, "author_profile": "https://Stackoverflow.com/users/9951", "pm_score": 3, "selected": true, "text": "<?php\n\nclass Parser \n{\n /* Enclosing the parser in a class is not mandatory but it' clean */\n\n function Parser()\n...
2008/11/28
[ "https://Stackoverflow.com/questions/325337", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13227/" ]
325,346
<p>There's one thing I haven't found in <a href="https://www.rfc-editor.org/rfc/rfc2616" rel="nofollow noreferrer">RFC 2616</a> (&quot;Hypertext Transfer Protocol -- HTTP/1.1&quot;) and that's a &quot;canonical&quot; name for a request/response pair. Is there such thing?</p> <p><a href="https://www.rfc-editor.org/rfc/r...
[ { "answer_id": 58045247, "author": "Cœur", "author_id": 1033581, "author_profile": "https://Stackoverflow.com/users/1033581", "pm_score": 3, "selected": false, "text": "Exchange" } ]
2008/11/28
[ "https://Stackoverflow.com/questions/325346", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4833/" ]
325,366
<p>I am trying to make a form in which the user fills in values. It is quite long. I wish to use an expandable tree to fit it into my one form. Is there any way to give each TreeView Node a TextBox by its side? Having the node text edited by itself is not enough.</p>
[ { "answer_id": 325412, "author": "Marc Gravell", "author_id": 23354, "author_profile": "https://Stackoverflow.com/users/23354", "pm_score": 3, "selected": true, "text": "TreeListView" } ]
2008/11/28
[ "https://Stackoverflow.com/questions/325366", "https://Stackoverflow.com", "https://Stackoverflow.com/users/41392/" ]
325,367
<p>I am having trouble getting my ASP.NET application to start an application. For example when I type: <a href="http://my.domain.com/virtualdir" rel="nofollow noreferrer">http://my.domain.com/virtualdir</a> or </p> <p><a href="http://my.domain.com/virtualdir/default.aspx" rel="nofollow noreferrer">http://my.domain.c...
[ { "answer_id": 325412, "author": "Marc Gravell", "author_id": 23354, "author_profile": "https://Stackoverflow.com/users/23354", "pm_score": 3, "selected": true, "text": "TreeListView" } ]
2008/11/28
[ "https://Stackoverflow.com/questions/325367", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10676/" ]
325,370
<p>In SQL, How we make a check to filter all row which contain a column data is null or empty ?<br> For examile </p> <pre><code>Select Name,Age from MEMBERS </code></pre> <p>We need a check Name should not equal to null or empty.</p>
[ { "answer_id": 325378, "author": "Vinko Vrsalovic", "author_id": 5190, "author_profile": "https://Stackoverflow.com/users/5190", "pm_score": 5, "selected": true, "text": "select name,age from members where name is not null and name <> ''\n" }, { "answer_id": 325379, "author":...
2008/11/28
[ "https://Stackoverflow.com/questions/325370", "https://Stackoverflow.com", "https://Stackoverflow.com/users/34588/" ]
325,375
<p>I'm building a small Winform in which I can view types of food in my kitchen.</p> <p>My entire stock can be displayed by a datagrid view.</p> <p>Now, I have a filtermenu which contains a dropdownlist of items that can be checked and unchecked.</p> <p>Based on which items in that list are checked, the display in t...
[ { "answer_id": 325378, "author": "Vinko Vrsalovic", "author_id": 5190, "author_profile": "https://Stackoverflow.com/users/5190", "pm_score": 5, "selected": true, "text": "select name,age from members where name is not null and name <> ''\n" }, { "answer_id": 325379, "author":...
2008/11/28
[ "https://Stackoverflow.com/questions/325375", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11795/" ]
325,383
<p>I am getting a runtime error 13 at the end of the following code:</p> <pre><code>Sub plausibilitaet_check() Dim rs As DAO.Recordset Dim rs2 As ADODB.Recordset Dim db As database Dim strsql As String Dim strsql2 As String Dim tdf As TableDef Set db = opendatabase("C:\Codebook.mdb") Set rs = db.OpenRecordset("pl...
[ { "answer_id": 325394, "author": "shahkalpesh", "author_id": 23574, "author_profile": "https://Stackoverflow.com/users/23574", "pm_score": 2, "selected": false, "text": "\ndim rs2 as DAO.Recordset\n" }, { "answer_id": 325395, "author": "Fionnuala", "author_id": 2548, ...
2008/11/28
[ "https://Stackoverflow.com/questions/325383", "https://Stackoverflow.com", "https://Stackoverflow.com/users/31132/" ]
325,392
<p>I am calling a .txt file from a jquery ajax call. It has some special characters like <code>±</code>. This <code>±</code> is a delimiter for a set of array; data I want to split out and push into a JavaScript array.</p> <p>It is not treated as <code>±</code> symbol when interpreted like this.</p> <p>How do I get t...
[ { "answer_id": 325418, "author": "Owen", "author_id": 4853, "author_profile": "https://Stackoverflow.com/users/4853", "pm_score": 3, "selected": true, "text": "escape()" } ]
2008/11/28
[ "https://Stackoverflow.com/questions/325392", "https://Stackoverflow.com", "https://Stackoverflow.com/users/38578/" ]
325,399
<pre><code>% rails ... General Options: ... -c, --svn Modify files with subversion. (Note: svn must be in path) -g, --git Modify files with git. (Note: git must be in path) </code></pre> <p>What do these "Modify files" options do for me?</p> <p>Edit: It is unclear to me w...
[ { "answer_id": 2219820, "author": "keturn", "author_id": 9585, "author_profile": "https://Stackoverflow.com/users/9585", "pm_score": 2, "selected": true, "text": "--git" } ]
2008/11/28
[ "https://Stackoverflow.com/questions/325399", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10841/" ]
325,404
<p>I am using oracle wallet to store the oracle database passwords, the batch file to create the wallet asks for password when you run it. is there any way to modify the batch file , and provide the password before hand </p> <p>so that i can avoid inputtting the password every time i run that.</p> <p>so to generalize...
[ { "answer_id": 325444, "author": "cjanssen", "author_id": 2950, "author_profile": "https://Stackoverflow.com/users/2950", "pm_score": 3, "selected": true, "text": "echo mypassword\n" } ]
2008/11/28
[ "https://Stackoverflow.com/questions/325404", "https://Stackoverflow.com", "https://Stackoverflow.com/users/32670/" ]
325,407
<p>Essentially i want to have a generic function which accepts a LINQ anonymous list and returns an array back. I was hoping to use generics but i just can seem to get it to work.</p> <p>hopefully the example below helps</p> <p>say i have a person object with id, fname, lname and dob. i have a generic class with cont...
[ { "answer_id": 325438, "author": "Richard Ev", "author_id": 39709, "author_profile": "https://Stackoverflow.com/users/39709", "pm_score": 1, "selected": false, "text": "object" }, { "answer_id": 331086, "author": "Amy B", "author_id": 8155, "author_profile": "https://...
2008/11/28
[ "https://Stackoverflow.com/questions/325407", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
325,414
<p>To follow on from my question yesterday....</p> <p><a href="https://stackoverflow.com/questions/323842/mysql-table-design-for-a-questionnaire">MySQL Table Design for a Questionnaire</a></p> <p>I sat down with my boss yesterday afternoon to run through how I was proposing to design the database. However, now I am ...
[ { "answer_id": 325458, "author": "J.D. Fitz.Gerald", "author_id": 11542, "author_profile": "https://Stackoverflow.com/users/11542", "pm_score": 2, "selected": true, "text": "userid, questionid, score\n1,1,4\n1,2,4\n1,3,3\n2,1,1\n2,2,4\n...\n" } ]
2008/11/28
[ "https://Stackoverflow.com/questions/325414", "https://Stackoverflow.com", "https://Stackoverflow.com/users/41378/" ]
325,419
<p>I am a newbie for Visual Basic 6 project. I downloaded some tutorials for testing; however, I am not able to drag, move, or edit the UI form designer objects in those projects.</p> <p>Does anybody know there is an object lock function in VB6?<br /> If there is, how can I unlock it?</p>
[ { "answer_id": 325458, "author": "J.D. Fitz.Gerald", "author_id": 11542, "author_profile": "https://Stackoverflow.com/users/11542", "pm_score": 2, "selected": true, "text": "userid, questionid, score\n1,1,4\n1,2,4\n1,3,3\n2,1,1\n2,2,4\n...\n" } ]
2008/11/28
[ "https://Stackoverflow.com/questions/325419", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
325,421
<p>Hiya - been pointed at you guys by a friend of mine.</p> <p>I have an MDI application (C#, Winforms, .NET 2.0, VS2005, DevExpress 8.2) and one of my forms is behaving very strangely - not repainting itself properly where it overlaps with another instance of the same form class.</p> <p>The forms contain a custom co...
[ { "answer_id": 24235861, "author": "acoustique", "author_id": 2566589, "author_profile": "https://Stackoverflow.com/users/2566589", "pm_score": 0, "selected": false, "text": "::SetWindowLong(hwnd, GWL_STYLE, WS_VISIBLE | WS_CLIPCHILDREN));\n" } ]
2008/11/28
[ "https://Stackoverflow.com/questions/325421", "https://Stackoverflow.com", "https://Stackoverflow.com/users/41557/" ]
325,426
<p>I'm using reflection to loop through a <code>Type</code>'s properties and set certain types to their default. Now, I could do a switch on the type and set the <code>default(Type)</code> explicitly, but I'd rather do it in one line. Is there a programmatic equivalent of default?</p>
[ { "answer_id": 325527, "author": "kpollock", "author_id": 41557, "author_profile": "https://Stackoverflow.com/users/41557", "pm_score": 2, "selected": false, "text": "//in MessageHeader \n private void SetValuesDefault()\n {\n MessageHeader header = this; \n ...
2008/11/28
[ "https://Stackoverflow.com/questions/325426", "https://Stackoverflow.com", "https://Stackoverflow.com/users/192/" ]
325,443
<p>If I'm using <code>Long uuid = UUID.randomUUID().getMostSignificantBits()</code> how likely is it to get a collision. It cuts off the least significant bits, so there is a possibility that you run into a collision, right?</p>
[ { "answer_id": 325457, "author": "Rasmus Faber", "author_id": 5542, "author_profile": "https://Stackoverflow.com/users/5542", "pm_score": 9, "selected": true, "text": "UUID.randomUUID()" }, { "answer_id": 16349840, "author": "Dr Bob", "author_id": 2345188, "author_pro...
2008/11/28
[ "https://Stackoverflow.com/questions/325443", "https://Stackoverflow.com", "https://Stackoverflow.com/users/198/" ]
325,446
<p>In my application I need to hash a string before I save it to a text file. Does anyone know how to do that?</p>
[ { "answer_id": 326225, "author": "EvilTeach", "author_id": 7734, "author_profile": "https://Stackoverflow.com/users/7734", "pm_score": 0, "selected": false, "text": "static unsigned long\nsdbm(str)\nunsigned char *str;\n{\n unsigned long hash = 0;\n int c;\n\n while (c = *str++)...
2008/11/28
[ "https://Stackoverflow.com/questions/325446", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
325,453
<p>When I first started programming, I wrote everything in main. But as I learned, I tried to do as little as possible in my <code>main()</code> methods.</p> <p>But where do you decide to give the other Class/Method the responsibility to take over the program from <code>main()</code>? How do you do it?</p> <p>I've se...
[ { "answer_id": 325462, "author": "Vilx-", "author_id": 41360, "author_profile": "https://Stackoverflow.com/users/41360", "pm_score": 2, "selected": false, "text": "class Main" }, { "answer_id": 348518, "author": "Charlie Martin", "author_id": 35092, "author_profile": ...
2008/11/28
[ "https://Stackoverflow.com/questions/325453", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7205/" ]
325,461
<p>I have strange problem with sharepoint and ajax functionality. We have an UpdatePanel placed inside webpart. When partial postback occurs, page title gets missing.</p> <p>We have found that temporary partial solution is to write title element into one line and not use any spaces or controls inside it..not even a li...
[ { "answer_id": 458389, "author": "James", "author_id": 56753, "author_profile": "https://Stackoverflow.com/users/56753", "pm_score": 3, "selected": false, "text": "<script type=\"text/javascript\">\n\n// This script is to fix the issue where AJAX causes SharePoint \n// publishing pages t...
2008/11/28
[ "https://Stackoverflow.com/questions/325461", "https://Stackoverflow.com", "https://Stackoverflow.com/users/41545/" ]
325,463
<p>I've a python script that has to launch a shell command for every file in a dir:</p> <pre><code>import os files = os.listdir(".") for f in files: os.execlp("myscript", "myscript", f) </code></pre> <p>This works fine for the first file, but after the "myscript" command has ended, the execution stops and does n...
[ { "answer_id": 325467, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 3, "selected": false, "text": "os.exec*()" }, { "answer_id": 325474, "author": "user39307", "author_id": 39307, "author_profile": "https:...
2008/11/28
[ "https://Stackoverflow.com/questions/325463", "https://Stackoverflow.com", "https://Stackoverflow.com/users/28582/" ]
325,464
<p>I want a way to list files in a directory and putting a check box beside each one of them so I can select some of them and perform operations with each selected file, what's the best way to do this?</p>
[ { "answer_id": 325480, "author": "Vincent Van Den Berghe", "author_id": 39259, "author_profile": "https://Stackoverflow.com/users/39259", "pm_score": 2, "selected": false, "text": "CheckedListBox" }, { "answer_id": 325491, "author": "Ian Nelson", "author_id": 2084, "a...
2008/11/28
[ "https://Stackoverflow.com/questions/325464", "https://Stackoverflow.com", "https://Stackoverflow.com/users/36532/" ]
325,475
<p>I am trying to comment an API (.Net) that I am exposing to a customer. I am doing this by using XML comments, and extracting via SandCastle.</p> <p>This is all fine and dandy, however I have unittesting for the API, and thought the code from these would be good to place in the example tags.</p> <p>So does anyone k...
[ { "answer_id": 341910, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 3, "selected": true, "text": " /// <summary>\n /// Returns a string representation of an object.\n /// </summary>\n /// <returns>Comma separated ...
2008/11/28
[ "https://Stackoverflow.com/questions/325475", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4189/" ]
325,479
<p>Basically I have a small template that looks like:</p> <pre><code>&lt;xsl:template name="templt"&gt; &lt;xsl:param name="filter" /&gt; &lt;xsl:variable name="numOrders" select="count(ORDERS/ORDER[$filter])" /&gt; &lt;/xsl:template&gt; </code></pre> <p>And I'm trying to call it using</p> <pre><code>&lt;xsl...
[ { "answer_id": 325518, "author": "Dirk Vollmar", "author_id": 40347, "author_profile": "https://Stackoverflow.com/users/40347", "pm_score": 4, "selected": true, "text": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<xsl:stylesheet version=\"1.0\" xmlns:xsl=\"http://www.w3.org/1999/XSL/Tra...
2008/11/28
[ "https://Stackoverflow.com/questions/325479", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1601/" ]
325,508
<p>I'm wanting to write a method that I can use to initialise a Map. First cut:</p> <pre><code>Map map(Object ... o) {for (int i = 0; i &lt; o.length; i+=2){result.put(o[i], o[i+1])}} </code></pre> <p>Simple, but not type-safe. Using generics, maybe something like:</p> <pre><code>&lt;TKey, TValue&gt; HashMap&lt;TKe...
[ { "answer_id": 325526, "author": "C. K. Young", "author_id": 13, "author_profile": "https://Stackoverflow.com/users/13", "pm_score": 4, "selected": true, "text": "public static <TKey, TValue, TMap extends Map<TKey, TValue>> TMap map(TMap map, Pair<? extends TKey, ? extends TValue>... pai...
2008/11/28
[ "https://Stackoverflow.com/questions/325508", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
325,511
<p>I am wondering how you would approach this problem</p> <p>I have two Taxrates that can apply to my products. I specifically want to avoid persisting the Taxrates into the database while still being able to change them in a central place (like Taxrate from 20% to 19% etc).</p> <p>so I decided it would be great to h...
[ { "answer_id": 325538, "author": "Winston Smith", "author_id": 35086, "author_profile": "https://Stackoverflow.com/users/35086", "pm_score": 1, "selected": false, "text": "<appSettings>\n <add key=\"BaseTaxRate\" value=20\"/>\n <add key=\"HigherTaxRate\" value=40\"/>\n</appSettings...
2008/11/28
[ "https://Stackoverflow.com/questions/325511", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21699/" ]
325,512
<p>Does anyone know if it's possible to open a file in the file system via a link in a WebBrowser component? I'm writing a little reporting tool in which I display a summary as HTML in a WebBrowser component with a link to a more detailed analysis which is saved as an Excel file on disk. </p> <p>I want the user to be ...
[ { "answer_id": 325585, "author": "rfgamaral", "author_id": 40480, "author_profile": "https://Stackoverflow.com/users/40480", "pm_score": 2, "selected": false, "text": "using System;\nusing System.Windows.Forms;\nusing System.Security.Permissions;\n\n[PermissionSet(SecurityAction.Demand, ...
2008/11/28
[ "https://Stackoverflow.com/questions/325512", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4019/" ]
325,516
<p>Is it possible to provide Unicode input to a console app, and read the Unicode char/string via Console.ReadKey()?</p> <p>I know Unicode works when reading the input via other methods, but unfortunately I need to use the 'interception' feature provided by ReadKey.</p> <p>Update:</p> <p>When pasting a Unicode chara...
[ { "answer_id": 326243, "author": "Eric Rosenberger", "author_id": 41624, "author_profile": "https://Stackoverflow.com/users/41624", "pm_score": 0, "selected": false, "text": "char c = Console.ReadKey().KeyChar;\n" } ]
2008/11/28
[ "https://Stackoverflow.com/questions/325516", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15541/" ]
325,524
<p>I use Eclipse (3.4) and my class compiles without warning or errors. My project uses an external jar file.</p> <p>Where do I need to put this external jar file in order not to get a <code>java.lang.NoClassDefFoundError</code> when using this class from another project (not in Eclipse)?</p> <p>I could just extract ...
[ { "answer_id": 325539, "author": "VonC", "author_id": 6309, "author_profile": "https://Stackoverflow.com/users/6309", "pm_score": 1, "selected": false, "text": "-classpath" }, { "answer_id": 325540, "author": "Simon", "author_id": 24039, "author_profile": "https://Sta...
2008/11/28
[ "https://Stackoverflow.com/questions/325524", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12860/" ]
325,555
<p>Here is a little test program: </p> <pre><code>#include &lt;iostream&gt; class Test { public: static void DoCrash(){ std::cout&lt;&lt; "TEST IT!"&lt;&lt; std::endl; } }; int main() { Test k; k.DoCrash(); // calling a static method like a member method... std::system("pause"); return 0; } </c...
[ { "answer_id": 325569, "author": "Johannes Schaub - litb", "author_id": 34509, "author_profile": "https://Stackoverflow.com/users/34509", "pm_score": 2, "selected": false, "text": "Test::DoCrash();" }, { "answer_id": 325572, "author": "David Rodríguez - dribeas", "author_...
2008/11/28
[ "https://Stackoverflow.com/questions/325555", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2368/" ]
325,558
<p>Can anyone post an example of Aspect-oriented programming (AOP) that is <em>not</em> logging?</p> <p>I've looked at several resources but all the examples are trivial logging. What is it useful for?</p>
[ { "answer_id": 325584, "author": "Paco", "author_id": 13376, "author_profile": "https://Stackoverflow.com/users/13376", "pm_score": 3, "selected": false, "text": "[NotNull]\npublic string Property1 { get; set; }\n\n[Length(Min = 10, Max = 20)]\npublic string Property2 { get; set; }\n\n[R...
2008/11/28
[ "https://Stackoverflow.com/questions/325558", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1575281/" ]
325,559
<p>I've a table with two columns are a unique key together and i cannot change the schema.</p> <p>I'm trying to execute an update using psql in which i change the value of one of the column that are key. The script is similar to the following:</p> <pre><code>BEGIN; UPDATE t1 SET P1='23' where P1='33'; UPDATE t1 SET P...
[ { "answer_id": 325584, "author": "Paco", "author_id": 13376, "author_profile": "https://Stackoverflow.com/users/13376", "pm_score": 3, "selected": false, "text": "[NotNull]\npublic string Property1 { get; set; }\n\n[Length(Min = 10, Max = 20)]\npublic string Property2 { get; set; }\n\n[R...
2008/11/28
[ "https://Stackoverflow.com/questions/325559", "https://Stackoverflow.com", "https://Stackoverflow.com/users/41572/" ]
325,561
<p>I have used extension methods to extend html helpers to make an RSS repeater:</p> <pre><code> public static string RSSRepeater(this HtmlHelper html, IEnumerable&lt;IRSSable&gt; rss) { string result=""; foreach (IRSSable item in rss) { result += "&lt;item&gt;" + item.GetRS...
[ { "answer_id": 325567, "author": "Jon Skeet", "author_id": 22656, "author_profile": "https://Stackoverflow.com/users/22656", "pm_score": 2, "selected": false, "text": "IEnumerable<Issue>" }, { "answer_id": 325568, "author": "Marc Gravell", "author_id": 23354, "author_...
2008/11/28
[ "https://Stackoverflow.com/questions/325561", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3193/" ]
325,583
<p>Strange error specific to a particular machine...</p> <p>I have a app in which a combo box's text value is set to the path of a document (i.e...</p> <pre><code>cmbAIDFile.Text = clsTonyToolkit.GetSetting("ExportAIDFile",gtypmetadata.gcnnCentral) &amp; "" </code></pre> <p>Forget about all the GetSetting procedure ...
[ { "answer_id": 328554, "author": "Mike Spross", "author_id": 17862, "author_profile": "https://Stackoverflow.com/users/17862", "pm_score": 3, "selected": false, "text": "Text" }, { "answer_id": 330795, "author": "RS Conley", "author_id": 7890, "author_profile": "https...
2008/11/28
[ "https://Stackoverflow.com/questions/325583", "https://Stackoverflow.com", "https://Stackoverflow.com/users/28959/" ]
325,587
<p>When working with MSSQL on Windows I was used to a very convenient feature called integrated authentication. In short, being authenticated in Windows can give you access to the database, so no need to give any specific password. Now I am developing an application on Linux with no user interaction; this application n...
[ { "answer_id": 325633, "author": "Ken", "author_id": 20074, "author_profile": "https://Stackoverflow.com/users/20074", "pm_score": 0, "selected": false, "text": "[Client]\nuser=ken\npassword=ken\nhost=localhost\ndatabase=foo\n" }, { "answer_id": 325638, "author": "Ben", "...
2008/11/28
[ "https://Stackoverflow.com/questions/325587", "https://Stackoverflow.com", "https://Stackoverflow.com/users/40548/" ]
325,590
<p>I write a Text Editor with Java , and I want to add Undo function to it </p> <p>but without UndoManager Class , I need to use a Data Structure like Stack or LinkedList but the Stack class in Java use Object parameters e.g : push(Object o) , Not Push(String s) I need some hints or links . Thanks</p>
[ { "answer_id": 325596, "author": "Yuval Adam", "author_id": 24545, "author_profile": "https://Stackoverflow.com/users/24545", "pm_score": 4, "selected": true, "text": "Stack<String> stack = new Stack<String>();\nString string = \"someString\";\nstack.push(string);\n" }, { "answer...
2008/11/28
[ "https://Stackoverflow.com/questions/325590", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22634/" ]
325,602
<p>I need a byte buffer class in Java for single-threaded use. I should be able to insert data at the back of the buffer and read data at the front, with an amortized cost of O(1). The buffer should resize when it's full, rather than throw an exception or something.</p> <p>I could write one myself, but I'd be very sur...
[ { "answer_id": 907530, "author": "dfa", "author_id": 89266, "author_profile": "https://Stackoverflow.com/users/89266", "pm_score": 2, "selected": false, "text": "java.util.ArrayDeque<Byte>" } ]
2008/11/28
[ "https://Stackoverflow.com/questions/325602", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7927/" ]
325,616
<p>What is the difference between the value and itemValue attribute of the radiobutton in Jsf?</p>
[ { "answer_id": 1328658, "author": "Chris Dale", "author_id": 39268, "author_profile": "https://Stackoverflow.com/users/39268", "pm_score": 3, "selected": true, "text": " <h:selectOneRadio value=\"\">\n <f:selectItem itemValue=\"TestValue\" itemLabel=\"TestLabel\" />\n</h:selectOneRadi...
2008/11/28
[ "https://Stackoverflow.com/questions/325616", "https://Stackoverflow.com", "https://Stackoverflow.com/users/40933/" ]
325,628
<p>A typical approach to avoid two instances of the same script running simultaneously looks like this:</p> <pre><code>[ -f ".lock" ] &amp;&amp; exit 1 touch .lock # do something rm .lock </code></pre> <p>Is there a better way to lock on files from a shell-script, avoiding a race condition? Must directories be used i...
[ { "answer_id": 325645, "author": "Barry Kelly", "author_id": 3712, "author_profile": "https://Stackoverflow.com/users/3712", "pm_score": 6, "selected": true, "text": "noclobber" }, { "answer_id": 1571711, "author": "jpastuszek", "author_id": 42412, "author_profile": "...
2008/11/28
[ "https://Stackoverflow.com/questions/325628", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23420/" ]
325,629
<p>[continued from <a href="https://stackoverflow.com/questions/323289">Is there a way to tell whether two COM interface references point at the same instance?</a>]</p> <p>I've got references to <code>Inspector</code> objects from two different sources and need to be able to tell which item from one source corresponds...
[ { "answer_id": 2779812, "author": "Oliver Giesen", "author_id": 9784, "author_profile": "https://Stackoverflow.com/users/9784", "pm_score": 2, "selected": true, "text": "Inspector.CurrentItem.CreationTime" }, { "answer_id": 8040995, "author": "JimmyPena", "author_id": 190...
2008/11/28
[ "https://Stackoverflow.com/questions/325629", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9784/" ]
325,648
<p>Java 1.5, Linux</p> <p>I do have a screen which contains different textareas and textfields. I do have acess to the application frame, but not to the components inside the frame, because i only get an implementation of an interface.</p> <p>When i try to add german umlauts i see a rectangle in the text component, b...
[ { "answer_id": 325855, "author": "Markus Lausberg", "author_id": 39062, "author_profile": "https://Stackoverflow.com/users/39062", "pm_score": 0, "selected": false, "text": "echo $TERM --> vt100\n" }, { "answer_id": 330437, "author": "Markus Lausberg", "author_id": 39062,...
2008/11/28
[ "https://Stackoverflow.com/questions/325648", "https://Stackoverflow.com", "https://Stackoverflow.com/users/39062/" ]
325,654
<p>I want to change background color of Datagrid header in Silverlight.</p>
[ { "answer_id": 330697, "author": "David Padbury", "author_id": 26401, "author_profile": "https://Stackoverflow.com/users/26401", "pm_score": 3, "selected": false, "text": "<data:DataGrid x:Name=\"grid\">\n <data:DataGrid.ColumnHeaderStyle>\n <Style \n xmlns:primitive...
2008/11/28
[ "https://Stackoverflow.com/questions/325654", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
325,667
<p>Does anyone of you know, if and if so, how can I check, with my application code, if a server has ssl enabled or not?</p>
[ { "answer_id": 325681, "author": "dove", "author_id": 30913, "author_profile": "https://Stackoverflow.com/users/30913", "pm_score": 2, "selected": false, "text": "public bool IsSecureConnection()\n{\n return HttpContext.Current.Request.IsSecureConnection || \n HttpContext.Cu...
2008/11/28
[ "https://Stackoverflow.com/questions/325667", "https://Stackoverflow.com", "https://Stackoverflow.com/users/40077/" ]
325,669
<p>I think I might be approaching this in the wrong way, so I would appreciate any comments/guidance. Hopefully I can explain coherently enough what I am trying to achieve:</p> <ul> <li><p>I want to create a block of HTML (e.g. a box containing a user's profile), which I will load as part of my layout on most pages th...
[ { "answer_id": 325707, "author": "foxy", "author_id": 30119, "author_profile": "https://Stackoverflow.com/users/30119", "pm_score": 4, "selected": true, "text": "$user_html = $this->load->view('user_view', $user_data, true);\n" } ]
2008/11/28
[ "https://Stackoverflow.com/questions/325669", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22224/" ]
325,677
<p>I need to receive the key press events during cell editing in <code>DataGridView</code> control.</p> <p>From what I have found on the net the <code>DataGridView</code> is designed to pass all key events from <code>DataGridView</code> to the cell editing control and you cannot get these events easily.</p> <p>I foun...
[ { "answer_id": 328055, "author": "Eren Aygunes", "author_id": 27980, "author_profile": "https://Stackoverflow.com/users/27980", "pm_score": 2, "selected": false, "text": "class KeyPressAwareDataGridView : DataGridView\n{\n protected override void OnControlAdded(ControlEventArgs e)\n ...
2008/11/28
[ "https://Stackoverflow.com/questions/325677", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1660/" ]
325,682
<p>I need a RegExp which matches a word or multiple words in quotes.</p> <p>[\w]* matches a word</p> <p>"[\w\W&amp;&amp;[^"]]*" matches multiple words in quotes.</p> <p>(btw, not sure why \w\W works, but not a simple . (which should match all characters)</p> <p>So how do i combine these two regexp?</p>
[ { "answer_id": 325694, "author": "genehack", "author_id": 39933, "author_profile": "https://Stackoverflow.com/users/39933", "pm_score": 3, "selected": false, "text": "\"[^\"]+\"" }, { "answer_id": 325716, "author": "VonC", "author_id": 6309, "author_profile": "https:/...
2008/11/28
[ "https://Stackoverflow.com/questions/325682", "https://Stackoverflow.com", "https://Stackoverflow.com/users/40254/" ]
325,685
<p>I am new to Ajax.Net.</p> <p>I want to know how to access data send from Ajax POST method. (ie)AjaxObject.send("Some Data")</p> <p>How to access that "Some Data" in form?</p> <p>I can access same when i used GET method and passed data in Querystring. like Request.Querystring("name") in ASP.</p>
[ { "answer_id": 1542033, "author": "kristian", "author_id": 20377, "author_profile": "https://Stackoverflow.com/users/20377", "pm_score": 0, "selected": false, "text": "Request.Form(\"name\")\n" } ]
2008/11/28
[ "https://Stackoverflow.com/questions/325685", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
325,690
<p>how can access the binary data file(.DAT). i am using geonames API. can anyone help me? </p>
[ { "answer_id": 327183, "author": "Eugene Yokota", "author_id": 3827, "author_profile": "https://Stackoverflow.com/users/3827", "pm_score": 0, "selected": false, "text": "BinaryReader" } ]
2008/11/28
[ "https://Stackoverflow.com/questions/325690", "https://Stackoverflow.com", "https://Stackoverflow.com/users/41584/" ]
325,692
<p>I am dealing with a large codebase that has a lot of classes and a lot of abstract methods on these classes. I am interested in peoples opinions about what I should do in the following situation.</p> <p>If I have a class Parent-A with an abstract method. There will only be 2 children. If Child-B implements Abst...
[ { "answer_id": 325771, "author": "Tamas Czinege", "author_id": 8954, "author_profile": "https://Stackoverflow.com/users/8954", "pm_score": 1, "selected": false, "text": "[Obsolete(\"This class does not implement this method\", true)]\npublic override string MyReallyImportantMethod()\n{\n...
2008/11/28
[ "https://Stackoverflow.com/questions/325692", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6244/" ]
325,706
<p>The following code produces an error hr=0x80020005 (wrong type).</p> <pre><code>#import &lt;msi.dll&gt; using namespace WindowsInstaller; main() { ::CoInitialize(NULL); InstallerPtr pInstaller("WindowsInstaller.Installer"); DatabasePtr pDB = pInstaller-&gt;OpenDatabase( "c:\\foo\\bar.msi", ...
[ { "answer_id": 507783, "author": "Fabien", "author_id": 21132, "author_profile": "https://Stackoverflow.com/users/21132", "pm_score": 3, "selected": true, "text": "DatabasePtr pDB = pInstaller->OpenDatabase(\n \"c:\\\\foo\\\\bar.msi\", \n ...
2008/11/28
[ "https://Stackoverflow.com/questions/325706", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21132/" ]
325,725
<p>Starting with the following LINQ query:</p> <pre><code>from a in things where a.Id == b.Id &amp;&amp; a.Name == b.Name &amp;&amp; a.Value1 == b.Value1 &amp;&amp; a.Value2 == b.Value2 &amp;&amp; a.Value3 == b.Value3 select a; </code></pre> <p>How can I remove (at runtime) one or more of the conditions i...
[ { "answer_id": 325739, "author": "Jon Skeet", "author_id": 22656, "author_profile": "https://Stackoverflow.com/users/22656", "pm_score": 4, "selected": true, "text": "from a in things \nwhere a.Id == b.Id \nwhere a.Name == b.Name \nwhere a.Value1 == b.Value1\nwhere a.Value2 == b.Value2\...
2008/11/28
[ "https://Stackoverflow.com/questions/325725", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1065/" ]
325,733
<p>In Apple's NSObject documentation, NSZoneFree is called in the - (void)dealloc example code:</p> <pre><code>- (void)dealloc { [companion release]; NSZoneFree(private, [self zone]) [super dealloc]; } </code></pre> <p>You can find it in context <a href="http://developer.apple.com/documentation/Cocoa/Refe...
[ { "answer_id": 327114, "author": "Jim Puls", "author_id": 6010, "author_profile": "https://Stackoverflow.com/users/6010", "pm_score": 3, "selected": true, "text": "NSZoneFree()" } ]
2008/11/28
[ "https://Stackoverflow.com/questions/325733", "https://Stackoverflow.com", "https://Stackoverflow.com/users/24051/" ]
325,734
<p>When writing a class do you group members variables of the same type together? Is there any benefit to doing so? For example:</p> <pre><code>class Foo { private: bool a_; bool b_; int c_; int d_; std::string e_; std::string f_; ... }; </code></pre> <p>As opposed to:</p> <pre><code>cl...
[ { "answer_id": 325740, "author": "Federico A. Ramponi", "author_id": 18770, "author_profile": "https://Stackoverflow.com/users/18770", "pm_score": 5, "selected": true, "text": "class Foo\n{\nprivate:\n std::string peach;\n bool banana;\n int apple;\n\n int red;\n std::stri...
2008/11/28
[ "https://Stackoverflow.com/questions/325734", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9236/" ]
325,756
<p>I need a Guid property in some attribute class like this:</p> <pre><code>public class SomeAttribute : Attribute { private Guid foreignIdentificator; public Guid ForeignIdentificator { get { return this.foreignIdentificator; } set { this.foreignIdentificator = value; } } } </code></pre> ...
[ { "answer_id": 325798, "author": "Jay Bazuzi", "author_id": 5314, "author_profile": "https://Stackoverflow.com/users/5314", "pm_score": 3, "selected": false, "text": "System.Guid" } ]
2008/11/28
[ "https://Stackoverflow.com/questions/325756", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20382/" ]
325,765
<p>Can jQuery ajax made browser request a new location in redirect header send by server?</p>
[ { "answer_id": 326041, "author": "Pim Jager", "author_id": 35197, "author_profile": "https://Stackoverflow.com/users/35197", "pm_score": 2, "selected": false, "text": "$.get('page.php', { GETvar : 'redirectUrl' }, function(data, textString){ \n if (textString == \"succes\") { //Succes!\...
2008/11/28
[ "https://Stackoverflow.com/questions/325765", "https://Stackoverflow.com", "https://Stackoverflow.com/users/441493/" ]
325,788
<p>I'm trying to change assembly binding (from one version to another) dynamically.</p> <p>I've tried this code but it doesn't work:</p> <pre><code> Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); ConfigurationSection assemblyBindingSection = config.Sections["...
[ { "answer_id": 326011, "author": "Eric Rosenberger", "author_id": 41624, "author_profile": "https://Stackoverflow.com/users/41624", "pm_score": 6, "selected": true, "text": "AppDomain.AssemblyResolve" }, { "answer_id": 330283, "author": "Julien Hoarau", "author_id": 12248...
2008/11/28
[ "https://Stackoverflow.com/questions/325788", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12248/" ]
325,791
<p>Here is the scenario. 2 web servers in two separate locations having two mysql databases with identical tables. The data within the tables is also expected to be identical in real time. </p> <p>Here is the problem. if a user in either location simultaneously enters a new record into identical tables, as illustrated...
[ { "answer_id": 325850, "author": "Amadiere", "author_id": 7828, "author_profile": "https://Stackoverflow.com/users/7828", "pm_score": 5, "selected": true, "text": "auto_increment_increment = 2\nauto_increment_offset = 1 \n" } ]
2008/11/28
[ "https://Stackoverflow.com/questions/325791", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11190/" ]
325,803
<p>Is it better to use a stored procedure or doing it the old way with a connection string and all that good stuff? Our system has been running slow lately and our manager wants us to try to see if we can speed things up a little and we were thinking about changing some of the old database calls over to stored procedur...
[ { "answer_id": 325919, "author": "ConcernedOfTunbridgeWells", "author_id": 15401, "author_profile": "https://Stackoverflow.com/users/15401", "pm_score": 2, "selected": false, "text": "1/(1-X)" } ]
2008/11/28
[ "https://Stackoverflow.com/questions/325803", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2486/" ]
325,806
<p>I'm trying to update a variable in APC, and will be many processes trying to do that.</p> <p>APC doesn't provide locking functionality, so I'm considering using other mechanisms... what I've found so far is mysql's GET_LOCK(), and php's flock(). Anything else worth considering?</p> <p>Update: I've found sem_acquir...
[ { "answer_id": 329585, "author": "too much php", "author_id": 28835, "author_profile": "https://Stackoverflow.com/users/28835", "pm_score": 2, "selected": false, "text": "$f = fopen(\"lockFile.txt\", 'x');\nif($f) {\n $me = getmypid();\n $now = date('Y-m-d H:i:s');\n fwrite($f, ...
2008/11/28
[ "https://Stackoverflow.com/questions/325806", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8437/" ]
325,818
<p>I have to analyse some existing Erlang code.</p> <p>Does anybody knows about a tool able to visually / graphically trace the modules calls ?</p> <p>The behaviour should be : give a directory containing the source code, and get a gui / picture / file of the calls (module1->module2->module3....).</p> <p>Something l...
[ { "answer_id": 326119, "author": "Adam Lindberg", "author_id": 2457, "author_profile": "https://Stackoverflow.com/users/2457", "pm_score": 4, "selected": true, "text": "xref" } ]
2008/11/28
[ "https://Stackoverflow.com/questions/325818", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15539/" ]
325,826
<p>I'm pre-compiling a C program containing Pro*C code with Oracle 10.2 and AIX 5.2</p> <p>The Oracle precompiler reads the <code>$ORACLE_HOME/precomp/admin/pcscfg.cfg file</code> which contains the definition of the sys_include variable (set to <code>/usr/include</code>).</p> <p>The Pro*C compiler complains that it ...
[ { "answer_id": 326173, "author": "EvilTeach", "author_id": 7734, "author_profile": "https://Stackoverflow.com/users/7734", "pm_score": 4, "selected": true, "text": "PCC-S-02201, Encountered the symbol \"size_t\" when expecting one of the \nfollowing\n:\n ... auto, char, const, double, ...
2008/11/28
[ "https://Stackoverflow.com/questions/325826", "https://Stackoverflow.com", "https://Stackoverflow.com/users/381/" ]
325,836
<p>I am attempting to integrate an existing payment platform into my webshop. After making a succesful transaction, the payment platform sends a request to an URL in my application with the transaction ID included in the query parameters.</p> <p>However, I need to do some post-processing like sending an order confirma...
[ { "answer_id": 325868, "author": "benlumley", "author_id": 39161, "author_profile": "https://Stackoverflow.com/users/39161", "pm_score": -1, "selected": false, "text": "http://yourdomain.com/callbackurl.php?PHPSESSID=SESSIONIDHERE\n" }, { "answer_id": 327058, "author": "Commu...
2008/11/28
[ "https://Stackoverflow.com/questions/325836", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11568/" ]
325,838
<p>I have a php page that displays rows from a mysql db as a table. One of the fields contains HTML markup, and I would like to amke this row clickable and the html would open in a new popup window. What is the best way to do it, and is there a way to do it without writing the html to a file?</p> <p>edit: this php pa...
[ { "answer_id": 325858, "author": "Diodeus - James MacFarlane", "author_id": 12579, "author_profile": "https://Stackoverflow.com/users/12579", "pm_score": 3, "selected": true, "text": "child1 = window.open (\"about:blank\")\nchild1.document.write(\"Moo!\");\nchild1.document.close()\n" }...
2008/11/28
[ "https://Stackoverflow.com/questions/325838", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1246613/" ]
325,840
<p>What is the Constant Value of the Underline font in Java ?</p> <p>Font.BOLD <strong>bold</strong> font</p> <p>Font.ITALIC <em>italic</em> font</p> <p>What is the UNDERLINE font Constant ? I try all the available constants but it didn't work .</p>
[ { "answer_id": 325867, "author": "Markus Lausberg", "author_id": 39062, "author_profile": "https://Stackoverflow.com/users/39062", "pm_score": 0, "selected": false, "text": "StyledText text = new StyledText(shell, SWT.BORDER);\ntext.setText(\"0123456789 ABCDEFGHIJKLM NOPQRSTUVWXYZ\");\n/...
2008/11/28
[ "https://Stackoverflow.com/questions/325840", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22634/" ]
325,871
<p>I'm trying to find out the most efficient (best performance) way to check date field for current date. Currently we are using:</p> <pre><code>SELECT COUNT(Job) AS Jobs FROM dbo.Job WHERE (Received BETWEEN DATEADD(d, DATEDIFF(d, 0, GETDATE()), 0) AND DATEADD(d, DATEDIFF(d, 0,...
[ { "answer_id": 325905, "author": "Charles Bretana", "author_id": 32632, "author_profile": "https://Stackoverflow.com/users/32632", "pm_score": 3, "selected": false, "text": "Where DateDiff(day, received, getdate()) = 0\n" }, { "answer_id": 325907, "author": "Tomalak", "au...
2008/11/28
[ "https://Stackoverflow.com/questions/325871", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1491425/" ]
325,872
<p>I've been using a 3G wireless card for a while and every time I connect, my anti-virus fires up the updates.</p> <p>I'm wondering what is the Win32 API set of functions that I can use to, either, get notified or query about the event of an Internet Connection coming up?</p> <p>And is there already a set of ported ...
[ { "answer_id": 327190, "author": "eKek0", "author_id": 32173, "author_profile": "https://Stackoverflow.com/users/32173", "pm_score": 4, "selected": false, "text": "uses WinInet;\n\nfunction IsConnected: boolean;\nconst\n // local system uses a modem to connect to the Internet.\n INTERN...
2008/11/28
[ "https://Stackoverflow.com/questions/325872", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8167/" ]
325,873
<p>I use an SQL statement to remove records that exist on another database but this takes a very long time.</p> <p>Is there any other alternative to the code below that can be faster? Database is Access.</p> <p>email_DB.mdb is from where I want to remove the email addresses that exist on the other database (table New...
[ { "answer_id": 327190, "author": "eKek0", "author_id": 32173, "author_profile": "https://Stackoverflow.com/users/32173", "pm_score": 4, "selected": false, "text": "uses WinInet;\n\nfunction IsConnected: boolean;\nconst\n // local system uses a modem to connect to the Internet.\n INTERN...
2008/11/28
[ "https://Stackoverflow.com/questions/325873", "https://Stackoverflow.com", "https://Stackoverflow.com/users/36544/" ]
325,874
<p>I have a TSqlDataSet which has a blob field, I need to get the data of this blob field in the BeforeUpdateRecord event of the provider and execute an update command, I've tried this:</p> <pre><code>Cmd := TSQLQuery.Create(nil); try Cmd.SQLConnection := SQLConnection; Cmd.CommandText := 'UPDATE MYTABLE SET IMAGE...
[ { "answer_id": 330647, "author": "Fabio Gomes", "author_id": 727, "author_profile": "https://Stackoverflow.com/users/727", "pm_score": 3, "selected": true, "text": "const\n SQL = 'UPDATE MYTABLE SET IMAGE = :PIMAGE WHERE ID = :PID;';\nvar\n Params: TParams;\nbegin\n Params := TParams....
2008/11/28
[ "https://Stackoverflow.com/questions/325874", "https://Stackoverflow.com", "https://Stackoverflow.com/users/727/" ]
325,879
<p>I'm not looking for a general discussion on <a href="https://stackoverflow.com/questions/157354/is-mathematics-necessary-for-programming">if math is important or not for programming</a>. </p> <p>Instead I'm looking for real world scenarios where you have actually used some branch of math to solve some particular pr...
[ { "answer_id": 325900, "author": "Richard Ev", "author_id": 39709, "author_profile": "https://Stackoverflow.com/users/39709", "pm_score": 4, "selected": true, "text": "showAll" } ]
2008/11/28
[ "https://Stackoverflow.com/questions/325879", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3153/" ]
325,887
<p>I have this code</p> <pre><code>&lt;?php session_start(); if (isset($_GET["cmd"])) $cmd = $_GET["cmd"]; else die("You should have a 'cmd' parameter in your URL"); $pk = $_GET["pk"]; $con = mysql_connect("localhost","root","geheim"); if(!$con) { die('Connection failed because of' .mysql_error()); } mysql_select...
[ { "answer_id": 325934, "author": "Philip Morton", "author_id": 21709, "author_profile": "https://Stackoverflow.com/users/21709", "pm_score": 2, "selected": true, "text": "echo \"<img src=\\\"\".$row['PIC_URL'].\"\\\">\";\n" }, { "answer_id": 325942, "author": "Greg", "aut...
2008/11/28
[ "https://Stackoverflow.com/questions/325887", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1246613/" ]
325,892
<p>I've inherited a BizTalk 2006 application that uses several SOAP ports to request data from a 3rd party web service. The web service is secured by "basic" authentication - username / password. After making a few enhancements to the application I deployed to an integration test server which has access to the 3rd part...
[ { "answer_id": 326982, "author": "David Hall", "author_id": 2660, "author_profile": "https://Stackoverflow.com/users/2660", "pm_score": 0, "selected": false, "text": "<TransportTypeData>\n&lt;CustomProps&gt;\n&lt;AuthenticationScheme vt=\"8\"&gt;Basic&lt;/AuthenticationScheme&gt;\n&lt;As...
2008/11/28
[ "https://Stackoverflow.com/questions/325892", "https://Stackoverflow.com", "https://Stackoverflow.com/users/41169/" ]
325,906
<p>When I discovered <a href="http://www.boost.org/doc/libs/1_47_0/libs/conversion/lexical_cast.htm" rel="noreferrer"><code>boost::lexical_cast</code></a> I thought to myself "why didn't I know about this sooner!" - I hated having to write code like </p> <pre><code>stringstream ss; ss &lt;&lt; anIntVal; mystring = ss...
[ { "answer_id": 326874, "author": "Alessandro Jacopson", "author_id": 15485, "author_profile": "https://Stackoverflow.com/users/15485", "pm_score": 4, "selected": false, "text": "BOOST_STATIC_ASSERT" }, { "answer_id": 328046, "author": "D.Shawley", "author_id": 41747, ...
2008/11/28
[ "https://Stackoverflow.com/questions/325906", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3590/" ]
325,918
<p>I've got an executable file, and I would like to know which version(s) of the Microsoft .NET Framework this file needs to be started.</p> <p>Is there an easy way to find this information somewhere?</p> <p>(So far I tried <a href="https://en.wikipedia.org/wiki/ILDASM#Metadata_storage" rel="noreferrer">ILDASM</a> and ...
[ { "answer_id": 325966, "author": "Scott Dorman", "author_id": 1559, "author_profile": "https://Stackoverflow.com/users/1559", "pm_score": 7, "selected": true, "text": "// Metadata version: v2.0.50727\n.assembly extern mscorlib\n{\n .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) ...
2008/11/28
[ "https://Stackoverflow.com/questions/325918", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7021/" ]
325,929
<p>In HTML, you can send data from one page to another using a GET request in a couple of ways:</p> <pre><code>http://www.example.com/somepage.php?data=1 </code></pre> <p>...or...</p> <pre><code>&lt;form action="somepage.php" method="get"&gt; &lt;input type="hidden" name="data" value="1" /&gt; &lt;input type="su...
[ { "answer_id": 326073, "author": "Ed Lucas", "author_id": 12551, "author_profile": "https://Stackoverflow.com/users/12551", "pm_score": 2, "selected": false, "text": "GET" } ]
2008/11/28
[ "https://Stackoverflow.com/questions/325929", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21709/" ]
325,931
<p>I want to do exactly the same as in <a href="https://stackoverflow.com/questions/74451/getting-actual-file-name-with-proper-casing-on-windows">this question</a>:</p> <blockquote> <p>Windows file system is case insensitive. How, given a file/folder name (e.g. "somefile"), I get the actual name of that file/folder ...
[ { "answer_id": 326153, "author": "Yona", "author_id": 40007, "author_profile": "https://Stackoverflow.com/users/40007", "pm_score": 6, "selected": true, "text": " public static string GetExactPathName(string pathName)\n {\n if (!(File.Exists(pathName) || Directory.Exists(pat...
2008/11/28
[ "https://Stackoverflow.com/questions/325931", "https://Stackoverflow.com", "https://Stackoverflow.com/users/755/" ]
325,933
<p>Given two date ranges, what is the simplest or most efficient way to determine whether the two date ranges overlap?</p> <p>As an example, suppose we have ranges denoted by DateTime variables <code>StartDate1</code> to <code>EndDate1</code> <em>and</em> <code>StartDate2</code> to <code>EndDate2</code>.</p>
[ { "answer_id": 325939, "author": "Ian Nelson", "author_id": 2084, "author_profile": "https://Stackoverflow.com/users/2084", "pm_score": 9, "selected": false, "text": "(StartDate1 <= EndDate2) and (StartDate2 <= EndDate1)\n" }, { "answer_id": 325943, "author": "Bob", "auth...
2008/11/28
[ "https://Stackoverflow.com/questions/325933", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2084/" ]
325,952
<p>I need to loop through all the matches in say the following string:</p> <p><code>&lt;a href='/Product/Show/{ProductRowID}'&gt;{ProductName}&lt;/a&gt;</code></p> <p>I am looking to capture the values in the {} including them, so I want {ProductRowID} and {ProductName}</p> <p>Here is my code so far:</p> <pre><code...
[ { "answer_id": 325967, "author": "RickL", "author_id": 7261, "author_profile": "https://Stackoverflow.com/users/7261", "pm_score": 1, "selected": false, "text": "\\{\\w*\\}" }, { "answer_id": 325968, "author": "Tomalak", "author_id": 18771, "author_profile": "https://...
2008/11/28
[ "https://Stackoverflow.com/questions/325952", "https://Stackoverflow.com", "https://Stackoverflow.com/users/34548/" ]
325,953
<p>Given <em>test.txt</em> containing:</p> <pre><code>test message </code></pre> <p>I want to end up with:</p> <pre><code>testing a message </code></pre> <p>I think the following should work, but it doesn't:</p> <pre><code>Get-Content test.txt |% {$_-replace "t`r`n", "ting`r`na "} </code></pre> <p>How can I do a ...
[ { "answer_id": 326082, "author": "Don Jones", "author_id": 40405, "author_profile": "https://Stackoverflow.com/users/40405", "pm_score": 7, "selected": true, "text": "`n" }, { "answer_id": 332446, "author": "Peter Seale", "author_id": 25911, "author_profile": "https:/...
2008/11/28
[ "https://Stackoverflow.com/questions/325953", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5993/" ]
325,979
<p>We are contracting an external consultant out to generate XHTML (Transitional) and CSS for most of the major pages of a new project we are currently working on.</p> <p>I've been asked to put together a list of guidelines for them so that we can be sure that a certain level of quality can be expected. As a bit of te...
[ { "answer_id": 326114, "author": "Jan Aagaard", "author_id": 37147, "author_profile": "https://Stackoverflow.com/users/37147", "pm_score": 2, "selected": false, "text": "<form>" }, { "answer_id": 3598171, "author": "HandiworkNYC.com", "author_id": 220761, "author_prof...
2008/11/28
[ "https://Stackoverflow.com/questions/325979", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5777/" ]
325,981
<p>Does anyone know if the AjaxHelper in the ASP.NET MVC framework deals with degradation?</p> <p>For example, if you have an ActionLink that updates the content of a div, if JavaScript unavailable, will the page do a full postback by renderubg the page (via an action on a controller) and call the action specified in ...
[ { "answer_id": 31995919, "author": "Maria Ines Parnisari", "author_id": 1623249, "author_profile": "https://Stackoverflow.com/users/1623249", "pm_score": 0, "selected": false, "text": "Url" } ]
2008/11/28
[ "https://Stackoverflow.com/questions/325981", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5791/" ]
325,990
<p>I need to write a row to the database regardless of whether it already exists or not. Before using NHibernate this was done with a stored procedure. The procedure would attempt an update and if no rows were modified it would fallback to an insert. This worked well because the application doesn't care if the record e...
[ { "answer_id": 326189, "author": "Elie", "author_id": 23249, "author_profile": "https://Stackoverflow.com/users/23249", "pm_score": 0, "selected": false, "text": "Obj j = session.get(Object.class(), id);\nif (j != null)\n session.merge(myObj);\nelse\n session.saveOrUpdate(myObj);\n" ...
2008/11/28
[ "https://Stackoverflow.com/questions/325990", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6944/" ]
326,015
<p>Am new to Lucene.Net Which is the best Analyzer to use in Lucene.Net? Also,I want to know how to use Stop words and word stemming features ?</p>
[ { "answer_id": 6250248, "author": "Febin J S", "author_id": 669225, "author_profile": "https://Stackoverflow.com/users/669225", "pm_score": 0, "selected": false, "text": " string indexFileLocation = @\"C:\\Index\";\n string stopWordsLocation = @\"C:\\Stopwords.txt\";\n ...
2008/11/28
[ "https://Stackoverflow.com/questions/326015", "https://Stackoverflow.com", "https://Stackoverflow.com/users/41625/" ]
326,053
<p>Is there a way to get a list ordered by two fields, say last and first names?</p> <p>I know <code>.listOrderByLastAndFirst</code> and <code>.list(sort:'last, first')</code> won't work.</p>
[ { "answer_id": 326152, "author": "Hates_", "author_id": 3410, "author_profile": "https://Stackoverflow.com/users/3410", "pm_score": 4, "selected": true, "text": "MyDomain.find(\"from Domain as d order by last,first desc\")\n" }, { "answer_id": 1633716, "author": "mattlary", ...
2008/11/28
[ "https://Stackoverflow.com/questions/326053", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12803/" ]
326,059
<p>I'm trying to create a "workflow" bar on a web page.</p> <p>The items in the workflow might be of different lengths.</p> <p>There might be enough items to fill the width of the screen, hence the flow needs to wrap onto the next line.</p> <p>I'm using left floating divs to do this. </p> <p>However, I'd like the d...
[ { "answer_id": 326065, "author": "John Polling", "author_id": 41609, "author_profile": "https://Stackoverflow.com/users/41609", "pm_score": 1, "selected": false, "text": "margin: 0 auto;" }, { "answer_id": 326134, "author": "A_M", "author_id": 7144, "author_profile": ...
2008/11/28
[ "https://Stackoverflow.com/questions/326059", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7144/" ]
326,060
<p>Let's say I have an integer that I need to convert to a string (I might be displaying the value to the user by means of a TextBox, for example.</p> <p>Should I prefer <code>.ToString()</code> or <code>Convert.ToString()</code>. They both do the same thing (don't they?).</p> <pre><code>int someValue = 4; // You ca...
[ { "answer_id": 326071, "author": "rajesh pillai", "author_id": 34644, "author_profile": "https://Stackoverflow.com/users/34644", "pm_score": 5, "selected": true, "text": "//This will set the variable test to null:\nstring test = Convert.ToString(ConfigurationSettings.AppSettings[\"Missin...
2008/11/28
[ "https://Stackoverflow.com/questions/326060", "https://Stackoverflow.com", "https://Stackoverflow.com/users/39709/" ]
326,062
<p>A while ago, I had a discussion with a colleague about how to insert values in STL <a href="http://www.sgi.com/tech/stl/Map.html" rel="noreferrer">maps</a>. I preferred <code>map[key] = value;</code> because it feels natural and is clear to read whereas he preferred <code>map.insert(std::make_pair(key, value))</code...
[ { "answer_id": 327289, "author": "netjeff", "author_id": 41191, "author_profile": "https://Stackoverflow.com/users/41191", "pm_score": 9, "selected": true, "text": "map[key] = value;\n" }, { "answer_id": 682003, "author": "rlbond", "author_id": 72631, "author_profile"...
2008/11/28
[ "https://Stackoverflow.com/questions/326062", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12663/" ]
326,068
<p>I was discussing multiple inheritance vs. single inheritance with a friend of mine, and discovered that plainly, my conception of Object-Oriented design is completely different than his. I am mostly an Obj-C programmer, so Multiple Inheritance is not something I use daily. He is mostly a C++ programmer under Window...
[ { "answer_id": 326094, "author": "JeeBee", "author_id": 17832, "author_profile": "https://Stackoverflow.com/users/17832", "pm_score": 4, "selected": true, "text": "public class Human extends Mammal implements HunterGatherer, Speech, CognitiveThought {\n\n public Human(Human mother, Hu...
2008/11/28
[ "https://Stackoverflow.com/questions/326068", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23623/" ]
326,069
<p>I am writing an iframe based facebook app. Now I want to use the same html page to render the normal website as well as the canvas page within facebook. I want to know if I can determine whether the page has been loaded inside the iframe or directly in the browser?</p>
[ { "answer_id": 326076, "author": "Greg", "author_id": 24181, "author_profile": "https://Stackoverflow.com/users/24181", "pm_score": 11, "selected": true, "text": "window.top" }, { "answer_id": 326316, "author": "scunliffe", "author_id": 6144, "author_profile": "https:...
2008/11/28
[ "https://Stackoverflow.com/questions/326069", "https://Stackoverflow.com", "https://Stackoverflow.com/users/29653/" ]
326,098
<p>This is my code:</p> <pre><code>internal enum WindowsMessagesFlags { WM_EXITSIZEMOVE = 0x00000232, WM_DISPLAYCHANGE = 0x0000007e, WM_MOVING = 0x00000216, } protected override void WndProc(ref Message m) { switch(m.Msg) { case (int)WindowsMessagesFlags.WM_DISPLAYCHANGE: ...
[ { "answer_id": 326104, "author": "Jon Skeet", "author_id": 22656, "author_profile": "https://Stackoverflow.com/users/22656", "pm_score": 6, "selected": true, "text": "protected override void WndProc(ref Message m) {\n switch((WindowsMessagesFlags) m.Msg) {\n case WindowsMessage...
2008/11/28
[ "https://Stackoverflow.com/questions/326098", "https://Stackoverflow.com", "https://Stackoverflow.com/users/40480/" ]
326,103
<p>I'm writing a function that fishes out the src from the first image tag it finds in an html file. Following the instructions in <a href="https://stackoverflow.com/questions/138313/how-to-extract-img-src-title-and-alt-from-html-using-php">this thread</a> on here, I got something that seemed to be working:</p> <pre>...
[ { "answer_id": 326117, "author": "Kibbee", "author_id": 1862, "author_profile": "https://Stackoverflow.com/users/1862", "pm_score": 0, "selected": false, "text": "<img[^>]*src\\s*=\\s*['|\"]?([^>]*?)['|\"]?[^>]*>\n" }, { "answer_id": 326131, "author": "angus", "author_id"...
2008/11/28
[ "https://Stackoverflow.com/questions/326103", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
326,112
<p>Is there a single algorithm that removes elements from a container as happens in the following code?</p> <pre><code>vec_it = std::remove_if( vec.begin(), vec.end(), pred ); vec.erase( vec_it, vec.end() ); </code></pre>
[ { "answer_id": 326149, "author": "jalf", "author_id": 33213, "author_profile": "https://Stackoverflow.com/users/33213", "pm_score": 3, "selected": false, "text": "vec.erase( std::remove_if( vec.begin(), vec.end(), pred ), vec.end() );\n" }, { "answer_id": 326166, "author": "C...
2008/11/28
[ "https://Stackoverflow.com/questions/326112", "https://Stackoverflow.com", "https://Stackoverflow.com/users/38892/" ]
326,128
<p>Imagine I have a document (word document).</p> <p>I have an enumeration which will indicate how to extract data from the document. So if I want just text, the images, or both (3 members of the enumeration).</p> <p>I have a case statement based on this enumeration, but without falling into a code smell, how can I w...
[ { "answer_id": 326142, "author": "tvanfosson", "author_id": 12950, "author_profile": "https://Stackoverflow.com/users/12950", "pm_score": 3, "selected": false, "text": "public interface IExtractionStrategy\n{\n object Extract( Document doc ); // or what ever result is best\n}\n\npubl...
2008/11/28
[ "https://Stackoverflow.com/questions/326128", "https://Stackoverflow.com", "https://Stackoverflow.com/users/32484/" ]
326,136
<p>I am trying to get a <code>MethodInfo</code> object for the method:</p> <pre><code>Any&lt;TSource&gt;(IEnumerable&lt;TSource&gt;, Func&lt;TSource, Boolean&gt;) </code></pre> <p>The problem I'm having is working out how you specify the type parameter for the <code>Func&lt;TSource, Boolean&gt;</code> bit... </p> <p...
[ { "answer_id": 4036219, "author": "Dustin Campbell", "author_id": 56959, "author_profile": "https://Stackoverflow.com/users/56959", "pm_score": 2, "selected": false, "text": "public static class TypeExtensions\n{\n private class SimpleTypeComparer : IEqualityComparer<Type>\n {\n ...
2008/11/28
[ "https://Stackoverflow.com/questions/326136", "https://Stackoverflow.com", "https://Stackoverflow.com/users/27805/" ]
326,186
<p>Is there a way to query or just access newly added object (using ObjectContext.AddObject method) in Entity Framework? I mean situation when it is not yet saved to data store using SaveChanges</p> <p>I understand that queries are translated to underlying SQL and executed against data store, and it don't have this ne...
[ { "answer_id": 491091, "author": "Johann Blais", "author_id": 363385, "author_profile": "https://Stackoverflow.com/users/363385", "pm_score": 4, "selected": true, "text": "context.ObjectStateManager.GetObjectStateEntries(EntityState.Added | EntityState.Modified | EntityState.Unchanged).S...
2008/11/28
[ "https://Stackoverflow.com/questions/326186", "https://Stackoverflow.com", "https://Stackoverflow.com/users/37366/" ]
326,194
<p>I know there is a similar problem on this forum, but the solutions did not really work for me. I am populating form controls with fields from a few different data sources, and the data shows up great.</p> <p>I have an <code>ImageButton</code> control, which has an <code>OnClick</code> Event set to grab all of the ...
[ { "answer_id": 491091, "author": "Johann Blais", "author_id": 363385, "author_profile": "https://Stackoverflow.com/users/363385", "pm_score": 4, "selected": true, "text": "context.ObjectStateManager.GetObjectStateEntries(EntityState.Added | EntityState.Modified | EntityState.Unchanged).S...
2008/11/28
[ "https://Stackoverflow.com/questions/326194", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
326,196
<p>I'm stuck on what appears to be a CSS/z-index conflict with the YouTube player. In Firefox 3 under Windows XP, Take a look at this page: <a href="http://spokenword.org/program/21396" rel="noreferrer">http://spokenword.org/program/21396</a> Click on the Collect button and note that the pop-up &lt;div> appears <em>und...
[ { "answer_id": 326220, "author": "Christian C. Salvadó", "author_id": 5445, "author_profile": "https://Stackoverflow.com/users/5445", "pm_score": 8, "selected": true, "text": "wmode" }, { "answer_id": 1202199, "author": "Matthew Kuehn", "author_id": 121383, "author_pr...
2008/11/28
[ "https://Stackoverflow.com/questions/326196", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17307/" ]