qid
int64
4
19.1M
question
stringlengths
18
48.3k
answers
list
date
stringlengths
10
10
metadata
list
171,400
<p>I'd like to know if anyone has any first-hand experience with this dichotomy. A few blogs say the mysql extension is faster than mysqli. Is this true?</p> <p>And I'm only asking about speed. I know mysqli has features that are not present in the older extension.</p>
[ { "answer_id": 17254568, "author": "Donovanr", "author_id": 2047064, "author_profile": "https://Stackoverflow.com/users/2047064", "pm_score": -1, "selected": false, "text": "SELECT * FROM users WHERE ID=$user_id $user_id SELECT * FROM users WHERE ID=? E_DEPRECATED" }, { "answer_i...
2008/10/05
[ "https://Stackoverflow.com/questions/171400", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3351/" ]
171,407
<p>Has anyone implemented Mozilla's Object.toSource() method for Internet Explorer and other non-Gecko browsers? I'm looking for a lightweight way to serialize simple objects into strings.</p>
[ { "answer_id": 171421, "author": "nickf", "author_id": 9021, "author_profile": "https://Stackoverflow.com/users/9021", "pm_score": 2, "selected": false, "text": "Object.prototype.getSource = function() {\n var output = [], temp;\n for (var i in this) {\n if (this.hasOwnPrope...
2008/10/05
[ "https://Stackoverflow.com/questions/171407", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4541/" ]
171,412
<p>I basically have an xml column, and I need to find and replace one tag value in each record.</p>
[ { "answer_id": 171429, "author": "Michael Petrotta", "author_id": 23897, "author_profile": "https://Stackoverflow.com/users/23897", "pm_score": 4, "selected": false, "text": "SELECT * FROM Table\nWHERE XMLColumn.exist('/Root/MyElement') = 1\n SET XMLColumn.modify('\n replace value of (/...
2008/10/05
[ "https://Stackoverflow.com/questions/171412", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5416/" ]
171,435
<p>I know that the #warning directive is not standard <strong>C</strong>/C++, but several compilers support it, including gcc/g++. But for those that don't support it, will they silently ignore it or will it result in a compile failure? In other words, can I safely use it in my project without breaking the build for ...
[ { "answer_id": 40147989, "author": "Fantastory", "author_id": 621706, "author_profile": "https://Stackoverflow.com/users/621706", "pm_score": 2, "selected": false, "text": "#ifdef __GNUC__\n//from https://gcc.gnu.org/onlinedocs/gcc/Diagnostic-Pragmas.html\n//Instead of put such pragma in...
2008/10/05
[ "https://Stackoverflow.com/questions/171435", "https://Stackoverflow.com", "https://Stackoverflow.com/users/78437/" ]
171,452
<p>I've got an app that my client wants to open a kiosk window to ie on startup that goes to their corporate internet. Vb isn't my thing but they wanted it integrated into their current program and I figured it would be easy so I've got</p> <pre><code>Shell ("explorer.exe http://www.corporateintranet.com") </code></p...
[ { "answer_id": 171459, "author": "Greg Hewgill", "author_id": 893, "author_profile": "https://Stackoverflow.com/users/893", "pm_score": 2, "selected": false, "text": "iexplore.exe explorer.exe" }, { "answer_id": 171465, "author": "Community", "author_id": -1, "author_...
2008/10/05
[ "https://Stackoverflow.com/questions/171452", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
171,474
<p>I'm curious what tools people have found useful for building flowcharts. Obviously MS Visio and OmniGraffle come to mind but they both feel so bloated and also tend to emphasize the document formatting/printing side and less on helping to organize the actual logic. Is there anything else out there that fellow develo...
[ { "answer_id": 173034, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 3, "selected": false, "text": "digraph finite_state_machine {\n rankdir=LR;\n size=\"8,5\"\n node [shape = doublecircle]; LR_0 LR_3 LR_4 LR_8;\n ...
2008/10/05
[ "https://Stackoverflow.com/questions/171474", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5291/" ]
171,480
<p>I have a value like this:</p> <pre class="lang-none prettyprint-override"><code>"Foo Bar" "Another Value" something else </code></pre> <p>What regex will return the values enclosed in the quotation marks (e.g. <code>Foo Bar</code> and <code>Another Value</code>)?</p>
[ { "answer_id": 171483, "author": "Greg Hewgill", "author_id": 893, "author_profile": "https://Stackoverflow.com/users/893", "pm_score": 9, "selected": false, "text": "\"(.*?)\"\n >>> import re\n>>> string = '\"Foo Bar\" \"Another Value\"'\n>>> print re.findall(r'\"(.*?)\"', string)\n['Fo...
2008/10/05
[ "https://Stackoverflow.com/questions/171480", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4646/" ]
171,506
<p>I've been unsuccessfully searching for a way to install <code>make</code> utility on my CentOS 5.2. I've looked through some RPM repositories and online, with no avail. Installing <code>gcc</code>, <code>gcc-c++</code> didn't help! Package <code>build-essential</code> is not made for CentOS/RHEL. I have RPMFORGE rep...
[ { "answer_id": 1539224, "author": "Daniel Von Fange", "author_id": 62621, "author_profile": "https://Stackoverflow.com/users/62621", "pm_score": 5, "selected": false, "text": "yum install make\n" }, { "answer_id": 3523405, "author": "CagedMantis", "author_id": 71002, ...
2008/10/05
[ "https://Stackoverflow.com/questions/171506", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18406/" ]
171,512
<p>I wish to implement a 2d bit map class in Python. The class would have the following requirements:</p> <ol> <li><p>Allow the creating of arbitrarily sized 2d bitmaps. i.e. to create an 8 x 8 bitmap (8 bytes), something like:</p> <pre><code>bitmap = Bitmap(8,8) </code></pre></li> <li><p>provide an API to access the...
[ { "answer_id": 171672, "author": "gimel", "author_id": 6491, "author_profile": "https://Stackoverflow.com/users/6491", "pm_score": 4, "selected": true, "text": ">>> a = np.array([[[1,0,1],\n... [0,1,0]],\n... [[1,1,0],\n... [0,0,1]]])\n>>> b = ...
2008/10/05
[ "https://Stackoverflow.com/questions/171512", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10942/" ]
171,516
<p>In my ASP.NET application using InProc sessions, Session_End calls a static method in another object to do session-specific clean up. This clean up uses a shared database connection that I am storing in application state.</p> <p>The problem is that I cannot see how to access the application state without passing i...
[ { "answer_id": 171538, "author": "Greg Dean", "author_id": 1200558, "author_profile": "https://Stackoverflow.com/users/1200558", "pm_score": 1, "selected": false, "text": "void Session_End(object sender, EventArgs e) \n{\n HttpSessionState session = this.Session;\n}\n" }, { "a...
2008/10/05
[ "https://Stackoverflow.com/questions/171516", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6234/" ]
171,519
<p>I'm looking for a way to authenticate users through LDAP with PHP (with Active Directory being the provider). Ideally, it should be able to run on IIS 7 (<a href="http://adldap.sourceforge.net/" rel="noreferrer">adLDAP</a> does it on Apache). Anyone had done anything similar, with success?</p> <ul> <li>Edit: I'd pr...
[ { "answer_id": 172042, "author": "ceejayoz", "author_id": 1902010, "author_profile": "https://Stackoverflow.com/users/1902010", "pm_score": 8, "selected": true, "text": "$ldap = ldap_connect(\"ldap.example.com\");\nif ($bind = ldap_bind($ldap, $_POST['username'], $_POST['password'])) {\n...
2008/10/05
[ "https://Stackoverflow.com/questions/171519", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18406/" ]
171,529
<p>I have this Task model:</p> <pre><code>class Task &lt; ActiveRecord::Base acts_as_tree :order =&gt; 'sort_order' end </code></pre> <p>And I have this test</p> <pre><code>class TaskTest &lt; Test::Unit::TestCase def setup @root = create_root end def test_destroying_a_task_should_destroy_all_of_its_des...
[ { "answer_id": 172553, "author": "Orion Edwards", "author_id": 234, "author_profile": "https://Stackoverflow.com/users/234", "pm_score": 1, "selected": false, "text": "children .children Task.count d1.children.count" }, { "answer_id": 173169, "author": "gsmendoza", "autho...
2008/10/05
[ "https://Stackoverflow.com/questions/171529", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11082/" ]
171,541
<p>I have a service app that creates AppDomain's during the course of its use for long running tasks. I've been tracking these by storing them in a Hashtable with a unique ID.</p> <p>After a task is completed the service app then unloads the AppDomain allocated to that task and then it's removed it from the appdomain ...
[ { "answer_id": 172553, "author": "Orion Edwards", "author_id": 234, "author_profile": "https://Stackoverflow.com/users/234", "pm_score": 1, "selected": false, "text": "children .children Task.count d1.children.count" }, { "answer_id": 173169, "author": "gsmendoza", "autho...
2008/10/05
[ "https://Stackoverflow.com/questions/171541", "https://Stackoverflow.com", "https://Stackoverflow.com/users/419/" ]
171,542
<p>I'm trying to set the width and height of an element with javascript to cover the entire browser viewport, and I'm successful using <pre>document.body.clientHeight</pre> but in IE6 it seems that I always get horizontal and vertical scrollbars because the element must be slightly too big. </p> <p>Now, I really don't...
[ { "answer_id": 171544, "author": "micahwittman", "author_id": 11181, "author_profile": "https://Stackoverflow.com/users/11181", "pm_score": 2, "selected": false, "text": "<script type=\"text/javascript\">\n<!--\n\n var viewportwidth;\n var viewportheight;\n\n // the more standards compli...
2008/10/05
[ "https://Stackoverflow.com/questions/171542", "https://Stackoverflow.com", "https://Stackoverflow.com/users/25066/" ]
171,548
<p>I have always been for documenting code, but when it comes to AJAX + PHP, it's not always easy: the code is really spread out! Logic, data, presentation - you name it - are split and mixed between server-side and client-side code. Sometimes there's also database-side code (stored procedures, views, etc) doing part o...
[ { "answer_id": 191907, "author": "Ken", "author_id": 20074, "author_profile": "https://Stackoverflow.com/users/20074", "pm_score": 1, "selected": false, "text": "function OutputJs($Content) {\n ob_start();\n echo $Content;\n $expires = DAY_IN_S;\n header(\"Content-type: x-jav...
2008/10/05
[ "https://Stackoverflow.com/questions/171548", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18406/" ]
171,550
<blockquote> <p><strong>See also:</strong> <br/> <em><a href="https://stackoverflow.com/questions/4950725">How can I see which Git branches are tracking which remote / upstream branch?</a></em></p> </blockquote> <p>How can I find out which remote branch a local branch is tracking?</p> <p>Do I need to parse <cod...
[ { "answer_id": 7251377, "author": "Aaron Wells", "author_id": 468642, "author_profile": "https://Stackoverflow.com/users/468642", "pm_score": 7, "selected": false, "text": "@{u} git log remotename/branchname..HEAD LOCAL_BRANCH=`git name-rev --name-only HEAD`\nTRACKING_BRANCH=`git config ...
2008/10/05
[ "https://Stackoverflow.com/questions/171550", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4883/" ]
171,565
<p>Is there a tool/plugin/function for Firefox that'll dump out a memory usage of Javascript objects that you create in a page/script? I know about Firebug's profiler but I'd like something more than just times. Something akin to what Yourkit has for Java profiling of memory usage.</p> <p>Reason is that a co-worker is...
[ { "answer_id": 172105, "author": "Nickolay", "author_id": 1026, "author_profile": "https://Stackoverflow.com/users/1026", "pm_score": 3, "selected": false, "text": "Array Object" }, { "answer_id": 22458462, "author": "Jan Wrobel", "author_id": 1031601, "author_profile...
2008/10/05
[ "https://Stackoverflow.com/questions/171565", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8590/" ]
171,566
<p>Im using delphi's ttreeview as an 'options' menu. how would i go upon selecting the next node at runtime like a previous and next button? i tried the getprev and getnext methods but no luck.</p>
[ { "answer_id": 171722, "author": "John Thomas", "author_id": 22599, "author_profile": "https://Stackoverflow.com/users/22599", "pm_score": 3, "selected": false, "text": "procedure TForm8.btn1Click(Sender: TObject); \nvar \n crt: TTreeNode;\n\nbegin\n with tv1 do //this is our tree\n ...
2008/10/05
[ "https://Stackoverflow.com/questions/171566", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
171,569
<p>Actually I will want to use that JeOS for our webserver. Is it a good choice?</p>
[ { "answer_id": 171722, "author": "John Thomas", "author_id": 22599, "author_profile": "https://Stackoverflow.com/users/22599", "pm_score": 3, "selected": false, "text": "procedure TForm8.btn1Click(Sender: TObject); \nvar \n crt: TTreeNode;\n\nbegin\n with tv1 do //this is our tree\n ...
2008/10/05
[ "https://Stackoverflow.com/questions/171569", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
171,588
<p>If I modify or add an environment variable I have to restart the command prompt. Is there a command I could execute that would do this without restarting CMD?</p>
[ { "answer_id": 171737, "author": "itsadok", "author_id": 7581, "author_profile": "https://Stackoverflow.com/users/7581", "pm_score": 8, "selected": true, "text": "resetvars.vbs Set oShell = WScript.CreateObject(\"WScript.Shell\")\nfilename = oShell.ExpandEnvironmentStrings(\"%TEMP%\\rese...
2008/10/05
[ "https://Stackoverflow.com/questions/171588", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3957/" ]
171,596
<p>After having implemented the strategy pattern, I wanted to make an array of the interface-type, to which I can then add any concrete type. </p> <p>For those who don't know the strategy pattern: <a href="http://en.wikipedia.org/wiki/Strategy_pattern" rel="nofollow noreferrer">http://en.wikipedia.org/wiki/Strategy_pa...
[ { "answer_id": 171605, "author": "1800 INFORMATION", "author_id": 3146, "author_profile": "https://Stackoverflow.com/users/3146", "pm_score": 3, "selected": false, "text": "typedef std::vector<Interface *> Array;\nArray myArray;\nmyArray.push_back(new A());\n typedef boost::ptr_vector<In...
2008/10/05
[ "https://Stackoverflow.com/questions/171596", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23163/" ]
171,601
<p>WPF WebBrowser control looks great but knowledge accumlated over time about WinForms WebBrowser is substantial and it's hard to ignore work like csExWB. It would be nice to know what functional shortcomings or advantages exists in .NET 3.5's WPF WebBrowser control over WinForms WebBrowser control. In particular, is ...
[ { "answer_id": 1152092, "author": "Marco Luglio", "author_id": 14263, "author_profile": "https://Stackoverflow.com/users/14263", "pm_score": 3, "selected": false, "text": "IsWebBrowserContextMenuEnabled ActiveXInstance document System.Windows.Forms.HtmlDocument PointToClient GetElementFr...
2008/10/05
[ "https://Stackoverflow.com/questions/171601", "https://Stackoverflow.com", "https://Stackoverflow.com/users/406313/" ]
171,633
<p>When using one's own iPhone for development it's easy enough to access any crash logs via XCode->Organizer->Crash Logs.</p> <p>How does one access crash logs on another person's phone if they don't have it set up for development in XCode, as would likely be the case if you were distributing your app to them via ad ...
[ { "answer_id": 4504889, "author": "Simon Whitaker", "author_id": 263871, "author_profile": "https://Stackoverflow.com/users/263871", "pm_score": 4, "selected": false, "text": "~/Library/Logs/CrashReporter/MobileDevice/<DEVICE_NAME> C:\\Documents and Settings\\<USERNAME>\\Application Data...
2008/10/05
[ "https://Stackoverflow.com/questions/171633", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1512/" ]
171,640
<p>In multi-threaded code, when an instance may be read or written by multiple threads, they need to be locked on to perform these operations safely.</p> <p>To avoid the repetition of creating an object to lock on and writing a bunch of lock statements through code, I've created a generic class to handle the locking. ...
[ { "answer_id": 171665, "author": "1800 INFORMATION", "author_id": 3146, "author_profile": "https://Stackoverflow.com/users/3146", "pm_score": 1, "selected": false, "text": "this.runningThreads.Set(this.runningThreads.Get() + 1);\n Get() Get Set using (Locked<T> lock = Locked<T>(instance)...
2008/10/05
[ "https://Stackoverflow.com/questions/171640", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11574/" ]
171,641
<p>When maintaining a <code>COM</code> interface should an empty <code>BSTR</code> be treated the same way as <code>NULL</code>? In other words should these two function calls produce the same result?</p> <pre><code> // Empty BSTR CComBSTR empty(L""); // Or SysAllocString(L"") someObj-&gt;Foo(empty); // NULL BSTR ...
[ { "answer_id": 171644, "author": "1800 INFORMATION", "author_id": 3146, "author_profile": "https://Stackoverflow.com/users/3146", "pm_score": 5, "selected": true, "text": "strlen std::string" } ]
2008/10/05
[ "https://Stackoverflow.com/questions/171641", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3848/" ]
171,662
<p>I'm trying to output a list of string values into a 2 column format. The standard way of making a list of strings into "normal text" is by using the <strong>string.join</strong> method. However, it only takes 2 arguments so I can only make a single column using "\n". I thought trying to make a loop that would simply...
[ { "answer_id": 171686, "author": "Douglas Leeder", "author_id": 3978, "author_profile": "https://Stackoverflow.com/users/3978", "pm_score": 0, "selected": false, "text": "data = [ (\"1\",\"2\"),(\"3\",\"4\") ]\nprint \"\\n\".join(map(\"\\t\".join,data))\n" }, { "answer_id": 17170...
2008/10/05
[ "https://Stackoverflow.com/questions/171662", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18676/" ]
171,664
<p>I have not used generics much and so cannot figure out if it is possible to turn the following three methods into one using generics to reduce duplication. Actually my code currently has six methods but if you can solve it for the three then the rest should just work anyway with the same solution.</p> <pre><code> ...
[ { "answer_id": 171668, "author": "Marc Gravell", "author_id": 23354, "author_profile": "https://Stackoverflow.com/users/23354", "pm_score": 4, "selected": true, "text": " public T Evaluate<T>(T x, T y) {\n switch (Operation)\n {\n case BinaryOp.Add:\n return...
2008/10/05
[ "https://Stackoverflow.com/questions/171664", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6276/" ]
171,673
<p>I've been trying to create a Windows Media Player plugin in Visual Studio 2008, and am having great difficulty finding the correct template. MSDN provides advice <a href="http://msdn.microsoft.com/en-us/library/bb262076(VS.85).aspx" rel="nofollow noreferrer">here</a>, but it does not appear to be relevant to VS2008....
[ { "answer_id": 171668, "author": "Marc Gravell", "author_id": 23354, "author_profile": "https://Stackoverflow.com/users/23354", "pm_score": 4, "selected": true, "text": " public T Evaluate<T>(T x, T y) {\n switch (Operation)\n {\n case BinaryOp.Add:\n return...
2008/10/05
[ "https://Stackoverflow.com/questions/171673", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11484/" ]
171,694
<p>Many times I will use the same font scheme for static text in a wxPython application. Currently I am making a <code>SetFont()</code> call for each static text object but that seems like a lot of unnecessary work. However, the wxPython demo and wxPython In Action book don't discuss this.</p> <p>Is there a way to eas...
[ { "answer_id": 171702, "author": "kender", "author_id": 4172, "author_profile": "https://Stackoverflow.com/users/4172", "pm_score": 1, "selected": false, "text": "__init__ def f(C):\n x = C()\n x.SetFont(font) # where font is defined somewhere else\n return x\n text = f(wx.StaticText)...
2008/10/05
[ "https://Stackoverflow.com/questions/171694", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18676/" ]
171,699
<p>I'm developing and application that runs as a Windows service. There are other components which include a few WCF services, a client GUI and so on - but it is the Windows service that access the database.</p> <p>So, the application is a long-running server, and I'd like to improve its performance and scalability, I...
[ { "answer_id": 324185, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 0, "selected": false, "text": "private void BeginTransaction(object sender, EventArgs e) {\n NHibernateSessionManager.Instance.BeginTransaction();\n}\npri...
2008/10/05
[ "https://Stackoverflow.com/questions/171699", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6995/" ]
171,727
<p>How do i delete all the tables in the schema on Apache Derby DB using JDBC?</p>
[ { "answer_id": 171773, "author": "Telcontar", "author_id": 518, "author_profile": "https://Stackoverflow.com/users/518", "pm_score": 2, "selected": false, "text": "DROP TABLE [tablename]\n tablename SELECT tablename FROM SYSTABLES\n" }, { "answer_id": 13928594, "author": "gre...
2008/10/05
[ "https://Stackoverflow.com/questions/171727", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15100/" ]
171,730
<p>I have a small problem with interfaces. Here it is in Pseudo code :</p> <pre><code>type Interface1 = interface end; Interface2 = interface end; TParentClass = class(TInterfacedObject, Interface1) private fChild : Interface2; public procedure AddChild(aChild : Interface2); end; TChildCla...
[ { "answer_id": 171795, "author": "Barry Kelly", "author_id": 3712, "author_profile": "https://Stackoverflow.com/users/3712", "pm_score": 4, "selected": true, "text": "TChildClass = class(TInterfacedObject, Interface2)\nprivate\n fParent : Pointer;\n function GetParent: Interface1;\npub...
2008/10/05
[ "https://Stackoverflow.com/questions/171730", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22712/" ]
171,765
<p>Here's the very dumb way:</p> <pre><code>def divisorGenerator(n): for i in xrange(1,n/2+1): if n%i == 0: yield i yield n </code></pre> <p>The result I'd like to get is similar to this one, but I'd like a smarter algorithm (this one it's too much slow and dumb :-)</p> <p>I can find prime factors an...
[ { "answer_id": 171779, "author": "Matthew Scharley", "author_id": 15537, "author_profile": "https://Stackoverflow.com/users/15537", "pm_score": 5, "selected": false, "text": "n / i import math\n\ndef divisorGenerator(n):\n large_divisors = []\n for i in xrange(1, int(math.sqrt(n) +...
2008/10/05
[ "https://Stackoverflow.com/questions/171765", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21384/" ]
171,771
<p>Okay, so I'm doing my first foray into using the ADO.NET Entity Framework. </p> <p>My test case right now includes a SQL Server 2008 database with 2 tables, Member and Profile, with a 1:1 relationship.</p> <p>I then used the Entity Data Model wizard to auto-generate the EDM from the database. It generated a model ...
[ { "answer_id": 173273, "author": "Gerald", "author_id": 19404, "author_profile": "https://Stackoverflow.com/users/19404", "pm_score": 4, "selected": true, "text": "IQueryable<Member> membersQuery = from m in members.Include(\"Profile\") select m;\n" }, { "answer_id": 329342, ...
2008/10/05
[ "https://Stackoverflow.com/questions/171771", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19404/" ]
171,776
<p>I've looked at <a href="http://en.wikipedia.org/wiki/Strategy_pattern" rel="noreferrer">this explanation on Wikipedia</a>, specifically the C++ sample, and fail to recognize the difference between just defining 3 classes, creating instances and calling them, and that example. What I saw was just placing two other cl...
[ { "answer_id": 171781, "author": "C. K. Young", "author_id": 13, "author_profile": "https://Stackoverflow.com/users/13", "pm_score": 1, "selected": false, "text": "execute ioctl" }, { "answer_id": 171782, "author": "Garth Gilmour", "author_id": 2635682, "author_profil...
2008/10/05
[ "https://Stackoverflow.com/questions/171776", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15161/" ]
171,778
<p>Using NHibernate from C# and only HQL (not SQL) in a way that is compatible with MS SQL Server 2005/2008 (and preferably Oracle).</p> <p>Is there a way to write the order by clause so that nulls will sort at the end of the query results while the non-null results will be sorted in ascending order?</p> <p>Based on ...
[ { "answer_id": 171781, "author": "C. K. Young", "author_id": 13, "author_profile": "https://Stackoverflow.com/users/13", "pm_score": 1, "selected": false, "text": "execute ioctl" }, { "answer_id": 171782, "author": "Garth Gilmour", "author_id": 2635682, "author_profil...
2008/10/05
[ "https://Stackoverflow.com/questions/171778", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3509/" ]
171,785
<p>When it comes to organizing python modules, my Mac OS X system is a mess. I've packages lying around everywhere on my hdd and no particular system to organize them.</p> <p>How do you keep everything manageable?</p>
[ { "answer_id": 172538, "author": "S.Lott", "author_id": 10661, "author_profile": "https://Stackoverflow.com/users/10661", "pm_score": 3, "selected": false, "text": "Components Projects setup.py Projects setup.py PYTHONPATH" }, { "answer_id": 173715, "author": "codeape", "...
2008/10/05
[ "https://Stackoverflow.com/questions/171785", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20672/" ]
171,809
<p>Are there LaTeX packages for (more or less) easily drawing Gantt diagrams?</p> <p>Thanks.</p>
[ { "answer_id": 2772068, "author": "ablaeul", "author_id": 331618, "author_profile": "https://Stackoverflow.com/users/331618", "pm_score": 2, "selected": false, "text": "\\psline" } ]
2008/10/05
[ "https://Stackoverflow.com/questions/171809", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11384/" ]
171,816
<p>(The original question was asked there : <a href="http://www.ogre3d.org/phpBB2/viewtopic.php?t=44832" rel="nofollow noreferrer">http://www.ogre3d.org/phpBB2/viewtopic.php?t=44832</a> )</p> <p>Someone asked : "While I would like to build everything in vs2008 (VC9), the PhysX SDK is built with vs2005 (VC8). Would th...
[ { "answer_id": 2772068, "author": "ablaeul", "author_id": 331618, "author_profile": "https://Stackoverflow.com/users/331618", "pm_score": 2, "selected": false, "text": "\\psline" } ]
2008/10/05
[ "https://Stackoverflow.com/questions/171816", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2368/" ]
171,824
<p>I have a plug-in to an Eclipse RCP application that has a view. After an event occurs in the RCP application, the plug-in is instantiated, its methods are called to populate the plug-in's model, but I cannot find how to make the view appear without going to the "Show View..." menu.</p> <p>I would think that there ...
[ { "answer_id": 172082, "author": "ILikeCoffee", "author_id": 25270, "author_profile": "https://Stackoverflow.com/users/25270", "pm_score": 7, "selected": true, "text": "PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView(\"viewId\");\n" }, { "answer_id":...
2008/10/05
[ "https://Stackoverflow.com/questions/171824", "https://Stackoverflow.com", "https://Stackoverflow.com/users/725/" ]
171,828
<p>When receiving a bug report or an it-doesnt-work message one of my initials questions is always what version? With a different builds being at many stages of testing, planning and deploying this is often a non-trivial question.</p> <p>I the case of releasing Java JAR (ear, jar, rar, war) files I would like to be ab...
[ { "answer_id": 171859, "author": "Blair Conrad", "author_id": 1199, "author_profile": "https://Stackoverflow.com/users/1199", "pm_score": 2, "selected": false, "text": "svn info" }, { "answer_id": 171927, "author": "Peter Hilton", "author_id": 2670, "author_profile": ...
2008/10/05
[ "https://Stackoverflow.com/questions/171828", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16352/" ]
171,835
<p><a href="http://oreilly.com/catalog/9780596515829/" rel="nofollow noreferrer">Python for Unix and Linux System Administration</a> is aimed at sysadmins. Any other favorites besides this.</p>
[ { "answer_id": 1149731, "author": "ghostdog74", "author_id": 131527, "author_profile": "https://Stackoverflow.com/users/131527", "pm_score": 3, "selected": false, "text": " for line in open(\"file\"):\n print line\n f=open(\"file\")\n for line in f:\n print line\n f.close()\...
2008/10/05
[ "https://Stackoverflow.com/questions/171835", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11065/" ]
171,849
<p>I have a program that spits out an Excel workbook in Excel 2003 XML format. It works fine with one problem, I cannot get the column widths to set automatically.</p> <p>A snippet of what I produce:</p> <pre><code> &lt;Table &gt; &lt;Column ss:AutoFitWidth="1" ss:Width="2"/&gt; &lt;Row ss:AutoFitHeight="0" s...
[ { "answer_id": 26046306, "author": "Mathijs Beentjes", "author_id": 4080802, "author_profile": "https://Stackoverflow.com/users/4080802", "pm_score": 0, "selected": false, "text": " <xsl:for-each select=\"/*/*[1]/*\">\n <Column>\n <xsl:variable name=\"columnNum\" select=\"...
2008/10/05
[ "https://Stackoverflow.com/questions/171849", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5189/" ]
171,855
<p>I want to update a list of storage devices as the user inserts USB keys, adds external disks and mounts disk images. IOKit's IOServiceAddInterestNotification looks like the way to go, but the obvious use of registering general interest in kIOMediaClass only gives you notifications for unmounting of volumes and then ...
[ { "answer_id": 171973, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 0, "selected": false, "text": "/Volumes" }, { "answer_id": 194691, "author": "Rhythmic Fistman", "author_id": 22147, "author_profile": "h...
2008/10/05
[ "https://Stackoverflow.com/questions/171855", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22147/" ]
171,862
<p>When authoring a library in a particular namespace, it's often convenient to provide overloaded operators for the classes in that namespace. It seems (at least with g++) that the overloaded operators can be implemented either in the library's namespace:</p> <pre><code>namespace Lib { class A { }; A operator+(cons...
[ { "answer_id": 171881, "author": "Ates Goral", "author_id": 23501, "author_profile": "https://Stackoverflow.com/users/23501", "pm_score": 2, "selected": false, "text": "namespace Lib {\n\nclass A {\npublic:\n A operator+(const A&);\n};\n\n} // namespace Lib\n" } ]
2008/10/05
[ "https://Stackoverflow.com/questions/171862", "https://Stackoverflow.com", "https://Stackoverflow.com/users/78437/" ]
171,868
<p>When you take your first look at an Oracle database, one of the first questions is often "where's the alert log?". Grid Control can tell you, but its often not available in the environment.</p> <p>I posted some bash and Perl scripts to find and tail the alert log <a href="http://tardate.blogspot.com/2007/04/find-an...
[ { "answer_id": 172936, "author": "pjf", "author_id": 19422, "author_profile": "https://Stackoverflow.com/users/19422", "pm_score": 2, "selected": false, "text": "File::Tail::App" } ]
2008/10/05
[ "https://Stackoverflow.com/questions/171868", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6329/" ]
171,873
<p>I try to write KSH script for processing a file consisting of name-value pairs, several of them on each line.</p> <p>Format is:</p> <pre><code>NAME1 VALUE1,NAME2 VALUE2,NAME3 VALUE3, etc </code></pre> <p>Suppose I write:</p> <pre><code>read l IFS="," set -A nvls $l echo "$nvls[2]" </code></pre> <p>This will giv...
[ { "answer_id": 171945, "author": "ADEpt", "author_id": 10105, "author_profile": "https://Stackoverflow.com/users/10105", "pm_score": 1, "selected": false, "text": "sed -e 's/\\([^\\]\\),/\\1\\\n/g;s/$/\\\n/\n NAME1.1 VALUE1.1\nNAME1.2 VALUE1.2_1\\,VALUE1.2_2\nNAME1.3 VALUE1.3\n<empty lin...
2008/10/05
[ "https://Stackoverflow.com/questions/171873", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10105/" ]
171,917
<h2>Context:</h2> <p>A while ago, I stumbled upon this 2001 DDJ article by Alexandrescu: <a href="http://www.ddj.com/cpp/184403799" rel="noreferrer">http://www.ddj.com/cpp/184403799</a></p> <p>It's about comparing various ways to initialized a buffer to some value. Like what "memset" does for single-byte values. He ...
[ { "answer_id": 172489, "author": "Zooba", "author_id": 891, "author_profile": "https://Stackoverflow.com/users/891", "pm_score": 3, "selected": false, "text": "for" }, { "answer_id": 173572, "author": "Skizz", "author_id": 1898, "author_profile": "https://Stackoverflo...
2008/10/05
[ "https://Stackoverflow.com/questions/171917", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20055/" ]
171,924
<p>Is it possible to check a bash script syntax without executing it?</p> <p>Using Perl, I can run <code>perl -c 'script name'</code>. Is there any equivalent command for bash scripts?</p>
[ { "answer_id": 171932, "author": "andy", "author_id": 6152, "author_profile": "https://Stackoverflow.com/users/6152", "pm_score": 10, "selected": true, "text": "bash -n scriptname\n ech hello echo hello" }, { "answer_id": 4874883, "author": "Jeevan", "author_id": 600032, ...
2008/10/05
[ "https://Stackoverflow.com/questions/171924", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13523/" ]
171,928
<p>I am using the <a href="https://jqueryui.com/dialog/" rel="noreferrer"><code>jquery-ui-dialog</code></a> plugin</p> <p>I am looking for way to refresh the page when in some circumstances when the dialog is closed.</p> <p>Is there a way to capture a close event from the dialog?</p> <p>I know I can run code when th...
[ { "answer_id": 172000, "author": "Brownie", "author_id": 6600, "author_profile": "https://Stackoverflow.com/users/6600", "pm_score": 9, "selected": true, "text": " $('div#popup_content').on('dialogclose', function(event) {\n alert('closed');\n });\n" }, { "answer_id": 172506,...
2008/10/05
[ "https://Stackoverflow.com/questions/171928", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6600/" ]
171,948
<p>I've been hearing a lot about about how the new version of VMWare Fusion can run virtual operating systems in "headless mode". </p> <p>A Google search makes it clear that other virtualisation products also have similar features, however, I have not been able to find a good description of what this actually means? W...
[ { "answer_id": 171951, "author": "Binarytales", "author_id": 319, "author_profile": "https://Stackoverflow.com/users/319", "pm_score": 2, "selected": false, "text": "defaults write com.vmware.fusion fluxCapacitor -bool YES\n" } ]
2008/10/05
[ "https://Stackoverflow.com/questions/171948", "https://Stackoverflow.com", "https://Stackoverflow.com/users/319/" ]
171,952
<p>Is there a destructor for Java? I don't seem to be able to find any documentation on this. If there isn't, how can I achieve the same effect?</p> <p>To make my question more specific, I am writing an application that deals with data and the specification say that there should be a 'reset' button that brings the app...
[ { "answer_id": 171955, "author": "flicken", "author_id": 12880, "author_profile": "https://Stackoverflow.com/users/12880", "pm_score": 4, "selected": false, "text": "java.lang.Object#finalize java.lang.Runtime#runFinalizersOnExit(boolean)" }, { "answer_id": 171956, "author": ...
2008/10/05
[ "https://Stackoverflow.com/questions/171952", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18500/" ]
171,962
<p>I'm storing all localizable strings in a <code>ResourceDictionary</code> (in <code>App.xaml</code>) and assign those via the <code>StaticResource</code> markup extension to <code>TextBlock.Text</code>, <code>Button.Content</code> etc.</p> <p>In Beta 2 and RC0, <em>sometimes</em> parsing the XAML in <code>Initialize...
[ { "answer_id": 179607, "author": "Brian Leahy", "author_id": 580, "author_profile": "https://Stackoverflow.com/users/580", "pm_score": 2, "selected": false, "text": "Text=\"{StaticResource bleh}\" \n Text = \"{StaticResource bleh}\"\n" } ]
2008/10/05
[ "https://Stackoverflow.com/questions/171962", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23222/" ]
171,970
<p>When logging in C#, how can I learn the name of the method that called the current method? I know all about <code>System.Reflection.MethodBase.GetCurrentMethod()</code>, but I want to go one step beneath this in the stack trace. I've considered parsing the stack trace, but I am hoping to find a cleaner more explicit...
[ { "answer_id": 171974, "author": "Firas Assaad", "author_id": 23153, "author_profile": "https://Stackoverflow.com/users/23153", "pm_score": 10, "selected": true, "text": "using System.Diagnostics;\n// Get call stack\nStackTrace stackTrace = new StackTrace(); \n// Get calling method name\...
2008/10/05
[ "https://Stackoverflow.com/questions/171970", "https://Stackoverflow.com", "https://Stackoverflow.com/users/470/" ]
171,999
<p>How can I extract the whole line in a row, for example, row 3. These data are saved in my text editor in linux. Here's my data:</p> <pre><code>1,julz,kath,shiela,angel 2,may,ann,janice,aika 3,christal,justine,kim 4,kris,allan,jc,mine </code></pre> <p>I want output like:</p> <pre><code>3,christal,justine,kim </cod...
[ { "answer_id": 172005, "author": "Adam Bellaire", "author_id": 21632, "author_profile": "https://Stackoverflow.com/users/21632", "pm_score": 2, "selected": false, "text": "open $fh, \"myfile.txt\";\nmy @lines = <$fh>;\n $lines[2]" }, { "answer_id": 172017, "author": "jfs", ...
2008/10/05
[ "https://Stackoverflow.com/questions/171999", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
172,018
<p>Is there a way to exclude all svn externals when doing a recursive update?</p> <p>Is there a way to exclude only 1 of all of the svn externals when doing a recursive update?</p> <p>Basically I'd like to cut down the svn update time, and a couple of the SVN externals that I have will just about never get updated.</...
[ { "answer_id": 172043, "author": "Adam Bellaire", "author_id": 21632, "author_profile": "https://Stackoverflow.com/users/21632", "pm_score": 6, "selected": true, "text": "> svn update --ignore-externals\n" } ]
2008/10/05
[ "https://Stackoverflow.com/questions/172018", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3153/" ]
172,066
<p>I'd like to create a subset of Users that don't have a login... basically as a way to add a photographer field to photos without having a full blown account associated with that person (since in many cases, they'll never actually log in to the site). A caveat is that I'd also like to be able to enable an account for...
[ { "answer_id": 172097, "author": "Jonny Buchanan", "author_id": 6760, "author_profile": "https://Stackoverflow.com/users/6760", "pm_score": 4, "selected": true, "text": "django.contrib.auth.models.User.get_profile AUTH_PROFILE_MODULE ForeignKey User get_profile ForeignKey User ForeignKey...
2008/10/05
[ "https://Stackoverflow.com/questions/172066", "https://Stackoverflow.com", "https://Stackoverflow.com/users/25274/" ]
172,095
<p>I'm doing some experiments with Microsoft Dynamics CRM. You interact with it through web services and I have added a Web Reference to my project. The web service interface is very rich, and the generated "Reference.cs" is some 90k loc. </p> <p>I'm using the web reference in a console application. I often change som...
[ { "answer_id": 172106, "author": "Alex Lyman", "author_id": 5897, "author_profile": "https://Stackoverflow.com/users/5897", "pm_score": 1, "selected": false, "text": "Sgen.exe Sgen" }, { "answer_id": 965857, "author": "Chris Marasti-Georg", "author_id": 96, "author_pr...
2008/10/05
[ "https://Stackoverflow.com/questions/172095", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2942/" ]
172,110
<p>How can I elegantly print the date in RFC822 format in Perl?</p>
[ { "answer_id": 172119, "author": "njsf", "author_id": 4995, "author_profile": "https://Stackoverflow.com/users/4995", "pm_score": 6, "selected": true, "text": "use POSIX qw(strftime);\nprint strftime(\"%a, %d %b %Y %H:%M:%S %z\", localtime(time())) . \"\\n\";\n" }, { "answer_id":...
2008/10/05
[ "https://Stackoverflow.com/questions/172110", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13523/" ]
172,111
<p>Is it possible to get notified (without polling, but via an event) when a drive letter becomes accessible. For example if you have an external hard drive that always appears as drive F - is it possible to have an event raised when that is connected and F becomes accessible?</p>
[ { "answer_id": 172119, "author": "njsf", "author_id": 4995, "author_profile": "https://Stackoverflow.com/users/4995", "pm_score": 6, "selected": true, "text": "use POSIX qw(strftime);\nprint strftime(\"%a, %d %b %Y %H:%M:%S %z\", localtime(time())) . \"\\n\";\n" }, { "answer_id":...
2008/10/05
[ "https://Stackoverflow.com/questions/172111", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1912/" ]
172,125
<p>Memory (and resource) leaks happen. How do you make sure they don't?</p> <p>What tips &amp; techniques would you suggest to help avoid creating memory leaks in first place?</p> <p>Once you have an application that is leaking how do you track down the source of leaks?</p> <p>(Oh and please avoid the "just use GC" ...
[ { "answer_id": 172243, "author": "mmalc", "author_id": 23233, "author_profile": "https://Stackoverflow.com/users/23233", "pm_score": 4, "selected": false, "text": "cd scan-build -k -V xcodebuild" }, { "answer_id": 172270, "author": "mmalc", "author_id": 23233, "author...
2008/10/05
[ "https://Stackoverflow.com/questions/172125", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23113/" ]
172,130
<p>Is there a way to stop the path showing in a source code tab in Visual Studio 2008?</p> <p>Currently when developing an ASP.NET site, I get the path from the root plus the filename - truncated when it gets too long. So something like:</p> <blockquote> <p>MyDir/MyPage.aspx</p> </blockquote> <p>for a short path a...
[ { "answer_id": 172243, "author": "mmalc", "author_id": 23233, "author_profile": "https://Stackoverflow.com/users/23233", "pm_score": 4, "selected": false, "text": "cd scan-build -k -V xcodebuild" }, { "answer_id": 172270, "author": "mmalc", "author_id": 23233, "author...
2008/10/05
[ "https://Stackoverflow.com/questions/172130", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4733/" ]
172,151
<p>I want to write a program in which plays an audio file that reads a text. I want to highlite the current syllable that the audiofile plays in green and the rest of the current word in red. What kind of datastructure should I use to store the audio file and the information that tells the program when to switch to th...
[ { "answer_id": 221712, "author": "Marcus Downing", "author_id": 1000, "author_profile": "https://Stackoverflow.com/users/1000", "pm_score": 3, "selected": true, "text": "{\\K132}Unmei {\\K34}no {\\K54}tobira\n{\\K60}{\\K132}yukkuri {\\K36}to {\\K142}hirakareta\n" } ]
2008/10/05
[ "https://Stackoverflow.com/questions/172151", "https://Stackoverflow.com", "https://Stackoverflow.com/users/25282/" ]
172,175
<p>Here's my code in a gridview that is bound at runtime:</p> <pre><code>... &lt;asp:templatefield&gt; &lt;edititemtemplate&gt; &lt;asp:dropdownlist runat="server" id="ddgvOpp" /&gt; &lt;/edititemtemplate&gt; &lt;itemtemplate&gt; &lt;%# Eval("opponent.name") %&gt; &lt;/itemtemplate&gt; ...
[ { "answer_id": 172220, "author": "Jason", "author_id": 7173, "author_profile": "https://Stackoverflow.com/users/7173", "pm_score": 4, "selected": true, "text": "if (myGridView.EditIndex == e.Row.RowIndex)\n{\n //do work\n}\n" }, { "answer_id": 1198319, "author": "Communit...
2008/10/05
[ "https://Stackoverflow.com/questions/172175", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7173/" ]
172,176
<p>What is the best way to deal with storing and indexing URL's in SQL Server 2005? </p> <p>I have a WebPage table that stores metadata and content about Web Pages. I also have many other tables related to the WebPage table. They all use URL as a key. </p> <p>The problem is URL's can be very large, and using them as ...
[ { "answer_id": 172205, "author": "Dylan Beattie", "author_id": 5017, "author_profile": "https://Stackoverflow.com/users/5017", "pm_score": 3, "selected": true, "text": "CREATE FUNCTION GetUrlId (@Url nvarchar(400)) \nRETURNS int\nAS BEGIN\n DECLARE @UrlId int\n SELECT @UrlId = Id FROM ...
2008/10/05
[ "https://Stackoverflow.com/questions/172176", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1982/" ]
172,192
<p>I am working on a web-application in which dynamically-created images are used to display information. This data is currently sent to the images using a GET query-string but with more complex images and data I am worried about running into problems with the url character limit.</p> <p>I could simply pass the record...
[ { "answer_id": 172292, "author": "Jacob", "author_id": 8119, "author_profile": "https://Stackoverflow.com/users/8119", "pm_score": 0, "selected": false, "text": "<? //index.php\n $_SESSION['imagedata']['header'] = array('name'=>'Simon','backgroundcolor'=>'red');\n echo '<img src=\"...
2008/10/05
[ "https://Stackoverflow.com/questions/172192", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16822/" ]
172,199
<p>Where can I find a list of all types of bsd style socket errors?</p>
[ { "answer_id": 172273, "author": "bortzmeyer", "author_id": 15625, "author_profile": "https://Stackoverflow.com/users/15625", "pm_score": 4, "selected": true, "text": "% man connect\n...\n ECONNREFUSED\n No-one listening on the remote address.\n EISCONN\n The socket i...
2008/10/05
[ "https://Stackoverflow.com/questions/172199", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4946/" ]
172,208
<p>We're starting a large web project, mostly green field. I like the Tapestry framework for java/web solutions. I have concerns about starting a Tapestry 5 project since T5 is still in beta. However, if I understand the documentation correctly, T4 development will not be supported by T5 and up. My question: Should I b...
[ { "answer_id": 371982, "author": "Chochos", "author_id": 10165, "author_profile": "https://Stackoverflow.com/users/10165", "pm_score": 3, "selected": false, "text": "@Property @Property archiveClasses" } ]
2008/10/05
[ "https://Stackoverflow.com/questions/172208", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
172,209
<p>Can perforce be adjusted so I don't need to "open files for edit"? Someone told me that this was a "feature", and that s/he guessed it could be turned off.</p>
[ { "answer_id": 172765, "author": "PhiLho", "author_id": 15459, "author_profile": "https://Stackoverflow.com/users/15459", "pm_score": 1, "selected": false, "text": "command.name.0.*=P4 edit\ncommand.0.*=p4 edit -c default $(FileNameExt)\ncommand.save.before.0.*=2\n" }, { "answer_...
2008/10/05
[ "https://Stackoverflow.com/questions/172209", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9987/" ]
172,223
<p>From the Apple <a href="http://developer.apple.com/internet/safari/faq.html" rel="noreferrer">developer faq</a></p> <blockquote> <p>Safari ships with a conservative cookie policy which limits cookie writes to only the pages chosen ("navigated to") by the user.</p> </blockquote> <p>By default Safari only al...
[ { "answer_id": 1032746, "author": "M.W. Felker", "author_id": 127012, "author_profile": "https://Stackoverflow.com/users/127012", "pm_score": 3, "selected": false, "text": " (parent doc) (iframe doc)\n HTML --> IFRAME <-- HTML \n ^--------|---------^\n (parent doc) ...
2008/10/05
[ "https://Stackoverflow.com/questions/172223", "https://Stackoverflow.com", "https://Stackoverflow.com/users/25286/" ]
172,255
<p>I'd like to zoom and unzoom in ways the base class doesn't support.</p> <p>For instance, upon receiving a double tap.</p>
[ { "answer_id": 668166, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 2, "selected": false, "text": "- (void) touchesEnded:(NSSet*)touches withEvent:(UIEvent*)event {\n UIScrollView *scrollView = (UIScrollView*)[self superview...
2008/10/05
[ "https://Stackoverflow.com/questions/172255", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22704/" ]
172,258
<p>I've written up a weekly-review GTD checklist for myself in TiddlyWiki, using <a href="http://www.tiddlytools.com/#CheckboxPlugin" rel="nofollow noreferrer">CheckboxPlugin</a>. After I'm finished with it each week, I'd like to click one link to uncheck (reset) all of the items on it, so it's ready for the next use.<...
[ { "answer_id": 178066, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 1, "selected": false, "text": "<html><form style=\"display:inline\">\n <input type=\"button\" value=\"clear all\" onclick=\"\n var tid='SomeTiddler...
2008/10/05
[ "https://Stackoverflow.com/questions/172258", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12193/" ]
172,262
<p>What is the difference between <code>#include</code> and <code>#import</code> in C++?</p>
[ { "answer_id": 172264, "author": "Brian R. Bondy", "author_id": 3153, "author_profile": "https://Stackoverflow.com/users/3153", "pm_score": 7, "selected": false, "text": "#import #import #import #pragma #import #include #include" }, { "answer_id": 172274, "author": "Head Geek...
2008/10/05
[ "https://Stackoverflow.com/questions/172262", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1585/" ]
172,265
<p>I've got a WCF Web Service method whose prototype is:</p> <pre><code>[OperationContract] Response&lt;List&lt;Customer&gt;&gt; GetCustomers(); </code></pre> <p>When I add the service reference to a client, Visual Studio (2005) creates a type called "ResponseOfArrayOfCustomerrleXg3IC" that is a wrapper for "Response...
[ { "answer_id": 172349, "author": "Micah", "author_id": 17744, "author_profile": "https://Stackoverflow.com/users/17744", "pm_score": -1, "selected": false, "text": "[OperationContract(Name = \"NameGoesHere\")]\nResponse<List<Customer>> GetCustomers();\n" }, { "answer_id": 172370,...
2008/10/05
[ "https://Stackoverflow.com/questions/172265", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9825/" ]
172,278
<p>I have a stored procedure with the following header:</p> <pre><code>FUNCTION SaveShipment (p_user_id IN INTEGER, p_transaction_id IN INTEGER, p_vehicle_code IN VARCHAR2 DEFAULT NULL, p_seals IN VARCHAR2 DEFAULT NULL) RETURN INTEGER; </code></pre> <p>And I am having trouble running it from TOAD's Editor. I cannot ...
[ { "answer_id": 172309, "author": "friol", "author_id": 23034, "author_profile": "https://Stackoverflow.com/users/23034", "pm_score": 3, "selected": true, "text": "declare\n c integer;\nbegin\n\nc:=storedProc(...parameters...);\n" } ]
2008/10/05
[ "https://Stackoverflow.com/questions/172278", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5056/" ]
172,300
<p>When using Mercurial I sometimes find that it is hard to understand the relationship between changesets when there are thousands of changesets, and sometimes ten or more active branches at any one time. Currently, I use <a href="http://www.logilab.org/project/hgview/screenshots?selected=4873" rel="noreferrer">hgvie...
[ { "answer_id": 172358, "author": "I GIVE CRAP ANSWERS", "author_id": 25083, "author_profile": "https://Stackoverflow.com/users/25083", "pm_score": 4, "selected": true, "text": "gitk(1) git rev-list" } ]
2008/10/05
[ "https://Stackoverflow.com/questions/172300", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22668/" ]
172,302
<p>This is for a small scheduling app. I need an algorithm to efficiently compare two "schedules", find differences, and update only the data rows which have been changed, as well as entries in another table having this table as a foreign key. This is a big question, so I'll say right away I'm looking for either <str...
[ { "answer_id": 174037, "author": "Lasse V. Karlsen", "author_id": 267, "author_profile": "https://Stackoverflow.com/users/267", "pm_score": 4, "selected": true, "text": "|---------------- A -------------------|\n |--- B ----| |--- B ---|\n |---------------- A ----------------...
2008/10/05
[ "https://Stackoverflow.com/questions/172302", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21632/" ]
172,303
<p>Is it possible to detect a valid regular expression with another regular expression? If so please give example code below.</p>
[ { "answer_id": 172312, "author": "Dan", "author_id": 17121, "author_profile": "https://Stackoverflow.com/users/17121", "pm_score": 8, "selected": false, "text": "try..catch" }, { "answer_id": 172316, "author": "Markus Jarderot", "author_id": 22364, "author_profile": "...
2008/10/05
[ "https://Stackoverflow.com/questions/172303", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10950/" ]
172,306
<p>I'm sure this is a subject that's on most python developers' minds considering that Python 3 is coming out soon. Some questions to get us going in the right direction:</p> <ol> <li><p>Will you have a python 2 and python 3 version to be maintained concurrently or will you simply have a python 3 version once it's fi...
[ { "answer_id": 172350, "author": "I GIVE CRAP ANSWERS", "author_id": 25083, "author_profile": "https://Stackoverflow.com/users/25083", "pm_score": 3, "selected": false, "text": "from __future__ import X" }, { "answer_id": 214601, "author": "Glyph", "author_id": 13564, ...
2008/10/05
[ "https://Stackoverflow.com/questions/172306", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2147/" ]
172,320
<p>I'm working with a webservice that offers almost duplicated code across two namesspaces. Lets say for example PigFeet and HorseFeet, both namespaces contain a Feet class and other code that works with the Feet class requires it to be part of that same namespace.</p> <p>Right now In my code I'm forced to do somethi...
[ { "answer_id": 172324, "author": "Eric Schoonover", "author_id": 3957, "author_profile": "https://Stackoverflow.com/users/3957", "pm_score": 2, "selected": false, "text": "using PigFeet = PigFeet.Feet;\nusing HorseFeet = HorseFeet.Feet;\n\n//now your sample code should look something lik...
2008/10/05
[ "https://Stackoverflow.com/questions/172320", "https://Stackoverflow.com", "https://Stackoverflow.com/users/25300/" ]
172,353
<p>I am writing a C# program which captures signals from a external device, and sends keystrokes to another application. I am using SendKeys and it works fine.</p> <p>SendKeys does "press" a key by holding and releasing it immediately. I would like to make it push key and release it at will.</p> <p>My question is : "...
[ { "answer_id": 9509588, "author": "Ohad Schneider", "author_id": 67824, "author_profile": "https://Stackoverflow.com/users/67824", "pm_score": 2, "selected": false, "text": "keybd_event SendInput WM_KEYDOWN WM_KEYUP WM_KEYDOWN KeyboardDelay KeyboardSpeed SystemInformation.KeyboardDelay S...
2008/10/05
[ "https://Stackoverflow.com/questions/172353", "https://Stackoverflow.com", "https://Stackoverflow.com/users/24472/" ]
172,365
<p>I've created a web page that lets you input some information and then draws an image in a canvas element based on that info. I have it pretty much working the way I want except for the printing.</p> <p>Is there a way to print out the canvas element or is creating a new window to draw in, the only way to do it?</p>...
[ { "answer_id": 172376, "author": "Darryl Hein", "author_id": 5441, "author_profile": "https://Stackoverflow.com/users/5441", "pm_score": 1, "selected": false, "text": "<link> media=\"print\" display:none;" }, { "answer_id": 172377, "author": "Zack The Human", "author_id":...
2008/10/05
[ "https://Stackoverflow.com/questions/172365", "https://Stackoverflow.com", "https://Stackoverflow.com/users/791/" ]
172,372
<p>I am wondering about what the difference between logging and tracing is.</p> <p>Is the difference basically that tracing is more detailed log giving developers a tool to debug applications at runtime?</p> <p>I have been experimenting with log4net and doing logging. Now I am wondering if I should be doing tracing a...
[ { "answer_id": 172488, "author": "Bob Nadler", "author_id": 2514, "author_profile": "https://Stackoverflow.com/users/2514", "pm_score": 4, "selected": false, "text": "Debug() <root>\n <level value=\"DEBUG\" />\n ...\n</root>\n <level value=\"INFO\" />\n" }, { "answe...
2008/10/05
[ "https://Stackoverflow.com/questions/172372", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15771/" ]
172,393
<p>I have a method that takes an IQueryable. Is there a LINQ query that will give me back the size of each column in the IQueryable?</p> <p>To be more clear: this is Linq-to-objects. I want to get the length of the ToString() of each "column".</p>
[ { "answer_id": 172413, "author": "JaredPar", "author_id": 23283, "author_profile": "https://Stackoverflow.com/users/23283", "pm_score": 2, "selected": true, "text": "\npublic IEnumerable GetColumnSize(IQueryable source)\n{\n var types = MapTypeToMembers(source).Select(x => x.Type);\n r...
2008/10/05
[ "https://Stackoverflow.com/questions/172393", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5189/" ]
172,439
<p>I have a multi-line string that I want to do an operation on each line, like so:</p> <pre><code>inputString = &quot;&quot;&quot;Line 1 Line 2 Line 3&quot;&quot;&quot; </code></pre> <p>I want to iterate on each line:</p> <pre><code>for line in inputString: doStuff() </code></pre>
[ { "answer_id": 172454, "author": "UnkwnTech", "author_id": 115, "author_profile": "https://Stackoverflow.com/users/115", "pm_score": 10, "selected": true, "text": "inputString.splitlines()\n splitlines()" }, { "answer_id": 172468, "author": "efotinis", "author_id": 12320,...
2008/10/05
[ "https://Stackoverflow.com/questions/172439", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1546/" ]
172,443
<p>I'm looking for a getopt library for c#. So far I found a few (<a href="http://www.phpguru.org/static/getopt.html" rel="noreferrer">phpguru</a>, <a href="http://69.10.233.10/KB/cs/XGetoptCS.aspx" rel="noreferrer">XGetOptCS</a>, <a href="http://www.codeproject.com/KB/cs/geoptfordotnet.aspx" rel="noreferrer">getoptfor...
[ { "answer_id": 9068889, "author": "kostix", "author_id": 720999, "author_profile": "https://Stackoverflow.com/users/720999", "pm_score": 0, "selected": false, "text": "src\\ClientUtilities\\util\\CommandLineOptions.cs ConsoleRunner.cs Runner.cs src\\ConsoleRunner\\nunit-console /verbose ...
2008/10/05
[ "https://Stackoverflow.com/questions/172443", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2798/" ]
172,465
<pre><code>y: &amp;pause cd ptls5.0 &amp;pause sdp describe Integration.dpk &amp;pause z: &amp;pause cd ptls5.0 &amp;pause dir &amp;pause </code></pre> <p>I have those commands in the 1.cmd file. First three are executed fine. The result of it is that after "sdp describe Integration.dpk &amp;pause" is executed I'm giv...
[ { "answer_id": 172471, "author": "Greg Hewgill", "author_id": 893, "author_profile": "https://Stackoverflow.com/users/893", "pm_score": 1, "selected": false, "text": "call call sdp describe Integration.dpk &pause\n" } ]
2008/10/05
[ "https://Stackoverflow.com/questions/172465", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
172,484
<p>I recently added <a href="https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-pedantic-1" rel="nofollow noreferrer">-pedantic</a> and <a href="https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-pedantic-errors-1" rel="nofollow noreferrer">-pedantic-errors</a> to my make GCC compile options to he...
[ { "answer_id": 172536, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": -1, "selected": true, "text": "-pedantic" }, { "answer_id": 761156, "author": "Good Person", "author_id": 87280, "author_profile": "https...
2008/10/05
[ "https://Stackoverflow.com/questions/172484", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13676/" ]
172,504
<p>I like to read about new and clever algorithms. And I like to think out of the box, so all kinds of algorithms from all fields of computation are welcome.</p> <p>From time to time I read research papers to keep up with the current research and expand my horizon. I also like to learn new tricks. Unfortunately I tend...
[ { "answer_id": 172535, "author": "Dark Shikari", "author_id": 11206, "author_profile": "https://Stackoverflow.com/users/11206", "pm_score": 2, "selected": false, "text": "P BP _P \"_\" BP PP BBP _B __P \"__\" BBP PBP BPP _BBP __BP ___P \"___\" __BBP ___BP ____P \"____\" BPBBP BBPBP BPBPP...
2008/10/05
[ "https://Stackoverflow.com/questions/172504", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15955/" ]
172,524
<p>Last time <a href="https://stackoverflow.com/questions/169506/get-form-input-fields-with-jquery">I asked about the reverse process</a>, and got some very efficient answers. I'm aiming for least lines of code here. I have a form of fields and an associative array in the {fieldname:data} format, I want to populate a c...
[ { "answer_id": 172532, "author": "Adam Bellaire", "author_id": 21632, "author_profile": "https://Stackoverflow.com/users/21632", "pm_score": 4, "selected": false, "text": "$.each(myAssocArry, function(i,val) { $('#'+i).val(val); });\n" }, { "answer_id": 172579, "author": "Era...
2008/10/05
[ "https://Stackoverflow.com/questions/172524", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7883/" ]
172,526
<p>I'll go first.</p> <p>I'm 100% in the set-operations camp. But what happens when the set logic on the entire desired input domain leads to a such a large retrieval that the query slows down significantly, comes to a crawl, or basically takes infinite time?</p> <p>That's one case where I'll use a itty-bitty cursor...
[ { "answer_id": 172879, "author": "Greg Beech", "author_id": 13552, "author_profile": "https://Stackoverflow.com/users/13552", "pm_score": 3, "selected": true, "text": "sp_getapplock" } ]
2008/10/05
[ "https://Stackoverflow.com/questions/172526", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23422/" ]
172,544
<p>I am trying to display a list of all files found in the selected directory (and optionally any subdirectories). The problem I am having is that when the GetFiles() method comes across a folder that it cannot access, it throws an exception and the process stops.</p> <p>How do I ignore this exception (and ignore the ...
[ { "answer_id": 172575, "author": "Marc Gravell", "author_id": 23354, "author_profile": "https://Stackoverflow.com/users/23354", "pm_score": 7, "selected": true, "text": "using System;\nusing System.IO;\nstatic class Program\n{\n static void Main()\n {\n string path = \"\"; /...
2008/10/05
[ "https://Stackoverflow.com/questions/172544", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2493/" ]
172,546
<p>I'd like to use the new <b>CMFCListCtrl</b> features with my <b>CListView</b> class (and, of course, the new CMFCHeaderCtrl inside it). Unfortunately, you can't use <i>Attach()</i> or <i>SubclassWindow()</i> because the SysListView32 window is already associated with a CListView object.</p> <p>Do I have to override...
[ { "answer_id": 2809830, "author": "Frekers", "author_id": 338149, "author_profile": "https://Stackoverflow.com/users/338149", "pm_score": 2, "selected": false, "text": "CMFCHeaderCtrl& CMyMFCListCtrl::GetHeaderCtrl() \n{ \n return m_myHeaderCtrl; \n}\n\nvoid CMyMFCListCtrl::InitHeader(...
2008/10/05
[ "https://Stackoverflow.com/questions/172546", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4858/" ]
172,552
<p>I wrote a short bash script to complete a task that involves creating a temporary directory and storing various files in it and performing various operations on it.</p> <p>In my first pass I just created the temp dir at /tmp/$$.$script", but then I tested the script on a computer where I didn't have write access to...
[ { "answer_id": 172555, "author": "Adam Rosenfield", "author_id": 9530, "author_profile": "https://Stackoverflow.com/users/9530", "pm_score": 1, "selected": false, "text": "/var/tmp /tmp" }, { "answer_id": 172556, "author": "Community", "author_id": -1, "author_profile...
2008/10/05
[ "https://Stackoverflow.com/questions/172552", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1512/" ]
172,559
<pre><code>function returnsAnArray () { return array ('test'); } echo returnsAnArray ()[0]; </code></pre> <p>generates a syntax error in PHP. What's the most efficient way to directly obtain an element from a returned array without assigning the result to a temp variable?</p>
[ { "answer_id": 172570, "author": "Eran Galperin", "author_id": 10585, "author_profile": "https://Stackoverflow.com/users/10585", "pm_score": 1, "selected": false, "text": " <?php\n echo current(returnsAnArray());\n ?>\n" }, { "answer_id": 172582, "author": "Paul Dixon", "...
2008/10/05
[ "https://Stackoverflow.com/questions/172559", "https://Stackoverflow.com", "https://Stackoverflow.com/users/24288/" ]
172,573
<p>I've been using <a href="http://www.jcraft.com/jsch/" rel="nofollow noreferrer">JSch</a> for a couple of weeks now. It seems to <em>work</em> okay, but its API is a little bit cumbersome. I'm also a little off put by its total lack of documentation (not even javadoc style comments). Has anyone used a good Java SS...
[ { "answer_id": 172570, "author": "Eran Galperin", "author_id": 10585, "author_profile": "https://Stackoverflow.com/users/10585", "pm_score": 1, "selected": false, "text": " <?php\n echo current(returnsAnArray());\n ?>\n" }, { "answer_id": 172582, "author": "Paul Dixon", "...
2008/10/05
[ "https://Stackoverflow.com/questions/172573", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1288/" ]
172,587
<p>What is the difference between g++ and gcc? Which one of them should be used for general c++ development?</p>
[ { "answer_id": 172592, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 11, "selected": true, "text": "gcc g++ cc1 cc1plus -x language g++ gcc -xc++ -lstdc++ -shared-libgcc -v" }, { "answer_id": 172613, "author": "njs...
2008/10/05
[ "https://Stackoverflow.com/questions/172587", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3153/" ]
172,598
<p>I just started programming Objective-C and, having a background in Java, wonder how people writing Objective-C programs deal with private methods.</p> <p>I understand there may be several conventions and habits and think about this question as an aggregator of the best techniques people use dealing with private met...
[ { "answer_id": 173287, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 6, "selected": false, "text": "@interface @interface GLObject (PrivateMethods) GLObject+PrivateMethods.h @implementation GLObject(PrivateMethods)\n- (void)se...
2008/10/05
[ "https://Stackoverflow.com/questions/172598", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20294/" ]
172,600
<p>When I try this with a generic class where this.value is T:</p> <pre><code>if (this.value.GetType() == typeof(int)) { ((int)this.value)++; } else { throw new InvalidOperationException ("T must be an int to perform this operation"); } </code></pre> <p>I get a compile-time error: "Cannot convert ...
[ { "answer_id": 172639, "author": "Marc Gravell", "author_id": 23354, "author_profile": "https://Stackoverflow.com/users/23354", "pm_score": 6, "selected": true, "text": "int i = (int)(object)this.value;\ni++;\nthis.value = (T)(object)i;\n this.value = Operator.AddAlternative(this.value, ...
2008/10/05
[ "https://Stackoverflow.com/questions/172600", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11574/" ]
172,648
<p>I have a photo website and i want to support tags as my original category bucketing is starting to fail (some pictures are family and vacations, or school and friends). Is there an agreed tagging db schema? </p> <p>I still want to support having photos as part of an album.</p> <p>Right now i have a few tables:</...
[ { "answer_id": 172833, "author": "Neall", "author_id": 619, "author_profile": "https://Stackoverflow.com/users/619", "pm_score": 4, "selected": false, "text": "photos\n photoid\n caption\n filename\n date\n\ntags\n tagid\n tagname\n\nphototags\n photoid\n tagid\n" }, { "a...
2008/10/05
[ "https://Stackoverflow.com/questions/172648", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4653/" ]