qid
int64
4
22.2M
question
stringlengths
18
48.3k
answers
list
date
stringlengths
10
10
metadata
list
369,994
<p>I would like to log changes made to all fields in a table to another table. This will be used to keep a history of all the changes made to that table (Your basic change log table).</p> <p>What is the best way to do it in SQL Server 2005?</p> <p>I am going to assume the logic will be placed in some Triggers.</p> <...
[ { "answer_id": 370049, "author": "NotMe", "author_id": 2424, "author_profile": "https://Stackoverflow.com/users/2424", "pm_score": 2, "selected": false, "text": "INSERT INTO mytable(description, phone)\nOUTPUT INSERTED.description, INSERTED.phone INTO #TempTable\nVALUES('blah', '12312312...
2008/12/15
[ "https://Stackoverflow.com/questions/369994", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4964/" ]
370,001
<p>The docs for <a href="http://msdn.microsoft.com/en-us/library/bb347013.aspx" rel="noreferrer">Dictionary.TryGetValue</a> say:</p> <blockquote> <p>When this method returns, [the value argument] contains the value associated with the specified key, if the key is found; otherwise, the <strong>default value for the t...
[ { "answer_id": 370006, "author": "Szymon Rozga", "author_id": 7583, "author_profile": "https://Stackoverflow.com/users/7583", "pm_score": 4, "selected": false, "text": "default(T);\n" }, { "answer_id": 370009, "author": "Nathan W", "author_id": 6335, "author_profile":...
2008/12/15
[ "https://Stackoverflow.com/questions/370001", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1343/" ]
370,004
<p>Using Java, I need to encode a Map&lt;String, String&gt; of name value pairs to store into a String, and be able to decode it again. These will be stored in a database column, and will probably usually be short and simple, so the common case should produce a simple nice looking line, but shouldn't corrupt the data...
[ { "answer_id": 370039, "author": "Dan Vinton", "author_id": 21849, "author_profile": "https://Stackoverflow.com/users/21849", "pm_score": 3, "selected": false, "text": "Map<String, String>" }, { "answer_id": 372083, "author": "alepuzio", "author_id": 45745, "author_pr...
2008/12/15
[ "https://Stackoverflow.com/questions/370004", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3093/" ]
370,013
<p>Using jQuery, how do I delete all rows in a table except the first? This is my first attempt at using index selectors. If I understand the examples correctly, the following should work:</p> <pre><code>$(some table selector).remove("tr:gt(0)"); </code></pre> <p>which I would read as "Wrap some table in a jQuery o...
[ { "answer_id": 370031, "author": "Strelok", "author_id": 2788, "author_profile": "https://Stackoverflow.com/users/2788", "pm_score": 10, "selected": true, "text": "$(document).ready(function() {\n $(\"someTableSelector\").find(\"tr:gt(0)\").remove();\n});\n" }, { "answer_id": 3...
2008/12/15
[ "https://Stackoverflow.com/questions/370013", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26671/" ]
370,024
<p>I have a SQL Server 2005 database that I'm trying to access as a limited user account, using Windows authentication. I've got BUILTIN\Users added as a database user (before I did so, I couldn't even open the database). I'm working under the assumption that everybody is supposed to have permissions for the "public"...
[ { "answer_id": 370127, "author": "Nathan Griffiths", "author_id": 46239, "author_profile": "https://Stackoverflow.com/users/46239", "pm_score": 0, "selected": false, "text": "EXEC MASTER.dbo.xp_logininfo 'Domain\\UserTest', 'all'\n" }, { "answer_id": 370498, "author": "gbn", ...
2008/12/15
[ "https://Stackoverflow.com/questions/370024", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26286/" ]
370,030
<p>I have just start using git and i can't get it to remember my passphrase I'm using cmd.exe elevated and my git host is github and i have create a ssh key like that guide on github</p> <p>but i still get </p> <pre><code>*\subnus.mvc&gt;git push origin master Enter passphrase for key '/c/Users/Subnus/.ssh/id_rsa': ...
[ { "answer_id": 3932378, "author": "hwjp", "author_id": 366221, "author_profile": "https://Stackoverflow.com/users/366221", "pm_score": 3, "selected": false, "text": "git" }, { "answer_id": 4356869, "author": "RobertB", "author_id": 388702, "author_profile": "https://S...
2008/12/15
[ "https://Stackoverflow.com/questions/370030", "https://Stackoverflow.com", "https://Stackoverflow.com/users/31296/" ]
370,047
<p>Or more generally, how do I remove an item from a colon-separated list in a Bash environment variable?</p> <p>I thought I had seen a simple way to do this years ago, using the more advanced forms of Bash variable expansion, but if so I've lost track of it. A quick search of Google turned up surprisingly few releva...
[ { "answer_id": 370056, "author": "mat", "author_id": 42083, "author_profile": "https://Stackoverflow.com/users/42083", "pm_score": 2, "selected": false, "text": "PATH=${PATH/:\\/home\\/user\\/bin/}\n" }, { "answer_id": 370135, "author": "Martin York", "author_id": 14065, ...
2008/12/15
[ "https://Stackoverflow.com/questions/370047", "https://Stackoverflow.com", "https://Stackoverflow.com/users/46387/" ]
370,055
<p>How would one change the view on the screen programmatically in an iPhone app?</p> <p>I've been able to create navigation view's and programmatically push/pop them to produce this behaviour, but if I wanted to simply change the current view (not using a UINavigation controller object), what is the neatest way to ac...
[ { "answer_id": 370148, "author": "Ben Gottlieb", "author_id": 6694, "author_profile": "https://Stackoverflow.com/users/6694", "pm_score": 2, "selected": false, "text": "-[UIView addSubview:]" }, { "answer_id": 370390, "author": "davidavr", "author_id": 8247, "author_p...
2008/12/15
[ "https://Stackoverflow.com/questions/370055", "https://Stackoverflow.com", "https://Stackoverflow.com/users/40175/" ]
370,060
<p>I'm using ASP.NET MVC and I have a partial control that needs a particular CSS &amp; JS file included. Is there a way to make the parent page render the <code>script</code> and <code>link</code> tags in the 'head' section of the page, rather than just rendering them inline in the partial contol?</p> <p>To clarify ...
[ { "answer_id": 370085, "author": "Todd Smith", "author_id": 31624, "author_profile": "https://Stackoverflow.com/users/31624", "pm_score": -1, "selected": false, "text": "<head runat=\"server>\n <asp:ContentPlaceHolder ID=\"head\" runat=\"server\" />\n</head>\n" }, { "answer_id...
2008/12/15
[ "https://Stackoverflow.com/questions/370060", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2975/" ]
370,075
<p>Is there a script to display a simple world clock (time in various places around the world) on a *nix terminal?</p> <p>I was thinking of writing a quick Python script, but I have a feeling that's gonna be more work than I think (e.g. due to config and output format) - not to mention reinventing the wheel...</p>
[ { "answer_id": 370105, "author": "Dustin", "author_id": 39975, "author_profile": "https://Stackoverflow.com/users/39975", "pm_score": 5, "selected": false, "text": "#!/bin/sh\n\nPT=`env TZ=US/Pacific date`\nCT=`env TZ=US/Central date`\nAT=`env TZ=Australia/Melbourne date`\n\necho \"Santa...
2008/12/15
[ "https://Stackoverflow.com/questions/370075", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
370,079
<p>I'm trying to write some C# code that calls a method from an unmanaged DLL. The prototype for the function in the dll is:</p> <pre><code>extern "C" __declspec(dllexport) char *foo(void); </code></pre> <p>In C#, I first used:</p> <pre><code>[DllImport(_dllLocation)] public static extern string foo(); </code></pre...
[ { "answer_id": 370093, "author": "Strelok", "author_id": 2788, "author_profile": "https://Stackoverflow.com/users/2788", "pm_score": 5, "selected": false, "text": "IntPtr ptr = foo();\nstring str = Marshal.PtrToStringAuto(ptr);\n" }, { "answer_id": 370519, "author": "JaredPar...
2008/12/15
[ "https://Stackoverflow.com/questions/370079", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5959/" ]
370,086
<p>I'm loading the XML in, and I'm able to read the XML nodes into text fields in my flash. It is also loading the URL, but the last one from the loop. It's not loading the one that I click on. I tried using <code>event.target</code>, but that is not working. I'm pretty close to figuring it out, I'm just not sure where...
[ { "answer_id": 372090, "author": "jrutter", "author_id": 28454, "author_profile": "https://Stackoverflow.com/users/28454", "pm_score": 0, "selected": false, "text": "trackNum" }, { "answer_id": 379221, "author": "Brian Hodge", "author_id": 20628, "author_profile": "ht...
2008/12/15
[ "https://Stackoverflow.com/questions/370086", "https://Stackoverflow.com", "https://Stackoverflow.com/users/28454/" ]
370,087
<p>I currently have an INSERT TRIGGER which in Oracle 10g runs a custom defined function that generates a funky alpha-numeric code that is used as part of the insert.</p> <p>I really need to make sure that the function (or even trigger) is thread safe so that if two users activate the trigger at once, the function use...
[ { "answer_id": 370107, "author": "BQ.", "author_id": 4632, "author_profile": "https://Stackoverflow.com/users/4632", "pm_score": 3, "selected": false, "text": "select sys_guid() from dual;\n" } ]
2008/12/15
[ "https://Stackoverflow.com/questions/370087", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26310/" ]
370,108
<p>I'd love to use PHP variables in my CSS files but I don't want to load up the whole Symfony stack for each file load. Any one have any best practices and/or plugins to manage their CSS files in Symfony?</p>
[ { "answer_id": 483310, "author": "deresh", "author_id": 11851, "author_profile": "https://Stackoverflow.com/users/11851", "pm_score": 4, "selected": true, "text": "<link rel=\"stylesheet\" type=\"text/css\" media=\"screen\" href=\"/css/mycss.php\" />\n" } ]
2008/12/15
[ "https://Stackoverflow.com/questions/370108", "https://Stackoverflow.com", "https://Stackoverflow.com/users/46443/" ]
370,113
<pre><code>SaveFileDialog savefileDialog1 = new SaveFileDialog(); DialogResult result = savefileDialog1.ShowDialog(); switch(result == DialogResult.OK) case true: //do something case false: MessageBox.Show("are you sure?","",MessageBoxButtons.YesNo,MessageBoxIcon.Question); </code></pre> <p>Ho...
[ { "answer_id": 370132, "author": "lubos hasko", "author_id": 275, "author_profile": "https://Stackoverflow.com/users/275", "pm_score": 1, "selected": false, "text": "SaveFileDialog" }, { "answer_id": 370235, "author": "Patrick Desjardins", "author_id": 13913, "author_...
2008/12/15
[ "https://Stackoverflow.com/questions/370113", "https://Stackoverflow.com", "https://Stackoverflow.com/users/42564/" ]
370,114
<p>How would one go about adding a submenu item to the windows explorer context menu (like for example 7-Zip does) for a Java application?</p>
[ { "answer_id": 370130, "author": "Jayden", "author_id": 44873, "author_profile": "https://Stackoverflow.com/users/44873", "pm_score": 5, "selected": true, "text": "HKEY_CLASSES_ROOT\\<file type>\\shell\\<display text>\\command\n" } ]
2008/12/15
[ "https://Stackoverflow.com/questions/370114", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14955/" ]
370,124
<p>Are there any pre-written component-like Silverlight web widgets like there are for Flash? </p> <p>Flash examples:<br> <a href="http://musicplayer.sourceforge.net/" rel="nofollow noreferrer">XSPF Web Music Player</a><br> <a href="http://wpaudioplayer.com/" rel="nofollow noreferrer">WordPress Audio Player</a><br> <...
[ { "answer_id": 370130, "author": "Jayden", "author_id": 44873, "author_profile": "https://Stackoverflow.com/users/44873", "pm_score": 5, "selected": true, "text": "HKEY_CLASSES_ROOT\\<file type>\\shell\\<display text>\\command\n" } ]
2008/12/15
[ "https://Stackoverflow.com/questions/370124", "https://Stackoverflow.com", "https://Stackoverflow.com/users/36590/" ]
370,165
<p>I am having trouble retrieving results from my datareader in visual studio 2008. I have several stored Procs in the same database. I am able to retrieve values from those that dont receive input parameters. However, when i use the executreReader() method on a stored proc with input parameters i get an empty dataread...
[ { "answer_id": 370177, "author": "Kevin Tighe", "author_id": 39461, "author_profile": "https://Stackoverflow.com/users/39461", "pm_score": 0, "selected": false, "text": "rdrFilterSearch.GetString(0);\n" }, { "answer_id": 370256, "author": "BFree", "author_id": 15861, ...
2008/12/16
[ "https://Stackoverflow.com/questions/370165", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
370,174
<p>I've got several function where I need to do a one-to-many join, using count(), group_by, and order_by. I'm using the sqlalchemy.select function to produce a query that will return me a set of id's, which I then iterate over to do an ORM select on the individual records. What I'm wondering is if there is a way to ...
[ { "answer_id": 468869, "author": "Joshua Kifer", "author_id": 45076, "author_profile": "https://Stackoverflow.com/users/45076", "pm_score": 1, "selected": true, "text": "from_statement" }, { "answer_id": 679479, "author": "Community", "author_id": -1, "author_profile"...
2008/12/16
[ "https://Stackoverflow.com/questions/370174", "https://Stackoverflow.com", "https://Stackoverflow.com/users/45076/" ]
370,183
<p>I'm trying to achieve a 50px space at the bottom of my page, below the main content area so that no matter what text size the user is at, or how much content happens to be inside the page - there is always a proceeding 50px space after the content area which will make either the container div(transparent) or body sh...
[ { "answer_id": 370197, "author": "Logan Serman", "author_id": 29595, "author_profile": "https://Stackoverflow.com/users/29595", "pm_score": 0, "selected": false, "text": "height: 50px;\nwidth: 100%;\nposition: fixed;\nbottom: 0;\n" } ]
2008/12/16
[ "https://Stackoverflow.com/questions/370183", "https://Stackoverflow.com", "https://Stackoverflow.com/users/46502/" ]
370,186
<p>This is on the Mac:</p> <p>If I have two filenames /foo/foo and /foo/FOO they may refer to the same file or the may be different files depending on the file system. How do I figure out if they are both pointing to the same file? And if they are, how do I get the correct representation of the filename?</p> <p>My pr...
[ { "answer_id": 370295, "author": "Boaz Stuller", "author_id": 1464654, "author_profile": "https://Stackoverflow.com/users/1464654", "pm_score": 3, "selected": false, "text": "FSPathMakeRef()" }, { "answer_id": 370684, "author": "TALlama", "author_id": 5657, "author_pr...
2008/12/16
[ "https://Stackoverflow.com/questions/370186", "https://Stackoverflow.com", "https://Stackoverflow.com/users/39138/" ]
370,195
<p>I know that the compiler will sometimes initialize memory with certain patterns such as <code>0xCD</code> and <code>0xDD</code>. What I want to know is <strong>when</strong> and <strong>why</strong> this happens.</p> <p><H2>When</H2></p> <p>Is this specific to the compiler used?</p> <p>Do <code>malloc/new</code>...
[ { "answer_id": 370217, "author": "Martin Beckett", "author_id": 10897, "author_profile": "https://Stackoverflow.com/users/10897", "pm_score": 3, "selected": false, "text": "malloc" }, { "answer_id": 370229, "author": "FryGuy", "author_id": 28776, "author_profile": "ht...
2008/12/16
[ "https://Stackoverflow.com/questions/370195", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22489/" ]
370,202
<p>I'm using Grails to send a large number of HTML emails. I use the SimpleTemplateEngine to create my email bodies in this fashion:</p> <pre><code>def ccIdToEmailMap = [:] def emailTemplateFile = Utilities.retrieveFile("email${File.separator}emailTemplate.gtpl") def engine = new SimpleTemplateEngine() def clientCont...
[ { "answer_id": 370727, "author": "Siegfried Puchbauer", "author_id": 46301, "author_profile": "https://Stackoverflow.com/users/46301", "pm_score": 1, "selected": false, "text": " def ccIdToEmailMap = [:]\n def emailTemplateFile = Utilities.retrieveFile(\"email${File.separator}email...
2008/12/16
[ "https://Stackoverflow.com/questions/370202", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21832/" ]
370,204
<p>Is there a way to run a specific Ant task via the keyboard? I have a rsync to dev task that I run a lot and running to the mouse to double-click is a pain.</p>
[ { "answer_id": 370609, "author": "VonC", "author_id": 6309, "author_profile": "https://Stackoverflow.com/users/6309", "pm_score": 5, "selected": true, "text": "\"Run Last Launched External Tool\"" } ]
2008/12/16
[ "https://Stackoverflow.com/questions/370204", "https://Stackoverflow.com", "https://Stackoverflow.com/users/46443/" ]
370,211
<p>I wanna stop the reading of my text input file when the word "synonyms" appears. I'm using ifstream and I don't know how to break the loop. I tried using a stringstream "synonyms" but it ended up junking my bst. I included the complete project files below in case you wanna avoid typing. </p> <p>Important part:</p>...
[ { "answer_id": 370225, "author": "SoapBox", "author_id": 36384, "author_profile": "https://Stackoverflow.com/users/36384", "pm_score": 2, "selected": false, "text": "if ( word == \"synonyms\" ) break;\n" }, { "answer_id": 370236, "author": "Johannes Schaub - litb", "autho...
2008/12/16
[ "https://Stackoverflow.com/questions/370211", "https://Stackoverflow.com", "https://Stackoverflow.com/users/45963/" ]
370,215
<p>I am trying to process an uploaded file in a Perl program, using CGI::Application. I need to get the content type of the uploaded file. From what I read, the following should work, but it doesn't for me:</p> <pre><code>my $filename = $q-&gt;param("file"); my $contenttype = $q-&gt;uploadInfo($filename)-&gt;{'Conte...
[ { "answer_id": 370342, "author": "ysth", "author_id": 17389, "author_profile": "https://Stackoverflow.com/users/17389", "pm_score": 4, "selected": true, "text": "chomp(my $mime_type = qx!file -i $uploaded!);\n$mime_type =~ s/^.*?: //;\n$mime_type =~ s/;.*//;\n" }, { "answer_id": ...
2008/12/16
[ "https://Stackoverflow.com/questions/370215", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4257/" ]
370,218
<p>I'm trying to setup a second ruby install in my home directory (a different version of ruby for testing). I've compiled ruby into <code>~/bin/</code> and everything is working until I try to install rubygems.</p> <p>I have <code>GEM_HOME</code> set to <code>~/gems</code> directory and <code>GEM_PATH</code> set to t...
[ { "answer_id": 370355, "author": "Gordon Wilson", "author_id": 23071, "author_profile": "https://Stackoverflow.com/users/23071", "pm_score": 3, "selected": true, "text": "GEM_HOME" } ]
2008/12/16
[ "https://Stackoverflow.com/questions/370218", "https://Stackoverflow.com", "https://Stackoverflow.com/users/46505/" ]
370,222
<p>How can instantiated classes <strong>access the Document class?</strong></p> <p>Even after I <strong>name the Document class</strong> using the Properties bar in Flash, attempting to access it from other classes usually fails, saying <em>"attempting to access an undefined property...</em></p> <p>One solution is al...
[ { "answer_id": 371625, "author": "Matt W", "author_id": 32396, "author_profile": "https://Stackoverflow.com/users/32396", "pm_score": 2, "selected": false, "text": "stage.getChildAt( 0 );" }, { "answer_id": 373591, "author": "aaaidan", "author_id": 26331, "author_prof...
2008/12/16
[ "https://Stackoverflow.com/questions/370222", "https://Stackoverflow.com", "https://Stackoverflow.com/users/41021/" ]
370,258
<p>I've been reading about the <a href="http://en.wikipedia.org/wiki/Open/closed_principle" rel="noreferrer">OCP principle</a> and how to use the strategy pattern to accomplish this.</p> <p>I was going to try and explain this to a couple of people, but the only example I can think of is using different validation class...
[ { "answer_id": 370270, "author": "OscarRyz", "author_id": 20654, "author_profile": "https://Stackoverflow.com/users/20654", "pm_score": 7, "selected": false, "text": " File file = getFile();\n Cipher c = CipherFactory.getCipher( file.size() );\n c.performAction();\n\n\n\n// implementatio...
2008/12/16
[ "https://Stackoverflow.com/questions/370258", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
370,259
<p>I've been working with Swing for a while now but the whole model/structure of <code>JFrame</code>s, <code>paint()</code>, <code>super</code>, etc is all murky in my mind. I need a clear explanation or link that will explain how the whole GUI system is organized.</p>
[ { "answer_id": 370284, "author": "OscarRyz", "author_id": 20654, "author_profile": "https://Stackoverflow.com/users/20654", "pm_score": 5, "selected": true, "text": "JLabel" }, { "answer_id": 371815, "author": "coobird", "author_id": 17172, "author_profile": "https://...
2008/12/16
[ "https://Stackoverflow.com/questions/370259", "https://Stackoverflow.com", "https://Stackoverflow.com/users/51518/" ]
370,265
<p>Newbie question.</p> <p>I have a NSMutableArray that holds multiple objects (objects that stores Bezier paths and related variables e.g. path colour etc.) These are properly released whenever the relevant <code>-dealloc</code> method is called. Each object is instantiated with <code>+alloc/-init</code> and added to...
[ { "answer_id": 370438, "author": "Marc Charbonneau", "author_id": 35136, "author_profile": "https://Stackoverflow.com/users/35136", "pm_score": 3, "selected": true, "text": "registerUndoWithTarget:" }, { "answer_id": 370607, "author": "Ashley Clark", "author_id": 4556, ...
2008/12/16
[ "https://Stackoverflow.com/questions/370265", "https://Stackoverflow.com", "https://Stackoverflow.com/users/41880/" ]
370,267
<p>This may seem like a stupid question, so here goes:</p> <p>Other than parsing the string of FileInfo.FullPath for the drive letter to then use DriveInfo("c") etc to see if there is enough space to write this file. Is there a way to get the drive letter from FileInfo?</p>
[ { "answer_id": 370279, "author": "Joel Martinez", "author_id": 5416, "author_profile": "https://Stackoverflow.com/users/5416", "pm_score": -1, "selected": false, "text": "FullPath.Substring(0,1);\n" }, { "answer_id": 370287, "author": "BFree", "author_id": 15861, "aut...
2008/12/16
[ "https://Stackoverflow.com/questions/370267", "https://Stackoverflow.com", "https://Stackoverflow.com/users/28717/" ]
370,268
<p>Is this</p> <pre><code>... T1 join T2 using(ID) where T2.VALUE=42 ... </code></pre> <p>the same as</p> <pre><code>... T1 join T2 on(T1.ID=T2.ID) where T2.VALUE=42 ... </code></pre> <p>for all types of joins?</p> <p>My understanding of <code>using(ID)</code> is that it's just shorthand for <code>on(T1.ID=T2.ID)<...
[ { "answer_id": 370317, "author": "Cebjyre", "author_id": 1612, "author_profile": "https://Stackoverflow.com/users/1612", "pm_score": 5, "selected": true, "text": "T1 JOIN T2 USING(id) JOIN T3 USING(id_2)\n" }, { "answer_id": 370332, "author": "Bill Karwin", "author_id": 2...
2008/12/16
[ "https://Stackoverflow.com/questions/370268", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21838/" ]
370,273
<p>I have a whole bunch of POV-RAY files from a molecular dynamics simulation with the general name "frameXX.pov" where "XX" is the number of the frame. I want to render them all but I have like 500 so I really don't wanna do it by hand. I'm sure there is a way to do this from the command line or a batch file...what w...
[ { "answer_id": 558266, "author": "stevenvh", "author_id": 66056, "author_profile": "https://Stackoverflow.com/users/66056", "pm_score": 3, "selected": true, "text": "Input_File_Name=somegreatscene.pov\n\n; these are the default values\nInitial_Clock=0.000\nFinal_CLock=1.000\n\n; usually ...
2008/12/16
[ "https://Stackoverflow.com/questions/370273", "https://Stackoverflow.com", "https://Stackoverflow.com/users/41718/" ]
370,283
<p>I noticed C++ will not compile the following:</p> <pre><code>class No_Good { static double const d = 1.0; }; </code></pre> <p>However it will happily allow a variation where the double is changed to an int, unsigned, or any integral type:</p> <pre><code>class Happy_Times { static unsigned const u = 1; }; </co...
[ { "answer_id": 370293, "author": "Mark Ransom", "author_id": 5987, "author_profile": "https://Stackoverflow.com/users/5987", "pm_score": 2, "selected": false, "text": "class Now_Better\n{\n static double const d;\n};\n" }, { "answer_id": 370311, "author": "Adam Rosenfield"...
2008/12/16
[ "https://Stackoverflow.com/questions/370283", "https://Stackoverflow.com", "https://Stackoverflow.com/users/29703/" ]
370,286
<p>The code below pretty much sums up what I want to achieve. </p> <p>We have a solution which comprises many different projects however we have a need to be able to call methods in projects from projects which are not referenced (would cause circular reference).</p> <p>I have posted previous questions and the code b...
[ { "answer_id": 370302, "author": "Andrew Kennan", "author_id": 22506, "author_profile": "https://Stackoverflow.com/users/22506", "pm_score": 1, "selected": false, "text": "public interface IThing { void Update(); }\n\npublic static class ThingRegistry {\n public static void RegisterThin...
2008/12/16
[ "https://Stackoverflow.com/questions/370286", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
370,291
<p>I'm deserializing a class called <code>Method</code> using .NET Serialization. <code>Method</code> contains a list of objects implementing <code>IAction</code>. I originally used the <a href="http://msdn.microsoft.com/en-us/library/system.xml.serialization.xmlincludeattribute.aspx" rel="nofollow noreferrer"><code>[X...
[ { "answer_id": 370395, "author": "David Norman", "author_id": 34502, "author_profile": "https://Stackoverflow.com/users/34502", "pm_score": 4, "selected": true, "text": "public XmlSerializer(\n Type type,\n Type[] extraTypes\n);\n" } ]
2008/12/16
[ "https://Stackoverflow.com/questions/370291", "https://Stackoverflow.com", "https://Stackoverflow.com/users/165305/" ]
370,292
<p>Is it worth changing my code to be "more portable" and able to deal with the horror of magic quotes, or should I just make sure that it's always off via a .htaccess file?</p> <pre><code>if (get_magic_quotes_gpc()) { $var = stripslashes($_POST['var']); } else { $var = $_POST['var']; } </code></pre> <p>Versu...
[ { "answer_id": 370339, "author": "Zan Lynx", "author_id": 13422, "author_profile": "https://Stackoverflow.com/users/13422", "pm_score": 2, "selected": false, "text": "get_magic_quotes_gpc()" } ]
2008/12/16
[ "https://Stackoverflow.com/questions/370292", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9021/" ]
370,310
<p>I have a JPanel full of JTextFields...</p> <pre><code>for (int i=0; i&lt;maxPoints; i++) { JTextField textField = new JTextField(); points.add(textField); } </code></pre> <p>How do I later get the JTextFields in that JPanel? Like if I want their values with </p> <pre><code>TextField.getText(); </code></p...
[ { "answer_id": 370341, "author": "OscarRyz", "author_id": 20654, "author_profile": "https://Stackoverflow.com/users/20654", "pm_score": 5, "selected": true, "text": "List<JTextField> list = new ArrayLists<JTextField>();\n\n// your code...\nfor (int i=0; i<maxPoints; i++) { \n JTextFie...
2008/12/16
[ "https://Stackoverflow.com/questions/370310", "https://Stackoverflow.com", "https://Stackoverflow.com/users/51518/" ]
370,322
<p>How can I remove the very first "1" from any string if that string starts with a "1"?</p> <pre><code>"1hello world" =&gt; "hello world" "112345" =&gt; "12345" </code></pre> <p>I'm thinking of doing</p> <pre><code>string.sub!('1', '') if string =~ /^1/ </code></pre> <p>but I' wondering there's a better way. Thank...
[ { "answer_id": 370331, "author": "Zach Langley", "author_id": 45230, "author_profile": "https://Stackoverflow.com/users/45230", "pm_score": 7, "selected": true, "text": "sub!" }, { "answer_id": 370334, "author": "Gordon Wilson", "author_id": 23071, "author_profile": "...
2008/12/16
[ "https://Stackoverflow.com/questions/370322", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
370,325
<p>I have a .NET DLL and application. The DLL is written in C++/CLI and it's "mixed", i.e., partially managed code and partially native. </p> <p>I have two goals:<br/> 1. Obfuscate all the managed code so it can't be disassembled<br/> 2. Obfuscate the public methods/classes of the mixed DLL so no one can use the DLL ...
[ { "answer_id": 370429, "author": "faulty", "author_id": 20007, "author_profile": "https://Stackoverflow.com/users/20007", "pm_score": -1, "selected": false, "text": "[assembly:SecurityPermission(SecurityAction::RequestMinimum, UnmanagedCode = true)];\n" } ]
2008/12/16
[ "https://Stackoverflow.com/questions/370325", "https://Stackoverflow.com", "https://Stackoverflow.com/users/24267/" ]
370,340
<p>Say I wanted to have a project, and one-to-many with to-do items, and wanted to re-order the to-do items arbitrarily? </p> <p>In the past, I've added a numbered order field, and when someone wants to change the order, had to update all the items with their new order numbers. This is probably the worst approach, si...
[ { "answer_id": 375370, "author": "Peter Rowell", "author_id": 17017, "author_profile": "https://Stackoverflow.com/users/17017", "pm_score": 4, "selected": true, "text": "{% extends 'admin/change_form.html' %}\n\n{% block form_top %}{% endblock %}\n{% block extrahead %}{{ block.super }}\n...
2008/12/16
[ "https://Stackoverflow.com/questions/370340", "https://Stackoverflow.com", "https://Stackoverflow.com/users/35922/" ]
370,353
<p>I'm refactoring some client-server code and it uses the terms Response, Result &amp; Reply for the same thing (an answer from the server). And although its not really that important it's become hard to guess which word to use while writing new code, so I'd like to unify the three terms into one and do the appropriat...
[ { "answer_id": 2602641, "author": "Carl Manaster", "author_id": 82118, "author_profile": "https://Stackoverflow.com/users/82118", "pm_score": 2, "selected": false, "text": "Response" } ]
2008/12/16
[ "https://Stackoverflow.com/questions/370353", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15124/" ]
370,357
<p>The following code works as expected in both Python 2.5 and 3.0:</p> <pre><code>a, b, c = (1, 2, 3) print(a, b, c) def test(): print(a) print(b) print(c) # (A) #c+=1 # (B) test() </code></pre> <p>However, when I uncomment line <strong>(B)</strong>, I get an <code>UnboundLocalError: 'c' not...
[ { "answer_id": 370363, "author": "recursive", "author_id": 44743, "author_profile": "https://Stackoverflow.com/users/44743", "pm_score": 9, "selected": true, "text": "c" }, { "answer_id": 370364, "author": "Mongoose", "author_id": 46523, "author_profile": "https://Sta...
2008/12/16
[ "https://Stackoverflow.com/questions/370357", "https://Stackoverflow.com", "https://Stackoverflow.com/users/46521/" ]
370,359
<p>I'm creating HTML with a loop that has a column for Action. That column is a Hyperlink that when the user clicks calls a JavaScript function and passes the parameters...</p> <p>example:</p> <pre><code>&lt;a href="#" OnClick="DoAction(1,'Jose');" &gt; Click &lt;/a&gt; &lt;a href="#" OnClick="DoAction(2,'Juan');" &g...
[ { "answer_id": 370391, "author": "tvanfosson", "author_id": 12950, "author_profile": "https://Stackoverflow.com/users/12950", "pm_score": 8, "selected": true, "text": "function DoAction( id, name )\n{\n $.ajax({\n type: \"POST\",\n url: \"someurl.php\",\n data:...
2008/12/16
[ "https://Stackoverflow.com/questions/370359", "https://Stackoverflow.com", "https://Stackoverflow.com/users/46522/" ]
370,366
<p>I noticed for a while now the following syntax in some of our code:</p> <pre><code>if( NULL == var){ //... } </code></pre> <p>or</p> <pre><code>if( 0 == var){ //... } </code></pre> <p>and similar things.</p> <p>Can someone please explain why did the person who wrote this choose this notation instead of the...
[ { "answer_id": 370370, "author": "jpoh", "author_id": 4368, "author_profile": "https://Stackoverflow.com/users/4368", "pm_score": 3, "selected": false, "text": "if (var = NULL)\n" }, { "answer_id": 370373, "author": "Robert Gamble", "author_id": 25222, "author_profile...
2008/12/16
[ "https://Stackoverflow.com/questions/370366", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14587/" ]
370,369
<p>I have a <code>JTable</code> with a custom <code>TableModel</code> called <code>DataTableModel</code>. I initialized the table with a set of column names and no data as follows:</p> <pre><code>books = new JTable(new DataTableModel(new Vector&lt;Vector&lt;String&gt;&gt;(), title2)); JScrollPane scroll1 = new JScroll...
[ { "answer_id": 370565, "author": "Daniel Hiller", "author_id": 16193, "author_profile": "https://Stackoverflow.com/users/16193", "pm_score": 2, "selected": true, "text": "TableModel" }, { "answer_id": 370700, "author": "Rastislav Komara", "author_id": 22068, "author_p...
2008/12/16
[ "https://Stackoverflow.com/questions/370369", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23249/" ]
370,379
<p>If php code like below how it's like as mysql stored procedure equivalent. If any links tutorial on advance stored procedure mysql please put.</p> <pre><code>$sql = " SELECT a,b FROM j "; $result = mysql_query($sql); if(mysql_num_rows($result) &gt; 0) { while($row = mysql_fetch_array($result)) { $sql_...
[ { "answer_id": 370423, "author": "Bill Karwin", "author_id": 20860, "author_profile": "https://Stackoverflow.com/users/20860", "pm_score": 1, "selected": false, "text": "mysqli" } ]
2008/12/16
[ "https://Stackoverflow.com/questions/370379", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
370,401
<p>been searching for a quick example of sorting a IQueryable (Using Linq To SQL) using a Aggregate value.</p> <p>I basically need to calculate a few derived values (Percentage difference between two values etc) and sort the results by this.</p> <p>i.e.</p> <p>return rows.OrderBy(Function(s) CalcValue(s.Visitors, s....
[ { "answer_id": 370409, "author": "tvanfosson", "author_id": 12950, "author_profile": "https://Stackoverflow.com/users/12950", "pm_score": 0, "selected": false, "text": "rows" }, { "answer_id": 370587, "author": "Jon Skeet", "author_id": 22656, "author_profile": "https...
2008/12/16
[ "https://Stackoverflow.com/questions/370401", "https://Stackoverflow.com", "https://Stackoverflow.com/users/30576/" ]
370,425
<p>Does anyone know of any gotachs or problems when writing multithreaded Perl applications using the Oracle DBI? Each thread would have it's own connection to Oracle.</p> <p>For the longest time I was told multithreading was not supported in Perl with Oracle.</p>
[ { "answer_id": 370653, "author": "Jonathan Leffler", "author_id": 15168, "author_profile": "https://Stackoverflow.com/users/15168", "pm_score": 3, "selected": false, "text": "$dbh" } ]
2008/12/16
[ "https://Stackoverflow.com/questions/370425", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21357/" ]
370,427
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="https://stackoverflow.com/questions/710288/where-are-the-best-explanations-of-memory-management-for-iphone">Where are the best explanations of memory management for iPhone?</a> </p> </blockquote> <p>I come from a web development background. I'm g...
[ { "answer_id": 565355, "author": "Georg Schölly", "author_id": 24587, "author_profile": "https://Stackoverflow.com/users/24587", "pm_score": 2, "selected": false, "text": "[[NSObject alloc] init]" } ]
2008/12/16
[ "https://Stackoverflow.com/questions/370427", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
370,428
<p>I am getting into strange situation regarding the RSS viewer on SharePoint</p> <p>I have two environments of SharePoint (production &amp; testing)</p> <p>I was showing a specific RSS news (ABC) on both of them , and it was working after setting the proxies and other stuff.</p> <p>Suddenly (may be due to some chan...
[ { "answer_id": 565355, "author": "Georg Schölly", "author_id": 24587, "author_profile": "https://Stackoverflow.com/users/24587", "pm_score": 2, "selected": false, "text": "[[NSObject alloc] init]" } ]
2008/12/16
[ "https://Stackoverflow.com/questions/370428", "https://Stackoverflow.com", "https://Stackoverflow.com/users/247597/" ]
370,432
<p>I have a div called NAV and inside of NAV I have an UL with 5 li which I float to the left, the li's that is but when I do that the NAV collapses. I know this because I put a border around NAV to see if it collapses and it does. Here is the example.</p> <p><a href="http://img401.imageshack.us/img401/8867/collapsed...
[ { "answer_id": 370439, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 2, "selected": false, "text": "<div style=\"clear: both\"></div> \n" }, { "answer_id": 370442, "author": "Abram Simon", "author_id": 46204, ...
2008/12/16
[ "https://Stackoverflow.com/questions/370432", "https://Stackoverflow.com", "https://Stackoverflow.com/users/36682/" ]
370,449
<p>I'm trying to add a feature to my AIR app that can listen for (configurable) global keyboard events even when the app is minimized. Ex: CTRL-ALT-SHIFT-F12 to grab a screenshot.</p> <p>I can't find any way to register a keyboard hook, and listening for keyboard events only captures them when the app has focus. Sugge...
[ { "answer_id": 381409, "author": "Robin Rodricks", "author_id": 41021, "author_profile": "https://Stackoverflow.com/users/41021", "pm_score": 1, "selected": false, "text": "stage.addEventListener(KeyboardEvent.KEY_DOWN,KeyHandler); \n\nfunction KeyHandler(e:KeyboardEvent){\n trace (\...
2008/12/16
[ "https://Stackoverflow.com/questions/370449", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
370,451
<p>In my app I have 2 divs, one with a long list of products that can be dragged into another div (shopping cart). The product div has the overflow but it breaks prototype draggable elements. The prototype hacks are very obtrusive and not compatible with all browsers.</p> <p>So I am taking a different approach, is it ...
[ { "answer_id": 370462, "author": "fasih.rana", "author_id": 46024, "author_profile": "https://Stackoverflow.com/users/46024", "pm_score": 3, "selected": true, "text": "<div style=\"width:100px;height:100px;overflow:scroll\">\n</div>\n" }, { "answer_id": 3067789, "author": "Ni...
2008/12/16
[ "https://Stackoverflow.com/questions/370451", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10258/" ]
370,454
<p>I need to include or exclude a subreport based on a condition. I'm using iReport to create JasperReports. I.e., if a subreport has values, I need to include that subreport, otherwise not. Can anyone please send a sample or tell me how to resolve this.</p>
[ { "answer_id": 388097, "author": "Jamie Love", "author_id": 27308, "author_profile": "https://Stackoverflow.com/users/27308", "pm_score": 3, "selected": false, "text": "new Boolean($F{TOTAL_STATS}.intValue() != 0)\n" } ]
2008/12/16
[ "https://Stackoverflow.com/questions/370454", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
370,499
<p>I have been trying to do a fill using the open source <a href="http://srecord.sourceforge.net/" rel="nofollow noreferrer">Srecord</a> Program. I need to do a fill that is <code>0xC2AF00</code>. It appears the program can only do fills that are a byte long (ex: <code>0xff</code>). If this is not possible with the <...
[ { "answer_id": 370777, "author": "Sparr", "author_id": 13675, "author_profile": "https://Stackoverflow.com/users/13675", "pm_score": 4, "selected": true, "text": "srec_cat -Output -Intel -generate 0x10 0x20 -repeat-data 0xC2 0xAF 0x00\n" } ]
2008/12/16
[ "https://Stackoverflow.com/questions/370499", "https://Stackoverflow.com", "https://Stackoverflow.com/users/34531/" ]
370,500
<p>Is it possible to inherit from both ViewPage and ViewPage&lt;T&gt;?? Or do I have to implement both. Currently this is what I have for ViewPage. Do i need to repeat myself and do the same for ViewPage&lt;T&gt;??</p> <pre><code> public class BaseViewPage : ViewPage { public bool LoggedIn { ...
[ { "answer_id": 370579, "author": "Todd Smith", "author_id": 31624, "author_profile": "https://Stackoverflow.com/users/31624", "pm_score": 3, "selected": true, "text": "public class BaseViewPage : ViewPage\n{\n // put your custom code here\n}\n\npublic class BaseViewPage<TModel> : Bas...
2008/12/16
[ "https://Stackoverflow.com/questions/370500", "https://Stackoverflow.com", "https://Stackoverflow.com/users/29376/" ]
370,504
<p>I'm implementing a math library in C++. The library will be compiled to a DLL so those who use it will only need the header files the classes' definitions.</p> <p>The users of my classes will be people who are new to the language. However, there are some objects that might be referenced in several parts of their pr...
[ { "answer_id": 370520, "author": "Johannes Schaub - litb", "author_id": 34509, "author_profile": "https://Stackoverflow.com/users/34509", "pm_score": 4, "selected": false, "text": "boost::shared_ptr" }, { "answer_id": 370714, "author": "MSalters", "author_id": 15416, ...
2008/12/16
[ "https://Stackoverflow.com/questions/370504", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
370,512
<p>I'm guessing the StackOverflow code has something along the lines of a UsersController that defines a function like this:</p> <pre><code>public ActionResult Profile(string id, string username, string sort) { } </code></pre> <p>From what I can tell, there's two ways to go about implementing the Profile function...
[ { "answer_id": 370562, "author": "Todd Smith", "author_id": 31624, "author_profile": "https://Stackoverflow.com/users/31624", "pm_score": 0, "selected": false, "text": "<% RenderPartial(sort + \"View\") %>\n" } ]
2008/12/16
[ "https://Stackoverflow.com/questions/370512", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1574/" ]
370,518
<p>I'm new to this SCM, but since SVN is gaining popularity I was going to give it a try.</p> <p>Things I noticed:</p> <ol> <li>SVN is only the backbone of the SCM, no front-end?</li> <li>Why is there several versions of Windows Binaries? Tigris? SlikSVN? VisualSVN?</li> <li>Do I need a Web Server like Apache in orde...
[ { "answer_id": 370528, "author": "Mick", "author_id": 12458, "author_profile": "https://Stackoverflow.com/users/12458", "pm_score": 5, "selected": true, "text": "svn Commit" }, { "answer_id": 370734, "author": "Miel", "author_id": 17336, "author_profile": "https://Sta...
2008/12/16
[ "https://Stackoverflow.com/questions/370518", "https://Stackoverflow.com", "https://Stackoverflow.com/users/30787/" ]
370,547
<p>How can I get a record id after saving it into database. Which I mean is actually something like that.</p> <p>I have Document class (which is entity tho from DataBase) and I create an instance like </p> <pre><code>Document doc = new Document() {title="Math",name="Important"}; dataContext.Documents.InsertOnSubmit(d...
[ { "answer_id": 370577, "author": "Nathan W", "author_id": 6335, "author_profile": "https://Stackoverflow.com/users/6335", "pm_score": 3, "selected": false, "text": "Document doc = new Document() {title=\"Math\",name=\"Important\"};\ndataContext.Documents.InsertOnSubmit(doc);\ndataContext...
2008/12/16
[ "https://Stackoverflow.com/questions/370547", "https://Stackoverflow.com", "https://Stackoverflow.com/users/44852/" ]
370,548
<p>I have a row of divs that must all be the same height, but I have no way of knowing what that height might be ahead of time (the content comes from an external source). I initially tried placing the divs in an enclosing div and floated them left. I then set their height to be "100%", but this had no perceptible effe...
[ { "answer_id": 370576, "author": "alex", "author_id": 31671, "author_profile": "https://Stackoverflow.com/users/31671", "pm_score": 1, "selected": false, "text": "display: table-cell" }, { "answer_id": 374237, "author": "Community", "author_id": -1, "author_profile": ...
2008/12/16
[ "https://Stackoverflow.com/questions/370548", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
370,549
<p>I have a static library *.lib created using MSVC on windows. The size of library is say 70KB. Then I have an application which links this library. But now the size of the final executable (*.exe) is 29KB, less than the library. What i want to know is :</p> <ol> <li><p>Since the library is statically linked, I was t...
[ { "answer_id": 370608, "author": "Greg Hewgill", "author_id": 893, "author_profile": "https://Stackoverflow.com/users/893", "pm_score": 4, "selected": true, "text": ".lib" } ]
2008/12/16
[ "https://Stackoverflow.com/questions/370549", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2759376/" ]
370,557
<p>In Jackrabbit I have experienced two ways to save my POJOs into repository nodes for storage in the Jackrabbit JCR: </p> <ol> <li>writing my own layer and </li> <li>using Apache Graffito </li> </ol> <p>Writing my own code has proven time consuming and labor intensive (had to write and run a lot of ugly automated t...
[ { "answer_id": 371152, "author": "Alexander Klimetschek", "author_id": 2709, "author_profile": "https://Stackoverflow.com/users/2709", "pm_score": 5, "selected": true, "text": "javax.jcr.Node" } ]
2008/12/16
[ "https://Stackoverflow.com/questions/370557", "https://Stackoverflow.com", "https://Stackoverflow.com/users/31892/" ]
370,571
<p>I am creating a pdf document using C# code in my process. I need to protect the docuemnt with some standard password like "123456" or some account number. I need to do this without any reference dlls like pdf writer.</p> <p>I am generating the PDF file using SQL Reporting services reports.</p> <p>Is there are ea...
[ { "answer_id": 370888, "author": "Darin Dimitrov", "author_id": 29407, "author_profile": "https://Stackoverflow.com/users/29407", "pm_score": 6, "selected": true, "text": "using (Stream input = new FileStream(\"test.pdf\", FileMode.Open, FileAccess.Read, FileShare.Read))\nusing (Stream o...
2008/12/16
[ "https://Stackoverflow.com/questions/370571", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22162/" ]
370,578
<p>One doubt in MSSQL. There are two tables in a databases.</p> <p>Table 1 named Property contain fields PRPT_Id(int),PRPT_Name(varchar), PRPT_Status(bit) </p> <p>Table 2 named PropertyImages contain fields PIMG_Id(int),PIMG_ImageName(varchar),PRPT_Id(int),PIMG_Status(bit)</p> <p>These two tables follow a one-to-man...
[ { "answer_id": 370589, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 2, "selected": false, "text": "SELECT PRPT_Id, COUNT(PIMG_Id) AS PRPT_ImageCount, MIN(PIMG_Id) AS PRPT_MinImage\nFROM PropertyImages\nGROUP BY PRPT_Id\n" }...
2008/12/16
[ "https://Stackoverflow.com/questions/370578", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17447/" ]
370,586
<p>Why is the following?:</p> <pre><code> const int i0 = 5; //int i1 = const_cast&lt;int&gt;(i0); // compilation error int i2 = (int)i0; // okay int i3 = 5; //const int i4 = const_cast&lt;const int&gt;(i3); // compilation error const int i5 = (const int)i3; ...
[ { "answer_id": 370591, "author": "Johannes Schaub - litb", "author_id": 34509, "author_profile": "https://Stackoverflow.com/users/34509", "pm_score": 4, "selected": false, "text": " const int i0 = 5;\n//int i1 = const_cast<int>(i0); // compilation error\n int i2 = (in...
2008/12/16
[ "https://Stackoverflow.com/questions/370586", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
370,601
<p>In a bunch o' places in my code, I have something like this: </p> <pre><code>public Class mySpecialMethod() { return MySpecialClass.class; } </code></pre> <p>which causes the warning </p> <blockquote> <p>Class is a raw type. References to generic type Class should be parameterized.</p> </blockquote> <p>B...
[ { "answer_id": 370674, "author": "Guillaume", "author_id": 23704, "author_profile": "https://Stackoverflow.com/users/23704", "pm_score": 3, "selected": false, "text": "public Class<MySpecialClass> mySpecialMethod() {\n return MySpecialClass.class;\n}\n" }, { "answer_id": 370686,...
2008/12/16
[ "https://Stackoverflow.com/questions/370601", "https://Stackoverflow.com", "https://Stackoverflow.com/users/46277/" ]
370,622
<p>I have written a simple C++ program like this:</p> <pre><code>#include &lt;iostream&gt; using namespace std; int main() { cout &lt;&lt; "Hello."; return 0; } </code></pre> <p>Now I want to debug it. So what will be the command for it so my control goes to every line?</p>
[ { "answer_id": 370627, "author": "Greg Hewgill", "author_id": 893, "author_profile": "https://Stackoverflow.com/users/893", "pm_score": 5, "selected": false, "text": "gdb" }, { "answer_id": 370642, "author": "Salvatore Dario Minonne", "author_id": 10170, "author_profi...
2008/12/16
[ "https://Stackoverflow.com/questions/370622", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
370,624
<p>I'm learning C# by writing a home library manager.</p> <p>I have a BookController that will store the books in a data structure and perform operations on them.</p> <p>Does C# have a way of saving the data in the dictionary to a local file perhaps in an XML fashion to load later, or am I going to have to write it m...
[ { "answer_id": 370676, "author": "Marc Gravell", "author_id": 23354, "author_profile": "https://Stackoverflow.com/users/23354", "pm_score": 6, "selected": true, "text": "XmlSerializer" } ]
2008/12/16
[ "https://Stackoverflow.com/questions/370624", "https://Stackoverflow.com", "https://Stackoverflow.com/users/46534/" ]
370,632
<p>Is it possible to use Mark of the Web in XML file which is parsed by a local XSL file?</p> <p>When I insert MOTW mark:</p> <pre><code>&lt;!-- saved from url=(0014)about:internet --&gt; </code></pre> <p>i get following message:<br> Access is Denied. Error Processing Resource.</p> <hr> <p>Ok, I see that I was try...
[ { "answer_id": 372540, "author": "scunliffe", "author_id": 6144, "author_profile": "https://Stackoverflow.com/users/6144", "pm_score": 0, "selected": false, "text": "<xsl:comment> saved from url=(0014)about:internet </xsl:comment>\n" } ]
2008/12/16
[ "https://Stackoverflow.com/questions/370632", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22174/" ]
370,641
<p>I have a client and server program (both in Obj-C) and I am transferring files between two devices using the programs.</p> <p>The transferring is working fine, but I would like to display to the user what transfer rate they are getting.</p> <p>So I know the total size of the file, and how much of the file has been...
[ { "answer_id": 370651, "author": "Marc Novakowski", "author_id": 27020, "author_profile": "https://Stackoverflow.com/users/27020", "pm_score": 5, "selected": true, "text": "transfer_speed = bytes_transferred / ( current_time - start_time)\n" }, { "answer_id": 372734, "author"...
2008/12/16
[ "https://Stackoverflow.com/questions/370641", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26728/" ]
370,664
<p>I have a two classes:</p> <pre><code>public class Question { public IList&lt;Answer&gt; Answers { get; set; } } public class Answer { .. } </code></pre> <p>In my Linq2Sql designer, there's two L2S objects on designer, with the correct 0&lt;->many arrow between them. Kewl.</p> <p>I'm not sure how i can retrie...
[ { "answer_id": 370671, "author": "Matt Hamilton", "author_id": 615, "author_profile": "https://Stackoverflow.com/users/615", "pm_score": 4, "selected": true, "text": "return from q in _db.Questions\n select new Question\n {\n Title = q.Title,\n Answers = q...
2008/12/16
[ "https://Stackoverflow.com/questions/370664", "https://Stackoverflow.com", "https://Stackoverflow.com/users/30674/" ]
370,667
<p>Does anyone know how to remove the extra branding on the google custom search? </p> <p>they've added a button and other things like text that says "gadgets powered by google".</p> <p>there has to be a way to pipe the CSE data into a normal form, right?</p> <p><a href="http://www.google.com/coop/cse/" rel="nofollo...
[ { "answer_id": 26536827, "author": "coddiwomplefrog", "author_id": 3005071, "author_profile": "https://Stackoverflow.com/users/3005071", "pm_score": 2, "selected": false, "text": "input.gsc-input {\n font-size: 11px; \n height: 16px !important;\n background: none !important;\n}\n" ...
2008/12/16
[ "https://Stackoverflow.com/questions/370667", "https://Stackoverflow.com", "https://Stackoverflow.com/users/42589/" ]
370,678
<p>I just have started to learn Haskell and combine reading books and tutorials with solving problems from Project Euler. I have stuck on <a href="http://projecteuler.net/index.php?section=problems&amp;id=27" rel="nofollow noreferrer">Problem 27</a> because I get "C stack overflow" error using this code: </p> <p><stro...
[ { "answer_id": 371568, "author": "Chris Conway", "author_id": 1412, "author_profile": "https://Stackoverflow.com/users/1412", "pm_score": 4, "selected": true, "text": "foldl f x (y:ys) = foldl f (f x y) ys\n" } ]
2008/12/16
[ "https://Stackoverflow.com/questions/370678", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11256/" ]
370,694
<p>I am working on some batch file. I need to read name from some text file. Let me explain it</p> <p>I have one file <code>File.txt</code>, which has entry like <code>FirstName=John</code>. Now my batch file should read text <code>John</code> from the file and I should be able store <code>John</code> in some variable...
[ { "answer_id": 370715, "author": "VonC", "author_id": 6309, "author_profile": "https://Stackoverflow.com/users/6309", "pm_score": 2, "selected": false, "text": "@echo off\nsetlocal\nfor /F \"tokens=1,2 delims==\" %%a in (File.txt) do set Title=%%b\necho %Title%\n" }, { "answer_id...
2008/12/16
[ "https://Stackoverflow.com/questions/370694", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
370,695
<p>I have a java class which fires custom java events. The structure of the code is the following:</p> <pre><code>public class AEvent extends EventObject { ... } public interface AListener extends EventListener { public void event1(AEvent event); } public class A { public synchronized void addAListener(AListe...
[ { "answer_id": 370703, "author": "Joachim Sauer", "author_id": 40342, "author_profile": "https://Stackoverflow.com/users/40342", "pm_score": 5, "selected": true, "text": "BListener" }, { "answer_id": 371331, "author": "Yoni Roit", "author_id": 34161, "author_profile":...
2008/12/16
[ "https://Stackoverflow.com/questions/370695", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21348/" ]
370,698
<p>I'm researching a bug that looks like some kind of timing issue and so I'm a bit curious about how events work in Delphi 7. What happens is we get some data sent to our application through a COM interface and it gets handled in an event raised from the COM thread. It seems like the event, which has quite a bit of co...
[ { "answer_id": 972767, "author": "Christer Fahlgren", "author_id": 87476, "author_profile": "https://Stackoverflow.com/users/87476", "pm_score": 0, "selected": false, "text": "CoInitializeEx(nil, COINIT_MULTITHREADED);" } ]
2008/12/16
[ "https://Stackoverflow.com/questions/370698", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9077/" ]
370,707
<p>I fail to understand why this code won't compile</p> <pre><code>ExecutorService executor = new ScheduledThreadPoolExecutor(threads); class DocFeeder implements Callable&lt;Boolean&gt; {....} ... List&lt;DocFeeder&gt; list = new LinkedList&lt;DocFeeder&gt;(); list.add(new DocFeeder(1)); ... executor.invokeAll(lis...
[ { "answer_id": 370721, "author": "Joachim Sauer", "author_id": 40342, "author_profile": "https://Stackoverflow.com/users/40342", "pm_score": 3, "selected": false, "text": "list" }, { "answer_id": 370742, "author": "Jon Skeet", "author_id": 22656, "author_profile": "ht...
2008/12/16
[ "https://Stackoverflow.com/questions/370707", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4038/" ]
370,716
<p>I have written jQuery code, in files <code>Main.html</code> and <code>ajax.php</code>. The <code>ajax.php</code> file returns the link of images to <code>Main.html</code>.</p> <p>Now in <code>Main.html</code>, I have Image1, Image2, Image3, etc.</p> <p>My <code>Main.html</code> file:</p> <pre><code>&lt;html&gt; ...
[ { "answer_id": 370762, "author": "kgiannakakis", "author_id": 24054, "author_profile": "https://Stackoverflow.com/users/24054", "pm_score": 0, "selected": false, "text": "<div id=\"pictureframe\"></div>\n" }, { "answer_id": 370764, "author": "Ata", "author_id": 46110, ...
2008/12/16
[ "https://Stackoverflow.com/questions/370716", "https://Stackoverflow.com", "https://Stackoverflow.com/users/44984/" ]
370,717
<p>I have a job to enter survey results (in paper form) to excel. I've never written any macro in Office :(</p> <p>Here I what I basically need:</p> <ol> <li>I have predefined columns (|A|B|...|AG|AH|)</li> <li>All surveys are grouped into groups. All surveys from same group have few (like predefined) same columns. I...
[ { "answer_id": 371143, "author": "Fionnuala", "author_id": 2548, "author_profile": "https://Stackoverflow.com/users/2548", "pm_score": 3, "selected": true, "text": "Dim LastCol As Integer\nDim CurRow As Integer\n\n\nPrivate Sub UpdateCells()\nDim Col As Variant\nDim ColumnOrder As Range\...
2008/12/16
[ "https://Stackoverflow.com/questions/370717", "https://Stackoverflow.com", "https://Stackoverflow.com/users/35425/" ]
370,718
<p>Is it possible to access a USB drive or Flash card without using the drive letter that Windows assigns it? I thought I read somewhere that the Volume GUID or something can be used but will that allow me to open it up in explorer once I identify it? The reason this is important to me is because there may not be enoug...
[ { "answer_id": 370732, "author": "Chris", "author_id": 43960, "author_profile": "https://Stackoverflow.com/users/43960", "pm_score": 2, "selected": true, "text": "MOUNTVOL C:\\USB: \\\\?\\Volume{ebc79032-5270-11d8-a724-806d6172696f}\\ \n\nOR Winkey+R (Start-Run) \\\\?\\Volume{ebc79032-5...
2008/12/16
[ "https://Stackoverflow.com/questions/370718", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
370,720
<p>I have the following construction:</p> <pre><code>typedef struct bucket { char *key; ENTRY *data; struct bucket *next; } bucket; typedef struct { size_t size; bucket **table; } hash_table; </code></pre> <p>But I have no idea how to allocate memory for that. I tried: </p> <pre><code>hash_table...
[ { "answer_id": 370726, "author": "Joachim Sauer", "author_id": 40342, "author_profile": "https://Stackoverflow.com/users/40342", "pm_score": 0, "selected": false, "text": "hash_table" }, { "answer_id": 370729, "author": "jmucchiello", "author_id": 44065, "author_profi...
2008/12/16
[ "https://Stackoverflow.com/questions/370720", "https://Stackoverflow.com", "https://Stackoverflow.com/users/43960/" ]
370,722
<p>i'm begginner in java, i have textarea and i have set only verticle scrollbar to that textarea.i'm appending data for every 1 minute to textarea,problem is when new data appends to the textarea scrollbar will move up.To see the new data,every time i have to drag the scroll bar, that is not the requirment.i want scro...
[ { "answer_id": 370726, "author": "Joachim Sauer", "author_id": 40342, "author_profile": "https://Stackoverflow.com/users/40342", "pm_score": 0, "selected": false, "text": "hash_table" }, { "answer_id": 370729, "author": "jmucchiello", "author_id": 44065, "author_profi...
2008/12/16
[ "https://Stackoverflow.com/questions/370722", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
370,754
<p>In a C# Windows.Forms project I have a control that does not supply the KeyPressed event (It’s a COM control – ESRI map). </p> <p>It only supplies the KeyUp and KeyDown events, containing the <a href="http://msdn.microsoft.com/en-us/library/system.windows.forms.keyeventargs.aspx" rel="noreferrer">KeyEventArgs</a> s...
[ { "answer_id": 375047, "author": "Itai Bar-Haim", "author_id": 47104, "author_profile": "https://Stackoverflow.com/users/47104", "pm_score": 5, "selected": true, "text": " public class KeyboardHelper\n {\n [DllImport(\"user32.dll\", CharSet = CharSet.Unicode, ExactSpelling = t...
2008/12/16
[ "https://Stackoverflow.com/questions/370754", "https://Stackoverflow.com", "https://Stackoverflow.com/users/38265/" ]
370,768
<p>Requirements:</p> <ul> <li>Must be able to use C strings as well as C++ strings</li> <li>Fast</li> <li>No maps</li> <li>No templates</li> <li>No direct lookup, i.e. index might be out of bounds.</li> <li>Index is not consecutive</li> <li>Enums and strings contained in one header file</li> <li>Only instantiate what ...
[ { "answer_id": 370805, "author": "Patrick", "author_id": 38892, "author_profile": "https://Stackoverflow.com/users/38892", "pm_score": 0, "selected": false, "text": "struct map {\nconst char *mapping[] = { \"Running\", \"Jumping\", \"Singing\" };\nconst int count = 3;\n}\n" }, { ...
2008/12/16
[ "https://Stackoverflow.com/questions/370768", "https://Stackoverflow.com", "https://Stackoverflow.com/users/46583/" ]
370,783
<p>My master page has a contentplaceholder in the head tag.</p> <p>Because I want my page's title to represent the function of the current page and because I want the title to be translated in the user's language I have added a title tag in the page's head's contentplaceholder. All jolly and good except that now there...
[ { "answer_id": 370827, "author": "Zhaph - Ben Duguid", "author_id": 33051, "author_profile": "https://Stackoverflow.com/users/33051", "pm_score": 3, "selected": false, "text": "<title><%= Html.Encode(ViewData[\"Title\"]) %></title>\n" }, { "answer_id": 611555, "author": "Hele...
2008/12/16
[ "https://Stackoverflow.com/questions/370783", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11333/" ]
370,796
<p>How to use crystal Reports with ASP.Net 2.0. Any Samples/Tutorials/Examples which shows how to deploy Crystal Reports on a production Server.</p>
[ { "answer_id": 945720, "author": "SchwartzE", "author_id": 94382, "author_profile": "https://Stackoverflow.com/users/94382", "pm_score": 0, "selected": false, "text": "'Generate the Report\nDim oRpt As New ReportDocument\nDim reportPath As String = Server.MapPath(\"crtTAL.rpt\")\noRpt.Lo...
2008/12/16
[ "https://Stackoverflow.com/questions/370796", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
370,801
<p>When reading data from the Input file I noticed that the ¥ symbom was not being read by the StreamReader. Mozilla Firefox showed the input file type as Western (ISO-8859-1).</p> <p>After playing around with the encoding parameters I found it worked successfully for the following values:</p> <pre><code>System.Text....
[ { "answer_id": 370811, "author": "Jon Skeet", "author_id": 22656, "author_profile": "https://Stackoverflow.com/users/22656", "pm_score": 3, "selected": true, "text": "Encoding.GetEncoding(28591)" } ]
2008/12/16
[ "https://Stackoverflow.com/questions/370801", "https://Stackoverflow.com", "https://Stackoverflow.com/users/41766/" ]
370,814
<p>I'm getting a NullPointerException in a Class from a 3rd party library. Now I'd like to debug the whole thing and I would need to know from which object the class is held. But it seems to me that I cannot set a breakpoint in a Class from a 3rd party. </p> <p>Does anyone know a way out of my trouble? Of course I'm u...
[ { "answer_id": 370819, "author": "Joachim Sauer", "author_id": 40342, "author_profile": "https://Stackoverflow.com/users/40342", "pm_score": 6, "selected": false, "text": "Toggle Method Breakpoint" }, { "answer_id": 372620, "author": "Jared", "author_id": 44757, "auth...
2008/12/16
[ "https://Stackoverflow.com/questions/370814", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15108/" ]
370,817
<p>I've thrown myself headfirst into C# and .Net 2.0 using Linq, and I'm having a few problems debugging some of the problems, namely the following:</p> <p>I have a ComboBox control (<code>cmbObjects</code>) I want to populate with a set of objects retrieved using Linq. I've written a helper method to populate a <code...
[ { "answer_id": 374133, "author": "Klemen Slavič", "author_id": 46588, "author_profile": "https://Stackoverflow.com/users/46588", "pm_score": 1, "selected": true, "text": "DataSource" } ]
2008/12/16
[ "https://Stackoverflow.com/questions/370817", "https://Stackoverflow.com", "https://Stackoverflow.com/users/46588/" ]
370,818
<p>I want to build an SQL string to do database manipulation (updates, deletes, inserts, selects, that sort of thing) - instead of the awful string concat method using millions of "+"'s and quotes which is unreadable at best - there must be a better way. </p> <p>I did think of using MessageFormat - but its supposed t...
[ { "answer_id": 370891, "author": "Piotr Kochański", "author_id": 34102, "author_profile": "https://Stackoverflow.com/users/34102", "pm_score": 7, "selected": true, "text": "PreparedStatement stm = c.prepareStatement(\"UPDATE user_table SET name=? WHERE id=?\");\nstm.setString(1, \"the na...
2008/12/16
[ "https://Stackoverflow.com/questions/370818", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5175/" ]
370,820
<p>I have a CheckedListBox, and I want to automatically tick one of the items in it.</p> <p>The <code>CheckedItems</code> collection doesn't allow you to add things to it.</p> <p>Any suggestions?</p>
[ { "answer_id": 370828, "author": "Jon Skeet", "author_id": 22656, "author_profile": "https://Stackoverflow.com/users/22656", "pm_score": 7, "selected": true, "text": "SetItemChecked" }, { "answer_id": 11567074, "author": "B. Clay Shannon-B. Crow Raven", "author_id": 87531...
2008/12/16
[ "https://Stackoverflow.com/questions/370820", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26874/" ]
370,831
<p>I have an SVN repository and I need the commits to fail if no description is entered. Is this possible to do, preferably server-side? (The users use several different tools for interacting with the repository; although if this were possible client-side in TortoiseSVN, that would alleviate the problem)</p> <p>Google...
[ { "answer_id": 370842, "author": "Jon Skeet", "author_id": 22656, "author_profile": "https://Stackoverflow.com/users/22656", "pm_score": 4, "selected": true, "text": "pre-commit.tmpl" } ]
2008/12/16
[ "https://Stackoverflow.com/questions/370831", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19746/" ]
370,839
<p>I'm using Linq To Sql to fill up a listbox with Segment objects, where Segment is designer created/ORM generated class.</p> <pre><code>&lt;Window x:Class="ICTemplates.Window1" ... xmlns:local="clr-namespace:ICTemplates" Title="Window1" Height="300" Width="300"&gt; &lt;Window.Resources&gt; &lt;...
[ { "answer_id": 372014, "author": "Gishu", "author_id": 1695, "author_profile": "https://Stackoverflow.com/users/1695", "pm_score": 6, "selected": true, "text": "<DataTemplate DataType=\"x:Type local:Segment\"> <!-- doesn't work -->\n" } ]
2008/12/16
[ "https://Stackoverflow.com/questions/370839", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1695/" ]
370,840
<p>Silly question, but I'm unable to figure out..</p> <p>I tried the following in Ruby:</p> <pre><code>irb(main):020:0&gt; JSON.load('[1,2,3]').class =&gt; Array </code></pre> <p>This seems to work. While neither</p> <pre><code>JSON.load('1').class </code></pre> <p>nor this </p> <pre><code>JSON.load('{1}').class ...
[ { "answer_id": 370853, "author": "a2800276", "author_id": 27408, "author_profile": "https://Stackoverflow.com/users/27408", "pm_score": 2, "selected": false, "text": ">> JSON.parse(1.to_json)\nJSON::ParserError: A JSON text must at least contain two octets!\n from /opt/local/lib/ruby...
2008/12/16
[ "https://Stackoverflow.com/questions/370840", "https://Stackoverflow.com", "https://Stackoverflow.com/users/44232/" ]
370,850
<p>I have a PHP file, Test.php, and it has two functions:</p> <pre><code>&lt;?php echo displayInfo(); echo displayDetails(); ?&gt; </code></pre> <p>JavaScript:</p> <pre><code>&lt;html&gt; ... &lt;script type="text/javascript"&gt; $.ajax({ type:'POST', url: 'display.ph...
[ { "answer_id": 370882, "author": "Klemen Slavič", "author_id": 46588, "author_profile": "https://Stackoverflow.com/users/46588", "pm_score": 4, "selected": true, "text": "a" }, { "answer_id": 372882, "author": "gradbot", "author_id": 17919, "author_profile": "https://...
2008/12/16
[ "https://Stackoverflow.com/questions/370850", "https://Stackoverflow.com", "https://Stackoverflow.com/users/44984/" ]
370,852
<p>Anytime I have to handle dates/times in java it makes me sad </p> <p>I'm trying to parse a string and turn it into a date object to insert in a preparepared statement. I've been trying to get this working but am having no luck. I also get the helpful error message when I go to compile the class.</p> <p>"Exception ...
[ { "answer_id": 1336222, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 1, "selected": false, "text": "import java.sql.Date;\nimport java.sql.Time;\n\n statement.setDate(4, Date.valueOf(\"2009-08-26\"));\n statement.setTime(5, T...
2008/12/16
[ "https://Stackoverflow.com/questions/370852", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
370,859
<p>The question is in the title, why :</p> <pre><code>return double.IsNaN(0.6d) &amp;&amp; double.IsNaN(x); </code></pre> <p>Instead of</p> <pre><code>return (0.6d).IsNaN &amp;&amp; x.IsNaN; </code></pre> <p>I ask because when implementing custom structs that have a special value with the same meaning as NaN I tend...
[ { "answer_id": 370873, "author": "Marc Gravell", "author_id": 23354, "author_profile": "https://Stackoverflow.com/users/23354", "pm_score": 4, "selected": true, "text": "static bool IsNaN(this double value)\n{\n return double.IsNaN(value);\n}\n\nstatic void Main()\n{\n double x = 1...
2008/12/16
[ "https://Stackoverflow.com/questions/370859", "https://Stackoverflow.com", "https://Stackoverflow.com/users/46594/" ]