qid
int64
4
19.1M
question
stringlengths
18
48.3k
answers
list
date
stringlengths
10
10
metadata
list
132,358
<p>In order to improve performance reading from a file, I'm trying to read the entire content of a big (several MB) file into memory and then use a istringstream to access the information.</p> <p>My question is, which is the best way to read this information and "import it" into the string stream? A problem with this ...
[ { "answer_id": 132394, "author": "Luc Touraille", "author_id": 20984, "author_profile": "https://Stackoverflow.com/users/20984", "pm_score": 7, "selected": true, "text": "std::ifstream rdbuf() filebuf filebuf stringstream #include <fstream>\n#include <sstream>\n\nint main()\n{\n std::...
2008/09/25
[ "https://Stackoverflow.com/questions/132358", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20317/" ]
132,367
<p>How would I invert .NET regex matches? I want to extract only the matched text, e.g. I want to extract all IMG tags from an HTML file, but only the image tags.</p>
[ { "answer_id": 133480, "author": "ZeroBugBounce", "author_id": 11314, "author_profile": "https://Stackoverflow.com/users/11314", "pm_score": 1, "selected": false, "text": "static void Main(string[] args)\n{\n Regex re = new Regex(@\"\\sthe\\s\", RegexOptions.IgnoreCase);\n\n string...
2008/09/25
[ "https://Stackoverflow.com/questions/132367", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8741/" ]
132,397
<p>When I do an "os.execute" in Lua, a console quickly pops up, executes the command, then closes down. But is there some way of getting back the console output only using the standard Lua libraries?</p>
[ { "answer_id": 132453, "author": "paxdiablo", "author_id": 14860, "author_profile": "https://Stackoverflow.com/users/14860", "pm_score": 1, "selected": false, "text": "comd >comd.txt 2>&1\n" }, { "answer_id": 326715, "author": "Norman Ramsey", "author_id": 41661, "aut...
2008/09/25
[ "https://Stackoverflow.com/questions/132397", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12291/" ]
132,409
<p>I have a web application that uses <a href="https://javaee.github.io/jaxb-v2/" rel="nofollow noreferrer">JAXB 2</a>. When deployed on an <a href="https://www.oracle.com/technetwork/middleware/ias/overview/index.html" rel="nofollow noreferrer">Oracle 10g Application Server</a>, I get errors as soon as I try to marsh...
[ { "answer_id": 132434, "author": "NR.", "author_id": 11701, "author_profile": "https://Stackoverflow.com/users/11701", "pm_score": 2, "selected": false, "text": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE weblogic-web-app PUBLIC \"-//BEA Systems, Inc.//DTD Web Application 8.1/...
2008/09/25
[ "https://Stackoverflow.com/questions/132409", "https://Stackoverflow.com", "https://Stackoverflow.com/users/998/" ]
132,411
<p>I would like to translate some C code to Python code or bytecode. The C code in question is what i'd call purely algorithmic: platform independent, no I/O, just algorithms and in-memory data structures.</p> <p>An example would be a regular expression library. Translation tool would process library source code and p...
[ { "answer_id": 6857972, "author": "John S", "author_id": 867314, "author_profile": "https://Stackoverflow.com/users/867314", "pm_score": 2, "selected": false, "text": "x * 1,000,000 = a\ny * 1,000,000 = b\na {function} b = result\nresult / 1,000,000 = z\n" } ]
2008/09/25
[ "https://Stackoverflow.com/questions/132411", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20310/" ]
132,437
<p>In an asp.net application, i would like to use a webservice to return the username associated with the session id passed as a parameter. We're currently using InProc session store.</p> <p>Is it possible to do this ?</p> <p>Edit: what i'm trying to do is get information about another session than the current one. I...
[ { "answer_id": 6857972, "author": "John S", "author_id": 867314, "author_profile": "https://Stackoverflow.com/users/867314", "pm_score": 2, "selected": false, "text": "x * 1,000,000 = a\ny * 1,000,000 = b\na {function} b = result\nresult / 1,000,000 = z\n" } ]
2008/09/25
[ "https://Stackoverflow.com/questions/132437", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22078/" ]
132,444
<p>There is a UNIQUE database constraint on an index which doesn't allow more than one record having identical columns.</p> <p>There is a piece of code, managed by Hibernate (v2.1.8), doing two DAO <BR> <code>getHibernateTemplate().save( theObject )</code><BR> calls which results two records entered into the table me...
[ { "answer_id": 138209, "author": "Giacomo Degli Esposti", "author_id": 20796, "author_profile": "https://Stackoverflow.com/users/20796", "pm_score": 0, "selected": false, "text": "alter table MyTable Add MyCalcField as \ncase when MyUniqueField is NULL \n then cast(Myprimarykey as M...
2008/09/25
[ "https://Stackoverflow.com/questions/132444", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7345/" ]
132,445
<p>Consider the following code:</p> <pre><code>void Handler(object o, EventArgs e) { // I swear o is a string string s = (string)o; // 1 //-OR- string s = o as string; // 2 // -OR- string s = o.ToString(); // 3 } </code></pre> <p>What is the difference between the three types of casting (okay, the 3...
[ { "answer_id": 132464, "author": "Sergio Acosta", "author_id": 2954, "author_profile": "https://Stackoverflow.com/users/2954", "pm_score": 3, "selected": false, "text": "string s = o as string;\n if(o is string) \n s = o;\nelse\n s = null;\n // I swear i is an int\nint number = i a...
2008/09/25
[ "https://Stackoverflow.com/questions/132445", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6621/" ]
132,449
<p>I'm running a strange problem sending emails. I'm getting this exception:</p> <pre><code>ArgumentError (wrong number of arguments (1 for 0)): /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/active_record/base.rb:642:in `initialize' /usr/lib/ruby/gems/1.8/gems/activerecord-2.1.1/lib/active_record/base.rb:642:in `...
[ { "answer_id": 133082, "author": "Dave Nolan", "author_id": 9474, "author_profile": "https://Stackoverflow.com/users/9474", "pm_score": 0, "selected": false, "text": "class TestMailer < ActionMailer::ARMailer\n def send_email\n recipients \"roberto.druetto@gmail.com\"\n from \"rob...
2008/09/25
[ "https://Stackoverflow.com/questions/132449", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22083/" ]
132,465
<p>The file upload control in asp.net does not allow me to select a folder and enables me to select only the files. Is there any way in which I can select a folder (obviously without using the file upload control).</p> <p>Why I want to select the folder is basically to store its entire path in a database table. </p>
[ { "answer_id": 132500, "author": "jop", "author_id": 11830, "author_profile": "https://Stackoverflow.com/users/11830", "pm_score": 2, "selected": false, "text": "<input type=file>" } ]
2008/09/25
[ "https://Stackoverflow.com/questions/132465", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4021/" ]
132,478
<p>I need to perform Diffs between Java strings. I would like to be able to rebuild a string using the original string and diff versions. Has anyone done this in Java? What library do you use?</p> <pre><code>String a1; // This can be a long text String a2; // ej. above text with spelling corrections String a3; // ej. ...
[ { "answer_id": 132484, "author": "Paul Whelan", "author_id": 3050, "author_profile": "https://Stackoverflow.com/users/3050", "pm_score": 5, "selected": false, "text": "StringUtils.difference(\"foobar\", \"foo\");\n" }, { "answer_id": 132560, "author": "Paul Whelan", "auth...
2008/09/25
[ "https://Stackoverflow.com/questions/132478", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2138/" ]
132,488
<p>I want a regex which can match conditional comments in a HTML source page so I can remove only those. I want to preserve the regular comments.</p> <p>I would also like to avoid using the .*? notation if possible. </p> <p>The text is </p> <pre><code>foo &lt;!--[if IE]&gt; &lt;style type="text/css"&gt; ul.menu u...
[ { "answer_id": 132519, "author": "Nescio", "author_id": 14484, "author_profile": "https://Stackoverflow.com/users/14484", "pm_score": 1, "selected": false, "text": " \"<!--\\[if IE\\]>.*?<!\\[endif\\]-->\"\n" }, { "answer_id": 132521, "author": "Lev", "author_id": 7224, ...
2008/09/25
[ "https://Stackoverflow.com/questions/132488", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1448/" ]
132,501
<p>How to sort list of values using only one variable?</p> <p>EDIT: according to @Igor's comment, I retitled the question.</p>
[ { "answer_id": 132783, "author": "Nils Pipenbrinck", "author_id": 15955, "author_profile": "https://Stackoverflow.com/users/15955", "pm_score": 2, "selected": false, "text": "// define a compare and swap macro \n#define order(a,b) if ((a)<(b)) { temp=(a); (a) = (b); (b) = temp; }\n\nstat...
2008/09/25
[ "https://Stackoverflow.com/questions/132501", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4235/" ]
132,507
<p>I'm creating a UI that allows the user the select a date range, and tick or un-tick the days of the week that apply within the date range.</p> <p>The date range controls are <code>DateTimePickers</code>, and the Days of the Week are <code>CheckBoxes</code></p> <p>Here's a mock-up of the UI:</p> <p><code>From Date...
[ { "answer_id": 132541, "author": "Blair Conrad", "author_id": 1199, "author_profile": "https://Stackoverflow.com/users/1199", "pm_score": 2, "selected": false, "text": "#weeks * skipped days in a week" }, { "answer_id": 132557, "author": "ravenspoint", "author_id": 16582,...
2008/09/25
[ "https://Stackoverflow.com/questions/132507", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5662/" ]
132,544
<p>I have a .NET application which has different configuration files for Debug and Release builds. E.g. the debug app.config file points to a development <a href="http://en.wikipedia.org/wiki/Microsoft_SQL_Server" rel="noreferrer">SQL Server</a> which has debugging enabled and the release target points to the live SQL ...
[ { "answer_id": 132600, "author": "Eric Z Beard", "author_id": 1219, "author_profile": "https://Stackoverflow.com/users/1219", "pm_score": 5, "selected": false, "text": "<appSettings file=\"Local.config\">\n configSource=\"Local.config\"\n" }, { "answer_id": 132655, "author": ...
2008/09/25
[ "https://Stackoverflow.com/questions/132544", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8354/" ]
132,564
<p>I'm working in Java with XML and I'm wondering; what's the difference between an element and a node?</p>
[ { "answer_id": 132572, "author": "mmaibaum", "author_id": 12213, "author_profile": "https://Stackoverflow.com/users/12213", "pm_score": 5, "selected": false, "text": "<foo> This is Text </foo>" }, { "answer_id": 132635, "author": "fenomas", "author_id": 10651, "author...
2008/09/25
[ "https://Stackoverflow.com/questions/132564", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21709/" ]
132,566
<p>Despite my most convincing cries to the contrary, I was recently forced to implement a horizontal drop-down navigation system, so I opted for the friendliest one I could find - <a href="http://www.htmldog.com/articles/suckerfish/dropdowns/" rel="nofollow noreferrer">Son of Suckerfish</a>.</p> <p>I tested in various...
[ { "answer_id": 133110, "author": "Bryan M.", "author_id": 4636, "author_profile": "https://Stackoverflow.com/users/4636", "pm_score": 3, "selected": true, "text": "#nav li:hover {\n position: static;\n}\n" } ]
2008/09/25
[ "https://Stackoverflow.com/questions/132566", "https://Stackoverflow.com", "https://Stackoverflow.com/users/192/" ]
132,590
<p>I've been writing a little application that will let people upload &amp; download files to me. I've added a web service to this applciation to provide the upload/download functionality that way but I'm not too sure on how well my implementation is going to cope with large files.</p> <p>At the moment the definition...
[ { "answer_id": 132603, "author": "Guvante", "author_id": 16800, "author_profile": "https://Stackoverflow.com/users/16800", "pm_score": 4, "selected": true, "text": "boolean uploadFile(String username, String password, String fileName, int currentChunk, int totalChunks, byte[] chunk);\n" ...
2008/09/25
[ "https://Stackoverflow.com/questions/132590", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1900/" ]
132,592
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="https://stackoverflow.com/questions/114149/const-correctness-in-c-sharp">&ldquo;const correctness&rdquo; in C#</a> </p> </blockquote> <p>I have programmed C++ for many years but am fairly new to C#. While learning C# I found that the use of the <...
[ { "answer_id": 132603, "author": "Guvante", "author_id": 16800, "author_profile": "https://Stackoverflow.com/users/16800", "pm_score": 4, "selected": true, "text": "boolean uploadFile(String username, String password, String fileName, int currentChunk, int totalChunks, byte[] chunk);\n" ...
2008/09/25
[ "https://Stackoverflow.com/questions/132592", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19863/" ]
132,607
<p>We're reviewing one of the company's system's exception handling and found a couple of interesting things.</p> <p>Most of the code blocks (if not all of them) are inside a try/catch block, and inside the catch block a new BaseApplicationException is being thrown - which seems to be coming from the Enterprise Librar...
[ { "answer_id": 133044, "author": "Christoffer Lette", "author_id": 11808, "author_profile": "https://Stackoverflow.com/users/11808", "pm_score": 4, "selected": true, "text": "catch (Exception ex) System.AppDomain.CurrentDomain.UnhandledException Threading System.Windows.Forms.Application...
2008/09/25
[ "https://Stackoverflow.com/questions/132607", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1613872/" ]
132,612
<p>I have found that when I execute the show() method for a contextmenustrip (a right click menu), if the position is outside that of the form it belongs to, it shows up on the taskbar also.</p> <p>I am trying to create a right click menu for when clicking on the notifyicon, but as the menu hovers above the system tra...
[ { "answer_id": 7433813, "author": "Dicu Alexandru", "author_id": 947202, "author_profile": "https://Stackoverflow.com/users/947202", "pm_score": 2, "selected": false, "text": "ContextMenuLeft ContextMenuRight Left Button Click NotifyIcon.ContextMenuStrip = ContextMenuLeft; //let's asign ...
2008/09/25
[ "https://Stackoverflow.com/questions/132612", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15087/" ]
132,620
<p>Here's the scenario:</p> <p>You have a Windows server that users remotely connect to via RDP. You want your program (which runs as a service) to know who is currently connected. This may or may not include an interactive console session.</p> <p>Please note that this is the <strong>not</strong> the same as just ret...
[ { "answer_id": 132711, "author": "Nescio", "author_id": 14484, "author_profile": "https://Stackoverflow.com/users/14484", "pm_score": 1, "selected": false, "text": "using System;\nusing System.Collections.Generic;\nusing System.Text;\nusing System.Runtime.InteropServices;\n\nnamespace Te...
2008/09/25
[ "https://Stackoverflow.com/questions/132620", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7837/" ]
132,643
<p>I have a this aspx-code: (sample)</p> <pre><code>&lt;asp:DropDownList runat="server" ID="ddList1"&gt;&lt;/asp:DropDownList&gt; </code></pre> <p>With this codebehind:</p> <pre><code>List&lt;System.Web.UI.WebControls.ListItem&gt; colors = new List&lt;System.Web.UI.WebControls.ListItem&gt;(); colors.Add(new ListI...
[ { "answer_id": 132731, "author": "Serhat Ozgel", "author_id": 31505, "author_profile": "https://Stackoverflow.com/users/31505", "pm_score": 2, "selected": false, "text": "protected internal override void PerformDataBinding(IEnumerable dataSource)\n{\n base.PerformDataBinding(dataSourc...
2008/09/25
[ "https://Stackoverflow.com/questions/132643", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2257/" ]
132,649
<p>What is the difference between overflow:hidden and display:none?</p>
[ { "answer_id": 132677, "author": "Vincent McNabb", "author_id": 16299, "author_profile": "https://Stackoverflow.com/users/16299", "pm_score": 1, "selected": false, "text": "div overflow: hidden; display: none div div display: none; overflow: hidden; div div display: none; overflow: hidde...
2008/09/25
[ "https://Stackoverflow.com/questions/132649", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21067/" ]
132,667
<p>While developing a C++ application, I had to use a third-party library which produced a huge amount of warnings related with a harmless #pragma directive being used.</p> <pre class="lang-none prettyprint-override"><code>../File.hpp:1: warning: ignoring #pragma ident In file included from ../File2.hpp:47, ...
[ { "answer_id": 132730, "author": "Adam Wright", "author_id": 1200, "author_profile": "https://Stackoverflow.com/users/1200", "pm_score": 8, "selected": true, "text": "-Wno-unknown-pragmas\n" }, { "answer_id": 132732, "author": "Mike Dimmick", "author_id": 6970, "autho...
2008/09/25
[ "https://Stackoverflow.com/questions/132667", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20317/" ]
132,685
<p>When setting the size of fonts in CSS, should I be using a percent value (<code>%</code>) or <code>em</code>? Can you explain the advantage?</p>
[ { "answer_id": 1723471, "author": "DA.", "author_id": 172279, "author_profile": "https://Stackoverflow.com/users/172279", "pm_score": 3, "selected": false, "text": "px % em % px em" }, { "answer_id": 13840233, "author": "user743436", "author_id": 743436, "author_profi...
2008/09/25
[ "https://Stackoverflow.com/questions/132685", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16440/" ]
132,719
<p>I have a Visual Studio (2008) solution consisting of several projects, not all in the same namespace. When I build the solution, all the DLL files used by the top level project, <strong>TopProject</strong>, are copied into the <em>TopProject\bin\debug</em> folder. However, the corresponding .pdb files are only copie...
[ { "answer_id": 132899, "author": "Code Trawler", "author_id": 22073, "author_profile": "https://Stackoverflow.com/users/22073", "pm_score": 2, "selected": false, "text": "bin\\debug bin\\debug" }, { "answer_id": 132909, "author": "Dean Hill", "author_id": 3106, "autho...
2008/09/25
[ "https://Stackoverflow.com/questions/132719", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6091/" ]
132,720
<p>We have consumed a third party web service and are trying to invoke it from an ASP.NET web application. However when I instantiate the web service the following System.InvalidOperationException exception is thrown:</p> <blockquote> <p>Method 'ABC.XYZ' can not be reflected. System.InvalidOperationException: M...
[ { "answer_id": 17563323, "author": "Has AlTaiar", "author_id": 1570662, "author_profile": "https://Stackoverflow.com/users/1570662", "pm_score": 0, "selected": false, "text": "WebMethod interface VS disco" } ]
2008/09/25
[ "https://Stackoverflow.com/questions/132720", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1762/" ]
132,725
<p>I'm new to Delphi, and I've been running some tests to see what object variables and stack variables are initialized to by default:</p> <pre><code>TInstanceVariables = class fBoolean: boolean; // always starts off as false fInteger: integer; // always starts off as zero fObject: TObject; // always starts off ...
[ { "answer_id": 132770, "author": "Giacomo Degli Esposti", "author_id": 20796, "author_profile": "https://Stackoverflow.com/users/20796", "pm_score": 8, "selected": true, "text": "string, variant, interface record" }, { "answer_id": 495493, "author": "Heinrich Ulbricht", "...
2008/09/25
[ "https://Stackoverflow.com/questions/132725", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11961/" ]
132,738
<p>I'm a C/C++ developer, and here are a couple of questions that always baffled me.</p> <ul> <li>Is there a big difference between "regular" code and inline code?</li> <li>Which is the main difference?</li> <li>Is inline code simply a "form" of macros?</li> <li>What kind of tradeoff must be done when choosing to inli...
[ { "answer_id": 132759, "author": "Charles Duffy", "author_id": 14122, "author_profile": "https://Stackoverflow.com/users/14122", "pm_score": 1, "selected": false, "text": "inline" }, { "answer_id": 132776, "author": "QBziZ", "author_id": 11572, "author_profile": "http...
2008/09/25
[ "https://Stackoverflow.com/questions/132738", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20317/" ]
132,750
<p>I'm a jQuery novice, so the answer to this may be quite simple:</p> <p>I have an image, and I would like to do several things with it. When a user clicks on a 'Zoom' icon, I'm running the 'imagetool' plugin (<a href="http://code.google.com/p/jquery-imagetool/" rel="nofollow noreferrer">http://code.google.com/p/jque...
[ { "answer_id": 132795, "author": "Adam Bellaire", "author_id": 21632, "author_profile": "https://Stackoverflow.com/users/21632", "pm_score": 1, "selected": false, "text": "// Product Zoom (jQuery)\n$(document).ready(function(){\n$(\"#productZoom\").click(bindZoom);\n\n// Alternative prod...
2008/09/25
[ "https://Stackoverflow.com/questions/132750", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22113/" ]
132,754
<p>I have a bunch of JSP files and backend in Tomcat. I have 3 different versions of JSP with same logic inside but with different layouts. So if I change some logic I have three JSP file to fix.</p> <p>What is the proper soution for such a scenario? I thought of some XML and XSLT stack: backend gives only data in XML...
[ { "answer_id": 132862, "author": "kosoant", "author_id": 15114, "author_profile": "https://Stackoverflow.com/users/15114", "pm_score": 1, "selected": false, "text": " <jsp-property-group>\n <url-pattern>/customers/*</url-pattern>\n <include-prelude>/shared/layout/_layout...
2008/09/25
[ "https://Stackoverflow.com/questions/132754", "https://Stackoverflow.com", "https://Stackoverflow.com/users/501/" ]
132,764
<p>In our CMS, we have a place in which we enable users to play around with their site hierarchy - move pages around, add and remove pages, etc.</p> <p>We use drag &amp; drop to implement moving pages around. </p> <p>Each move has to saved in th DB, and exported to many HTML files. If we do that in every move, it wil...
[ { "answer_id": 132775, "author": "Espo", "author_id": 2257, "author_profile": "https://Stackoverflow.com/users/2257", "pm_score": 3, "selected": true, "text": "<SCRIPT LANGUAGE=\"JavaScript1.2\" TYPE=\"text/javascript\">\n<!--\nfunction unloadMess(){\n mess = \"Wait! You haven't finis...
2008/09/25
[ "https://Stackoverflow.com/questions/132764", "https://Stackoverflow.com", "https://Stackoverflow.com/users/278/" ]
132,799
<p>How can you you insert a newline from your batch file output?</p> <p>I want to do something like:</p> <pre class="lang-bat prettyprint-override"><code>echo hello\nworld </code></pre> <p>Which would output:</p> <pre class="lang-bat prettyprint-override"><code>hello world </code></pre>
[ { "answer_id": 132804, "author": "Matt Lacey", "author_id": 1755, "author_profile": "https://Stackoverflow.com/users/1755", "pm_score": 9, "selected": false, "text": "echo hello\necho:\necho world\n" }, { "answer_id": 132811, "author": "Grimtron", "author_id": 17378, ...
2008/09/25
[ "https://Stackoverflow.com/questions/132799", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3153/" ]
132,812
<p>I created a report model using SSRS (2005) and published to the local server. But when I tried to run the report for the model I published using report builder I get the following error. </p> <blockquote> <p>Report execution error:The permissions granted to user are insufficient for performing this operation. (rs...
[ { "answer_id": 1325291, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 3, "selected": false, "text": "rs.accessdenied" }, { "answer_id": 22348375, "author": "Ajay", "author_id": 3410149, "author_profile": "h...
2008/09/25
[ "https://Stackoverflow.com/questions/132812", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14752/" ]
132,857
<p>I have the following layout for my test suite:</p> <p>TestSuite1.cmd:</p> <ol> <li>Run my program</li> <li>Check its return result</li> <li>If the return result is not 0, convert the error to textual output and abort the script. If it succeeds, write out success.</li> </ol> <p>In my single .cmd file, I call my p...
[ { "answer_id": 132880, "author": "grapefrukt", "author_id": 914, "author_profile": "https://Stackoverflow.com/users/914", "pm_score": 0, "selected": false, "text": "testthingie.cmd >> output.txt\n" }, { "answer_id": 132892, "author": "paxdiablo", "author_id": 14860, "...
2008/09/25
[ "https://Stackoverflow.com/questions/132857", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3153/" ]
132,867
<p>The question I'm really asking is why require does not take the name of the gem. Also, In the case that it doesn't, what's the easiest way to find the secret incantation to require the damn thing!?</p> <p>As an example if I have <code>memcache-client</code> installed then I have to require it using</p> <pre><code>...
[ { "answer_id": 132889, "author": "Kyle Burton", "author_id": 19784, "author_profile": "https://Stackoverflow.com/users/19784", "pm_score": 3, "selected": false, "text": "kburton@hypothesisf:~$ gem environment\nRubyGems Environment:\n - RUBYGEMS VERSION: 1.2.0\n - RUBY VERSION: 1.8.7 (2...
2008/09/25
[ "https://Stackoverflow.com/questions/132867", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18751/" ]
132,885
<p>I need to switch among 3 different environments when developing my web app - Development, UAT, and Prod. I have different database connections in my configuration files for all 3. I have seen switching these settings done manually by changing all references and then rebuilding the solution, and also done with prepro...
[ { "answer_id": 132934, "author": "Aaron Powell", "author_id": 11388, "author_profile": "https://Stackoverflow.com/users/11388", "pm_score": 2, "selected": false, "text": "<Target Name=\"Configs\">\n<Xslt RootTag=\"\" Inputs=\"web.config\" Output=\"Web.$(COMPUTERNAME).config\" Xsl=\"web.c...
2008/09/25
[ "https://Stackoverflow.com/questions/132885", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1284/" ]
132,902
<p>I need to move entire tables from one MySQL database to another. I don't have full access to the second one, only phpMyAdmin access. I can only upload (compressed) sql files smaller than 2MB. But the compressed output from a mysqldump of the first database's tables is larger than 10MB.</p> <p>Is there a way to spli...
[ { "answer_id": 132939, "author": "Vinko Vrsalovic", "author_id": 5190, "author_profile": "https://Stackoverflow.com/users/5190", "pm_score": 6, "selected": true, "text": "mysqldump -d --all-databases \n mysqldump --all-databases --extended-insert=FALSE --no-create-info=TRUE\n" }, { ...
2008/09/25
[ "https://Stackoverflow.com/questions/132902", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1428/" ]
132,921
<p>I was wondering how i can force a user who has requested a page using Http to use the secure https version?</p> <p>I am using Websphere 6.1 as my application server and Rad 7 as my development environment</p> <p>Thanks Damien</p>
[ { "answer_id": 133116, "author": "matt b", "author_id": 4249, "author_profile": "https://Stackoverflow.com/users/4249", "pm_score": 3, "selected": true, "text": "ServletRequest.getScheme() HttpServletResponse.sendRedirect(String url)" }, { "answer_id": 141407, "author": "fnCz...
2008/09/25
[ "https://Stackoverflow.com/questions/132921", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11612/" ]
132,940
<p>Recently I noticed my application appears to be eating memory that never gets released. After profiling with CLRProfiler I've found that the Castle Windsor container I'm using is holding onto objects. These objects are declared with the lifestyle="transient" attribute in the config xml.</p> <p>I've found if I put a...
[ { "answer_id": 133058, "author": "Scott Langham", "author_id": 11898, "author_profile": "https://Stackoverflow.com/users/11898", "pm_score": 1, "selected": false, "text": "ILifestyleManager ReallyTransient" }, { "answer_id": 166523, "author": "Bittercoder", "author_id": 4...
2008/09/25
[ "https://Stackoverflow.com/questions/132940", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11898/" ]
132,955
<p>How do I have a script run every, say 30 minutes? I assume there are different ways for different OSs. I'm using OS X.</p>
[ { "answer_id": 133425, "author": "Mecki", "author_id": 15809, "author_profile": "https://Stackoverflow.com/users/15809", "pm_score": 8, "selected": true, "text": "launchd init cron at init.d inetd upstart systemd /Library/LaunchDaemons/\n /Library/LaunchAgents/\n ~/Library/LaunchAgents/\...
2008/09/25
[ "https://Stackoverflow.com/questions/132955", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1615/" ]
132,971
<p>A <a href="http://www.google.com/search?ie=UTF-8&amp;oe=UTF-8&amp;sourceid=navclient&amp;gfns=1&amp;q=windows+cron" rel="noreferrer">Google search</a> turned up software that performs the same functions as cron, but nothing built into Windows.</p> <p>I'm running Windows XP Professional, but advice for any version o...
[ { "answer_id": 133053, "author": "enobrev", "author_id": 14651, "author_profile": "https://Stackoverflow.com/users/14651", "pm_score": 3, "selected": false, "text": "Supported systems\n\n* Windows 2000 (any version) works\n* Windows XP (SP 2) works\n* Windows Server 2003 ...
2008/09/25
[ "https://Stackoverflow.com/questions/132971", "https://Stackoverflow.com", "https://Stackoverflow.com/users/572/" ]
132,976
<p>I have a MOJO I would like executed once, and once only after the test phase of the last project in the reactor to run.</p> <p>Using:</p> <pre><code>if (!getProject().isExecutionRoot()) { return ; } </code></pre> <p>at the start of the execute() method means my mojo gets executed once, however at the very...
[ { "answer_id": 137318, "author": "npellow", "author_id": 2767300, "author_profile": "https://Stackoverflow.com/users/2767300", "pm_score": 3, "selected": false, "text": "/**\n * The projects in the reactor.\n *\n * @parameter expression=\"${reactorProjects}\"\n * @readonly\n */\nprivate ...
2008/09/25
[ "https://Stackoverflow.com/questions/132976", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2767300/" ]
132,988
<p>My <a href="https://english.stackexchange.com/questions/19967/what-does-google-fu-mean">Google-fu</a> has failed me.</p> <p>In Python, are the following two tests for equality equivalent?</p> <pre><code>n = 5 # Test one. if n == 5: print 'Yay!' # Test two. if n is 5: print 'Yay!' </code></pre> <p>Does th...
[ { "answer_id": 133017, "author": "stephenbayer", "author_id": 18893, "author_profile": "https://Stackoverflow.com/users/18893", "pm_score": 6, "selected": false, "text": "== is" }, { "answer_id": 133022, "author": "mmaibaum", "author_id": 12213, "author_profile": "htt...
2008/09/25
[ "https://Stackoverflow.com/questions/132988", "https://Stackoverflow.com", "https://Stackoverflow.com/users/61/" ]
133,002
<p>I am using Flex to connect to a Rest service. To access order #32, for instance, I can call the URL <a href="http://[service]/orders/32" rel="nofollow noreferrer">http://[service]/orders/32</a>. The URL <em>must</em> be configured as a destination - since the client will connect to different instances of the service...
[ { "answer_id": 134260, "author": "defmeta", "author_id": 10875, "author_profile": "https://Stackoverflow.com/users/10875", "pm_score": 0, "selected": false, "text": "<mx:HTTPService\n id=\"UCService\"\n result=\"UCServiceHandler(event)\" \n showBusyCursor=\"true\"\n resultFor...
2008/09/25
[ "https://Stackoverflow.com/questions/133002", "https://Stackoverflow.com", "https://Stackoverflow.com/users/450527/" ]
133,008
<p>What is Big O notation? Do you use it?</p> <p>I missed this university class I guess :D</p> <p>Does anyone use it and give some real life examples of where they used it?</p> <hr /> <h3>See also:</h3> <p><a href="https://stackoverflow.com/questions/107165/big-o-for-eight-year-olds">Big-O for Eight Year Olds?</a><br /...
[ { "answer_id": 133128, "author": "Steve g", "author_id": 12092, "author_profile": "https://Stackoverflow.com/users/12092", "pm_score": 3, "selected": false, "text": "/** Takes an array of strings and concatenates them\n * This is a silly way of doing things but it gets the \n * point a...
2008/09/25
[ "https://Stackoverflow.com/questions/133008", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3208/" ]
133,031
<p>I need to add a specific column if it does not exist. I have something like the following, but it always returns false:</p> <pre><code>IF EXISTS(SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'myTableName' AND COLUMN_NAME = 'myColumnName') </code></pre> <p>How ...
[ { "answer_id": 133041, "author": "Leon Tayson", "author_id": 18413, "author_profile": "https://Stackoverflow.com/users/18413", "pm_score": 6, "selected": false, "text": "IF NOT EXISTS(\n SELECT TOP 1 1\n FROM INFORMATION_SCHEMA.COLUMNS\n WHERE \n [TABLE_NAME] = 'Employees'\n AND...
2008/09/25
[ "https://Stackoverflow.com/questions/133031", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2631856/" ]
133,051
<p>The CSS rules <code>visibility:hidden</code> and <code>display:none</code> both result in the element not being visible. Are these synonyms?</p>
[ { "answer_id": 133059, "author": "mmaibaum", "author_id": 12213, "author_profile": "https://Stackoverflow.com/users/12213", "pm_score": 7, "selected": false, "text": "display:none visibility:hidden" }, { "answer_id": 133064, "author": "kemiller2002", "author_id": 1942, ...
2008/09/25
[ "https://Stackoverflow.com/questions/133051", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14749/" ]
133,081
<p>In MS SQL 2000 and 2005, given a datetime such as '2008-09-25 12:34:56' what is the most efficient way to get a datetime containing only '2008-09-25'?</p> <p>Duplicated <a href="https://stackoverflow.com/questions/2775/whats-the-best-way-to-remove-the-time-portion-of-a-datetime-value-sql-server">here</a>.</p>
[ { "answer_id": 133101, "author": "George Mastros", "author_id": 1408129, "author_profile": "https://Stackoverflow.com/users/1408129", "pm_score": 5, "selected": false, "text": "Select DateAdd(Day, DateDiff(Day, 0, GetDate()), 0)\n Select DateAdd(Year, DateDiff(Year, 0, GetDate()), 0)\nS...
2008/09/25
[ "https://Stackoverflow.com/questions/133081", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16881/" ]
133,087
<p>Note: not ASP.NET.</p> <p>I've read about various methods including using SOAPClient (is this part of the standard Windows 2003 install?), ServerXMLHTTP, and building up the XML from scratch and parsing the result manually.</p> <p>Has anyone ever done this? What did you use and would you recommend it?</p>
[ { "answer_id": 133366, "author": "pdavis", "author_id": 7819, "author_profile": "https://Stackoverflow.com/users/7819", "pm_score": 2, "selected": false, "text": "<% \n SoapUrl = \"http://www.yourdomain.com/yourwebservice.asmx\" \n set xmlhttp = CreateObject(\"MSXML2.ServerXMLHTTP\...
2008/09/25
[ "https://Stackoverflow.com/questions/133087", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9825/" ]
133,092
<p>I have an XPath expression which provides me a sequence of values like the one below:</p> <p><code>1 2 2 3 4 5 5 6 7</code></p> <p>This is easy to convert to a sequence of unique values <code>1 2 3 4 5 6 7</code> using <code>distinct-values()</code>. However, what I want to extract is the list of duplicate values = ...
[ { "answer_id": 134986, "author": "JeniT", "author_id": 6739, "author_profile": "https://Stackoverflow.com/users/6739", "pm_score": 2, "selected": false, "text": "distinct-values(\n for $item in $seq\n return if (count($seq[. eq $item]) > 1)\n then $item\n else ())\n dis...
2008/09/25
[ "https://Stackoverflow.com/questions/133092", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
133,111
<p>I need to increment a number in a source file from an Ant build script. I can use the <code><a href="http://ant.apache.org/manual/Tasks/replaceregexp.html" rel="nofollow noreferrer">ReplaceRegExp</a></code> task to find the number I want to increment, but how do I then increment that number within the <code>replace<...
[ { "answer_id": 133159, "author": "Yuval F", "author_id": 1702, "author_profile": "https://Stackoverflow.com/users/1702", "pm_score": 3, "selected": true, "text": "<propertyfile file=\"${version-file}\">\n <entry key=\"revision\" type=\"string\" operation=\"=\" value=\"${revision}\" />\n ...
2008/09/25
[ "https://Stackoverflow.com/questions/133111", "https://Stackoverflow.com", "https://Stackoverflow.com/users/270/" ]
133,122
<p>I want to make a .NET Form as a TopMost Form for another external App (not .NET related, pure Win32) so it stays above that Win32App, but not the rest of the apps running.</p> <p>I Have the handle of the Win32App (provided by the Win32App itself), and I've tried <a href="http://msdn.microsoft.com/en-us/library/ms63...
[ { "answer_id": 133415, "author": "Joel Lucsy", "author_id": 645, "author_profile": "https://Stackoverflow.com/users/645", "pm_score": 5, "selected": true, "text": "SetWindowLongPtr(win32window, GWLP_HWNDPARENT, formhandle)" }, { "answer_id": 133496, "author": "Ricardo Amores"...
2008/09/25
[ "https://Stackoverflow.com/questions/133122", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10136/" ]
133,129
<p>I use <em>Eclipse 3.3</em> in my daily work, and have also used <em>Eclipse 3.2</em> extensively as well. In both versions, sometimes the Search options (Java Search, File Search, etc) in the menu get disabled, seemingly at random times. However, with <kbd>Ctrl</kbd>+<kbd>H</kbd>, I am able to access the search fu...
[ { "answer_id": 12950138, "author": "mehmet", "author_id": 1755622, "author_profile": "https://Stackoverflow.com/users/1755622", "pm_score": 3, "selected": false, "text": "org.eclipse.search workspace/metadata/plugins" }, { "answer_id": 18730989, "author": "Eric L.", "auth...
2008/09/25
[ "https://Stackoverflow.com/questions/133129", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8026/" ]
133,154
<p>While normally it's good to always choose the right language for the job, it can sometimes be instructive to try and do something in a language which is wildly inappropriate.</p> <ol> <li>It can help you understand the problem better. Maybe you don't <em>have</em> to solve it the way you thought you did.</li> <li>...
[ { "answer_id": 133155, "author": "Cody Hatch", "author_id": 17086, "author_profile": "https://Stackoverflow.com/users/17086", "pm_score": 6, "selected": true, "text": "@echo off\nSETLOCAL ENABLEDELAYEDEXPANSION\n\ncall :qSort %*\nfor %%i in (%return%) do set results=!results! %%i\necho S...
2008/09/25
[ "https://Stackoverflow.com/questions/133154", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17086/" ]
133,173
<p>In a previous job we had a classic ASP application that no one wanted to migrate to ASP.NET. The things that it did, it did very well. </p> <p>However there was some new functionality that needed to be added that just seemed best suited to ASP.NET. The decision was made to allow the system to become a weird hybr...
[ { "answer_id": 69920723, "author": "eliteproxy", "author_id": 2948862, "author_profile": "https://Stackoverflow.com/users/2948862", "pm_score": 1, "selected": false, "text": " <system.webServer>\n <modules>\n <remove name=\"FormsAuthenticationModule\" />\n <add name=\"Forms...
2008/09/25
[ "https://Stackoverflow.com/questions/133173", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2173/" ]
133,194
<p>I am trying to make an Outlook 2003 add-in using Visual Studio 2008 on Windows XP SP3 and Internet Explorer 7.</p> <p>My add-in is using custom Folder Home Page which displays my custom form, which wraps Outlook View Control.</p> <p>I get COM Exception with 'Exception from HRESULT: 0xXXXXXXXX' description every ti...
[ { "answer_id": 139934, "author": "BKimmel", "author_id": 13776, "author_profile": "https://Stackoverflow.com/users/13776", "pm_score": 1, "selected": false, "text": "app.Session.Logon() \n app.ActiveExplorer()" }, { "answer_id": 158035, "author": "Nenad Dobrilovic", "auth...
2008/09/25
[ "https://Stackoverflow.com/questions/133194", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22062/" ]
133,204
<p>How do I get a list of the files checked out by users (including the usernames) using P4V or P4? </p> <p>I want to provide a depot location and see a list of any files under that location (including sub folders) that are checked out.</p>
[ { "answer_id": 133222, "author": "Iain", "author_id": 20457, "author_profile": "https://Stackoverflow.com/users/20457", "pm_score": 5, "selected": false, "text": "p4 opened -a //depot/Your/Location/...\n" }, { "answer_id": 133249, "author": "Mark", "author_id": 4405, ...
2008/09/25
[ "https://Stackoverflow.com/questions/133204", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20457/" ]
133,214
<p>We need to implement a simple state machine in <strong>C</strong>.<br> Is a standard switch statement the best way to go?<br> We have a current state (state) and a trigger for the transition.</p> <pre><code> switch(state) { case STATE_1: state = DoState1(transition); break; case STATE_2: state = ...
[ { "answer_id": 133301, "author": "Mark", "author_id": 4405, "author_profile": "https://Stackoverflow.com/users/4405", "pm_score": 2, "selected": false, "text": "static int current_state; // should always hold current state -- and probably be an enum or something\n\nvoid state_leave(in...
2008/09/25
[ "https://Stackoverflow.com/questions/133214", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10703/" ]
133,226
<p>how do i implement an eval script in a sever side control?</p> <p>eg. <code>&lt;a runat="server" href="?id=&lt;%= Eval("Id") %&gt;"&gt;hello world&lt;/a&gt;</code></p>
[ { "answer_id": 133252, "author": "Forgotten Semicolon", "author_id": 1960, "author_profile": "https://Stackoverflow.com/users/1960", "pm_score": 2, "selected": false, "text": "<%# Eval(\"Id\") %>" } ]
2008/09/25
[ "https://Stackoverflow.com/questions/133226", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11528/" ]
133,229
<p>I want to discover all xml files that my ClassLoader is aware of using a wildcard pattern. Is there any way to do this?</p>
[ { "answer_id": 133280, "author": "Steve B.", "author_id": 19479, "author_profile": "https://Stackoverflow.com/users/19479", "pm_score": -1, "selected": false, "text": "jar -tvf jarname | grep xml$" }, { "answer_id": 133450, "author": "corlettk", "author_id": 69224, "a...
2008/09/25
[ "https://Stackoverflow.com/questions/133229", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
133,236
<p>I am wanting to store the "state" of some actions the user is performing in a series of different ASP.Net webforms. What are my choices for persisting state, and what are the pros/cons of each solution?</p> <p>I have been using Session objects, and using some helper methods to strongly type the objects:</p> <pre>...
[ { "answer_id": 133259, "author": "Kamiel Wanrooij", "author_id": 4174, "author_profile": "https://Stackoverflow.com/users/4174", "pm_score": 3, "selected": false, "text": "Session" }, { "answer_id": 133274, "author": "Kamiel Wanrooij", "author_id": 4174, "author_profi...
2008/09/25
[ "https://Stackoverflow.com/questions/133236", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10589/" ]
133,243
<p>I want to have a <code>UIScrollView</code> with a set of subviews where each of these subviews has a <code>UITextView</code> with a different text. For this task, I have modified the <code>PageControl</code> example from the apple "iphone dev center" in order to add it a simple <code>UITextView</code> to the view wh...
[ { "answer_id": 156210, "author": "benzado", "author_id": 10947, "author_profile": "https://Stackoverflow.com/users/10947", "pm_score": 2, "selected": false, "text": "UITextView UIScrollView UIScrollViews" }, { "answer_id": 750977, "author": "filmore", "author_id": 91015, ...
2008/09/25
[ "https://Stackoverflow.com/questions/133243", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22154/" ]
133,270
<p>I would like to code a little program which visually illustrates the behavior of the <code>volatile</code> keyword. Ideally, it should be a program which performs concurrent access to a non volatile static field and which gets incorrect behavior because of that. </p> <p>Adding the volatile keyword in the same progr...
[ { "answer_id": 1284007, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 8, "selected": true, "text": "while (test.foo != 255) volatile class Test\n{\n /*volatile*/ int foo;\n\n static void Main()\n {\n var test =...
2008/09/25
[ "https://Stackoverflow.com/questions/133270", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4687/" ]
133,277
<p>I am moving from classic ASP to ASP.NET and have encountered what many of you already know as "viewstate". I might be jumping the gun with my assumption, but it looks highly cumbersome. I have developed many ASP forms in the past and never had issues with keeping state. Is there another way OR am I going to have ...
[ { "answer_id": 133342, "author": "CodeRedick", "author_id": 17145, "author_profile": "https://Stackoverflow.com/users/17145", "pm_score": 2, "selected": false, "text": "Viewstate[\"Key\"] = value;\n" }, { "answer_id": 20393875, "author": "Abdallah Daragmeh", "author_id": ...
2008/09/25
[ "https://Stackoverflow.com/questions/133277", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14728/" ]
133,281
<p>Has anyone tried the ActiveRecord <a href="http://www.castleproject.org/activerecord/gettingstarted/index.html" rel="nofollow noreferrer">Intro Sample</a> with C# 3.5? I somehow have the feeling that the sample is completely wrong or just out of date. The XML configuration is just plain wrong:</p> <pre><code>&lt;ad...
[ { "answer_id": 133305, "author": "Gilligan", "author_id": 12356, "author_profile": "https://Stackoverflow.com/users/12356", "pm_score": 0, "selected": false, "text": "hibernate." }, { "answer_id": 133324, "author": "Paul Batum", "author_id": 48281, "author_profile": "...
2008/09/25
[ "https://Stackoverflow.com/questions/133281", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21699/" ]
133,287
<p>I have a simple function that sends out emails, how would I go about using threads to speed email delivery?</p> <p>Sample code would be ideal.</p>
[ { "answer_id": 133321, "author": "Wolfwyrd", "author_id": 15570, "author_profile": "https://Stackoverflow.com/users/15570", "pm_score": 1, "selected": false, "text": "using System;\nusing System.Threading;\n\nclass Test\n{\n static void Main() \n {\n Thread newThread = new ...
2008/09/25
[ "https://Stackoverflow.com/questions/133287", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
133,308
<p>I'm new to CodeIgniter, and I need some help. I'd like to implement the following:</p> <ul> <li><p>View a user's profile via: http://localhost/profile/johndoe</p> </li> <li><p>Administrate a user's profile via: http://localhost/admin/profile/johndoe</p> </li> <li><p>Be able to accomplish even further processing via:...
[ { "answer_id": 133976, "author": "Christian Davén", "author_id": 12534, "author_profile": "https://Stackoverflow.com/users/12534", "pm_score": 4, "selected": true, "text": "index profile profile show edit create add" } ]
2008/09/25
[ "https://Stackoverflow.com/questions/133308", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18334/" ]
133,310
<p>I have a JavaScript widget which provides standard extension points. One of them is the <code>beforecreate</code> function. It should return <code>false</code> to prevent an item from being created. </p> <p>I've added an Ajax call into this function using jQuery:</p> <pre><code>beforecreate: function (node, target...
[ { "answer_id": 133327, "author": "Adam Bellaire", "author_id": 21632, "author_profile": "https://Stackoverflow.com/users/21632", "pm_score": 11, "selected": true, "text": "beforecreate: function (node, targetNode, type, to) {\n jQuery.ajax({\n url: 'http://example.com/catalog/c...
2008/09/25
[ "https://Stackoverflow.com/questions/133310", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2313/" ]
133,313
<p>I'm trying to design some tables to store some data, which has to be converted to different languages later. Can anybody provide some "best practices" or guidelines for this?</p> <p>Thanks</p>
[ { "answer_id": 133351, "author": "Ben Scheirman", "author_id": 3381, "author_profile": "https://Stackoverflow.com/users/3381", "pm_score": 5, "selected": true, "text": "Products\n----------\nid\nprice\n\nProducts_Translations\n----------------------\nproduct_id\nlocale\nname\ndescription...
2008/09/25
[ "https://Stackoverflow.com/questions/133313", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22016/" ]
133,325
<p>Is there a way to Minimize an external application that I don't have control over from with-in my Delphi application?</p> <p>for example notepad.exe, except the application I want to minimize will only ever have one instance.</p>
[ { "answer_id": 133530, "author": "Germán Estévez -Neftalí-", "author_id": 17487, "author_profile": "https://Stackoverflow.com/users/17487", "pm_score": 4, "selected": true, "text": "var \n Indicador :Integer;\nbegin \n // Find the window by Classname\n Indicador := FindWindow(PChar('...
2008/09/25
[ "https://Stackoverflow.com/questions/133325", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2098/" ]
133,328
<p>I have been asked to develop some usercontrols in ASP.NET that will at a later point be pulled into a SharePoint site as web parts. I am new to SharePoint and will not have access to a SharePoint server during the time I need to prototype these parts.</p> <p>Does anyone know of any reasons that this approach will n...
[ { "answer_id": 133438, "author": "Chris Cudmore", "author_id": 18907, "author_profile": "https://Stackoverflow.com/users/18907", "pm_score": 0, "selected": false, "text": "<SafeControl Assembly=\"MyControl, Version=1.0.0.0, Culture=neutral, PublicKeyToken=975cc42deafbee31\" Namespace=\"M...
2008/09/25
[ "https://Stackoverflow.com/questions/133328", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10552/" ]
133,357
<p>How do I find the name of the namespace or module 'Foo' in the filter below?</p> <pre><code>class ApplicationController &lt; ActionController::Base def get_module_name @module_name = ??? end end class Foo::BarController &lt; ApplicationController before_filter :get_module_name end </code></pre>
[ { "answer_id": 133396, "author": "Daniel Lucraft", "author_id": 11951, "author_profile": "https://Stackoverflow.com/users/11951", "pm_score": 4, "selected": false, "text": " def get_module_name\n @module_name = self.class.to_s.split(\"::\").first\n end\n" }, { "answer_id": 1...
2008/09/25
[ "https://Stackoverflow.com/questions/133357", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21872/" ]
133,364
<p>Which is your favorite way to go with strings in C++? A C-style array of <code>char</code>s? Or <code>wchar_t</code>? <code>CString</code>, <code>std::basic_string</code>, <code>std::string</code>, <code>BSTR</code> or <code>CComBSTR</code>?</p> <p>Certainly each of these has its own area of application, but anyway...
[ { "answer_id": 133422, "author": "xtofl", "author_id": 6610, "author_profile": "https://Stackoverflow.com/users/6610", "pm_score": 2, "selected": false, "text": "std::string basic_string<TCHAR> CStringT printf" } ]
2008/09/25
[ "https://Stackoverflow.com/questions/133364", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19024/" ]
133,374
<p>When trying to call Close or Dispose on an SqlDataReader i get a timeout expired exception. If you have a DbConnection to SQL Server, you can reproduce it yourself with:</p> <pre><code>String CRLF = "\r\n"; String sql = "SELECT * " + CRLF + "FROM (" + CRLF + " SELECT (a.Number * 256) + b.Number AS Nu...
[ { "answer_id": 133433, "author": "MADMap", "author_id": 17558, "author_profile": "https://Stackoverflow.com/users/17558", "pm_score": 0, "selected": false, "text": "DbDataReader rdr = cmd.ExecuteReader();\nwhile(rdr.Read())\n{\n int index = rdr.GetInt32(0);\n}\n" }, { "answer_...
2008/09/25
[ "https://Stackoverflow.com/questions/133374", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12597/" ]
133,379
<p>I'm trying to install a service using InstallUtil.exe but invoked through <code>Process.Start</code>. Here's the code:</p> <pre><code>ProcessStartInfo startInfo = new ProcessStartInfo (m_strInstallUtil, strExePath); System.Diagnostics.Process.Start (startInfo); </code></pre> <p>where <code>m_strInstallUtil</code> ...
[ { "answer_id": 133478, "author": "Vijesh VP", "author_id": 22016, "author_profile": "https://Stackoverflow.com/users/22016", "pm_score": 1, "selected": false, "text": "WindowsIdentity identity = new WindowsIdentity(accessToken);\nWindowsImpersonationContext context = identity.Impersonate...
2008/09/25
[ "https://Stackoverflow.com/questions/133379", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1683/" ]
133,390
<p>I want to use forms authentication in my asp.net mvc site.</p> <p>Can I use an already existing sql db (on a remote server) for it? How do I configure the site to use this db for authentication? Which tables do I need/are used for authentication?</p>
[ { "answer_id": 133432, "author": "Biri", "author_id": 968, "author_profile": "https://Stackoverflow.com/users/968", "pm_score": 3, "selected": true, "text": "aspnet_regsql.exe sqlexportonly <connectionStrings>\n <add name=\"MyLocalSQLServer\" connectionString=\"Initial Catalog=aspne...
2008/09/25
[ "https://Stackoverflow.com/questions/133390", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9632/" ]
133,394
<p>I am developing a Joomla component and one of the views needs to render itself as PDF. In the view, I have tried setting the content-type with the following line, but when I see the response, it is text/html anyways.</p> <pre><code>header('Content-type: application/pdf'); </code></pre> <p>If I do this in a regular...
[ { "answer_id": 134827, "author": "Tomalak", "author_id": 18771, "author_profile": "https://Stackoverflow.com/users/18771", "pm_score": 5, "selected": true, "text": "$doc =& JFactory::getDocument();\n$doc->setMimeEncoding('application/pdf');\n" }, { "answer_id": 13920887, "aut...
2008/09/25
[ "https://Stackoverflow.com/questions/133394", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2680/" ]
133,430
<p>I have created a web reference (Add Web Reference) from Visual Studio 2008 and strangely, I need to set the <em>propertyNameField</em>Specified to true for all the fields I want to submit. Failure to do that and values are not passed back to the WCF Service. </p> <p>I have read at several places that this was fixed...
[ { "answer_id": 133498, "author": "Sebastien Lachance", "author_id": 201997, "author_profile": "https://Stackoverflow.com/users/201997", "pm_score": 0, "selected": false, "text": "[DataContract]\npublic class BrowserBase : IBrowser\n{\n\n [DataMember]\n public BrowserType BrowserTyp...
2008/09/25
[ "https://Stackoverflow.com/questions/133430", "https://Stackoverflow.com", "https://Stackoverflow.com/users/201997/" ]
133,436
<p>I'm using Java 6, Tomcat 6, and Metro. I use WebService and WebMethod annotations to expose my web service. I would like to obtain information about the request. I tried the following code, but wsCtxt is always null. What step must I take to <em>not</em> get null for the WebServiceContext.</p> <p>In other words: ho...
[ { "answer_id": 133565, "author": "James A Wilson", "author_id": 13892, "author_profile": "https://Stackoverflow.com/users/13892", "pm_score": 5, "selected": true, "text": "@Resource(name=\"wsContext\") WebServiceContext wsCtxt;" }, { "answer_id": 139169, "author": "Steve McLe...
2008/09/25
[ "https://Stackoverflow.com/questions/133436", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2959/" ]
133,442
<p>Our server application is listening on a port, and after a period of time it no longer accepts incoming connections. (And while I'd love to solve this issue, it's not what I'm asking about here;)</p> <p>The strange this is that when our app stops accepting connections on port 44044, so does IIS (on port 8080). Ki...
[ { "answer_id": 133466, "author": "RichS", "author_id": 6247, "author_profile": "https://Stackoverflow.com/users/6247", "pm_score": 2, "selected": false, "text": "netstat -a" }, { "answer_id": 134548, "author": "stephbu", "author_id": 12702, "author_profile": "https://...
2008/09/25
[ "https://Stackoverflow.com/questions/133442", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16662/" ]
133,453
<p>Does IPsec in Windows XP Sp3 support AES-256 encryption?</p> <p><strong>Update:</strong></p> <ol> <li>Windows IPsec FAQ says that it's not supported in Windows XP, but maybe they changed it in Service Pack 3?<br> http://www.microsoft.com/technet/network/ipsec/ipsecfaq.mspx<br> Question: <em>Is Advanced Encryptio...
[ { "answer_id": 133466, "author": "RichS", "author_id": 6247, "author_profile": "https://Stackoverflow.com/users/6247", "pm_score": 2, "selected": false, "text": "netstat -a" }, { "answer_id": 134548, "author": "stephbu", "author_id": 12702, "author_profile": "https://...
2008/09/25
[ "https://Stackoverflow.com/questions/133453", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22174/" ]
133,487
<p>I have a LinkedList, where Entry has a member called id. I want to remove the Entry from the list where id matches a search value. What's the best way to do this? I don't want to use Remove(), because Entry.Equals will compare other members, and I only want to match on id. I'm hoping to do something kind of like...
[ { "answer_id": 133577, "author": "Matt Howells", "author_id": 16881, "author_profile": "https://Stackoverflow.com/users/16881", "pm_score": 3, "selected": true, "text": "list.Remove(list.First(e => e.id == searchId));\n" }, { "answer_id": 133946, "author": "munificent", "...
2008/09/25
[ "https://Stackoverflow.com/questions/133487", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2348/" ]
133,493
<p>How can you check if a string is a valid GUID in vbscript? Has anyone written an IsGuid method?</p>
[ { "answer_id": 1042813, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": -1, "selected": false, "text": "try\n{\n Guid g = new Guid(stringGuid);\n safeUseGuid(stringGuid); //this statement will execute only if guid is correct\n...
2008/09/25
[ "https://Stackoverflow.com/questions/133493", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10023/" ]
133,515
<p>I am using <a href="http://msdn.microsoft.com/en-us/library/bb386987.aspx" rel="noreferrer">SqlMetal</a> to general my DataContext.dbml class for my ASP.net application using LinqToSql. When I initially created the DataContext.dbml file, Visual Studio used this to create a related DataContext.designer.cs file. This ...
[ { "answer_id": 134670, "author": "DamienG", "author_id": 5720, "author_profile": "https://Stackoverflow.com/users/5720", "pm_score": 4, "selected": true, "text": "sqlmetal /code:DataContext.designer.cs /language:csharp DataContext.dbml\n" }, { "answer_id": 7165688, "author": ...
2008/09/25
[ "https://Stackoverflow.com/questions/133515", "https://Stackoverflow.com", "https://Stackoverflow.com/users/51/" ]
133,558
<p>I want to log user's actions in my Ruby on Rails application.</p> <p>So far, I have a model observer that inserts logs to the database after updates and creates. In order to store which user performed the action that was logged, I require access to the session but that is problematic.</p> <p>Firstly, it breaks the...
[ { "answer_id": 136389, "author": "Orion Edwards", "author_id": 234, "author_profile": "https://Stackoverflow.com/users/234", "pm_score": 3, "selected": false, "text": "class MyObserverClass < ActiveRecord::Observer\n cattr_accessor :current_user # GLOBAL VARIABLE. RELIES ON RAILS BEING ...
2008/09/25
[ "https://Stackoverflow.com/questions/133558", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6291/" ]
133,559
<p>I am writing a Windows service that pulls messages from an MSMQ and posts them to a legacy system (Baan). If the post fails or the machine goes down during the post, I don't want to loose the message. I am therefore using MSMQ transactions. I abort on failure, and I commit on success.</p> <p>When working against a ...
[ { "answer_id": 133654, "author": "Maurice", "author_id": 19676, "author_profile": "https://Stackoverflow.com/users/19676", "pm_score": 2, "selected": false, "text": "MessageQueue queue = new MessageQueue(\"myqueue\");\nusing (TransactionScope tx = new TransactionScope()) {\n Message m...
2008/09/25
[ "https://Stackoverflow.com/questions/133559", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7668/" ]
133,569
<p>I usually use C++ stdlib map whenever I need to store some data associated with a specific type of value (a key value - e.g. a string or other object). The stdlib map implementation is based on trees which provides better performance (O(log n)) than the standard array or stdlib vector.</p> <p>My questions is, do yo...
[ { "answer_id": 133591, "author": "C. K. Young", "author_id": 13, "author_profile": "https://Stackoverflow.com/users/13", "pm_score": 7, "selected": true, "text": "<unordered_map> <unordered_set> std::unordered_map std::unordered_set std::tr1::unordered_map std::tr1::unordered_set <tr1/un...
2008/09/25
[ "https://Stackoverflow.com/questions/133569", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20317/" ]
133,571
<p>Wanted to convert</p> <pre><code>&lt;br/&gt; &lt;br/&gt; &lt;br/&gt; &lt;br/&gt; &lt;br/&gt; </code></pre> <p>into</p> <pre><code>&lt;br/&gt; </code></pre>
[ { "answer_id": 133593, "author": "mdec", "author_id": 15534, "author_profile": "https://Stackoverflow.com/users/15534", "pm_score": 2, "selected": false, "text": "<br/> <br/>" }, { "answer_id": 133600, "author": "levik", "author_id": 4465, "author_profile": "https://S...
2008/09/25
[ "https://Stackoverflow.com/questions/133571", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20907/" ]
133,596
<p>Is there a way to make a Radio Button enabled/disabled (not checked/unchecked) via CSS? </p> <p>I've need to toggle some radio buttons on the client so that the values can be read on the server, but setting the 'enabled' property to 'false' then changing this on the client via javascript seems to prevent me from po...
[ { "answer_id": 133617, "author": "neuroguy123", "author_id": 12529, "author_profile": "https://Stackoverflow.com/users/12529", "pm_score": 3, "selected": false, "text": "$('#radiobuttonname').attr('disabled', 'true');\n document.getElementById(id).disabled = true;\n" }, { "answer...
2008/09/25
[ "https://Stackoverflow.com/questions/133596", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6624/" ]
133,601
<p>Is it possible to write a regular expression that matches a nested pattern that occurs an unknown number of times? For example, can a regular expression match an opening and closing brace when there are an unknown number of open/close braces nested within the outer braces?</p> <p>For example:</p> <pre><code>public...
[ { "answer_id": 133771, "author": "Zsolt Botykai", "author_id": 11621, "author_profile": "https://Stackoverflow.com/users/11621", "pm_score": 5, "selected": false, "text": "my $NesteD ;\n$NesteD = qr/ \\{( [^{}] | (??{ $NesteD }) )* \\} /x ;\n\nif ( $Stringy =~ m/\\b( \\w+$NesteD )/x ) {\...
2008/09/25
[ "https://Stackoverflow.com/questions/133601", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1199234/" ]
133,610
<p>Ok, this is another one in the theory realm for the CS guys around.</p> <p>In the 90's I did fairly well in implementing BST's. The only thing I could never get my head around was the intricacy of the algorithm to balance a Binary Tree (AVL).</p> <p>Can you guys help me on this?</p>
[ { "answer_id": 267453, "author": "mscccc", "author_id": 2510, "author_profile": "https://Stackoverflow.com/users/2510", "pm_score": 2, "selected": false, "text": "IF tree is right heavy\n{\n IF tree's right subtree is left heavy\n {\n Perform Double Left rotation \n }\n ELSE\n {...
2008/09/25
[ "https://Stackoverflow.com/questions/133610", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8167/" ]
133,626
<p>I am using Vim for windows installed in Unix mode. Thanks to this site I now use the <code>gf</code> command to go to a file under the cursor.</p> <p>I'm looking for a command to either:</p> <ol> <li>return to the previous file (similar to <kbd>Ctrl</kbd>+<kbd>T</kbd> for ctags), or </li> <li>remap <code>gf</code...
[ { "answer_id": 133634, "author": "tzot", "author_id": 6899, "author_profile": "https://Stackoverflow.com/users/6899", "pm_score": 4, "selected": false, "text": ":e#↲" }, { "answer_id": 133661, "author": "paxdiablo", "author_id": 14860, "author_profile": "https://Stack...
2008/09/25
[ "https://Stackoverflow.com/questions/133626", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5823/" ]
133,648
<p>I want to insert say 50,000 records into sql server database 2000 at a time. How to accomplish this?</p>
[ { "answer_id": 133687, "author": "Galwegian", "author_id": 3201, "author_profile": "https://Stackoverflow.com/users/3201", "pm_score": 0, "selected": false, "text": "declare @index integer\nset @index = 0\nwhile @index < 50000\nbegin\n insert into table\n values (x,y,z)\n set @inde...
2008/09/25
[ "https://Stackoverflow.com/questions/133648", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1688440/" ]
133,660
<p>I need to create a directory on a mapped network drive. I am using a code:</p> <pre><code>DirectoryInfo targetDirectory = new DirectoryInfo(path); if (targetDirectory != null) { targetDirectory.Create(); } </code></pre> <p>If I specify the path like "\\\\ServerName\\Directory", it all goes OK. If I map the "\\...
[ { "answer_id": 23087325, "author": "IAmGroot", "author_id": 940834, "author_profile": "https://Stackoverflow.com/users/940834", "pm_score": 4, "selected": false, "text": "R:/ \\\\myserver\\files\\myapp\\ \"R:/\" + \"photos\" \"\\\\myserver\\files\\myapp\\\" + \"photos\"" } ]
2008/09/25
[ "https://Stackoverflow.com/questions/133660", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
133,671
<p>In my ASP.net MVC app I have a view that looks like this:</p> <pre><code>... &lt;label&gt;Due Date&lt;/label&gt; &lt;%=Html.TextBox("due")%&gt; ... </code></pre> <p>I am using a <code>ModelBinder</code> to bind the post to my model (the due property is of <code>DateTime</code> type). The problem is when I put "01/...
[ { "answer_id": 134097, "author": "Switters", "author_id": 1860358, "author_profile": "https://Stackoverflow.com/users/1860358", "pm_score": 1, "selected": false, "text": "public partial class SomethingView : ViewPage<T>\n{\n}\n public ActionResult Something(){\n T myObject = new T();\...
2008/09/25
[ "https://Stackoverflow.com/questions/133671", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1736/" ]
133,675
<p>I need to implement red eye reduction for an application I am working on.</p> <p>Googling mostly provides links to commercial end-user products.</p> <p>Do you know a good red eye reduction algorithm, which could be used in a GPL application?</p>
[ { "answer_id": 718648, "author": "Benry", "author_id": 28408, "author_profile": "https://Stackoverflow.com/users/28408", "pm_score": 6, "selected": true, "text": "//Value of red divided by average of blue and green:\nPixel pixel = image.getPixel(x,y);\nfloat redIntensity = ((float)pixel....
2008/09/25
[ "https://Stackoverflow.com/questions/133675", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20107/" ]
133,680
<p>When I am using Bitvise Tunnelier and I spawn a new xterm window connecting to our sun station everything works nicely. We have visual slick edit installed on the sun station and I have been instructed to open it using the command vs&amp;. When I do this I get the following:</p> <pre><code>fbm240-1:/home/users/ajah...
[ { "answer_id": 133736, "author": "tzot", "author_id": 6899, "author_profile": "https://Stackoverflow.com/users/6899", "pm_score": 0, "selected": false, "text": "xhost +" } ]
2008/09/25
[ "https://Stackoverflow.com/questions/133680", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5831/" ]
133,686
<p>I'd like to find a way to determine how long each function in PHP, and each file in PHP is taking to run. I've got an old legacy PHP application that I'm trying to find the "rough spots" in and so I'd like to locate which routines and pages are taking a very long time to load, objectively. </p> <p>Are there any pr...
[ { "answer_id": 3356079, "author": "petsagouris", "author_id": 140734, "author_profile": "https://Stackoverflow.com/users/140734", "pm_score": 3, "selected": false, "text": "javascript:if(document.URL.indexOf('XDEBUG_PROFILE')<1){var%20sep=document.URL.indexOf('?');sep%20=%20(sep<1)?'?':'...
2008/09/25
[ "https://Stackoverflow.com/questions/133686", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21973/" ]