qid
int64
4
19.1M
question
stringlengths
18
48.3k
answers
list
date
stringlengths
10
10
metadata
list
313,643
<p>How can I differentiate a Workflow system from a normal application that automates some work? Are there any specific feature a system must have to be categorized as a workflow system?</p>
[ { "answer_id": 313716, "author": "Eugene Yokota", "author_id": 3827, "author_profile": "https://Stackoverflow.com/users/3827", "pm_score": 0, "selected": false, "text": "*participant = resource (human or machine)\n" } ]
2008/11/24
[ "https://Stackoverflow.com/questions/313643", "https://Stackoverflow.com", "https://Stackoverflow.com/users/74340/" ]
313,649
<p>When I publish my ASP.NET site in RELEASE mode, and set compilation debug="false", will my ASP.NET and System.Diagnostics Tracing still work?</p>
[ { "answer_id": 313654, "author": "tvanfosson", "author_id": 12950, "author_profile": "https://Stackoverflow.com/users/12950", "pm_score": 2, "selected": true, "text": "<configuration>\n <system.web>\n <trace enabled=\"true\" requestLimit=\"40\" localOnly=\"false\"/>\n </system.web>\n</c...
2008/11/24
[ "https://Stackoverflow.com/questions/313649", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22702/" ]
313,652
<p>I have a self-developed program which I want to use as the default opening tool for .jpg and .bmp files. How can I achieve the goal progrmmatically? </p> <p>Some said that I have to add some registry entries. But I don't konw exactly what I should do. Can anyone tell me the method?</p> <p>Thank you!</p>
[ { "answer_id": 313689, "author": "schnaader", "author_id": 34065, "author_profile": "https://Stackoverflow.com/users/34065", "pm_score": 0, "selected": false, "text": "[HKEY_CLASSES_ROOT\\.txt]\n@=\"textfile\"\n\n[HKEY_CLASSES_ROOT\\textfile\\shell\\open\\command]\n@=\"C:\\\\WINDOWS\\\\N...
2008/11/24
[ "https://Stackoverflow.com/questions/313652", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26404/" ]
313,653
<p>Is there a way to set "work offline" in TFS without having to try opening a solution, waiting for it to time out, and then having Visual Studio work out that it has failed?</p> <p>It seems a touch ridiculous that I can't just tick a box to tell it myself, seeing as I'm probably the one most qualified to know when I...
[ { "answer_id": 2271119, "author": "Richard Berg", "author_id": 74439, "author_profile": "https://Stackoverflow.com/users/74439", "pm_score": 4, "selected": true, "text": "C:\\Users\\Richard> tfpt tweakui /?\ntfpt tweakui - Enhance how client connects to Team Foundation Server\n\nAllows c...
2008/11/24
[ "https://Stackoverflow.com/questions/313653", "https://Stackoverflow.com", "https://Stackoverflow.com/users/192/" ]
313,693
<p>I want to run program on background . pref C# I want put icon in the tray. On specified time it’s synchronizes folders (I know how to sync folders) . How to run it on background and start sync ( for example at 2am)?</p>
[ { "answer_id": 313705, "author": "Vincent Van Den Berghe", "author_id": 39259, "author_profile": "https://Stackoverflow.com/users/39259", "pm_score": 1, "selected": false, "text": "Form.Visible = False\nForm.ShowInTaskbar = False\n" }, { "answer_id": 11197360, "author": "user...
2008/11/24
[ "https://Stackoverflow.com/questions/313693", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
313,712
<p>I have to call ping from c++ code.I'd like to easily read the output for further utilizations.</p> <p>I have come up with two solutions:</p> <ul> <li>use a fork and a pipe, redirect ping output to the pipe and then parse it</li> <li>find a library suited for the purpose to use a ping(ip_addresss) function directly...
[ { "answer_id": 313760, "author": "orip", "author_id": 37020, "author_profile": "https://Stackoverflow.com/users/37020", "pm_score": 2, "selected": false, "text": "ping4 ping6 popen(2) pipe fork exec" }, { "answer_id": 15573612, "author": "omeraygor", "author_id": 969263, ...
2008/11/24
[ "https://Stackoverflow.com/questions/313712", "https://Stackoverflow.com", "https://Stackoverflow.com/users/38507/" ]
313,718
<p>While working on an existing project I suddenly got the following error when trying to compile the solution:</p> <p><em>error MSB3105: The item "[filename]" was specified more than once in the "Resources" parameter. Duplicate items are not supported by the "Resources" parameter.</em></p> <p>Now, as far as I'm awar...
[ { "answer_id": 59934672, "author": "Xav987", "author_id": 2546739, "author_profile": "https://Stackoverflow.com/users/2546739", "pm_score": 1, "selected": false, "text": "MyFile.cs myFile.cs" } ]
2008/11/24
[ "https://Stackoverflow.com/questions/313718", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4313/" ]
313,729
<ul> <li>How can we implement the Builder pattern of <a href="http://developers.sun.com/learning/javaoneonline/2006/coreplatform/TS-1512.pdf?" rel="noreferrer">Joshua's Effective Java</a> in C#?</li> </ul> <p>Below is the code I have tried, is there a better way to do this?</p> <pre><code> public class NutritionFa...
[ { "answer_id": 313747, "author": "Jon Skeet", "author_id": 22656, "author_profile": "https://Stackoverflow.com/users/22656", "pm_score": 5, "selected": false, "text": "public sealed class SomeMessage\n{\n public string Name { get; private set; }\n public int Age { get; private set; }\n...
2008/11/24
[ "https://Stackoverflow.com/questions/313729", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26036/" ]
313,737
<p>For a certain inputform, I'd like to make it possible to do input with the keyboard. I know how to read the keys through KeyPressed and KeyUp, but the problem is that when a control has got the focus and the user presses the Enter key, that control receives the a Click event. Is it possible to prevent that behavio...
[ { "answer_id": 313795, "author": "Vincent Van Den Berghe", "author_id": 39259, "author_profile": "https://Stackoverflow.com/users/39259", "pm_score": 2, "selected": false, "text": "Form.KeyPreview = True\n e.Handled = True\n" } ]
2008/11/24
[ "https://Stackoverflow.com/questions/313737", "https://Stackoverflow.com", "https://Stackoverflow.com/users/34723/" ]
313,746
<p>I am mulling over a web-app in Perl that will allow users to create bug monitors. So essentially each &quot;bug watch&quot; will be a bug ID that will be passed to a sub routine along with the &quot;sleep&quot; time, and once the &quot;sleep time&quot; is over it must recur without blocking the parent process or th...
[ { "answer_id": 314510, "author": "converter42", "author_id": 28974, "author_profile": "https://Stackoverflow.com/users/28974", "pm_score": 2, "selected": false, "text": "$cron->add_entry(\n '* * * * *',\n subroutine => \\&mysub,\n arguments => \\@data,\n);\n my $var = 42;\nmy @a...
2008/11/24
[ "https://Stackoverflow.com/questions/313746", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
313,753
<p>I have a incoming stream of bytes (unsigned char) from either a file or network. I need this data placed in a class, and is looking for a NET-way of doing this. </p> <p>I bet some does this all the time, so I guess there is a better method to do this than using BitConverter. </p> <p>I realize I supplied too litle ...
[ { "answer_id": 313823, "author": "netadictos", "author_id": 31791, "author_profile": "https://Stackoverflow.com/users/31791", "pm_score": 1, "selected": false, "text": " [Serializable]\n [XmlRoot(\"CONFIGURATION\")]\n public class Configuration\n {\n EnterpriseCollection ...
2008/11/24
[ "https://Stackoverflow.com/questions/313753", "https://Stackoverflow.com", "https://Stackoverflow.com/users/37583/" ]
313,754
<p>What is your preferred way of keeping controls centered on its parent when the parent change width or height? </p>
[ { "answer_id": 313867, "author": "mj2008", "author_id": 5544, "author_profile": "https://Stackoverflow.com/users/5544", "pm_score": 0, "selected": false, "text": "procedure TMyForm.FormResize(Sender: TObject);\nvar\n nNewTop : Integer;\nbegin\n inherited;\n pnlRegenerating.Left := (Cl...
2008/11/24
[ "https://Stackoverflow.com/questions/313754", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11956/" ]
313,769
<p>What is best way to allow user to pick date from a mobile device from usability prospective?</p>
[ { "answer_id": 1296513, "author": "davewasthere", "author_id": 376, "author_profile": "https://Stackoverflow.com/users/376", "pm_score": 3, "selected": true, "text": "DateTime.TryParse(String, out DateTime)" } ]
2008/11/24
[ "https://Stackoverflow.com/questions/313769", "https://Stackoverflow.com", "https://Stackoverflow.com/users/191/" ]
313,778
<p>I have a project that has a makefile with broken dependencies. Is there any best known way to generate a list of dependencies for the project that I can use in the makefile, other than examining each source file by hand or with a hand written perl script?</p>
[ { "answer_id": 313787, "author": "Stefan Mai", "author_id": 13257, "author_profile": "https://Stackoverflow.com/users/13257", "pm_score": 7, "selected": true, "text": "g++ -MM <your file> # Add .d to Make's recognized suffixes.\nSUFFIXES += .d\n\n#We don't need to clean up when we're mak...
2008/11/24
[ "https://Stackoverflow.com/questions/313778", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1084/" ]
313,781
<p>I am working on localization for an app where custom patterns are used to format the date-time.</p> <p>one example is: dd-MM HH:mm</p> <p>I need to get localized versions of this custom format for dates, so that I get the date using numbers, and the time, basically using the local order (dd MM or MM dd) and the l...
[ { "answer_id": 313809, "author": "netadictos", "author_id": 31791, "author_profile": "https://Stackoverflow.com/users/31791", "pm_score": 2, "selected": false, "text": "DateTime.Now.ToString(new System.Globalization.CultureInfo(Thread.CurrentThread.CurrentCulture.Name));\n DateTime.Now.T...
2008/11/24
[ "https://Stackoverflow.com/questions/313781", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1090/" ]
313,786
<p>Hej, </p> <p>assuming I have a code that looks like this:</p> <pre><code>List&lt;User&gt; userList = GetUserByName (u =&gt; u.Name == name); DoSomethingWithTheUsers (userList.ToArray ()); </code></pre> <p>Now I want to know the type of the objects in the Array in the method <em>DoSomethingWithTheUsers (object[] m...
[ { "answer_id": 313790, "author": "Barry Kelly", "author_id": 3712, "author_profile": "https://Stackoverflow.com/users/3712", "pm_score": 5, "selected": true, "text": "myObjects.GetType().GetElementType()\n" } ]
2008/11/24
[ "https://Stackoverflow.com/questions/313786", "https://Stackoverflow.com", "https://Stackoverflow.com/users/33111/" ]
313,792
<p>I'm using a Delphi 2009 VCL TProgressBar as a kind of "empty/full" gauge.</p> <p>On Vista, with Aero theme enabled, this has an animation associated with it, which is annoying and inappropriate for an gauge.</p> <p>Is there any way of disabling this (NOT by adjusting user's theme settings!) to prevent the animatio...
[ { "answer_id": 315742, "author": "Tim Knipe", "author_id": 10493, "author_profile": "https://Stackoverflow.com/users/10493", "pm_score": 3, "selected": false, "text": "SetWindowTheme(ProgressBar.Handle, ' ', ' ');\n" } ]
2008/11/24
[ "https://Stackoverflow.com/questions/313792", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1737/" ]
313,794
<p>I would like to automate the deployment of my SSIS and SSAS artifacts to remote development SQL Server 2005 &amp; 2008 instances on a scheduled basis. </p> <p>What would be the best solution for this? I am using TFS 2008 as the source control system, so I'd like to integrate the solution with MSBuild and a schedu...
[ { "answer_id": 5189822, "author": "Darren", "author_id": 6065, "author_profile": "https://Stackoverflow.com/users/6065", "pm_score": 2, "selected": false, "text": " <Project DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n <Target Name=\...
2008/11/24
[ "https://Stackoverflow.com/questions/313794", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5132/" ]
313,796
<p>How can you get castle Windsor to choose the right implantation of a interface at run time when you have multiple implementations in the container.</p> <p>For example lets say i have a simple interface called IExamCalc that does calculations to work out how someone did in that exam.</p> <p>No we have several imple...
[ { "answer_id": 313804, "author": "kͩeͣmͮpͥ ͩ", "author_id": 26479, "author_profile": "https://Stackoverflow.com/users/26479", "pm_score": 1, "selected": false, "text": "container.Resolve<IExamCalc>" }, { "answer_id": 313851, "author": "mookid8000", "author_id": 6560, ...
2008/11/24
[ "https://Stackoverflow.com/questions/313796", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1213936/" ]
313,805
<p>I don't want to have the user install Google Gears so I can show him his guessed location. Is there a way to get the location without having to use Google Gears?</p> <p>I have found <a href="http://www.wipmania.com/de/blog/google-geolocation-api/" rel="noreferrer">http://www.wipmania.com/de/blog/google-geolocation-...
[ { "answer_id": 313812, "author": "Stefan Mai", "author_id": 13257, "author_profile": "https://Stackoverflow.com/users/13257", "pm_score": 4, "selected": true, "text": "<?php\n if(isset($_GET[\"ip\"])){\n echo geolocate($_GET[\"ip\"]);\n }\n\n function geolocate($ip){\n $raw_html = fi...
2008/11/24
[ "https://Stackoverflow.com/questions/313805", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19929/" ]
313,813
<pre><code>&lt;?php class Box { var $contents; function Box($contents) { $this-&amp;gt;contents = $contents; } function get_whats_inside() { return $this-&amp;gt;contents; } } ?&gt; </code></pre> <p>I am going through a OO tutorial. I am familiar with PHP and the concept of OO but...
[ { "answer_id": 313817, "author": "schnaader", "author_id": 34065, "author_profile": "https://Stackoverflow.com/users/34065", "pm_score": 0, "selected": false, "text": "$this->contents = $contents;\nreturn $this->contents;\n $this-&gt;contents = $contents;\nreturn $this-&gt;contents;\n" ...
2008/11/24
[ "https://Stackoverflow.com/questions/313813", "https://Stackoverflow.com", "https://Stackoverflow.com/users/31677/" ]
313,822
<p>How do you modify a propertygrid at runtime in every way? I want to be able to add and remove properties and add "dynamic types", what I mean with that is a type that result in a runtime generated dropdown in the propertygrid using a TypeConverter.</p> <p>I have actually been able to do both those things (add/remov...
[ { "answer_id": 314025, "author": "salle55", "author_id": 39636, "author_profile": "https://Stackoverflow.com/users/39636", "pm_score": 3, "selected": false, "text": "myProperties.Add(new CustomProperty(\"Custom\", \"\", typeof(States), false, true));\n\n[TypeConverter(typeof(StatesList))...
2008/11/24
[ "https://Stackoverflow.com/questions/313822", "https://Stackoverflow.com", "https://Stackoverflow.com/users/39636/" ]
313,824
<p>all! Typing from Italy This little piece of code works if the matrix size is less then 800 and fails with a segmentation fault for higher sizes.... I have tried it with gcc 4.3.2 compiler in linux and macosx and VisualStudio compiler in windows. Seemsthe problem is in the stack size..... how can I increase it ? How ...
[ { "answer_id": 403341, "author": "eyberg", "author_id": 39110, "author_profile": "https://Stackoverflow.com/users/39110", "pm_score": 0, "selected": false, "text": "'ulimit -s newstacksize'" } ]
2008/11/24
[ "https://Stackoverflow.com/questions/313824", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
313,831
<p>I'm trying to use powershell to configure the account credentials, but I need to grant the account "Log on as a service" right in order for it to work. How can I do this in powershell?</p>
[ { "answer_id": 21235462, "author": "grenade", "author_id": 68115, "author_profile": "https://Stackoverflow.com/users/68115", "pm_score": 5, "selected": false, "text": "<#\n.Synopsis\n Grant logon as a service right to the defined user.\n.Parameter computerName\n Defines the name of the...
2008/11/24
[ "https://Stackoverflow.com/questions/313831", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7618/" ]
313,839
<p>I recently had a problem during the deployment of a windows service. Four computers did not cause any problems, but on the fifth any attempt to start the service failed due to an exception. The exception stack trace is written to the event log, so I though it should be easy to identify the cause:</p> <pre><code>pro...
[ { "answer_id": 314118, "author": "MusiGenesis", "author_id": 14606, "author_profile": "https://Stackoverflow.com/users/14606", "pm_score": 2, "selected": false, "text": "System.Diagnostics.EventLog log = \n new System.Diagnostics.EventLog(\"YourLogNameHere\");\nlog.ModifyOverflowPolic...
2008/11/24
[ "https://Stackoverflow.com/questions/313839", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22114/" ]
313,848
<p>I have a space delimited list of files names, where spaces in the file names are prefixed by '\'</p> <p>e.g. "first\ file second\ file"</p> <p>How can I get my regex to match each file name?</p>
[ { "answer_id": 313857, "author": "Stefan Mai", "author_id": 13257, "author_profile": "https://Stackoverflow.com/users/13257", "pm_score": 5, "selected": true, "text": "(\\\\ |[^ ])+\n" }, { "answer_id": 313872, "author": "Tomalak", "author_id": 18771, "author_profile"...
2008/11/24
[ "https://Stackoverflow.com/questions/313848", "https://Stackoverflow.com", "https://Stackoverflow.com/users/259/" ]
313,859
<p>Are there Windows API functions that allows reading what the current password policy is? For instance, minimum length, complexity etc.</p> <p>If not reading, is there a way to verify a password against the policy programmatically?</p>
[ { "answer_id": 313907, "author": "Eugene Yokota", "author_id": 3827, "author_profile": "https://Stackoverflow.com/users/3827", "pm_score": 4, "selected": true, "text": "Sub ListPasswordPolicyInfo( strDomain )\n Dim objComputer\n Set objComputer = GetObject(\"WinNT://\" & strDomain ...
2008/11/24
[ "https://Stackoverflow.com/questions/313859", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10644/" ]
313,880
<p>If you type</p> <pre><code>nslookup -type=SRV _xmpp-server._tcp.gmail.com </code></pre> <p>(or use the dig command in OSX) you get some SRV records relating to google chat</p> <p>I would like to replicate this functionality in PHP, does anyone have any good ideas how to do this?</p> <p>I would like to avoid usin...
[ { "answer_id": 313898, "author": "Tom Haigh", "author_id": 22224, "author_profile": "https://Stackoverflow.com/users/22224", "pm_score": 4, "selected": true, "text": "require_once('Net/DNS.php');\n$resolver = new Net_DNS_Resolver();\n$response = $resolver->query('_xmpp-server._tcp.gmail....
2008/11/24
[ "https://Stackoverflow.com/questions/313880", "https://Stackoverflow.com", "https://Stackoverflow.com/users/33604/" ]
313,882
<p>After creating a instance of a class, can we invoke the constructor explicitly? For example</p> <pre><code>class A{ A(int a) { } } A instance; instance.A(2); </code></pre> <p>Can we do this?</p>
[ { "answer_id": 313883, "author": "Michael Platings", "author_id": 2651243, "author_profile": "https://Stackoverflow.com/users/2651243", "pm_score": 5, "selected": true, "text": "new (&instance) A(2);\n A instance(2);\n" }, { "answer_id": 313906, "author": "brofield", "aut...
2008/11/24
[ "https://Stackoverflow.com/questions/313882", "https://Stackoverflow.com", "https://Stackoverflow.com/users/40236/" ]
313,893
<p>I need to get execution time in milliseconds.</p> <blockquote> <p>I originally asked this question back in 2008. The accepted answer then was to use <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/getTime" rel="noreferrer"><code>new Date().getTime()</code></a> However, ...
[ { "answer_id": 313903, "author": "Owen", "author_id": 4853, "author_profile": "https://Stackoverflow.com/users/4853", "pm_score": 9, "selected": false, "text": "var start = new Date().getTime();\n\nfor (i = 0; i < 50000; ++i) {\n// do something\n}\n\nvar end = new Date().getTime();\nvar ...
2008/11/24
[ "https://Stackoverflow.com/questions/313893", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13370/" ]
313,900
<p>Using ICU 4.0 regex library, I find that the following regex is exhibiting exponential time:</p> <pre><code>actual: "[^&lt;]*&lt;\?" C code: "[^&lt;]*&lt;\\?" </code></pre> <p>Aim: find "&lt;?" where there is no other "&lt;" before it</p> <p>When running this regex on plain text with no "&lt;" characters at all i...
[ { "answer_id": 313925, "author": "Markus Jarderot", "author_id": 22364, "author_profile": "https://Stackoverflow.com/users/22364", "pm_score": 1, "selected": false, "text": "<?" }, { "answer_id": 313939, "author": "PhiLho", "author_id": 15459, "author_profile": "https...
2008/11/24
[ "https://Stackoverflow.com/questions/313900", "https://Stackoverflow.com", "https://Stackoverflow.com/users/31423/" ]
313,910
<p>At the moment, I have some functions which look like this:</p> <pre><code>private bool inFunction1 = false; public void function1() { if (inFunction1) return; inFunction1 = true; // do stuff which might cause function1 to get called ... inFunction1 = false; } </code></pre> <p>I'd like to be a...
[ { "answer_id": 313923, "author": "Anthony", "author_id": 5599, "author_profile": "https://Stackoverflow.com/users/5599", "pm_score": 1, "selected": false, "text": "if (inFunction1) \n return;\n\ntry\n{\n inFunction1 = true;\n\n // do stuff which might cause function1 to get called\n ...
2008/11/24
[ "https://Stackoverflow.com/questions/313910", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15371/" ]
313,916
<p>I have a Java Swing application, developed on Mac OS X 10.5 using Java 1.5.</p> <p>I'm trying to make a custom cursor appear when the user moves the mouse over some text in a dialog. The cursor never changes, though. </p> <p>When I don't use a JFrame instead of a JDialog, the cursor does change. But then I'll have...
[ { "answer_id": 313985, "author": "PhiLho", "author_id": 15459, "author_profile": "https://Stackoverflow.com/users/15459", "pm_score": 3, "selected": true, "text": "public class CursorTest extends JFrame\n{\n private CursorTest()\n {\n }\n\n private void ShowDialog()\n {\n JLa...
2008/11/24
[ "https://Stackoverflow.com/questions/313916", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2959/" ]
313,917
<p>I've got a 1-based array of four items which I need to traverse. For a given index in the array, I need to work out the index of the next item, and the index of the previous item. This sounds simple but the array needs to wrap around. So when you are at the beginning of the array, the previous item is considered to ...
[ { "answer_id": 313928, "author": "paxdiablo", "author_id": 14860, "author_profile": "https://Stackoverflow.com/users/14860", "pm_score": 3, "selected": true, "text": "CurrentItem - 1 PrevItem = Modulus(CurrentItem - 1 + 3, 4) + 1\n PrevItem = Modulus(CurrentItem + 2, 4) + 1\n" }, { ...
2008/11/24
[ "https://Stackoverflow.com/questions/313917", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12277/" ]
313,921
<pre><code>class Score { var $score; var $name; var $dept; var $date; function Score($score, $name, $dept, $date) { $this-&gt;scores = ($score); $this-&gt;name = ($name); $this-&gt;dept = ($dept); $this-&gt;date = ($date); } function return_score(){ ...
[ { "answer_id": 313936, "author": "Davide Gualano", "author_id": 28582, "author_profile": "https://Stackoverflow.com/users/28582", "pm_score": 2, "selected": false, "text": "public function getScore() {\n return $this->score;\n}\n\npublic function getName() {\n return $this->name;\n}\...
2008/11/24
[ "https://Stackoverflow.com/questions/313921", "https://Stackoverflow.com", "https://Stackoverflow.com/users/31677/" ]
313,924
<p>(EDIT: This question is now outdated for my particular issue, as Google Code supports git now and I've converted Protocol Buffers to Mercurial anyway. However, it's still of general interest, IMO.)</p> <p>My <a href="http://github.com/jskeet/dotnet-protobufs/tree/master" rel="noreferrer">C# Protocol Buffers Port</a...
[ { "answer_id": 314031, "author": "Ali Afshar", "author_id": 28380, "author_profile": "https://Stackoverflow.com/users/28380", "pm_score": 3, "selected": false, "text": "*" }, { "answer_id": 11584054, "author": "Sudhir Jonathan", "author_id": 73831, "author_profile": "...
2008/11/24
[ "https://Stackoverflow.com/questions/313924", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22656/" ]
313,935
<p>I have a sql query that runs super fast, around one second, when not using variables, like:</p> <pre><code>WHERE id BETWEEN 5461094 and 5461097 </code></pre> <p>But when I have:</p> <pre><code>declare @firstId int declare @lastId int set @firstId = 5461094 set @lastId = 5461097 ... WHERE id BETWEEN @firstId...
[ { "answer_id": 314032, "author": "DiGi", "author_id": 12042, "author_profile": "https://Stackoverflow.com/users/12042", "pm_score": 2, "selected": false, "text": "DECLARE @sql VARCHAR(8000)\n\nSET @sql = 'SELECT * FROM table_x WHERE id BETWEEN ' + CAST(@firstId AS VARCHAR) + ' AND ' + CA...
2008/11/24
[ "https://Stackoverflow.com/questions/313935", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21668/" ]
313,962
<p>I'm currently using the following SQL for retrieving the last seven days worth of entries from a table:</p> <pre><code>purchased &gt;= date_sub(now() ,interval 7 day) </code></pre> <p>However, I need to change this so it retrieves the last full weeks worth of entries (midnight Saturday to midnight Saturday). So ba...
[ { "answer_id": 313995, "author": "Tom Haigh", "author_id": 22224, "author_profile": "https://Stackoverflow.com/users/22224", "pm_score": 3, "selected": true, "text": "SELECT * FROM table WHERE YEARWEEK(purchased) = YEARWEEK(NOW());\n $sunday = date(('Y-m-d H:i:s'), strtotime('last sunday...
2008/11/24
[ "https://Stackoverflow.com/questions/313962", "https://Stackoverflow.com", "https://Stackoverflow.com/users/39428/" ]
313,969
<p>I have the the following html elements:</p> <pre><code>&lt;tr&gt; &lt;td&gt; &lt;label for="casenumber"&gt;Case:&lt;/label&gt;&lt;/td&gt; &lt;td&gt; &lt;%=Html.TextBox("casenumber", "", new Dictionary&lt;string, object&gt; { {"id", "casenumberID"} })%&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt;...
[ { "answer_id": 314172, "author": "Tomalak", "author_id": 18771, "author_profile": "https://Stackoverflow.com/users/18771", "pm_score": 1, "selected": false, "text": "#fogbugzUser get() $(function() {\n $(\"#casenumberID\").blur(function() {\n $.get(\n \"url/to/some.page/fetching...
2008/11/24
[ "https://Stackoverflow.com/questions/313969", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3834/" ]
313,970
<p>I want to convert a <code>std::string</code> to lowercase. I am aware of the function <code>tolower()</code>. However, in the past I have had issues with this function and it is hardly ideal anyway as using it with a <code>std::string</code> would require iterating over each character.</p> <p>Is there an alternative...
[ { "answer_id": 313988, "author": "Rob", "author_id": 9236, "author_profile": "https://Stackoverflow.com/users/9236", "pm_score": 9, "selected": false, "text": "#include <boost/algorithm/string.hpp>\n\nstd::string str = \"HELLO, WORLD!\";\nboost::algorithm::to_lower(str); // modifies str\...
2008/11/24
[ "https://Stackoverflow.com/questions/313970", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18664/" ]
313,998
<p>In <strong>classic ASP</strong> there is a global object called <strong>"Application"</strong> that is accessed simultaniously by all sessions.</p> <p>As the "Application" object is a shared resource, can it cause <strong>dead locks?</strong></p> <p>EDIT: If not, why does it has <strong>lock</strong> and <strong>u...
[ { "answer_id": 314588, "author": "dariom", "author_id": 12389, "author_profile": "https://Stackoverflow.com/users/12389", "pm_score": 2, "selected": false, "text": "Application Application <%\nApplication(\"Count\") = Application(\"Count\") + 1\n%>\n Application <%\nApplication.Lock\nApp...
2008/11/24
[ "https://Stackoverflow.com/questions/313998", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1100/" ]
314,008
<p>This is a contrived example, but lets say I have declared objects:</p> <pre><code>CustomObj fooObj; CustomObj barObj; CustomObj bazObj; </code></pre> <p>And I have an string array:</p> <pre><code>string[] stringarray = new string[] {"foo","bar","baz"}; </code></pre> <p>How can I programmatically access and insta...
[ { "answer_id": 314010, "author": "Jon Skeet", "author_id": 22656, "author_profile": "https://Stackoverflow.com/users/22656", "pm_score": 6, "selected": true, "text": "Dictionary<string, CustomObj> Dictionary<string, CustomObj> map = new Dictionary<string, CustomObj>();\n\nforeach (string...
2008/11/24
[ "https://Stackoverflow.com/questions/314008", "https://Stackoverflow.com", "https://Stackoverflow.com/users/35463/" ]
314,012
<p>I have a function which searches an STL container then returns the iterator when it finds the position, however I am getting some funny error messages, can tell me what I am doing wrong?</p> <p>Function:</p> <pre><code>std::vector&lt; CClass &gt;::iterator CClass::SearchFunction( const std::string&amp; strField ) ...
[ { "answer_id": 314018, "author": "Ferruccio", "author_id": 4086, "author_profile": "https://Stackoverflow.com/users/4086", "pm_score": 4, "selected": true, "text": "std::vector< CClass >::const_iterator std::vector< CClass >::iterator std::vector< CClass >::iterator it;\n" } ]
2008/11/24
[ "https://Stackoverflow.com/questions/314012", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18664/" ]
314,024
<p>My understanding is that you have to write unit tests that isolate functionality. So given a repository class that has this method:</p> <pre><code>Entity GetById(Guid id) </code></pre> <p>and a <em>fake</em> implementation (using a Dictionary for storage), how would you write a test without first <em>adding</em> a...
[ { "answer_id": 314041, "author": "Chris Kimpton", "author_id": 48310, "author_profile": "https://Stackoverflow.com/users/48310", "pm_score": 2, "selected": false, "text": "Expect.Call(repository.GetById(\"someObject\")).Return(new RepositoryThing());\n" } ]
2008/11/24
[ "https://Stackoverflow.com/questions/314024", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4830/" ]
314,054
<p>I'm looking for a way to query the ink level for my Epson DX 4050 on Mac OS X. There is some UI called EPSON StatusMonitor to display cartridges levels graphically, but I'd like to get it from the command-line so it can feed a robot.</p> <p>Any idea ?</p>
[ { "answer_id": 43123592, "author": "tseeling", "author_id": 919085, "author_profile": "https://Stackoverflow.com/users/919085", "pm_score": 0, "selected": false, "text": "#!/bin/sh\n\nme=\"${0##*/}\"\n\nhost=\"${1:-wp4535}\"\n\nbase=1.3.6.1.2.1.43.11.1.1\n\nname=\"WP-4535\"\n\ntype=$(snm...
2008/11/24
[ "https://Stackoverflow.com/questions/314054", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20302/" ]
314,055
<p>I know there is <a href="https://stackoverflow.com/questions/63546/vs2005-c-programmatically-change-connection-string-contained-in-appconfig">some similar issue</a>.</p> <p>But, still the question is not answered! I need to <strong>modify</strong> the connection string not add a new one.</p>
[ { "answer_id": 314060, "author": "MysticSlayer", "author_id": 28139, "author_profile": "https://Stackoverflow.com/users/28139", "pm_score": 3, "selected": false, "text": " /// <summary>\n /// Add a connection string to the connection\n /// strings section and store i...
2008/11/24
[ "https://Stackoverflow.com/questions/314055", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
314,058
<p>Is there a way to get MVEL 2.0 ( <a href="http://mvel.codehaus.org/" rel="nofollow noreferrer">http://mvel.codehaus.org/</a> ) to work with functions with optional parameters?</p> <p>I would like to be able to eval this:</p> <p>trunc('blahblah',2)</p> <p>but also</p> <p>trunc('blahblah',2,'[...]');</p> <p>Now i...
[ { "answer_id": 4429797, "author": "Kr1z", "author_id": 513690, "author_profile": "https://Stackoverflow.com/users/513690", "pm_score": 1, "selected": false, "text": "private void method(Object obj1) {\n Object obj2 = new Object(\"Default\");\n method(obj1, obj2);\n}\n\nprivate void...
2008/11/24
[ "https://Stackoverflow.com/questions/314058", "https://Stackoverflow.com", "https://Stackoverflow.com/users/40254/" ]
314,068
<p>Even before telling my question, will tell you that this is a very vague question. But please let me know if you have any similar ideas. </p> <p>I am actually trying to write a website of my own locally using ASP.Net. I actually wanted to try and simulate a website with trading and stock details. I wanted to actual...
[ { "answer_id": 314403, "author": "Gavin Miller", "author_id": 33226, "author_profile": "https://Stackoverflow.com/users/33226", "pm_score": 1, "selected": false, "text": " // Create an HttpWebRequest using WebRequest.Create (see .NET docs)!\n HttpWebRequest request = (HttpWebReques...
2008/11/24
[ "https://Stackoverflow.com/questions/314068", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20951/" ]
314,085
<p>I know questions of this kind <a href="https://stackoverflow.com/questions/24298/best-solution-for-authentication-in-ruby-on-rails">have</a> <a href="https://stackoverflow.com/questions/13254/open-id-authentication-in-ruby-on-rails">been</a> <a href="https://stackoverflow.com/questions/38901/strange-rails-authentica...
[ { "answer_id": 316418, "author": "Purfideas", "author_id": 4615, "author_profile": "https://Stackoverflow.com/users/4615", "pm_score": 2, "selected": false, "text": "SecureSessions::Password.validate_proc = proc do |ctrl| \n # define any proc here which validates username/password etc, ...
2008/11/24
[ "https://Stackoverflow.com/questions/314085", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14540/" ]
314,095
<p><strong>Is there a way that I can configure Visual Studio 2008 to understand CamelCase?</strong> Specifically, I'd like to be able to get <code>Ctrl + right</code> or <code>left</code> cursor to take me to a subsection of a variable or type name.</p> <p>i.e., if my cursor was at the start of this line:</p> <pre cla...
[ { "answer_id": 29357666, "author": "jsea", "author_id": 1682070, "author_profile": "https://Stackoverflow.com/users/1682070", "pm_score": 7, "selected": false, "text": "Visual Studio 2019 Use new shortcut in Show commands containing Step 4 Alt + Right Arrow Alt + Left Arrow Alt + Shift +...
2008/11/24
[ "https://Stackoverflow.com/questions/314095", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1853/" ]
314,098
<p>Is the following scenario possible in SQL Server using a single active connection?</p> <p>Inside a READCOMMITED transaction I need to update one table without locking it. For example each time I execute a statement I increase a field in that table. This operation doesn't need to be rolled back in case the transacti...
[ { "answer_id": 29357666, "author": "jsea", "author_id": 1682070, "author_profile": "https://Stackoverflow.com/users/1682070", "pm_score": 7, "selected": false, "text": "Visual Studio 2019 Use new shortcut in Show commands containing Step 4 Alt + Right Arrow Alt + Left Arrow Alt + Shift +...
2008/11/24
[ "https://Stackoverflow.com/questions/314098", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
314,100
<p>I'm working with LINQ to objects and have a function where in some cases I need to modify the underlying collection before calling <code>Aggregate(...)</code> and then return it to its original state before the funciton returns the results of <code>Aggregate(...)</code>. My current code looks something like this:</p...
[ { "answer_id": 314122, "author": "Aleris", "author_id": 20417, "author_profile": "https://Stackoverflow.com/users/20417", "pm_score": 2, "selected": false, "text": "var modifiedCollection = ModifyCollection(collection, collectionNeedsModification);\n\nvar aggregationResult = from a in\n ...
2008/11/24
[ "https://Stackoverflow.com/questions/314100", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4797/" ]
314,108
<p>How can I make this java generic cast ?</p> <pre><code>public interface IField { } class Field implements IField { // package private class } public class Form { private List&lt;Field&gt; fields; public List&lt;IField&gt; getFields() { return this.fields; } } </code></pre> <p>The return statemen...
[ { "answer_id": 314112, "author": "Sunlight", "author_id": 33650, "author_profile": "https://Stackoverflow.com/users/33650", "pm_score": 4, "selected": false, "text": "return (List<IField>)(Object)this.fields;\n List<T> IField" }, { "answer_id": 314127, "author": "Dan Vinton",...
2008/11/24
[ "https://Stackoverflow.com/questions/314108", "https://Stackoverflow.com", "https://Stackoverflow.com/users/24028/" ]
314,109
<p>With PHP, I can make numerous PHP websites locally and then upload each of them to its own sub-directory of my PHP hosting service. </p> <p>However, with ASP.NET, it seems that I can only upload my ASP.NET to the root of my hosting service. If I upload to a sub-directory, I get an error in </p> <pre><code>section ...
[ { "answer_id": 314112, "author": "Sunlight", "author_id": 33650, "author_profile": "https://Stackoverflow.com/users/33650", "pm_score": 4, "selected": false, "text": "return (List<IField>)(Object)this.fields;\n List<T> IField" }, { "answer_id": 314127, "author": "Dan Vinton",...
2008/11/24
[ "https://Stackoverflow.com/questions/314109", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4639/" ]
314,110
<p>Having a fully internationalised application is a necessity if you want to sell worldwide. In Java we're using resource bundles and that solves things for static text codeside.</p> <p>But what do you do about text that is stored in the database? Starting with static definitions, to user modifiable objects, ending w...
[ { "answer_id": 314244, "author": "Dylan Beattie", "author_id": 5017, "author_profile": "https://Stackoverflow.com/users/5017", "pm_score": 2, "selected": false, "text": "SELECT * CREATE TABLE ProductType (\n Id int primary key,\n NamePhraseId int, -- link to the Phrase containing t...
2008/11/24
[ "https://Stackoverflow.com/questions/314110", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23428/" ]
314,152
<p>Consider the following use of template template parameters...</p> <pre><code>#include &lt;iostream&gt; template &lt;typename X&gt; class A { X _t; public: A(X t) :_t(t) { } X GetValue() { return _t; } }; template &lt;typename T, template &lt;typename T&gt; class C &gt; ...
[ { "answer_id": 314177, "author": "coryan", "author_id": 33325, "author_profile": "https://Stackoverflow.com/users/33325", "pm_score": 1, "selected": false, "text": "template <typename C >\nstruct B\n{\n C c;\n};\n\nint main()\n{\n B< A<int> > b;\n return 0;\n}\n" }, { "a...
2008/11/24
[ "https://Stackoverflow.com/questions/314152", "https://Stackoverflow.com", "https://Stackoverflow.com/users/39648/" ]
314,164
<p>I am not familiar with this website but I am desperately seeking help with the website I am building. I'm sorry if I'm not in the right place or asking my question incorrectly, so please tell me if I do something wrong!</p> <p>I have built a simple website, consisting of four pages (index.html plus three others). I...
[ { "answer_id": 314271, "author": "mike nvck", "author_id": 36531, "author_profile": "https://Stackoverflow.com/users/36531", "pm_score": 0, "selected": false, "text": "<div id=page>\n <div id=content></div>\n</div>\n<div id=sidebar></div>\n <div id=page>\n <div id=sidebar></div> ...
2008/11/24
[ "https://Stackoverflow.com/questions/314164", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
314,165
<p>I would like to do the following:</p> <p>when a Sales person assigns a custom entity (let's call it 'Primary Expertise') to an Opportunity in MS CRM 4.0, the system would share the Opportunity with the user that is defined as the Owner of the associated 'Primary Expertise' record.</p> <p>I would like to do it auto...
[ { "answer_id": 16037613, "author": "shytikov", "author_id": 1047741, "author_profile": "https://Stackoverflow.com/users/1047741", "pm_score": 2, "selected": false, "text": "var rights = AccessRights.ReadAccess | AccessRights.WriteAccess;\n\nvar principalAccess = new PrincipalAccess\n{\n ...
2008/11/24
[ "https://Stackoverflow.com/questions/314165", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2706/" ]
314,176
<p>A cancer CT picture is stored inside a unsigned short array (1-dimensional).</p> <p>I have the location information of the cancer region inside the picture, but the coordinates (x,y) are in superpixel (128x128 unsigned short). My task is to highlight this region. </p> <p>I already solved this one by converting su...
[ { "answer_id": 314204, "author": "unwind", "author_id": 28169, "author_profile": "https://Stackoverflow.com/users/28169", "pm_score": 1, "selected": false, "text": "typedef struct\n{\n unsigned short data[128 * 128]; // This was broken in the question.\n} spix;\n\n\nvoid spix_set_pixe...
2008/11/24
[ "https://Stackoverflow.com/questions/314176", "https://Stackoverflow.com", "https://Stackoverflow.com/users/40260/" ]
314,181
<p>Is there a way of automatically generating a HTML-Map compatible list of coordinates of polygon-like objects (e.g. countries on a map) with very distinctive borders?</p> <p>Example image:</p> <p><a href="http://www.bankaustria.at/landkarten/CEE_2007_w524.jpg">Map of CEE countries http://www.bankaustria.at/landkart...
[ { "answer_id": 323703, "author": "Gerhard Dinhof", "author_id": 898, "author_profile": "https://Stackoverflow.com/users/898", "pm_score": 3, "selected": false, "text": "// input format: M 166,362.27539 C 163.525,360.86029 161.3875,359.43192 161.25,359.10124 C ...\nprivate static void Svg...
2008/11/24
[ "https://Stackoverflow.com/questions/314181", "https://Stackoverflow.com", "https://Stackoverflow.com/users/898/" ]
314,187
<p>Here's a simplified version of my scenario:</p> <ul> <li>I have a table named <strong>Project</strong> that I reference via an 'id' field.</li> <li>I have a table named <strong>Photo</strong> that has a field named 'project_id' which I use to relate multiple photos to a single project. The Photo table also has an a...
[ { "answer_id": 314207, "author": "Tomalak", "author_id": 18771, "author_profile": "https://Stackoverflow.com/users/18771", "pm_score": 1, "selected": false, "text": "Projects" }, { "answer_id": 314231, "author": "philistyne", "author_id": 16597, "author_profile": "htt...
2008/11/24
[ "https://Stackoverflow.com/questions/314187", "https://Stackoverflow.com", "https://Stackoverflow.com/users/40123/" ]
314,203
<p>Can I collapse those two "getFields" methods into one using generics (the second method is intended to package private access) or should I rename the second one into something ugly like "getFieldPackagePrivate"?</p> <pre><code>public interface IField { } class Field implements IField { // package private class ...
[ { "answer_id": 314208, "author": "Jon Skeet", "author_id": 22656, "author_profile": "https://Stackoverflow.com/users/22656", "pm_score": 2, "selected": false, "text": "public List<? extends IField> getFields()\n" }, { "answer_id": 314365, "author": "Łukasz Bownik", "autho...
2008/11/24
[ "https://Stackoverflow.com/questions/314203", "https://Stackoverflow.com", "https://Stackoverflow.com/users/24028/" ]
314,213
<p>How do I check that I have an open network connection and can contact a specific ip address in c#? I have seen example in VB.Net but they all use the 'My' structure. Thank you.</p>
[ { "answer_id": 314261, "author": "Patrick Desjardins", "author_id": 13913, "author_profile": "https://Stackoverflow.com/users/13913", "pm_score": 3, "selected": false, "text": "IPEndPoint ipep = new IPEndPoint(Ipaddress.Parse(\"IP TO CHECK\"), YOUR_PORT_INTEGER);\nSocket server = new Soc...
2008/11/24
[ "https://Stackoverflow.com/questions/314213", "https://Stackoverflow.com", "https://Stackoverflow.com/users/37350/" ]
314,232
<p>I have a DateTime object that I need to print in a custom gridlike control. The type of the data I want to print is a date in the format dd-mm-yyyy. This value can be either filled or blank. If it's filled it will be parsed into a <code>DateTime</code> and then printed as the default <code>ToString</code>.</p> <p>F...
[ { "answer_id": 314263, "author": "Mark Cidade", "author_id": 1659, "author_profile": "https://Stackoverflow.com/users/1659", "pm_score": 3, "selected": true, "text": "Container.Value.Length > 0 ? Convert.ToDateTime(Container.Value).ToShortTimeString() : \"\"\n Container.Value" }, { ...
2008/11/24
[ "https://Stackoverflow.com/questions/314232", "https://Stackoverflow.com", "https://Stackoverflow.com/users/40274/" ]
314,245
<p>I have this code:</p> <pre><code>db = "C:\Dokumente und Einstellungen\hom\Anwendungsdaten\BayWotch4\Neuer Ordner\baywotch.db5" TextExportFile = "C:\Dokumente und Einstellungen\hom\Anwendungsdaten\BayWotch4\Neuer Ordner\Exp.txt" Set cn = CreateObject("ADODB.Connection") Set rs = CreateObject("ADODB.Recordset") cn....
[ { "answer_id": 314285, "author": "Daniel Kreiseder", "author_id": 31406, "author_profile": "https://Stackoverflow.com/users/31406", "pm_score": 0, "selected": false, "text": "cn.Provider = \"Microsoft.Jet.OLEDB.4.0\"\ncn.ConnectionString = db\ncn.Open\n" }, { "answer_id": 315291,...
2008/11/24
[ "https://Stackoverflow.com/questions/314245", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1246613/" ]
314,254
<p>I'm looking for way to grab the content of my opengl (as UIImage) and then save it into a file. I'm now giving glReadPixels a try though I'm not sure I'm doing the right thing as of what kind of malloc I should be doing. I gather that on OSX it's GL_BGRA but on the iPhone that doesn't work...</p>
[ { "answer_id": 314337, "author": "Nils Pipenbrinck", "author_id": 15955, "author_profile": "https://Stackoverflow.com/users/15955", "pm_score": 2, "selected": false, "text": "GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES \n" }, { "answer_id": 3333682, "author": "Alastair Stuart", ...
2008/11/24
[ "https://Stackoverflow.com/questions/314254", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
314,256
<p>My Cocoa app needs some small dynamically generated windows. How can I programmatically create Cocoa windows at runtime?</p> <p>This is my non-working attempt so far. I see no result whatsoever.</p> <pre><code>NSRect frame = NSMakeRect(0, 0, 200, 200); NSUInteger styleMask = NSBorderlessWindowMask; NSRect rect ...
[ { "answer_id": 314308, "author": "Steve McLeod", "author_id": 2959, "author_profile": "https://Stackoverflow.com/users/2959", "pm_score": 2, "selected": false, "text": "NSRect frame = NSMakeRect(100, 100, 200, 200);\nNSUInteger styleMask = NSBorderlessWindowMask;\nNSRect rect = [NSWin...
2008/11/24
[ "https://Stackoverflow.com/questions/314256", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2959/" ]
314,258
<p>I'm creating some big files (DB exports) with Java and I need to put them somewhere on our SharePoint server. Right now, I'm doing this with IE but I'd like to automate this step, too.</p> <p>I searched the web and I found some hints to use SOAP but I don't really see to the ground of all this, yet. Can someone pro...
[ { "answer_id": 314477, "author": "dariom", "author_id": 12389, "author_profile": "https://Stackoverflow.com/users/12389", "pm_score": 3, "selected": false, "text": "http://<Site>/_vti_bin/ http://<Site>/_vti_bin/Lists.asmx http://<Site>/_vti_bin/Lists.asmx?WSDL UpdateListItems AddAttachm...
2008/11/24
[ "https://Stackoverflow.com/questions/314258", "https://Stackoverflow.com", "https://Stackoverflow.com/users/34088/" ]
314,268
<p>I have an application that needs to send a moderately high volume of messages between a number of AppDomains. I know that I could implement this using remoting, but I have also noticed that there are cross-domain delegates. Has anyone looked at this kind of problem?</p>
[ { "answer_id": 11071232, "author": "notmii", "author_id": 1260962, "author_profile": "https://Stackoverflow.com/users/1260962", "pm_score": 3, "selected": false, "text": "static void RunInChildDomain()\n{\n AppDomain childDomain = AppDomain.CreateDomain(\"friendlyName\");\n strin...
2008/11/24
[ "https://Stackoverflow.com/questions/314268", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21686/" ]
314,275
<p>I am running a java program that sets up a database connection to an SQL database. It works fine on Mac OS X, but when I try to run the same code on Linux, I get a Exception in thread "main" java.lang.NoClassDefFoundError: java/sql/SQLClientInfoException.</p> <p>I am using jdk-1.6.0_02 - if I unzip src.zip, it turn...
[ { "answer_id": 314325, "author": "kgiannakakis", "author_id": 24054, "author_profile": "https://Stackoverflow.com/users/24054", "pm_score": 2, "selected": true, "text": "jdk1.6.0_03 jdk1.6.0_06" } ]
2008/11/24
[ "https://Stackoverflow.com/questions/314275", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
314,277
<p>I am getting an vba error 3271; Invalid property value. This happens when trying to append a memo field in a querydef. Any ideas on how to get around this?</p> <p>Example:</p> <pre><code>public sub TestMemoField Dim qdf As QueryDef Set qdf = CurrentDb.QueryDefs("AppendRecord") qdf.Parameters("@SomeBi...
[ { "answer_id": 314486, "author": "Fionnuala", "author_id": 2548, "author_profile": "https://Stackoverflow.com/users/2548", "pm_score": 2, "selected": false, "text": "qdf.SQL=\"INSERT INTO Sometable (SomeField) Values('\" & String(1000, \"A\") & \"')\"\n" }, { "answer_id": 316217,...
2008/11/24
[ "https://Stackoverflow.com/questions/314277", "https://Stackoverflow.com", "https://Stackoverflow.com/users/37797/" ]
314,300
<p>I would like to upload files from java application/applet using POST http event. I would like to avoid to use any library not included in SE, unless there is no other (feasible) option. <br> So far I come up only with very simple solution. <br> - Create String (Buffer) and fill it with compatible header (<a href="h...
[ { "answer_id": 324046, "author": "Alnitak", "author_id": 6782, "author_profile": "https://Stackoverflow.com/users/6782", "pm_score": 3, "selected": false, "text": "java.net.URL java.net.URLConnection public void post(String url) throws Exception {\n URL u = new URL(url);\n URLConne...
2008/11/24
[ "https://Stackoverflow.com/questions/314300", "https://Stackoverflow.com", "https://Stackoverflow.com/users/40271/" ]
314,301
<p>I am creating a large table dynamically using Javascript. I have realised the time taken to add a new row grows exponentially as the number of rows increase.</p> <p>I suspect the Page is getting refreshed in each loop per row (I am also adding input elements of type text on each cell)</p> <p>Is there a way to stop...
[ { "answer_id": 314326, "author": "Aleris", "author_id": 20417, "author_profile": "https://Stackoverflow.com/users/20417", "pm_score": 2, "selected": false, "text": "var theTable = document.createElement(\"table\");\n// ... \n// add all the rows to theTable\n// ...\ndocument.body.appendCh...
2008/11/24
[ "https://Stackoverflow.com/questions/314301", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13370/" ]
314,305
<p>I am using Oracle BPEL Process manager and have a task assigned to a group of users. I try to mark it approved using Java class oracle.bpel.services.workflow.task.ITaskService.updateTaskOutcome(). This works if the task is assigned to an individual user, but if the task is assigned to a group of users, I get an err...
[ { "answer_id": 1558200, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 1, "selected": false, "text": "updateTaskOutcomes() updateTaskOutcome()" } ]
2008/11/24
[ "https://Stackoverflow.com/questions/314305", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9363/" ]
314,307
<p>I have two tables: a source table and a target table. The target table will have a subset of the columns of the source table. I need to update a single column in the target table by joining with the source table based on another column. The update statement is as follows:</p> <pre><code>UPDATE target_table tt SE...
[ { "answer_id": 314330, "author": "Codewerks", "author_id": 17729, "author_profile": "https://Stackoverflow.com/users/17729", "pm_score": 4, "selected": true, "text": "UPDATE target_table \nSET special_id = st.source_special_id\nFROM \n target_table tt\n INNER JOIN\n source_table...
2008/11/24
[ "https://Stackoverflow.com/questions/314307", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20133/" ]
314,313
<p>I use Jasper reports with the <a href="http://static.springframework.org/spring/docs/2.0.x/api/org/springframework/web/servlet/view/jasperreports/JasperReportsMultiFormatView.html" rel="nofollow noreferrer">JasperReportsMultiFormatView</a> class provided by the Spring framework. This class takes care of compiling th...
[ { "answer_id": 14611708, "author": "andrewps", "author_id": 2022484, "author_profile": "https://Stackoverflow.com/users/2022484", "pm_score": 1, "selected": false, "text": "import net.sf.jasperreports.engine.JasperReport;\nimport org.apache.log4j.Logger;\nimport org.springframework.web.s...
2008/11/24
[ "https://Stackoverflow.com/questions/314313", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2648/" ]
314,314
<p>I have a rather large (many gigabytes) table of data in SQL Server that I wish to move to a table in another database on the same server.</p> <p>The tables are the same layout.</p> <p>What would be the most effecient way of going about doing this?</p> <p>This is a one off operation so no automation is required.</...
[ { "answer_id": 314338, "author": "Tomalak", "author_id": 18771, "author_profile": "https://Stackoverflow.com/users/18771", "pm_score": 4, "selected": true, "text": "SELECT * INTO OtherDatabase..NewTable FROM ThisDatabase..OldTable\n INSERT OtherDatabase..NewTable\nSELECT * FROM ThisDatab...
2008/11/24
[ "https://Stackoverflow.com/questions/314314", "https://Stackoverflow.com", "https://Stackoverflow.com/users/770/" ]
314,321
<p>I've looked this up a thousand times, and I always forget it, so, here for eternity:</p> <p>Solaris has a bit of an awkward syntax for <code>tail</code>.</p> <p>How do I do the equivalent of BSD's <code>tail -n<i>N</i></code>?</p> <p>What I want are the last N lines from tail's input.</p>
[ { "answer_id": 314341, "author": "Ulf Lindback", "author_id": 30354, "author_profile": "https://Stackoverflow.com/users/30354", "pm_score": 5, "selected": true, "text": "tail -100\n" }, { "answer_id": 314367, "author": "VonC", "author_id": 6309, "author_profile": "htt...
2008/11/24
[ "https://Stackoverflow.com/questions/314321", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13989/" ]
314,329
<p>OK, this is my own fault, but I can't seem to rescue myself.</p> <p>Whenever I try to step into a class that has fields with assignments calling into .NET code, I get a dialog box that contains the text "There is no source code available for the current location.":</p> <p><img src="https://i.stack.imgur.com/3pfTr....
[ { "answer_id": 10750386, "author": "psur", "author_id": 1113539, "author_profile": "https://Stackoverflow.com/users/1113539", "pm_score": 2, "selected": false, "text": "main" }, { "answer_id": 21388966, "author": "Peter Mortensen", "author_id": 63550, "author_profile"...
2008/11/24
[ "https://Stackoverflow.com/questions/314329", "https://Stackoverflow.com", "https://Stackoverflow.com/users/267/" ]
314,332
<p>Which is a better way to force GC on ThreadLocal instance?</p>
[ { "answer_id": 314785, "author": "James Van Huis", "author_id": 31828, "author_profile": "https://Stackoverflow.com/users/31828", "pm_score": 2, "selected": false, "text": "System.gc();\n System.gc()" }, { "answer_id": 6915168, "author": "shams", "author_id": 356645, ...
2008/11/24
[ "https://Stackoverflow.com/questions/314332", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26365/" ]
314,334
<p>Say I have a file with any number of lines, say, 125. I want to get all the lines except the first n, say, 20. So, I want lines 21–125.</p> <p>Is there a way to do this with with <code>tail</code>/<code>head</code>, or some other tool?</p>
[ { "answer_id": 314352, "author": "unwind", "author_id": 28169, "author_profile": "https://Stackoverflow.com/users/28169", "pm_score": 6, "selected": true, "text": "tail -n +21 myfile.txt\n" }, { "answer_id": 314362, "author": "Johannes Schaub - litb", "author_id": 34509, ...
2008/11/24
[ "https://Stackoverflow.com/questions/314334", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13989/" ]
314,336
<p>How to generate the Symbols file of a PowerBuilder program for dump analysis?</p>
[ { "answer_id": 314352, "author": "unwind", "author_id": 28169, "author_profile": "https://Stackoverflow.com/users/28169", "pm_score": 6, "selected": true, "text": "tail -n +21 myfile.txt\n" }, { "answer_id": 314362, "author": "Johannes Schaub - litb", "author_id": 34509, ...
2008/11/24
[ "https://Stackoverflow.com/questions/314336", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1100/" ]
314,357
<p>I am using an Infragistics UltraGrid in a WinForms application.<br> Which event is raised on "check change" of checkbox in Infragistics UltraGrid?</p>
[ { "answer_id": 314378, "author": "Kevin Fairchild", "author_id": 3743, "author_profile": "https://Stackoverflow.com/users/3743", "pm_score": 3, "selected": true, "text": "Private Sub YourGridcontrol_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles...
2008/11/24
[ "https://Stackoverflow.com/questions/314357", "https://Stackoverflow.com", "https://Stackoverflow.com/users/34588/" ]
314,382
<p>My application is pretty simple: it starts up with a view controller that holds a table view (in grouped view layout) with a few options. When the user taps on one of the options, I push another view controller onto my navigation controller.</p> <p>This second view controller simply displays a UIImageView, and the ...
[ { "answer_id": 431974, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 0, "selected": false, "text": "- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation{\n // don't let user press \"bac...
2008/11/24
[ "https://Stackoverflow.com/questions/314382", "https://Stackoverflow.com", "https://Stackoverflow.com/users/35478/" ]
314,384
<p>How do you parse a CSV file using gawk? Simply setting <code>FS=","</code> is not enough, as a quoted field with a comma inside will be treated as multiple fields.</p> <p>Example using <code>FS=","</code> which does not work:</p> <p>file contents:</p> <pre><code>one,two,"three, four",five "six, seven",eight,"nin...
[ { "answer_id": 314421, "author": "MCS", "author_id": 1094969, "author_profile": "https://Stackoverflow.com/users/1094969", "pm_score": 0, "selected": false, "text": "BEGIN { FS=\",\" }\n{\n for (i=1; i<=NF; i++) {\n f[++n] = $i\n if (substr(f[n],1,1)==\"\\\"\") {\n while (sub...
2008/11/24
[ "https://Stackoverflow.com/questions/314384", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1094969/" ]
314,397
<p>More detail to my question:</p> <p>HTML and JavaScript are called "client-side code".</p> <p>C# and VB in the code behind files are termed "server-side code".</p> <p>So what is inline-asp, and 'runat=server' code blocks called?</p> <pre><code>&lt;!-- This is called "client-side" --&gt; &lt;p&gt;Hello World&lt;/p...
[ { "answer_id": 314420, "author": "Joel Coehoorn", "author_id": 3043, "author_profile": "https://Stackoverflow.com/users/3043", "pm_score": 0, "selected": false, "text": "<% %> <% %> <% %>" }, { "answer_id": 314434, "author": "Mark Cidade", "author_id": 1659, "author_p...
2008/11/24
[ "https://Stackoverflow.com/questions/314397", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11917/" ]
314,401
<p>What is the simplest way to read a full line in a C console program The text entered might have a variable length and we can't make any assumption about its content.</p>
[ { "answer_id": 314422, "author": "Johannes Schaub - litb", "author_id": 34509, "author_profile": "https://Stackoverflow.com/users/34509", "pm_score": 8, "selected": true, "text": "fgets char * getline(void) {\n char * line = malloc(100), * linep = line;\n size_t lenmax = 100, len =...
2008/11/24
[ "https://Stackoverflow.com/questions/314401", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2011/" ]
314,408
<p>I am building a Facebook App which is heavy on Javascript. For this I have multiple Javascript files. Since in Facebook development, the page is served over a tunnel, there is excessive latency added while requesting multiple javascript files. Is it possible to combine the contents of multiple javascript files at ru...
[ { "answer_id": 314462, "author": "John Topley", "author_id": 1450, "author_profile": "https://Stackoverflow.com/users/1450", "pm_score": 4, "selected": false, "text": ":cache javascript_include_tag <%= javascript_include_tag :all, :cache => true %>\n ActionController::Base.perform_cachin...
2008/11/24
[ "https://Stackoverflow.com/questions/314408", "https://Stackoverflow.com", "https://Stackoverflow.com/users/29653/" ]
314,412
<p>If you were to build a badge system similiar to how SO does it, would you put the logic/business layer in the database directly (via stored procedure, scheduled sql jobs) or put it in the server side?</p> <p>From what I can think of, you have to:</p> <ol> <li>list badges that pertain to the current user action</li...
[ { "answer_id": 314453, "author": "Tony Andrews", "author_id": 18747, "author_profile": "https://Stackoverflow.com/users/18747", "pm_score": 1, "selected": false, "text": "IF eligible for <new badge> THEN\n INSERT INTO user_badges\n SELECT <new_badge>\n WHERE NOT EXISTS (SELECT N...
2008/11/24
[ "https://Stackoverflow.com/questions/314412", "https://Stackoverflow.com", "https://Stackoverflow.com/users/39677/" ]
314,415
<p>Why use a GlobalClass? What are they for? I have inherited some code (shown below) and as far as I can see there is no reason why strUserName needs this. What is all for?</p> <pre><code>public static string strUserName { get { return m_globalVar; } set { m_globalVar = value; } } </code></pre...
[ { "answer_id": 314429, "author": "mmx", "author_id": 33708, "author_profile": "https://Stackoverflow.com/users/33708", "pm_score": 0, "selected": false, "text": "ClassName.MemberName" } ]
2008/11/24
[ "https://Stackoverflow.com/questions/314415", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
314,423
<p>I've been tasked with integration testing of a large system. Presently, I have a COM dll that I'm testing useing a UI that I created that kicks off a series of unit tests that call into the dll. This works, but I'm wanting to migrate this over to MbUnit. When I start the first test in MbUnit, it seems to hang at "F...
[ { "answer_id": 448702, "author": "Craigger", "author_id": 18924, "author_profile": "https://Stackoverflow.com/users/18924", "pm_score": 1, "selected": false, "text": "namespace UnitTest\n{\n class Program\n {\n static void Main(string[] args_)\n {\n // run unit test\n A...
2008/11/24
[ "https://Stackoverflow.com/questions/314423", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
314,424
<p>I have a report reading records out of a DMS system and I thought it would be nice to have a link to the documents that it is listing so that the users could view the actual documents. </p> <p>However when it displays a Word doc it allows you to make changes and then save them, which rather undermines the DMS syste...
[ { "answer_id": 448702, "author": "Craigger", "author_id": 18924, "author_profile": "https://Stackoverflow.com/users/18924", "pm_score": 1, "selected": false, "text": "namespace UnitTest\n{\n class Program\n {\n static void Main(string[] args_)\n {\n // run unit test\n A...
2008/11/24
[ "https://Stackoverflow.com/questions/314424", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
314,426
<p>How can I go through each of the properties in my custom object? It is not a collection object, but is there something like this for non-collection objects?</p> <pre><code>For Each entry as String in myObject ' Do stuff here... Next </code></pre> <p>There are string, integer and boolean properties in my object...
[ { "answer_id": 314436, "author": "Ali Ersöz", "author_id": 4215, "author_profile": "https://Stackoverflow.com/users/4215", "pm_score": 7, "selected": true, "text": "PropertyInfo[] propertyInfo = myobject.GetType().GetProperties();\n Dim info() As PropertyInfo = myobject.GetType().GetProp...
2008/11/24
[ "https://Stackoverflow.com/questions/314426", "https://Stackoverflow.com", "https://Stackoverflow.com/users/25515/" ]
314,432
<p>I am using Visual Studio 2005 and StarTeam 2008 (cross-platform client and VS integration). At some point, I added an 'App.config' to a project. I notice now that this file will not check-in.</p> <ol> <li><p>The 'StarTeam Pending Checkins' window in VS reports the file 'Not in View'. Selecting it for check in and c...
[ { "answer_id": 314436, "author": "Ali Ersöz", "author_id": 4215, "author_profile": "https://Stackoverflow.com/users/4215", "pm_score": 7, "selected": true, "text": "PropertyInfo[] propertyInfo = myobject.GetType().GetProperties();\n Dim info() As PropertyInfo = myobject.GetType().GetProp...
2008/11/24
[ "https://Stackoverflow.com/questions/314432", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3619/" ]
314,433
<p>If you call a web service from Silverlight like this:</p> <pre><code>MyServiceClient serviceClient = new MyServiceClient(); void MyMethod() { serviceClient.GetDataCompleted += new EventHandler&lt;GetDataCompletedEventArgs&gt;(serviceClient_GetDataCompleted); serviceClient.GetDataAsync(); // HOW DO I WAIT/JOI...
[ { "answer_id": 314854, "author": "Bryant", "author_id": 10893, "author_profile": "https://Stackoverflow.com/users/10893", "pm_score": 1, "selected": true, "text": "void MyMethod()\n{\n wait = new ManualResetEvent(false);\n // call your service\n wait.WaitOne();\n // finish working\n}...
2008/11/24
[ "https://Stackoverflow.com/questions/314433", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12172/" ]
314,437
<p>I have a list of images that i’ve loaded with the Loader class, but I’m having a tough time assigning them unique names. I need unique names because I want to remove certain images after a while. Is there a way to assign loaders a name or some unique tag so i can remove them later? thanks.</p> <p>Here's part of my ...
[ { "answer_id": 314476, "author": "Simon", "author_id": 24039, "author_profile": "https://Stackoverflow.com/users/24039", "pm_score": 0, "selected": false, "text": "var img:Image;\nvar img_map:Object = new Object();\nvar last_added:int = 0;\nfor each (img in yourListOfImages)\n{\n img_...
2008/11/24
[ "https://Stackoverflow.com/questions/314437", "https://Stackoverflow.com", "https://Stackoverflow.com/users/34797/" ]
314,457
<p>Usually, I've seen it with forms, but I've found it helpful to group related sets of data (eg when you have multiple tables on a page, using a fieldset around each table or group of related tables to define a visible meaning and a group name (legend)). Is this abusing the fieldset tag to the point where, in my uses,...
[ { "answer_id": 314496, "author": "VonC", "author_id": 6309, "author_profile": "https://Stackoverflow.com/users/6309", "pm_score": 2, "selected": false, "text": ".fieldset {\nborder-right: 1px solid #75736E;\nborder-bottom: 1px solid #75736E;\nborder-left: 1px solid #F2F0EE;\nborder-top: ...
2008/11/24
[ "https://Stackoverflow.com/questions/314457", "https://Stackoverflow.com", "https://Stackoverflow.com/users/572/" ]
314,459
<p>I´m using <code>Transaction Binding=Explicit Unbind</code> in the connection string as recommended <a href="http://weblogs.asp.net/ryangaraygay/archive/2008/04/14/issue-with-system-transactions-sqlconnection-and-timeout.aspx" rel="noreferrer">here</a> since I´m also using TransactionScope with timeout. The problem i...
[ { "answer_id": 315109, "author": "Magnus Lindhe", "author_id": 966, "author_profile": "https://Stackoverflow.com/users/966", "pm_score": 3, "selected": true, "text": "using (SqlConnection con = new SqlConnection(connectionString))\n{\n con.Open();\n try\n {\n Console.Writ...
2008/11/24
[ "https://Stackoverflow.com/questions/314459", "https://Stackoverflow.com", "https://Stackoverflow.com/users/30790/" ]
314,463
<p>In Team Build 2008, the Drop Location for a build is no longer specified in the .proj file, and instead is stored in the database and maintained in the GUI tool.</p> <p>The GUI tool only accepts a network path as a drop location (i.e. \\server\share) and will not accept a local path.</p> <p>Our build server also h...
[ { "answer_id": 315109, "author": "Magnus Lindhe", "author_id": 966, "author_profile": "https://Stackoverflow.com/users/966", "pm_score": 3, "selected": true, "text": "using (SqlConnection con = new SqlConnection(connectionString))\n{\n con.Open();\n try\n {\n Console.Writ...
2008/11/24
[ "https://Stackoverflow.com/questions/314463", "https://Stackoverflow.com", "https://Stackoverflow.com/users/34409/" ]
314,465
<p>I have a MasterPage and a Content Page</p> <p>My Content Page has a number of controls, - dropdownlist, text boxes, radio buttons.</p> <p>I want to loop through all the control and if its one of the controls above then i want to obtain the selectedvalue, text etc</p> <p>I know I can access the control directly by...
[ { "answer_id": 314548, "author": "AlexCuse", "author_id": 794, "author_profile": "https://Stackoverflow.com/users/794", "pm_score": 0, "selected": false, "text": "foreach (Control c in ContentPlaceHolder1.Controls)\n{\n Response.Write(c.ID );\n}\n" }, { "answer_id": 314559, ...
2008/11/24
[ "https://Stackoverflow.com/questions/314465", "https://Stackoverflow.com", "https://Stackoverflow.com/users/38230/" ]