qid
int64
4
19.1M
question
stringlengths
18
48.3k
answers
list
date
stringlengths
10
10
metadata
list
199,180
<p>The only thing I can get python omnicomplete to work with are system modules. I get nothing for help with modules in my site-packages or modules that I'm currently working on.</p>
[ { "answer_id": 200227, "author": "Simon Peverett", "author_id": 6063, "author_profile": "https://Stackoverflow.com/users/6063", "pm_score": 0, "selected": false, "text": " set iskeyword+=.\n os.path.\n" }, { "answer_id": 201420, "author": "Jeremy Cantrell", "author_id": ...
2008/10/13
[ "https://Stackoverflow.com/questions/199180", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1367022/" ]
199,182
<p>I'm working on a program that is form based but I have been asked to add some command line support, this works fine apart from the form flashes up and closes down when running from the command line. Is there anyway to hide the form whilst the command line is running? Some code does refer to controls so the gui would...
[ { "answer_id": 199198, "author": "benPearce", "author_id": 4490, "author_profile": "https://Stackoverflow.com/users/4490", "pm_score": 2, "selected": false, "text": "main = new MainForm();\n Application.Run(main);\n" } ]
2008/10/13
[ "https://Stackoverflow.com/questions/199182", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
199,184
<p>How do I check if a number is a palindrome?</p> <p>Any language. Any algorithm. (except the algorithm of making the number a string and then reversing the string).</p>
[ { "answer_id": 199218, "author": "Jorge Ferreira", "author_id": 6508, "author_profile": "https://Stackoverflow.com/users/6508", "pm_score": 8, "selected": false, "text": "n = num;\nrev = 0;\nwhile (num > 0)\n{\n dig = num % 10;\n rev = rev * 10 + dig;\n num = num / 10;\n}\n n ==...
2008/10/13
[ "https://Stackoverflow.com/questions/199184", "https://Stackoverflow.com", "https://Stackoverflow.com/users/781/" ]
199,219
<p>Im getting frustrated because of OpenDNS and other services (ie: roadrunner) that now always returns a ping even if you type any invalid url ie: lkjsdaflkjdsjf.com --- I had created software for my own use that would ping a url to verify if the site was up or not. This no longer works. Does anyone have any ideas a...
[ { "answer_id": 199254, "author": "IAmCodeMonkey", "author_id": 27613, "author_profile": "https://Stackoverflow.com/users/27613", "pm_score": 3, "selected": true, "text": "<html>\n <head>\n <script language=\"javascript\" type=\"text/javascript\">\n <!--\n var ajax = new X...
2008/10/13
[ "https://Stackoverflow.com/questions/199219", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26685/" ]
199,235
<p>I am using Oracle adapter from the BizTalk Adapter Pack (WCF based for BTS 2006 R2). In the configuration of the "solicit-response" send ports, I have used Oracle's username and password to connect to the database. </p> <p>Now I would like to change that and use the SSO. So far I have created the Affiliate applicat...
[ { "answer_id": 2384200, "author": "Sam", "author_id": 47636, "author_profile": "https://Stackoverflow.com/users/47636", "pm_score": 2, "selected": false, "text": " public IBaseMessage Execute(IPipelineContext pContext, IBaseMessage pInMsg)\n {\n ISSOTicket ssoTicket = new IS...
2008/10/13
[ "https://Stackoverflow.com/questions/199235", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
199,238
<p>I'm writing a lightweight XML editor, and in cases where the user's input is not well formed, I would like to indicate to the user where the problem is, or at least where the first problem is. Does anyone know of an existing algorithm for this? If looking at code helps, if I could fill in the FindIndexOfInvalidXml...
[ { "answer_id": 199332, "author": "Pseudo Masochist", "author_id": 8529, "author_profile": "https://Stackoverflow.com/users/8529", "pm_score": 4, "selected": true, "text": "string s = \"<?xml version=\\\"1.0\\\"?><tag1><tag2>Some text.</taagg2></tag1>\";\nSystem.Xml.XmlDocument doc = new ...
2008/10/13
[ "https://Stackoverflow.com/questions/199238", "https://Stackoverflow.com", "https://Stackoverflow.com/users/27109/" ]
199,241
<p>How can i generate bytecode (Byte[]) from a String at runtime, without using a "javac" process or something of this sort? is there a simple way of calling the compiler like that?</p> <p>later addition:</p> <p>I chose to <a href="https://stackoverflow.com/questions/200833/when-should-i-accept-an-answer">accept the ...
[ { "answer_id": 199314, "author": "William", "author_id": 9193, "author_profile": "https://Stackoverflow.com/users/9193", "pm_score": 0, "selected": false, "text": "eval()" } ]
2008/10/13
[ "https://Stackoverflow.com/questions/199241", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11813/" ]
199,252
<p>I'm considering the best way to design a permissions system for an "admin" web application. The application is likely to have many users, each of whom could be assigned a certain role; some of these users could be permitted to perform specific tasks outside the role.</p> <p>I can think of two ways to design this: o...
[ { "answer_id": 199272, "author": "Dimitry", "author_id": 27073, "author_profile": "https://Stackoverflow.com/users/27073", "pm_score": 0, "selected": false, "text": "create table permissions (\n user_id INT NOT Null,\n permission VARCHAR(255) NOT NULL,\n value TINYINT(1) NULL\n)...
2008/10/13
[ "https://Stackoverflow.com/questions/199252", "https://Stackoverflow.com", "https://Stackoverflow.com/users/27649/" ]
199,260
<p>Recently, someone asked about an <a href="https://stackoverflow.com/questions/198199/how-do-you-reverse-a-string-in-place-in-c-or-c">algorithm for reversing a string in place in C</a>. Most of the proposed solutions had troubles when dealing with non single-byte strings. So, I was wondering what could be a good algo...
[ { "answer_id": 199280, "author": "Juan Pablo Califano", "author_id": 24170, "author_profile": "https://Stackoverflow.com/users/24170", "pm_score": 3, "selected": false, "text": "class UTF8Utils {\n\n\n public static void Reverse(byte[] str) {\n int len = str.Length;\n in...
2008/10/13
[ "https://Stackoverflow.com/questions/199260", "https://Stackoverflow.com", "https://Stackoverflow.com/users/24170/" ]
199,266
<p>How can I make xargs execute the command exactly once for each line of input given? It's default behavior is to chunk the lines and execute the command once, passing multiple lines to each instance. </p> <blockquote> <p>From <a href="http://en.wikipedia.org/wiki/Xargs" rel="noreferrer">http://en.wikipedia.org/wik...
[ { "answer_id": 199270, "author": "Draemon", "author_id": 26334, "author_profile": "https://Stackoverflow.com/users/26334", "pm_score": 10, "selected": true, "text": "xargs -L 1\nxargs --max-lines=1 # synonym for the -L option\n -L max-lines\n Use at most max-lines nonblank input...
2008/10/13
[ "https://Stackoverflow.com/questions/199266", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4883/" ]
199,321
<p>What is the best way to write data to the text console at arbitrary locations on the screen and with custom fore/background colors?</p>
[ { "answer_id": 22065166, "author": "Igor Kostomin", "author_id": 1119537, "author_profile": "https://Stackoverflow.com/users/1119537", "pm_score": 2, "selected": false, "text": "WriteConsoleOutput [DllImport(\"kernel32.dll\", SetLastError = true, EntryPoint = \"WriteConsoleOutputW\")]\np...
2008/10/13
[ "https://Stackoverflow.com/questions/199321", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4435/" ]
199,333
<p>I was writing a program in C++ to find all solutions of <em>a</em><sup><em>b</em></sup> = <em>c</em>, where <em>a</em>, <em>b</em> and <em>c</em> together use all the digits 0-9 exactly once. The program looped over values of <em>a</em> and <em>b</em>, and it ran a digit-counting routine each time on <em>a</em>, <em...
[ { "answer_id": 199354, "author": "Andrew Edgecombe", "author_id": 11694, "author_profile": "https://Stackoverflow.com/users/11694", "pm_score": 4, "selected": false, "text": "unsigned long unsigned long long FPE_INTOVF_TRAP SIGFPE FPE_INTOVF_TRAP" }, { "answer_id": 199355, "a...
2008/10/13
[ "https://Stackoverflow.com/questions/199333", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23732/" ]
199,336
<p>How would I print a spinning curser in a utility that runs in a terminal using standard C?</p> <p>I'm looking for something that prints: \ | / - over and over in the same position on the screen?</p> <p>Thanks </p>
[ { "answer_id": 199344, "author": "Greg Hewgill", "author_id": 893, "author_profile": "https://Stackoverflow.com/users/893", "pm_score": 6, "selected": true, "text": "\\b printf(\"processing... |\");\nfflush(stdout);\n// do something\nprintf(\"\\b/\");\nfflush(stdout);\n// do some more\np...
2008/10/13
[ "https://Stackoverflow.com/questions/199336", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3467/" ]
199,348
<p>Is there a way (hacky will do) to allow a user to go back to a previous version of a <a href="http://en.wikipedia.org/wiki/ClickOnce" rel="noreferrer">ClickOnce</a> network deployed application?</p> <p>I've looked in the docs and API and there seems to be no way. You <b>can</b> selectively choose if you would like ...
[ { "answer_id": 1664121, "author": "Jason Hornor", "author_id": 201263, "author_profile": "https://Stackoverflow.com/users/201263", "pm_score": 7, "selected": false, "text": "[appName].application publish.htm [appName].application publish.htm" }, { "answer_id": 11238554, "auth...
2008/10/13
[ "https://Stackoverflow.com/questions/199348", "https://Stackoverflow.com", "https://Stackoverflow.com/users/460845/" ]
199,390
<p>I have an application used by pretty tech-savey people and they want small island of programmability so I've used embedded Iron Python.</p> <p>However, since IronPython 2.0 Eval() doesn't work any more. Specifically I can't both load modules and inject local variables.</p> <p>There is a work around where I can sti...
[ { "answer_id": 199406, "author": "Curt Hagenlocher", "author_id": 533, "author_profile": "https://Stackoverflow.com/users/533", "pm_score": 3, "selected": true, "text": "ScriptEngine engine = Python.CreateEngine();\nScriptSource source = engine.CreateScriptSourceFromString(\"2 + 5\", Sou...
2008/10/13
[ "https://Stackoverflow.com/questions/199390", "https://Stackoverflow.com", "https://Stackoverflow.com/users/460845/" ]
199,403
<p>I would like to load a BMP file, do some operations on it in memory, and output a new BMP file using C++ on Windows (Win32 native). I am aware of <a href="http://www.imagemagick.org/" rel="nofollow noreferrer">ImageMagick</a> and it's C++ binding <a href="http://www.imagemagick.org/Magick%2B%2B/" rel="nofollow noref...
[ { "answer_id": 200113, "author": "user27732", "author_id": 27732, "author_profile": "https://Stackoverflow.com/users/27732", "pm_score": 2, "selected": false, "text": "#include <windows.h>\n" }, { "answer_id": 11961825, "author": "Mike C", "author_id": 800151, "author...
2008/10/13
[ "https://Stackoverflow.com/questions/199403", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3827/" ]
199,418
<p>I have a C++ library that provides various classes for managing data. I have the source code for the library.</p> <p>I want to extend the C++ API to support C function calls so that the library can be used with C code and C++ code at the same time.</p> <p>I'm using GNU tool chain (gcc, glibc, etc), so language an...
[ { "answer_id": 199422, "author": "Greg Hewgill", "author_id": 893, "author_profile": "https://Stackoverflow.com/users/893", "pm_score": 7, "selected": true, "text": "extern \"C\" extern \"C\" int foo(char *bar)\n{\n return realFoo(std::string(bar));\n}\n foo() realFoo()" }, { ...
2008/10/13
[ "https://Stackoverflow.com/questions/199418", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3467/" ]
199,426
<p>I am new to Java and am trying to run a program using Eclipse. But I have no idea how to get the command prompt running in with Eclipse...</p> <p>I did some online research and couldn't get anything consolidated!</p> <h3>Update:</h3> <p>I'm not using an applet. It's a normal Java program trying to read a line from c...
[ { "answer_id": 199444, "author": "Pablo Fernandez", "author_id": 7595, "author_profile": "https://Stackoverflow.com/users/7595", "pm_score": 0, "selected": false, "text": "Try this:\n\n\nimport java.util.Scanner;\n\n public class ReadFromPrompt{\n\n public static void main(Strin...
2008/10/13
[ "https://Stackoverflow.com/questions/199426", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21968/" ]
199,428
<p>I Have one entity [Project] that contains a collection of other entities [Questions].</p> <p>I have mapped the relation with a cascade attribute of &quot;all-delete-orphan&quot;.</p> <p>In my DB the relation is mapped with a project_id (FK) field on the questions table. this field cannot be null since I don't want a...
[ { "answer_id": 199683, "author": "abarax", "author_id": 24390, "author_profile": "https://Stackoverflow.com/users/24390", "pm_score": 4, "selected": false, "text": "Parent p = (Parent) session.Load(typeof(Parent), pid);\n// Get one child out of the set\nIEnumerator childEnumerator = p.Ch...
2008/10/13
[ "https://Stackoverflow.com/questions/199428", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7595/" ]
199,468
<p>Why am I getting an out of memory exception?</p> <p>So this dies in C# on the first time through:</p> <p><strong>splitBitmaps.Add(neededImage.Clone(rectDimensions, neededImage.PixelFormat));</strong> </p> <p>Where splitBitmaps is a List&lt;BitMap&gt; BUT this works in VB for at least 4 iterations:</p> <p><strong...
[ { "answer_id": 29024741, "author": "dellyjm", "author_id": 1810774, "author_profile": "https://Stackoverflow.com/users/1810774", "pm_score": 2, "selected": false, "text": "int totalWidth = rect.Left + rect.Width; //think -the same as Right property\n\nint allowableWidth = localImage.Widt...
2008/10/13
[ "https://Stackoverflow.com/questions/199468", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21691/" ]
199,469
<p>I need to change the capitalization of a set of files in a subversion working copy, like so:</p> <pre> svn mv test.txt Test.txt svn mv test2.txt Test2.txt svn mv testn.txt Testn.txt ... svn commit -m "caps" </pre> <p>How can I automate this process? Standard linux install tools available.</p>
[ { "answer_id": 199510, "author": "UnkwnTech", "author_id": 115, "author_profile": "https://Stackoverflow.com/users/115", "pm_score": 2, "selected": false, "text": "#!/usr/bin/python\nfrom os import rename, listdir\npath = \"/path/to/folder\"\ntry:\n dirList = listdir(path)\nexcept:\n ...
2008/10/13
[ "https://Stackoverflow.com/questions/199469", "https://Stackoverflow.com", "https://Stackoverflow.com/users/27667/" ]
199,470
<ul> <li>What is the main difference between <code>int.Parse()</code> and <code>Convert.ToInt32()</code>?</li> <li>Which one is to be preferred</li> </ul>
[ { "answer_id": 199482, "author": "shahkalpesh", "author_id": 23574, "author_profile": "https://Stackoverflow.com/users/23574", "pm_score": 7, "selected": false, "text": "Convert.ToInt32() int.Parse() Convert.ToInt32() 0 null" }, { "answer_id": 199484, "author": "Dave Markle",...
2008/10/13
[ "https://Stackoverflow.com/questions/199470", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14752/" ]
199,483
<p>This is the constraint I have on the Customers table.</p> <pre><code>ALTER TABLE Customers ADD CONSTRAINT CN_CustomerPhone CHECK (Phone LIKE '([0-9][0-9][0-9]) [0-9][0-9][0-9]-[0-9][0-9][0-9][0-9]') </code></pre> <p>Why does this fail?</p> <pre><code>INSERT INTO Customers (CustomerName, Address, City, Sta...
[ { "answer_id": 199500, "author": "shahkalpesh", "author_id": 23574, "author_profile": "https://Stackoverflow.com/users/23574", "pm_score": 4, "selected": true, "text": "\ncreate table #temp\n(phone varchar(15))\n\nALTER TABLE #temp\n ADD CONSTRAINT CN_CustomerPhone\n CHECK (Phone L...
2008/10/13
[ "https://Stackoverflow.com/questions/199483", "https://Stackoverflow.com", "https://Stackoverflow.com/users/100/" ]
199,488
<p>For some reason I am having troubles with a DBI handle. Basically what happened was that I made a special connect function in a perl module and switched from doing:</p> <pre><code>do 'foo.pl' </code></pre> <p>to</p> <pre><code>use Foo; </code></pre> <p>and then I do</p> <pre><code>$dbh = Foo-&gt;connect; </cod...
[ { "answer_id": 199635, "author": "Axeman", "author_id": 11289, "author_profile": "https://Stackoverflow.com/users/11289", "pm_score": 3, "selected": true, "text": "do 'foo.pl' foo.pl Foo.pm Foo:: 'Foo' Foo::connect Foo->can('connect') rollback" }, { "answer_id": 200016, "auth...
2008/10/13
[ "https://Stackoverflow.com/questions/199488", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12448/" ]
199,498
<p>I'm just getting started working with foreign keys for the first time and I'm wondering if there's a standard naming scheme to use for them?</p> <p>Given these tables:</p> <pre><code>task (id, userid, title) note (id, taskid, userid, note); user (id, name) </code></pre> <p>Where Tasks have Notes, Tasks are owned ...
[ { "answer_id": 199504, "author": "EvilTeach", "author_id": 7734, "author_profile": "https://Stackoverflow.com/users/7734", "pm_score": 4, "selected": false, "text": "FK_TABLENAME_COLUMNNAME" }, { "answer_id": 199506, "author": "Steve Moyer", "author_id": 17008, "autho...
2008/10/13
[ "https://Stackoverflow.com/questions/199498", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9021/" ]
199,499
<p>I'm creating a custom Java Struts tag that is for building and formatting an html select box in a standardised way (part of our usability guidelines).</p> <p>Each select box has an additional/initial value which describes the requirement of the value returned by the select element, i.e.:</p> <ul> <li><i>Mandatory<...
[ { "answer_id": 199572, "author": "Mike Spross", "author_id": 17862, "author_profile": "https://Stackoverflow.com/users/17862", "pm_score": 4, "selected": true, "text": "requirementConstraint <my:customSelect requirementConstraint=\"Mandatory\">\n <option value=\"1\">A</option>\n <opt...
2008/10/13
[ "https://Stackoverflow.com/questions/199499", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6340/" ]
199,508
<p>Is it possible to show other processes in progress on an Oracle database? Something like Sybases <code>sp_who</code></p>
[ { "answer_id": 199523, "author": "jim", "author_id": 27628, "author_profile": "https://Stackoverflow.com/users/27628", "pm_score": 3, "selected": false, "text": "SELECT sid,\n opname,\n sofar,\n totalwork,\n units,\n elapsed_seconds,\n time_remaining\n...
2008/10/14
[ "https://Stackoverflow.com/questions/199508", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14952/" ]
199,518
<p>In WinXP (SP2) you can store mapped network passwords...</p> <p>Start->Control Panel->User Accounts->Pick one then choose "Manage my network passwords" from Related Tasks.</p> <p>I normally have about 25-30 servers mapped this way to a few different accounts/domains. The problem is that at some point during our p...
[ { "answer_id": 199766, "author": "Mark Brackett", "author_id": 2199, "author_profile": "https://Stackoverflow.com/users/2199", "pm_score": 3, "selected": true, "text": "CRED_PERSIST_SESSION CRED_PERSIST_LOCAL_MACHINE CRED_PERSIST_ENTERPRISE" } ]
2008/10/14
[ "https://Stackoverflow.com/questions/199518", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12842/" ]
199,521
<p>I have a form with a "Clear" button.</p> <p>When the user clicks "Clear", I want to clear the value of all the visible elements on the form. In the case of date controls, I want to reset them to the current date.</p> <p>All of my controls are contained on a Panel.</p> <p>Right now, I'm doing this with the below ...
[ { "answer_id": 199553, "author": "Mark Brackett", "author_id": 2199, "author_profile": "https://Stackoverflow.com/users/2199", "pm_score": 5, "selected": true, "text": "Dim dtp as DateTimePicker = TryCast(ctrl, DateTimePicker)\nIf dtp IsNot Nothing then dtp.Value = Now()\n <Extension()> ...
2008/10/14
[ "https://Stackoverflow.com/questions/199521", "https://Stackoverflow.com", "https://Stackoverflow.com/users/672/" ]
199,527
<p><code>$0</code> is the variable for the top level Ruby program, but is there one for the current method?</p>
[ { "answer_id": 199550, "author": "Mark A. Nicolosi", "author_id": 1103052, "author_profile": "https://Stackoverflow.com/users/1103052", "pm_score": 5, "selected": false, "text": "module Kernel\nprivate\n def this_method_name\n caller[0] =~ /`([^']*)'/ and $1\n end\nend\n\nclas...
2008/10/14
[ "https://Stackoverflow.com/questions/199527", "https://Stackoverflow.com", "https://Stackoverflow.com/users/757/" ]
199,528
<p>I know how to program Console application with parameters, example : myProgram.exe param1 param2.</p> <p>My question is, how can I make my program works with |, example : echo "word" | myProgram.exe?</p>
[ { "answer_id": 199534, "author": "Matthew Scharley", "author_id": 15537, "author_profile": "https://Stackoverflow.com/users/15537", "pm_score": 7, "selected": true, "text": "Console.Read() Console.ReadLine() cat class Program\n{\n static void Main(string[] args)\n {\n string...
2008/10/14
[ "https://Stackoverflow.com/questions/199528", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13913/" ]
199,564
<p>My professor wrote this shell script to time my program, and display the results. For some reason it just outputs 0s with my program. He provided the following files:</p> <pre><code>timeit.csh sequence ecoli2500.txt ecoli3000.txt ecoli5000.txt ecoli7000.txt ecoli8000.txt ecoli9000.txt ecoli...
[ { "answer_id": 202628, "author": "objectivesea", "author_id": 27763, "author_profile": "https://Stackoverflow.com/users/27763", "pm_score": 1, "selected": false, "text": " nice /usr/bin/time -p $program < \n nice /usr/bin/time -p ./$program <\n" } ]
2008/10/14
[ "https://Stackoverflow.com/questions/199564", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
199,597
<p>I have a table ("venues") that stores all the possible venues a volunteer can work, each volunteer is assigned to work one venue each.</p> <p>I want to create a select drop down from the venues table.</p> <p>Right now I can display the venue each volunteer is assigned, but I want it to display the drop down box, w...
[ { "answer_id": 199614, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 5, "selected": true, "text": "$query = \"SELECT volunteers_2009.id, volunteers_2009.comments, volunteers_2009.choice1, volunteers_2009.choice2, volunteers_20...
2008/10/14
[ "https://Stackoverflow.com/questions/199597", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26130/" ]
199,603
<p>I want to be able to write a lambda/Proc in my Ruby code, serialize it so that I can write it to disk, and then execute the lambda later. Sort of like...</p> <pre><code>x = 40 f = lambda { |y| x + y } save_for_later(f) </code></pre> <p>Later, in a separate run of the Ruby interpreter, I want to be able to say...<...
[ { "answer_id": 199803, "author": "Jonathan Tran", "author_id": 12887, "author_profile": "https://Stackoverflow.com/users/12887", "pm_score": 5, "selected": true, "text": "def save_for_later(&block)\n return nil unless block_given?\n\n c = Class.new\n c.class_eval do\n define_method...
2008/10/14
[ "https://Stackoverflow.com/questions/199603", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12887/" ]
199,606
<p>C++ is mostly a superset of C, but not always. In particular, while enumeration values in both C and C++ implicitly convert into int, the reverse isn't true: only in C do ints convert back into enumeration values. Thus, bitflags defined via enumeration declarations don't work correctly. Hence, this is OK in C, but n...
[ { "answer_id": 199618, "author": "Ferruccio", "author_id": 4086, "author_profile": "https://Stackoverflow.com/users/4086", "pm_score": 4, "selected": true, "text": "Foo x = Foo(Foo_First | Foo_Second);\n Foo operator|(Foo a, Foo b)\n{\n return Foo(int(a) | int(b));\n}\n" }, { ...
2008/10/14
[ "https://Stackoverflow.com/questions/199606", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3712/" ]
199,612
<p>So far I've figured out how to pass Unicode strings, bSTRs, to and from a Euphoria DLL using a Typelib. What I can't figure out, thus far, is how to create and pass back an array of BSTRs.</p> <p>The code I have thus far (along with <code>include</code>s for EuCOM itself and parts of Win32lib):</p> <pre><code>glob...
[ { "answer_id": 211288, "author": "bugmagnet", "author_id": 426, "author_profile": "https://Stackoverflow.com/users/426", "pm_score": 0, "selected": false, "text": "global function REALARR() \n atom psa \n atom var \n atom bounds_ptr \n atom dim \n atom bstr \n object void \n\n dim...
2008/10/14
[ "https://Stackoverflow.com/questions/199612", "https://Stackoverflow.com", "https://Stackoverflow.com/users/426/" ]
199,624
<p>What is the best method of performing an scp transfer via the Java programming language? It seems I may be able to perform this via JSSE, JSch or the bouncy castle java libraries. None of these solutions seem to have an easy answer.</p>
[ { "answer_id": 14034420, "author": "Will", "author_id": 557117, "author_profile": "https://Stackoverflow.com/users/557117", "pm_score": 3, "selected": false, "text": "// create secure context\nSecureContext context = new SecureContext(\"userName\", \"localhost\");\n\n// set optional secu...
2008/10/14
[ "https://Stackoverflow.com/questions/199624", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4229/" ]
199,627
<p>How would you go about converting a reasonably large (>300K), fairly mature C codebase to C++?</p> <p>The kind of C I have in mind is split into files roughly corresponding to modules (i.e. less granular than a typical OO class-based decomposition), using internal linkage in lieu private functions and data, and ext...
[ { "answer_id": 199911, "author": "Head Geek", "author_id": 12193, "author_profile": "https://Stackoverflow.com/users/12193", "pm_score": 5, "selected": true, "text": "struct" }, { "answer_id": 1351659, "author": "Paul Biggar", "author_id": 104021, "author_profile": "h...
2008/10/14
[ "https://Stackoverflow.com/questions/199627", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3712/" ]
199,629
<p>I am working with an existing code base made up of some COM interfaces written in C++ with a C# front end. There is some new functionality that needs to be added, so I'm having to modify the COM portions. In one particular case, I need to pass an array (allocated from C#) to the component to be filled.</p> <p>What I...
[ { "answer_id": 199767, "author": "Corey Ross", "author_id": 5927, "author_profile": "https://Stackoverflow.com/users/5927", "pm_score": 1, "selected": true, "text": "HRESULT GetFoo([in] int bufferSize, [in, size_is(bufferSize)] int buffer[]);\n method public hidebysig newslot virtual ins...
2008/10/14
[ "https://Stackoverflow.com/questions/199629", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5927/" ]
199,642
<p>I have a combo box on a WinForms app in which an item may be selected, but it is not mandatory. I therefore need an 'Empty' first item to indicate that no value has been set.</p> <p>The combo box is bound to a DataTable being returned from a stored procedure (I offer no apologies for Hungarian notation on my UI con...
[ { "answer_id": 199695, "author": "Jason Jackson", "author_id": 13103, "author_profile": "https://Stackoverflow.com/users/13103", "pm_score": 3, "selected": false, "text": "DataTable hierarchies = _database.GetAvailableHierarchies(cmbDataDefinition.SelectedValue.ToString()).Copy();//Calls...
2008/10/14
[ "https://Stackoverflow.com/questions/199642", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5302/" ]
199,651
<p>I'm looking for a generic "Row Picker" for JQuery.</p> <p>We've all seen the cool "Picker" tools like date pickers, color pickers, time pickers, etc, where you click in a text box and a little calendar or color palate or clock or something comes up. You select something (like a date) and the text box is then popul...
[ { "answer_id": 199710, "author": "Duncan", "author_id": 25035, "author_profile": "https://Stackoverflow.com/users/25035", "pm_score": 3, "selected": true, "text": "<script type=\"text/javascript\"> $(function() {\n $('table#data_table tr').click(function() {\n alert($...
2008/10/14
[ "https://Stackoverflow.com/questions/199651", "https://Stackoverflow.com", "https://Stackoverflow.com/users/27580/" ]
199,661
<p>I've used bash, csh, and tcsh. But I asked <a href="http://web.archive.org/web/20151121164806/http://stackoverflow.com/questions/198723/whats-in-your-cshrc" rel="nofollow noreferrer">this question</a>, and Jonathan informed me that csh isn't to be trusted. So what Linux shell is good for development. and why?</p>
[ { "answer_id": 199835, "author": "Jonathan Leffler", "author_id": 15168, "author_profile": "https://Stackoverflow.com/users/15168", "pm_score": 4, "selected": false, "text": "vim emacs exec /bin/ksh #!/bin/sh" }, { "answer_id": 596823, "author": "Jon Ericson", "author_id"...
2008/10/14
[ "https://Stackoverflow.com/questions/199661", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6688/" ]
199,665
<p>I have a SOAP client in Ruby that I'm trying to get working with a Ruby SOAP server, to no avail. The client works fine over SSL with a Python SOAP server, but not with the Ruby version. Here's what the server looks like:</p> <pre><code>require 'soap/rpc/standaloneServer' require 'soap/rpc/driver' require 'rubygems...
[ { "answer_id": 199817, "author": "Chris Bunch", "author_id": 422, "author_profile": "https://Stackoverflow.com/users/422", "pm_score": 3, "selected": true, "text": "require 'webrick/https'\n" }, { "answer_id": 765311, "author": "Community", "author_id": -1, "author_pr...
2008/10/14
[ "https://Stackoverflow.com/questions/199665", "https://Stackoverflow.com", "https://Stackoverflow.com/users/422/" ]
199,677
<p>I am trying to help someone write a program that I thought would be easy, but of course it never is :)</p> <p>I am trying to take a class roster (usually between 10-20 students) and effectivly uniquely pair off each classmate to another to make unique groups. Therefore in a class of 10 people, you can have 9 groups...
[ { "answer_id": 199894, "author": "Moishe Lettvin", "author_id": 23786, "author_profile": "https://Stackoverflow.com/users/23786", "pm_score": 1, "selected": false, "text": "// create all the edges\nfor i := 1 to number_of_students - 1\n for j := i + 1 to number_of_students\n edges.ad...
2008/10/14
[ "https://Stackoverflow.com/questions/199677", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
199,687
<p>At the moment I use the <a href="http://msdn.microsoft.com/en-us/library/ms646310.aspx" rel="nofollow noreferrer"><code>SendInput()</code></a> function but if you install a low level mouse hook the <code>LLMHF_INJECTED</code> is set indicating that the input was injected into the stream. Is there a way of sending mo...
[ { "answer_id": 199894, "author": "Moishe Lettvin", "author_id": 23786, "author_profile": "https://Stackoverflow.com/users/23786", "pm_score": 1, "selected": false, "text": "// create all the edges\nfor i := 1 to number_of_students - 1\n for j := i + 1 to number_of_students\n edges.ad...
2008/10/14
[ "https://Stackoverflow.com/questions/199687", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
199,692
<p>I have only a basic knowledge of css, is it possible to inherit a property from one style into another style. So for instance I could inherit the font size specified in my default paragrah tag settings into my hyperlink tags.</p> <p>The reason I want to do this is to make it easier to maintain multiple styles.</p>
[ { "answer_id": 199714, "author": "leek", "author_id": 3765, "author_profile": "https://Stackoverflow.com/users/3765", "pm_score": 4, "selected": true, "text": "p, a {\n font-size: 1em;\n}\n p {\n color: red;\n}\n\na {\n font-weight: bold;\n}\n" }, { "answer_id": 199719, ...
2008/10/14
[ "https://Stackoverflow.com/questions/199692", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16989/" ]
199,718
<p>Since Object Initializers are very similar to JSON, and now there are Anonymous Types in .NET. It would be cool to be able to take a string, such as JSON, and create an Anonymous Object that represents the JSON string.</p> <p>Use Object Initializers to create an Anonymous Type:</p> <pre><code>var person = new { ...
[ { "answer_id": 199797, "author": "Mark Cidade", "author_id": 1659, "author_profile": "https://Stackoverflow.com/users/1659", "pm_score": 4, "selected": true, "text": " T deserialize<T>(string jsonStr, T obj) { /* ... */}\n\n var jsonString = \"{FirstName='Chris', LastName='Johnson, Other...
2008/10/14
[ "https://Stackoverflow.com/questions/199718", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7831/" ]
199,723
<p>I found a wonderful open source Java program that I'm translating into C#. The built-in translator in Visual Studio got me started and I've now spent about a month translating the rest manually line by line. I've completed over 15,000 lines of translation and the only thing that remains is trying to figure out how t...
[ { "answer_id": 199750, "author": "Mark Cidade", "author_id": 1659, "author_profile": "https://Stackoverflow.com/users/1659", "pm_score": 3, "selected": true, "text": "System.Drawing. Bitmap System.Drawing.dll MemoryImageSource ImageTraverser" } ]
2008/10/14
[ "https://Stackoverflow.com/questions/199723", "https://Stackoverflow.com", "https://Stackoverflow.com/users/356/" ]
199,728
<p>How do I set gc.reflogExpire so that items will never expire?<br> What other time interval formats does it accept?</p> <p>The man page says that you can set it to "90 days or 3 months," but doesn't specify what format it expects.</p>
[ { "answer_id": 199927, "author": "Aristotle Pagaltzis", "author_id": 9410, "author_profile": "https://Stackoverflow.com/users/9410", "pm_score": 3, "selected": false, "text": "git reflog approxidate date.c" }, { "answer_id": 202947, "author": "CB Bailey", "author_id": 195...
2008/10/14
[ "https://Stackoverflow.com/questions/199728", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4883/" ]
199,731
<p>How do you track outbound links for your web site, since the request is logged on the destination server, not yours? </p>
[ { "answer_id": 33357842, "author": "Justin Tanner", "author_id": 609, "author_profile": "https://Stackoverflow.com/users/609", "pm_score": 2, "selected": false, "text": "target=\"_blank\" onclick <a href=\"http://www.example.com\" target=\"_blank\" onclick=\"trackOutgoing(this);\">outgoi...
2008/10/14
[ "https://Stackoverflow.com/questions/199731", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8161/" ]
199,747
<p>Is there a standard way to see how much stack space your app has and what the highest watermark for stack usage is during a run?</p> <p>Also in the dreaded case of actual overflow what happens? </p> <p>Does it crash, trigger an exception or signal? Is there a standard or is it different on all systems and compiler...
[ { "answer_id": 199809, "author": "jussij", "author_id": 14738, "author_profile": "https://Stackoverflow.com/users/14738", "pm_score": 4, "selected": false, "text": "#include <stdio.h>\n#include <windows.h>\n\nvoid StackOverFlow()\n{\n CONTEXT context;\n\n // we are interested control r...
2008/10/14
[ "https://Stackoverflow.com/questions/199747", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13676/" ]
199,761
<p><sup><strong>Note:</strong> This question was asked at a time when C# did not yet support optional parameters (i.e. before C# 4).</sup></p> <p>We're building a web API that's programmatically generated from a C# class. The class has method <code>GetFooBar(int a, int b)</code> and the API has a method <code>GetFooBa...
[ { "answer_id": 199765, "author": "Kalid", "author_id": 109, "author_profile": "https://Stackoverflow.com/users/109", "pm_score": 6, "selected": false, "text": "using System.Runtime.InteropServices;\npublic void Foo(int a, int b, [Optional] int c)\n{\n ...\n}\n" }, { "answer_id":...
2008/10/14
[ "https://Stackoverflow.com/questions/199761", "https://Stackoverflow.com", "https://Stackoverflow.com/users/109/" ]
199,769
<p>I'm on a Hardy Heron Ubuntu build, BTW.</p>
[ { "answer_id": 201055, "author": "pk.", "author_id": 10615, "author_profile": "https://Stackoverflow.com/users/10615", "pm_score": 1, "selected": false, "text": "Enable the use of the mouse. Only works for certain terminals\n(xterm, MS-DOS, Win32 |win32-mouse|, qnx pterm, and Linux cons...
2008/10/14
[ "https://Stackoverflow.com/questions/199769", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20273/" ]
199,774
<p>I'm trying to get a postgres jdbc connection working in eclipse. It would be nice to use the Data Source Explorer, but for now I'm just trying to get a basic connection. What I have done so far is download the postgres JDBC connector. I then tried two different things. First, Preferences-> Data Management, I tried t...
[ { "answer_id": 211512, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": -1, "selected": false, "text": "org.postgresql.ds.PGSimpleDataSource DataSource.getConnection() setServerName() setDatabaseName() setUser() setPassword() Cla...
2008/10/14
[ "https://Stackoverflow.com/questions/199774", "https://Stackoverflow.com", "https://Stackoverflow.com/users/27689/" ]
199,792
<p>I can no longer use / at the windows xp command prompt, and it seems to have started after a botched cygwin installation, e.g. cd /windows won't work, but used to.</p> <p>Can anyone think of how this might have happened?</p> <p><strong>OOPS! It doesn't normally work in XP</strong>, though I had read that it does i...
[ { "answer_id": 200075, "author": "Hugh Allen", "author_id": 15069, "author_profile": "https://Stackoverflow.com/users/15069", "pm_score": 1, "selected": false, "text": "C:\\ C:\\>cd /windows C:\\WINDOWS\\ /windows cd / dir /w" } ]
2008/10/14
[ "https://Stackoverflow.com/questions/199792", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23119/" ]
199,823
<p>I am looking out for some good practices on naming assemblies and versioning them. How often do you increment the major or minor versions?</p> <p>In some cases, I have seen releases going straight from version 1.0 to 3.0. In other cases, it seems to be stuck at version 1.0.2.xxxx.</p> <p>This will be for a shared ...
[ { "answer_id": 199844, "author": "Scott Dorman", "author_id": 1559, "author_profile": "https://Stackoverflow.com/users/1559", "pm_score": 3, "selected": false, "text": "CompanyName.Framework.Core \n CompanyName.Shared\nCompanyName.Core\nCompanyName.Framework\n" } ]
2008/10/14
[ "https://Stackoverflow.com/questions/199823", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4337/" ]
199,832
<p>Is there a way I can control columns from code. </p> <p>I had a drop drop box with select : Daily and weekend and the gridview column with Monday, Tuesday, Wednesday, Thursday, Friday, Saturday,sunday. If the user selects Daily i want to show columns only from Monday to Friday.</p> <p>It is possible to control fr...
[ { "answer_id": 199946, "author": "Pavel Chuchuva", "author_id": 14131, "author_profile": "https://Stackoverflow.com/users/14131", "pm_score": 4, "selected": true, "text": "GridView1.Columns[5].Visible = false\nGridView1.Columns[6].Visible = false\n" }, { "answer_id": 199956, ...
2008/10/14
[ "https://Stackoverflow.com/questions/199832", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14752/" ]
199,847
<p>I have the following fields:</p> <ul> <li>Inventory control (16 byte record) <ul> <li>Product ID code (int – 4 bytes)</li> <li>Quantity in stock (int – 4 bytes)</li> <li>Price (double – 8 bytes)</li> </ul></li> </ul> <p>How do I create a fixed length random access file using the above lengths? I tried some exampl...
[ { "answer_id": 199954, "author": "Aaron Maenpaa", "author_id": 2603, "author_profile": "https://Stackoverflow.com/users/2603", "pm_score": 4, "selected": true, "text": "package test;\n\nimport java.io.IOException;\nimport java.io.RandomAccessFile;\n\npublic class Raf {\n private stati...
2008/10/14
[ "https://Stackoverflow.com/questions/199847", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21968/" ]
199,866
<p>I am just starting out with Silverlight (2 RC0) and can’t seem to get the following to work. I want to create a simple image button user control.</p> <p>My xaml for the user control is as follows:</p> <pre><code> &lt;Button&gt; &lt;Button.Template&gt; &lt;ControlTemplate&gt; ...
[ { "answer_id": 200013, "author": "Jobi Joy", "author_id": 8091, "author_profile": "https://Stackoverflow.com/users/8091", "pm_score": 4, "selected": true, "text": " <ControlTemplate x:Key=\"btn_template\"> \n <Image Source=\"{TemplateBinding Content}\" /> \n </ControlTemplate...
2008/10/14
[ "https://Stackoverflow.com/questions/199866", "https://Stackoverflow.com", "https://Stackoverflow.com/users/67719/" ]
199,876
<p>Is there a way to change the color of the background for a MDIParent windows in MFC (2005)?</p> <p>I have tried intercepting ON_WM_CTLCOLOR AND ON_WM_ERASEBKGND but neither work. OnEraseBkgnd does work, but then it gets overwritten by the standard WM_CTL color.</p> <p>Cheers</p>
[ { "answer_id": 200780, "author": "Aidan Ryan", "author_id": 1042, "author_profile": "https://Stackoverflow.com/users/1042", "pm_score": 2, "selected": false, "text": "afx_msg BOOL OnEraseBkgnd(CDC* pDC);\nafx_msg void OnPaint(void);\nafx_msg void OnSize(UINT nType, int cx, int cy);\n ON_...
2008/10/14
[ "https://Stackoverflow.com/questions/199876", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1075/" ]
199,879
<p>I have a div that contains several child elements, one of which is a flash movie.</p> <p>When rolling over this div, I want it to change style to indicate it is rolled over. My problem is that the <code>mouseover</code> and <code>mouseout</code> events don't always trigger, especially if the user moves the mouse ove...
[ { "answer_id": 200026, "author": "nickf", "author_id": 9021, "author_profile": "https://Stackoverflow.com/users/9021", "pm_score": 1, "selected": false, "text": "onmouseover <div> div window.onmouseover" }, { "answer_id": 223568, "author": "Claudio", "author_id": 30122, ...
2008/10/14
[ "https://Stackoverflow.com/questions/199879", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20851/" ]
199,889
<p>I'm trying to do a domain lookup in vba with something like this:</p> <pre><code>DLookup("island", "villages", "village = '" &amp; txtVillage &amp; "'") </code></pre> <p>This works fine until txtVillage is something like Dillon's Bay, when the apostrophe is taken to be a single quote, and I get a run-time error.</...
[ { "answer_id": 199900, "author": "Joel Coehoorn", "author_id": 3043, "author_profile": "https://Stackoverflow.com/users/3043", "pm_score": 2, "selected": false, "text": "'); DROP TABLE [YourTable]\n DLookup(\"island\", \"village\", \"village = ? \")\n" }, { "answer_id": 199904, ...
2008/10/14
[ "https://Stackoverflow.com/questions/199889", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10439/" ]
199,896
<p>As the title: How would I tell NHibernate, once and for all, that all table and column names are to be quoted in the SQL it generates?</p>
[ { "answer_id": 2883057, "author": "pvasek", "author_id": 1185225, "author_profile": "https://Stackoverflow.com/users/1185225", "pm_score": 2, "selected": false, "text": "<property name=\"hbm2ddl.keywords\">auto-quote</property>\n" }, { "answer_id": 6339548, "author": "Newbie"...
2008/10/14
[ "https://Stackoverflow.com/questions/199896", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12349/" ]
199,905
<p>Is it possible to add comments somehow, somewhere? </p> <p>I don't pretend to be any sort of expert when using MySQL and certainly don't spend all day in it. More often than I would like I forget how I intend to use a column (usally the bit ones) and would be very excited if I could add a comment to remind me if ...
[ { "answer_id": 199920, "author": "micahwittman", "author_id": 11181, "author_profile": "https://Stackoverflow.com/users/11181", "pm_score": 5, "selected": false, "text": "table_option:\n {ENGINE|TYPE} [=] engine_name\n | AUTO_INCREMENT [=] value\n | AVG_ROW_LENGTH [=] value\n | [DE...
2008/10/14
[ "https://Stackoverflow.com/questions/199905", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1444/" ]
199,918
<p>I have been trying to explain the difference between switch statements and pattern matching(F#) to a couple of people but I haven't really been able to explain it well..most of the time they just look at me and say "so why don't you just use if..then..else".</p> <p>How would you explain it to them? </p> <p>EDIT! T...
[ { "answer_id": 200277, "author": "Bruno De Fraine", "author_id": 6918, "author_profile": "https://Stackoverflow.com/users/6918", "pm_score": 5, "selected": false, "text": "type expr =\n | Int of int\n | Var of string\n | Add of expr * expr\n | Mul of expr * expr;;\n\nlet rec ...
2008/10/14
[ "https://Stackoverflow.com/questions/199918", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6335/" ]
199,936
<p>I am currently trying to program my first ajax interface using Rails.</p> <p>The application currently shows a table populated with list items. The user has to approve or reject each of the list items. I currently have an edit link at the end of each row that shows a form in which I can approve the list item.</p> ...
[ { "answer_id": 200071, "author": "Andrew", "author_id": 17408, "author_profile": "https://Stackoverflow.com/users/17408", "pm_score": 4, "selected": true, "text": "...\n<tr id=\"item1\">\n <td>Accept or Reject</td>\n <td>\n link_to_remote 'accept', :action => :accept, :id => 1, :met...
2008/10/14
[ "https://Stackoverflow.com/questions/199936", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14755/" ]
199,953
<p>I have 2 tables. One (domains) has domain ids, and domain names (dom_id, dom_url).</p> <p>the other contains actual data, 2 of which columns require a TO and FROM domain names. So I have 2 columns rev_dom_from and rev_dom_for, both of which store the domain name id, from the domains table.</p> <p>Simple.</p> <p>N...
[ { "answer_id": 199958, "author": "Stephen Wrighton", "author_id": 7516, "author_profile": "https://Stackoverflow.com/users/7516", "pm_score": 8, "selected": true, "text": "SELECT toD.dom_url AS ToURL, \n fromD.dom_url AS FromUrl, \n rvw.*\n\nFROM reviews AS rvw\n\nLEFT JOIN domain ...
2008/10/14
[ "https://Stackoverflow.com/questions/199953", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
199,959
<p>In C# there is a method <code>SetApartmentState</code> in the class <code>Thread</code>. How do I do the same thing in C++?</p>
[ { "answer_id": 200034, "author": "Shog9", "author_id": 811, "author_profile": "https://Stackoverflow.com/users/811", "pm_score": 4, "selected": true, "text": "CoInitializeEx() CoInitializeEx CoInitialize COINIT_MULTITHREADED CoInitializeEx CoInitialize COINIT_APARTMENTTHREADED CoInitiali...
2008/10/14
[ "https://Stackoverflow.com/questions/199959", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11238/" ]
199,961
<p>How can I find out the folder where the windows service .exe file is installed dynamically?</p> <pre><code>Path.GetFullPath(relativePath); </code></pre> <p>returns a path based on <code>C:\WINDOWS\system32</code> directory.</p> <p>However, the <code>XmlDocument.Load(string filename)</code> method appears to be wo...
[ { "answer_id": 199976, "author": "Greg Dean", "author_id": 1200558, "author_profile": "https://Stackoverflow.com/users/1200558", "pm_score": 7, "selected": true, "text": "System.Reflection.Assembly.GetEntryAssembly().Location\n" }, { "answer_id": 199991, "author": "TheSoftwar...
2008/10/14
[ "https://Stackoverflow.com/questions/199961", "https://Stackoverflow.com", "https://Stackoverflow.com/users/437435/" ]
199,966
<p>The <code>gcc -S</code> option will generate assembly code in AT&amp;T syntax, is there a way to generate files in Intel syntax? Or is there a way to convert between the two?</p>
[ { "answer_id": 200028, "author": "Jason Dagit", "author_id": 5113, "author_profile": "https://Stackoverflow.com/users/5113", "pm_score": 9, "selected": true, "text": "-masm=intel gcc -S -masm=intel -Og -fverbose-asm test.c\n -masm=dialect gcc -masm=intel clang++ -S -mllvm --x86-asm-synta...
2008/10/14
[ "https://Stackoverflow.com/questions/199966", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1841/" ]
200,020
<p>In many symbolic math systems, such as Matlab or Mathematica, you can use a variable like <code>Ans</code> or <code>%</code> to retrieve the last computed value. Is there a similar facility in the Python shell?</p>
[ { "answer_id": 200027, "author": "Mark Cidade", "author_id": 1659, "author_profile": "https://Stackoverflow.com/users/1659", "pm_score": 9, "selected": true, "text": ">>> 5+5\n10\n>>> _\n10\n>>> _ + 5\n15\n>>> _\n15\n" }, { "answer_id": 200045, "author": "Peter Hoffmann", ...
2008/10/14
[ "https://Stackoverflow.com/questions/200020", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23845/" ]
200,037
<p>I have developed an installer class which removes certain folders from the base dir.However,I also want to remove the entry of another application from add/remove programs through the inst class.Could anyone suggest the solution.</p> <p>Regards, Harsh Suman</p>
[ { "answer_id": 18649680, "author": "Kevin M", "author_id": 1838481, "author_profile": "https://Stackoverflow.com/users/1838481", "pm_score": 1, "selected": false, "text": " public static void RemoveControlPanelProgram(string apllicationName)\n {\n string InstallerRegLoc = @\"S...
2008/10/14
[ "https://Stackoverflow.com/questions/200037", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
200,049
<p>I want to be able to capture my iPhone's screen as a video, but I'm not sure the best way to do this.</p> <p>Can anyone help guide me on how to best do this <em>without jailbreak?</em></p>
[ { "answer_id": 10104878, "author": "Balan Prabhu", "author_id": 1310087, "author_profile": "https://Stackoverflow.com/users/1310087", "pm_score": 2, "selected": false, "text": " -(void)playvideo\n{\n\n MPMoviePlayerController *player = [[MPMoviePlayerController alloc] initWithContent...
2008/10/14
[ "https://Stackoverflow.com/questions/200049", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23294/" ]
200,056
<p>I have access to an Oracle server that has some databases that I would like to access. However, the machine that I have access from has none of the oracle client software. Is there any alternative to oracle's client software the provides the functionality of something like MySQL's mysql or Postgres' psql? I'd like t...
[ { "answer_id": 200069, "author": "David Webb", "author_id": 3171, "author_profile": "https://Stackoverflow.com/users/3171", "pm_score": 4, "selected": true, "text": "sqlplus" } ]
2008/10/14
[ "https://Stackoverflow.com/questions/200056", "https://Stackoverflow.com", "https://Stackoverflow.com/users/85/" ]
200,066
<p>In C#, how do I get the name of the drive that the Operating System is installed on?</p>
[ { "answer_id": 200068, "author": "TheSoftwareJedi", "author_id": 18941, "author_profile": "https://Stackoverflow.com/users/18941", "pm_score": 5, "selected": false, "text": "Path.GetPathRoot(Environment.SystemDirectory)\n" } ]
2008/10/14
[ "https://Stackoverflow.com/questions/200066", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
200,079
<p>Given the following inheritance tree, what would be the best way of implementing it in a way that works?</p> <pre><code>abstract class Foo&lt;T&gt; : IEnumerable&lt;T&gt; { public abstract Bar CreateBar(); } class Bar&lt;T&gt; : Foo&lt;T&gt; { // Bar's provide a proxy interface to Foo's and limit access ni...
[ { "answer_id": 200129, "author": "Mark Cidade", "author_id": 1659, "author_profile": "https://Stackoverflow.com/users/1659", "pm_score": 1, "selected": false, "text": "abstract class Foo<T> : IEnumerable<T>\n{\n public abstract Bar<T> CreateBar();\n\n protected Bar<T> CreateBar(Foo<T> ...
2008/10/14
[ "https://Stackoverflow.com/questions/200079", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15537/" ]
200,090
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="https://stackoverflow.com/questions/194465/how-to-parse-a-string-to-an-int-in-c">How to parse a string to an int in C++?</a> </p> </blockquote> <p>How do you convert a C++ string to an int?</p> <p>Assume you are expecting the string to have actu...
[ { "answer_id": 200095, "author": "Martin York", "author_id": 14065, "author_profile": "https://Stackoverflow.com/users/14065", "pm_score": 5, "selected": false, "text": "std::string plop(\"123\");\nstd::stringstream str(plop);\nint x;\n\nstr >> x;\n\n/* Lets not forget to error che...
2008/10/14
[ "https://Stackoverflow.com/questions/200090", "https://Stackoverflow.com", "https://Stackoverflow.com/users/27729/" ]
200,093
<p>What is the difference between UTF and UCS.</p> <p>What are the best ways to represent not European character sets (using UTF) in C++ strings. I would like to know your recommendations for:</p> <ul> <li>Internal representation inside the code <ul> <li>For string manipulation at run-time</li> <li>For using the str...
[ { "answer_id": 200102, "author": "Randy Sugianto 'Yuku'", "author_id": 11238, "author_profile": "https://Stackoverflow.com/users/11238", "pm_score": 0, "selected": false, "text": "wchar_t wstring wchar_t" }, { "answer_id": 200103, "author": "Greg Hewgill", "author_id": 89...
2008/10/14
[ "https://Stackoverflow.com/questions/200093", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14065/" ]
200,106
<p>Ok so ive got a swing app going using the "System" look and feel. Now, I want to change the background colour of the main panels to black. Too easy right?</p> <pre><code>UIManager.put("Panel.background", Color.BLACK); </code></pre> <p>Well yeah, except now the controls in the app look stupid, because their 'shadow...
[ { "answer_id": 200130, "author": "RodeoClown", "author_id": 943, "author_profile": "https://Stackoverflow.com/users/943", "pm_score": 1, "selected": false, "text": "for (Object key: UIManager.getDefaults().keySet())\n{\n System.out.println(key);\n}\n" }, { "answer_id": 210058,...
2008/10/14
[ "https://Stackoverflow.com/questions/200106", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16925/" ]
200,140
<p>In my code, I want to view all data from a CSV in table form, but it only displays the last line. How about lines 1 and 2? Here's the data:</p> <pre><code>1,HF6,08-Oct-08,34:22:13,df,jhj,fh,fh,ffgh,gh,g,rt,ffgsaf,asdf,dd,yoawa,DWP,tester,Pattern 2,hf35,08-Oct-08,34:12:13,dg,jh,fh,fgh,fgh,gh,gfh,re,fsaf,asdf,dd,yoko...
[ { "answer_id": 200175, "author": "Greg Hewgill", "author_id": 893, "author_profile": "https://Stackoverflow.com/users/893", "pm_score": 3, "selected": false, "text": "my $f;\nwhile ($line = <F>) {\n $f = $line;\n}\nprint $f;\n $f $f my $f;\nwhile ($line = <F>) {\n $f = $line;\n ...
2008/10/14
[ "https://Stackoverflow.com/questions/200140", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
200,147
<p>I'm an absolute n00b into the java platform I would like to know whether I need to change anything in my code to get the benefits of 64bit JRE ? </p> <p>or is it something like when I initiate it with "java -d64" its gonna run in some turbo mode?</p> <p>Your help is highly appreciated</p>
[ { "answer_id": 21392637, "author": "larsolsen", "author_id": 3242291, "author_profile": "https://Stackoverflow.com/users/3242291", "pm_score": 0, "selected": false, "text": "public class Benchmark {\npublic static void main(String args[]) {\nlong time = System.currentTimeMillis();\nfor (...
2008/10/14
[ "https://Stackoverflow.com/questions/200147", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
200,150
<p>i am using the apache commons httpclient in a lotus notes java agent and it works fine. BUT when establishing a proxy connection the log will be spamed with the following line :</p> <pre><code>[INFO] AuthChallengeProcessor - basic authentication scheme selected </code></pre> <p>Do you know how to disable the integ...
[ { "answer_id": 200269, "author": "JimmyTudeski", "author_id": 27181, "author_profile": "https://Stackoverflow.com/users/27181", "pm_score": -1, "selected": false, "text": "client.getState().setProxyCredentials(\n new AuthScope(conParm.getProxyServer(), conParm....
2008/10/14
[ "https://Stackoverflow.com/questions/200150", "https://Stackoverflow.com", "https://Stackoverflow.com/users/27181/" ]
200,151
<p>Is it possible to search for an object by one of its properties in a Generic List?</p> <pre><code>Public Class Customer Private _id As Integer Private _name As String Public Property ID() As Integer Get Return _id End Get Set _id = value End Set...
[ { "answer_id": 200161, "author": "Aleris", "author_id": 20417, "author_profile": "https://Stackoverflow.com/users/20417", "pm_score": 0, "selected": false, "text": "Find" }, { "answer_id": 200165, "author": "Jon Skeet", "author_id": 22656, "author_profile": "https://S...
2008/10/14
[ "https://Stackoverflow.com/questions/200151", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23667/" ]
200,162
<p>The WebBrowser control has a property called "IsWebBrowserContextMenuEnabled" that disables all ability to right-click on a web page and see a context menu. This is very close to what I want (I don't want anyone to be able to right-click and print, hit back, hit properties, view source, etc).</p> <p>The only probl...
[ { "answer_id": 200194, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 3, "selected": true, "text": " CopiedTxt = document.selection.createRange();\n CopiedTxt.execCommand(\"Copy\");\n CopiedTxt = document.selection.creat...
2008/10/14
[ "https://Stackoverflow.com/questions/200162", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3244/" ]
200,163
<p>I am currently writing a little bootstrap code for a service that can be run in the console. It essentially boils down to calling the OnStart() method instead of using the ServiceBase to start and stop the service (because it doesn't run the application if it isn't installed as a service and makes debugging a nightm...
[ { "answer_id": 208073, "author": "gyrolf", "author_id": 23772, "author_profile": "https://Stackoverflow.com/users/23772", "pm_score": 4, "selected": false, "text": "Environment.UserInteractive class MyService : ServiceBase\n{\n private static void Main()\n {\n if (Environmen...
2008/10/14
[ "https://Stackoverflow.com/questions/200163", "https://Stackoverflow.com", "https://Stackoverflow.com/users/24064/" ]
200,178
<p>So what's the best way to create new tables in a Sqlite database in Rails 2. I have created the database using rake db:migrate command. So should I write individual sql scripts to create a database or use rake somehow. I don't need scaffolding.</p>
[ { "answer_id": 200214, "author": "hectorsq", "author_id": 14755, "author_profile": "https://Stackoverflow.com/users/14755", "pm_score": 1, "selected": false, "text": "script/generate migration" }, { "answer_id": 200592, "author": "robintw", "author_id": 1912, "author_...
2008/10/14
[ "https://Stackoverflow.com/questions/200178", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1688440/" ]
200,195
<p>I have a Stored procedure which schedules a job. This Job takes a lot of time to get completed (approx 30 to 40 min). I need to get to know the status of this Job. Below details would help me</p> <p>1) How to see the list of all jobs that have got scheduled for a future time and are yet to start</p> <p>2) How to s...
[ { "answer_id": 200280, "author": "Tim C", "author_id": 7585, "author_profile": "https://Stackoverflow.com/users/7585", "pm_score": 7, "selected": true, "text": "EXEC msdb.dbo.sp_help_job @Job_name = 'Your Job Name'\n" }, { "answer_id": 238001, "author": "piers7", "author_...
2008/10/14
[ "https://Stackoverflow.com/questions/200195", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20951/" ]
200,200
<p>I need to use an alias in the WHERE clause, but It keeps telling me that its an unknown column. Is there any way to get around this issue? I need to select records that have a rating higher than x. Rating is calculated as the following alias:</p> <pre><code>sum(reviews.rev_rating)/count(reviews.rev_id) as avg_ratin...
[ { "answer_id": 200203, "author": "Paul Dixon", "author_id": 6521, "author_profile": "https://Stackoverflow.com/users/6521", "pm_score": 9, "selected": true, "text": " HAVING avg_rating>5\n WHERE (sum(reviews.rev_rating)/count(reviews.rev_id))>5\n" }, { "answer_id": 200220, "...
2008/10/14
[ "https://Stackoverflow.com/questions/200200", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
200,205
<p>I'm experimenting with an updated build system at work; currently, I'm trying to find a good way to set compiler &amp; flags depending on the target platform. </p> <p>What I would like to do is something like</p> <pre><code>switch $(PLATFORM)_$(BUILD_TYPE) case "Linux_x86_release" CFLAGS = -O3 case "Linux...
[ { "answer_id": 200222, "author": "Bruno De Fraine", "author_id": 6918, "author_profile": "https://Stackoverflow.com/users/6918", "pm_score": 3, "selected": false, "text": "configure ifeq ($(PLATFORM)_$(BUILD_TYPE),Linux_x86_release)\n CFLAGS = -O3\nendif\nifeq ($(PLATFORM)_$(BUILD_TYP...
2008/10/14
[ "https://Stackoverflow.com/questions/200205", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15514/" ]
200,213
<p>I've a small project that I want to share with a few others on a machine that we all have access to. I created a bare copy of the local repo with</p> <pre><code>git clone --bare --no-hardlinks path/to/.git/ repoToShare.git </code></pre> <p>I then moved repoToShare.git to the server.</p> <p>I can check it out with...
[ { "answer_id": 509398, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 2, "selected": false, "text": ".git" }, { "answer_id": 7122006, "author": "rodrigomanhaes", "author_id": 362945, "author_profile": "https...
2008/10/14
[ "https://Stackoverflow.com/questions/200213", "https://Stackoverflow.com", "https://Stackoverflow.com/users/85/" ]
200,219
<p>I would like to develop Adobe Flex applications using Linux and a free environment. I'd prefer a free as in freedom alternative, but as in beer would work as well. ;-)</p> <p>Are any of you developing Adobe Flex rich internet applications using such an environment? Or should I face the "facts" that Flex Builder is ...
[ { "answer_id": 200684, "author": "Yaba", "author_id": 7524, "author_profile": "https://Stackoverflow.com/users/7524", "pm_score": 2, "selected": false, "text": "mvn package" } ]
2008/10/14
[ "https://Stackoverflow.com/questions/200219", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
200,225
<p>In a C++ project (i.e. no .NET) on Windows Mobile, I am looking for a way to easily communicate between two independently running applications. Application A would run a service, whereas application B would provide the user some functionality - for which B has to call some of A's functions. I would rather not go thr...
[ { "answer_id": 277209, "author": "Johann Gerell", "author_id": 6345, "author_profile": "https://Stackoverflow.com/users/6345", "pm_score": 0, "selected": false, "text": "CreateFile DeviceIoControl" } ]
2008/10/14
[ "https://Stackoverflow.com/questions/200225", "https://Stackoverflow.com", "https://Stackoverflow.com/users/27101/" ]
200,229
<p>Can Eclipse make parameters for generated methods (overwriting, implementing interface, etc.) final, and if so, how?</p> <p>If I'm not mistaken, IntelliJ had an option for it. I could not find something similar in Eclipse.</p> <p>I have become accustomed to making parameters final manually, but I am hoping for an ...
[ { "answer_id": 200275, "author": "Guido", "author_id": 12388, "author_profile": "https://Stackoverflow.com/users/12388", "pm_score": 5, "selected": true, "text": "Window > Preferences > Java > Editor > Templates or under Window > Preferences > Java > Code Style > Code Templates Preferenc...
2008/10/14
[ "https://Stackoverflow.com/questions/200229", "https://Stackoverflow.com", "https://Stackoverflow.com/users/706/" ]
200,239
<p>I'm using the MIDP 2.0 (JSR 118) and I just noticed that there is no reader for strings in J2ME.</p> <p>Does anyone know how you are supposed to read Strings from an <code>InputStream</code> or <code>InputStreamReader</code> in a platform independent way (i.e. between two java enabled cell phones of different model...
[ { "answer_id": 200644, "author": "tonys", "author_id": 35439, "author_profile": "https://Stackoverflow.com/users/35439", "pm_score": 3, "selected": true, "text": "DataInputStream.readUTF() DataOutputStream.writeUTF(String)" }, { "answer_id": 261027, "author": "Community", ...
2008/10/14
[ "https://Stackoverflow.com/questions/200239", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3713/" ]
200,247
<p>I don't understand it. </p> <p>The ids of html elements in the master page are changed by the same id but with a prefix and it's breaking the css design.</p> <p>In the master page I have:</p> <pre><code>&lt;div id="container" runat="server"&gt; &lt;asp:ContentPlaceHolder ... ... </code></pre> <p>The above ...
[ { "answer_id": 200263, "author": "Biri", "author_id": 968, "author_profile": "https://Stackoverflow.com/users/968", "pm_score": 1, "selected": false, "text": "<asp:Whatever runat=\"server\" id=\"whatever\" CssClass=\"whateverClass\">\n" }, { "answer_id": 200300, "author": "Ja...
2008/10/14
[ "https://Stackoverflow.com/questions/200247", "https://Stackoverflow.com", "https://Stackoverflow.com/users/460927/" ]
200,257
<p>i've never created a shopping cart, or forum in php. aside from viewing and analyzing another persons project or viewing tutorials that display how to make such a project or how to being such a project. how would a person know how to design the database structure to create such a thing? im guessing its probbably thr...
[ { "answer_id": 200262, "author": "Owen", "author_id": 4853, "author_profile": "https://Stackoverflow.com/users/4853", "pm_score": 4, "selected": false, "text": "students\n student_id\n student_name\n student_class\n student_grade\n students\n student_id\n student_name\n\nclass\n c...
2008/10/14
[ "https://Stackoverflow.com/questions/200257", "https://Stackoverflow.com", "https://Stackoverflow.com/users/27751/" ]
200,286
<p>we had a heated discussion about a method name. </p> <p>We have a class <code>User</code>. There is property called "Groups" on the user. It contains all groups that contain the user directly. That's ok. What we have problem with, is the name of the method that would recursively list all user's groups and their "pa...
[ { "answer_id": 200288, "author": "Greg Hewgill", "author_id": 893, "author_profile": "https://Stackoverflow.com/users/893", "pm_score": 1, "selected": false, "text": "u.GetGroupMembership()\n" }, { "answer_id": 200296, "author": "Owen", "author_id": 4853, "author_prof...
2008/10/14
[ "https://Stackoverflow.com/questions/200286", "https://Stackoverflow.com", "https://Stackoverflow.com/users/75224/" ]
200,292
<p>I'm producing a hex file to run on an ARM processor which I want to keep below 32K. It's currently a lot larger than that and I wondered if someone might have some advice on what's the best approach to slim it down?</p> <p>Here's what I've done so far</p> <ol> <li>So I've run 'size' on it to determine how big the ...
[ { "answer_id": 200600, "author": "Andrew Edgecombe", "author_id": 11694, "author_profile": "https://Stackoverflow.com/users/11694", "pm_score": 5, "selected": true, "text": "strip -M nm gcc" }, { "answer_id": 10340204, "author": "Russ", "author_id": 465838, "author_pr...
2008/10/14
[ "https://Stackoverflow.com/questions/200292", "https://Stackoverflow.com", "https://Stackoverflow.com/users/76121/" ]
200,305
<p>I want an <strong>simple IDE/editor for C</strong> in <strong>Linux</strong> to which I <strong>can add features easily</strong>. For example: I want to add a right click menu item and a related action for the editor. It should be easy to extent and add any desirable functionality. I tried eclipse CDT but its to muc...
[ { "answer_id": 201034, "author": "Peter Miehle", "author_id": 27800, "author_profile": "https://Stackoverflow.com/users/27800", "pm_score": 2, "selected": false, "text": ";; the indention-thing needs refining\n(defun pm-if ()\n \"generates if stub\"\n (interactive)\n (insert \"if () {\")...
2008/10/14
[ "https://Stackoverflow.com/questions/200305", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2745562/" ]
200,309
<p>How to create a table with a timestamp column that defaults to <code>DATETIME('now')</code>?</p> <p>Like this:</p> <pre><code>CREATE TABLE test ( id INTEGER PRIMARY KEY AUTOINCREMENT, t TIMESTAMP DEFAULT DATETIME('now') ); </code></pre> <p>This gives an error.</p>
[ { "answer_id": 200329, "author": "Owen", "author_id": 4853, "author_profile": "https://Stackoverflow.com/users/4853", "pm_score": 9, "selected": true, "text": "CURRENT_TIMESTAMP CREATE TABLE test (\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n t TIMESTAMP DEFAULT CURRENT_TIMESTAMP\n);\...
2008/10/14
[ "https://Stackoverflow.com/questions/200309", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13262/" ]