qid
int64
4
19.1M
question
stringlengths
18
48.3k
answers
list
date
stringlengths
10
10
metadata
list
82,550
<p>I have a template class that I serialize (call it C), for which I want to specify a version for boost serialization. As BOOST_CLASS_VERSION does not work for template classes. I tried this:</p> <pre><code>namespace boost { namespace serialization { template&lt; typename T, typename U &gt; struct version&lt;...
[ { "answer_id": 83616, "author": "James Hopkin", "author_id": 11828, "author_profile": "https://Stackoverflow.com/users/11828", "pm_score": 5, "selected": true, "text": "#include <boost/serialization/version.hpp>\n" }, { "answer_id": 37660167, "author": "dlabs", "author_id...
2008/09/17
[ "https://Stackoverflow.com/questions/82550", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14443/" ]
82,607
<p>I get DNS records from a Python program, using <a href="http://www.dnspython.org/" rel="nofollow noreferrer">DNS Python</a></p> <p>I can get various DNSSEC-related records:</p> <pre><code>&gt;&gt;&gt; import dns.resolver &gt;&gt;&gt; myresolver = dns.resolver.Resolver() &gt;&gt;&gt; myresolver.use_edns(1, 0, 1400)...
[ { "answer_id": 82868, "author": "Cetra", "author_id": 15087, "author_profile": "https://Stackoverflow.com/users/15087", "pm_score": 0, "selected": false, "text": "print myresolver.query('sources.org', 'ANY', 'RRSIG')\n" }, { "answer_id": 84448, "author": "bortzmeyer", "au...
2008/09/17
[ "https://Stackoverflow.com/questions/82607", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15625/" ]
82,612
<p>How can I figure out, how many files needs to be recompiled <em>before</em> I start the build process.</p> <p>Sometimes I don't remember how many basic header files I changed so a Rebuild All would be better than a simple build. There seams to be no option for this, but IMHO it must be possible (f.e. XCode give me ...
[ { "answer_id": 82868, "author": "Cetra", "author_id": 15087, "author_profile": "https://Stackoverflow.com/users/15087", "pm_score": 0, "selected": false, "text": "print myresolver.query('sources.org', 'ANY', 'RRSIG')\n" }, { "answer_id": 84448, "author": "bortzmeyer", "au...
2008/09/17
[ "https://Stackoverflow.com/questions/82612", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15757/" ]
82,645
<p>By default tomcat will create a session cookie for the current domain.</p> <p>If you are on www.example.com, your cookie will be created for www.example.com (will only work on www.example.com). Whereas for example.com it will be created for .example.com (desired behaviour, will work on any subdomain of example.com ...
[ { "answer_id": 633468, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 1, "selected": false, "text": "configureSessionCookie(Cookie cookie)\n cookie.setDomain(\".xyz.com\");\n" }, { "answer_id": 2902605, "author": "J...
2008/09/17
[ "https://Stackoverflow.com/questions/82645", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15687/" ]
82,653
<p>Is there any list of blog engines, written in Django?</p>
[ { "answer_id": 21028758, "author": "Akshar Raaj", "author_id": 839549, "author_profile": "https://Stackoverflow.com/users/839549", "pm_score": 1, "selected": false, "text": "django-blogango" } ]
2008/09/17
[ "https://Stackoverflow.com/questions/82653", "https://Stackoverflow.com", "https://Stackoverflow.com/users/70293/" ]
82,654
<p>I have seen examples of printing from a windows application but I have not been able to find a good example of any way of doing this. </p>
[ { "answer_id": 82741, "author": "Ilya Kochetov", "author_id": 15329, "author_profile": "https://Stackoverflow.com/users/15329", "pm_score": 0, "selected": false, "text": "window.print()" } ]
2008/09/17
[ "https://Stackoverflow.com/questions/82654", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12255/" ]
82,661
<p>I want to clear the list of projects on the start page...how do I do this? I know I can track it down in the registry, but is there an approved route to go?</p>
[ { "answer_id": 84797, "author": "Dusty Campbell", "author_id": 2174, "author_profile": "https://Stackoverflow.com/users/2174", "pm_score": 7, "selected": true, "text": "HKEY_CURRENT_USER\\Software\\Microsoft\\VisualStudio\\<version>\\ProjectMRUList\n HKEY_CURRENT_USER\\Software\\Microsof...
2008/09/17
[ "https://Stackoverflow.com/questions/82661", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15778/" ]
82,721
<p>In a SQL server database, I have a table which contains a TEXT field which is set to allow NULLs. I need to change this to not allow NULLs. I can do this no problem via Enterprise Manager, but when I try to run the following script, <strong>alter table dbo.[EventLog] Alter column [Message] text Not null</strong>, I ...
[ { "answer_id": 82862, "author": "Sixto Saez", "author_id": 9711, "author_profile": "https://Stackoverflow.com/users/9711", "pm_score": 3, "selected": true, "text": " /* To prevent any potential data loss issues, you should review this script in detail before running it outside the con...
2008/09/17
[ "https://Stackoverflow.com/questions/82721", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7585/" ]
82,726
<p>If I open files I created in Windows, the lines all end with <code>^M</code>.<br /> How do I delete these characters all at once?</p>
[ { "answer_id": 82740, "author": "mercutio", "author_id": 1951, "author_profile": "https://Stackoverflow.com/users/1951", "pm_score": 4, "selected": false, "text": ":%s/\\r\\+//g\n" }, { "answer_id": 82742, "author": "Rob Wells", "author_id": 2974, "author_profile": "h...
2008/09/17
[ "https://Stackoverflow.com/questions/82726", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15482/" ]
82,814
<p>The following code is causing an intermittent crash on a Vista machine.</p> <pre><code>using (SoundPlayer myPlayer = new SoundPlayer(Properties.Resources.BEEPPURE)) myPlayer.Play(); </code></pre> <p>I highly suspect it is this code because the program crashes mid-beep or just before the beep is played every t...
[ { "answer_id": 163516, "author": "MusiGenesis", "author_id": 14606, "author_profile": "https://Stackoverflow.com/users/14606", "pm_score": 0, "selected": false, "text": "using (SoundPlayer myPlayer = new SoundPlayer(BEEPPURE))\n{ \n myPlayer.Play();\n}\n SoundPlayer myPlayer = new ...
2008/09/17
[ "https://Stackoverflow.com/questions/82814", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1490/" ]
82,831
<p>How do I check whether a file exists or not, without using the <a href="https://docs.python.org/3.6/reference/compound_stmts.html#try" rel="noreferrer"><code>try</code></a> statement?</p>
[ { "answer_id": 82836, "author": "Paul", "author_id": 215086, "author_profile": "https://Stackoverflow.com/users/215086", "pm_score": 10, "selected": false, "text": "import os\n\nif os.path.isfile(filepath):\n print(\"File exists\")\n" }, { "answer_id": 82841, "author": "ben...
2008/09/17
[ "https://Stackoverflow.com/questions/82831", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15616/" ]
82,847
<p>If I am in a function in the code behind, and I want to implement displaying a "Loading..." in the status bar the following makes sense, but as we know from WinForms is a NoNo:</p> <pre><code>StatusBarMessageText.Text = "Loading Configuration Settings..."; LoadSettingsGridData(); StatusBarMessageText.Te...
[ { "answer_id": 83216, "author": "Abe Heidebrecht", "author_id": 9268, "author_profile": "https://Stackoverflow.com/users/9268", "pm_score": -1, "selected": false, "text": "StatusBarMessageText.Text = \"Loading Configuration Settings...\";\nthis.Dispatcher.BeginInvoke(new Action(LoadSetti...
2008/09/17
[ "https://Stackoverflow.com/questions/82847", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2744/" ]
82,872
<p>I have a old website that generate its own RSS everytime a new post is created. Everything worked when I was on a server with PHP 4 but now that the host change to PHP 5, I always have a "bad formed XML". I was using xml_parser_create() and xml_parse(...) and fwrite(..) to save everything.</p> <p>Here is the exampl...
[ { "answer_id": 82904, "author": "Andrew Taylor", "author_id": 1776, "author_profile": "https://Stackoverflow.com/users/1776", "pm_score": 0, "selected": false, "text": "SimpleXML" }, { "answer_id": 84601, "author": "Veynom", "author_id": 11670, "author_profile": "http...
2008/09/17
[ "https://Stackoverflow.com/questions/82872", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13913/" ]
82,875
<p>What SQL can be used to list the tables, and the rows within those tables in an SQLite database file - once I have attached it with the <code>ATTACH</code> command on the SQLite 3 command line tool?</p>
[ { "answer_id": 82889, "author": "Lasse V. Karlsen", "author_id": 267, "author_profile": "https://Stackoverflow.com/users/267", "pm_score": 9, "selected": false, "text": "SELECT * FROM dbname.sqlite_master WHERE type='table';\n SELECT .DUMP .SCHEMA" }, { "answer_id": 82899, "a...
2008/09/17
[ "https://Stackoverflow.com/questions/82875", "https://Stackoverflow.com", "https://Stackoverflow.com/users/974/" ]
82,881
<p>Lets say I have a Dictionary object:</p> <pre><code>Dictionary myDictionary&lt;int, SomeObject&gt; = new Dictionary&lt;string, SomeObject&gt;(); </code></pre> <p>Now I want to iterate through the dictionary in reverse order. I can't use a simple for loop because I don't know the keys of the dictionary. A <em>forea...
[ { "answer_id": 82925, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 1, "selected": false, "text": "Dictionary<int, SomeObject> myDictionary foreach(SomeObject _object in myDictionary.Values.Reverse())\n{\n}\n" }, { "an...
2008/09/17
[ "https://Stackoverflow.com/questions/82881", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2273/" ]
82,914
<p>I don't think this is possible just using the color setting in SpriteBatch, so I'm trying to work out a simple shader that would take every pixel and make it white, while respecting the alpha value of the pixel.</p> <p>The answer Joel Martinez gave looks right, but how do I incorporate that when I draw the sprite w...
[ { "answer_id": 83306, "author": "Joel Martinez", "author_id": 5416, "author_profile": "https://Stackoverflow.com/users/5416", "pm_score": 2, "selected": false, "text": "sampler2D baseMap;\n\nstruct PS_INPUT \n{\n float2 Texcoord : TEXCOORD0;\n\n};\n\nfloat4 ps_main( PS_INPUT Input ) : ...
2008/09/17
[ "https://Stackoverflow.com/questions/82914", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11911/" ]
82,929
<p>I have a PHP application that displays a list of options to a user. The list is generated from a simple query against SQL 2000. What I would like to do is have a specific option at the top of the list, and then have the remaining options sorted alphabetically.</p> <p>For example, here's the options if sorted alph...
[ { "answer_id": 82944, "author": "mercutio", "author_id": 1951, "author_profile": "https://Stackoverflow.com/users/1951", "pm_score": 2, "selected": false, "text": "SELECT name FROM options ORDER BY name = \"Montreal\", name;\n" }, { "answer_id": 82955, "author": "Garry Shutle...
2008/09/17
[ "https://Stackoverflow.com/questions/82929", "https://Stackoverflow.com", "https://Stackoverflow.com/users/37/" ]
82,943
<p>Is it possible in c# to initialize an array in, for example, subindex 1?</p> <p>I'm working with Office interop, and every property is an object array that starts in 1 (I assume it was originally programed in VB.NET), and you cannot modify it, you have to set the entire array for it to accept the changes.</p> <p>A...
[ { "answer_id": 82987, "author": "expedient", "author_id": 4248, "author_profile": "https://Stackoverflow.com/users/4248", "pm_score": 4, "selected": true, "text": "Array.CreateInstance" }, { "answer_id": 83022, "author": "xan", "author_id": 15667, "author_profile": "h...
2008/09/17
[ "https://Stackoverflow.com/questions/82943", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1782/" ]
82,949
<p>I'm trying to preform setup and teardown for a set of integration tests, using jUnit 4.4 to execute the tests. The teardown needs to be run reliably. I'm having other problems with TestNG, so I'm looking to port back to jUnit. What hooks are available for execution before any tests are run and after all tests have c...
[ { "answer_id": 83223, "author": "Jroc", "author_id": 12200, "author_profile": "https://Stackoverflow.com/users/12200", "pm_score": 3, "selected": false, "text": "import org.junit.*;\nimport static org.junit.Assert.*;\nimport java.util.*;\n\nclass SomethingUnitTest {\n @BeforeClass\n ...
2008/09/17
[ "https://Stackoverflow.com/questions/82949", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4893/" ]
82,971
<p>Is it possible to configure Visual Studio 2008 to automatically remove whitespace characters at the end of each line when saving a file? There doesn't seem to be a built-in option, so are there any extensions available to do this?</p>
[ { "answer_id": 83043, "author": "oglester", "author_id": 2017, "author_profile": "https://Stackoverflow.com/users/2017", "pm_score": 6, "selected": false, "text": ":Zs#$ :Zs#$ \\s*$" }, { "answer_id": 698243, "author": "Community", "author_id": -1, "author_profile": "...
2008/09/17
[ "https://Stackoverflow.com/questions/82971", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3853/" ]
82,981
<p>The problem is that I have several "h2" tags that have a <code>display:inline</code> attribute, and on Microsoft's wonderful browsers the space between them doesn't appear. Is there a workaround?</p> <p>I know there is a "non-breaking space" <code>&amp;nbsp;</code> in HTML but I was wondering if one can make a spac...
[ { "answer_id": 83032, "author": "Chris Marasti-Georg", "author_id": 96, "author_profile": "https://Stackoverflow.com/users/96", "pm_score": 0, "selected": false, "text": "<html>\n <head><title>Blah</title></head>\n <body>\n <h2 style=\"display:inline;\">Something</h2>\n ...
2008/09/17
[ "https://Stackoverflow.com/questions/82981", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3718/" ]
82,993
<p>We need to programatically burn files to CD in a C\C++ Windows XP/Vista application we are developing using Borlands Turbo C++.</p> <p>What is the simplest and best way to do this? We would prefer a native windows API (that doesnt rely on MFC) so as not to rely on any third party software/drivers if one is availabl...
[ { "answer_id": 85166, "author": "selwyn", "author_id": 16314, "author_profile": "https://Stackoverflow.com/users/16314", "pm_score": 5, "selected": true, "text": "#include <stdio.h>\n#include <imapi.h>\n#include <windows.h>\n\nstruct MEDIAINFO {\n BYTE nSessions;\n BYTE nLastTrack;...
2008/09/17
[ "https://Stackoverflow.com/questions/82993", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14260/" ]
83,009
<p>I'm currently using <a href="http://www.usysware.com/dpack/" rel="noreferrer">DPack</a> as this adds a "Collapse All Projects" option to the Solution node in Solution Explorer. It works pretty well but can take a while to execute and doesn't always collapse everything fully.</p> <p>Are there any better alternatives...
[ { "answer_id": 267394, "author": "Mario", "author_id": 472, "author_profile": "https://Stackoverflow.com/users/472", "pm_score": 2, "selected": false, "text": "regpkg CoolCommands.dll /codebase\n regpkg CoolCommands.dll /root:Software\\Microsoft\\VisualStudio\\9.0 /codebase\n" }, { ...
2008/09/17
[ "https://Stackoverflow.com/questions/83009", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12124/" ]
83,038
<p>When supplying dates to a stored procedure via a parameter I'm a little confused over which format to use for the dates. My original VBA syntax used the ADO Connection object to execute the stored procedure:</p> <pre><code>Set SentDetailRS = Me.ADOConnectionToIntegrity.Execute("dbo.s_SelectAggregatedSentDetailList ...
[ { "answer_id": 83489, "author": "Philippe Grondier", "author_id": 11436, "author_profile": "https://Stackoverflow.com/users/11436", "pm_score": 2, "selected": true, "text": "Public function SQLdateFormat(x_date) as string\n\nSQLDateFormat = _\n trim(str(datePart(\"yyyy\",x_date))) & _\...
2008/09/17
[ "https://Stackoverflow.com/questions/83038", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
83,040
<p>How do I connect to a remote Oracle database instance from PHP?</p> <p>I need to query (read only) the remote Oracle database for some information; do I need to have an Oracle Instant Client installed?</p> <p>Is the OCI extension for PHP enough?</p>
[ { "answer_id": 83115, "author": "Jroc", "author_id": 12200, "author_profile": "https://Stackoverflow.com/users/12200", "pm_score": 2, "selected": false, "text": "\n odbc_connect($dsn,$user,$pass);\n" } ]
2008/09/17
[ "https://Stackoverflow.com/questions/83040", "https://Stackoverflow.com", "https://Stackoverflow.com/users/67775/" ]
83,045
<p>I have a costumer showing Notepad with a large set of data that looks totally misaligned if word wrap is on and I want to force it off. Is there a command switch to do this?</p>
[ { "answer_id": 83127, "author": "Cetra", "author_id": 15087, "author_profile": "https://Stackoverflow.com/users/15087", "pm_score": 3, "selected": true, "text": "Hive: HKEY_CURRENT_USER\nKey: SOFTWARE\\Microsoft\\Notepad\nName: fWrap\nType: REG_DWORD\nValue: 0\n" } ]
2008/09/17
[ "https://Stackoverflow.com/questions/83045", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9077/" ]
83,050
<p>I had this question in mind and since I just discovered this site I decided to post it here.</p> <p>Let's say I have a table with a timestamp and a state for a given "object" (generic meaning, not OOP object); is there an optimal way to calculate the time between a state and the next occurrence of another (or same)...
[ { "answer_id": 83234, "author": "Andy Irving", "author_id": 8553, "author_profile": "https://Stackoverflow.com/users/8553", "pm_score": 0, "selected": false, "text": "CREATE TABLE #testing\n(\n eventdatetime datetime NOT NULL,\n state varchar(10) NOT NULL\n)\n\nINSERT INTO #testing...
2008/09/17
[ "https://Stackoverflow.com/questions/83050", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15805/" ]
83,058
<p>I have a <code>rails</code> application which is still showing the cachebusting numeric string at the end of the URL for static mode, even though I have put it into the production environment. Can someone tell me what config option I need to set to prevent this behaviour...</p>
[ { "answer_id": 83363, "author": "Dave Cheney", "author_id": 6449, "author_profile": "https://Stackoverflow.com/users/6449", "pm_score": 2, "selected": false, "text": "ENV['RAILS_ASSET_ID'] = ''\n" } ]
2008/09/17
[ "https://Stackoverflow.com/questions/83058", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7473/" ]
83,068
<p>I've got a load-balanced (not using Session state) ASP.Net 2.0 app on IIS5 running back to a single Oracle 10g server, using version 10.1.0.301 of the ODAC/ODP.Net drivers. After a long period of inactivity (a few hours), the application, seemingly randomly, will throw an Oracle exception:</p> <blockquote> <p>Excep...
[ { "answer_id": 91869, "author": "mathewbutler", "author_id": 2288, "author_profile": "https://Stackoverflow.com/users/2288", "pm_score": 5, "selected": true, "text": "SQLNET.EXPIRE_TIME alert.log" }, { "answer_id": 93802, "author": "Ken Wren", "author_id": 3430, "auth...
2008/09/17
[ "https://Stackoverflow.com/questions/83068", "https://Stackoverflow.com", "https://Stackoverflow.com/users/35/" ]
83,073
<p>It seems to be the <a href="https://stackoverflow.com/questions/82391/should-tables-be-avoided-in-html-at-any-cost#82402">general opinion</a> that tables should not be used for layout in HTML. </p> <p>Why?</p> <p>I have never (or rarely to be honest) seen good arguments for this. The usual answers are:</p> <ul> <...
[ { "answer_id": 83184, "author": "Grad van Horck", "author_id": 12569, "author_profile": "https://Stackoverflow.com/users/12569", "pm_score": 2, "selected": false, "text": "<div id=\"sidebar\"> <tr><td>...</td><td>...<td>sidebar</td></tr>" }, { "answer_id": 83201, "author": "S...
2008/09/17
[ "https://Stackoverflow.com/questions/83073", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3565/" ]
83,093
<p>is there a solution for batch insert via hibernate in partitioned postgresql table? currently i'm getting an error like this...</p> <pre><code>ERROR org.hibernate.jdbc.AbstractBatcher - Exception executing batch: org.hibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actual ...
[ { "answer_id": 90031, "author": "alexguev", "author_id": 436199, "author_profile": "https://Stackoverflow.com/users/436199", "pm_score": 3, "selected": true, "text": " @Override\n protected void doExecuteBatch(PreparedStatement ps) throws SQLException, HibernateException {\n ...
2008/09/17
[ "https://Stackoverflow.com/questions/83093", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15878/" ]
83,106
<p>How should widgets in GWT inform other widgets to refresh themselfs or perform some other action. </p> <p>Should I use sinkEvent / onBrowserEvent? And if so is there a way to create custom Events?</p>
[ { "answer_id": 86962, "author": "Alexandra Franks", "author_id": 16203, "author_profile": "https://Stackoverflow.com/users/16203", "pm_score": 2, "selected": false, "text": "Class newMessageHandler {\n void update(Widget caller, Widget subscriber) {\n ...\n }\n}\n\ncustomEve...
2008/09/17
[ "https://Stackoverflow.com/questions/83106", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6482/" ]
83,117
<p>I have a layered application in Java which has a multi thread data access layer which is invoked from different points. A single call to this layer is likely to spawn several threads to parallelize requests to the DB. </p> <p>What I'm looking for is a logging tool that would allow me to define "activities" that are...
[ { "answer_id": 83245, "author": "Chris Mazzola", "author_id": 15816, "author_profile": "https://Stackoverflow.com/users/15816", "pm_score": 0, "selected": false, "text": "StackTraceElement[] stackTrace = Thread.currentThread().getStackTrace();\n StackTraceElement[] stackTrace = new Excep...
2008/09/17
[ "https://Stackoverflow.com/questions/83117", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12791/" ]
83,132
<p>I thought I'd found the solution a while ago (see my <a href="https://tjrobinson.net/programming/technology/2006/09/03/cant-execute-code-from-a-freed-script.html" rel="noreferrer">blog</a>):</p> <blockquote> <p>If you ever get the JavaScript (or should that be JScript) error "Can't execute code from a freed scrip...
[ { "answer_id": 84300, "author": "Sjoerd Visscher", "author_id": 5852, "author_profile": "https://Stackoverflow.com/users/5852", "pm_score": 5, "selected": false, "text": "try\n{\n f();\n}\ncatch(e)\n{\n if (e.number == -2146823277)\n // f is no longer available\n ...\n}\n" }, ...
2008/09/17
[ "https://Stackoverflow.com/questions/83132", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12124/" ]
83,147
<p>I remember hearing <a href="http://en.wikipedia.org/wiki/Joel_Spolsky" rel="noreferrer">Joel Spolsky</a> mention in <a href="https://stackoverflow.fogbugz.com/default.asp?W4" rel="noreferrer">podcast 014</a> that he'd barely ever used a foreign key (if I remember correctly). However, to me they seem pretty vital to ...
[ { "answer_id": 83470, "author": "hamishmcn", "author_id": 3590, "author_profile": "https://Stackoverflow.com/users/3590", "pm_score": 0, "selected": false, "text": "customer_type" }, { "answer_id": 83527, "author": "Powerlord", "author_id": 15880, "author_profile": "h...
2008/09/17
[ "https://Stackoverflow.com/questions/83147", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3394/" ]
83,152
<p>Is there an open source library that will help me with reading/parsing PDF documents in .NET/C#?</p>
[ { "answer_id": 84410, "author": "ceetheman", "author_id": 16154, "author_profile": "https://Stackoverflow.com/users/16154", "pm_score": 6, "selected": false, "text": "using System;\nusing System.IO;\nusing iTextSharp.text.pdf;\nusing System.Text.RegularExpressions;\n\nnamespace Spider.Ut...
2008/09/17
[ "https://Stackoverflow.com/questions/83152", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6777/" ]
83,156
<p>Ok, I have been working with Solaris for a 10+ years, and have never seen this...</p> <p>I have a directory listing which includes both a file and subdirectory with the same name:</p> <pre><code>-rw-r--r-- 1 root other 15922214 Nov 29 2006 msheehan drwxrwxrwx 12 msheehan sysadmin 2048 Mar 25 15:39 ms...
[ { "answer_id": 83224, "author": "Anthony Williams", "author_id": 5597, "author_profile": "https://Stackoverflow.com/users/5597", "pm_score": 0, "selected": false, "text": "cat msh*\n" }, { "answer_id": 83644, "author": "bltxd", "author_id": 11892, "author_profile": "h...
2008/09/17
[ "https://Stackoverflow.com/questions/83156", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8361/" ]
83,157
<p>I know there is no "right" heap size, but which heap size do you use in your applications (application type, jdk, os)?</p> <p>The JVM Options <code>-Xms</code> (initial/minimum) and <code>-Xmx</code> (maximum) allow for controlling the heap size. What settings make sense under which circumstances? When are the defa...
[ { "answer_id": 1508750, "author": "dogbane", "author_id": 7412, "author_profile": "https://Stackoverflow.com/users/7412", "pm_score": 1, "selected": false, "text": "-Xms250M -Xmx1500M -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC \n" } ]
2008/09/17
[ "https://Stackoverflow.com/questions/83157", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1961117/" ]
83,159
<p>Some API returns me XmlCursor pointing on root of XML Document. I need to insert all of this into another org.w3c.DOM represented document.</p> <p>At start: XmlCursor poiting on <code></p> <p>&lt;a&gt; &lt;b&gt; some text &lt;/b&gt; &lt;/a&gt; </code></p> <p>DOM Document: <code></p> <p>&lt;foo&gt;</p> <...
[ { "answer_id": 83256, "author": "Sietse", "author_id": 6400, "author_profile": "https://Stackoverflow.com/users/6400", "pm_score": 4, "selected": true, "text": "Node originalNode = cursor.getDomNode();\nNode importNode = document.importNode(originalNode.getFirstChild());\nNode otherNode ...
2008/09/17
[ "https://Stackoverflow.com/questions/83159", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1128722/" ]
83,172
<p>We are using a Sony SNC-RZ30N IP-based webcam to monitor osprey nests and would like to stream the video feed via our own webserver.</p> <p>Rather than use the built-in webserver of the camera (which requires either ActiveX or Java on the client side) to display the live feed, I would like to weed out just the live...
[ { "answer_id": 83207, "author": "Grad van Horck", "author_id": 12569, "author_profile": "https://Stackoverflow.com/users/12569", "pm_score": 0, "selected": false, "text": "http://<ip>/img/static.jpg" } ]
2008/09/17
[ "https://Stackoverflow.com/questions/83172", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2312/" ]
83,225
<p>I've seen this done in a few sites, an example is <a href="http://www.artofadambetts.com/weblog/?p=169" rel="noreferrer">artofadambetts.com</a>. The scroll bar on the page scrolls only an element of the page, not the entire page. I looked at the source and havent't been able to figure it out yet. How is this done?</...
[ { "answer_id": 83258, "author": "Adam Rosenfield", "author_id": 9530, "author_profile": "https://Stackoverflow.com/users/9530", "pm_score": -1, "selected": false, "text": "<div style=\"overflow-x: auto; overflow-y: auto;>the content</div>" }, { "answer_id": 83264, "author": "...
2008/09/17
[ "https://Stackoverflow.com/questions/83225", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5304/" ]
83,232
<p>I'm looking for a key/value pair object that I can include in a web service.</p> <p>I tried using .NET's <a href="http://msdn.microsoft.com/en-us/library/5tbh8a42.aspx" rel="noreferrer"><code>System.Collections.Generic.KeyValuePair&lt;&gt;</code></a> class, but it does not properly serialize in a web service. In a ...
[ { "answer_id": 83265, "author": "leppie", "author_id": 15541, "author_profile": "https://Stackoverflow.com/users/15541", "pm_score": 8, "selected": true, "text": "[Serializable]\npublic struct KeyValuePair<K,V>\n{\n public K Key {get;set;}\n public V Value {get;set;}\n}\n" }, { ...
2008/09/17
[ "https://Stackoverflow.com/questions/83232", "https://Stackoverflow.com", "https://Stackoverflow.com/users/392/" ]
83,242
<p>I have a RHEL 5 system with a fresh new hard drive I just dedicated to the MySQL server. To get things started, I used "mysqldump --host otherhost -A | mysql", even though I noticed the manpage never explicitly recommends trying this (mysqldump into a file is a no-go. We're talking 500G of database). </p> <p>This ...
[ { "answer_id": 57127322, "author": "Mohd Abdul Mujib", "author_id": 807104, "author_profile": "https://Stackoverflow.com/users/807104", "pm_score": 0, "selected": false, "text": "mysqldump" } ]
2008/09/17
[ "https://Stackoverflow.com/questions/83242", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15910/" ]
83,260
<p>Say I've got this array: MyArray(0)="aaa" MyArray(1)="bbb" MyArray(2)="aaa"</p> <p>Is there a .net function which can give me the unique values? I would like something like this as an output of the function: OutputArray(0)="aaa" OutputArray(1)="bbb"</p>
[ { "answer_id": 83280, "author": "Stormenet", "author_id": 2090, "author_profile": "https://Stackoverflow.com/users/2090", "pm_score": 2, "selected": false, "text": "string[] myarray = new string[] { \"aaa\", \"bbb\", \"aaa\" };\n Dictionary mydict = new Dictionary();\n ...
2008/09/17
[ "https://Stackoverflow.com/questions/83260", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15928/" ]
83,279
<p>I'm developing a 3-column website using a layout like this:</p> <pre><code> &lt;div id='left' style='left: 0; width: 150px; '&gt; ... &lt;/div&gt; &lt;div id='middle' style='left: 150px; right: 200px' &gt; ... &lt;/div&gt; &lt;div id='right' style='right: 0; width: 200px; '&gt; ... &lt;/div...
[ { "answer_id": 90790, "author": "Peter Kelley", "author_id": 14893, "author_profile": "https://Stackoverflow.com/users/14893", "pm_score": 1, "selected": false, "text": "1 <!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \n2 \"http://www.w3.org/TR/html4/strict.dtd\"> \n3 <html...
2008/09/17
[ "https://Stackoverflow.com/questions/83279", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15931/" ]
83,299
<p>I found this open-source library that I want to use in my Java application. The library is written in C and was developed under Unix/Linux, and my application will run on Windows. It's a library of mostly mathematical functions, so as far as I can tell it doesn't use anything that's platform-dependent, it's just ver...
[ { "answer_id": 83394, "author": "Tuxmentat", "author_id": 15963, "author_profile": "https://Stackoverflow.com/users/15963", "pm_score": -1, "selected": false, "text": "System.loadLibrary(\"mylibrary.dll\");\n" } ]
2008/09/17
[ "https://Stackoverflow.com/questions/83299", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8330/" ]
83,319
<p>I'm trying to figure out why the control does not honor ZIndex.</p> <p>Example 1 - which works fine</p> <pre><code> &lt;Canvas&gt; &lt;Rectangle Canvas.ZIndex="1" Height="400" Width="600" Fill="Yellow"/&gt; &lt;Rectangle Canvas.ZIndex="2" Height="100" Width="100" Fill="Red"/&gt; &lt;/Canvas&gt;...
[ { "answer_id": 19936409, "author": "Hannish", "author_id": 1514608, "author_profile": "https://Stackoverflow.com/users/1514608", "pm_score": 1, "selected": false, "text": "<Canvas ClipToBounds=\"False\">\n <Popup AllowsTransparency=\"True\" ClipToBounds=\"False\" IsOpen=\"True\">\n ...
2008/09/17
[ "https://Stackoverflow.com/questions/83319", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15921/" ]
83,329
<p>I have a ~23000 line SQL dump containing several databases worth of data. I need to extract a certain section of this file (i.e. the data for a single database) and place it in a new file. I know both the start and end line numbers of the data that I want.</p> <p>Does anyone know a Unix command (or series of comman...
[ { "answer_id": 83344, "author": "Mark Janssen", "author_id": 15828, "author_profile": "https://Stackoverflow.com/users/15828", "pm_score": 5, "selected": false, "text": ":16224,16482w!/tmp/some-file\n cat file | head -n 16482 | tail -n 258\n" }, { "answer_id": 83347, "author"...
2008/09/17
[ "https://Stackoverflow.com/questions/83329", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15676/" ]
83,397
<p>In php I have open a .php file and want to evaluate certain lines. Specifically when the $table_id and $line variables are assigned a value.</p> <p>Within the text file I have:</p> <pre><code>... $table_id = 'crs_class'; // table name $screen = 'crs_class.detail.screen.inc'; // file ide...
[ { "answer_id": 83435, "author": "Adam Wright", "author_id": 1200, "author_profile": "https://Stackoverflow.com/users/1200", "pm_score": 2, "selected": false, "text": "<?php\n $foo = \"bar\";\n\n print '$foo';\n print \"$foo\";\n?>\n" }, { "answer_id": 83648, "author": "scu...
2008/09/17
[ "https://Stackoverflow.com/questions/83397", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10583/" ]
83,405
<p>I am looking for a good JavaScript library for parsing XML data. It should be much easier to use than the built-in <a href="http://www.w3schools.com/Xml/xml_parser.asp" rel="nofollow noreferrer">XML DOM parsers</a> bundled with the browsers.</p> <p>I got spoiled a bit working with JSON and am looking forward to som...
[ { "answer_id": 26957382, "author": "lexicore", "author_id": 303810, "author_profile": "https://Stackoverflow.com/users/303810", "pm_score": 6, "selected": false, "text": "QName amdefine java -jar node_modules/jsonix/lib/jsonix-schema-compiler-full.jar\n -d mappings -p PO purchaseorder.x...
2008/09/17
[ "https://Stackoverflow.com/questions/83405", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4337/" ]
83,410
<p>I have a large CSV file and I want to execute a stored procedure for each line.</p> <p>What is the best way to execute a stored procedure from PowerShell?</p>
[ { "answer_id": 83791, "author": "Mark Schill", "author_id": 9482, "author_profile": "https://Stackoverflow.com/users/9482", "pm_score": 7, "selected": true, "text": "$SqlConnection = New-Object System.Data.SqlClient.SqlConnection\n$SqlConnection.ConnectionString = \"Server=HOME\\SQLEXPRE...
2008/09/17
[ "https://Stackoverflow.com/questions/83410", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12767/" ]
83,439
<p>What is the preferred way to remove spaces from a string in C++? I could loop through all the characters and build a new string, but is there a better way?</p>
[ { "answer_id": 83468, "author": "rupello", "author_id": 635, "author_profile": "https://Stackoverflow.com/users/635", "pm_score": 5, "selected": false, "text": "string.erase(std::remove_if(string.begin(), string.end(), std::isspace), string.end());\n" }, { "answer_id": 83481, ...
2008/09/17
[ "https://Stackoverflow.com/questions/83439", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15947/" ]
83,471
<p>Working with a SqlCommand in C# I've created a query that contains a IN (list...) part in the where clause. Instead of looping through my string list generating the list I need for the query (dangerous if you think in sqlInjection). I thought that I could create a parameter like:</p> <pre><code>SELECT blahblahblah ...
[ { "answer_id": 83525, "author": "Joel Coehoorn", "author_id": 3043, "author_profile": "https://Stackoverflow.com/users/3043", "pm_score": 2, "selected": false, "text": "SELECT * FROM [Table] WHERE ID IN (1,2,3)\n SELECT * FROM [Table] WHERE ID IN ( SELECT TableID FROM [OtherTable] WHERE ...
2008/09/17
[ "https://Stackoverflow.com/questions/83471", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15987/" ]
83,476
<p>I've been studying the Google authentication API (AuthSub)... My question is, how do I get the user's account information (at least their Gmail address) after the authentication has passed? </p> <p>Because currently, all I get back from the authentication process is a token granting me access to which ever Google ...
[ { "answer_id": 7115414, "author": "StasM", "author_id": 214196, "author_profile": "https://Stackoverflow.com/users/214196", "pm_score": 2, "selected": false, "text": "https://www-opensocial.googleusercontent.com/api/people/@me/@self http://www-opensocial.googleusercontent.com/api" }, ...
2008/09/17
[ "https://Stackoverflow.com/questions/83476", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15974/" ]
83,512
<p>I am writing a perl script to parse a mysql database schema and create C++ classes when necessary. My question is a pretty easy one, but us something I haven't really done before and don't know common practice. Any object of any of classes created will need to have "get" methods to populate this information. So m...
[ { "answer_id": 83702, "author": "bmdhacks", "author_id": 14032, "author_profile": "https://Stackoverflow.com/users/14032", "pm_score": 1, "selected": false, "text": "Artist MJ = Artist::Find(\"Michael Jackson\");\nMJ->set(\"relevant\", \"no\");\nMJ->save();\n new Artist StackOverflow = A...
2008/09/17
[ "https://Stackoverflow.com/questions/83512", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
83,531
<p>I'm trying to write a stored procedure to select employees who have birthdays that are upcoming. </p> <p><code>SELECT * FROM Employees WHERE Birthday &gt; @Today AND Birthday &lt; @Today + @NumDays</code></p> <p>This will not work because the birth year is part of Birthday, so if my birthday was '09-18-1983' that...
[ { "answer_id": 83571, "author": "Stephen Wrighton", "author_id": 7516, "author_profile": "https://Stackoverflow.com/users/7516", "pm_score": -1, "selected": false, "text": "SELECT * FROM Employees WHERE\n DATEADD ( year, YEAR(@Today) - YEAR(@Birthday), birthday) BETWEEN @Today AND @EndD...
2008/09/17
[ "https://Stackoverflow.com/questions/83531", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2460/" ]
83,547
<p>I have a decimal number (let's call it <strong>goal</strong>) and an array of other decimal numbers (let's call the array <strong>elements</strong>) and I need to find all the combinations of numbers from <strong>elements</strong> which sum to goal.</p> <p>I have a preference for a solution in C# (.Net 2.0) but may...
[ { "answer_id": 84168, "author": "Sam Meldrum", "author_id": 16005, "author_profile": "https://Stackoverflow.com/users/16005", "pm_score": 5, "selected": true, "text": "public class Solver {\n\n private List<List<decimal>> mResults;\n\n public List<List<decimal>> Solve(decimal goal,...
2008/09/17
[ "https://Stackoverflow.com/questions/83547", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16005/" ]
83,553
<p>I need to write a program used internally where different users will have different abilities within the program.</p> <p>Rather than making users have a new username and password, how do I tie into an existing domain server's login system?</p> <p>Assume .NET (C#, VB, ASP, etc)</p> <p>-Adam</p>
[ { "answer_id": 83587, "author": "Matt Everson", "author_id": 7300, "author_profile": "https://Stackoverflow.com/users/7300", "pm_score": 3, "selected": true, "text": "private string getWindowsUsername()\n{\n AppDomain.CurrentDomain.SetPrincipalPolicy(PrincipalPolicy.WindowsPrincipal);...
2008/09/17
[ "https://Stackoverflow.com/questions/83553", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2915/" ]
83,593
<p>Having a set of (2D) points from a GIS file (a city map), I need to generate the polygon that defines the 'contour' for that map (its boundary). Its input parameters would be the points set and a 'maximum edge length'. It would then output the corresponding (probably non-convex) polygon.</p> <p>The best solution I ...
[ { "answer_id": 83975, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 1, "selected": false, "text": "H01 = bearing from P0 to P1\nH12 = bearing from P1 to P2\nA = fmod( H12-H01+360, 360 )\n|P2-P1| <= MaxEdgeLength\n P0 <- P1\nP1...
2008/09/17
[ "https://Stackoverflow.com/questions/83593", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8999/" ]
83,604
<p>I am wondering what makes sense in relation to what objects to expose through a WCF service - should I add WCF Serialization specifications to my business entities or should I implement a converter that maps my business entities to the DataContracts that I want to expose through my WCF service?</p> <p>Right now I h...
[ { "answer_id": 2402961, "author": "Raj Rao", "author_id": 44815, "author_profile": "https://Stackoverflow.com/users/44815", "pm_score": 1, "selected": false, "text": "//Business Entity\nclass Person\n{\n public string Name{ get; set; }\n public int Age{ get; set; }\n}\n\n\n//Data tra...
2008/09/17
[ "https://Stackoverflow.com/questions/83604", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15771/" ]
83,640
<p>For data types such as std::set and std::map where lookup occurs in logarithmic time, is the implementation required to maintain the begin and end iterators? Does accessing begin and end imply a lookup that could occur in logarithmic time?</p> <p>I have always assumed that begin and end always occur in constant tim...
[ { "answer_id": 83682, "author": "amo-ej1", "author_id": 15791, "author_profile": "https://Stackoverflow.com/users/15791", "pm_score": 2, "selected": false, "text": "std::map" } ]
2008/09/17
[ "https://Stackoverflow.com/questions/83640", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8123/" ]
83,653
<p>The following returns </p> <blockquote> <p>Type of conditional expression cannot be determined because there is no implicit conversion between 'double' and '&lt;null&gt;'</p> </blockquote> <pre><code>aNullableDouble = (double.TryParse(aString, out aDouble) ? aDouble : null) </code></pre> <hr> <p>The reason why...
[ { "answer_id": 83664, "author": "James Curran", "author_id": 12725, "author_profile": "https://Stackoverflow.com/users/12725", "pm_score": 1, "selected": false, "text": "aNullableDouble = (double.TryParse(aString, out aDouble)?new Nullable<double>(aDouble):null)\n" }, { "answer_i...
2008/09/17
[ "https://Stackoverflow.com/questions/83653", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11333/" ]
83,674
<p>I want to find records on a combination of created_on >= some date AND name IN some list of names.</p> <p>For ">=" I'd have to use sql condition. For "IN" I'd have to use a hash of conditions where the key is :name and the value is the array of names.</p> <p>Is there a way to combine the two?</p>
[ { "answer_id": 83736, "author": "Laurie Young", "author_id": 7473, "author_profile": "https://Stackoverflow.com/users/7473", "pm_score": 6, "selected": true, "text": "Class Test < ActiveRecord::Base\n named_scope :created_after_2005, :conditions => \"created_on > 2005-01-01\"\n named_s...
2008/09/17
[ "https://Stackoverflow.com/questions/83674", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1167846/" ]
83,687
<p>I have a need to display a <code>UITableView</code> containing a user's account credentials. For this, I'm using <code>UILabels</code> in <code>UITableViewCell</code>. When I display their password, I'd obviously like to just display a placeholder password character instead of their actual password, similar to a <co...
[ { "answer_id": 9304081, "author": "Scott Gardner", "author_id": 616764, "author_profile": "https://Stackoverflow.com/users/616764", "pm_score": 4, "selected": false, "text": "// self.password is your password string\nNSMutableString *dottedPassword = [NSMutableString new];\n\nfor (int i ...
2008/09/17
[ "https://Stackoverflow.com/questions/83687", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1967/" ]
83,696
<p>Generally, what's the best way to tackle a layout bug in IE6? What are the most common bugs or problems that one should look for when trying to figure out why your page suddenly looks like a monkey coded it?</p>
[ { "answer_id": 83733, "author": "Alex King", "author_id": 15813, "author_profile": "https://Stackoverflow.com/users/15813", "pm_score": 2, "selected": false, "text": "border: 1px solid red;" } ]
2008/09/17
[ "https://Stackoverflow.com/questions/83696", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11078/" ]
83,723
<p>I'm working on an email validation check and we need to decided whether to allow user@localhost and user@example (notice no .anything) to be validated as a valid email address. This is for an open source project that has a number of use cases on both the web at large and intranets.</p> <p><a href="http://www.ietf.o...
[ { "answer_id": 85324, "author": "Devin Reams", "author_id": 16248, "author_profile": "https://Stackoverflow.com/users/16248", "pm_score": 0, "selected": false, "text": "<?php \nfunction valid_email($email) { \n // First, we check that there's one @ symbol, and that the lengths are rig...
2008/09/17
[ "https://Stackoverflow.com/questions/83723", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11910/" ]
83,741
<p>I need a simple way to monitor multiple text log files distributed over a number of HP-UX servers. They are a mix of text and XML log files from several distributed legacy systems. Currently we just ssh to the servers and use <em>tail -f</em> and <em>grep</em>, but that doesn't scale when you have many logs to keep ...
[ { "answer_id": 164003, "author": "masukomi", "author_id": 13973, "author_profile": "https://Stackoverflow.com/users/13973", "pm_score": 4, "selected": false, "text": "#!/bin/bash\nFILE=$1\nfor box in box1.foo.com box2.foo.com box3.foo.com box4.foo.com; do\n ssh $box tail -f $FILE &\n...
2008/09/17
[ "https://Stackoverflow.com/questions/83741", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4992/" ]
83,756
<p>I need to enable/disable completely network interfaces from a script in Windows XP. I'm looking for a python solution, but any general way (eg WMI, some command-line à la netsh, some windows call) is welcome and will be adjusted. Thanks.</p>
[ { "answer_id": 83800, "author": "Matt Everson", "author_id": 7300, "author_profile": "https://Stackoverflow.com/users/7300", "pm_score": 0, "selected": false, "text": "devcon disable (id or portion of name)\ndevcon enable (id or portion of name)\n" }, { "answer_id": 83890, "a...
2008/09/17
[ "https://Stackoverflow.com/questions/83756", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6899/" ]
83,770
<p>I'm trying to create a server control, which inherits from TextBox, that will automatically have a <a href="http://www.asp.net/AJAX/AjaxControlToolkit/Samples/Calendar/Calendar.aspx" rel="nofollow noreferrer">CalendarExtender</a> attached to it. Is it possible to do this, or does my new control need to inherit from ...
[ { "answer_id": 83951, "author": "Joseph Daigle", "author_id": 507, "author_profile": "https://Stackoverflow.com/users/507", "pm_score": 3, "selected": true, "text": "CreateChildControls TextBox textbox = new TextBox();\ntextbox.ID = this.ID + \"Textbox\";\ntextbox.Text = this.EditableFie...
2008/09/17
[ "https://Stackoverflow.com/questions/83770", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13583/" ]
83,779
<p>I've used Excel PivotTable to analyze data from my database because it allows me to "slice and dice" very quickly. As we know what is in our database tables, we all can write SQL queries that do what PivotTable does. </p> <p>But I am wondering why PivotTable can construct the queries so fast while it knows <em>noth...
[ { "answer_id": 84120, "author": "Martin08", "author_id": 8203, "author_profile": "https://Stackoverflow.com/users/8203", "pm_score": 0, "selected": false, "text": "- the Page Fields zone \n- the Column Fields zone \n- the Row Fields zone and\n- the Data zone\n - The Page zone builds th...
2008/09/17
[ "https://Stackoverflow.com/questions/83779", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8203/" ]
83,787
<p>I would like to extract the date a jpg file was created. Java has the lastModified method for the File object, but appears to provide no support for extracting the created date from the file. I believe the information is stored within the file as the date I see when I hover the mouse pointer over the file in Win X...
[ { "answer_id": 83922, "author": "Jorge Ferreira", "author_id": 6508, "author_profile": "https://Stackoverflow.com/users/6508", "pm_score": 0, "selected": false, "text": "import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\...
2008/09/17
[ "https://Stackoverflow.com/questions/83787", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16029/" ]
83,807
<p>All I know about the constraint is it's name (<code>SYS_C003415</code>), but I want to see it's definition.</p>
[ { "answer_id": 83811, "author": "Hank Gay", "author_id": 4203, "author_profile": "https://Stackoverflow.com/users/4203", "pm_score": 5, "selected": false, "text": "ALL_CONSTRAINTS select OWNER, CONSTRAINT_NAME, CONSTRAINT_TYPE, TABLE_NAME, SEARCH_CONDITION from ALL_CONSTRAINTS where CONS...
2008/09/17
[ "https://Stackoverflow.com/questions/83807", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4203/" ]
83,856
<p>I have a string coming from a table like "can no pay{1},as your payment{2}due on {3}". I want to replace {1} with some value , {2} with some value and {3} with some value .</p> <p>Is it Possible to replace all 3 in one replace function ? or is there any way I can directly write query and get replaced value ? I wa...
[ { "answer_id": 83910, "author": "hamishmcn", "author_id": 3590, "author_profile": "https://Stackoverflow.com/users/3590", "pm_score": 5, "selected": true, "text": "replace() SET mycol = replace( replace(mycol, '{1}', 'myoneval'), '{2}', mytwoval)\n" }, { "answer_id": 28584627, ...
2008/09/17
[ "https://Stackoverflow.com/questions/83856", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14299/" ]
83,863
<p>I want to find a way to develop database projects quickly in Visual Studio. Any ideas?</p>
[ { "answer_id": 83888, "author": "Chris Woodruff", "author_id": 7001, "author_profile": "https://Stackoverflow.com/users/7001", "pm_score": 3, "selected": true, "text": "/****** Object: StoredProcedure [dbo].[CustOrdersOrders] Script Date: 08/25/2007 15:22:59 ******/\nIF EXISTS (SELE...
2008/09/17
[ "https://Stackoverflow.com/questions/83863", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7001/" ]
83,887
<p>Below is an example class hierarchy and code. What I'm looking for is a way to determine if 'ChildClass1' or 'ChildClass2' had the static method whoAmI() called on it without re-implementing it in each child class.</p> <pre><code>&lt;?php abstract class ParentClass { public static function whoAmI () { ...
[ { "answer_id": 109888, "author": "S.Lott", "author_id": 10661, "author_profile": "https://Stackoverflow.com/users/10661", "pm_score": 2, "selected": false, "text": "someObject.whoAmI() if someObject.whoAmI() == 'ChildClass1' { do X(someObject) } X()" }, { "answer_id": 1384848, ...
2008/09/17
[ "https://Stackoverflow.com/questions/83887", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15872/" ]
83,899
<p>We need to capture live video and display <em>easily</em> on Linux. We need a cheap card or USB device with a simple API. Anyone want to share some experience? </p>
[ { "answer_id": 109408, "author": "Shannon Nelson", "author_id": 14450, "author_profile": "https://Stackoverflow.com/users/14450", "pm_score": 2, "selected": false, "text": "dvgrab --size 500 --autosplit <filename>\n dvgrab - | mplayer -\n" } ]
2008/09/17
[ "https://Stackoverflow.com/questions/83899", "https://Stackoverflow.com", "https://Stackoverflow.com/users/842/" ]
83,914
<p>I've got a new varchar(10) field in a database with 1000+ records. I'd like to update the table so I can have random data in the field. I'm looking for a SQL solution.</p> <p>I know I can use a cursor, but that seems inelegant.</p> <p>MS-SQL 2000,BTW</p>
[ { "answer_id": 83963, "author": "James Curran", "author_id": 12725, "author_profile": "https://Stackoverflow.com/users/12725", "pm_score": 4, "selected": true, "text": "update MyTable Set RandomFld = CONVERT(varchar(10), NEWID())\n" }, { "answer_id": 83965, "author": "Stephe...
2008/09/17
[ "https://Stackoverflow.com/questions/83914", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4230/" ]
83,918
<p>We have several jobs that run concurrently that have to use the same config info for log4j. They are all dumping the logs into one file using the same appender. Is there a way to have each job dynamically name its log file so they stay seperate?</p> <p>Thanks<BR> Tom</p>
[ { "answer_id": 84021, "author": "Alexandre Victoor", "author_id": 11897, "author_profile": "https://Stackoverflow.com/users/11897", "pm_score": 0, "selected": false, "text": " <category name=\"com.tom.firstbatch\">\n <appender-ref ref=\"FIRST_APPENDER\"/>\n </category>\n <cate...
2008/09/17
[ "https://Stackoverflow.com/questions/83918", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5659/" ]
83,945
<p>Is there any way to force a listview control to treat all clicks as though they were done through the Control key?</p> <p>I need to replicate the functionality of using the control key (selecting an item sets and unsets its selection status) in order to allow the user to easily select multiple items at the same tim...
[ { "answer_id": 2678156, "author": "Matthew M.", "author_id": 27472, "author_profile": "https://Stackoverflow.com/users/27472", "pm_score": 2, "selected": false, "text": "public class MultiSelectNoCTRLKeyListView : ListView {\n public MultiSelectNoCTRLKeyListView() {\n\n }\n\n public c...
2008/09/17
[ "https://Stackoverflow.com/questions/83945", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16091/" ]
83,953
<pre><code>foreach ($_GET as $field =&gt; $label) { $datarray[]=$_GET[$field]; echo "$_GET[$field]"; echo "&lt;br&gt;"; } print_r($datarray); </code></pre> <hr> <p>This is the output I am getting. I see the data is there in datarray but when I <code>echo $_GET[$field]</code> </p> <p>I only get "Array"</p> ...
[ { "answer_id": 84040, "author": "Fernando Barrocal", "author_id": 2274, "author_profile": "https://Stackoverflow.com/users/2274", "pm_score": 0, "selected": false, "text": "<pre> print_r $_GET" }, { "answer_id": 84208, "author": "jackbravo", "author_id": 9055, "author...
2008/09/17
[ "https://Stackoverflow.com/questions/83953", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
83,962
<p>Test the following code:</p> <pre><code>#include &lt;stdio.h&gt; #include &lt;stdlib.h&gt; main() { const char *yytext="0"; const float f=(float)atof(yytext); size_t t = *((size_t*)&amp;f); printf("t should be 0 but is %d\n", t); } </code></pre> <p>Compile it with:</p> <pre><code>gcc -O3 test.c </...
[ { "answer_id": 83997, "author": "Tobi", "author_id": 5422, "author_profile": "https://Stackoverflow.com/users/5422", "pm_score": 5, "selected": true, "text": "size_t t = *((size_t*)&f);\n size_t t = *((size_t*)(char*)&f);\n" }, { "answer_id": 84020, "author": "Kent Fredric", ...
2008/09/17
[ "https://Stackoverflow.com/questions/83962", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6605/" ]
83,967
<p>Sometimes my Oracle database on Windows gets hosed. How do I do a manual uninstall of Oracle?</p>
[ { "answer_id": 86536, "author": "Sten Vesterli", "author_id": 9363, "author_profile": "https://Stackoverflow.com/users/9363", "pm_score": 7, "selected": true, "text": "\\HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services \\HKEY_LOCAL_MACHINE\\SOFTWARE\\ C:\\Program Files\\Oracle" ...
2008/09/17
[ "https://Stackoverflow.com/questions/83967", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6013/" ]
83,983
<p>example:</p> <pre><code>a_list = [1, 2, 3] a_list.len() # doesn't work len(a_list) # works </code></pre> <p>Python being (very) object oriented, I don't understand why the 'len' function isn't inherited by the object. Plus I keep trying the wrong solution since it appears as the logical one to me</p>
[ { "answer_id": 84016, "author": "Bill Barksdale", "author_id": 16113, "author_profile": "https://Stackoverflow.com/users/16113", "pm_score": 2, "selected": false, "text": "__len__ >>> class Spam:\n... def __len__(self): return 3\n... \n>>> s = Spam()\n>>> len(s)\n3\n" }, { "ans...
2008/09/17
[ "https://Stackoverflow.com/questions/83983", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16070/" ]
83,990
<p>It's common to want browsers to cache resources - JavaScript, CSS, images, etc. until there is a new version available, and then ensure that the browser fetches and caches the new version instead.</p> <p>One solution is to embed a version number in the resource's filename, but will placing the resources to be manag...
[ { "answer_id": 41716206, "author": "Leonid Vasilev", "author_id": 2594597, "author_profile": "https://Stackoverflow.com/users/2594597", "pm_score": 3, "selected": false, "text": "URI = scheme \":\" hier-part [ \"?\" query ] [ \"#\" fragment ]\n hier-part = \"//\" authority path...
2008/09/17
[ "https://Stackoverflow.com/questions/83990", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12559/" ]
84,007
<p>Do you guys know how I can use the Curl command line to POST SOAP to test a web service?</p> <p>I have a file (soap.xml) which has all the soap message attached to it I just don't seem to be able to properly post it.</p> <p>Thanks!</p>
[ { "answer_id": 84046, "author": "lbz", "author_id": 11530, "author_profile": "https://Stackoverflow.com/users/11530", "pm_score": 6, "selected": true, "text": "curl -d \"String to post\" \"http://www.example.com/target\"\n curl -d @soap.xml \"http://www.example.com/target\"\n" }, { ...
2008/09/17
[ "https://Stackoverflow.com/questions/84007", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13469/" ]
84,034
<p>I have <strong>1 red polygon</strong> say and <strong>50 randomly placed blue polygons</strong> - they are situated in geographical <strong>2D space</strong>. What is the quickest/speediest algorithim to find the the shortest distance between a red polygon and its nearest blue polygon?</p> <p>Bear in mind that it ...
[ { "answer_id": 1120049, "author": "mpen", "author_id": 65387, "author_profile": "https://Stackoverflow.com/users/65387", "pm_score": 2, "selected": false, "text": "log(log m * n)" } ]
2008/09/17
[ "https://Stackoverflow.com/questions/84034", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5175/" ]
84,064
<p>I'm trying to use <code>SQLBindParameter</code> to prepare my driver for input via <code>SQLPutData</code>. The field in the database is a <code>TEXT</code> field. My function is crafted based on MS's example here: <a href="http://msdn.microsoft.com/en-us/library/ms713824(VS.85).aspx" rel="nofollow noreferrer">http...
[ { "answer_id": 89423, "author": "antik", "author_id": 1625, "author_profile": "https://Stackoverflow.com/users/1625", "pm_score": 2, "selected": false, "text": " SQLINTEGER length;\n RETCODE retcode = SQLBindParameter( StatementHandle,\n col_num, // position of the para...
2008/09/17
[ "https://Stackoverflow.com/questions/84064", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1625/" ]
84,096
<p>ssh will look for its keys by default in the ~/.ssh folder. I want to force it to always look in another location.</p> <p>The workaround I'm using is to add the keys from the non-standard location to the agent:</p> <pre><code>ssh-agent ssh-add /path/to/where/keys/really/are/id_rsa </code></pre> <p>(on Linux and ...
[ { "answer_id": 84212, "author": "roo", "author_id": 716, "author_profile": "https://Stackoverflow.com/users/716", "pm_score": 5, "selected": false, "text": "man ssh -i" }, { "answer_id": 84419, "author": "Drew Frezell", "author_id": 10954, "author_profile": "https://S...
2008/09/17
[ "https://Stackoverflow.com/questions/84096", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6329/" ]
84,102
<p>I'd be interested in some before-and-after c# examples, some non-idiomatic vs idiomatic examples. Non-c# examples would be fine as well if they get the idea across. Thanks.</p>
[ { "answer_id": 84270, "author": "Corey Goldberg", "author_id": 16148, "author_profile": "https://Stackoverflow.com/users/16148", "pm_score": 8, "selected": true, "text": "mylist = [1, 2, 3, 4]\nnewlist = []\nfor i in mylist:\n newlist.append(i * 2)\n mylist = [1, 2, 3, 4]\nnewlist = [...
2008/09/17
[ "https://Stackoverflow.com/questions/84102", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13578/" ]
84,125
<p>I've been writing PHP for about six years now and have got to a point where I feel I should be doing more to write better code. I know that Object Oriented code is the way to go but I can't get my head around the concept.</p> <p>Can anyone explain in terms that any idiot can understand, OO and how it works in PHP o...
[ { "answer_id": 84356, "author": "Aquarion", "author_id": 12696, "author_profile": "https://Stackoverflow.com/users/12696", "pm_score": 5, "selected": false, "text": "class Breakfast {\n\n}\n $breakfast = array(\n'toast_slices' => 2,\n'eggs' => 2,\n'egg_type' => 'fried',\n'beans' => 'Hell...
2008/09/17
[ "https://Stackoverflow.com/questions/84125", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6916/" ]
84,147
<p>Does somebody know how to recover a never-starting eclipse when the error "org.eclipse.swt.SWTError: Item not added" is raising againg and again?</p> <p>I'm using WebSphere Studio Site Developer (Windows) 5.1.0</p> <p>The only stack trace in the .metadata/log file is:</p> <p><code>SESSION ------------------------...
[ { "answer_id": 4454563, "author": "Mohammed Ali", "author_id": 543879, "author_profile": "https://Stackoverflow.com/users/543879", "pm_score": 0, "selected": false, "text": "eclipse.ini eclipse.ini" } ]
2008/09/17
[ "https://Stackoverflow.com/questions/84147", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16135/" ]
84,149
<p>What is a good way to render data produced by a Java process in the browser? </p> <p>I've made extensive use of JSP and the various associated frameworks (<a href="http://java.sun.com/products/jsp/jstl/" rel="nofollow noreferrer">JSTL</a>, <a href="http://struts.apache.org/" rel="nofollow noreferrer">Struts</a>, <a...
[ { "answer_id": 87111, "author": "Andreas Holstenson", "author_id": 16351, "author_profile": "https://Stackoverflow.com/users/16351", "pm_score": 3, "selected": true, "text": "@Path(\"/\")\nclass TestClass {\n @GET\n @Path(\"text\")\n @Produces(\"text/plain\")\n String getText...
2008/09/17
[ "https://Stackoverflow.com/questions/84149", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12457/" ]
84,163
<p>Here's a challenge that I was tasked with recently. I still haven't figured out the best way to do it, maybe someone else has an idea. </p> <p>Using PHP and/or HTML, create a page that cycles through any number of other pages at a given interval.</p> <p>For instance, we would load this page and it would take us to...
[ { "answer_id": 84190, "author": "Jason Cohen", "author_id": 4926, "author_profile": "https://Stackoverflow.com/users/4926", "pm_score": 1, "selected": false, "text": "delay() location" }, { "answer_id": 84226, "author": "hasseg", "author_id": 4111, "author_profile": "...
2008/09/17
[ "https://Stackoverflow.com/questions/84163", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13399/" ]
84,164
<p>I'm working on a game (C#) that uses a <a href="http://robocode.sourceforge.net/" rel="nofollow noreferrer">Robocode-like</a> programming model: participants inherit a base Class and add strategic behaviors. The game then loads instances of participants' Classes and the competition begins. Unfortunately, participant...
[ { "answer_id": 85148, "author": "ddc0660", "author_id": 16027, "author_profile": "https://Stackoverflow.com/users/16027", "pm_score": 2, "selected": false, "text": "if(typeof(CompetitorClass).GetFields(BindingFlags.Static))\n{\n // take necessary steps against cheater!\n}\n" } ]
2008/09/17
[ "https://Stackoverflow.com/questions/84164", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7625/" ]
84,165
<p>I am attempting to provide a general solution for the migration of data from one schema version to another. A problem arises when the column data type from the source schema does not match that of the destination. I would like to create a query that will perform a preliminary compare on the columns data types to ret...
[ { "answer_id": 84469, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 2, "selected": false, "text": "syscolumns sysobjects select t1.name as tname,c1.name as cname\nfrom adventureworks.dbo.syscolumns c1\njoin adventureworks.dbo....
2008/09/17
[ "https://Stackoverflow.com/questions/84165", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7287/" ]
84,174
<p>I have been trying out <a href="http://www.codeplex.com/servicefactory" rel="nofollow noreferrer">Service Factory</a> and have run into some problems in regards to long filenames - surpassing the limit in Vista/XP. The problem is that when generating code from the models service factory prefixes everything with the ...
[ { "answer_id": 84469, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 2, "selected": false, "text": "syscolumns sysobjects select t1.name as tname,c1.name as cname\nfrom adventureworks.dbo.syscolumns c1\njoin adventureworks.dbo....
2008/09/17
[ "https://Stackoverflow.com/questions/84174", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15771/" ]
84,178
<p>I'm running in a windows environment with Trac / SVN and I want commits to the repository to integrate to Trac and close the bugs that were noted in the SVN Comment.</p> <p>I know there's some post commit hooks to do that, but there's not much information about how to do it on windows.</p> <p>Anyone done it succes...
[ { "answer_id": 84301, "author": "Benjamin W. Smith", "author_id": 1068060, "author_profile": "https://Stackoverflow.com/users/1068060", "pm_score": 0, "selected": false, "text": "C:\\Subversion\\repositories\\repo1\\hooks\\post-commit\n /usr/local/subversion/repositories/repo1/hooks/post...
2008/09/17
[ "https://Stackoverflow.com/questions/84178", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5462/" ]
84,180
<p>Conducting a user account cleanup accross Solaris and Redhat linux systems, many of which have a number of Samba shares. </p> <p>What preference do people have for creating the local unix accounts for non interactive Samba users? In particular, the shell entry:</p> <ol> <li>noshell</li> <li>nologin</li> <li>blank<...
[ { "answer_id": 84344, "author": "Alex B", "author_id": 6180, "author_profile": "https://Stackoverflow.com/users/6180", "pm_score": 2, "selected": false, "text": "passwd" } ]
2008/09/17
[ "https://Stackoverflow.com/questions/84180", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8361/" ]
84,209
<p><strong>Introduction</strong></p> <p>I've always been searching for a way to make Visual Studio draw a line after a certain amount of characters.</p> <p>Below is a guide to enable these so called <em>guidelines</em> for various versions of Visual Studio.</p> <p><strong>Visual Studio 2013 or later</strong></p> <p>Ins...
[ { "answer_id": 84325, "author": "Rory MacLeod", "author_id": 1016, "author_profile": "https://Stackoverflow.com/users/1016", "pm_score": 2, "selected": false, "text": "HKEY_CURRENT_USER\\Software\\Microsoft\\VisualStudio\\9.0\\Text Editor\n" }, { "answer_id": 84467, "author":...
2008/09/17
[ "https://Stackoverflow.com/questions/84209", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11387/" ]
84,211
<p>In a C# windows forms application. I have a splash screen with some multi-threaded processes happening in the background. What I would like to do is when I display the splash screen initially, I would like to have it appear to "fade in". And then, once all the processes finish, I would like it to appear as though th...
[ { "answer_id": 84251, "author": "Patrick Desjardins", "author_id": 13913, "author_profile": "https://Stackoverflow.com/users/13913", "pm_score": 2, "selected": false, "text": "While(this.Opacity !=0)\n{\n this.Opacity -= 0.05;\n Thread.Sleep(50);//This is for the speed of the opaci...
2008/09/17
[ "https://Stackoverflow.com/questions/84211", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4660/" ]