qid
int64
4
22.2M
question
stringlengths
18
48.3k
answers
list
date
stringlengths
10
10
metadata
list
330,622
<p>In C# language when you refer to an array element you can write:</p> <p>myclass.my_array['element_name'] = new Point(1,1);</p> <p>I think about refering to a element with name element_name by using dot in place of backets:</p> <p>myclass.my_array.element_name = new Point(1,1);</p> <p>Do you know any language whe...
[ { "answer_id": 330640, "author": "Jon Skeet", "author_id": 22656, "author_profile": "https://Stackoverflow.com/users/22656", "pm_score": 3, "selected": true, "text": "XElement author = doc.Root.Posts.Author;\n" } ]
2008/12/01
[ "https://Stackoverflow.com/questions/330622", "https://Stackoverflow.com", "https://Stackoverflow.com/users/38940/" ]
330,625
<p>We have implemented a popup window as a modal dialog using the IE method:</p> <pre><code>window.showModalDialog('...aspx') </code></pre> <p>The target of the popup window is itself an ASP.Net web page.</p> <p>Assume for the following steps that the popup has never been launched:</p> <ol> <li>Launch popup.</li> <...
[ { "answer_id": 333451, "author": "Andy McCluggage", "author_id": 3362, "author_profile": "https://Stackoverflow.com/users/3362", "pm_score": 2, "selected": false, "text": "url = \"<Some url with query string>\"\nvar date = new Date();\nwindow.showModalDialog(url + “&” + date.getTime(), ....
2008/12/01
[ "https://Stackoverflow.com/questions/330625", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3362/" ]
330,630
<p>I have written a database application using a binary file as storage. it is accessed via powershell cmdlets.</p> <p>You can put information into the database using the put- and you can read information using get-.</p> <p>The problem is synchronisation. What is the best way to ensure that the cmdlets don't access t...
[ { "answer_id": 333451, "author": "Andy McCluggage", "author_id": 3362, "author_profile": "https://Stackoverflow.com/users/3362", "pm_score": 2, "selected": false, "text": "url = \"<Some url with query string>\"\nvar date = new Date();\nwindow.showModalDialog(url + “&” + date.getTime(), ....
2008/12/01
[ "https://Stackoverflow.com/questions/330630", "https://Stackoverflow.com", "https://Stackoverflow.com/users/42109/" ]
330,649
<p>I have followed the suggestion in this question...</p> <p>[<a href="https://stackoverflow.com/questions/220020/how-to-handle-checkboxes-in-aspnet-mvc-forms][1]">How to handle checkboxes in ASP.NET MVC forms?</a></p> <p>...to setup multiple checkboxes with the same name="..." attribute and the form behaves as expec...
[ { "answer_id": 330682, "author": "leppie", "author_id": 15541, "author_profile": "https://Stackoverflow.com/users/15541", "pm_score": 2, "selected": true, "text": " // please MS, stop screwing around!!!!!!!!!!!!!!!\n string r = Request.Form[\"r\"];\n" }, { "answer_id": 330771, ...
2008/12/01
[ "https://Stackoverflow.com/questions/330649", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23208/" ]
330,662
<p>I am downloading a text string from a web service into an RBuf8 using this kind of code (it works..)</p> <pre><code>void CMyApp::BodyReceivedL( const TDesC8&amp; data ) { int newLength = iTextBuffer.Length() + data.Length(); if (iTextBuffer.MaxLength() &lt; newLength) { iTextBuffer.ReAll...
[ { "answer_id": 330718, "author": "adam", "author_id": 33604, "author_profile": "https://Stackoverflow.com/users/33604", "pm_score": 0, "selected": false, "text": "void CMyApp::DownloadCompleteL() {\n {\n RBuf16 buf;\n buf.CreateL(iTextBuffer.Length());\n buf.Copy(...
2008/12/01
[ "https://Stackoverflow.com/questions/330662", "https://Stackoverflow.com", "https://Stackoverflow.com/users/33604/" ]
330,666
<p>What does ::Base part mean in Person &lt; ActiveRecord::Base class declaration? I'm new to ruby and from what I've gathered so far, Person &lt; ActiveRecord should be used. Thank you.</p>
[ { "answer_id": 330712, "author": "Dan Vinton", "author_id": 21849, "author_profile": "https://Stackoverflow.com/users/21849", "pm_score": 3, "selected": false, "text": "::" }, { "answer_id": 39137919, "author": "Sarvnashak", "author_id": 3354384, "author_profile": "ht...
2008/12/01
[ "https://Stackoverflow.com/questions/330666", "https://Stackoverflow.com", "https://Stackoverflow.com/users/430254/" ]
330,685
<p>I want to make a schedule for many pastors. The conditions are:</p> <ol> <li>Every month, each pastor must must go to another church, </li> <li>The pastor must not go to same church where he came</li> <li>In 1 year he must go to 12 different churches</li> <li>There is 13 churches and 13 pastors and every church acc...
[ { "answer_id": 330894, "author": "Nick Johnson", "author_id": 12030, "author_profile": "https://Stackoverflow.com/users/12030", "pm_score": 1, "selected": false, "text": "def knuth_shuffle(l):\n for i in range(len(l)):\n j = random.randint(i, len(l))\n l[i], l[j] = l[j],...
2008/12/01
[ "https://Stackoverflow.com/questions/330685", "https://Stackoverflow.com", "https://Stackoverflow.com/users/41780/" ]
330,688
<p>I'm using the following query, but I currently have to enter a value in every parameter for the query to work. Is there a way of making the parameters optional, so that 1 or more values will return a result?</p> <pre><code>SELECT * FROM film WHERE day LIKE '%day%' AND month LIKE '%month%' AND year LIKE '%year%' </c...
[ { "answer_id": 330703, "author": "adam", "author_id": 33604, "author_profile": "https://Stackoverflow.com/users/33604", "pm_score": 0, "selected": false, "text": "SELECT * FROM film\nWHERE day LIKE '%day%'\nOR month LIKE '%month%'\nOR year LIKE '%year%'\n" }, { "answer_id": 33078...
2008/12/01
[ "https://Stackoverflow.com/questions/330688", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
330,707
<p>I'm using an SqlCommand object to insert a record into a table with an autogenerated primary key. How can I write the command text so that I get the newly created ID when I use the ExecuteScalar() method?</p>
[ { "answer_id": 330721, "author": "JoshBerke", "author_id": 26160, "author_profile": "https://Stackoverflow.com/users/26160", "pm_score": 4, "selected": false, "text": "insert into Yourtable() \nvalues() \nSELECT SCOPE_IDENTITY()\n" }, { "answer_id": 330723, "author": "Treb"...
2008/12/01
[ "https://Stackoverflow.com/questions/330707", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16440/" ]
330,709
<p>I just had some basic php questions to further my understanding as I learn, that I could not find easy answers to</p> <ol> <li><p>I have a php ajax application that generates a table of mysql rows. I would like to know if there is a way to get php to generate neat html, as it seems neat enough as I echo it out, but...
[ { "answer_id": 330729, "author": "adam", "author_id": 33604, "author_profile": "https://Stackoverflow.com/users/33604", "pm_score": 0, "selected": false, "text": "select * from table limit 10, 10;" }, { "answer_id": 330745, "author": "nickf", "author_id": 9021, "autho...
2008/12/01
[ "https://Stackoverflow.com/questions/330709", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1246613/" ]
330,725
<p>I had created the xml document with xml version="1.0".</p> <p>In that document I need to use the greater than symbol <code>&gt;</code> and less than symbol <code>&lt;</code>.</p> <p>How should I include those symbols? It's not working.</p> <p><code>&amp;gt;</code> and <code>&amp;lt;</code> are not working for me....
[ { "answer_id": 330734, "author": "tonys", "author_id": 35439, "author_profile": "https://Stackoverflow.com/users/35439", "pm_score": 4, "selected": false, "text": "&gt;" }, { "answer_id": 330736, "author": "Greg", "author_id": 24181, "author_profile": "https://Stackov...
2008/12/01
[ "https://Stackoverflow.com/questions/330725", "https://Stackoverflow.com", "https://Stackoverflow.com/users/38172/" ]
330,737
<p>I am using the jQuery Datepicker widget with two input boxes, one for the <strong>"From"</strong> date and the second with the <strong>"To"</strong> date. I am using the <a href="http://jqueryui.com/datepicker/" rel="noreferrer">jQuery Datepicker functional demo</a> as a basis for getting the two input boxes to work...
[ { "answer_id": 330859, "author": "kgiannakakis", "author_id": 24054, "author_profile": "https://Stackoverflow.com/users/24054", "pm_score": 2, "selected": false, "text": "datepicker( \"option\", settings )" }, { "answer_id": 331026, "author": "Ben Koehler", "author_id": 1...
2008/12/01
[ "https://Stackoverflow.com/questions/330737", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1831/" ]
330,750
<p>I wish to display a list of letters from a through z on a form. Each letter needs to be clickable with that value being passed as a click argument. Aside from creating 26 letters and using the click event of each letter does anyone know of a quick way to do this? I know how to load dynamic controls etc and how to do...
[ { "answer_id": 330811, "author": "Stefan", "author_id": 19307, "author_profile": "https://Stackoverflow.com/users/19307", "pm_score": 1, "selected": false, "text": "Public Class Form1\n\n Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase...
2008/12/01
[ "https://Stackoverflow.com/questions/330750", "https://Stackoverflow.com", "https://Stackoverflow.com/users/35441/" ]
330,752
<p>I have a COM <code>.dll</code> registered successfully with <code>regsvr32</code> but somehow <code>CoCreateInstance()</code> fails to create one of its interfaces. Is there a freeware tool which can determine the reason for the failure?</p>
[ { "answer_id": 357156, "author": "Jason S", "author_id": 44330, "author_profile": "https://Stackoverflow.com/users/44330", "pm_score": 0, "selected": false, "text": "COM_INTERFACE_ENTRY(I____)" } ]
2008/12/01
[ "https://Stackoverflow.com/questions/330752", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
330,757
<p>I tried to write a <code>TransformMesh</code> function. The function accepts a <code>Mesh</code> object and a <code>Matrix</code> object. The idea is to transform the mesh using the matrix. To do this, I locked the vertex buffer, and called Vector3::TransformCoordinate on each vertex. It did <em>not</em> produce exp...
[ { "answer_id": 784888, "author": "avp", "author_id": 20514, "author_profile": "https://Stackoverflow.com/users/20514", "pm_score": 2, "selected": true, "text": " // Clear the backbuffer to a Blue color.\n device.Clear(ClearFlags.Target | ClearFlags.ZBuffer, Color.Blue, \n 1.0...
2008/12/01
[ "https://Stackoverflow.com/questions/330757", "https://Stackoverflow.com", "https://Stackoverflow.com/users/45603/" ]
330,793
<p>I want to initialize a struct element, split in declaration and initialization. This is what I have:</p> <pre><code>typedef struct MY_TYPE { bool flag; short int value; double stuff; } MY_TYPE; void function(void) { MY_TYPE a; ... a = { true, 15, 0.123 } } </code></pre> <p>Is this the way to declare a...
[ { "answer_id": 330802, "author": "robert", "author_id": 32805, "author_profile": "https://Stackoverflow.com/users/32805", "pm_score": 2, "selected": false, "text": "void function(void) {\n MY_TYPE a;\n a.flag = true;\n a.value = 15;\n a.stuff = 0.123;\n}\n" }, { "answer_id": ...
2008/12/01
[ "https://Stackoverflow.com/questions/330793", "https://Stackoverflow.com", "https://Stackoverflow.com/users/834/" ]
330,832
<p>How do I call the correct overloaded function given a reference to an object based on the actual type of the object. For example...</p> <pre><code>class Test { object o1 = new object(); object o2 = new string("ABCD"); MyToString(o1); MyToString(o2);//I want this to call the second overloaded functio...
[ { "answer_id": 330833, "author": "Sandeep Datta", "author_id": 39648, "author_profile": "https://Stackoverflow.com/users/39648", "pm_score": 3, "selected": true, "text": "var methInfo = typeof(Test).GetMethod(\"MyToString\", new Type[] {o.GetType()});\nmethInfo.Invoke(this, new object[] ...
2008/12/01
[ "https://Stackoverflow.com/questions/330832", "https://Stackoverflow.com", "https://Stackoverflow.com/users/39648/" ]
330,836
<p>How do I uninstall a Windows Service when there is no executable for it left on the system? I can not run <code>installutil -u</code> since there is not executable left on the system. I can still see an entry for the service in the Services console. </p> <p>The reason for this state is probably because of a problem...
[ { "answer_id": 330852, "author": "Fredou", "author_id": 40868, "author_profile": "https://Stackoverflow.com/users/40868", "pm_score": 4, "selected": false, "text": " Deleting services in Windows Server 2003\n\n We can use sc.exe in the Windows Server 2003 to control services, create se...
2008/12/01
[ "https://Stackoverflow.com/questions/330836", "https://Stackoverflow.com", "https://Stackoverflow.com/users/966/" ]
330,853
<p>I have the following requirements:</p> <p>I need a api that works on CE (x86) + .NET Compact Framework to play videos (Similar to CorePlayer API... Just free)?</p> <p>Is their anything else available or must I use CorePlayer?</p>
[ { "answer_id": 330915, "author": "atzz", "author_id": 23252, "author_profile": "https://Stackoverflow.com/users/23252", "pm_score": 0, "selected": false, "text": "IGraphBuilder" } ]
2008/12/01
[ "https://Stackoverflow.com/questions/330853", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5147/" ]
330,878
<p>Consider the following code and its output:</p> <h3>Code</h3> <pre><code>#!/usr/bin/perl -w use strict; use Data::Dumper; my $HOURS_PER_DAY = 24.0 * 1.0; my $BSA = 1.7 * 1.0; my $MCG_PER_MG = 1000.0 * 1.0; my $HOURS_DURATION = 20.0 * $HOURS_PER_DAY; my $dummy = $HOURS_PER_DAY * $BSA * $MCG_PER_MG * $HOURS_DURAT...
[ { "answer_id": 330885, "author": "Robert Gamble", "author_id": 25222, "author_profile": "https://Stackoverflow.com/users/25222", "pm_score": 3, "selected": false, "text": "...\nelsif ($val =~ /^(?:0|-?[1-9]\\d{0,8})\\z/) { # safe decimal number\n $out .= $val;\n}\nelse { #...
2008/12/01
[ "https://Stackoverflow.com/questions/330878", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17523/" ]
330,900
<p>If I want to split a list of words separated by a delimiter character, I can use</p> <pre><code>&gt;&gt;&gt; 'abc,foo,bar'.split(',') ['abc', 'foo', 'bar'] </code></pre> <p>But how to easily and quickly do the same thing if I also want to handle quoted-strings which can contain the delimiter character ?</p> <pre>...
[ { "answer_id": 330924, "author": "Tomalak", "author_id": 18771, "author_profile": "https://Stackoverflow.com/users/18771", "pm_score": 6, "selected": true, "text": "import csv\n\ninput = ['abc,\"a string, with a comma\",\"another, one\"']\nparser = csv.reader(input)\n\nfor fields in pars...
2008/12/01
[ "https://Stackoverflow.com/questions/330900", "https://Stackoverflow.com", "https://Stackoverflow.com/users/42127/" ]
330,918
<p>Does hibernate HQL queries support using select min, max, count and other sql functions?</p> <p>like:</p> <p><code>select min(p.age) from person p</code></p> <p>Thanks</p>
[ { "answer_id": 330930, "author": "Galwegian", "author_id": 3201, "author_profile": "https://Stackoverflow.com/users/3201", "pm_score": 5, "selected": true, "text": "min()" }, { "answer_id": 3155549, "author": "Saher Ahwal", "author_id": 367319, "author_profile": "http...
2008/12/01
[ "https://Stackoverflow.com/questions/330918", "https://Stackoverflow.com", "https://Stackoverflow.com/users/37650/" ]
330,922
<p>I have seen <a href="https://stackoverflow.com/questions/295579/fastest-way-to-determine-if-an-integers-square-root-is-an-integer">this topic here</a> about John Carmack's magical way to calculate square root, which refers to this article: <a href="http://www.codemaestro.com/reviews/9" rel="nofollow noreferrer">http...
[ { "answer_id": 331037, "author": "VonC", "author_id": 6309, "author_profile": "https://Stackoverflow.com/users/6309", "pm_score": 3, "selected": false, "text": "public class Example {\n public static void main(String[] args) {\n System.out.println(\n MCMLXXVII + XXIV...
2008/12/01
[ "https://Stackoverflow.com/questions/330922", "https://Stackoverflow.com", "https://Stackoverflow.com/users/33857/" ]
330,927
<p>I'm learning DI, and made my first project recently.</p> <p>In this project I've implement the repository pattern. I have the interfaces and the concrete implementations. I wonder if is possible to build the implementation of my interfaces as "plugins", dlls that my program will load dynamically.</p> <p>So the pro...
[ { "answer_id": 330932, "author": "Grzenio", "author_id": 5363, "author_profile": "https://Stackoverflow.com/users/5363", "pm_score": 2, "selected": false, "text": "ass = Assembly.Load(name);\n" }, { "answer_id": 330934, "author": "Patrick Desjardins", "author_id": 13913, ...
2008/12/01
[ "https://Stackoverflow.com/questions/330927", "https://Stackoverflow.com", "https://Stackoverflow.com/users/32415/" ]
330,937
<p>I am using in the first part of my program</p> <p><code>On Error GoTo start</code></p> <p>Suppose in my second part I am again using</p> <p><code>On Error Resume Next</code></p> <p>This second error trap will not get activated as the first one will still be active. Is there any way to de-activate the first error han...
[ { "answer_id": 330947, "author": "Dirk Vollmar", "author_id": 40347, "author_profile": "https://Stackoverflow.com/users/40347", "pm_score": 1, "selected": false, "text": "On Error Goto 0\n" }, { "answer_id": 331054, "author": "Jason Z", "author_id": 2470, "author_prof...
2008/12/01
[ "https://Stackoverflow.com/questions/330937", "https://Stackoverflow.com", "https://Stackoverflow.com/users/31132/" ]
330,951
<p>Is there a simple way to remove a leading zero (as in 01 becoming 1)?</p>
[ { "answer_id": 330962, "author": "Tomalak", "author_id": 18771, "author_profile": "https://Stackoverflow.com/users/18771", "pm_score": 3, "selected": false, "text": "$str = \"01\";\necho intval($str);\n" }, { "answer_id": 330969, "author": "J.D. Fitz.Gerald", "author_id":...
2008/12/01
[ "https://Stackoverflow.com/questions/330951", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
330,971
<p>I have create a form class for editing deleting and add users to a database. If I want to edit a user how can I simply supply the information of the user to the form.</p> <p>I use a Zend_Db_Table to get the data from the database.</p> <p>This is the userForm class:</p> <pre><code>class UsersForm extends Zend_Form...
[ { "answer_id": 331591, "author": "markus", "author_id": 11995, "author_profile": "https://Stackoverflow.com/users/11995", "pm_score": 3, "selected": true, "text": "$form->populate($data);\n" } ]
2008/12/01
[ "https://Stackoverflow.com/questions/330971", "https://Stackoverflow.com", "https://Stackoverflow.com/users/42111/" ]
330,978
<p>Something I do often if I'm storing a bunch of string values and I want to be able to find them in O(1) time later is:</p> <pre><code>foreach (String value in someStringCollection) { someDictionary.Add(value, String.Empty); } </code></pre> <p>This way, I can comfortably perform <strong>constant-time</strong> l...
[ { "answer_id": 331014, "author": "user7116", "author_id": 7116, "author_profile": "https://Stackoverflow.com/users/7116", "pm_score": 4, "selected": true, "text": "HashSet<string> stringSet = new HashSet<string>(someStringCollection);\n\nif (stringSet.Contains(someString))\n{\n ...\n}...
2008/12/01
[ "https://Stackoverflow.com/questions/330978", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2273/" ]
330,993
<p>I'm new to ruby and started to create my *nd toy app. I:</p> <ol> <li>Created controller 'questions'</li> <li>Created model 'question'</li> <li>Created controller action 'new'</li> <li>Added 'New.html.erb' file</li> </ol> <p>in erb file I use <code>form_for</code> helper and and <code>new</code> controller action ...
[ { "answer_id": 331085, "author": "Michael Sepcot", "author_id": 6033, "author_profile": "https://Stackoverflow.com/users/6033", "pm_score": 4, "selected": true, "text": "config/routes.rb" }, { "answer_id": 331108, "author": "mwilliams", "author_id": 23909, "author_pro...
2008/12/01
[ "https://Stackoverflow.com/questions/330993", "https://Stackoverflow.com", "https://Stackoverflow.com/users/430254/" ]
331,000
<p>A couple of years ago, we had a graphic designer revamp our website. His results looked great, but he unfortunately introduced a new unsupported font by the web browser. </p> <p>At first I was like, "What!?!"... since most of our content is dynamic and there was no real way to pre-make all of the images. There was ...
[ { "answer_id": 331099, "author": "Jack Ryan", "author_id": 28882, "author_profile": "https://Stackoverflow.com/users/28882", "pm_score": 2, "selected": false, "text": "/images/\n /en/\n header1.gif\n /es/\n header1.gif\n" } ]
2008/12/01
[ "https://Stackoverflow.com/questions/331000", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4481/" ]
331,002
<p>I need to change the date format from US (mm/dd/YYYY) to UK (dd/mm/YYYY) on a single database on a SQL server machine.</p> <p>How can this be done?</p> <p>I've seen statements that do this for the whole system, and ones that do it for the session, but I can't change the code now as it will have to go through QA ag...
[ { "answer_id": 331031, "author": "Mladen Prajdic", "author_id": 31345, "author_profile": "https://Stackoverflow.com/users/31345", "pm_score": -1, "selected": false, "text": "set dateformat" }, { "answer_id": 331046, "author": "Nick Berardi", "author_id": 17, "author_p...
2008/12/01
[ "https://Stackoverflow.com/questions/331002", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20400/" ]
331,007
<p>I have a TextBox control on my Form. I use the Leave event on the control to process user input. It works fine if the user clicks on some other control on the form, but the even doesn't get fired when the user goes straight to the main menu. Any ideas which event should I use to get it fired everytime?</p>
[ { "answer_id": 331035, "author": "TcKs", "author_id": 20382, "author_profile": "https://Stackoverflow.com/users/20382", "pm_score": 2, "selected": false, "text": "private void menuStrip1_MenuActivate( object sender, EventArgs e ) {\n bool ret = this.Validate( false );\n if ( false ...
2008/12/01
[ "https://Stackoverflow.com/questions/331007", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5363/" ]
331,013
<p>I'm refactoring some objects that are serialized to XML but need to keep a few properties for backwards compatibility, I've got a method that converts the old object into the new one for me and nulls the obsolete property. I want to use the <code>Obsolete</code> attribute to tell other developers not to use this pro...
[ { "answer_id": 331062, "author": "Bluenuance", "author_id": 33111, "author_profile": "https://Stackoverflow.com/users/33111", "pm_score": 0, "selected": false, "text": "ShouldSerializeOldObject ()\n{\n return true;\n}\n\nShouldSerializeAnotherOldObject ()\n{\n return true\n}\n" }, ...
2008/12/01
[ "https://Stackoverflow.com/questions/331013", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4950/" ]
331,045
<p>This question is related to <a href="https://stackoverflow.com/questions/232926/how-to-make-consistent-dll-binaries-across-vs-versions">"How to make consistent dll binaries across VS versions ?"</a></p> <ul> <li>We have applications and DLLs built with VC6 and a new application built with VC9. The VC9-app has to us...
[ { "answer_id": 331064, "author": "Roger Lipscombe", "author_id": 8446, "author_profile": "https://Stackoverflow.com/users/8446", "pm_score": 3, "selected": true, "text": "struct IFoo {\n int Init() = 0;\n};\n" }, { "answer_id": 331088, "author": "Roger Lipscombe", "aut...
2008/12/01
[ "https://Stackoverflow.com/questions/331045", "https://Stackoverflow.com", "https://Stackoverflow.com/users/27596/" ]
331,052
<p>I have a canvas element defined statically in the html with a width and height. If I attempt to use JavaScript to resize it dynamically (setting a new width and height - either on the attributes of the canvas or via the style properties) I get the following error in Firefox:</p> <blockquote> <p>uncaught exception...
[ { "answer_id": 331462, "author": "Eugene Lazutkin", "author_id": 26394, "author_profile": "https://Stackoverflow.com/users/26394", "pm_score": 6, "selected": false, "text": "canvasNode.width = 200; // in pixels\ncanvasNode.height = 100; // in pixels\n" }, { "answer_id": 331472, ...
2008/12/01
[ "https://Stackoverflow.com/questions/331052", "https://Stackoverflow.com", "https://Stackoverflow.com/users/42145/" ]
331,068
<p>I have been using anonymous namespaces to store local data and functions and wanted to know when the data is initialized? Is it when the application starts in the same way as static data or is it compiler dependent? For example:</p> <pre><code>// foo.cpp #include "foo.h" namespace { const int SOME_VALUE = 42; ...
[ { "answer_id": 331078, "author": "Mathieu Pagé", "author_id": 5861, "author_profile": "https://Stackoverflow.com/users/5861", "pm_score": 2, "selected": false, "text": "void foo::SomeFunc(int n)\n{\n if (n == 42)\n {\n ...\n }\n}\n" } ]
2008/12/01
[ "https://Stackoverflow.com/questions/331068", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9236/" ]
331,069
<p>I'm working on an existing j2ee app and am required to remove some vendor specific method calls from the code.</p> <p>The daos behind a session facade make calls into the ejb container to get the user's id and password - in order to connect to the database. The user id and password part of the initialContext used ...
[ { "answer_id": 331664, "author": "Robin", "author_id": 21925, "author_profile": "https://Stackoverflow.com/users/21925", "pm_score": 1, "selected": false, "text": "getCallerPrincipal()" } ]
2008/12/01
[ "https://Stackoverflow.com/questions/331069", "https://Stackoverflow.com", "https://Stackoverflow.com/users/42152/" ]
331,070
<p>I've got a website running under ASP .NET 2/IIS7/Vista. I have a URL rewriting module which allows me to have extensionless URLs. To get this to work I have configured the system.webServer section of the config file such that all requests are forwarded to the aspnet_isapi.dll. I have also added the URL rewrite modul...
[ { "answer_id": 331664, "author": "Robin", "author_id": 21925, "author_profile": "https://Stackoverflow.com/users/21925", "pm_score": 1, "selected": false, "text": "getCallerPrincipal()" } ]
2008/12/01
[ "https://Stackoverflow.com/questions/331070", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12277/" ]
331,082
<p>I find this very strange, must be something I'm doing wrong, but still... I'm working on a page using PHP and TPL files. In my TPL file, there's a place in the footer for some extra lines if needed.</p> <p>For instance, formchecking with Javascript.</p> <p>so in PHP I did this:</p> <pre><code>$foot = "&lt;script ...
[ { "answer_id": 331092, "author": "Tomalak", "author_id": 18771, "author_profile": "https://Stackoverflow.com/users/18771", "pm_score": 4, "selected": true, "text": "$foot = \"{literal}<script type=\\\"text/javascript\\\">if(document.getElementById){loadEvents();}</script>{/literal}\";\n"...
2008/12/01
[ "https://Stackoverflow.com/questions/331082", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11795/" ]
331,105
<p>I have set the <code>itemRollOver</code> and <code>itemRollOut</code> event listeners on a List component, but whenever I roll the mouse over a list item, both the over and out events of the same list item fire in succession right after each other. My list uses a custom itemRenderer.</p> <p>Any ideas why this might...
[ { "answer_id": 1179514, "author": "RJ Regenold", "author_id": 144682, "author_profile": "https://Stackoverflow.com/users/144682", "pm_score": 0, "selected": false, "text": "import mx.core.mx_internal;\n\nuse namespace mx_internal;\n\npublic class List extends mx.controls.List\n{\n pub...
2008/12/01
[ "https://Stackoverflow.com/questions/331105", "https://Stackoverflow.com", "https://Stackoverflow.com/users/36817/" ]
331,109
<p>I have a simple model called <code>Party</code> with a corresponding table called <code>parties</code>. There's also a controller with all the usual CRUD actions and so on. This model is used in a website and only one admin user is allowed to edit the parties - everyone else is allowed to call GET actions (index, sh...
[ { "answer_id": 331134, "author": "Milan Novota", "author_id": 26123, "author_profile": "https://Stackoverflow.com/users/26123", "pm_score": 2, "selected": false, "text": "set_promoted_party and get_promoted_party actions" }, { "answer_id": 331140, "author": "mwilliams", "...
2008/12/01
[ "https://Stackoverflow.com/questions/331109", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20467/" ]
331,115
<p>How do you specify the Fill Factor when creating an index in MySql?</p>
[ { "answer_id": 44022337, "author": "Nameless One", "author_id": 2420536, "author_profile": "https://Stackoverflow.com/users/2420536", "pm_score": 1, "selected": false, "text": "innodb_fill_factor" } ]
2008/12/01
[ "https://Stackoverflow.com/questions/331115", "https://Stackoverflow.com", "https://Stackoverflow.com/users/383/" ]
331,131
<p>What we are looking for is: while compiling the same configuration, say Release|Win32, is there a way to only do the postbuild steps sometimes. Like, if I am on a dev machine do all the post-build steps or if I am on a build server then don't do them. Or is the only way to accomplish this is by implementing a new co...
[ { "answer_id": 331175, "author": "Lurker Indeed", "author_id": 16951, "author_profile": "https://Stackoverflow.com/users/16951", "pm_score": 5, "selected": true, "text": "if NOT %ComputerName% == DEVMACHINENAME GOTO end\nc:\\WINDOWS\\Microsoft.NET\\Framework\\v2.0.50727\\ngen \"$(TargetP...
2008/12/01
[ "https://Stackoverflow.com/questions/331131", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26564/" ]
331,146
<p>How do I pass an array I have created on the server side onto the client side for manipulation by Javascript?</p> <p>Any pseudo code will help</p>
[ { "answer_id": 18609470, "author": "fonsIT", "author_id": 1960661, "author_profile": "https://Stackoverflow.com/users/1960661", "pm_score": 2, "selected": false, "text": " private string buttonarray = \"'but1','but2','but3','but4'\";\n\n public string Buttonarray\n {\n g...
2008/12/01
[ "https://Stackoverflow.com/questions/331146", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13370/" ]
331,148
<p>In C the following horror is valid:</p> <pre><code>myFunc() { return 42; // return type defaults to int. } </code></pre> <p>But, what about in C++? I can't find a reference to it either way...</p> <p>My compiler (Codegear C++Builder 2007) currently accepts it without warning, but I've had comments that this <s...
[ { "answer_id": 332312, "author": "tfinniga", "author_id": 9042, "author_profile": "https://Stackoverflow.com/users/9042", "pm_score": 1, "selected": false, "text": "error C4430: missing type specifier - int assumed. Note: C++ does not support default-int\n" } ]
2008/12/01
[ "https://Stackoverflow.com/questions/331148", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1737/" ]
331,152
<p>I have an external stylesheet that has specific IE-hacks. Every so often my site will fail to build due to these hacks (it is the hash-hack; for example <strong><code>#margin-top:-2px;</code></strong>). This is the error:</p> <blockquote> <p>Unexpected character sequence. Expected a property name for the " : ...
[ { "answer_id": 331189, "author": "annakata", "author_id": 13018, "author_profile": "https://Stackoverflow.com/users/13018", "pm_score": 4, "selected": true, "text": " Tools | Options | Text Editor | CSS | CSS Specific \n" } ]
2008/12/01
[ "https://Stackoverflow.com/questions/331152", "https://Stackoverflow.com", "https://Stackoverflow.com/users/25515/" ]
331,157
<p>Does SQL Server CheckSum calculate a CRC? If not how can I get SQL Server to calculate a CRC on an arbitrary varchar column?</p>
[ { "answer_id": 331412, "author": "Andrew Rollings", "author_id": 40410, "author_profile": "https://Stackoverflow.com/users/40410", "pm_score": 4, "selected": true, "text": "DECLARE @input VARCHAR(50)\nSET @input = 'test'\n\nSET NOCOUNT ON\nDECLARE @tblLookup TABLE (ID INT IDENTITY(0,1) N...
2008/12/01
[ "https://Stackoverflow.com/questions/331157", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3153/" ]
331,185
<p>I have a div tag in the view that I'd like to update with a graph that I generate via Gruff.</p> <p>I have the following controller action which does this at the end</p> <pre><code>send_data g.to_blob, :disposition=&gt;'inline', :type=&gt;'image/png', :filename=&gt;'top_n.pdf' </code></pre> <p>Now if I directly i...
[ { "answer_id": 331565, "author": "ARemesal", "author_id": 36599, "author_profile": "https://Stackoverflow.com/users/36599", "pm_score": 2, "selected": true, "text": ":complete => \"updateImg(id_of_div, request.responseText)\"\n" }, { "answer_id": 331614, "author": "Stein G. S...
2008/12/01
[ "https://Stackoverflow.com/questions/331185", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1695/" ]
331,205
<p>I'm creating a KVC/KVO-compliant mutable array on one of my objects the recommended way:</p> <pre><code>@interface Factory { NSMutableArray *widgets; } - (NSArray *)widgets; - (void)insertObject:(id)obj inWidgetsAtIndex:(NSUInteger)idx; - (void)removeObjectFromWidgetsAtIndex:(NSUInteger)idx; @end </code></pre> ...
[ { "answer_id": 332294, "author": "Alex", "author_id": 35999, "author_profile": "https://Stackoverflow.com/users/35999", "pm_score": 3, "selected": true, "text": "widgets" }, { "answer_id": 332516, "author": "Matt Gallagher", "author_id": 36103, "author_profile": "http...
2008/12/01
[ "https://Stackoverflow.com/questions/331205", "https://Stackoverflow.com", "https://Stackoverflow.com/users/79/" ]
331,215
<p>I am trying to unit test my WPF databindings using the test suit provided by Microsoft Team System. I would like to be able to test the bindings without showing the window because most of my tests will be for user controls and not actually on a window. Is this possible or is there a better way to do it? The code ...
[ { "answer_id": 331654, "author": "Gishu", "author_id": 1695, "author_profile": "https://Stackoverflow.com/users/1695", "pm_score": 2, "selected": false, "text": "Assert.AreEqual(\"FirstName\", txtBoxToProbe.GetBindingExpression(TextBox.TextProperty).ParentBinding.Path.Path);\n" }, { ...
2008/12/01
[ "https://Stackoverflow.com/questions/331215", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3291/" ]
331,224
<p>So my question is if I can somehow send data to my program and then send the same data AND its result to another program without having to create a temporary file (in my case ouputdata.txt). Preferably using linux pipes/bash.</p> <p>I currently do the following:</p> <p>cat inputdata.txt | ./MyProg > outputdata.txt...
[ { "answer_id": 331246, "author": "S.Lott", "author_id": 10661, "author_profile": "https://Stackoverflow.com/users/10661", "pm_score": 5, "selected": true, "text": "MyProg" }, { "answer_id": 331298, "author": "derobert", "author_id": 27727, "author_profile": "https://S...
2008/12/01
[ "https://Stackoverflow.com/questions/331224", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17500/" ]
331,231
<p>When I click on a row in my GridView, I want to go to a other page with the ID I get from the database. </p> <p>In my RowCreated event I have the following line:</p> <pre><code>e.Row.Attributes.Add( "onClick", ClientScript.GetPostBackClientHyperlink( this.grdSearchResults, "Select$" + e.Row.Row...
[ { "answer_id": 331662, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 5, "selected": true, "text": "if(e.Row.RowType == DataControlRowType.DataRow)\n{\n e.Row.Attributes[\"onClick\"] = \"location.href='view.aspx?id=\" + Data...
2008/12/01
[ "https://Stackoverflow.com/questions/331231", "https://Stackoverflow.com", "https://Stackoverflow.com/users/40676/" ]
331,240
<p>I have a problem with classic ASP. The encoding is wrong when I send data with <code>XMLHttp.send</code>. The response is a PDF file, but the “ÆØÅ” gets wrong, the “Ø” is read as “øy” for example. It’s like it’s a converting mistake from UTF-8 to ISO-8859-1, but it should be ISO-8859-1 now. I have <code>&lt;%@COD...
[ { "answer_id": 331275, "author": "D'Arcy Rittich", "author_id": 39430, "author_profile": "https://Stackoverflow.com/users/39430", "pm_score": 2, "selected": false, "text": "Session.CodePage = 28591\n" }, { "answer_id": 331391, "author": "Community", "author_id": -1, "...
2008/12/01
[ "https://Stackoverflow.com/questions/331240", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
331,254
<p>I want to pixelate and/or blur an image. I've found the command for the blurring:</p> <pre><code>$convert image.jpg -blur 18,5 newimage.jpg </code></pre> <p>to work but I cannot blur the image any more. And how do I pixelate the image? I couldn't find a sound example around the net.</p> <p>Thx</p>
[ { "answer_id": 331294, "author": "Colin Pickard", "author_id": 12744, "author_profile": "https://Stackoverflow.com/users/12744", "pm_score": 4, "selected": true, "text": "convert -resize 10% image.jpg newimage.jpg\nconvert -resize 1000% newimage.jpg newimage.jpg\n" }, { "answer_i...
2008/12/01
[ "https://Stackoverflow.com/questions/331254", "https://Stackoverflow.com", "https://Stackoverflow.com/users/42153/" ]
331,262
<p>In the past I have needed to create custom SOAP headers in a C# project that was using an imported WSDL web reference. I found a way to do it but I was never happy with it and I have sense wondered if there was a better way. What I did was create a header that derives from SoapHeader:</p> <pre><code>[System.Xml.Ser...
[ { "answer_id": 6531621, "author": "vardars", "author_id": 394624, "author_profile": "https://Stackoverflow.com/users/394624", "pm_score": 2, "selected": false, "text": "public partial class SampleService\n{\n public string MessageID { get; set; }\n\n protected override System.Xml.X...
2008/12/01
[ "https://Stackoverflow.com/questions/331262", "https://Stackoverflow.com", "https://Stackoverflow.com/users/25343/" ]
331,265
<p>How do I perform a join between two DataTables in a Dataset?</p> <p>I created a DataRelation between two tables….then what?</p> <p>I'm looking at one explanation on how to do it (<a href="http://www.emmet-gray.com/Articles/DataTableJoins.htm" rel="nofollow noreferrer">http://www.emmet-gray.com/Articles/DataTableJo...
[ { "answer_id": 331920, "author": "Rohan West", "author_id": 38686, "author_profile": "https://Stackoverflow.com/users/38686", "pm_score": 2, "selected": false, "text": "DataTable person = new DataTable();\nperson.Columns.Add(\"Id\");\nperson.Columns.Add(\"Name\");\n\nDataTable pet = new ...
2008/12/01
[ "https://Stackoverflow.com/questions/331265", "https://Stackoverflow.com", "https://Stackoverflow.com/users/37759/" ]
331,271
<p>I have a piece of code in ANSI C which uses the time.h library and time_h structures to (amongst other date-related calculations) work out the interval between two given dates. This works fine but this limits my code to input between 1970 and 2038. I would now like to make my code more general.</p> <p>Is there a co...
[ { "answer_id": 418798, "author": "Schwern", "author_id": 14660, "author_profile": "https://Stackoverflow.com/users/14660", "pm_score": 3, "selected": true, "text": "gmtime()" } ]
2008/12/01
[ "https://Stackoverflow.com/questions/331271", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22654/" ]
331,273
<p>Is it possible to deploy a WPF windows application in such a way that the xaml files can be manipulated at run-time? If possible, I would imagine this would work similar to an asp.net application that can deploy the .aspx pages as content, which are then compiled just-in-time at run-time.</p> <p>I'd like to allow ...
[ { "answer_id": 331471, "author": "Jobi Joy", "author_id": 8091, "author_profile": "https://Stackoverflow.com/users/8091", "pm_score": 0, "selected": false, "text": "UIElement documentRoot = (UIElement)System.Windows.Markup.XamlReader.Load(xmlReader);\n" } ]
2008/12/01
[ "https://Stackoverflow.com/questions/331273", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1300/" ]
331,276
<p>The callstack shows the following:</p> <pre><code>[MissingMethodException: No parameterless constructor defined for this object.] System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean&amp; canBeCached, RuntimeMethodHandle&amp; ctor, Boolean&amp; bNeedSecurityCheck) +...
[ { "answer_id": 1329974, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 3, "selected": false, "text": "\n[Bind(Exclude = \"Countries\")]\npublic class MyViewModel \n{\n ..." }, { "answer_id": 8086303, "author": "j...
2008/12/01
[ "https://Stackoverflow.com/questions/331276", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11333/" ]
331,277
<p>Doing a refresh after certain action in asp.net seems to make them happen again even when that action doesn't make sense (think double delete). The web way to deal with this situation is to redirect after a post to get a clean version of the page that can be refreshed without reposting an action to the webserver. H...
[ { "answer_id": 331338, "author": "Cristian Libardo", "author_id": 16526, "author_profile": "https://Stackoverflow.com/users/16526", "pm_score": 3, "selected": false, "text": "// the post handling logic, e.g. the click event code\nResponse.Redirect(Request.RawUrl);\n" } ]
2008/12/01
[ "https://Stackoverflow.com/questions/331277", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4491/" ]
331,278
<p>I've got some directories that have been moved or renamed. The Linux command line SVN client ignores these directories. The TortoiseSVN plugin for Explorer shows them. If I delete them and update, they come back.</p> <p>All of the file movement and deletion has been done using the Linux SVN CLI tools. When doing an...
[ { "answer_id": 331338, "author": "Cristian Libardo", "author_id": 16526, "author_profile": "https://Stackoverflow.com/users/16526", "pm_score": 3, "selected": false, "text": "// the post handling logic, e.g. the click event code\nResponse.Redirect(Request.RawUrl);\n" } ]
2008/12/01
[ "https://Stackoverflow.com/questions/331278", "https://Stackoverflow.com", "https://Stackoverflow.com/users/39933/" ]
331,279
<p>I've found a answer how to remove diacritic characters on stackoverflow, but could you please tell me if it is possible to change diacritic characters to non-diacritic ones?</p> <p>Oh.. and I think about .NET (or other if not possible)</p>
[ { "answer_id": 420613, "author": "Chris James", "author_id": 3193, "author_profile": "https://Stackoverflow.com/users/3193", "pm_score": 2, "selected": false, "text": "string newString = myDiacriticsString.Normalize(NormalizationForm.FormD);\n" }, { "answer_id": 3314310, "aut...
2008/12/01
[ "https://Stackoverflow.com/questions/331279", "https://Stackoverflow.com", "https://Stackoverflow.com/users/38940/" ]
331,287
<p>Try to commit my first iPhone application to Subversion found that there's "code signing identity" section in my xcode project.pbxproj file.</p> <pre><code>CODE_SIGN_IDENTITY = "iPhone Developer: my username here...; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: above..."; </code></pre> <p>The issue is,...
[ { "answer_id": 333168, "author": "Chris Hanson", "author_id": 714, "author_profile": "https://Stackoverflow.com/users/714", "pm_score": 1, "selected": false, "text": "$(USER)" }, { "answer_id": 333177, "author": "Chris Hanson", "author_id": 714, "author_profile": "htt...
2008/12/01
[ "https://Stackoverflow.com/questions/331287", "https://Stackoverflow.com", "https://Stackoverflow.com/users/42170/" ]
331,295
<p>What is the Worst Case Time Complexity t(n) :- I'm reading this book about algorithms and as an example how to get the T(n) for .... like the selection Sort Algorithm</p> <hr> <p>Like if I'm dealing with the selectionSort(A[0..n-1])</p> <pre><code>//sorts a given array by selection sort //input: An array A[0..n -...
[ { "answer_id": 331463, "author": "Gavin Miller", "author_id": 33226, "author_profile": "https://Stackoverflow.com/users/33226", "pm_score": 2, "selected": true, "text": "for(j=0 ; j<n ; j++)\n{\n //... \n}\n" } ]
2008/12/01
[ "https://Stackoverflow.com/questions/331295", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
331,297
<p>Calling through to my Silverlight Enabled WCF-Service in my silverlight application, occasionally users get timeouts. Whats the easiest way to boost the time allowed by the service client for a response?</p> <p>The exact exception thrown is: System.TimeoutException: [HttpRequestTimedOutWithoutDetail]</p> <p>Thanks...
[ { "answer_id": 2481876, "author": "Rick Arthur", "author_id": 224531, "author_profile": "https://Stackoverflow.com/users/224531", "pm_score": 2, "selected": false, "text": "using System;\nusing System.Net;\nusing System.Windows;\nusing System.Windows.Controls;\nusing System.Windows.Docum...
2008/12/01
[ "https://Stackoverflow.com/questions/331297", "https://Stackoverflow.com", "https://Stackoverflow.com/users/39643/" ]
331,322
<p>I have read numerous articles now and it's not clear and there's lots of versions and this that and the other and I have been piecing things together and have got so far, my problem is the 'rar' command doesn't seem to accept my substition variable and instead reads it as a string.</p> <p>But this is what I have</p...
[ { "answer_id": 331337, "author": "Patrick Cuff", "author_id": 7903, "author_profile": "https://Stackoverflow.com/users/7903", "pm_score": 3, "selected": true, "text": "set _rarpath=C:\\Program Files (x86)\\WinRAR\n" } ]
2008/12/01
[ "https://Stackoverflow.com/questions/331322", "https://Stackoverflow.com", "https://Stackoverflow.com/users/27412/" ]
331,326
<p>Does anyone know of a good, extensible source code analyzer that examines JavaScript files? </p>
[ { "answer_id": 10136658, "author": "Thomas Schmitt", "author_id": 1330934, "author_profile": "https://Stackoverflow.com/users/1330934", "pm_score": 2, "selected": false, "text": "JSAnalysis" } ]
2008/12/01
[ "https://Stackoverflow.com/questions/331326", "https://Stackoverflow.com", "https://Stackoverflow.com/users/28540/" ]
331,334
<p>I am using NHibernate on a new ASP.NET project, and am running into what I believe to be strange behavior. I am attempting to manage my session by using an HttpModule to catch the EndRequest event and close the session. This is working fine, however, after the EndRequest event fires, I am getting an exception in t...
[ { "answer_id": 342309, "author": "yfeldblum", "author_id": 12349, "author_profile": "https://Stackoverflow.com/users/12349", "pm_score": 1, "selected": false, "text": "RequestContainer" } ]
2008/12/01
[ "https://Stackoverflow.com/questions/331334", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6146/" ]
331,345
<p>I have a linq to sql database. Very simplified we have 3 tables, Projects and Users. There is a joining table called User_Projects which joins them together. </p> <p>I already have a working method of getting <code>IEnumberable&lt;Project&gt;</code> for a given user. </p> <pre><code>from up in User_Projects select...
[ { "answer_id": 331454, "author": "technophile", "author_id": 23029, "author_profile": "https://Stackoverflow.com/users/23029", "pm_score": 0, "selected": false, "text": "var userProjects = GetProjects();\nreturn db.Projects.Except(userProjects.ToArray());\n" }, { "answer_id": 331...
2008/12/01
[ "https://Stackoverflow.com/questions/331345", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3193/" ]
331,367
<p>Say I have 2 tables: Customers and Orders. A Customer can have many Orders.</p> <p>Now, I need to show any Customers with his latest Order. This means if a Customer has more than one Orders, show only the Order with the latest Entry Time.</p> <p>This is how far I managed on my own:</p> <pre><code>SELECT a.*, b.Id...
[ { "answer_id": 331392, "author": "devio", "author_id": 21336, "author_profile": "https://Stackoverflow.com/users/21336", "pm_score": 1, "selected": false, "text": "SELECT Cust.*, Ord.*\nFROM Customers cust INNER JOIN Orders ord ON cust.ID = ord.CustID\nWHERE ord.OrderID = \n (SELECT M...
2008/12/01
[ "https://Stackoverflow.com/questions/331367", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19582/" ]
331,376
<p>I have a class and I want to be able to iterate over a certain array member. I did a quick search and found <code>IteratorAggregate</code>:</p> <pre><code>class foo implements IteratorAggregate { protected $_array = array('foo'=&gt;'bar', 'baz'=&gt;'quux'); public function getIterator() { retur...
[ { "answer_id": 331392, "author": "devio", "author_id": 21336, "author_profile": "https://Stackoverflow.com/users/21336", "pm_score": 1, "selected": false, "text": "SELECT Cust.*, Ord.*\nFROM Customers cust INNER JOIN Orders ord ON cust.ID = ord.CustID\nWHERE ord.OrderID = \n (SELECT M...
2008/12/01
[ "https://Stackoverflow.com/questions/331376", "https://Stackoverflow.com", "https://Stackoverflow.com/users/31003/" ]
331,377
<p>How to pack python libs I'm using so I can distribute them with my app and have as few dependencies as possible and also not to conflict with different lib/version that is already on my system.</p> <p>L.E.: Sorry i forgot to specify. I will be doing this on linux. And I'm not referring in making my app a installabl...
[ { "answer_id": 331489, "author": "xahtep", "author_id": 42184, "author_profile": "https://Stackoverflow.com/users/42184", "pm_score": 2, "selected": false, "text": "freeze.py" }, { "answer_id": 331846, "author": "orip", "author_id": 37020, "author_profile": "https://S...
2008/12/01
[ "https://Stackoverflow.com/questions/331377", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9789/" ]
331,388
<p><strong>What is the best way to make one of the branches of a subversion repository the new trunk?</strong> </p> <p>There has been a major rewrite for the entire system: things have been moved around, rewritten, replaces, removed, renamed etc. The rewritten code has been tested and is ready to replace the old trun...
[ { "answer_id": 331395, "author": "Aaron Digulla", "author_id": 34088, "author_profile": "https://Stackoverflow.com/users/34088", "pm_score": 8, "selected": true, "text": "svn move" }, { "answer_id": 331574, "author": "Ken Gentle", "author_id": 8709, "author_profile": ...
2008/12/01
[ "https://Stackoverflow.com/questions/331388", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22674/" ]
331,394
<p>I know this is probably on the Internet somewhere but I can't find the answer here on Stackoverflow so I thought I may boost up the knowledge base here a little.</p> <p>I'm a newbie to Ruby and Rails but my company is getting pretty invested in it so I'm trying to get to know it in a little more detail.</p> <p>It'...
[ { "answer_id": 331408, "author": "danmayer", "author_id": 27738, "author_profile": "https://Stackoverflow.com/users/27738", "pm_score": 6, "selected": false, "text": "has_many :memberships, dependent: :destroy\n" }, { "answer_id": 331436, "author": "Sean McMains", "author...
2008/12/01
[ "https://Stackoverflow.com/questions/331394", "https://Stackoverflow.com", "https://Stackoverflow.com/users/39086/" ]
331,398
<p>I have an http module on a sharepoint site and this module instantiates a custom class and add it to the session and does other initial things for my site. However, I'm noticing that the http module is being called for all request types (.aspx, .js, .png, .jpg).</p> <p>Is there any way to have an http module only b...
[ { "answer_id": 331408, "author": "danmayer", "author_id": 27738, "author_profile": "https://Stackoverflow.com/users/27738", "pm_score": 6, "selected": false, "text": "has_many :memberships, dependent: :destroy\n" }, { "answer_id": 331436, "author": "Sean McMains", "author...
2008/12/01
[ "https://Stackoverflow.com/questions/331398", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
331,400
<p>I'm trying to understand a particular Perl code from <a href="http://sourceforge.net/projects/vcake" rel="nofollow noreferrer">vcake</a>. Usually I find my way around in Perl but the following statement baffles me. I suspect that this is simply an error but I'm not completely sure. The statement is:</p> <pre><code>...
[ { "answer_id": 331425, "author": "Aaron Digulla", "author_id": 34088, "author_profile": "https://Stackoverflow.com/users/34088", "pm_score": 5, "selected": true, "text": "my $numReads" }, { "answer_id": 333611, "author": "Altreus", "author_id": 2386199, "author_profil...
2008/12/01
[ "https://Stackoverflow.com/questions/331400", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1968/" ]
331,407
<p>I am using the following code to set a tray icon in Windows and Linux. It works wonderful in Windows and works okay in Linux. In Linux (Ubuntu) I have my panel set to be (somewhat) transparent and when I add a GIF (with a transparent background) the background of the icon shows up all grey and ugly (see image, green...
[ { "answer_id": 3882028, "author": "Falkster", "author_id": 469123, "author_profile": "https://Stackoverflow.com/users/469123", "pm_score": 4, "selected": false, "text": "public void paint(Graphics g) {\n if (g != null && curW > 0 && curH > 0) {\n BufferedImage bufImage = new Bu...
2008/12/01
[ "https://Stackoverflow.com/questions/331407", "https://Stackoverflow.com", "https://Stackoverflow.com/users/24998/" ]
331,419
<p>When working with WCF services, is it better to create a new instance of the service every time you use it? Or is it better to create one and re-use it? Why is either approach better? Is it the same for asynchronous proxies? </p>
[ { "answer_id": 1812967, "author": "andrey.tsykunov", "author_id": 108317, "author_profile": "https://Stackoverflow.com/users/108317", "pm_score": 3, "selected": false, "text": "IMyContract proxy = new MyContractClient( );\ntry\n{\n proxy.MyMethod( );\n}\ncatch\n{}\n\n//Throws Communica...
2008/12/01
[ "https://Stackoverflow.com/questions/331419", "https://Stackoverflow.com", "https://Stackoverflow.com/users/36687/" ]
331,428
<p>I realize that this question is impossible to answer absolutely, but I'm only after ballpark figures:</p> <p>Given a reasonably sized C-program (thousands of lines of code), on average, how many ASM-instructions would be generated. In other words, what's a realistic C-to-ASM instruction ratio? Feel free to make ass...
[ { "answer_id": 331457, "author": "Bill", "author_id": 14547, "author_profile": "https://Stackoverflow.com/users/14547", "pm_score": 2, "selected": false, "text": "i++;" }, { "answer_id": 331474, "author": "Johannes Schaub - litb", "author_id": 34509, "author_profile":...
2008/12/01
[ "https://Stackoverflow.com/questions/331428", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2238/" ]
331,455
<p>I am working on cleaning up a bug in a large code base where no one was paying attention to local time vs. UTC time. </p> <p>What we want is a way of globally ignoring time zone information on DateTime objects sent to and from our ASP.NET web services. I've got a solution for retrieve operations. Data is only re...
[ { "answer_id": 334679, "author": "Clyde", "author_id": 945, "author_profile": "https://Stackoverflow.com/users/945", "pm_score": 2, "selected": false, "text": "<XmlElement(DataType:=\"date\")> \n" } ]
2008/12/01
[ "https://Stackoverflow.com/questions/331455", "https://Stackoverflow.com", "https://Stackoverflow.com/users/945/" ]
331,460
<p>I am getting a " Thread was being aborted " Exception in an ASP.NET page.I am not at all using any Response.Redirect/Server.Transfer method.Can any one help me to solve this ?</p>
[ { "answer_id": 331498, "author": "dr. evil", "author_id": 40322, "author_profile": "https://Stackoverflow.com/users/40322", "pm_score": 1, "selected": false, "text": "Response.Redirect(URL, False)\n" } ]
2008/12/01
[ "https://Stackoverflow.com/questions/331460", "https://Stackoverflow.com", "https://Stackoverflow.com/users/40521/" ]
331,468
<p>I need a standard, Microsoft delivered, encryption library that works for both .NET 2.0 and C++. What would you suggest?</p> <p>We find that AES is only offered in .NET 3.5 (and available in C++)</p> <p>We find that Rijndael is used in .NET 2.0 but not available in the standard C++ libraries.</p> <p>If I am wrong...
[ { "answer_id": 331932, "author": "Scott Saad", "author_id": 4916, "author_profile": "https://Stackoverflow.com/users/4916", "pm_score": 3, "selected": true, "text": "MS_ENHANCED_PROV" } ]
2008/12/01
[ "https://Stackoverflow.com/questions/331468", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16794/" ]
331,488
<p>Is there an elegantish way in Swing to find out if there are any tooltips currently being displayed in my frame?</p> <p>I'm using custom tooltips, so it would be very easy to set a flag in my <code>createToolTip()</code> method, but I can't see a way to find out when the tooltip is gone.</p> <p><code>ToolTipManage...
[ { "answer_id": 331530, "author": "James Van Huis", "author_id": 31828, "author_profile": "https://Stackoverflow.com/users/31828", "pm_score": 3, "selected": true, "text": "public boolean isTooltipShowing(JComponent component) {\n AbstractAction hideTipAction = (AbstractAction) compone...
2008/12/01
[ "https://Stackoverflow.com/questions/331488", "https://Stackoverflow.com", "https://Stackoverflow.com/users/34360/" ]
331,502
<p>I've got 2 Questions:</p> <p>1. I've sarted working around with Linq to XML and i'm wondering if it is possible to change an XML document via Linq. I mean, is there someting like </p> <pre><code>XDocument xmlDoc = XDocument.Load("sample.xml"); update item in xmlDoc.Descendants("item") where (int)item .Attribute("...
[ { "answer_id": 335418, "author": "Robert Rossney", "author_id": 19403, "author_profile": "https://Stackoverflow.com/users/19403", "pm_score": 3, "selected": false, "text": "using System;\nusing System.Linq;\nusing System.Xml.Linq;\n\nstatic void Main(string[] args)\n{\n string xml = @...
2008/12/01
[ "https://Stackoverflow.com/questions/331502", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
331,505
<p>Let say I have a sheet in with columns Customer and CreatedDate with lots of row with data. Anyone who knows how to setup (through VBA or Formula) a second sheet that displays rows from the first sheet based on certain where statements, i.e. all rows with customers "created this month." (similar to a select ... wher...
[ { "answer_id": 331547, "author": "e.James", "author_id": 33686, "author_profile": "https://Stackoverflow.com/users/33686", "pm_score": 1, "selected": true, "text": "select ... where" }, { "answer_id": 331563, "author": "xahtep", "author_id": 42184, "author_profile": "...
2008/12/01
[ "https://Stackoverflow.com/questions/331505", "https://Stackoverflow.com", "https://Stackoverflow.com/users/40939/" ]
331,520
<p>I've added a weakly named assembly to my <a href="http://en.wikipedia.org/wiki/Microsoft_Visual_Studio#Visual_Studio_2005" rel="noreferrer">Visual Studio 2005</a> project (which is strongly named). I'm now getting the error:</p> <blockquote> <p>&quot;Referenced assembly 'xxxxxxxx' does not have a strong name&quot;</...
[ { "answer_id": 331555, "author": "Dirk Vollmar", "author_id": 40347, "author_profile": "https://Stackoverflow.com/users/40347", "pm_score": 9, "selected": true, "text": "ildasm.exe" }, { "answer_id": 11408513, "author": "MrOli3000", "author_id": 1514004, "author_profi...
2008/12/01
[ "https://Stackoverflow.com/questions/331520", "https://Stackoverflow.com", "https://Stackoverflow.com/users/36860/" ]
331,536
<p>What's a better way to start a thread, <code>_beginthread</code>, <code>_beginthreadx</code> or <code>CreateThread</code>?</p> <p>I'm trying to determine what are the advantages/disadvantages of <code>_beginthread</code>, <code>_beginthreadex</code> and <code>CreateThread</code>. All of these functions return a th...
[ { "answer_id": 331567, "author": "Drew Hall", "author_id": 23934, "author_profile": "https://Stackoverflow.com/users/23934", "pm_score": 8, "selected": true, "text": "CreateThread()" }, { "answer_id": 331711, "author": "Jaywalker", "author_id": 382974, "author_profile...
2008/12/01
[ "https://Stackoverflow.com/questions/331536", "https://Stackoverflow.com", "https://Stackoverflow.com/users/28760/" ]
331,538
<p>My code is like the following:</p> <pre><code>URLConnection cnx = address.openConnection(); cnx.setAllowUserInteraction(false); cnx.setDoOutput(true); cnx.addRequestProperty("User-Agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)"); InputStream is = cnx.getInputStream(); </code></pre> <p>Is...
[ { "answer_id": 331633, "author": "Ken Gentle", "author_id": 8709, "author_profile": "https://Stackoverflow.com/users/8709", "pm_score": 5, "selected": true, "text": "InputStream" }, { "answer_id": 6956618, "author": "Leif Ashley", "author_id": 425376, "author_profile"...
2008/12/01
[ "https://Stackoverflow.com/questions/331538", "https://Stackoverflow.com", "https://Stackoverflow.com/users/31610/" ]
331,549
<p>I have an existing htaccess that works fine:</p> <pre><code>RewriteEngine On RewriteCond %{SCRIPT_FILENAME} !-f RewriteCond %{SCRIPT_FILENAME} !-d RewriteRule (.*) /default.php DirectoryIndex index.php /default.php </code></pre> <p>I wish to modify this so that all urls that start with /test/ go to /test/default....
[ { "answer_id": 331593, "author": "xahtep", "author_id": 42184, "author_profile": "https://Stackoverflow.com/users/42184", "pm_score": 1, "selected": false, "text": "[L]" }, { "answer_id": 331649, "author": "Nick Berardi", "author_id": 17, "author_profile": "https://St...
2008/12/01
[ "https://Stackoverflow.com/questions/331549", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
331,553
<p>I have a control which the user can resize with the mouse. When they move the right side, I just change the width, and everything works fine.</p> <p>However, when they move the left size, I have to change the Left and Width properties. The right hand side of the control visibly twitches, showing the old width in ...
[ { "answer_id": 331617, "author": "Zachary Yates", "author_id": 8360, "author_profile": "https://Stackoverflow.com/users/8360", "pm_score": 3, "selected": false, "text": "Control.SuspendLayout()" } ]
2008/12/01
[ "https://Stackoverflow.com/questions/331553", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15371/" ]
331,564
<p>I have a class Customer in app_code folder in asp.net web site, how can I create an instance using reflection, for example using Activator.CreateInstance(assemblyName, typeName)? Because the app_code is dynamically compiled, I don't know the assembly in design time?</p> <p>Thanks Fred</p> <p>The question is should...
[ { "answer_id": 2688879, "author": "Flatlineato", "author_id": 184353, "author_profile": "https://Stackoverflow.com/users/184353", "pm_score": 1, "selected": false, "text": "Type[] appCodeTypes = System.Reflection.Assembly.Load(\"App_Code\").GetTypes();\n" } ]
2008/12/01
[ "https://Stackoverflow.com/questions/331564", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
331,566
<p>The other day I decided to write an implementation of <a href="http://en.wikipedia.org/wiki/Radix_sort" rel="nofollow noreferrer">radix sort</a> in Java. Radix sort is supposed to be O(k*N) but mine ended up being O(k^2*N) because of the process of breaking down each digit to one number. I broke down each digit by m...
[ { "answer_id": 331584, "author": "Lou Franco", "author_id": 3937, "author_profile": "https://Stackoverflow.com/users/3937", "pm_score": 2, "selected": false, "text": "int key = (a[p] & mask) >> rshift;\n" } ]
2008/12/01
[ "https://Stackoverflow.com/questions/331566", "https://Stackoverflow.com", "https://Stackoverflow.com/users/29299/" ]
331,568
<p>I need to create an <code>XmlDocument</code> with a root element containing multiple namespaces. Am using C# 2.0 or 3.0</p> <p>Here is my code:</p> <pre><code>XmlDocument doc = new XmlDocument(); XmlElement root = doc.CreateElement("JOBS", "http://www.example.com"); doc.AppendChild(root); XmlElement job = doc.Cr...
[ { "answer_id": 331645, "author": "Dirk Vollmar", "author_id": 40347, "author_profile": "https://Stackoverflow.com/users/40347", "pm_score": 0, "selected": false, "text": " XmlDocument doc = new XmlDocument();\n\n XmlElement root = doc.CreateElement(\"JOBS\", \"http://www.ex...
2008/12/01
[ "https://Stackoverflow.com/questions/331568", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9664/" ]
331,569
<p>When trying to kill a buffer that contains changes in Emacs, the message: " Buffer [buffer] modified; kill anyway? (yes or no)" is displayed. </p> <p>Instead of this I'd like to have Emacs ask me if I want to: 1. View a diff of what changed, 2. Save the buffer, 3. Kill the buffer.</p> <p>How?</p>
[ { "answer_id": 334600, "author": "Trey Jackson", "author_id": 6148, "author_profile": "https://Stackoverflow.com/users/6148", "pm_score": 6, "selected": true, "text": "" } ]
2008/12/01
[ "https://Stackoverflow.com/questions/331569", "https://Stackoverflow.com", "https://Stackoverflow.com/users/41829/" ]
331,594
<p>Has anybody had any success ever attaching a debugger to a tethered device? I am able to debug my j2me application in the emulator, but have a lot of trouble sorting out phone-specific problems when they come up. The phone I'm using is a Nokia N95, but ideally the debug process would work on any phone.</p> <p>Is ...
[ { "answer_id": 8032802, "author": "Megha", "author_id": 645937, "author_profile": "https://Stackoverflow.com/users/645937", "pm_score": 0, "selected": false, "text": "Log.p(\"Log statement.....\");" } ]
2008/12/01
[ "https://Stackoverflow.com/questions/331594", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8207/" ]
331,599
<p>I am using a nested html unordered list styled as a drop down. When the a tag within the inner lists list item is clicked it trigger some javascript which is supposed to set the value of a hidden field to the text for the link that was clicked.</p> <p>The javascript seems to work - I used an alert to read the value...
[ { "answer_id": 331756, "author": "Jason Bunting", "author_id": 1790, "author_profile": "https://Stackoverflow.com/users/1790", "pm_score": 4, "selected": false, "text": "runat='server'" }, { "answer_id": 13305120, "author": "Raj", "author_id": 1386684, "author_profile...
2008/12/01
[ "https://Stackoverflow.com/questions/331599", "https://Stackoverflow.com", "https://Stackoverflow.com/users/40623/" ]
331,607
<p>I don't have too much experience with C# so if someone could point me in the right direction I would greatly appreciate it. I have a foreach loop that references a variable of an object. I wish to make another foreach loop inside the main one that compares (or performs actions on) the current variable to the rest ...
[ { "answer_id": 331632, "author": "Vilx-", "author_id": 41360, "author_profile": "https://Stackoverflow.com/users/41360", "pm_score": 2, "selected": false, "text": "int l = doc.Bodies.Count;\nfor ( int i = 0; i < l; i++ )\n for ( int j = i + 1; j < l; j++ )\n // Do stuff \n" }...
2008/12/01
[ "https://Stackoverflow.com/questions/331607", "https://Stackoverflow.com", "https://Stackoverflow.com/users/33523/" ]
331,615
<p>I am currently starting my Java VM with the <strong><code>com.sun.management.jmxremote.*</code></strong> properties so that I can connect to it via JConsole for management and monitoring. Unfortunately, it listens on all interfaces (IP addresses) on the machine.</p> <p>In our environment, there are often cases whe...
[ { "answer_id": 25855193, "author": "sosiouxme", "author_id": 262768, "author_profile": "https://Stackoverflow.com/users/262768", "pm_score": -1, "selected": false, "text": "-Djava.rmi.server.hostname=<YOUR_IP>\n" }, { "answer_id": 38859202, "author": "Niranjan", "author_i...
2008/12/01
[ "https://Stackoverflow.com/questions/331615", "https://Stackoverflow.com", "https://Stackoverflow.com/users/27020/" ]
331,620
<p>Okay I have this RewriteRule which is supposed to redirect any request for the file base.css to {folder of .htacces file}/include/style/base.css, but is just keeps redirecting in an infinite loop, I thought the L parameter would make sure that wouldn't happen.</p> <pre><code>RewriteRule (.*)/base.css$ include/style...
[ { "answer_id": 331625, "author": "Nick Berardi", "author_id": 17, "author_profile": "https://Stackoverflow.com/users/17", "pm_score": 3, "selected": true, "text": "RewriteRule (.*)/(.*).css$ /include/style/$2.css [L,NC]\n" }, { "answer_id": 331647, "author": "Eli", "autho...
2008/12/01
[ "https://Stackoverflow.com/questions/331620", "https://Stackoverflow.com", "https://Stackoverflow.com/users/35197/" ]
331,635
<p>There is an executable that is dynamically linked to number of shared objects. How can I determine, to which of them some symbol (imported into executable) belongs ?</p> <p>If there are more than one possibility, could I silmulate ld and see from where it is being taken ?</p>
[ { "answer_id": 339806, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 2, "selected": false, "text": "ld" }, { "answer_id": 555674, "author": "Community", "author_id": -1, "author_profile": "https://Stackover...
2008/12/01
[ "https://Stackoverflow.com/questions/331635", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18174/" ]