qid
int64
4
19.1M
question
stringlengths
18
48.3k
answers
list
date
stringlengths
10
10
metadata
list
197,233
<p>I want to split a command line like string in single string parameters. How look the regular expression for it. The problem are that the parameters can be quoted. For example like:</p> <p>"param 1" param2 "param 3"</p> <p>should result in:</p> <p>param 1, param2, param 3</p>
[ { "answer_id": 197244, "author": "Greg Hewgill", "author_id": 893, "author_profile": "https://Stackoverflow.com/users/893", "pm_score": 3, "selected": false, "text": "(\"[^\"]*\"|[^\"]+)(\\s+|$)\n \"[^\"]*\" [^\"]+ \\s+ $" }, { "answer_id": 197255, "author": "VonC", "auth...
2008/10/13
[ "https://Stackoverflow.com/questions/197233", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12631/" ]
197,241
<p>I came across this class while reading a C# book and have some questions.</p> <ul> <li>Why is this added into System.Linq namespace and not into usuall Collections namespace?</li> <li>What the intention behind this class is</li> <li>Why this class is not intended for direct instantiation? This is available through ...
[ { "answer_id": 197363, "author": "Marc Gravell", "author_id": 23354, "author_profile": "https://Stackoverflow.com/users/23354", "pm_score": 3, "selected": false, "text": "MiscUtil.Linq.EditableLookup<,> ILookup<,>" } ]
2008/10/13
[ "https://Stackoverflow.com/questions/197241", "https://Stackoverflow.com", "https://Stackoverflow.com/users/437435/" ]
197,266
<p>Below is the code of a simple html with a table layout. In FF it's looking as I think it should look like, in IE7 it doesn't. what am I doing wrong?<br><br> And how can I fix it?</p> <pre><code>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"&gt; &lt;html&gt; &lt;head&gt; &lt;TITLE&gt;t...
[ { "answer_id": 197284, "author": "Greg", "author_id": 24181, "author_profile": "https://Stackoverflow.com/users/24181", "pm_score": 2, "selected": false, "text": "width:190; width: 190px;" }, { "answer_id": 197413, "author": "Quentin", "author_id": 19068, "author_prof...
2008/10/13
[ "https://Stackoverflow.com/questions/197266", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15981/" ]
197,268
<p>I have a self-hosted service that I want to add transport security to. I've set WSHttpBinding.SecurityMode to Transport and the ClientCredentialType to HttpClientCredentialType.None. I've created a certificate and set it to my host with ServiceHost.Credentials.ServiceCertificate.SetCertificate() I've also registered...
[ { "answer_id": 197284, "author": "Greg", "author_id": 24181, "author_profile": "https://Stackoverflow.com/users/24181", "pm_score": 2, "selected": false, "text": "width:190; width: 190px;" }, { "answer_id": 197413, "author": "Quentin", "author_id": 19068, "author_prof...
2008/10/13
[ "https://Stackoverflow.com/questions/197268", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19956/" ]
197,275
<p>The MySQL database used by my Rails application currently has the default collation of <code>latin1_swedish_ci</code>. Since the default charset of Rails applications (including mine) is UTF-8, it seems sensible to me to use the <code>utf8_general_ci</code> collation in the database.</p> <p>Is my thinking correct?...
[ { "answer_id": 39702215, "author": "shyam", "author_id": 1640346, "author_profile": "https://Stackoverflow.com/users/1640346", "pm_score": 0, "selected": false, "text": "ALTER TABLE users MODIFY description VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci;\n SHOW FULL COLUMNS FROM...
2008/10/13
[ "https://Stackoverflow.com/questions/197275", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1174/" ]
197,291
<p>Given a table (mytable) containing a numeric field (mynum), how would one go about writing an SQL query which summarizes the table's data based on ranges of values in that field rather than each distinct value?</p> <p>For the sake of a more concrete example, let's make it intervals of 3 and just "summarize" with a ...
[ { "answer_id": 197300, "author": "Jouni K. Seppänen", "author_id": 26575, "author_profile": "https://Stackoverflow.com/users/26575", "pm_score": 5, "selected": true, "text": "select count(*), round(mynum/3.0) foo from mytable group by foo;\n" }, { "answer_id": 197325, "author...
2008/10/13
[ "https://Stackoverflow.com/questions/197291", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18914/" ]
197,302
<p>How can I unset variable? For example, PHP has an <code>unset($var)</code> function.</p>
[ { "answer_id": 197312, "author": "gimel", "author_id": 6491, "author_profile": "https://Stackoverflow.com/users/6491", "pm_score": 3, "selected": false, "text": "MyVar = null;\n" }, { "answer_id": 197326, "author": "Nico", "author_id": 22970, "author_profile": "https:...
2008/10/13
[ "https://Stackoverflow.com/questions/197302", "https://Stackoverflow.com", "https://Stackoverflow.com/users/25413/" ]
197,304
<p>On occasion, my local Rails app loses its connection to MySQL. I get some error that the connection failed, but if I just refresh the page, it works fine. This has never happpened in my STAGE or PROD environments (I deploy to Ubuntu), so it has not been that big a deal.<br> Does this happen to anybody else? Is ther...
[ { "answer_id": 197467, "author": "Matt Brown", "author_id": 7272, "author_profile": "https://Stackoverflow.com/users/7272", "pm_score": 2, "selected": false, "text": "sudo gem install mysql" } ]
2008/10/13
[ "https://Stackoverflow.com/questions/197304", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7272/" ]
197,307
<p>What would you recommend to search a sql server table (varchar(max) column) for a term?</p> <p>Let's say, like in ebay, if you search for "wii brand new", you get results like "Brand New Nintendo Wii Fit Game + Balance Board Bundle", "Wii Fit (Wii) BRAND NEW WII FIT GAME + BALANCE BOARD".</p> <p>I think it basical...
[ { "answer_id": 197314, "author": "Matt Brown", "author_id": 7272, "author_profile": "https://Stackoverflow.com/users/7272", "pm_score": 2, "selected": false, "text": "select * from table where field like '%word%'" } ]
2008/10/13
[ "https://Stackoverflow.com/questions/197307", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17648/" ]
197,310
<p>I want to do this (no particular language):</p> <pre><code>print(foo.objects.bookdb.books[12].title); </code></pre> <p>or this:</p> <pre><code>book = foo.objects.bookdb.book.new(); book.title = 'RPC for Dummies'; book.save(); </code></pre> <p>Where foo actually is a service connected to my program via some IPC, ...
[ { "answer_id": 197380, "author": "edgar.holleis", "author_id": 24937, "author_profile": "https://Stackoverflow.com/users/24937", "pm_score": -1, "selected": true, "text": "foreach o, o.isGreen in someList { \n o.makeBlue; \n}\n" }, { "answer_id": 210914, "author": "S.Lott",...
2008/10/13
[ "https://Stackoverflow.com/questions/197310", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2077/" ]
197,362
<p>I have a products table that contains a FK for a category, the Categories table is created in a way that each category can have a parent category, example:</p> <pre><code>Computers Processors Intel Pentium Core 2 Duo AMD Athlon </code></pre> <p>I need to make...
[ { "answer_id": 197389, "author": "Simon", "author_id": 22404, "author_profile": "https://Stackoverflow.com/users/22404", "pm_score": 0, "selected": false, "text": "categoriesSet = empty set\nwhile new.size > 0:\n new = select * from categories where parent in categoriesSet\n categories...
2008/10/13
[ "https://Stackoverflow.com/questions/197362", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17648/" ]
197,365
<p>I am creating a Visual Studio Setup project. I want to un-install another component from the system from the install of my component. The other component is installed from my own setup created using Visual Studio.</p> <p>Currently when I am calling the un-install of the other component from the install action of th...
[ { "answer_id": 264308, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 0, "selected": false, "text": "uninst.exe" } ]
2008/10/13
[ "https://Stackoverflow.com/questions/197365", "https://Stackoverflow.com", "https://Stackoverflow.com/users/191/" ]
197,372
<p>I have a JUnit 3.x TestCase which I would like to be able to parameterize. I'd like to parametrize the entire <code>TestCase</code> (including the fixture). However, the <code>TestSuite.addTestSuite()</code> method does not allow be to pass a <code>TestCase</code> object, just a class:</p> <pre><code> TestSuite s...
[ { "answer_id": 197656, "author": "matt b", "author_id": 4249, "author_profile": "https://Stackoverflow.com/users/4249", "pm_score": 2, "selected": false, "text": "public void testSomething() {\n API myAPI = new BlahAPI();\n assertNotNull(myAPI.something());\n}\n public abstract class...
2008/10/13
[ "https://Stackoverflow.com/questions/197372", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13051/" ]
197,375
<p>I only just recently discovered that Visual C++ 2008 (and perhaps earlier versions as well?) supports <code>for each</code> syntax on stl lists et al to facilitate iteration. For example:</p> <pre><code>list&lt;Object&gt; myList; for each (Object o in myList) { o.foo(); } </code></pre> <p>I was very happy to di...
[ { "answer_id": 197412, "author": "Konrad Rudolph", "author_id": 1968, "author_profile": "https://Stackoverflow.com/users/1968", "pm_score": 4, "selected": false, "text": "list<Object> myList;\n\nBOOST_FOREACH(Object o, myList)\n o.foo();\n" }, { "answer_id": 197429, "autho...
2008/10/13
[ "https://Stackoverflow.com/questions/197375", "https://Stackoverflow.com", "https://Stackoverflow.com/users/25731/" ]
197,379
<p>I am looking to create symlinks (soft links) from Java on a Windows Vista/ 2008 machine. I'm happy with the idea that I need to call out to the JNI to do this. I am after help on the actual C code though. What is the appropriate system call to create the link? Pointers to some good documentation on this subject woul...
[ { "answer_id": 197420, "author": "Scott James", "author_id": 6715, "author_profile": "https://Stackoverflow.com/users/6715", "pm_score": 2, "selected": false, "text": "BOOLEAN WINAPI CreateSymbolicLink(\n __in LPTSTR lpSymlinkFileName,\n __in LPTSTR lpTargetFileName,\n __in DWORD d...
2008/10/13
[ "https://Stackoverflow.com/questions/197379", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7122/" ]
197,383
<p>I want to create a bundle from an arbitrary bundle identifier<br> e.g. <code>com.apple.iokit.IOStorageFamily</code> </p> <p>It's not an unreasonable thing to do as bundle IDs are supposed<br> to be unique, however the obvious code does not work:</p> <pre><code>NSString* bID = @"com.apple.iokit.IOStorageFamily"; N...
[ { "answer_id": 198195, "author": "Dave Verwer", "author_id": 4496, "author_profile": "https://Stackoverflow.com/users/4496", "pm_score": 3, "selected": false, "text": "NSString *path = [[NSWorkspace sharedWorkspace] absolutePathForAppBundleWithIdentifier:@\"com.apple.TextEdit\"];\n" },...
2008/10/13
[ "https://Stackoverflow.com/questions/197383", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22147/" ]
197,387
<p>Is there a way to describe the module's data in a similar way that a docstring describes a module or a funcion?</p> <pre><code>class MyClass(object): def my_function(): """This docstring works!""" return True my_list = [] """This docstring does not work!""" </code></pre>
[ { "answer_id": 197499, "author": "codeape", "author_id": 3571, "author_profile": "https://Stackoverflow.com/users/3571", "pm_score": 5, "selected": true, "text": "# module.py:\n\"\"\"About the module.\n\nmodule.data: contains the word \"spam\"\n\n\"\"\"\n\ndata = \"spam\"\n" }, { ...
2008/10/13
[ "https://Stackoverflow.com/questions/197387", "https://Stackoverflow.com", "https://Stackoverflow.com/users/985/" ]
197,407
<p>I need to define a calculated member in MDX (this is SAS OLAP, but I'd appreciate answers from people who work with different OLAP implementations anyway).</p> <p>The new measure's value should be calculated from an existing measure by applying an additional filter condition. I suppose it will be clearer with an ex...
[ { "answer_id": 200913, "author": "Magnus Smith", "author_id": 11461, "author_profile": "https://Stackoverflow.com/users/11461", "pm_score": 4, "selected": true, "text": "WITH MEMBER [Measures].[Incoming Traffic] AS\n'([Measures].[Total traffic], [Direction].[(All)].[In])'\n WITH MEMBER [...
2008/10/13
[ "https://Stackoverflow.com/questions/197407", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1026/" ]
197,414
<p>I'm trying to get my head around the Error Handling in MVC. What I'm looking for is a centralized way to catch errors, log them, if possible resolve them, if nessecary take other actions and finally show the correct view to the user.</p> <p>I think I can use the [HandleError] filter for this, but I don't see any wa...
[ { "answer_id": 756438, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 2, "selected": false, "text": "[SuppressMessage(\"Microsoft.Performance\", \"CA1813:AvoidUnsealedAttributes\",\n Justification = \"This attribute is Allow...
2008/10/13
[ "https://Stackoverflow.com/questions/197414", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11333/" ]
197,419
<p>I am developing a CMS where the clients will need to upload files larger than 2mb - up to 10mb at least. I have changed the details in the php.ini file and I cannot see anywhere else that the problem might be. Any help?</p> <p>Cheers</p>
[ { "answer_id": 197445, "author": "UnkwnTech", "author_id": 115, "author_profile": "https://Stackoverflow.com/users/115", "pm_score": -1, "selected": false, "text": "ini_set('upload_max_filesize', '10M');\n" }, { "answer_id": 197450, "author": "Greg", "author_id": 24181, ...
2008/10/13
[ "https://Stackoverflow.com/questions/197419", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
197,441
<p>I'm a new user of Matlab, can you please help:<br> I have the following code in an .M file:</p> <pre><code>function f = divrat(w, C) S=sqrt(diag(diag(C))); s=diag(S); f=sqrt(w'*C*w)/(w'*s); </code></pre> <p>I have stored this file (divrat.M) in the normal Matlab path, and therefore I'm assuming that Matlab will re...
[ { "answer_id": 197543, "author": "hakan", "author_id": 3993, "author_profile": "https://Stackoverflow.com/users/3993", "pm_score": 2, "selected": false, "text": "divrat.m divrat divrat.m s = sqrt(diag(C));\n" }, { "answer_id": 197605, "author": "Mr Fooz", "author_id": 250...
2008/10/13
[ "https://Stackoverflow.com/questions/197441", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
197,444
<p>I'm using libcurl in a Win32 C++ application.</p> <p>I have the curllib.vcproj project added to my solution and set my other projects to depend on it.</p> <p>How do I build it with SSL support enabled?</p>
[ { "answer_id": 199052, "author": "sharkin", "author_id": 7891, "author_profile": "https://Stackoverflow.com/users/7891", "pm_score": 7, "selected": true, "text": "USE_SSLEAY\nUSE_OPENSSL\n 1> perl Configure VC-WIN32 --prefix=c:/some/openssl/dir\n 2> ms\\do_ms\n 3> nmake -f ms\\nt.mak (fo...
2008/10/13
[ "https://Stackoverflow.com/questions/197444", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7891/" ]
197,447
<p>Basically, what I need is something like <a href="http://www.dependencywalker.com/" rel="noreferrer">Dependecy Walker</a>, but it should work with .NET applications. Is there anywhere such tool?</p>
[ { "answer_id": 44527128, "author": "pallxk", "author_id": 3463091, "author_profile": "https://Stackoverflow.com/users/3463091", "pm_score": 1, "selected": false, "text": "ildasm.exe ildasm.exe .assembly extern ildasm.exe" } ]
2008/10/13
[ "https://Stackoverflow.com/questions/197447", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1353085/" ]
197,466
<p>What's the best/easiest to integrate templating system for PHP, and what are the benefits of using one?</p> <p>I currently don't use one at all, and am thinking that it might help to seperate content from presentation a little more. </p>
[ { "answer_id": 695217, "author": "Kornel", "author_id": 27009, "author_profile": "https://Stackoverflow.com/users/27009", "pm_score": 2, "selected": false, "text": "echo $foo ${foo} |escape} htmlspecialchars() <strong tal:omit-tag=\"condition\">\n xxx\n</strong>\n {if condition}<strong>...
2008/10/13
[ "https://Stackoverflow.com/questions/197466", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16511/" ]
197,468
<p>I'm just starting up a new ATL/WTL project and I was wondering if the global _Module variable is still required? </p> <p>Back a few years when I started working with WTL it was required (at least for ATL 3.0) that you define a global variable such as:</p> <pre><code>CAppModule _Module; </code></pre> <p>To get ATL...
[ { "answer_id": 200210, "author": "Johann Gerell", "author_id": 6345, "author_profile": "https://Stackoverflow.com/users/6345", "pm_score": 1, "selected": false, "text": "extern CAppModule _Module;\n CAppModule _Module;\n" }, { "answer_id": 253883, "author": "Charles", "au...
2008/10/13
[ "https://Stackoverflow.com/questions/197468", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3719/" ]
197,474
<p>What are the pros and cons of using <a href="http://docs.jboss.org/hibernate/orm/4.1/manual/en-US/html/ch17.html" rel="noreferrer">Criteria</a> or <a href="http://docs.jboss.org/hibernate/orm/4.1/manual/en-US/html/ch16.html" rel="noreferrer">HQL</a>? The Criteria API is a nice object-oriented way to express queries ...
[ { "answer_id": 8796229, "author": "Bojan Kraut", "author_id": 907867, "author_profile": "https://Stackoverflow.com/users/907867", "pm_score": 3, "selected": false, "text": "(name || ' ' || surname) String hql = \"select \" +\n \"c.uuid as uuid,\" +\n \"c.name as nam...
2008/10/13
[ "https://Stackoverflow.com/questions/197474", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18722/" ]
197,482
<p>What are the guidelines for when to create a new exception type instead of using one of the built-in exceptions in .Net?</p> <p>The problem that got me thinking is this. I have a WCF service, which is a basic input-output service. If the service is unable to create an output, because the input is invalid, I want to...
[ { "answer_id": 197488, "author": "Keith", "author_id": 905, "author_profile": "https://Stackoverflow.com/users/905", "pm_score": 4, "selected": false, "text": "System.Exception System.ApplicationException [FaultContract( typeof( LogInFault ) )]\nvoid LogIn( string userName, string passwo...
2008/10/13
[ "https://Stackoverflow.com/questions/197482", "https://Stackoverflow.com", "https://Stackoverflow.com/users/44726/" ]
197,489
<p>I am using the jQuery library to implement drag and drop. </p> <p>How do I get at the element that is being dragged when it is dropped?</p> <p>I want to get the id of the image inside the div. The following element is dragged:</p> <pre><code>&lt;div class="block"&gt; &lt;asp:Image ID="Image9" AlternateText="1...
[ { "answer_id": 197505, "author": "redsquare", "author_id": 6440, "author_profile": "https://Stackoverflow.com/users/6440", "pm_score": 6, "selected": true, "text": " drop: function(ev, ui) {\n //to get the id\n //ui.draggable.attr('id') or ui.draggab...
2008/10/13
[ "https://Stackoverflow.com/questions/197489", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23066/" ]
197,497
<p>What is the best way to determine how many window handles an application is using? Is there a tool or a WMI performance counter that I could use?</p> <p>I would like to run up an app and watch a counter of some sort and see that the number of window handles is increasing. </p> <pre><code>for (int i=0; i &lt; 1000...
[ { "answer_id": 197581, "author": "gimel", "author_id": 6491, "author_profile": "https://Stackoverflow.com/users/6491", "pm_score": 2, "selected": false, "text": "PerformanceCounter PC=new PerformanceCounter();\nPC.CategoryName=\"Process\";\nPC.CounterName=\"Handles\";\nPC.InstanceName=\"...
2008/10/13
[ "https://Stackoverflow.com/questions/197497", "https://Stackoverflow.com", "https://Stackoverflow.com/users/324/" ]
197,508
<p>I know mime_content_type() is deprecated, but it seemed to me the alternative is worse at the moment. <code>Finfo</code> seems to require adding files and changing ini directions on windows; I don't want to require this for the script I am making.</p> <p>I need to find the mimetype of files, but when calling <code>...
[ { "answer_id": 197538, "author": "ConroyP", "author_id": 2287, "author_profile": "https://Stackoverflow.com/users/2287", "pm_score": 1, "selected": false, "text": "'FOO' is not a valid mimetype, entry skipped Fileinfo mime_content_type" }, { "answer_id": 199108, "author": "Ro...
2008/10/13
[ "https://Stackoverflow.com/questions/197508", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6752/" ]
197,521
<p>I must implement a web service which expose a list of values (integers, custom classes etc). My working solution returns a <code>List&lt;T&gt;</code>, and according to FxCop it is better to return a <code>Collection&lt;T&gt;</code> or <code>ReadOnlyCollection&lt;T&gt;</code>.</p> <p>If I choose to return a <code>Re...
[ { "answer_id": 197530, "author": "Marc Gravell", "author_id": 23354, "author_profile": "https://Stackoverflow.com/users/23354", "pm_score": 5, "selected": true, "text": "List<Foo> list = new List<Foo>();\n// ...\nCollection<Foo> col = new Collection<Foo>(list);\n" } ]
2008/10/13
[ "https://Stackoverflow.com/questions/197521", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19756/" ]
197,593
<p>Anyway, I'm a little confused about when to propagate an exception and when to wrap it, and the differences.</p> <p>At the moment, my understanding tells me that wrapping an exception would involve taking an exception like DriveNotFound (in IO) and then wrap it with the general IOException.</p> <p>But with the con...
[ { "answer_id": 197601, "author": "Kent Boogaart", "author_id": 5380, "author_profile": "https://Stackoverflow.com/users/5380", "pm_score": 3, "selected": false, "text": "FileNotFoundException ConfigurationException throw ex;\n throw;\n" }, { "answer_id": 197654, "author": "Co...
2008/10/13
[ "https://Stackoverflow.com/questions/197593", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
197,606
<p>I'm exploring various options for mapping common C# code constructs to C++ CUDA code for running on a GPU. The structure of the system is as follows (arrows represent method calls):</p> <p>C# program -> C# GPU lib -> C++ CUDA implementation lib</p> <p>A method in the GPU library could look something like this:</p>...
[ { "answer_id": 319174, "author": "Konrad Rudolph", "author_id": 1968, "author_profile": "https://Stackoverflow.com/users/1968", "pm_score": 0, "selected": false, "text": "IQueryable" } ]
2008/10/13
[ "https://Stackoverflow.com/questions/197606", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4055/" ]
197,614
<p>In chapter 2, the section on bitwise operators (section 2.9), I'm having trouble understanding how one of the sample methods works.</p> <p>Here's the method provided:</p> <pre><code>unsigned int getbits(unsigned int x, int p, int n) { return (x &gt;&gt; (p + 1 - n)) &amp; ~(~0 &lt;&lt; n); } </code></pre> <p>...
[ { "answer_id": 197652, "author": "paxdiablo", "author_id": 14860, "author_profile": "https://Stackoverflow.com/users/14860", "pm_score": 6, "selected": true, "text": "~0 1111111111111111\n n 1111111111111000\n 1 0 0000000000000111\n n f994 = 1111 1001 1001 0100 . ff94 ..........
2008/10/13
[ "https://Stackoverflow.com/questions/197614", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14048/" ]
197,624
<p>Is it possible to integrate my PHP web-based ecommerce application with Quickbook Online Edition?</p> <p>When I make a sale on my web site, I would like to be able to make the corresponding journal entry in my accounting books.</p> <p>Note, I'm referring to Quickbook <strong>Online Edition</strong>, <strong>not</s...
[ { "answer_id": 532455, "author": "Keith Palmer Jr.", "author_id": 26133, "author_profile": "https://Stackoverflow.com/users/26133", "pm_score": 4, "selected": false, "text": "// Create the connection to QuickBooks\n$API = new QuickBooks_API(...);\n\n// Build the Customer object\n$Custome...
2008/10/13
[ "https://Stackoverflow.com/questions/197624", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
197,634
<p>With ASP.NET's view engine/template aspx/ashx pages the way to spit to screen seems to be: </p> <pre><code>&lt;%= Person.Name %&gt; </code></pre> <p>Which was fine with webforms as alot of model data was bound to controls programatically. But with MVC we are now using this syntax more oftern. </p> <p>The issue I ...
[ { "answer_id": 197641, "author": "John Rudy", "author_id": 14048, "author_profile": "https://Stackoverflow.com/users/14048", "pm_score": 5, "selected": true, "text": "<% foreach(var Person in People) { \n Response.Write(Person.Name); \n} %>\n Response.Write() Response.Write() Response...
2008/10/13
[ "https://Stackoverflow.com/questions/197634", "https://Stackoverflow.com", "https://Stackoverflow.com/users/425/" ]
197,649
<p>While working on SVG implementation for Internet Explorer to be based on its own VML format I came to a problem of translation of an SVG elliptical arc to an VML elliptical arc.</p> <p>In VML an arc is given by: two angles for two points on ellipse and lengths of radiuses, In SVG an arc is given by: two pairs of co...
[ { "answer_id": 11467200, "author": "Rikki", "author_id": 829305, "author_profile": "https://Stackoverflow.com/users/829305", "pm_score": 3, "selected": false, "text": "// Calculate the centre of the ellipse\n// Based on http://www.w3.org/TR/SVG/implnote.html#ArcConversionEndpointToCenter...
2008/10/13
[ "https://Stackoverflow.com/questions/197649", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23815/" ]
197,675
<pre><code>Foo* set = new Foo[100]; // ... delete [] set; </code></pre> <p>You don't pass the array's boundaries to <code>delete[]</code>. But where is that information stored? Is it standardised?</p>
[ { "answer_id": 206355, "author": "MSN", "author_id": 6210, "author_profile": "https://Stackoverflow.com/users/6210", "pm_score": 3, "selected": false, "text": "delete[] new[] operator new[] operator new[] new[] new[] operator new[]/operator delete[] new[]/delete[] malloc" }, { "a...
2008/10/13
[ "https://Stackoverflow.com/questions/197675", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4833/" ]
197,676
<p>I'm working with embedded C for the first time. Although my C is rusty, I can read the code but I don't really have a grasp on why certain lines are the way the are. For example, I want to know if a variable is true or false and send it back to another application. Rather than setting the variable to 1 or 0, the ori...
[ { "answer_id": 197686, "author": "Peter Kühne", "author_id": 27351, "author_profile": "https://Stackoverflow.com/users/27351", "pm_score": 6, "selected": true, "text": "0xFF 0 1" }, { "answer_id": 198303, "author": "mfx", "author_id": 8015, "author_profile": "https://...
2008/10/13
[ "https://Stackoverflow.com/questions/197676", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8040/" ]
197,678
<p>I want to do some checking in a writer accessor. My first idea was returning a boolean.</p> <pre><code>class MyClass def var=(var) @var = var # some checking return true end end m = MyClass.new retval = (m.var = 'foo') =&gt; "foo" </code></pre> <p>Can I set a return value in a writer accessor? If...
[ { "answer_id": 197704, "author": "epochwolf", "author_id": 16204, "author_profile": "https://Stackoverflow.com/users/16204", "pm_score": 3, "selected": false, "text": "Correct\n>>temp = object.var = 7\n=> 7 \n\nWrong\n>>temp = object.var = 7\n=> false\n method=()" }, { "answer_id...
2008/10/13
[ "https://Stackoverflow.com/questions/197678", "https://Stackoverflow.com", "https://Stackoverflow.com/users/341/" ]
197,708
<p>I'd like to use Rich Text Editing in place on forms in order to let admins change instructions. What are the best options for doing this?</p> <p>[To be more clear - the admins are non-technical but may want to control some formatting without using markup or with as little markup as possible. What I'd like is for...
[ { "answer_id": 1570094, "author": "Jon", "author_id": 3231, "author_profile": "https://Stackoverflow.com/users/3231", "pm_score": 3, "selected": false, "text": "include_puny_mce puny_mce include_puny_mce puny_mce <% content_for :head do %>\n <%= include_puny_mce :profiles => [:full] %>\...
2008/10/13
[ "https://Stackoverflow.com/questions/197708", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6805/" ]
197,712
<pre><code>echo "&lt;td&gt;&lt;a href='delete.php?id=$row[id]&amp;&amp;category=$a' onclick='return confirm(\'are you sure you wish to delete this record\');'&gt;delete&lt;/a&gt;&lt;/td&gt;"; </code></pre> <p>Above is the code I am trying to use. Every time it does nothing and I cannot see how I can use 'proper' JavaS...
[ { "answer_id": 197723, "author": "ceejayoz", "author_id": 1902010, "author_profile": "https://Stackoverflow.com/users/1902010", "pm_score": 1, "selected": false, "text": "echo \"<td><a href='delete.php?id=$row[id]&&category=$a' onclick='return confirm(&quot;are you sure you wish to delet...
2008/10/13
[ "https://Stackoverflow.com/questions/197712", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
197,713
<p>I wonder what the best way to make an entire tr clickable would be?</p> <p>The most common (and only?) solution seems to be using JavaScript, by using onclick="javascript:document.location.href('bla.htm');" (not to forget: Setting a proper cursor with onmouseover/onmouseout).</p> <p>While that works, it is a pity ...
[ { "answer_id": 197733, "author": "MDCore", "author_id": 1896, "author_profile": "https://Stackoverflow.com/users/1896", "pm_score": 1, "selected": false, "text": "tr onmouseover=\"window.status='http://bla.com/bla.htm'\" \n tr.clickable {\n cursor: hand; \n cursor: pointer;\n}\n" ...
2008/10/13
[ "https://Stackoverflow.com/questions/197713", "https://Stackoverflow.com", "https://Stackoverflow.com/users/91/" ]
197,725
<p>I'm writing an winforms app that needs to set internet explorer's proxy settings and then open a new browser window. At the moment, I'm applying the proxy settings by going into the registry:</p> <pre><code>RegistryKey registry = Registry.CurrentUser.OpenSubKey("Software\\Microsoft\\Windows\\CurrentVersion\\Interne...
[ { "answer_id": 4493545, "author": "chris", "author_id": 528844, "author_profile": "https://Stackoverflow.com/users/528844", "pm_score": 4, "selected": false, "text": " [DllImport(\"wininet.dll\")]\n public static extern bool InternetSetOption(IntPtr hInternet, int dwOption, IntPtr ...
2008/10/13
[ "https://Stackoverflow.com/questions/197725", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17623/" ]
197,734
<p>Recent versions of PHP have a cache of filenames for knowing the real path of files, and <code>require_once()</code> and <code>include_once()</code> can take advantage of it.</p> <p>There's a value you can set in your <em>php.ini</em> to set the size of the cache, but I have no idea how to tell what the size should...
[ { "answer_id": 69048217, "author": "Vincent", "author_id": 1380479, "author_profile": "https://Stackoverflow.com/users/1380479", "pm_score": 1, "selected": false, "text": "<?php\n\necho \"<br>cache size: \".realpath_cache_size();\necho \"<br>\";\necho \"<br>cache: \".print_r(realpath_cac...
2008/10/13
[ "https://Stackoverflow.com/questions/197734", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8454/" ]
197,747
<p>I want to create a new row in my database on a table that has a couple of foreign key relationships and I haven't been able to get a handle on what order and what calls need to be made. This is what I have so far:</p> <pre><code>db.Models.Order order = DB.Models.Order.CreateOrder( apple ); order.CustomerReference.A...
[ { "answer_id": 197842, "author": "Jared", "author_id": 24841, "author_profile": "https://Stackoverflow.com/users/24841", "pm_score": 4, "selected": true, "text": "db.Models.Order order = DB.Models.Order.CreateOrder( apple );\norder.Customer = (from c in db.Customer where c.Id == custId s...
2008/10/13
[ "https://Stackoverflow.com/questions/197747", "https://Stackoverflow.com", "https://Stackoverflow.com/users/24841/" ]
197,748
<p>Anyone know a simple method to swap the background color of a webpage using JavaScript?</p>
[ { "answer_id": 197761, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 9, "selected": true, "text": "document.body.style.background function changeBackground(color) {\n document.body.style.background = color;\n}\n\nwindow.addE...
2008/10/13
[ "https://Stackoverflow.com/questions/197748", "https://Stackoverflow.com", "https://Stackoverflow.com/users/25515/" ]
197,753
<p>I have 2 classes with a LINQ association between them i.e.:</p> <pre><code>Table1: Table2: ID ID Name Description ForiegnID </code></pre> <p>The association here is between <strong>Table1.ID -> Table2.ForiegnID</strong></p> <p>I need to be able to change the value of Table2...
[ { "answer_id": 197826, "author": "Amy B", "author_id": 8155, "author_profile": "https://Stackoverflow.com/users/8155", "pm_score": 4, "selected": true, "text": "[Column(Storage=\"_ParentKey\", DbType=\"Int\")]\npublic System.Nullable<int> ParentKey\n{\n get\n {\n return this...
2008/10/13
[ "https://Stackoverflow.com/questions/197753", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11989/" ]
197,757
<p>I was trying to understand something with pointers, so I wrote this code:</p> <pre><code>#include &lt;stdio.h&gt; int main(void) { char s[] = "asd"; char **p = &amp;s; printf("The value of s is: %p\n", s); printf("The direction of s is: %p\n", &amp;s); printf("The value of p is: %p\n", p); ...
[ { "answer_id": 197768, "author": "selwyn", "author_id": 16314, "author_profile": "https://Stackoverflow.com/users/16314", "pm_score": 0, "selected": false, "text": "char s[] = \"asd\";\n char *s = \"asd\";\n char s[] = \"asd\";\nchar **p = &s;\n" }, { "answer_id": 197780, "au...
2008/10/13
[ "https://Stackoverflow.com/questions/197757", "https://Stackoverflow.com", "https://Stackoverflow.com/users/27267/" ]
197,758
<p>I have a bunch of XML that has lines that look like this</p> <pre><code>&lt;_char font_name="/ITC Stone Serif Std Bold" italic="true" /&gt; </code></pre> <p>but sometimes look like this</p> <pre><code>&lt;_char font_size="88175" italic="true" font_name="/ITC Stone Serif Std Bold" /&gt; </code></pre> <p>Here's wh...
[ { "answer_id": 197804, "author": "zigdon", "author_id": 4913, "author_profile": "https://Stackoverflow.com/users/4913", "pm_score": 1, "selected": false, "text": "if (/ITC Stone Serif Std Bold/) {\n s/italic=\"true\"/italic=\"false\"/g;\n}\n" }, { "answer_id": 197805, "auth...
2008/10/13
[ "https://Stackoverflow.com/questions/197758", "https://Stackoverflow.com", "https://Stackoverflow.com/users/305/" ]
197,759
<p>I'm not exactly sure how to ask this question really, and I'm no where close to finding an answer, so I hope someone can help me. </p> <p>I'm writing a Python app that connects to a remote host and receives back byte data, which I unpack using Python's built-in struct module. My problem is with the strings, as they...
[ { "answer_id": 197846, "author": "Glyph", "author_id": 13564, "author_profile": "https://Stackoverflow.com/users/13564", "pm_score": 3, "selected": true, "text": "latin1 = \"latin-1\"\njapanese = \"Shift-JIS\"\n\ncontrol_l = \"\\x0c\"\ncontrol_j = \"\\n\"\n\nencodingMap = {\n control_...
2008/10/13
[ "https://Stackoverflow.com/questions/197759", "https://Stackoverflow.com", "https://Stackoverflow.com/users/27059/" ]
197,769
<p>I'm writing some JavaScript code to parse user-entered functions (for spreadsheet-like functionality). Having parsed the formula I <em>could</em> convert it into JavaScript and run <code>eval()</code> on it to yield the result.</p> <p>However, I've always shied away from using <code>eval()</code> if I can avoid it ...
[ { "answer_id": 197797, "author": "John Topley", "author_id": 1450, "author_profile": "https://Stackoverflow.com/users/1450", "pm_score": 0, "selected": false, "text": "eval" }, { "answer_id": 197798, "author": "swilliams", "author_id": 736, "author_profile": "https://...
2008/10/13
[ "https://Stackoverflow.com/questions/197769", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12559/" ]
197,782
<p>I am trying to open a report in Crystal Report 11 Designer (product version 11.5.8.826), but it seems to freeze up. This report use to work fine, but today the client could not load the report.</p> <p>I also tried to open the report on another developer's workstation, with the same result.</p> <p>Has this happened...
[ { "answer_id": 1239880, "author": "Developer", "author_id": 81250, "author_profile": "https://Stackoverflow.com/users/81250", "pm_score": 0, "selected": false, "text": "ReportDocument rpDoc = new ReportDocument()\nrpDoc.Load(Server.MapPath(@\"reportname.rpt\"));\n" } ]
2008/10/13
[ "https://Stackoverflow.com/questions/197782", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
197,793
<p>I'm building my first flex app and am currently bussy splitting it up in multiple components to make it maintainable. I have a screen which holds a list that is displayed and filled after a succesfull login attempt:</p> <p>Part of the main app:</p> <pre><code>&lt;mx:ViewStack id="vsAdmin" height="100%" width="100%...
[ { "answer_id": 198034, "author": "Brandon", "author_id": 23133, "author_profile": "https://Stackoverflow.com/users/23133", "pm_score": 1, "selected": false, "text": "private function doThisFirst():void{\n mainViewstack.selectedChild = vsAdmin;\n vsAdmin.addEventListener(Fle...
2008/10/13
[ "https://Stackoverflow.com/questions/197793", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21238/" ]
197,802
<p>I have an Access DB that I would like to extract the source code from so I can put it into Source control. </p> <p>I have tried to extract the data using the Primary Interop Assemblies(PIA), but I am getting issues as it is not picking up all of the modules and forms. </p> <p>There are 140 Forms and Modules in the...
[ { "answer_id": 197868, "author": "Fionnuala", "author_id": 2548, "author_profile": "https://Stackoverflow.com/users/2548", "pm_score": 1, "selected": false, "text": " Sub AllCodeToDesktop()\n 'The reference for the FileSystemObject Object is Windows Script Host Object Model\n ...
2008/10/13
[ "https://Stackoverflow.com/questions/197802", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2806/" ]
197,834
<p>In particular from this web.config:</p> <pre><code>&lt;configuration&gt; &lt;configSections&gt; &lt;section name="RStrace" type="Microsoft.ReportingServices.Diagnostics.RSTraceSectionHandler,Microsoft.ReportingServices.Diagnostics" /&gt; &lt;/configSections&gt; &lt;system.diagnostics&gt; &lt;switches&...
[ { "answer_id": 197906, "author": "Dean Hill", "author_id": 3106, "author_profile": "https://Stackoverflow.com/users/3106", "pm_score": 1, "selected": false, "text": "<section name=\"runtime\" type=\"your-datatype\"/>\n" }, { "answer_id": 50462056, "author": "Mohammed Arabiat"...
2008/10/13
[ "https://Stackoverflow.com/questions/197834", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11604/" ]
197,835
<p>I start a .Net server side program on my local workstation, but soon it throws a security exception. I searched the web for answers, but no quick fix was found / worked. I just want to run my program. How do I get rid of the exception? I fully trust the program, because its mine.</p> <p>Edit: Oh, yes, I do run the ...
[ { "answer_id": 197949, "author": "Martin", "author_id": 1529, "author_profile": "https://Stackoverflow.com/users/1529", "pm_score": 0, "selected": false, "text": "caspol -s off\n" } ]
2008/10/13
[ "https://Stackoverflow.com/questions/197835", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16663/" ]
197,839
<p>This question was inspired by a similar question: <a href="https://stackoverflow.com/questions/197675/how-does-delete-know-the-size-of-the-operand-array">How does delete[] “know” the size of the operand array?</a></p> <p>My question is a little different: <strong>Is there any way to determine the size of a C++ arr...
[ { "answer_id": 197857, "author": "Doug T.", "author_id": 8123, "author_profile": "https://Stackoverflow.com/users/8123", "pm_score": 3, "selected": false, "text": "int main()\n{\n std::vector<int> v(256);\n printf(\"size of v is %i capacity is %i\\n\", sizeof(int) * v.size(), sizeof(...
2008/10/13
[ "https://Stackoverflow.com/questions/197839", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18511/" ]
197,845
<p>I'm trying to show/hide a movieclip (or graphic) symbol that is on a layer of a button symbol using actionscript 2. Here's what I tried</p> <p>in the actions for the button:</p> <pre><code>on (release) { this.button_name.movieclip_name._alpha = 0; trace(this.button_name.movieclip_name); } </code></pre> <p>and t...
[ { "answer_id": 199979, "author": "fenomas", "author_id": 10651, "author_profile": "https://Stackoverflow.com/users/10651", "pm_score": 2, "selected": true, "text": "myMC.onRollOver = function() { gotoAndPlay(\"show\"); }\nmyMC.onRollOut = myMC.onReleaseOutside = function() { gotoAndPlay(...
2008/10/13
[ "https://Stackoverflow.com/questions/197845", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2908/" ]
197,855
<p>I have 2 columns in a Grid. When I click a button, I want the first column to animate to the left from it's current position to 0. So, in effect, it collapses and I'm left with just viewing a single column.</p>
[ { "answer_id": 197935, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 4, "selected": false, "text": "<Page xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\n xmlns:x=\"http://schemas.microsoft.com/winfx/...
2008/10/13
[ "https://Stackoverflow.com/questions/197855", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3047/" ]
197,864
<p>OK, so instead of writing a whole bunch of access control specs, and duplicating them across many of my spec files, I'm looking to create a custom matcher. So instead of this:</p> <pre><code>describe "access control" do it "should prevent access by non-logged-in users" it "should prevent access by normal users"...
[ { "answer_id": 200595, "author": "Codebeef", "author_id": 12037, "author_profile": "https://Stackoverflow.com/users/12037", "pm_score": 3, "selected": true, "text": "def access_control (code, options={})\n options = {:allow => [], :disallow => []}.merge(options)\n\n options[:allow].eac...
2008/10/13
[ "https://Stackoverflow.com/questions/197864", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12037/" ]
197,867
<p>I'm running into a mental roadblock here and I'm hoping that I'm missing something obvious.</p> <p>Anyway, assume I have a table that looks like this:</p> <pre> ID LookupValue SortOrder ============================================ 1 A 1000 2 B ...
[ { "answer_id": 197930, "author": "Amy B", "author_id": 8155, "author_profile": "https://Stackoverflow.com/users/8155", "pm_score": 3, "selected": true, "text": "Select Key, SortOrder, Group\n KeySortPairs.Where(Function(t) t.Group.Count() > 1)\n KeySortPairs.Where(Function(t) t.Group.Ski...
2008/10/13
[ "https://Stackoverflow.com/questions/197867", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1108/" ]
197,876
<p>How do I uninstall a .NET Windows Service if the service files do not exist anymore?</p> <p>I installed a .NET Windows Service using InstallUtil. I have since deleted the files but forgot to run</p> <pre><code> InstallUtil /u </code></pre> <p>first, so the service is still listed in the Services MMC.</p> <p>Do I hav...
[ { "answer_id": 197885, "author": "Dean Hill", "author_id": 3106, "author_profile": "https://Stackoverflow.com/users/3106", "pm_score": 7, "selected": false, "text": "sc delete <service-name>\n sc delete \"<service-name>\"\n" }, { "answer_id": 197941, "author": "Jorge Ferreira...
2008/10/13
[ "https://Stackoverflow.com/questions/197876", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8547/" ]
197,893
<p>A curious thing happens in Java when you use an abstract class to implement an interface: some of the interface's methods can be completely missing (i.e. neither an abstract declaration or an actual implementation is present), but the compiler does not complain.</p> <p>For example, given the interface:</p> <pre><c...
[ { "answer_id": 197902, "author": "Bill the Lizard", "author_id": 1288, "author_profile": "https://Stackoverflow.com/users/1288", "pm_score": 7, "selected": false, "text": "AbstractThing m2" }, { "answer_id": 29528866, "author": "Grateful", "author_id": 3534132, "autho...
2008/10/13
[ "https://Stackoverflow.com/questions/197893", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22904/" ]
197,904
<p>I'm in a Microsoft IE environment, but I want to use cygwin for a number of quick scripting tasks.</p> <p>How would I configure it to use my windows proxy information? Ruby gems, ping, etc are all trying to make direct connections. How can I get them to respect the proxy information that IE and firefox use?</p>
[ { "answer_id": 197934, "author": "Steve Moyer", "author_id": 17008, "author_profile": "https://Stackoverflow.com/users/17008", "pm_score": 3, "selected": false, "text": "export http_proxy=http://www.myproxy.com:3128\n" }, { "answer_id": 197947, "author": "Bruno De Fraine", ...
2008/10/13
[ "https://Stackoverflow.com/questions/197904", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13774/" ]
197,929
<p>What do you think of this kind of code-to-files-mapping?</p> <pre><code>~/proj/MyClass.ext ~/proj/MyClass:constructors.ext ~/proj/MyClass:properties.ext ~/proj/MyClass:method-one.ext ~/proj/MyClass:method-two:int.ext ~/proj/MyClass:method-two:string.ext </code></pre> <p>In a language which is more function...
[ { "answer_id": 198824, "author": "Jimmy", "author_id": 4435, "author_profile": "https://Stackoverflow.com/users/4435", "pm_score": 2, "selected": false, "text": "#region" } ]
2008/10/13
[ "https://Stackoverflow.com/questions/197929", "https://Stackoverflow.com", "https://Stackoverflow.com/users/25167/" ]
197,933
<p>Ideally, something cross-platform.</p>
[ { "answer_id": 197953, "author": "zigdon", "author_id": 4913, "author_profile": "https://Stackoverflow.com/users/4913", "pm_score": 5, "selected": true, "text": "require Term::Screen::Uni;\nmy $scr = new Term::Screen::Uni;\n\n$scr->clrscr()\n" }, { "answer_id": 197956, "autho...
2008/10/13
[ "https://Stackoverflow.com/questions/197933", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7598/" ]
197,940
<p>I can't seem to find an easy to use, .net native way to get Comboboxes on .net winforms to display one value and return another based on the selection without creating my own helper class, with the knowledge that winforms is going to display the ToString method on the object that you put in it.</p> <p>This is how I...
[ { "answer_id": 198014, "author": "Sam Meldrum", "author_id": 16005, "author_profile": "https://Stackoverflow.com/users/16005", "pm_score": 4, "selected": true, "text": " var list = new List<System.Collections.DictionaryEntry>();\n list.Add(new System.Collections.DictionaryEntry(\"o...
2008/10/13
[ "https://Stackoverflow.com/questions/197940", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15769/" ]
197,948
<p>I'm using GDI+ in a C++/MFC application and I just can't seem to avoid flickering whenever the window is resized.</p> <p>I have already tried these steps:</p> <ul> <li>returned TRUE on <code>OnEraseBkGnd()</code>;</li> <li>returned NULL on <code>OnCtlColor()</code>;</li> <li>used double buffering according to this...
[ { "answer_id": 199526, "author": "Shog9", "author_id": 811, "author_profile": "https://Stackoverflow.com/users/811", "pm_score": 6, "selected": true, "text": "Graphics::DrawImage() BitBlt() Bitmap CreateCompatibleBitmap()" } ]
2008/10/13
[ "https://Stackoverflow.com/questions/197948", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4880/" ]
197,951
<p>I have a need to work with Windows executables which are made for x86, x64, and IA64. I'd like to programmatically figure out the platform by examining the files themselves.</p> <p>My target language is PowerShell but a C# example will do. Failing either of those, if you know the logic required that would be great...
[ { "answer_id": 198005, "author": "ICR", "author_id": 214, "author_profile": "https://Stackoverflow.com/users/214", "pm_score": 3, "selected": false, "text": "Assembly assembly = Assembly.LoadFile(Path.GetFullPath(\"ConsoleApplication1.exe\"));\nModule manifestModule = assembly.ManifestMo...
2008/10/13
[ "https://Stackoverflow.com/questions/197951", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6637/" ]
197,957
<p>Hoi!</p> <p>I have a form I wish to submit, but I need to add the PHPSESSID, because some clients allow no cookies.</p> <p>There are several javascript functions on my page which displays a list of users (search, sort, open details), the page is generated by PHP.</p> <p>Now I am looking for an elegant way to have...
[ { "answer_id": 198005, "author": "ICR", "author_id": 214, "author_profile": "https://Stackoverflow.com/users/214", "pm_score": 3, "selected": false, "text": "Assembly assembly = Assembly.LoadFile(Path.GetFullPath(\"ConsoleApplication1.exe\"));\nModule manifestModule = assembly.ManifestMo...
2008/10/13
[ "https://Stackoverflow.com/questions/197957", "https://Stackoverflow.com", "https://Stackoverflow.com/users/371953/" ]
197,976
<p>I'm trying to write a Windows cmd script to perform several tasks in series. However, it always stops after the first command in the script.</p> <p>The command it stops after is a maven build (not sure if that's relevant).</p> <p>How do I make it carry on and run each task in turn please?</p> <p>Installing any so...
[ { "answer_id": 197997, "author": "Lou Franco", "author_id": 3937, "author_profile": "https://Stackoverflow.com/users/3937", "pm_score": 8, "selected": true, "text": "call otherCommand.bat\n" }, { "answer_id": 198042, "author": "Gulzar Nazim", "author_id": 4337, "autho...
2008/10/13
[ "https://Stackoverflow.com/questions/197976", "https://Stackoverflow.com", "https://Stackoverflow.com/users/151/" ]
197,983
<p>I'm a kinda newbie developer with a few years under my belt. Recently I interviewed at a game company and was asked "have you done any multi-threading?" I told them about having a C# app with a few Threads... and then I said a bit about transactions and locking etc in Sql. The interviewer politely told me that th...
[ { "answer_id": 198109, "author": "Mark Baker", "author_id": 11815, "author_profile": "https://Stackoverflow.com/users/11815", "pm_score": 2, "selected": false, "text": "int main( void )\n{\n pthread_t reader, writer;\n void *arg;\n\n // [... initialisation ...]\n\n // Spawn threads\n...
2008/10/13
[ "https://Stackoverflow.com/questions/197983", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22471/" ]
197,986
<p>For example:</p> <pre><code>javac Foo.java Note: Foo.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. </code></pre>
[ { "answer_id": 197993, "author": "Bill the Lizard", "author_id": 1288, "author_profile": "https://Stackoverflow.com/users/1288", "pm_score": 10, "selected": true, "text": "Arraylist() ArrayList<String>() List myList = new ArrayList();\n List<String> myList = new ArrayList<String>();\n Li...
2008/10/13
[ "https://Stackoverflow.com/questions/197986", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23987/" ]
197,987
<p>I have a main frame with a splitter. On the left I have my (imaginatively named) CAppView_Leftand on the right I have CAppView_Right_1and CAppView_Right_2. Through the following code I initialise the two primary views correctly:</p> <pre><code>if (!m_wndSplitter.CreateStatic(this, 1, 2)) { TRACE0("Failed to Cre...
[ { "answer_id": 198142, "author": "SmacL", "author_id": 22564, "author_profile": "https://Stackoverflow.com/users/22564", "pm_score": 0, "selected": false, "text": "m_wndSplitter.CreateStatic(this, 1, 2) \n m_wndSplitter.CreateStatic(this, 1, 3)\n if (!m_wndSplitter.CreateView(0, 2, RUNTI...
2008/10/13
[ "https://Stackoverflow.com/questions/197987", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18664/" ]
198,006
<p>I need a way to do key-value lookups across (potentially) hundreds of GB of data. Ideally something based on a distributed hashtable, that works nicely with Java. It should be fault-tolerant, and open source.</p> <p>The store should be persistent, but would ideally cache data in memory to speed things up.</p> <p...
[ { "answer_id": 247624, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 5, "selected": true, "text": "java.util.Map map = Hazelcast.getMap (\"mymap\");\nmap.put (\"key1\", \"value1\");\n" }, { "answer_id": 21073621, "...
2008/10/13
[ "https://Stackoverflow.com/questions/198006", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16050/" ]
198,007
<p>I'm using the PHP function imagettftext() to convert text into a GIF image. The text I am converting has Unicode characters including Japanese. Everything works fine on my local machine (Ubuntu 7.10), but on my webhost server, the Japanese characters are mangled. What could be causing the difference? Everything shou...
[ { "answer_id": 198054, "author": "Treb", "author_id": 22114, "author_profile": "https://Stackoverflow.com/users/22114", "pm_score": 0, "selected": false, "text": "$text = '日本語';" }, { "answer_id": 201787, "author": "gerdemb", "author_id": 27478, "author_profile": "htt...
2008/10/13
[ "https://Stackoverflow.com/questions/198007", "https://Stackoverflow.com", "https://Stackoverflow.com/users/27478/" ]
198,023
<p>Are there any tools to assist with the internationalization of Strings within JSP files?</p> <p>Most IDEs (for example, <a href="http://www.netbeans.org" rel="nofollow noreferrer">NetBeans</a>) offer such a feature for Java code. However, in the case of NetBeans, no such feature exists for JSP files.</p> <p>With <...
[ { "answer_id": 805704, "author": "seanf", "author_id": 14379, "author_profile": "https://Stackoverflow.com/users/14379", "pm_score": 2, "selected": false, "text": "${messages[\"Hello {0}\"][username]}" }, { "answer_id": 2715909, "author": "cdauth", "author_id": 242365, ...
2008/10/13
[ "https://Stackoverflow.com/questions/198023", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3789/" ]
198,024
<p>How do I go about doing this with jQuery?</p> <p>Basically the structure:</p> <pre><code>&lt;form id="myForm"&gt; &lt;iframe&gt; &lt;!-- Normal HTML headers omitted --&gt; &lt;input type=radio name="myRadio" value=1&gt;First &lt;input type=radio name="myRadio" value=2&gt;Second &lt;input type=rad...
[ { "answer_id": 198094, "author": "redsquare", "author_id": 6440, "author_profile": "https://Stackoverflow.com/users/6440", "pm_score": 5, "selected": true, "text": "$('#myForm iframe').contents().find('input[name=myradio]').val()" }, { "answer_id": 198211, "author": "eyelidle...
2008/10/13
[ "https://Stackoverflow.com/questions/198024", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15345/" ]
198,041
<p>Is there a way to tell the debugger to stop just before returning, on whichever statement exits from the method, be it return, exception, or fall out the bottom? I am inspired by the fact that the Java editor shows me all the places that my method <em>can</em> exit - it highlights them when you click on the return t...
[ { "answer_id": 198072, "author": "MBCook", "author_id": 18189, "author_profile": "https://Stackoverflow.com/users/18189", "pm_score": 0, "selected": false, "text": "public void method(Object stuff) {\n try {\n /* normal code */\n } finally {\n int x = 0;\n }\n}\n" ...
2008/10/13
[ "https://Stackoverflow.com/questions/198041", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14749/" ]
198,045
<p>I've got a spreadsheet with plenty of graphs in it and one sheet with loads of data feeding those graphs.</p> <p>I've plotted the data on each graph using </p> <pre><code>=Sheet1!$C5:$C$3000 </code></pre> <p>This basically just plots the values in C5 to C3000 on a graph.</p> <p>Regularly though I just want to lo...
[ { "answer_id": 198118, "author": "Dave DuPlantis", "author_id": 8174, "author_profile": "https://Stackoverflow.com/users/8174", "pm_score": 1, "selected": false, "text": "Private Sub Worksheet_Change(ByVal Target as Range)\n Select Case Target \n Case Cells(14, 2)\n Sheet1.C...
2008/10/13
[ "https://Stackoverflow.com/questions/198045", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4014/" ]
198,047
<p>Can anyone suggest a tutorial or sample code that implements a nested set (or similar ordered tree structure) with associated Javascript that facilitates drag and drop? I'm looking for both the display code (view) as well as the AJAX backend controller which writes the tree to the database on change.</p> <p>I want ...
[ { "answer_id": 199458, "author": "SchizoDuckie", "author_id": 18077, "author_profile": "https://Stackoverflow.com/users/18077", "pm_score": -1, "selected": false, "text": "window.addEvent('domready', function()\n {\n document.Treeview = new TreeView();\n });\n\n\nTreeView = ...
2008/10/13
[ "https://Stackoverflow.com/questions/198047", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17453/" ]
198,049
<p>So I made some timers for a quiz. The thing is, I just realized when I put </p> <pre><code>javascript: alert("blah"); </code></pre> <p>in the address, the popup alert box <strong>pauses</strong> my timer. Which is very unwanted in a quiz.</p> <p>I don't think there is any way to stop this behaviour... but I'll as...
[ { "answer_id": 198160, "author": "eyelidlessness", "author_id": 17964, "author_profile": "https://Stackoverflow.com/users/17964", "pm_score": 4, "selected": true, "text": "// Preserve native alert() if you need it for something special\nwindow.nativeAlert = window.alert;\n\nwindow.alert ...
2008/10/13
[ "https://Stackoverflow.com/questions/198049", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15345/" ]
198,051
<p>I was always wondering if there is operator for deleting multi dimensional arrays in the standard C++ language.</p> <p>If we have created a pointer to a single dimensional array</p> <pre><code>int *array = new int[size]; </code></pre> <p>the delete looks like:</p> <pre><code>delete [] array; </code></pre> <p>Th...
[ { "answer_id": 198064, "author": "shsteimer", "author_id": 292, "author_profile": "https://Stackoverflow.com/users/292", "pm_score": 2, "selected": false, "text": "int ** mArr = new int*[10];\nfor(int i=0;i<10;i++)\n{\n mArr[i]=new int[10];\n}\n" }, { "answer_id": 198070, "...
2008/10/13
[ "https://Stackoverflow.com/questions/198051", "https://Stackoverflow.com", "https://Stackoverflow.com/users/446104/" ]
198,058
<p>I'd like to show a div that has a background-color with the height and width set to 100% but no content. Is it possible to do that without putting a &amp;nbsp; inside?</p> <p>Edit: Thanks to Mark Biek for pointing out that empty div with width and height styles shows how I'd expect. My div is in a table cell, where...
[ { "answer_id": 198083, "author": "Mark Biek", "author_id": 305, "author_profile": "https://Stackoverflow.com/users/305", "pm_score": 4, "selected": true, "text": "<html>\n <head>\n <style>\n #foo{\n background: #ff0000;\n width: 100%;\...
2008/10/13
[ "https://Stackoverflow.com/questions/198058", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23427/" ]
198,079
<p>Does anyone know a good resource to concisely explain the different types of lists available in C# and when their usage is appropriate?</p> <p>For example, List, Hashtable, Dictionaries etc.</p> <p>I'm never quite sure when I should be using what.</p>
[ { "answer_id": 198091, "author": "Robert S.", "author_id": 7565, "author_profile": "https://Stackoverflow.com/users/7565", "pm_score": 2, "selected": false, "text": "Hashtable" }, { "answer_id": 198093, "author": "Joel Coehoorn", "author_id": 3043, "author_profile": "...
2008/10/13
[ "https://Stackoverflow.com/questions/198079", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1127460/" ]
198,082
<p>How to find out size of session in ASP.NET from web application?</p>
[ { "answer_id": 198158, "author": "Rafe", "author_id": 27497, "author_profile": "https://Stackoverflow.com/users/27497", "pm_score": 0, "selected": false, "text": "<trace enabled=\"true\" requestLimit=\"10\" pageOutput=\"true\" traceMode=\"SortByTime\" \n localOnly=\"true\"/>\n" }, { ...
2008/10/13
[ "https://Stackoverflow.com/questions/198082", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23280/" ]
198,087
<p> We recently switched our Windows software packages from RPM (cygwin) to MSI (wix). Having a native packaging is a much welcome change and we intend to stick with it. However, MSI feels overly complicated for what it does and doesn't seem to provide some basic abilities. But I'm probably mistaken. </p> <p> Is there ...
[ { "answer_id": 198130, "author": "Node", "author_id": 7190, "author_profile": "https://Stackoverflow.com/users/7190", "pm_score": 5, "selected": true, "text": "strComputer = \".\"\n\nSet objWMIService = GetObject(\"winmgmts:\" & _\n \"{impersonationLevel=impersonate}!\\\\\" & _\n s...
2008/10/13
[ "https://Stackoverflow.com/questions/198087", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11892/" ]
198,114
<p>To do an unattended installation of any MSI package, one can simply use the following command:</p> <pre><code>msiexec /qn /i package.msi </code></pre> <p>However, this triggers an asynchronous installation: if you happen to chain 2 dependent installations, you will have to wait somehow for the 1st installation to ...
[ { "answer_id": 13939918, "author": "Ben Mosher", "author_id": 344143, "author_profile": "https://Stackoverflow.com/users/344143", "pm_score": 3, "selected": false, "text": "start /wait msiexec /i MyInstaller.msi ...\n" } ]
2008/10/13
[ "https://Stackoverflow.com/questions/198114", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11892/" ]
198,119
<p>I have a flash project that I'm trying to export as a single SWF. There's a main SWF file that loads about 6 other SWFs, and both the main and the child SWFs reference other external assets (images, sounds, etc). I'd like to package everything as a single .swf file so I don't have to tote the other assets around w...
[ { "answer_id": 1413991, "author": "nikaji", "author_id": 171185, "author_profile": "https://Stackoverflow.com/users/171185", "pm_score": 2, "selected": false, "text": "var realLoadMovie:Function = MovieClip.prototype.loadMovie;\n\nMovieClip.prototype.loadMovie = function(url:String, meth...
2008/10/13
[ "https://Stackoverflow.com/questions/198119", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
198,122
<p>I have a server written in Java that runs as a Windows service (thanks to Install4J). I want this service to be able to download the latest version of the JAR file it runs from, and start running the new code. The stitch is that I don't want the Windows service to fully exit.</p> <p>Ideally, I would accomplish th...
[ { "answer_id": 198184, "author": "Powerlord", "author_id": 15880, "author_profile": "https://Stackoverflow.com/users/15880", "pm_score": 1, "selected": false, "text": "Runtime.exec ProcessBuilder" }, { "answer_id": 198268, "author": "gnud", "author_id": 27204, "author...
2008/10/13
[ "https://Stackoverflow.com/questions/198122", "https://Stackoverflow.com", "https://Stackoverflow.com/users/420/" ]
198,135
<p>Which is faster? someCondition has the same probability of being true as it has of being false.</p> <p>Insertion:</p> <pre><code>arrayList = Array("apple", "pear","grape") if someCondition then ' insert "banana" element end if </code></pre> <p>Deletion:</p> <pre><code>arrayList = Array("apple","banana","pea...
[ { "answer_id": 198144, "author": "ilitirit", "author_id": 9825, "author_profile": "https://Stackoverflow.com/users/9825", "pm_score": 0, "selected": false, "text": "Public Sub RemoveArrayElement_Str(AryVar() As String, ByVal _\n RemoveWhich As Long)\n '// The size of the array elem...
2008/10/13
[ "https://Stackoverflow.com/questions/198135", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9825/" ]
198,141
<p>I have a postgres table. I need to delete some data from it. I was going to create a temporary table, copy the data in, recreate the indexes and the delete the rows I need. I can't delete data from the original table, because this original table is the source of data. In one case I need to get some results that depe...
[ { "answer_id": 198192, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 1, "selected": false, "text": "create table mynewone as select * from myoldone where ...\nmess (re-create) with indexes after the table swap.\n" }, { ...
2008/10/13
[ "https://Stackoverflow.com/questions/198141", "https://Stackoverflow.com", "https://Stackoverflow.com/users/161922/" ]
198,153
<pre><code>&lt;html&gt; &lt;head&gt; &lt;style type="text/css"&gt; div { border:1px solid #000; min-width: 50%; } &lt;/style&gt; &lt;/head&gt; &lt;body&gt; &lt;div&gt;This is some text. &lt;/div&gt; &lt;/body&gt; &lt;/html&g...
[ { "answer_id": 198165, "author": "Chris Serra", "author_id": 13435, "author_profile": "https://Stackoverflow.com/users/13435", "pm_score": 4, "selected": true, "text": "absolute 50% min-width min-height 50%" }, { "answer_id": 198188, "author": "eyelidlessness", "author_id...
2008/10/13
[ "https://Stackoverflow.com/questions/198153", "https://Stackoverflow.com", "https://Stackoverflow.com/users/572/" ]
198,155
<p>I am trying to run xcopy that copies files excluding .obj, etc. What I am seeing is that Microsoft.Practices.ObjectBuilder.dll is not copied when my excludes.txt file contains .obj as an extension. When .obj is removed, I Microsoft.Practices.ObjectBuilder.dll is copied correctly. This does not happen to other dlls t...
[ { "answer_id": 198167, "author": "gizmo", "author_id": 9396, "author_profile": "https://Stackoverflow.com/users/9396", "pm_score": -1, "selected": false, "text": "xcopy /?\n" }, { "answer_id": 198282, "author": "Hafthor", "author_id": 4489, "author_profile": "https://...
2008/10/13
[ "https://Stackoverflow.com/questions/198155", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2341/" ]
198,157
<p>I'm trying to verify if a schema matches the objects I'm initializing.</p> <p>Is there a way to get the TableName of a class other than simply reflecting the class name?</p> <p>I am using some class with explicit TableNames</p> <p>Edit: using Joe's solution I added the case where you don't specify the table name,...
[ { "answer_id": 198263, "author": "user27529", "author_id": 27529, "author_profile": "https://Stackoverflow.com/users/27529", "pm_score": 3, "selected": true, "text": "[ActiveRecord(Table = \"NewsMaster\")]\npublic class Article\n{\n [PrimaryKey(Generator = PrimaryKeyType.Identity)]\n ...
2008/10/13
[ "https://Stackoverflow.com/questions/198157", "https://Stackoverflow.com", "https://Stackoverflow.com/users/253/" ]
198,196
<p>I'm curious to know how people are using table aliases. The other developers where I work always use table aliases, and always use the alias of a, b, c, etc.</p> <p>Here's an example:</p> <pre><code>SELECT a.TripNum, b.SegmentNum, b.StopNum, b.ArrivalTime FROM Trip a, Segment b WHERE a.TripNum = b.TripNum </code>...
[ { "answer_id": 198214, "author": "BoltBait", "author_id": 20848, "author_profile": "https://Stackoverflow.com/users/20848", "pm_score": 4, "selected": false, "text": "SELECT t.TripNum, s.SegmentNum, s.StopNum, s.ArrivalTime \nFROM Trip t, Segment s \nWHERE t.TripNum = s.TripNum\n" }, ...
2008/10/13
[ "https://Stackoverflow.com/questions/198196", "https://Stackoverflow.com", "https://Stackoverflow.com/users/28281/" ]
198,199
<p>How do you reverse a string in C or C++ without requiring a separate buffer to hold the reversed string?</p>
[ { "answer_id": 198200, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 3, "selected": false, "text": "#include <cstdio>\n#include <cstdlib>\n#include <string>\n\nvoid strrev(char *str)\n{\n if( str == NULL )\n ...
2008/10/13
[ "https://Stackoverflow.com/questions/198199", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
198,215
<pre><code>int main() { HandPhone A,B; A&gt;&gt;B;//overloading operator&gt;&gt; to simulate sending sms to another handphone(object) return 0; } </code></pre> <p>How should I declare the istream operator to simulate sending sms to another handphone(object)?</p>
[ { "answer_id": 198227, "author": "luke", "author_id": 16434, "author_profile": "https://Stackoverflow.com/users/16434", "pm_score": 2, "selected": false, "text": "class A;\nclass B;\n\nA operator << (A& a, const B& b) // a << b; sends b to a.\n{\n a.sendMessage(b);\n return a;\n}...
2008/10/13
[ "https://Stackoverflow.com/questions/198215", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
198,233
<p>How can I make my window not have a title bar but appear in the task bar with some descriptive text? If you set the Form's .Text property then .net gives it a title bar, which I don't want.</p> <pre><code> this.ControlBox = false; this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialo...
[ { "answer_id": 198287, "author": "amcoder", "author_id": 26898, "author_profile": "https://Stackoverflow.com/users/26898", "pm_score": 2, "selected": false, "text": "this.FormBorderStyle = FormBorderStyle.None;\n" }, { "answer_id": 198290, "author": "Jon Schneider", "auth...
2008/10/13
[ "https://Stackoverflow.com/questions/198233", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8479/" ]