qid
int64
4
19.1M
question
stringlengths
18
48.3k
answers
list
date
stringlengths
10
10
metadata
list
44,817
<p>Has anyone used ADO.NET Data Services as a data source for Adobe Flex applications? If so, any success stories or tragedies to avoid? If you did use it, how did you handle security?</p>
[ { "answer_id": 45891, "author": "Adam Cuzzort", "author_id": 4760, "author_profile": "https://Stackoverflow.com/users/4760", "pm_score": 3, "selected": true, "text": "this.DeferredLoadingEnabled = false;\nDataLoadOptions dlo = new DataLoadOptions();\ndlo.LoadWith<Order>(q => q.Payments);...
2008/09/04
[ "https://Stackoverflow.com/questions/44817", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4541/" ]
44,834
<p>I see <code>__all__</code> in <code>__init__.py</code> files. What does it do?</p>
[ { "answer_id": 44842, "author": "Jimmy", "author_id": 4435, "author_profile": "https://Stackoverflow.com/users/4435", "pm_score": 11, "selected": true, "text": "import *" }, { "answer_id": 64130, "author": "Alec Thomas", "author_id": 7980, "author_profile": "https://S...
2008/09/04
[ "https://Stackoverflow.com/questions/44834", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1794/" ]
44,853
<p>I'm using ant to generate javadocs, but get this exception over and over - why?</p> <p>I'm using JDK version <strong>1.6.0_06</strong>.</p> <pre><code>[javadoc] java.lang.ClassCastException: com.sun.tools.javadoc.ClassDocImpl cannot be cast to com.sun.javadoc.AnnotationTypeDoc [javadoc] at com.sun.tools.java...
[ { "answer_id": 2030179, "author": "KasthuriRengan", "author_id": 246673, "author_profile": "https://Stackoverflow.com/users/246673", "pm_score": 1, "selected": false, "text": "// sample.java @ChannelPipeline\n //@ChannelPipeline\n ClassCastException" }, { "answer_id": 23737003, ...
2008/09/04
[ "https://Stackoverflow.com/questions/44853", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1310/" ]
44,903
<p>I have multiple selects:</p> <pre><code>&lt;select id="one"&gt; &lt;option value="1"&gt;one&lt;/option&gt; &lt;option value="2"&gt;two&lt;/option&gt; &lt;option value="3"&gt;three&lt;/option&gt; &lt;/select&gt; &lt;select id="two"&gt; &lt;option value="1"&gt;one&lt;/option&gt; &lt;option value="2"&gt;two&...
[ { "answer_id": 45906, "author": "travis", "author_id": 1414, "author_profile": "https://Stackoverflow.com/users/1414", "pm_score": 2, "selected": false, "text": "changeOnce $(function () {\n var $one = $(\"#one\");\n var $two = $(\"#two\");\n\n var selectOptions = [];\n $(\"s...
2008/09/04
[ "https://Stackoverflow.com/questions/44903", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1414/" ]
44,905
<p>When writing a switch statement, there appears to be two limitations on what you can switch on in case statements.</p> <p>For example (and yes, I know, if you're doing this sort of thing it probably means your <a href="https://en.wikipedia.org/wiki/Object-oriented_programming" rel="noreferrer">object-oriented</a> (...
[ { "answer_id": 44930, "author": "Rob Walker", "author_id": 3631, "author_profile": "https://Stackoverflow.com/users/3631", "pm_score": 0, "selected": false, "text": "if (t == typeof(int))\n{\n...\n}\nelseif (t == typeof(string))\n{\n...\n}\n...\n" }, { "answer_id": 44936, "au...
2008/09/04
[ "https://Stackoverflow.com/questions/44905", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3394/" ]
44,912
<p>Does the Java language have delegate features, similar to how C# has support for delegates?</p>
[ { "answer_id": 44916, "author": "Patrick", "author_id": 429, "author_profile": "https://Stackoverflow.com/users/429", "pm_score": 5, "selected": false, "text": "delegate multicast" }, { "answer_id": 2075606, "author": "Lawrence Dol", "author_id": 8946, "author_profile...
2008/09/04
[ "https://Stackoverflow.com/questions/44912", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3498/" ]
44,914
<p>My app has many controls on its surface, and more are added dynamically at runtime.</p> <p>Although i am using tabs to limit the number of controls shown, and double-buffering too, it still flickers and stutters when it has to redraw (resize, maximize, etc).</p> <p>What are your tips and tricks to improve WinForms...
[ { "answer_id": 44933, "author": "Jim Harte", "author_id": 4544, "author_profile": "https://Stackoverflow.com/users/4544", "pm_score": 1, "selected": false, "text": "SuspendLayout() ResumeLayout()" } ]
2008/09/04
[ "https://Stackoverflow.com/questions/44914", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1587/" ]
44,917
<p>Is there any efficiency difference in an explicit vs implicit inner join? For example:</p> <pre><code>SELECT * FROM table a INNER JOIN table b ON a.id = b.id; </code></pre> <p>vs.</p> <pre><code>SELECT a.*, b.* FROM table a, table b WHERE a.id = b.id; </code></pre>
[ { "answer_id": 44932, "author": "lomaxx", "author_id": 493, "author_profile": "https://Stackoverflow.com/users/493", "pm_score": 8, "selected": true, "text": "IMPLICIT OUTER JOIN IMPLICIT INNER JOIN" }, { "answer_id": 44982, "author": "deadbug", "author_id": 4646, "au...
2008/09/04
[ "https://Stackoverflow.com/questions/44917", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4316/" ]
44,937
<p>I want to make an etag that matches what Apache produces. How does apache create it's etags?</p>
[ { "answer_id": 44939, "author": "Chris Bartow", "author_id": 497, "author_profile": "https://Stackoverflow.com/users/497", "pm_score": 5, "selected": true, "text": "$fs = stat($file);\nheader(\"Etag: \".sprintf('\"%x-%x-%s\"', $fs['ino'], $fs['size'],base_convert(str_pad($fs['mtime'],16,...
2008/09/04
[ "https://Stackoverflow.com/questions/44937", "https://Stackoverflow.com", "https://Stackoverflow.com/users/497/" ]
44,942
<p>Can you cast a <code>List&lt;int&gt;</code> to <code>List&lt;string&gt;</code> somehow?</p> <p>I know I could loop through and .ToString() the thing, but a cast would be awesome.</p> <p>I'm in C# 2.0 (so no <a href="http://en.wikipedia.org/wiki/Language_Integrated_Query" rel="noreferrer">LINQ</a>).</p>
[ { "answer_id": 44949, "author": "Erik van Brakel", "author_id": 909, "author_profile": "https://Stackoverflow.com/users/909", "pm_score": 3, "selected": false, "text": "List<T>.Convert List<int> list = new List<int>();\nlist.Add(1);\nlist.Add(2);\nlist.Add(3);\nlist.Convert(delegate (int...
2008/09/04
[ "https://Stackoverflow.com/questions/44942", "https://Stackoverflow.com", "https://Stackoverflow.com/users/493/" ]
44,961
<p>I've searched on the Internet for comparisons between <a href="http://en.wikipedia.org/wiki/F_Sharp_%28programming_language%29" rel="noreferrer">F#</a> and <a href="http://en.wikipedia.org/wiki/Haskell_%28programming_language%29" rel="noreferrer">Haskell</a> but haven't found anything really definitive. What are the...
[ { "answer_id": 44995, "author": "Xian", "author_id": 4642, "author_profile": "https://Stackoverflow.com/users/4642", "pm_score": 8, "selected": true, "text": "if(IsSomethingTrue() && AnotherThingTrue())\n{\n do something;\n}\n IsSomethingTrue() AnotherThingTrue()" } ]
2008/09/04
[ "https://Stackoverflow.com/questions/44961", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3394/" ]
44,965
<p>Having briefly looked at Haskell recently, what would be a <em>brief, succinct, practical</em> explanation as to what a monad essentially is?</p> <p>I have found most explanations I've come across to be fairly inaccessible and lacking in practical detail.</p>
[ { "answer_id": 45151, "author": "Chris Conway", "author_id": 1412, "author_profile": "https://Stackoverflow.com/users/1412", "pm_score": 6, "selected": false, "text": ">>= bind return unit return >>= class Monad m where\n return :: a -> m a\n (>>=) :: forall a b . m a -> (a -> m b) -> ...
2008/09/04
[ "https://Stackoverflow.com/questions/44965", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3394/" ]
44,973
<p>Is it currently possible with pre release of ironruby to run rubygems? It seems as if I have to set an environment variable to find them? </p>
[ { "answer_id": 44986, "author": "Orion Edwards", "author_id": 234, "author_profile": "https://Stackoverflow.com/users/234", "pm_score": 4, "selected": true, "text": "igem" }, { "answer_id": 488664, "author": "Jirapong", "author_id": 28843, "author_profile": "https://S...
2008/09/04
[ "https://Stackoverflow.com/questions/44973", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4642/" ]
44,980
<p>How can one determine, in code, how long the machine is locked?</p> <p>Other ideas outside of C# are also welcome.</p> <hr> <p>I like the windows service idea (and have accepted it) for simplicity and cleanliness, but unfortunately I don't think it will work for me in this particular case. I wanted to run this on...
[ { "answer_id": 44987, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": -1, "selected": false, "text": "System.Runtime.InteropServices [DllImport(\"user32\", EntryPoint = \"OpenDesktopA\", CharSet = CharSet.Ansi,SetLastError = tru...
2008/09/04
[ "https://Stackoverflow.com/questions/44980", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1588/" ]
44,989
<p>I'm trying to get the following bit of code to work in LINQPad but am unable to index into a var. Anybody know how to index into a var in LINQ?</p> <pre><code>string[] sa = {"one", "two", "three"}; sa[1].Dump(); var va = sa.Select( (a,i) =&gt; new {Line = a, Index = i}); va[1].Dump(); // Cannot apply indexing with...
[ { "answer_id": 44991, "author": "Joseph Daigle", "author_id": 507, "author_profile": "https://Stackoverflow.com/users/507", "pm_score": 5, "selected": true, "text": "[] System.Collections.Generic.IEnumerable<T> GetEnumerator() ElementAt(int)" }, { "answer_id": 45944, "author"...
2008/09/04
[ "https://Stackoverflow.com/questions/44989", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1463/" ]
44,999
<p>I have a "showall" query string parameter in the url, the parameter is being added dynamically when "Show All/Show Pages" button is clicked. </p> <p>I want the ability to toggle "showall" query string parameter value depending on user clicking the "Show All/Show Pages" button.</p> <p>I'm doing some nested "if's" a...
[ { "answer_id": 45028, "author": "chrisntr", "author_id": 4455, "author_profile": "https://Stackoverflow.com/users/4455", "pm_score": 0, "selected": false, "text": "booleanVar = !booleanVar;" }, { "answer_id": 45034, "author": "bentford", "author_id": 946, "author_prof...
2008/09/04
[ "https://Stackoverflow.com/questions/44999", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3661/" ]
45,004
<p>Is there a way to select a parent element based on the class of a child element in the class? The example that is relevant to me relating to HTML output by a nice menu plugin for <a href="http://drupal.org" rel="noreferrer">http://drupal.org</a>. The output renders like this: </p> <pre><code>&lt;ul class="menu"&...
[ { "answer_id": 45008, "author": "Dave Ward", "author_id": 60, "author_profile": "https://Stackoverflow.com/users/60", "pm_score": 8, "selected": true, "text": "// JavaScript code:\ndocument.getElementsByClassName(\"active\")[0].parentNode;\n\n// jQuery code:\n$('.active').parent().get(0)...
2008/09/05
[ "https://Stackoverflow.com/questions/45004", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4640/" ]
45,015
<p>Given a string of JSON data, how can I safely turn that string into a JavaScript object?</p> <p>Obviously I can do this unsafely with something like:</p> <pre><code>var obj = eval("(" + json + ')'); </code></pre> <p>but that leaves me vulnerable to the JSON string containing other code, which it seems very danger...
[ { "answer_id": 45019, "author": "Mark Biek", "author_id": 305, "author_profile": "https://Stackoverflow.com/users/305", "pm_score": 5, "selected": false, "text": "new Ajax.Request('/some_url', {\n method:'get',\n requestHeaders: {Accept: 'application/json'},\n onSuccess: function(tran...
2008/09/05
[ "https://Stackoverflow.com/questions/45015", "https://Stackoverflow.com", "https://Stackoverflow.com/users/797/" ]
45,030
<p>I'm wanting to parse a string into a nullable int in C#. ie. I want to get back either the int value of the string or null if it can't be parsed.</p> <p>I was kind of hoping that this would work</p> <pre><code>int? val = stringVal as int?; </code></pre> <p>But that won't work, so the way I'm doing it now is I've...
[ { "answer_id": 45037, "author": "Matt Hamilton", "author_id": 615, "author_profile": "https://Stackoverflow.com/users/615", "pm_score": 10, "selected": true, "text": "int.TryParse public static int? ToNullableInt(this string s)\n{\n int i;\n if (int.TryParse(s, out i)) return i;\n ...
2008/09/05
[ "https://Stackoverflow.com/questions/45030", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2975/" ]
45,036
<p>The .NET <a href="http://msdn.microsoft.com/en-us/library/system.idisposable.aspx" rel="noreferrer">IDisposable Pattern</a> <em>implies</em> that if you write a finalizer, and implement IDisposable, that your finalizer needs to explicitly call Dispose. This is logical, and is what I've always done in the rare situat...
[ { "answer_id": 45043, "author": "Matt Bishop", "author_id": 4301, "author_profile": "https://Stackoverflow.com/users/4301", "pm_score": 3, "selected": false, "text": "class Program\n{\n static void Main(string[] args)\n {\n Fred f = new Fred();\n f = null;\n GC...
2008/09/05
[ "https://Stackoverflow.com/questions/45036", "https://Stackoverflow.com", "https://Stackoverflow.com/users/234/" ]
45,042
<p>I need to deploy a few files that were checked in sometime ago (can't remember the exact ones), so I'm looking to get a list so I can deploy just those files. What is the svn command to do this?</p>
[ { "answer_id": 45046, "author": "John Millikin", "author_id": 3560, "author_profile": "https://Stackoverflow.com/users/3560", "pm_score": 3, "selected": true, "text": "svn log --verbose svn diff -r <revision>" }, { "answer_id": 45063, "author": "pix0r", "author_id": 72, ...
2008/09/05
[ "https://Stackoverflow.com/questions/45042", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2567/" ]
45,045
<p>When executing SubmitChanges to the DataContext after updating a couple properties with a LINQ to SQL connection (against SQL Server Compact Edition) I get a "Row not found or changed." ChangeConflictException.</p> <pre><code>var ctx = new Data.MobileServerDataDataContext(Common.DatabasePath); var deviceSessionReco...
[ { "answer_id": 6101981, "author": "Chris Moschini", "author_id": 176877, "author_profile": "https://Stackoverflow.com/users/176877", "pm_score": 4, "selected": false, "text": "protected async Task loginUser(string username)\n{\n using(var db = new Db())\n {\n var user = awai...
2008/09/05
[ "https://Stackoverflow.com/questions/45045", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2723/" ]
45,075
<p>Is there a better way to flash a window in Java than this:</p> <pre><code>public static void flashWindow(JFrame frame) throws InterruptedException { int sleepTime = 50; frame.setVisible(false); Thread.sleep(sleepTime); frame.setVisible(true); Thread.sleep(sleepTime); ...
[ { "answer_id": 45234, "author": "David Crow", "author_id": 2783, "author_profile": "https://Stackoverflow.com/users/2783", "pm_score": 1, "selected": false, "text": "import java.util.Map;\nimport java.util.Timer;\nimport java.util.TimerTask;\nimport java.util.concurrent.ConcurrentHashMap...
2008/09/05
[ "https://Stackoverflow.com/questions/45075", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2598/" ]
45,078
<p>Ok, I asked a question earlier about Flex and ADO.NET Data Services but didn't get much response so I thought I'd rephrase. Does anyone have any experience building Adobe Flex applications with a .NET back-end? If so, what architecture did you use and what third-party tools if any did you employ. I've read a litt...
[ { "answer_id": 67865, "author": "user10440", "author_id": 10440, "author_profile": "https://Stackoverflow.com/users/10440", "pm_score": 2, "selected": false, "text": "/bin var ro:RemoteObject = new RemoteObject( \"GenericDestination\" );\nro.source = \"com.bar.FooService\"\nro.foo.addEve...
2008/09/05
[ "https://Stackoverflow.com/questions/45078", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4541/" ]
45,086
<p>I have a C++ app that needs to connect to a JAVA web app, are there any good, open source SOAP packages for this, or would it be easier to just roll my own?</p>
[ { "answer_id": 84771, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 1, "selected": false, "text": "#define SOAP_FMAC2 __attribute__ ((visibility (\"hidden\")))\n#define SOAP_FMAC4 __attribute__ ((visibility (\"hidden\")))\n#...
2008/09/05
[ "https://Stackoverflow.com/questions/45086", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2066/" ]
45,093
<p>Is there a Regular Expression that can detect SQL in a string? Does anyone have a sample of something that they have used before to share?</p>
[ { "answer_id": 45096, "author": "Hank Gay", "author_id": 4203, "author_profile": "https://Stackoverflow.com/users/4203", "pm_score": 6, "selected": true, "text": "PreparedStatement" }, { "answer_id": 45099, "author": "SQLMenace", "author_id": 740, "author_profile": "h...
2008/09/05
[ "https://Stackoverflow.com/questions/45093", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4541/" ]
45,097
<p>I assume that you can't use a JavaScript code snippet to validate if the browser user has turned off JavaScript. So what can I use instead? Can someone offer a code sample?</p> <p>I'm looking to wrap an if/then statement around it.</p> <p>I often code in CFML, if that helps.</p>
[ { "answer_id": 45104, "author": "Chris Marasti-Georg", "author_id": 96, "author_profile": "https://Stackoverflow.com/users/96", "pm_score": 1, "selected": false, "text": "<noscript>\n ...some non-js code\n</noscript>\n" }, { "answer_id": 45133, "author": "Community", "...
2008/09/05
[ "https://Stackoverflow.com/questions/45097", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
45,123
<p>I am designing a new System and I have a lot of Interfaces that will grow over time with the system. What is the best practice to name this interfaces</p> <pre><code>ISomethingV01 ISomethingV02 etc </code></pre> <p>and I do this</p> <pre><code>public interface ISomething{ void method(); } </code></pre> <p>...
[ { "answer_id": 45127, "author": "FlySwat", "author_id": 1965, "author_profile": "https://Stackoverflow.com/users/1965", "pm_score": 2, "selected": false, "text": "public interface ISomething\n\npublic class Something1 : ISomething\npublic class Something2 : ISomething\n" } ]
2008/09/05
[ "https://Stackoverflow.com/questions/45123", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1154/" ]
45,132
<p>In particular, I have to extract all the messages and attachments from Lotus Notes files in the fastest and most reliable way. Another point that may be relevant is that I need to do this from a secondary thread.</p> <p><strong>Edit</strong></p> <p>Thanks for the answers - both of which are good. I should provide ...
[ { "answer_id": 226491, "author": "GvS", "author_id": 11492, "author_profile": "https://Stackoverflow.com/users/11492", "pm_score": 2, "selected": false, "text": "Dim oSess As Object = Nothing\noSess = CreateObject(\"Notes.NotesSession\")\n" }, { "answer_id": 3267347, "author"...
2008/09/05
[ "https://Stackoverflow.com/questions/45132", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1899/" ]
45,135
<p>Why does the order in which libraries are linked sometimes cause errors in GCC?</p>
[ { "answer_id": 409470, "author": "Johannes Schaub - litb", "author_id": 34509, "author_profile": "https://Stackoverflow.com/users/34509", "pm_score": 9, "selected": false, "text": "// a depends on b, b depends on d\n$ cat a.cpp\nextern int a;\nint main() {\n return a;\n}\n\n$ cat b.cpp\...
2008/09/05
[ "https://Stackoverflow.com/questions/45135", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1597/" ]
45,152
<p>What particular method/application are you using to communicate between your application and a database? Custom code with stored procedures? SubSonic? nHibernate? Entity Framework? LINQ?</p>
[ { "answer_id": 45257, "author": "Lars Mæhlum", "author_id": 960, "author_profile": "https://Stackoverflow.com/users/960", "pm_score": 0, "selected": false, "text": "IPersonRepository : IReadRepository<Person>, ICreateRepository<Person>, IUpdateRepository<Person> //and so on..\n" } ]
2008/09/05
[ "https://Stackoverflow.com/questions/45152", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4550/" ]
45,163
<p>Given this HTML:</p> <pre><code>&lt;ul id="topnav"&gt; &lt;li id="topnav_galleries"&gt;&lt;a href="#"&gt;Galleries&lt;/a&gt;&lt;/li&gt; &lt;li id="topnav_information"&gt;&lt;a href="#"&gt;Information&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; </code></pre> <p>And this CSS:</p> <pre class="lang-css prettyprint-overr...
[ { "answer_id": 45429, "author": "Ian Oxley", "author_id": 1904, "author_profile": "https://Stackoverflow.com/users/1904", "pm_score": 3, "selected": true, "text": "#topnav {\n overflow:hidden;\n}\n#topnav li {\n float:left;\n}\n #topnav {\n zoom:1;\n}\n" }, { "answer_id"...
2008/09/05
[ "https://Stackoverflow.com/questions/45163", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1306/" ]
45,169
<p>I need to call into a Win32 API to get a series of strings, and I would like to return an array of those strings to JavaScript. This is for script that runs on local machine for administration scripts, not for the web browser.</p> <p>My IDL file for the COM object has the interface that I am calling into as:</p> <...
[ { "answer_id": 45211, "author": "Shog9", "author_id": 811, "author_profile": "https://Stackoverflow.com/users/811", "pm_score": 4, "selected": true, "text": "SAFEARRAY VARIANT HRESULT GetArrayOfStrings(/*[out, retval]*/ VARIANT* pvarBstrStringArray)\n{\n // ...\n\n _variant_t ret;\n ...
2008/09/05
[ "https://Stackoverflow.com/questions/45169", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1462171/" ]
45,176
<p>I have a rather complex page that dynamically builds user controls inside of a repeater. This repeater must be bound during the Init page event before <code>ViewState</code> is initialized or the dynamically created user controls will not retain their state.</p> <p>This creates an interesting Catch-22 because the o...
[ { "answer_id": 46306, "author": "Daniel Auger", "author_id": 1644, "author_profile": "https://Stackoverflow.com/users/1644", "pm_score": 0, "selected": false, "text": "protected override void LoadViewState(object savedState)\n{\n // Put your code here before base is called\n base.Loa...
2008/09/05
[ "https://Stackoverflow.com/questions/45176", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1965/" ]
45,179
<p>Having worked with Classic ASP for about 2 years now by creating a few 100 simple web forms I can't see a good reason for switching to .net; however, I'm not that versed in .net so I'm sure I could be missing a few things.</p> <p>Some points that I often hear around work can be found here: <a href="http://www.packt...
[ { "answer_id": 2077403, "author": "D'Arcy Rittich", "author_id": 39430, "author_profile": "https://Stackoverflow.com/users/39430", "pm_score": 3, "selected": false, "text": "char string" } ]
2008/09/05
[ "https://Stackoverflow.com/questions/45179", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3349/" ]
45,207
<p>Is there a way to <em>always</em> have LF line endings in Visual Studio? I can never seem to find it!</p>
[ { "answer_id": 14201090, "author": "user1955769", "author_id": 1955769, "author_profile": "https://Stackoverflow.com/users/1955769", "pm_score": 2, "selected": false, "text": "Tools | Options... | Environment | Documents" }, { "answer_id": 20077654, "author": "renadeen", ...
2008/09/05
[ "https://Stackoverflow.com/questions/45207", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4121/" ]
45,227
<p>I have been searching everywhere for the following functionality in Lisp, and have gotten nowhere:</p> <ol> <li><p>find the index of something in a list. example:</p> <pre><code>(index-of item InThisList) </code></pre></li> <li><p>replace something at a specific spot in a list. example:</p> <pre><code>(replace it...
[ { "answer_id": 45233, "author": "Jeremy", "author_id": 1114, "author_profile": "https://Stackoverflow.com/users/1114", "pm_score": 6, "selected": true, "text": "setf nth (let ((myList '(1 2 3 4 5 6)))\n (setf (nth 4 myList) 101); <----\n myList)\n\n(1 2 3 4 101 6)\n position (let...
2008/09/05
[ "https://Stackoverflow.com/questions/45227", "https://Stackoverflow.com", "https://Stackoverflow.com/users/50/" ]
45,228
<p>I've been unable to find a source for this information, short of looking through the Python source code myself to determine how the objects work. Does anyone know where I could find this online?</p>
[ { "answer_id": 45538, "author": "Will Harris", "author_id": 4702, "author_profile": "https://Stackoverflow.com/users/4702", "pm_score": 4, "selected": false, "text": "set dict list list memcpy range(n) map() list() [None] * n realloc pop" } ]
2008/09/05
[ "https://Stackoverflow.com/questions/45228", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1114/" ]
45,230
<p>I have a small local network. Only one of the machines is available to the outside world (this is not easily changeable). I'd like to be able to set it up such that ssh requests that don't come in on the standard port go to another machine. Is this possible? If so, how?</p> <p>Oh and all of these machines are runni...
[ { "answer_id": 45237, "author": "Mark Biek", "author_id": 305, "author_profile": "https://Stackoverflow.com/users/305", "pm_score": 5, "selected": true, "text": "ssh -L 8022:myinsideserver:22 paul@myoutsideserver\n ssh -p 8022 paul@localhost\n" }, { "answer_id": 45254, "autho...
2008/09/05
[ "https://Stackoverflow.com/questions/45230", "https://Stackoverflow.com", "https://Stackoverflow.com/users/85/" ]
45,239
<p>Short version: What is the cleanest and most maintainable technique for consistant presentation and AJAX function across all browsers used by both web developers and web developers' end-users?</p> <ul> <li>IE 6, 7, 8</li> <li>Firefox 2, 3</li> <li>Safari</li> <li>Google Chrome</li> <li>Opera</li> </ul> <p>Long ver...
[ { "answer_id": 679997, "author": "system PAUSE", "author_id": 52963, "author_profile": "https://Stackoverflow.com/users/52963", "pm_score": 5, "selected": true, "text": "if(node.addEventListener)... if(window.attachEvent)..." }, { "answer_id": 691048, "author": "aleemb", ...
2008/09/05
[ "https://Stackoverflow.com/questions/45239", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2938/" ]
45,253
<p>I'm working on a Rails app and am looking to include some functionality from "<a href="https://stackoverflow.com/questions/42566/getting-the-hostname-or-ip-in-ruby-on-rails">Getting the Hostname or IP in Ruby on Rails</a>" that I asked.</p> <p>I'm having problems getting it to work. I was under the impression that ...
[ { "answer_id": 45261, "author": "Curt Hagenlocher", "author_id": 533, "author_profile": "https://Stackoverflow.com/users/533", "pm_score": 3, "selected": true, "text": "require 'socket'\n\nclass GetIP\n def self.local_ip\n orig, Socket.do_not_reverse_lookup = Socket.do_not_reverse_lo...
2008/09/05
[ "https://Stackoverflow.com/questions/45253", "https://Stackoverflow.com", "https://Stackoverflow.com/users/422/" ]
45,277
<p>I see a similar question <a href="https://stackoverflow.com/questions/28588/how-do-you-set-up-an-openid-provider-server-in-ubuntu">for Ubuntu</a>, but I'm interested in hosting my own OpenID provider through my Rails-based site that already has an identity and authentication system in place.</p> <p>Note that I'm no...
[ { "answer_id": 45618, "author": "dbr", "author_id": 745, "author_profile": "https://Stackoverflow.com/users/745", "pm_score": 2, "selected": false, "text": "gem install openid-server" } ]
2008/09/05
[ "https://Stackoverflow.com/questions/45277", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4647/" ]
45,286
<p>I have a console app that needs to display the state of items, but rather than having text scroll by like mad I'd rather see the current status keep showing up on the same lines. For the sake of example:</p> <blockquote> <p><code>Running... nn% complete</code><br> <code>Buffer size: bbbb bytes</code></p> </bl...
[ { "answer_id": 49884, "author": "Patrick Johnmeyer", "author_id": 363, "author_profile": "https://Stackoverflow.com/users/363", "pm_score": 3, "selected": false, "text": "// before entering update loop\nHANDLE h = GetStdHandle(STD_OUTPUT_HANDLE);\nCONSOLE_SCREEN_BUFFER_INFO bufferInfo;\n...
2008/09/05
[ "https://Stackoverflow.com/questions/45286", "https://Stackoverflow.com", "https://Stackoverflow.com/users/363/" ]
45,301
<p>How can I change the title of the command prompt window every time I execute a dos-based program by double clicking it, in c language. Should I use the Windows API?</p>
[ { "answer_id": 2198756, "author": "F. Kam", "author_id": 266061, "author_profile": "https://Stackoverflow.com/users/266061", "pm_score": 2, "selected": false, "text": "title title Windows Title (quotes unneeded)\n" } ]
2008/09/05
[ "https://Stackoverflow.com/questions/45301", "https://Stackoverflow.com", "https://Stackoverflow.com/users/130278/" ]
45,325
<p>Sometimes when I'm editing page or control the .designer files stop being updated with the new controls I'm putting on the page. I'm not sure what's causing this to happen, but I'm wondering if there's any way of forcing Visual Studio to regenerate the .designer file. I'm using Visual Studio 2008</p> <p><strong>E...
[ { "answer_id": 4264088, "author": "WynandB", "author_id": 192886, "author_profile": "https://Stackoverflow.com/users/192886", "pm_score": 0, "selected": false, "text": "CodeBehind @Page CodeFile @Control Inherits" }, { "answer_id": 4770314, "author": "Geoff", "author_id":...
2008/09/05
[ "https://Stackoverflow.com/questions/45325", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2975/" ]
45,340
<p>Python frameworks always provide ways to handle URLs that convey the data of the request in an elegant way, like for example <a href="http://somewhere.overtherainbow.com/userid/123424/" rel="noreferrer">http://somewhere.overtherainbow.com/userid/123424/</a></p> <p>I want you to notice the ending path <strong>/useri...
[ { "answer_id": 406947, "author": "Dominic Betts", "author_id": 50911, "author_profile": "https://Stackoverflow.com/users/50911", "pm_score": 5, "selected": false, "text": "<system.web>\n<compilation debug=\"true\">\n <assemblies>\n …\n <add assembly=\"System....
2008/09/05
[ "https://Stackoverflow.com/questions/45340", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4491/" ]
45,372
<p>Let's say that I want to have a table that logs the date and the number of columns in some other table (or really any sort of math / string concat etc).</p> <pre><code>CREATE TABLE `log` ( `id` INTEGER NOT NULL AUTO_INCREMENT , `date` DATETIME NOT NULL , `count` INTEGER NOT NULL , PRIMARY KEY (`id`) ); </code></pre...
[ { "answer_id": 45382, "author": "Thomas Watnedal", "author_id": 4059, "author_profile": "https://Stackoverflow.com/users/4059", "pm_score": 0, "selected": false, "text": "INSERT INTO log (date, count)\n SELECT DATE() as date, count(id) as count\n from foo;\n" }, { "answer_i...
2008/09/05
[ "https://Stackoverflow.com/questions/45372", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1666/" ]
45,399
<p>I've worked on a number of database systems in the past where moving entries between databases would have been made a lot easier if all the database keys had been <a href="http://en.wikipedia.org/wiki/Globally_Unique_Identifier" rel="noreferrer">GUID / UUID</a> values. I've considered going down this path a few time...
[ { "answer_id": 71069249, "author": "J Scott", "author_id": 2932782, "author_profile": "https://Stackoverflow.com/users/2932782", "pm_score": 1, "selected": false, "text": "stackoverflow.com/questions/45399 portal.com/profile/{customerId} lastKnownCustomerCount + 1 404 - NotFound 403 - Fo...
2008/09/05
[ "https://Stackoverflow.com/questions/45399", "https://Stackoverflow.com", "https://Stackoverflow.com/users/797/" ]
45,407
<p>What are the main differences (if any) between the box models of IE8 and Firefox3?</p> <p>Are they the same now?</p> <p>What are the other main differences between these two browsers? Can a web developer assume that these two browsers as the same since they (seem to) support the latest web standards?</p>
[ { "answer_id": 45483, "author": "Brian Warshaw", "author_id": 1344, "author_profile": "https://Stackoverflow.com/users/1344", "pm_score": 1, "selected": false, "text": "margin: 0 auto" } ]
2008/09/05
[ "https://Stackoverflow.com/questions/45407", "https://Stackoverflow.com", "https://Stackoverflow.com/users/184/" ]
45,408
<p>How does a virtual machine generate native machine code on the fly and execute it?</p> <p>Assuming you can figure out what are the native machine op-codes you want to emit, how do you go about actually running it?</p> <p>Is it something as hacky as mapping the mnemonic instructions to binary codes, stuffing it int...
[ { "answer_id": 3160622, "author": "Maruf Maniruzzaman", "author_id": 381397, "author_profile": "https://Stackoverflow.com/users/381397", "pm_score": 1, "selected": false, "text": "void (*MyFunc)() = (void (*)()) VirtualAlloc(NULL, sizeofblock, MEM_COMMIT, PAGE_EXECUTE_READWRITE);\n\n//N...
2008/09/05
[ "https://Stackoverflow.com/questions/45408", "https://Stackoverflow.com", "https://Stackoverflow.com/users/618/" ]
45,414
<p>I'm using Eclipse 3.4 and have configured the Java code formatter with all of the options on the <em>Comments</em> tab enabled. The problem is that when I format a document comment that contains:</p> <pre><code>* @see &lt;a href="test.html"&gt;test&lt;/a&gt; </code></pre> <p>the code formatter inserts a space in t...
[ { "answer_id": 45574, "author": "Ishmaeel", "author_id": 227, "author_profile": "https://Stackoverflow.com/users/227", "pm_score": 1, "selected": false, "text": "<gcServer enabled=\"true\" /> <!-- note the space just after \"true\" -->\n" } ]
2008/09/05
[ "https://Stackoverflow.com/questions/45414", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2670/" ]
45,424
<p>I'm using <b>Struts 2</b>.</p> <p>I'd like to return from an Action to the page which invoked it.</p> <p>Say I'm in page <strong>x.jsp</strong>, I invoke Visual action to change CSS preferences in the session; I want to return to <strong>x.jsp</strong> rather than to a fixed page (i.e. <strong>home.jsp</strong>)<b...
[ { "answer_id": 45595, "author": "nikhilbelsare", "author_id": 4705, "author_profile": "https://Stackoverflow.com/users/4705", "pm_score": 1, "selected": false, "text": "return INPUT;\n" }, { "answer_id": 202693, "author": "Vincent Ramdhanie", "author_id": 27439, "auth...
2008/09/05
[ "https://Stackoverflow.com/questions/45424", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4690/" ]
45,437
<p>I wondered whether anybody knows how to obtain membership of local groups on a remote server programmatically via C#. Would this require administrator permissions? And if so is there any way to confirm the currently logged in user's membership (or not) of these groups?</p>
[ { "answer_id": 45458, "author": "Espo", "author_id": 2257, "author_profile": "https://Stackoverflow.com/users/2257", "pm_score": 2, "selected": false, "text": "public ArrayList Groups(string userDn, bool recursive)\n{\n ArrayList groupMemberships = new ArrayList();\n return Attribu...
2008/09/05
[ "https://Stackoverflow.com/questions/45437", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3394/" ]
45,453
<p>I'm generating ICalendar (.ics) files.</p> <p>Using the UID and SEQUENCE fields I can update existing events in Google Calendar and in Windows Calendar <strong><em>BUT NOT</em></strong> in MS Outlook 2007 - it just creates a second event</p> <p>How do I get them to work for Outlook ?</p> <p>Thanks</p> <p>Tom</p>...
[ { "answer_id": 45703, "author": "Hank Gay", "author_id": 4203, "author_profile": "https://Stackoverflow.com/users/4203", "pm_score": 0, "selected": false, "text": "VERSION PRODID STATUS SEQUENCE VERSION" }, { "answer_id": 45969, "author": "Tom Carter", "author_id": 2839, ...
2008/09/05
[ "https://Stackoverflow.com/questions/45453", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2839/" ]
45,470
<p>Can you suggest some good MVC framework for perl -- one I am aware of is <a href="http://www.catalystframework.org/" rel="noreferrer">catalyst</a></p> <p>The need is to be able to expose services on the perl infrastructure which can be called by Java/.Net applications seamlessly.</p>
[ { "answer_id": 70871, "author": "Aristotle Pagaltzis", "author_id": 9410, "author_profile": "https://Stackoverflow.com/users/9410", "pm_score": 3, "selected": false, "text": "uri_for" } ]
2008/09/05
[ "https://Stackoverflow.com/questions/45470", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4406/" ]
45,475
<p>I'm presenting information from a DataTable on my page and would like to add some sorting functionality which goes a bit beyond a straight forward column sort. As such I have been trying to place LinkButtons in the HeaderItems of my GridView which post-back to functions that change session information before reloadi...
[ { "answer_id": 45513, "author": "NakedBrunch", "author_id": 3742, "author_profile": "https://Stackoverflow.com/users/3742", "pm_score": 2, "selected": false, "text": "<HeaderTemplate> \n <asp:LinkButton ID=\"LinkButton1\" runat=\"server\" CommandName=\"sort\" CommandArgument=\"Product...
2008/09/05
[ "https://Stackoverflow.com/questions/45475", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4431/" ]
45,481
<p>How can you do a streaming read on a large XML file that contains a xs:sequence just below root element, without loading the whole file into a XDocument instance in memory?</p>
[ { "answer_id": 45493, "author": "Hirvox", "author_id": 4674, "author_profile": "https://Stackoverflow.com/users/4674", "pm_score": 4, "selected": true, "text": "void ParseURL(string strUrl)\n{\n try\n {\n using (var reader = XmlReader.Create(strUrl))\n {\n while (reader.Read...
2008/09/05
[ "https://Stackoverflow.com/questions/45481", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4685/" ]
45,485
<p>Are there conventions for function names when using the Perl Test::More or Test::Simple modules?</p> <p>I'm specifically asking about the names of functions that are used to set up a test environment before the test and to tear down the environment after successful completion of the test(s).</p> <p>cheers,</p> <p...
[ { "answer_id": 45542, "author": "Jagmal", "author_id": 4406, "author_profile": "https://Stackoverflow.com/users/4406", "pm_score": 3, "selected": true, "text": "BEGIN {\n # If you want to set some global db setting/file setting/INC changes etc\n}\n\n# Tests functionality 1...\n{\n ...
2008/09/05
[ "https://Stackoverflow.com/questions/45485", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2974/" ]
45,494
<p>I have a table <code>story_category</code> in my database with corrupt entries. The next query returns the corrupt entries:</p> <pre><code>SELECT * FROM story_category WHERE category_id NOT IN ( SELECT DISTINCT category.id FROM category INNER JOIN story_category ON category_id=category.id); </co...
[ { "answer_id": 45498, "author": "Cheekysoft", "author_id": 1820, "author_profile": "https://Stackoverflow.com/users/1820", "pm_score": 11, "selected": true, "text": "UPDATE tbl AS a\nINNER JOIN tbl AS b ON ....\nSET a.col = b.col\n UPDATE tbl SET col = (\n SELECT ... FROM (SELECT.... FR...
2008/09/05
[ "https://Stackoverflow.com/questions/45494", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2138/" ]
45,507
<p>I'm looking to create <code>favicon.ico</code> files programatically from Python, but PIL only has support for reading <code>ico</code> files.</p>
[ { "answer_id": 36168447, "author": "Ronan Paixão", "author_id": 3754432, "author_profile": "https://Stackoverflow.com/users/3754432", "pm_score": 6, "selected": false, "text": "from PIL import Image\nfilename = r'logo.png'\nimg = Image.open(filename)\nimg.save('logo.ico')\n icon_sizes = ...
2008/09/05
[ "https://Stackoverflow.com/questions/45507", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4203/" ]
45,510
<p>I want to call a function from a .NET DLL (coded in C#) from an Inno Setup script.</p> <p>I have:</p> <ol> <li>marked the <em>Register for COM interop</em> option in the project properties,</li> <li>changed the <em>ComVisible</em> setting in the <em>AssemblyInfo.cs</em> file,</li> <li>added these lines to the ISS ...
[ { "answer_id": 45590, "author": "Marek Grzenkowicz", "author_id": 95, "author_profile": "https://Stackoverflow.com/users/95", "pm_score": 2, "selected": false, "text": "[Code]\nprocedure MyFunction();\nvar\n oleObject: Variant;\nbegin\n oleObject := CreateOleObject('MyDLL.MyDLL');\n\n ...
2008/09/05
[ "https://Stackoverflow.com/questions/45510", "https://Stackoverflow.com", "https://Stackoverflow.com/users/95/" ]
45,528
<p>I'm trying to find a simple way to change the colour of the text and background in <code>listview</code> and <code>treeview</code> controls in WTL or plain Win32 code.</p> <p>I really don't want to have to implement full owner drawing for these controls, simply change the colours used.</p> <p>I want to make sure t...
[ { "answer_id": 49257, "author": "macbirdie", "author_id": 5049, "author_profile": "https://Stackoverflow.com/users/5049", "pm_score": 2, "selected": false, "text": "CListViewCtrl CTreeViewCtrl" } ]
2008/09/05
[ "https://Stackoverflow.com/questions/45528", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4591/" ]
45,535
<p>I need the month+year from the datetime in SQL Server like 'Jan 2008'. I'm grouping the query by month, year. I've searched and found functions like datepart, convert, etc., but none of them seem useful for this. Am I missing something here? Is there a function for this?</p>
[ { "answer_id": 45543, "author": "SQLMenace", "author_id": 740, "author_profile": "https://Stackoverflow.com/users/740", "pm_score": 3, "selected": false, "text": "select convert(varchar(4),getdate(),100) + convert(varchar(4),year(getdate()))\n" }, { "answer_id": 45548, "auth...
2008/09/05
[ "https://Stackoverflow.com/questions/45535", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1688440/" ]
45,540
<p>I’ve writen a little python script that just pops up a message box containing the text passed on the command line. I want to pop it up only when the window —resulting from a previous call— is not open.</p> <pre><code>from Tkinter import * import tkMessageBox root = Tk() root.withdraw() # TODO not if a window wit...
[ { "answer_id": 46205, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 2, "selected": false, "text": "if 'normal' != root.state():\n tkMessageBox.showinfo(\"Key you!\", \" \".join(sys.argv[1:]))\n" }, { "answer_id": 47...
2008/09/05
[ "https://Stackoverflow.com/questions/45540", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4717/" ]
45,545
<p>How can I add horizontal scroll capabilities to the asp.net listbox control?</p>
[ { "answer_id": 45549, "author": "Espo", "author_id": 2257, "author_profile": "https://Stackoverflow.com/users/2257", "pm_score": 1, "selected": false, "text": "<div style=\"width:200px; height:100px; overflow:auto;\">\n<SELECT size=\"4\">\n<OPTION\nValue=\"1\">blahblahblahblahblahblahbla...
2008/09/05
[ "https://Stackoverflow.com/questions/45545", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1360/" ]
45,546
<p>I want my controller to return the right HTTP response code when the user lacks permission to view a particular page.</p>
[ { "answer_id": 45568, "author": "John Boker", "author_id": 2847, "author_profile": "https://Stackoverflow.com/users/2847", "pm_score": 3, "selected": false, "text": "response.setStatus(403)" }, { "answer_id": 45585, "author": "Cheekysoft", "author_id": 1820, "author_p...
2008/09/05
[ "https://Stackoverflow.com/questions/45546", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4702/" ]
45,577
<p>This happened to me in Visual Studio 2008 pre and post 2008 sp1 on more than one computer and to someone else I know, so it can't be an isolated incident.</p> <p>Seemingly random, every so often I lose all syntax highlighting in my aspx page (the html) so that Visual Studio now looks like a really expensive version...
[ { "answer_id": 215482, "author": "Herb Caudill", "author_id": 239663, "author_profile": "https://Stackoverflow.com/users/239663", "pm_score": 1, "selected": false, "text": "Couldn't reformat due to line 123" } ]
2008/09/05
[ "https://Stackoverflow.com/questions/45577", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4050/" ]
45,582
<p>I'm trying to use Groovy to create an interactive scripting / macro mode for my application. The application is OSGi and much of the information the scripts may need is not know up front. I figured I could use GroovyShell and call eval() multiple times continually appending to the namespace as OSGi bundles are loade...
[ { "answer_id": 46115, "author": "toolkit", "author_id": 3295, "author_profile": "https://Stackoverflow.com/users/3295", "pm_score": 0, "selected": false, "text": "def binding = new Binding(x: 6, y: 4)\ndef shell = new GroovyShell(binding)\ndef expression = '''f = x * y'''\nshell.evaluate...
2008/09/05
[ "https://Stackoverflow.com/questions/45582", "https://Stackoverflow.com", "https://Stackoverflow.com/users/287/" ]
45,600
<p>The <a href="http://dev.jquery.com/view/trunk/ui/demos/functional/#ui.dialog" rel="nofollow noreferrer">demos</a> for the jquery ui dialog all use the "flora" theme. I wanted a customized theme, so I used the themeroller to generate a css file. When I used it, everything seemed to be working fine, but later I found ...
[ { "answer_id": 231357, "author": "brostbeef", "author_id": 16437, "author_profile": "https://Stackoverflow.com/users/16437", "pm_score": 3, "selected": true, "text": "<div id=\"SERVICE03_DLG\" class=\"flora\"> <div id=\"SERVICE03_DLG\" class=\"ui-dialog\">" } ]
2008/09/05
[ "https://Stackoverflow.com/questions/45600", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3751/" ]
45,604
<p>C# doesn't require you to specify a generic type parameter if the compiler can infer it, for instance:</p> <pre><code>List&lt;int&gt; myInts = new List&lt;int&gt; {0,1,1, 2,3,5,8,13,21,34,55,89,144,233,377, 610,987,1597,2584,4181,6765}; //this statement is clunky List&lt;string&gt; myStrings = myInts. ...
[ { "answer_id": 45612, "author": "Konrad Rudolph", "author_id": 1968, "author_profile": "https://Stackoverflow.com/users/1968", "pm_score": 3, "selected": false, "text": "class Foo<T> {\n public Foo<U>(U x) { }\n}\n\nvar x = new Foo(1);\n" }, { "answer_id": 45706, "author":...
2008/09/05
[ "https://Stackoverflow.com/questions/45604", "https://Stackoverflow.com", "https://Stackoverflow.com/users/905/" ]
45,611
<p>I have a database with a few dozen tables interlinked with foreign keys. Under normal circumstances, I want the default <code>ON DELETE RESTRICT</code> behavior for those constraints. But when trying to share a snapshot of the database with a consultant, I needed to remove some sensitive data. I wish that my memory ...
[ { "answer_id": 56978, "author": "angch", "author_id": 5386, "author_profile": "https://Stackoverflow.com/users/5386", "pm_score": 0, "selected": false, "text": "createdb -h scratchserver scratchdb\ncreatedb -h scratchserver sanitizeddb\n\npg_dump -h liveserver livedb --schema-only | psql...
2008/09/05
[ "https://Stackoverflow.com/questions/45611", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
45,613
<p>What could be the problem with reversing the array of DOM objects as in the following code:</p> <pre><code>var imagesArr = new Array(); imagesArr = document.getElementById("myDivHolderId").getElementsByTagName("img"); imagesArr.reverse(); </code></pre> <p>In Firefox 3, when I call the <code>reverse()</code> method...
[ { "answer_id": 45740, "author": "Vincent Robert", "author_id": 268, "author_profile": "https://Stackoverflow.com/users/268", "pm_score": 3, "selected": false, "text": "getElementsByTag() var listNodes = document.getElementById(\"myDivHolderId\").getElementsByTagName(\"img\");\nvar arrayN...
2008/09/05
[ "https://Stackoverflow.com/questions/45613", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4723/" ]
45,621
<p>Example</p> <p>I have <code>Person</code>, <code>SpecialPerson</code>, and <code>User</code>. <code>Person</code> and <code>SpecialPerson</code> are just people - they don't have a user name or password on a site, but they are stored in a database for record keeping. User has all of the same data as <code>Person</c...
[ { "answer_id": 45770, "author": "Radu094", "author_id": 3263, "author_profile": "https://Stackoverflow.com/users/3263", "pm_score": 3, "selected": false, "text": "PERSON (personid,persontype, name,address, phone, XMLOtherProperties)\n public string StrangeProperty\n{\nget { return XMLPr...
2008/09/05
[ "https://Stackoverflow.com/questions/45621", "https://Stackoverflow.com", "https://Stackoverflow.com/users/572/" ]
45,623
<p>In Java, what would the best way be to have a constantly listening port open, and still send upon receipt of a packet. I am not particularly savvy with network programming at the moment, so the tutorials I have found on the net aren't particularly helpful.</p> <p>Would it make sense to have the listening socket as ...
[ { "answer_id": 45630, "author": "basszero", "author_id": 287, "author_profile": "https://Stackoverflow.com/users/287", "pm_score": 5, "selected": true, "text": "SocketChannels boolean finished = false;\nint port = 10000;\nServerSocket server = new ServerSocket(port);\n\nwhile (!finished)...
2008/09/05
[ "https://Stackoverflow.com/questions/45623", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4739/" ]
45,624
<p>I use TortoiseSVN to access file based local repo. In all my commits an author is my Windows login name. Is it possible to use different name?</p> <p>I know how to change author after commit but how to change before? Installing apache/svnserver is not an option. </p>
[ { "answer_id": 45673, "author": "Brock Boland", "author_id": 2185, "author_profile": "https://Stackoverflow.com/users/2185", "pm_score": 0, "selected": false, "text": "msznajder file:///msznajder@localhost/some/file/path" }, { "answer_id": 265268, "author": "Rômulo Ceccon", ...
2008/09/05
[ "https://Stackoverflow.com/questions/45624", "https://Stackoverflow.com", "https://Stackoverflow.com/users/501/" ]
45,626
<p>I have a basic CRUD form that uses PageMethods to update the user details, however the Validators don't fire off, I think I need to manually initialize the validators and check whether the validation has passed in my javascript save method. Any ideas on how to do this?</p>
[ { "answer_id": 49371, "author": "Nicholas", "author_id": 2808, "author_profile": "https://Stackoverflow.com/users/2808", "pm_score": 2, "selected": true, "text": "Page_ClientValidate() Page_ClientValidate() function Save()\n {\n var clientValidationPassed =Page_ClientValida...
2008/09/05
[ "https://Stackoverflow.com/questions/45626", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2808/" ]
45,627
<p>In unmanaged C/C++ code, what are the best practices to detect memory leaks? And coding guidelines to avoid? (As if it's that simple ;)</p> <p>We have used a bit of a silly way in the past: having a counter increment for every memory allocation call and decrement while freeing. At the end of the program, the counte...
[ { "answer_id": 45652, "author": "Serge", "author_id": 1007, "author_profile": "https://Stackoverflow.com/users/1007", "pm_score": 3, "selected": false, "text": "vector string auto_ptr unique_ptr unique_ptr shared_ptr" }, { "answer_id": 45717, "author": "John Sibly", "auth...
2008/09/05
[ "https://Stackoverflow.com/questions/45627", "https://Stackoverflow.com", "https://Stackoverflow.com/users/123/" ]
45,634
<p>How do you rewrite this in Linq?</p> <pre><code>SELECT Id, Name FROM TableA WHERE TableA.Id IN (SELECT xx from TableB INNER JOIN Table C....) </code></pre> <p>So in plain english, I want to select Id and Name from TableA where TableA's Id is in a result set from a second query.</p>
[ { "answer_id": 45648, "author": "John Boker", "author_id": 2847, "author_profile": "https://Stackoverflow.com/users/2847", "pm_score": 4, "selected": true, "text": "from a in TableA \nwhere (from b in TableB \n join c in TableC on b.id equals c.id\n where .. select b.id)\n.Co...
2008/09/05
[ "https://Stackoverflow.com/questions/45634", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3047/" ]
45,642
<p>I was wondering if there is an open source library or algorithm that can expand a non-numeric range. For example, if you have <code>1A</code> to <code>9A</code> you should get </p> <pre><code>1A, 2A, 3A, 4A, 5A, 6A, 7A, 8A, 9A. </code></pre> <p>I've tried Googling for this and the best I could come up with were R...
[ { "answer_id": 47126, "author": "Emperor XLII", "author_id": 2495, "author_profile": "https://Stackoverflow.com/users/2495", "pm_score": 0, "selected": false, "text": "0-9 A-Z 1A (1,A) AA1BB2 (AA,1,BB,2) AB CDE AB CD IEnumerable<string> ExpandRange( string start, string end ) {\n // Spl...
2008/09/05
[ "https://Stackoverflow.com/questions/45642", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1210/" ]
45,650
<p>Many times I have seen Visual Studio solutions which have multiple projects that share source files. These common source files are usually out in a common directory and in the solution explorer their icon shows up with a link arrow in the bottom left.</p> <p>However, any time I try to add a source file to the proj...
[ { "answer_id": 45677, "author": "David Mohundro", "author_id": 4570, "author_profile": "https://Stackoverflow.com/users/4570", "pm_score": 2, "selected": false, "text": "<Compile Include=\"..\\CommonAssemblyInfo.cs\">\n <Link>CommonAssemblyInfo.cs</Link>\n</Compile>\n" } ]
2008/09/05
[ "https://Stackoverflow.com/questions/45650", "https://Stackoverflow.com", "https://Stackoverflow.com/users/194/" ]
45,651
<p>I inserted some values into a table. There is a column whose value is auto-generated. In the next statement of my code, I want to retrieve this value.</p> <p>Can you tell me how to do it the right way?</p>
[ { "answer_id": 45657, "author": "DevelopingChris", "author_id": 1220, "author_profile": "https://Stackoverflow.com/users/1220", "pm_score": 0, "selected": false, "text": "SELECT @@Scope_Identity as Id\n" }, { "answer_id": 45665, "author": "David Basarab", "author_id": 246...
2008/09/05
[ "https://Stackoverflow.com/questions/45651", "https://Stackoverflow.com", "https://Stackoverflow.com/users/184/" ]
45,653
<p>We use QuickBooks for financial management, and feed it from a variety of sources. I now need to hook it up to BizTalk, and I'd hate to reinvent the wheel. I've done searches, and as far as I can tell there's no QuickBooks adapter for BizTalk. Does anyone know of anything that'll do the job, preferably something tha...
[ { "answer_id": 45735, "author": "seanyboy", "author_id": 1726, "author_profile": "https://Stackoverflow.com/users/1726", "pm_score": 2, "selected": true, "text": "Imports QBFC7Lib\n\nSub AttachToDB()\n If isAttachedtoQB Then Exit Sub\n\n Lasterror = \"Unknown QuickBooks Error\"\n ...
2008/09/05
[ "https://Stackoverflow.com/questions/45653", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2757/" ]
45,658
<p>I wrote an Active X plugin for IE7 which implements IObjectWithSite besides some other necessary interfaces (note no IOleClient). This interface is queried and called by IE7. During the SetSite() call I retrieve a pointer to IE7's site interface which I can use to retrieve the IHTMLDocument2 interface using the foll...
[ { "answer_id": 63430, "author": "gnobal", "author_id": 7748, "author_profile": "https://Stackoverflow.com/users/7748", "pm_score": 3, "selected": true, "text": "#ifdef WINCE\n// We can't get IWebBrowser2 for WinCE.\n#else\nHRESULT ActiveXUtils::GetWebBrowser2(IUnknown *site, IWebBrowser2...
2008/09/05
[ "https://Stackoverflow.com/questions/45658", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4735/" ]
45,702
<p>Let's say I want to run a .NET application on a machine where the .NET framework is not available; Is there any way to compile the application to native code?</p>
[ { "answer_id": 35467422, "author": "James Ko", "author_id": 4077294, "author_profile": "https://Stackoverflow.com/users/4077294", "pm_score": 5, "selected": false, "text": "cd dotnet compile --native\n dotnet compile --native --cpp\n" }, { "answer_id": 55796754, "author": "kb...
2008/09/05
[ "https://Stackoverflow.com/questions/45702", "https://Stackoverflow.com", "https://Stackoverflow.com/users/184/" ]
45,729
<p>I want to use the <a href="http://msdn.microsoft.com/en-us/library/system.enterpriseservices.internal.publish.gacremove(VS.80).aspx" rel="nofollow noreferrer">Publish.GacRemove</a> function to remove an assembly from GAC. However, I don't understand what path I should pass as an argument.</p> <p>Should it be a path...
[ { "answer_id": 45747, "author": "Espo", "author_id": 2257, "author_profile": "https://Stackoverflow.com/users/2257", "pm_score": 3, "selected": true, "text": "GacInstall GacRemove GacRemove" } ]
2008/09/05
[ "https://Stackoverflow.com/questions/45729", "https://Stackoverflow.com", "https://Stackoverflow.com/users/95/" ]
45,732
<p>I have an object graph serialized to xaml. A rough sample of what it looks like is:</p> <pre><code>&lt;MyObject xmlns.... &gt; &lt;MyObject.TheCollection&gt; &lt;PolymorphicObjectOne .../&gt; &lt;HiImPolymorphic ... /&gt; &lt;/MyObject.TheCollection&gt; &lt;/MyObject&gt; </code></pre> <p>I...
[ { "answer_id": 45747, "author": "Espo", "author_id": 2257, "author_profile": "https://Stackoverflow.com/users/2257", "pm_score": 3, "selected": true, "text": "GacInstall GacRemove GacRemove" } ]
2008/09/05
[ "https://Stackoverflow.com/questions/45732", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
45,769
<p>I'm curious about everyones practices when it comes to using or distributing libraries for an application that you write.</p> <p>First of all, when developing your application do you link the debug or release version of the libraries? (For when you run your application in debug mode)</p> <p>Then when you run your ...
[ { "answer_id": 46120, "author": "Henk", "author_id": 4613, "author_profile": "https://Stackoverflow.com/users/4613", "pm_score": 2, "selected": false, "text": "$(ConfigurationName) $(ProjectDir)\\..\\third-party-prj\\$(ConfigurationName)\\third-party.lib\n xcopy $(ProjectDir)\\..\\third-...
2008/09/05
[ "https://Stackoverflow.com/questions/45769", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4225/" ]
45,779
<p>How would you dynamically subscribe to a C# event so that given a Object instance and a String name containing the name of the event, you subscribe to that event and do something (write to the console for example) when that event has been fired?</p> <p>It would seem using Reflection this isn't possible and I would ...
[ { "answer_id": 45797, "author": "Nick Berardi", "author_id": 17, "author_profile": "https://Stackoverflow.com/users/17", "pm_score": 2, "selected": false, "text": "var o = new SomeObjectWithEvent;\no.GetType().GetEvent(\"SomeEvent\").AddEventHandler(...);\n" }, { "answer_id": 458...
2008/09/05
[ "https://Stackoverflow.com/questions/45779", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1111/" ]
45,783
<p>My team is currently trying to automate the deployment of our .Net and PHP web applications. We want to streamline deployments, and to avoid the hassle and many of the headaches caused by doing it manually.</p> <p>We require a solution that will enable us to:</p> <pre><code>- Compile the application - Version ...
[ { "answer_id": 70621, "author": "Paul Shannon", "author_id": 11503, "author_profile": "https://Stackoverflow.com/users/11503", "pm_score": 1, "selected": false, "text": "msdeploy -verb:sync -source:dirpath=\\\\build\\e$\\app -dest:dirpath=\\\\live\\d$\\app,ignoreAcls=true\n ... > E:\\arc...
2008/09/05
[ "https://Stackoverflow.com/questions/45783", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4734/" ]
45,792
<p>I've had some trouble forking of processes from a Perl CGI script when running on Windows. The main issue seems to be that 'fork' is emulated when running on windows, and doesn't actually seem to create a new process (just another thread in the current one). This means that web servers (like IIS) which are waiting f...
[ { "answer_id": 49216535, "author": "Jeffrey Tackett", "author_id": 6789640, "author_profile": "https://Stackoverflow.com/users/6789640", "pm_score": 0, "selected": false, "text": " (All the CGI code that is standard stuff. Calls the subroutine needed, and then)\n\n my $randnum = int(r...
2008/09/05
[ "https://Stackoverflow.com/questions/45792", "https://Stackoverflow.com", "https://Stackoverflow.com/users/797/" ]
45,796
<p>Our ASP.NET 3.5 website running on IIS 6 has two teams that are adding content: </p> <ul> <li>Development team adding code. </li> <li>Business team adding simple web pages. </li> </ul> <p>For sanity and organization, we would like for the business team to add their web pages to a sub-folder in the project: </p> ...
[ { "answer_id": 45926, "author": "Adam Cuzzort", "author_id": 4760, "author_profile": "https://Stackoverflow.com/users/4760", "pm_score": 2, "selected": true, "text": "RewriteCond %{REQUEST_FILENAME} -!f\nRewriteCond Content/%{REQUEST_FILENAME} -f\nRewriteRule (.*) Content/(.*)\n" } ]
2008/09/05
[ "https://Stackoverflow.com/questions/45796", "https://Stackoverflow.com", "https://Stackoverflow.com/users/308/" ]
45,803
<ol> <li>Video podcast</li> <li>???</li> <li>Audio only mp3 player</li> </ol> <p>I'm looking for somewhere which will extract audio from video, but instead of a single file, for an on going video podcast.</p> <p>I would most like a website which would suck in the RSS and spit out an RSS (I'm thinking of something lik...
[ { "answer_id": 45823, "author": "Tim Farley", "author_id": 4425, "author_profile": "https://Stackoverflow.com/users/4425", "pm_score": 4, "selected": true, "text": "ffmpeg -i episode1.mov -ab 128000 episode1.mp3\n" } ]
2008/09/05
[ "https://Stackoverflow.com/questions/45803", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4737/" ]
45,813
<p>Is there a way with WPF to get an array of elements under the mouse on a MouseMove event?</p>
[ { "answer_id": 182363, "author": "David Schmitt", "author_id": 4918, "author_profile": "https://Stackoverflow.com/users/4918", "pm_score": 6, "selected": true, "text": "Visual [VisualTreeHelper.]HitTest HitTestResultCallback HitTest Visual HitTestResultBehavior Callback(HitTestResult res...
2008/09/05
[ "https://Stackoverflow.com/questions/45813", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3291/" ]
45,824
<p>I notice that StackOverflow has a views count for each question and that these view numbers are fairly low and accurate. </p> <p>I have a similar thing on one of my sites. It basically logs a "hit" whenever the page is loaded in the backend code. Unfortunately it also does this for search engine hits giving bloated...
[ { "answer_id": 45835, "author": "Matt Sheppard", "author_id": 797, "author_profile": "https://Stackoverflow.com/users/797", "pm_score": 4, "selected": true, "text": "<link href=\"empty.css?log=example.html\" rel=\"stylesheet\" type=\"text/css\" />\n" }, { "answer_id": 45844, ...
2008/09/05
[ "https://Stackoverflow.com/questions/45824", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3404/" ]
45,827
<p>How do you automatically set the focus to a textbox when a web page loads?</p> <p>Is there an HTML tag to do it or does it have to be done via Javascript?</p>
[ { "answer_id": 45833, "author": "Espo", "author_id": 2257, "author_profile": "https://Stackoverflow.com/users/2257", "pm_score": 4, "selected": false, "text": "<BODY onLoad=\"document.getElementById('myButton').focus();\">\n function addLoadEvent(func) {\n var oldonload = window.onload;...
2008/09/05
[ "https://Stackoverflow.com/questions/45827", "https://Stackoverflow.com", "https://Stackoverflow.com/users/305/" ]
45,861
<p>I am using <a href="http://code.google.com/p/js2-mode/" rel="noreferrer">js2-mode</a> to edit Javascript in Emacs, but I can't seem to get it to stop using tabs instead of spaces for indentation. My other modes work fine, just having issues w/ js2.</p>
[ { "answer_id": 7957258, "author": "john_fries", "author_id": 998684, "author_profile": "https://Stackoverflow.com/users/998684", "pm_score": 3, "selected": false, "text": ".emacs (setq js2-mode-hook\n '(lambda () (progn\n (set-variable 'indent-tabs-mode nil))))\n" }, { "answe...
2008/09/05
[ "https://Stackoverflow.com/questions/45861", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4748/" ]
45,865
<p>I'm writing a wizard for an Eclipse RCP application. After doing some processing on a file and taking some user input, I don't want to let the user go back to make changes. At this point they must either accept or reject the changes they are about to make to the system.</p> <p>What I can't seem to find is a metho...
[ { "answer_id": 6780595, "author": "Nick Sawadsky", "author_id": 856583, "author_profile": "https://Stackoverflow.com/users/856583", "pm_score": 3, "selected": false, "text": "public abstract class MyWizardPage extends WizardPage {\n private boolean backButtonEnabled = true;\n\n pub...
2008/09/05
[ "https://Stackoverflow.com/questions/45865", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4513/" ]
45,888
<p>I have jQuery but I'm not sure if it has any built-in sorting helpers. I could make a 2d array of each item's <code>text</code>, <code>value</code>, and <code>selected</code> properties, but I don't think that javascript's built in <code>Array.sort()</code> would work correctly.</p>
[ { "answer_id": 45890, "author": "travis", "author_id": 1414, "author_profile": "https://Stackoverflow.com/users/1414", "pm_score": 3, "selected": false, "text": "function sortSelect(selectToSort) {\n var arrOptions = [];\n\n for (var i = 0; i < selectToSort.options.length; i++) {\...
2008/09/05
[ "https://Stackoverflow.com/questions/45888", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1414/" ]
45,898
<p>In an application that I'm writing I have some code like this:</p> <pre><code>NSWorkspace* ws = [NSWorkspace sharedWorkspace]; NSString* myurl = @"http://www.somewebsite.com/method?a=%d"; NSURL* url = [NSURL URLWithString:myurl]; [ws openURL:url]; </code></pre> <p>The main difference being that <em>myurl</em> co...
[ { "answer_id": 45905, "author": "Matt Sheppard", "author_id": 797, "author_profile": "https://Stackoverflow.com/users/797", "pm_score": 2, "selected": false, "text": "http://www.somewebsite.com/method?a=%25d\n" }, { "answer_id": 8665933, "author": "nverinaud", "author_id"...
2008/09/05
[ "https://Stackoverflow.com/questions/45898", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2998/" ]
45,904
<p><strong>Situation:</strong></p> <p>I have a simple <em>XML</em> document that contains image information. I need to transform it into <em>HTML</em>. However, I can't see where the open tag is and when I use the <em>XSL</em> code below, it shows the following error message: </p> <blockquote> <p>"Cannot write an a...
[ { "answer_id": 45912, "author": "Cory Foy", "author_id": 4083, "author_profile": "https://Stackoverflow.com/users/4083", "pm_score": 2, "selected": false, "text": "<xsl:value-of select=\"/root/Image/img/@src\"/>\n" }, { "answer_id": 45955, "author": "samjudson", "author_i...
2008/09/05
[ "https://Stackoverflow.com/questions/45904", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2757/" ]