qid
int64
4
19.1M
question
stringlengths
18
48.3k
answers
list
date
stringlengths
10
10
metadata
list
254,080
<p>I am using the SoundEngine sample code from Apple in the CrashLanding sample to play back multiple audio files. Using the sample caf files included with CrashLanding everything works fine but when I try and use my own samplesconverted to CAF using afconvert all I get is a stony silence ;)</p> <p>Does anyone have se...
[ { "answer_id": 255151, "author": "Dave Verwer", "author_id": 4496, "author_profile": "https://Stackoverflow.com/users/4496", "pm_score": 9, "selected": true, "text": "afconvert -f caff -d LEI16@44100 -c 1 in.wav out.caf\n afconvert -h" }, { "answer_id": 2413799, "author": "to...
2008/10/31
[ "https://Stackoverflow.com/questions/254080", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4496/" ]
254,096
<p>In .Net (VB more specifically, but that doesn't really matter), is there a way to change the format of a number from one culture to another strictly through the that number's type? </p> <p>The issue is this: In English, the number is say, 123.45. Whereas in Sweden, the number would be 123,45</p> <p>Is there a way...
[ { "answer_id": 254108, "author": "dove", "author_id": 30913, "author_profile": "https://Stackoverflow.com/users/30913", "pm_score": 2, "selected": false, "text": "Thread.CurrentThread.CurrentCulture = New CultureInfo(\"se-SE\")\nThread.CurrentThread.CurrentUICulture = Thread.CurrentThrea...
2008/10/31
[ "https://Stackoverflow.com/questions/254096", "https://Stackoverflow.com", "https://Stackoverflow.com/users/30816/" ]
254,099
<p>I'm trying to write some LINQ To SQL code that would generate SQL like</p> <pre><code>SELECT t.Name, g.Name FROM Theme t INNER JOIN ( SELECT TOP 5 * FROM [Group] ORDER BY TotalMembers ) as g ON t.K = g.ThemeK </code></pre> <p>So far I have</p> <pre><code>var q = from t in dc.Themes join g in dc.Groups on t.K...
[ { "answer_id": 254105, "author": "Jon Skeet", "author_id": 22656, "author_profile": "https://Stackoverflow.com/users/22656", "pm_score": 2, "selected": false, "text": "var q = from t in dc.Themes \njoin g in dc.Groups on t.K equals g.ThemeK into groups \nselect new { t.Name, Groups = \n ...
2008/10/31
[ "https://Stackoverflow.com/questions/254099", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2086/" ]
254,111
<p>I have a flash app in my page, and when a user interacts with the flash app, the browser/html/javascript stops receiving keyboard input. </p> <p>For example, in Firefox control-t no longer opens a new tab.</p> <p>However, if I click on part of the page that isn't flash, the browser starts receiving these events a...
[ { "answer_id": 254180, "author": "Diodeus - James MacFarlane", "author_id": 12579, "author_profile": "https://Stackoverflow.com/users/12579", "pm_score": 0, "selected": false, "text": "document.body.focus()\n" }, { "answer_id": 254440, "author": "discorax", "author_id": 3...
2008/10/31
[ "https://Stackoverflow.com/questions/254111", "https://Stackoverflow.com", "https://Stackoverflow.com/users/32951/" ]
254,121
<p>I have an application in which most requests are submitted via AJAX, though some are submitted via "regular" HTTP requests. If a request is submitted and the user's session has timed out, the following JSON is returned:</p> <pre><code>{"authentication":"required"} </code></pre> <p>The JavaScript function which sub...
[ { "answer_id": 254142, "author": "Greg", "author_id": 24181, "author_profile": "https://Stackoverflow.com/users/24181", "pm_score": 2, "selected": false, "text": "outputJson=1" }, { "answer_id": 254157, "author": "AlexJReid", "author_id": 32320, "author_profile": "htt...
2008/10/31
[ "https://Stackoverflow.com/questions/254121", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2648/" ]
254,125
<p>I'm writing a mapping app that uses a Canvas for positioning elements. For each element I have to programatically convert element's Lat/Long to the canvas' coordinate, then set the Canvas.Top and Canvas.Left properties.</p> <p>If I had a 360x180 Canvas, can I convert the coordinates on the canvas to go from -180 t...
[ { "answer_id": 254155, "author": "MojoFilter", "author_id": 93, "author_profile": "https://Stackoverflow.com/users/93", "pm_score": 0, "selected": false, "text": "Point ToCanvas(double lat, double lon) {\n double x = ((lon * myCanvas.ActualWidth) / 360.0) - 180.0;\n double y = ((lat * ...
2008/10/31
[ "https://Stackoverflow.com/questions/254125", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4580/" ]
254,129
<p>How can I display a sort arrow in the header of the sorted column in a list view which follows the native look of the operating system?</p>
[ { "answer_id": 254139, "author": "Andrew Moore", "author_id": 26210, "author_profile": "https://Stackoverflow.com/users/26210", "pm_score": 7, "selected": true, "text": "[EditorBrowsable(EditorBrowsableState.Never)]\npublic static class ListViewExtensions\n{\n [StructLayout(LayoutKind...
2008/10/31
[ "https://Stackoverflow.com/questions/254129", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26210/" ]
254,132
<p>I am wondering what are the possible value for *_la_LDFLAGS in Makefile.am ? </p> <p>If I ask this question, it is because I would like the following :</p> <pre><code>Actual shared library : libA.so (or with the version number I don't care) Symbolic links : libA-X.Y.Z.so, libA-X.so, libA.so soname : ...
[ { "answer_id": 255663, "author": "adl", "author_id": 27835, "author_profile": "https://Stackoverflow.com/users/27835", "pm_score": 3, "selected": true, "text": "-version-info -release" } ]
2008/10/31
[ "https://Stackoverflow.com/questions/254132", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20986/" ]
254,152
<p>I'm curious to know how NULLs are stored into a database ?</p> <p>It surely depends on the database server but I would like to have an general idea about it.</p> <hr> <p>First try:</p> <p>Suppose that the server put a undefined value (could be anything) into the field for a NULL value.</p> <p>Could you be very ...
[ { "answer_id": 266692, "author": "Bjarke Ebert", "author_id": 31890, "author_profile": "https://Stackoverflow.com/users/31890", "pm_score": 1, "selected": false, "text": "| DBServer | SpecialValue |\n+--------------+--------------+\n| 'Oracle' | 'Glyph' |\n| 'SQL Server' | '...
2008/10/31
[ "https://Stackoverflow.com/questions/254152", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14673/" ]
254,168
<p>I have two tables:</p> <p>Table 1: ID, PersonCode, Name, </p> <p>Table 2: ID, Table1ID, Location, ServiceDate</p> <p>I've got a query joining table 1 to table 2 on table1.ID = table2.Table1ID where PersonCode = 'XYZ'</p> <p>What I want to do is return Table1.PersonCode,Table1.Name, Table2.Location, Table2.Servic...
[ { "answer_id": 254185, "author": "Tony Andrews", "author_id": 18747, "author_profile": "https://Stackoverflow.com/users/18747", "pm_score": 0, "selected": false, "text": "select Table1.PersonCode,Table1.Name, Table2.Location, Table2.ServiceDate\nfrom Table1\njoin Table2 on table1.ID = ta...
2008/10/31
[ "https://Stackoverflow.com/questions/254168", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9266/" ]
254,172
<p>I'm experiencing a strange issue where my Visual Studio 2005 C++ program crashes the first time it runs after a new build. I'm having a difficult time debugging this intermittent issue and I suspect it's somehow related to a file somewhere on my hard drive that is being changed. If I can find the file(s), that mig...
[ { "answer_id": 254268, "author": "Joshua Swink", "author_id": 14732, "author_profile": "https://Stackoverflow.com/users/14732", "pm_score": 0, "selected": false, "text": "touch ~/test-marker\n# run your program\nfind <directory> -newer ~/test-marker\n" } ]
2008/10/31
[ "https://Stackoverflow.com/questions/254172", "https://Stackoverflow.com", "https://Stackoverflow.com/users/191808/" ]
254,178
<p>Currently I'm using</p> <pre><code>var x = dict.ContainsKey(key) ? dict[key] : defaultValue </code></pre> <p>I'd like some way to have dictionary[key] return null for nonexistant keys, so I could write something like</p> <pre><code>var x = dict[key] ?? defaultValue; </code></pre> <p>this also winds up being par...
[ { "answer_id": 254188, "author": "TcKs", "author_id": 20382, "author_profile": "https://Stackoverflow.com/users/20382", "pm_score": 3, "selected": false, "text": "public abstract class MyHelper {\n public static V GetValueOrDefault<K,V>( Dictionary<K,V> dic, K key ) {\n V ret;\...
2008/10/31
[ "https://Stackoverflow.com/questions/254178", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4435/" ]
254,184
<p>I have a simple HTML upload form, and I want to specify a default extension ("*.drp" for example). I've read that the way to do this is through the ACCEPT attribute of the input tag, but I don't know how exactly.</p> <pre><code>&lt;form enctype="multipart/form-data" action="uploader.php" method="POST"&gt; Upload DR...
[ { "answer_id": 254205, "author": "Diodeus - James MacFarlane", "author_id": 12579, "author_profile": "https://Stackoverflow.com/users/12579", "pm_score": 1, "selected": false, "text": "<form name=\"someform\"enctype=\"multipart/form-data\" action=\"uploader.php\" method=\"POST\">\n<input...
2008/10/31
[ "https://Stackoverflow.com/questions/254184", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11236/" ]
254,197
<p>What I am looking for is the equivalent of <code>System.Windows.SystemParameters.WorkArea</code> for the monitor that the window is currently on.</p> <p><strong>Clarification:</strong> The window in question is <code>WPF</code>, not <code>WinForm</code>.</p>
[ { "answer_id": 254241, "author": "Jeff Yates", "author_id": 23234, "author_profile": "https://Stackoverflow.com/users/23234", "pm_score": 8, "selected": true, "text": "Screen.FromControl Screen.FromPoint Screen.FromRectangle class MyForm : Form\n{\n public Rectangle GetScreen()\n {\n ...
2008/10/31
[ "https://Stackoverflow.com/questions/254197", "https://Stackoverflow.com", "https://Stackoverflow.com/users/28736/" ]
254,200
<p>Unsure if I've phrased this correctly, but in the callback how do I reference the controls property of the base class?</p> <p>This has been bugging me for some time and I usually work around it, but I'd be grateful if anybody can enlighten me on how I should do this properly.</p> <pre><code>var base = function() {...
[ { "answer_id": 254233, "author": "Peter Bailey", "author_id": 8815, "author_profile": "https://Stackoverflow.com/users/8815", "pm_score": 1, "selected": false, "text": "var base = function() {\nvar controls = {};\n\nreturn {\n init: function(c) {\n this.controls = c\n },...
2008/10/31
[ "https://Stackoverflow.com/questions/254200", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9948/" ]
254,212
<p>We're seeing <code>JTable</code> selection get cleared when we do a <code>fireTableDataChanged()</code> or <code>fireTableRowsUpdated()</code> from the <code>TableModel</code>.</p> <p>Is this expected, or are we doing something wrong? I didn't see any property on the <code>JTable</code> (or other related classes) ...
[ { "answer_id": 256846, "author": "Rastislav Komara", "author_id": 22068, "author_profile": "https://Stackoverflow.com/users/22068", "pm_score": 1, "selected": false, "text": "fireTableDataChanged() fireTableRowsUpdated()" }, { "answer_id": 9786644, "author": "Peter Berg", ...
2008/10/31
[ "https://Stackoverflow.com/questions/254212", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20734/" ]
254,213
<p>I need to handle resultsets returning stored procedures/functions for three databases (Oracle, sybase, MS-Server). The procedures/functions are generally the same but the call is a little different in Oracle.</p> <pre><code>statement.registerOutParameter(1, oracle.jdbc.OracleTypes.CURSOR); ... statement.execute(); ...
[ { "answer_id": 9064789, "author": "Rinat Tainov", "author_id": 479625, "author_profile": "https://Stackoverflow.com/users/479625", "pm_score": 2, "selected": false, "text": "databaseName = new PlatformUtils().determineDatabaseType(dataSource)\n" } ]
2008/10/31
[ "https://Stackoverflow.com/questions/254213", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
254,214
<p>Is there any good software that will allow me to search through my SVN respository for code snippets? I found 'FishEye' but the cost is 1,200 and well outside my budget.</p>
[ { "answer_id": 254801, "author": "Ken", "author_id": 20074, "author_profile": "https://Stackoverflow.com/users/20074", "pm_score": 2, "selected": false, "text": "svn log filetosearch |\n grep '^r' |\n cut -f1 -d' ' |\n xargs -i bash -c \"echo '{}'; svn cat filetosearch -'{}'\" \...
2008/10/31
[ "https://Stackoverflow.com/questions/254214", "https://Stackoverflow.com", "https://Stackoverflow.com/users/33149/" ]
254,216
<p>My table structure looks like this:</p> <pre><code> tbl.users tbl.issues +--------+-----------+ +---------+------------+-----------+ | userid | real_name | | issueid | assignedid | creatorid | +--------+-----------+ +---------+------------+-----------+ | 1 | test_1 | | ...
[ { "answer_id": 254232, "author": "Elie", "author_id": 23249, "author_profile": "https://Stackoverflow.com/users/23249", "pm_score": 0, "selected": false, "text": "SELECT DISTINCT (i.issueid, i.creatorid, i.assignedid, u.real_name)\nFROM issues i, users u\nWHERE u.userid = i.creatorid OR ...
2008/10/31
[ "https://Stackoverflow.com/questions/254216", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2025/" ]
254,229
<p>I have a project that I thought was going to be relatively easy, but is turning out to be more of a pain that I had hoped. First, most of the code I'm interacting with is legacy code that I don't have control over, so I can't do big paradigm changes.</p> <p>Here's a simplified explanation of what I need to do: Sa...
[ { "answer_id": 254283, "author": "Jonathan Leffler", "author_id": 15168, "author_profile": "https://Stackoverflow.com/users/15168", "pm_score": 0, "selected": false, "text": "fork exec" } ]
2008/10/31
[ "https://Stackoverflow.com/questions/254229", "https://Stackoverflow.com", "https://Stackoverflow.com/users/33152/" ]
254,238
<p>I have a table with columns</p> <blockquote> <p>Index, Date</p> </blockquote> <p>where an Index may have multiple Dates, and my goal is the following: select a list that looks like</p> <blockquote> <p>Index, MinDate, MaxDate</p> </blockquote> <p>where each Index is listed only once, and MinDate (MaxDate) rep...
[ { "answer_id": 254249, "author": "John", "author_id": 33149, "author_profile": "https://Stackoverflow.com/users/33149", "pm_score": -1, "selected": false, "text": "SELECT\n [INDEX],\n MIN ( [Date] ),\n MAX ( [Date] )\nFROM\n myTable\nWHERE \n [Date] Between '1/1/2000' And ...
2008/10/31
[ "https://Stackoverflow.com/questions/254238", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10675/" ]
254,244
<p>I am wrestling with a php 5.2.6 problem. An api we use returns dates in this format DDMMYYYYHHMM. Exactly that format, fixed length, no delimiters. However, in my experimentation, this format seems to break strptime, which returns a false (fail) when I feed it a date in this format. It can reproduced, at least on my...
[ { "answer_id": 256018, "author": "Kornel", "author_id": 27009, "author_profile": "https://Stackoverflow.com/users/27009", "pm_score": 1, "selected": false, "text": "setlocale()" }, { "answer_id": 256053, "author": "Ross", "author_id": 2025, "author_profile": "https://...
2008/10/31
[ "https://Stackoverflow.com/questions/254244", "https://Stackoverflow.com", "https://Stackoverflow.com/users/33150/" ]
254,251
<p>I need an easy way to allow users to upload multiple files at once (ie I need to allow a user to upload a folder). I do not wish to put the burden of zipping on the user. </p> <p><em>I would prefer to avoid Flash or variants if possible.</em> I'm looking for a straight javascript / HTML solution if it is possibl...
[ { "answer_id": 254261, "author": "eyelidlessness", "author_id": 17964, "author_profile": "https://Stackoverflow.com/users/17964", "pm_score": 2, "selected": false, "text": "input onchange input input" } ]
2008/10/31
[ "https://Stackoverflow.com/questions/254251", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13990/" ]
254,252
<p>I have some servers in Europe and some in Asia.<br> I would like to be able to work out where the current server is by querying ... something. </p> <p>Is there some global variable I can query or sp_xxx I can execute to find out the locale of the server? </p>
[ { "answer_id": 257376, "author": "Matt Rogish", "author_id": 2590, "author_profile": "https://Stackoverflow.com/users/2590", "pm_score": 2, "selected": false, "text": "sp_helpsort\n" }, { "answer_id": 262359, "author": "Community", "author_id": -1, "author_profile": "...
2008/10/31
[ "https://Stackoverflow.com/questions/254252", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7211/" ]
254,259
<p>I use vim (7.1) on OpenVMS V7.3-2.</p> <p>I connect to VMS trough a telnet session with SmartTerm, a terminal emulator.</p> <p>It works fine.</p> <p>But when I start a telnet session from a VMS session (connected via SmartTerm) to another VMS session, some keys doesn't work properly.</p> <pre><code>|------------...
[ { "answer_id": 257228, "author": "ngn", "author_id": 23109, "author_profile": "https://Stackoverflow.com/users/23109", "pm_score": 1, "selected": false, "text": "t_ :map xxx 0 (press <C-v><Home> in place of xxx)\n:map xxx <C-b> (press <C-v><PgUp> in place of xxx)\n... etc\n...
2008/10/31
[ "https://Stackoverflow.com/questions/254259", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14673/" ]
254,260
<p>This question is a follow up to: <a href="https://stackoverflow.com/questions/252267/why-cant-i-call-a-method-outside-of-an-anonymous-class-of-the-same-name">Why can’t I call a method outside of an anonymous class of the same name</a></p> <p>This previous question answer <b>why</b>, but now I want to know if javac ...
[ { "answer_id": 254328, "author": "nsayer", "author_id": 13757, "author_profile": "https://Stackoverflow.com/users/13757", "pm_score": 1, "selected": false, "text": "NotApplicable.this.run(42);\n" } ]
2008/10/31
[ "https://Stackoverflow.com/questions/254260", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21838/" ]
254,267
<p>I'm thinking about how to do this, but I have several different shapes of Data in my Database, Articles, NewsItems, etc. </p> <p>They All have something in common, they all have IDs (in the DB they're named ArticleID, NewsID etc. )</p> <p>They all have a <strong>Title</strong></p> <p>They all have <strong>BodyTe...
[ { "answer_id": 254452, "author": "Vyrotek", "author_id": 10941, "author_profile": "https://Stackoverflow.com/users/10941", "pm_score": 3, "selected": true, "text": "List<IContent> public partial class SomeContent : IContent\n" } ]
2008/10/31
[ "https://Stackoverflow.com/questions/254267", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26931/" ]
254,271
<p>The WPF control WindowsFormsHost inherits from IDisposable.</p> <p>If I have a complex WPF visual tree containing some of the above controls what event or method can I use to call IDispose during shutdown?</p>
[ { "answer_id": 257591, "author": "Todd White", "author_id": 30833, "author_profile": "https://Stackoverflow.com/users/30833", "pm_score": 3, "selected": false, "text": "public partial class Dialog : Window\n{\n public Dialog()\n {\n InitializeComponent();\n }\n\n prote...
2008/10/31
[ "https://Stackoverflow.com/questions/254271", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5427/" ]
254,273
<p>Why does this lambda expression not compile?</p> <pre><code>Action a = () =&gt; throw new InvalidOperationException(); </code></pre> <p>Conjecture is fine, but I would really appreciate references to the C# language specification or other documentation.</p> <p>And yes, I know that the following is valid and will ...
[ { "answer_id": 254298, "author": "Nic Wise", "author_id": 2947, "author_profile": "https://Stackoverflow.com/users/2947", "pm_score": 1, "selected": false, "text": "Action a = () => { throw new InvalidOperationException(); };\n Action a = () => throw new InvalidOperationException()\n x =...
2008/10/31
[ "https://Stackoverflow.com/questions/254273", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26627/" ]
254,276
<p>First off, I know next to nothing about language theory, and I barely know any other languages except Java, but I had an idea that I think would be cool, but I need you guys to tell me:<br> a: why it sucks<br> b: how language x has had that for years<br> c: how my mind sucks<br> d: all of the above</p> <p>The idea ...
[ { "answer_id": 254352, "author": "Ken Gentle", "author_id": 8709, "author_profile": "https://Stackoverflow.com/users/8709", "pm_score": -1, "selected": false, "text": "belongsTo has-many" }, { "answer_id": 254425, "author": "Mike Deck", "author_id": 1247, "author_prof...
2008/10/31
[ "https://Stackoverflow.com/questions/254276", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4120/" ]
254,278
<p>I'm trying to define a table to store student grades for a online report card. I can't decide how to do it, though.</p> <p>The grades are given by subject, in a trimestral period. Every trimester has a average grade, the total missed classes and a "recovering grade" (I don't know the right term in English, but it's...
[ { "answer_id": 254304, "author": "davr", "author_id": 14569, "author_profile": "https://Stackoverflow.com/users/14569", "pm_score": 0, "selected": false, "text": "grades\n------\nstudentID\nperiodNumber\naverageGrade\nmissedClasses\nrecoveringGrade\n" } ]
2008/10/31
[ "https://Stackoverflow.com/questions/254278", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9835/" ]
254,281
<p>How do you properly override <code>isEqual:</code> in Objective-C? The "catch" seems to be that if two objects are equal (as determined by the <code>isEqual:</code> method), they must have the same hash value.</p> <p>The <a href="http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaFundamentals/CocoaObje...
[ { "answer_id": 254315, "author": "Jens Ayton", "author_id": 6443, "author_profile": "https://Stackoverflow.com/users/6443", "pm_score": 4, "selected": false, "text": "-hash -isEqual: [[NSNumber numberWithInt:0] isEqual:[NSNumber numberWithBool:NO]] [[NSNumber numberWithInt:0] hash] != [[...
2008/10/31
[ "https://Stackoverflow.com/questions/254281", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26825/" ]
254,291
<p>I'm working through <a href="https://rads.stackoverflow.com/amzn/click/com/1590599063" rel="nofollow noreferrer" rel="nofollow noreferrer">Practical Web 2.0 Appications</a> currently and have hit a bit of a roadblock. I'm trying to get PHP, MySQL, Apache, Smarty and the Zend Framework all working correctly so I can...
[ { "answer_id": 254358, "author": "Noah Goodrich", "author_id": 20178, "author_profile": "https://Stackoverflow.com/users/20178", "pm_score": 4, "selected": true, "text": "$this->_engine = new Smarty();\nprint_r($this->_engine);\n" }, { "answer_id": 8919639, "author": "nufnuf"...
2008/10/31
[ "https://Stackoverflow.com/questions/254291", "https://Stackoverflow.com", "https://Stackoverflow.com/users/27673/" ]
254,295
<p>In a table, I have three columns - id, name, and count. A good number of name columns are identical (due to the lack of a UNIQUE early on) and I want to fix this. However, the id column is used by other (4 or 5, I think - I would have to check the docs) tables to look up the name and just removing them would break t...
[ { "answer_id": 254353, "author": "jonnii", "author_id": 4590, "author_profile": "https://Stackoverflow.com/users/4590", "pm_score": 0, "selected": false, "text": "update dependent_table set name_id = <id you want to keep> where name_id in (\n select id from names where name = 'foo' an...
2008/10/31
[ "https://Stackoverflow.com/questions/254295", "https://Stackoverflow.com", "https://Stackoverflow.com/users/572/" ]
254,302
<p>I need a way to determine the type of an HTML element in JavaScript. It has the ID, but the element itself could be a <code>&lt;div&gt;</code>, a <code>&lt;form&gt;</code> field, a <code>&lt;fieldset&gt;</code>, etc. How can I achieve this?</p>
[ { "answer_id": 254308, "author": "Brian Cline", "author_id": 32536, "author_profile": "https://Stackoverflow.com/users/32536", "pm_score": 6, "selected": false, "text": "element.tagName tagName" }, { "answer_id": 254313, "author": "pkaeding", "author_id": 4257, "autho...
2008/10/31
[ "https://Stackoverflow.com/questions/254302", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1103/" ]
254,340
<p>I've tried variations of this, but had no luck other than the ability to start a cygwin window. (wrapped on <strong>;</strong> for clarity)</p> <pre><code>Filename: "c:\cygwin\bin\bash.exe"; Parameters: "-c c:/scripts/step1.sh paramX"; Flags: shellexec waituntilterminated; StatusMsg: "Running the script..." <...
[ { "answer_id": 254370, "author": "Ken Gentle", "author_id": 8709, "author_profile": "https://Stackoverflow.com/users/8709", "pm_score": 1, "selected": false, "text": "cmd.exe shellexec waituntilterminated Filename: \"cmd.exe\"; Parameters: \"/c c:\\cygwin\\bin\\bash -c 'c:/scripts/step1....
2008/10/31
[ "https://Stackoverflow.com/questions/254340", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6144/" ]
254,345
<p>I previously asked how to do this in Groovy. However, now I'm rewriting my app in Perl because of all the CPAN libraries.</p> <p>If the page contained these links:</p> <pre> &lt;a href="http://www.google.com"&gt;Google&lt;/a&gt; &lt;a href="http://www.apple.com"&gt;Apple&lt;/a&gt; </pre> <p>The output would be:...
[ { "answer_id": 254506, "author": "draegtun", "author_id": 12195, "author_profile": "https://Stackoverflow.com/users/12195", "pm_score": 3, "selected": false, "text": "use pQuery;\n\npQuery( 'http://www.perlbuzz.com' )->find( 'a' )->each(\n sub {\n say $_->innerHTML . q{, } . $_...
2008/10/31
[ "https://Stackoverflow.com/questions/254345", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
254,347
<p>We currently have developed an application using WCF. Our clients make connections to different WCF servicehosts located on the server, and the servicehosts return the data from the DB that the clients need. Standard model. However, this current design has all of our WCF data in app.config files both on the client s...
[ { "answer_id": 254506, "author": "draegtun", "author_id": 12195, "author_profile": "https://Stackoverflow.com/users/12195", "pm_score": 3, "selected": false, "text": "use pQuery;\n\npQuery( 'http://www.perlbuzz.com' )->find( 'a' )->each(\n sub {\n say $_->innerHTML . q{, } . $_...
2008/10/31
[ "https://Stackoverflow.com/questions/254347", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4539/" ]
254,349
<p>I have a page with some dynamically added buttons. If you click a button before the page has fully loaded, it throws the classic exception:</p> <blockquote> <pre><code>Invalid postback or callback argument. Event validation is enabled using in configuration or in a page. For </code></pre> <p>security purposes...
[ { "answer_id": 254561, "author": "tvanfosson", "author_id": 12950, "author_profile": "https://Stackoverflow.com/users/12950", "pm_score": 0, "selected": false, "text": "ClientScriptManager.RegisterForEventValidation( button.UniqueID )" }, { "answer_id": 254677, "author": "Jef...
2008/10/31
[ "https://Stackoverflow.com/questions/254349", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26/" ]
254,350
<p>I don't care what the differences are. I just want to know whether the contents are different.</p>
[ { "answer_id": 254357, "author": "Federico A. Ramponi", "author_id": 18770, "author_profile": "https://Stackoverflow.com/users/18770", "pm_score": 8, "selected": true, "text": "from __future__ import with_statement\nwith open(filename1) as f1:\n with open(filename2) as f2:\n if f1...
2008/10/31
[ "https://Stackoverflow.com/questions/254350", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9328/" ]
254,351
<p>I wanted to make Map of Collections in Java, so I can make something like </p> <pre><code>public void add(K key, V value) { if (containsKey(key)) { get(key).add(value); } else { Collection c = new Collection(); c.add(value); put(key, value); } } </code></pre> <p>I've ...
[ { "answer_id": 254372, "author": "erickson", "author_id": 3474, "author_profile": "https://Stackoverflow.com/users/3474", "pm_score": 5, "selected": true, "text": "map Map<K, Collection<V>> computeIfAbsent(...).add(...) map.computeIfAbsent(key, k -> new ArrayList<>()).add(value);\n Set m...
2008/10/31
[ "https://Stackoverflow.com/questions/254351", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4433/" ]
254,354
<p><strong>General Description:</strong></p> <p>To start with what works, I have a <code>UITableView</code> which has been placed onto an Xcode-generated view using Interface Builder. The view's File Owner is set to an Xcode-generated subclass of <code>UIViewController</code>. To this subclass I have added working i...
[ { "answer_id": 254813, "author": "keremk", "author_id": 29475, "author_profile": "https://Stackoverflow.com/users/29475", "pm_score": 2, "selected": false, "text": "tableView UITableViewController IBOutlet UITableView tableView IBOutlet UITableViewController's UITableView UITableView" ...
2008/10/31
[ "https://Stackoverflow.com/questions/254354", "https://Stackoverflow.com", "https://Stackoverflow.com/users/33164/" ]
254,385
<p>I want to simplify my execution of a Groovy script that makes calls to an Oracle database. How do I add the ojdbc jar to the default classpath so that I can run:</p> <pre><code>groovy RunScript.groovy </code></pre> <p>instead of:</p> <pre><code>groovy -cp ojdbc5.jar RunScript.groovy </code></pre>
[ { "answer_id": 254431, "author": "mipadi", "author_id": 28804, "author_profile": "https://Stackoverflow.com/users/28804", "pm_score": 1, "selected": false, "text": "groovy" }, { "answer_id": 254443, "author": "Joey Gibson", "author_id": 6645, "author_profile": "https:...
2008/10/31
[ "https://Stackoverflow.com/questions/254385", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6013/" ]
254,388
<p>How does one go about converting an image to black and white in PHP?</p> <p>Not just turning it into greyscale but every pixel made black or white?</p>
[ { "answer_id": 254427, "author": "Jasper Bekkers", "author_id": 31486, "author_profile": "https://Stackoverflow.com/users/31486", "pm_score": 5, "selected": true, "text": "float gray = (r + g + b) / 3\nif(gray > 0x7F) return 0xFF;\nreturn 0x00;\n" }, { "answer_id": 254776, "a...
2008/10/31
[ "https://Stackoverflow.com/questions/254388", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2118/" ]
254,397
<p>I'm extracting a folder from a tarball, and I see these zero-byte files showing up in the result (where they are not in the source.) Setup (all on OS X):</p> <p>On machine one, I have a directory /My/Stuff/Goes/Here/ containing several hundred files. I build it like this</p> <pre><code>tar -cZf mystuff.tgz /My/St...
[ { "answer_id": 254417, "author": "Rich", "author_id": 22003, "author_profile": "https://Stackoverflow.com/users/22003", "pm_score": -1, "selected": false, "text": "tar Z compress tar" }, { "answer_id": 254422, "author": "Adam Rosenfield", "author_id": 9530, "author_pr...
2008/10/31
[ "https://Stackoverflow.com/questions/254397", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
254,407
<p>I want to create a string that spans multiple lines to assign to a Label Caption property. How is this done in Delphi?</p>
[ { "answer_id": 254412, "author": "Brendan", "author_id": 199, "author_profile": "https://Stackoverflow.com/users/199", "pm_score": 5, "selected": false, "text": "my_string := 'Hello,' + #13#10 + 'world!'; #13#10" }, { "answer_id": 254465, "author": "Zartog", "author_id": ...
2008/10/31
[ "https://Stackoverflow.com/questions/254407", "https://Stackoverflow.com", "https://Stackoverflow.com/users/199/" ]
254,419
<p>I have an aspx page which will upload images to server harddisk from client pc</p> <p>But now i need to change my program in such a way that it would allow me to resize the image while uploading.</p> <p>Does anyone has any idea on this ? I couldnt not find such properties/methods with Input file server control</p>...
[ { "answer_id": 254430, "author": "Dillie-O", "author_id": 71, "author_profile": "https://Stackoverflow.com/users/71", "pm_score": 3, "selected": false, "text": " ''' <summary>\n ''' Resize image with GDI+ so that image is nice and clear with required size.\n ''' </summary>\n '...
2008/10/31
[ "https://Stackoverflow.com/questions/254419", "https://Stackoverflow.com", "https://Stackoverflow.com/users/29982/" ]
254,441
<p>I'm having problems with Iterator.remove() called on a HashSet.</p> <p>I've a Set of time stamped objects. Before adding a new item to the Set, I loop through the set, identify an old version of that data object and remove it (before adding the new object). the timestamp is included in hashCode and equals(), but ...
[ { "answer_id": 254480, "author": "Ken Gentle", "author_id": 8709, "author_profile": "https://Stackoverflow.com/users/8709", "pm_score": 1, "selected": false, "text": "boolean removed = allResults.remove(oldData)\nif (!removed) // COMPLAIN BITTERLY!\n Iterator hashCode equals equalsData" ...
2008/10/31
[ "https://Stackoverflow.com/questions/254441", "https://Stackoverflow.com", "https://Stackoverflow.com/users/32978/" ]
254,449
<p>I'm building a .net application with windows forms. I'm pondering on the following problem: If I specify fonts in my application that are available only in Vista and Office 07, what will happen when the application tries to run in a machine without these ?</p> <p>I suppose the system won't be able to fall back to a...
[ { "answer_id": 254583, "author": "Domenic", "author_id": 3191, "author_profile": "https://Stackoverflow.com/users/3191", "pm_score": 3, "selected": true, "text": "System.Drawing.SystemFonts.MessageBoxFont" } ]
2008/10/31
[ "https://Stackoverflow.com/questions/254449", "https://Stackoverflow.com", "https://Stackoverflow.com/users/354645/" ]
254,451
<p>By default, objects (tables, stored procedures, etc) are set up with the dbo owner/schema (I think ms sql 2000 calls it owner, while ms sql 2005 calls it schema)</p> <p>The owner/schema is really a role or user in the database. I've always left the default of dbo, but I've recently seen some examples in microsoft ...
[ { "answer_id": 254493, "author": "cfeduke", "author_id": 5645, "author_profile": "https://Stackoverflow.com/users/5645", "pm_score": 3, "selected": false, "text": "[Person].[Address] [Company].[Address] [dbo].[PersonAddress]" } ]
2008/10/31
[ "https://Stackoverflow.com/questions/254451", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9266/" ]
254,458
<p><strong>Update</strong></p> <p><em>Got it! See my solution (fifth comment)</em></p> <p>Here is my problem:</p> <p>I have created a small binary called "jail" and in /etc/password I have made it the default shell for a test user.</p> <p>Here is the -- simplified -- source code:</p> <pre><code>#define HOME "/home...
[ { "answer_id": 254529, "author": "ephemient", "author_id": 20713, "author_profile": "https://Stackoverflow.com/users/20713", "pm_score": 2, "selected": false, "text": "-i char *shellargv[] = { SHELL, \"-i\", \"-login\", ... };\nexecvp(SHELL, shellargv);\n ARGV[0] char *shellargv[] = {\"-...
2008/10/31
[ "https://Stackoverflow.com/questions/254458", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6253/" ]
254,461
<p>I have a method with an out parameter that tries to do a type conversion. Basically:</p> <pre><code>public void GetParameterValue(out object destination) { object paramVal = "I want to return this. could be any type, not just string."; destination = null; // default out param to null destination = Conv...
[ { "answer_id": 254464, "author": "Mark Cidade", "author_id": 1659, "author_profile": "https://Stackoverflow.com/users/1659", "pm_score": 0, "selected": false, "text": "System.Object" }, { "answer_id": 254483, "author": "dub", "author_id": 30022, "author_profile": "htt...
2008/10/31
[ "https://Stackoverflow.com/questions/254461", "https://Stackoverflow.com", "https://Stackoverflow.com/users/28278/" ]
254,469
<p>What solutions have people come up with to develop their web applications offline when they made the decision to use OpenId for site membership?</p> <p>Couple of ideas:</p> <ol> <li>Create two login pages one for OpenId and one for ASP.NET Membership</li> <li>Create local OpenId provider with test accounts</li> </...
[ { "answer_id": 373675, "author": "Andrew Arnott", "author_id": 46926, "author_profile": "https://Stackoverflow.com/users/46926", "pm_score": 1, "selected": false, "text": "FormsAuthentication.RedirectFromLoginPage(\"http://blog.nerdbank.net/\")\n" } ]
2008/10/31
[ "https://Stackoverflow.com/questions/254469", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5132/" ]
254,486
<p>Some of my MS SQL stored procedures produce messages using the 'print' command. In my Delphi 2007 application, which connects to MS SQL using TADOConnection, how can I view the output of those 'print' commands?</p> <p>Key requirements: 1) I can't run the query more than once; it might be updating things. 2) I need...
[ { "answer_id": 255311, "author": "Francesca", "author_id": 9842, "author_profile": "https://Stackoverflow.com/users/9842", "pm_score": 4, "selected": true, "text": "SET ANSI_NULLS ON\nGO\nSET QUOTED_IDENTIFIER ON\nGO\nIF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[d...
2008/10/31
[ "https://Stackoverflow.com/questions/254486", "https://Stackoverflow.com", "https://Stackoverflow.com/users/42219/" ]
254,494
<p>I've been struggling coming up with a good solution to separate my testing data from unit tests (hard coded values). Until it dawned on me that I could create beans with spring and use those beans to hold my data. </p> <p>Are there any draw backs to coding my unit tests this way? Albeit they run a bit slower ...
[ { "answer_id": 255311, "author": "Francesca", "author_id": 9842, "author_profile": "https://Stackoverflow.com/users/9842", "pm_score": 4, "selected": true, "text": "SET ANSI_NULLS ON\nGO\nSET QUOTED_IDENTIFIER ON\nGO\nIF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[d...
2008/10/31
[ "https://Stackoverflow.com/questions/254494", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17337/" ]
254,509
<p>I need to leave some instructional comments for other developers on a page/user control. Is there a better way to do this besides the below?</p> <pre><code> &lt;% /* DO NOT rename control IDs here, because blah blah blah... */ %&gt; </code></pre>
[ { "answer_id": 254525, "author": "FlySwat", "author_id": 1965, "author_profile": "https://Stackoverflow.com/users/1965", "pm_score": 0, "selected": false, "text": " <!-- Renders to ClientOutput too -->\n <% /* Your original idea */ %>\n" }, { "answer_id": 254538, "author": "...
2008/10/31
[ "https://Stackoverflow.com/questions/254509", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22303/" ]
254,514
<p>I know that PHP doesn't yet have native Enumerations. But I have become accustomed to them from the Java world. I would love to use enums as a way to give predefined values which IDEs' auto-completion features could understand.</p> <p>Constants do the trick, but there's the namespace collision problem and (or actual...
[ { "answer_id": 254528, "author": "andy.gurin", "author_id": 22388, "author_profile": "https://Stackoverflow.com/users/22388", "pm_score": 5, "selected": false, "text": "class Enum {\n const NAME = 'aaaa';\n const SOME_VALUE = 'bbbb';\n}\n\nprint Enum::NAME;\n" }, { "a...
2008/10/31
[ "https://Stackoverflow.com/questions/254514", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2238/" ]
254,526
<p>My application links against libsamplerate.a. I am doing this to make distributing the final binary easier.</p> <p>I am worried that perhaps the code inside the .a file depends on some other libraries I also will need to distribute.</p> <p>But if it doesn't I am worried I am bloating up my application too much by ...
[ { "answer_id": 254587, "author": "Tim Robinson", "author_id": 32133, "author_profile": "https://Stackoverflow.com/users/32133", "pm_score": 3, "selected": false, "text": "ar ar -t libsamplerate.a\n ar -r tim.a *.txt\n" } ]
2008/10/31
[ "https://Stackoverflow.com/questions/254526", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6444/" ]
254,544
<p>What do I put in my order by?? I want to order by Name. I have moved the orderby after the distinct because I read that it needs to be done last.</p> <pre><code> var result = (from r in db.RecordDocs where r.RecordID == recordID select new { ...
[ { "answer_id": 254547, "author": "Jacob Carpenter", "author_id": 26627, "author_profile": "https://Stackoverflow.com/users/26627", "pm_score": 5, "selected": true, "text": ".OrderBy(doc => doc.Name)\n" }, { "answer_id": 254624, "author": "Jacob Carpenter", "author_id": 26...
2008/10/31
[ "https://Stackoverflow.com/questions/254544", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3047/" ]
254,573
<p>Is there a way to use a <code>foreach</code> loop to iterate through a collection backwards or in a completely random order?</p>
[ { "answer_id": 254601, "author": "Stephen Wrighton", "author_id": 7516, "author_profile": "https://Stackoverflow.com/users/7516", "pm_score": 0, "selected": false, "text": "for (int i=col.count-1; i>0; i--){ \n DoSomething ( col.item[i]) ;\n}\n collection c = originalCollection;\n ...
2008/10/31
[ "https://Stackoverflow.com/questions/254573", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2470/" ]
254,613
<p>When a web site is licensed under Creative Commons, I use the <a href="http://microformats.org/wiki/rel-license" rel="noreferrer">rel-license microformat</a>. When a web site is licensed under regular copyright, I have a boring paragraph element.</p> <pre><code>&lt;p id="copyright"&gt;&amp;copy; 2008 Example Corpor...
[ { "answer_id": 254666, "author": "eyelidlessness", "author_id": 17964, "author_profile": "https://Stackoverflow.com/users/17964", "pm_score": 3, "selected": false, "text": "<dl id=\"copyright\">\n <dt title=\"Copyright\">&copy;</dt>\n <dd>2008 Example Corporation</dd>\n</dl>\n" }...
2008/10/31
[ "https://Stackoverflow.com/questions/254613", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6126/" ]
254,616
<p>I am wondering how I can break up my index.php homepage to multiple php pages (i.e. header.php, footer.php) and build a working index.php page using those separate php pages. I know WordPress uses this with different functions like:</p> <pre><code>GetHeader(); GetFoodter(); </code></pre> <p>But when I tried to us...
[ { "answer_id": 254622, "author": "Scott", "author_id": 6126, "author_profile": "https://Stackoverflow.com/users/6126", "pm_score": 4, "selected": true, "text": "include 'header.php';\n\ninclude 'footer.php';\n" }, { "answer_id": 254626, "author": "Tigraine", "author_id": ...
2008/10/31
[ "https://Stackoverflow.com/questions/254616", "https://Stackoverflow.com", "https://Stackoverflow.com/users/33194/" ]
254,639
<p>currently i have jdbc code with the following basic stucture:</p> <p>get Connection</p> <p>(do the next 4 lines several times, never closing statement)<br> get statement<br> get result set<br> process result set<br> close result set </p> <p>close connection </p> <p>It occurred to me after writing this code tha...
[ { "answer_id": 279101, "author": "asalamon74", "author_id": 21348, "author_profile": "https://Stackoverflow.com/users/21348", "pm_score": 1, "selected": false, "text": "ORA-01000: maximum open cursors exceeded\n" } ]
2008/10/31
[ "https://Stackoverflow.com/questions/254639", "https://Stackoverflow.com", "https://Stackoverflow.com/users/292/" ]
254,669
<p>I've been working with some C# legacy code and I've been seeing a lot of @ symbols in front of variable names. What does this signify or do?</p> <p>Currently I'm seeing it a lot in front of variables with common names that aren't reserved. E.g.:</p> <pre><code>MyProcedure(@step.LoadInstanceId, @step.ResultCode, @s...
[ { "answer_id": 254674, "author": "ripper234", "author_id": 11236, "author_profile": "https://Stackoverflow.com/users/11236", "pm_score": 9, "selected": true, "text": "void Foo(int @string)\n" }, { "answer_id": 254683, "author": "Community", "author_id": -1, "author_pr...
2008/10/31
[ "https://Stackoverflow.com/questions/254669", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7756/" ]
254,673
<p>I have an abstract base class which acts as an interface.</p> <p>I have two "sets" of derived classes, which implement half of the abstract class. ( one "set" defines the abstract virtual methods related to initialization, the other "set" defines those related to the actual "work". )</p> <p>I then have derived cla...
[ { "answer_id": 254696, "author": "James Curran", "author_id": 12725, "author_profile": "https://Stackoverflow.com/users/12725", "pm_score": 1, "selected": false, "text": "class AbsInit: public virtual AbsBase {...};\nclass AbsWork: public virtual AbsBase {...};\nclass NotAbsTotal: public...
2008/10/31
[ "https://Stackoverflow.com/questions/254673", "https://Stackoverflow.com", "https://Stackoverflow.com/users/29701/" ]
254,694
<p>I see little functional difference between using a property</p> <pre><code>public readonly property foo as string get return bar end get end property </code></pre> <p>or a function</p> <pre><code>public function foo() as string return bar end function </code></pre> <p>Why would I want to use one form o...
[ { "answer_id": 254707, "author": "Corey Gaudin", "author_id": 31195, "author_profile": "https://Stackoverflow.com/users/31195", "pm_score": 1, "selected": false, "text": "person.Address.Street;\n person.Address().Street();\n ()" } ]
2008/10/31
[ "https://Stackoverflow.com/questions/254694", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1736623/" ]
254,695
<p>I have a login page where I authenticate the user. When the authentication pass, I then redirect the user to another page via Response.Redirect with the url defined in login control's destinationpageurl.</p> <p>It work fine in firefox but when i test it with IE. It just redirect the user back to the login page.</p>...
[ { "answer_id": 254707, "author": "Corey Gaudin", "author_id": 31195, "author_profile": "https://Stackoverflow.com/users/31195", "pm_score": 1, "selected": false, "text": "person.Address.Street;\n person.Address().Street();\n ()" } ]
2008/10/31
[ "https://Stackoverflow.com/questions/254695", "https://Stackoverflow.com", "https://Stackoverflow.com/users/28647/" ]
254,697
<p>I'm running a PL/SQL block that is supposed to be calling a stored procedure who's output parameters are supposed to be populating variables in the PL/SQL block.</p> <p>The procedure compiles, and the PL/SQL block runs successfully. But I'd like to check the values of the variables populated by the procedure. Is th...
[ { "answer_id": 254727, "author": "James Curran", "author_id": 12725, "author_profile": "https://Stackoverflow.com/users/12725", "pm_score": 2, "selected": false, "text": "dbms_output.put_line(varHere);\n" } ]
2008/10/31
[ "https://Stackoverflow.com/questions/254697", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
254,712
<p>Can I somehow disable spell-checking on HTML textfields (as seen in e.g. Safari)?</p>
[ { "answer_id": 254716, "author": "Eric Wendelin", "author_id": 25066, "author_profile": "https://Stackoverflow.com/users/25066", "pm_score": 10, "selected": true, "text": "<tag autocomplete=\"off\" autocorrect=\"off\" autocapitalize=\"off\" spellcheck=\"false\"/>\n" }, { "answer_...
2008/10/31
[ "https://Stackoverflow.com/questions/254712", "https://Stackoverflow.com", "https://Stackoverflow.com/users/136/" ]
254,719
<p>I'm <em>extremely new</em> to Java, and have mostly just been teaching myself as I go, so I've started building an applet. I'd like to make one that can select a file from the local disk and upload it as a multipart/form-data POST request but <strong>with a progress bar</strong>. Obviously the user has to grant perm...
[ { "answer_id": 255079, "author": "el_eduardo", "author_id": 13469, "author_profile": "https://Stackoverflow.com/users/13469", "pm_score": 2, "selected": false, "text": "\nDiskFileUpload upload = new DiskFileUpload();\nupload.setHeaderEncoding(ConsoleConstants.UTF8_ENCODING);\n\nupload.se...
2008/10/31
[ "https://Stackoverflow.com/questions/254719", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5454/" ]
254,726
<p>I've been told that code such as:</p> <pre><code>for (int i = 0; i &lt; x.length(); i++) { // blah } </code></pre> <p>is actually O(n^2) because of the repeated calls to <code>x.length()</code>. Instead I should use:</p> <pre><code>int l = x.length(); for (int i = 0; i &lt; l; i++) { // blah } </code></pr...
[ { "answer_id": 254742, "author": "Daniel Spiewak", "author_id": 9815, "author_profile": "https://Stackoverflow.com/users/9815", "pm_score": 0, "selected": false, "text": "String#length #length()" }, { "answer_id": 255307, "author": "Alexander", "author_id": 16724, "au...
2008/10/31
[ "https://Stackoverflow.com/questions/254726", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8913/" ]
254,732
<p>Is it possible to determine whether my web site is being accessed as a trusted site? In <a href="https://stackoverflow.com/questions/251696/best-way-to-readset-ie-options">another question</a> we determined that, in general, it is not prudent to have visibility to client IE settings. Would this qualify as an excep...
[ { "answer_id": 254913, "author": "Joel Anair", "author_id": 7441, "author_profile": "https://Stackoverflow.com/users/7441", "pm_score": 2, "selected": false, "text": "function isTrustedIE(){\n try{\n var test=new ActiveXObject(\"Scripting.FileSystemObject\");\n }\n catch(...
2008/10/31
[ "https://Stackoverflow.com/questions/254732", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26671/" ]
254,733
<p>The vast majority of applications does not handle "disk full" scenarios properly. </p> <p>Example: an installer doesn't see that the disk is full, ignores all errors, and finally happily announces "installation complete!", or an email program is unaware that the message it has just downloaded could not be saved, a...
[ { "answer_id": 275261, "author": "Adam Liss", "author_id": 29157, "author_profile": "https://Stackoverflow.com/users/29157", "pm_score": 4, "selected": true, "text": "#2" } ]
2008/10/31
[ "https://Stackoverflow.com/questions/254733", "https://Stackoverflow.com", "https://Stackoverflow.com/users/31615/" ]
254,737
<p>In JSP I can reference a bean's property by using the tag ${object.property}</p> <p>Is there some way to deal with properties that might not exist? I have a JSP page that needs to deal with different types. Example:</p> <pre><code>public class Person { public String getName() } public class Employee extends Pe...
[ { "answer_id": 254769, "author": "sblundy", "author_id": 4893, "author_profile": "https://Stackoverflow.com/users/4893", "pm_score": 0, "selected": false, "text": "public class Person {\n public String getType() { return \"Person\"; }\n public String getName()\n}\npublic class Empl...
2008/10/31
[ "https://Stackoverflow.com/questions/254737", "https://Stackoverflow.com", "https://Stackoverflow.com/users/24396/" ]
254,753
<p>What format do I use for Date/Time when writing to an XML file using .NET? Do I simply use <code>DateTime.ToString()</code>, or do I have to use a specific format?</p>
[ { "answer_id": 254768, "author": "jonnii", "author_id": 4590, "author_profile": "https://Stackoverflow.com/users/4590", "pm_score": 6, "selected": false, "text": "dateTime.ToUniversalTime().ToString(\"s\");\n <xs:element name=\"startdate\" type=\"xs:dateTime\"/>\n <startdate>2002-05-30T0...
2008/10/31
[ "https://Stackoverflow.com/questions/254753", "https://Stackoverflow.com", "https://Stackoverflow.com/users/27414/" ]
254,765
<p>How can I detect whether or not an input box is currently a jQuery UI autocomplete? There doesn't seem to be a native method for this, but I'm hoping there is something simple like this:</p> <pre><code>if ($("#q").autocomplete) { //Do something } </code></pre> <p>That conditional, however, seems to always retur...
[ { "answer_id": 255115, "author": "Randy", "author_id": 9361, "author_profile": "https://Stackoverflow.com/users/9361", "pm_score": 5, "selected": true, "text": "if ($(\"#q\").hasClass(\"ac_input\")) {\n // do something\n}\n if ($(\"#q\").hasClass(\"ui-autocomplete-input\")) {\n // ...
2008/10/31
[ "https://Stackoverflow.com/questions/254765", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3420/" ]
254,784
<p>I have two objects, let's call them <strong><code>Input</code></strong> and <strong><code>Output</code></strong></p> <p><strong><code>Input</code></strong> has properties <em><code>Input_ID</code></em>, <em><code>Label</code></em>, and <em><code>Input_Amt</code></em><br> <strong><code>Output</code></strong> has pro...
[ { "answer_id": 254908, "author": "Jon Skeet", "author_id": 22656, "author_profile": "https://Stackoverflow.com/users/22656", "pm_score": 4, "selected": true, "text": "var InnerQuery = from i in input\n join o in output\n on i.Input_ID equals o.Output_ID in...
2008/10/31
[ "https://Stackoverflow.com/questions/254784", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1373/" ]
254,809
<p>The following code fails at runtime&hellip;</p> <pre> Dim Id As Guid = CType(e.CommandArgument, Guid) </pre> <p>It throws this exception&hellip;</p> <pre> System.InvalidCastException was unhandled by user code Specified cast is not valid </pre> <p>Why can't I cast <strong><em>e.CommandArgument</em></strong> as a...
[ { "answer_id": 254826, "author": "Jonathan S.", "author_id": 2034, "author_profile": "https://Stackoverflow.com/users/2034", "pm_score": 3, "selected": true, "text": "Dim DeleteId As Guid = New Guid(Convert.ToString(e.CommandArgument))\n" }, { "answer_id": 254847, "author": "...
2008/10/31
[ "https://Stackoverflow.com/questions/254809", "https://Stackoverflow.com", "https://Stackoverflow.com/users/83/" ]
254,810
<p>I have a .Net CF 2.0 application and am using log4net to log errors. I get a stack trace, but it doesn't have any line numbers. I noticed that it doesn't appear to deploy the pdb file to the device, so I tried to manually place it in the same directory as the exe. But that didn't help.</p>
[ { "answer_id": 254906, "author": "Oscar Cabrero", "author_id": 14440, "author_profile": "https://Stackoverflow.com/users/14440", "pm_score": 0, "selected": false, "text": "try {\n //code..\n\n }\n catch\n { \n throw;\n }\n" } ]
2008/10/31
[ "https://Stackoverflow.com/questions/254810", "https://Stackoverflow.com", "https://Stackoverflow.com/users/30469/" ]
254,811
<p>My app crashes when I do the following in the applicationDidFinishLaunching event in the app delegate:</p> <pre><code>_textures[mytex] = [[Texture2D alloc] initWithImage: [UIImage imageNamed:@"a.png"]]; </code></pre> <p>However when I replace <code>@"a.png"</code> with</p> <pre><code>@"/Users/MyUserName/Desktop/M...
[ { "answer_id": 255209, "author": "Louis Gerbarg", "author_id": 30506, "author_profile": "https://Stackoverflow.com/users/30506", "pm_score": 4, "selected": true, "text": "+[UIImage imageNamed:] a.png" } ]
2008/10/31
[ "https://Stackoverflow.com/questions/254811", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22471/" ]
254,821
<p>I want to be able to load a serialized xml class to a Soap Envelope. I am starting so I am not filling the innards so it appears like: <br /> </p> <pre><code>&lt;Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/" /&gt; </code></pre> <p>I want it to appear like: <br/></p> <pre><code>&lt;Envelope x...
[ { "answer_id": 254894, "author": "Marcus Griep", "author_id": 28645, "author_profile": "https://Stackoverflow.com/users/28645", "pm_score": 5, "selected": true, "text": "XmlSerializer WriteEndElement() XmlWriter <tag/> WriteFullEndElement() XmlTextWriter serializer XmlSerializer public c...
2008/10/31
[ "https://Stackoverflow.com/questions/254821", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12924/" ]
254,823
<p>I've got a form that's a few pages long. To traverse the form all I'm doing is showing and hiding container divs. The last page is a confirmation page before submitting. It takes the contents of the form and lays it out so the user can see what he/she just filled out. If they click on one of these it'll take them ba...
[ { "answer_id": 254865, "author": "Diodeus - James MacFarlane", "author_id": 12579, "author_profile": "https://Stackoverflow.com/users/12579", "pm_score": 3, "selected": true, "text": "function valField(fieldName,navName) {\n var output = '<a href=\"javascript://\" onclick=\"$(\\''+nav...
2008/10/31
[ "https://Stackoverflow.com/questions/254823", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
254,844
<p>I was reading an article on MSDN Magazine about using the <a href="http://msdn.microsoft.com/en-us/magazine/cc700332.aspx" rel="noreferrer">Enumerable class in LINQ</a> to generate a random array. The article uses VB.NET and I'm not immediately sure what the equivalent is in C#:</p> <pre><code>Dim rnd As New System...
[ { "answer_id": 254860, "author": "James Curran", "author_id": 12725, "author_profile": "https://Stackoverflow.com/users/12725", "pm_score": 3, "selected": false, "text": "Random rnd = new Random();\nIEnumerable<int> numbers = Enumerable.Range(1, 100).OrderBy(r => rnd.Next());\n" }, {...
2008/10/31
[ "https://Stackoverflow.com/questions/254844", "https://Stackoverflow.com", "https://Stackoverflow.com/users/29762/" ]
254,849
<p>I have an MSBuild project where within it I have a task that calls multiple projects where I set BuildInParallel = "true"</p> <p>Example:</p> <p></p> <pre><code> &lt;Message Text="MSBuild project list = @(ProjList)" /&gt; &lt;!-- Compile in parallel --&gt; &lt;MSBuild Projects="@(ProjList)" Targe...
[ { "answer_id": 254860, "author": "James Curran", "author_id": 12725, "author_profile": "https://Stackoverflow.com/users/12725", "pm_score": 3, "selected": false, "text": "Random rnd = new Random();\nIEnumerable<int> numbers = Enumerable.Range(1, 100).OrderBy(r => rnd.Next());\n" }, {...
2008/10/31
[ "https://Stackoverflow.com/questions/254849", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1341/" ]
254,859
<p>I am creating an integration server for the first time, and although I have two projects in my cruisecontrol config file, only the first one seems to be executing. My config file is pasted below.</p> <pre><code>&lt;cruisecontrol&gt; &lt;project name="cc-config"&gt; &lt;triggers&gt; &lt;int...
[ { "answer_id": 255247, "author": "Scott Saad", "author_id": 4916, "author_profile": "https://Stackoverflow.com/users/4916", "pm_score": 0, "selected": false, "text": "<triggers>\n <intervalTrigger name=\"continuous\" buildCondition=\"ForceBuild\" seconds=\"60\"/>\n</triggers>\n" } ]
2008/10/31
[ "https://Stackoverflow.com/questions/254859", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26527/" ]
254,864
<p>So I know it's considered somewhat good practice to always include curly braces for if, for, etc even though they're optional if there is only one following statement, for the reason that it's easier to accidentally do something like:</p> <pre><code>if(something == true) DoSomething(); DoSomethingElse(); </...
[ { "answer_id": 254866, "author": "Nicholas Mancuso", "author_id": 8945, "author_profile": "https://Stackoverflow.com/users/8945", "pm_score": 3, "selected": false, "text": "if(something == true)\n{ DoSomething(); }\n if(something == true) { DoSomething(); }\n" }, { "answer_id...
2008/10/31
[ "https://Stackoverflow.com/questions/254864", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23822/" ]
254,887
<p>I am looking for a clear, complete example of programmatically deleting all documents from a specific document library, via the Sharepoint object model. The doclib does not contain folders. I am looking to delete the documents completely (ie I don't want them in the Recycle Bin).</p> <p>I know of SPWeb.ProcessBat...
[ { "answer_id": 254918, "author": "Maxime Rouiller", "author_id": 24975, "author_profile": "https://Stackoverflow.com/users/24975", "pm_score": 1, "selected": false, "text": "foreach(SPListItem item in SPContext.Current.Web.Lists[\"YourDocLibName\"].Items)\n{\n //TODO: Verify that the ...
2008/10/31
[ "https://Stackoverflow.com/questions/254887", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5782/" ]
254,895
<p>How do I embed a tag within a <a href="http://docs.djangoproject.com/en/dev/ref/templates/builtins/#url" rel="nofollow noreferrer" title="url templatetag">url templatetag</a> in a django template?</p> <p>Django 1.0 , Python 2.5.2</p> <p>In views.py</p> <pre><code>def home_page_view(request): NUP={"HOMEPAGE": ...
[ { "answer_id": 254942, "author": "S.Lott", "author_id": 10661, "author_profile": "https://Stackoverflow.com/users/10661", "pm_score": 0, "selected": false, "text": "{% url named-url-pattern-string-for-my-home-page-view %}\n {% if tagoption1 %}<a href=\"{% url named-url-1 %}\">Text</a>{% ...
2008/10/31
[ "https://Stackoverflow.com/questions/254895", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11452/" ]
254,901
<p>does anybody know how could I get the TWO most largest values from the third column on the following array?</p> <pre><code>$ar = array(array(1, 1, 7.50, 'Hello'), array(1, 2, 18.90, 'Hello'), array(3, 5, 11.50, 'Hello'), array(2, 4, 15.90, 'Hello')); </code></pr...
[ { "answer_id": 254920, "author": "Konrad Rudolph", "author_id": 1968, "author_profile": "https://Stackoverflow.com/users/1968", "pm_score": 3, "selected": true, "text": "usort function cmp($a, $b) {\n $a = $a[2];\n $b = $b[2];\n return $a == $b ? 0 : $a < $b ? 1 : -1;\n}\n\nusor...
2008/10/31
[ "https://Stackoverflow.com/questions/254901", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
254,912
<p>Given that these two examples are equivalent, which do you think is preferrable?</p> <p><strong>Without explicit modifier</strong></p> <pre><code>public class MyClass { string name = "james"; public string Name { get { return name; } set { name = value; } } void SomeMethod() { .....
[ { "answer_id": 254931, "author": "Marcus Griep", "author_id": 28645, "author_profile": "https://Stackoverflow.com/users/28645", "pm_score": 2, "selected": false, "text": "public private internal" } ]
2008/10/31
[ "https://Stackoverflow.com/questions/254912", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4590/" ]
254,929
<p>I'm trying to figure out how to restrict access to a page unless the page is navigated to from a specific "gate" page. Essentially I want the page to be unaccessible unless you're coming from the page that comes before it in my sitemap. I'm not certain this is even possible. If possible, can you limit your suggestio...
[ { "answer_id": 254939, "author": "Konrad Rudolph", "author_id": 1968, "author_profile": "https://Stackoverflow.com/users/1968", "pm_score": 3, "selected": false, "text": "REFERER mod_rewrite RewriteEngine On\nRewriteCond %{HTTP_REFERER} !^http://www\\.example\\.com/.*\nRewriteRule /* htt...
2008/10/31
[ "https://Stackoverflow.com/questions/254929", "https://Stackoverflow.com", "https://Stackoverflow.com/users/27171/" ]
254,930
<p>I'm currently working on an application which requires transmission of speech encoded to a specific audio format.</p> <pre><code>System.Speech.AudioFormat.SpeechAudioFormatInfo synthFormat = new System.Speech.AudioFormat.SpeechAudioFormatInfo(System.Speech.AudioFormat.EncodingFormat.Pcm, ...
[ { "answer_id": 336940, "author": "Mark Heath", "author_id": 7532, "author_profile": "https://Stackoverflow.com/users/7532", "pm_score": 1, "selected": false, "text": "WaveFormatConversionStream ResamplerDMO" }, { "answer_id": 14016962, "author": "user1925922", "author_id"...
2008/10/31
[ "https://Stackoverflow.com/questions/254930", "https://Stackoverflow.com", "https://Stackoverflow.com/users/24695/" ]
254,969
<p>I work in C#, and I've been pretty lax about using <code>using</code> blocks to declare objects that implement <code>IDisposable</code>, which you're apparently always supposed to do. However, I don't see an easy way of knowing when I'm slipping up. Visual Studio doesn't seem to indicate this in any way (am I just...
[ { "answer_id": 254971, "author": "Marc Gravell", "author_id": 23354, "author_profile": "https://Stackoverflow.com/users/23354", "pm_score": 5, "selected": false, "text": "IDisposable .D using using (int i = 5) {}\n\nError 1 'int': type used in a using statement must be implicitly con...
2008/10/31
[ "https://Stackoverflow.com/questions/254969", "https://Stackoverflow.com", "https://Stackoverflow.com/users/33219/" ]
254,976
<p>I'm trying to create classes to read from my config file using ConfigurationSection and ConfigurationElementCollection but am having a hard time.</p> <p>As an example of the config:</p> <pre><code> &lt;PaymentMethodSettings&gt; &lt;PaymentMethods&gt; &lt;PaymentMethod name="blah blah" code="1"/&gt; &lt;P...
[ { "answer_id": 255030, "author": "FlySwat", "author_id": 1965, "author_profile": "https://Stackoverflow.com/users/1965", "pm_score": 4, "selected": true, "text": "public class PaymentSection : ConfigurationSection\n{\n // Simple One\n [ConfigurationProperty(\"name\")]]\n public Str...
2008/10/31
[ "https://Stackoverflow.com/questions/254976", "https://Stackoverflow.com", "https://Stackoverflow.com/users/25951/" ]
254,979
<p>I have 3 points (A, B and X) and a distance (d). I need to make a function that tests if point X is closer than distance d to any point on the line segment AB. </p> <p>The question is firstly, is my solution correct and then to come up with a better (faster) solution.</p> <p>My first pass is as follows</p> <pre><...
[ { "answer_id": 255120, "author": "Federico A. Ramponi", "author_id": 18770, "author_profile": "https://Stackoverflow.com/users/18770", "pm_score": 1, "selected": false, "text": " ...... .....\n ........... ...........\n ...........................\n.......A-------------B......
2008/10/31
[ "https://Stackoverflow.com/questions/254979", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1343/" ]
254,980
<p>As a follow-up to <a href="https://stackoverflow.com/questions/199518/how-to-programatically-add-mapped-network-passwords-winxp">this</a> question I am hoping someone can help with the <a href="http://msdn.microsoft.com/en-us/library/aa374794(VS.85).aspx" rel="nofollow noreferrer">CredEnumerate</a> API. </p> <p>As...
[ { "answer_id": 255073, "author": "cfeduke", "author_id": 5645, "author_profile": "https://Stackoverflow.com/users/5645", "pm_score": 4, "selected": true, "text": "PCREDENTIALS [DllImport(\"advapi32\", SetLastError = true, CharSet=CharSet.Unicode)]\nstatic extern bool CredEnumerate(string...
2008/10/31
[ "https://Stackoverflow.com/questions/254980", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12842/" ]
254,985
<p>The company I work for has a large webapp written in C++ as an ISAPI extension (not a filter). We're currently enhancing our system to integrate with several 3rd party tools that have SOAP interfaces. Rather than roll our own, I think it would probably be best if we used some SOAP library. Ideally, it would be fr...
[ { "answer_id": 255073, "author": "cfeduke", "author_id": 5645, "author_profile": "https://Stackoverflow.com/users/5645", "pm_score": 4, "selected": true, "text": "PCREDENTIALS [DllImport(\"advapi32\", SetLastError = true, CharSet=CharSet.Unicode)]\nstatic extern bool CredEnumerate(string...
2008/10/31
[ "https://Stackoverflow.com/questions/254985", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10861/" ]
254,992
<p>I've got some RadioButtons in my XAML...</p> <pre><code>&lt;StackPanel&gt; &lt;RadioButton Name="RadioButton1" GroupName="Buttons" Click="ButtonsChecked" IsChecked="True"&gt;One&lt;/RadioButton&gt; &lt;RadioButton Name="RadioButton2" GroupName="Buttons" Click="ButtonsChecked"&gt;Two&lt;/RadioButton&gt; ...
[ { "answer_id": 255225, "author": "Ian Oakes", "author_id": 21606, "author_profile": "https://Stackoverflow.com/users/21606", "pm_score": 5, "selected": true, "text": "<Window \n x:Class=\"RadioButtonCommandSample.Window1\"\n xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/pres...
2008/10/31
[ "https://Stackoverflow.com/questions/254992", "https://Stackoverflow.com", "https://Stackoverflow.com/users/83/" ]
254,993
<p>In one of my projects I need to build an ASP.NET page and some of the controls need to be created dynamically. These controls are added to the page by the code-behind class and they have some event-handlers added to them. Upon the PostBacks these event-handlers have a lot to do with what controls are then shown on t...
[ { "answer_id": 255017, "author": "tvanfosson", "author_id": 12950, "author_profile": "https://Stackoverflow.com/users/12950", "pm_score": 1, "selected": false, "text": "Page_Load() button_Click() Page_Load() if (!IsPostBack) if (!IsPostBack)\n{\n AddButtons();\n}\n" }, { "answe...
2008/10/31
[ "https://Stackoverflow.com/questions/254993", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3379/" ]
255,006
<p>Is it possible to automatically launch an application from a USB flash drive (bypassing windows prompt asking user what he wants to do)? on windows XP or vista.</p> <p>I looked into "autorun.inf" and "open" entry seems to work only for CD drives for Windows XP SP2+ and Vista. Is it possible to launch program automa...
[ { "answer_id": 255067, "author": "Piskvor left the building", "author_id": 19746, "author_profile": "https://Stackoverflow.com/users/19746", "pm_score": 5, "selected": false, "text": "[Autorun]\nOpen=PStart.exe\nAction=Start portable apps\nIcon=diskicon.ico\n PStart.exe Open= autorun.inf...
2008/10/31
[ "https://Stackoverflow.com/questions/255006", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19124/" ]