qid
int64
4
22.2M
question
stringlengths
18
48.3k
answers
list
date
stringlengths
10
10
metadata
list
328,391
<p>I have the following code which is trivial at first sight. I simply set want to set the font type to Georgia with a size of 14 if the cell is from the result of a search or if there is a count of zero in my students array. </p> <p>However, with this particular code cell that's last in my <code>tableView</code> is t...
[ { "answer_id": 328405, "author": "Ben Gottlieb", "author_id": 6694, "author_profile": "https://Stackoverflow.com/users/6694", "pm_score": 2, "selected": false, "text": "cell.font = [UIFont systemFontOfSize: 14];\n" }, { "answer_id": 329696, "author": "Jonathan Watmough", ...
2008/11/30
[ "https://Stackoverflow.com/questions/328391", "https://Stackoverflow.com", "https://Stackoverflow.com/users/40882/" ]
328,430
<p>I've got jQuery Autocomplete (UI 1.6rc2) up and running fine and when the user picks an item, it updates a hidden form value with the associated ID. How do I set the hidden form value to '0' when the text entered does not match a result from the autocomplete list? In this case, I'll be creating a new entry.</p>
[ { "answer_id": 928258, "author": "turezky", "author_id": 87997, "author_profile": "https://Stackoverflow.com/users/87997", "pm_score": 1, "selected": false, "text": "selected: function() {\n if(listItems.filter(”.” + CLASSES.ACTIVE)[0]){\n return data && data[ listItems.filter(\".\" ...
2008/11/30
[ "https://Stackoverflow.com/questions/328430", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1786/" ]
328,463
<p>I'm attempting to install phpMyAdmin, but I constantly get errors.</p> <p>When I type this in the terminal:</p> <pre><code>sudo dpkg --configure -a </code></pre> <p>The following message appears:</p> <pre> Setting up mysql-server-5.0 (5.0.45-1ubuntu3) ... * Stopping MySQL database server mysqld ...
[ { "answer_id": 328559, "author": "Zoredache", "author_id": 20267, "author_profile": "https://Stackoverflow.com/users/20267", "pm_score": 2, "selected": false, "text": "mysql-server-5.0" }, { "answer_id": 435229, "author": "dragonmantank", "author_id": 204, "author_pro...
2008/11/30
[ "https://Stackoverflow.com/questions/328463", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
328,468
<p>I'm using PHP to generate thumbnails. The problem is that I have a set width and height the thumbnails need to be and often times the images are stretched.</p> <p>What I'd like is the image to remain at the same proportions and just have black filler (or any color) either on the left &amp; right for tall images or ...
[ { "answer_id": 328543, "author": "Andrew G. Johnson", "author_id": 428190, "author_profile": "https://Stackoverflow.com/users/428190", "pm_score": 1, "selected": false, "text": "$filename = \"http://www.example.com/image.jpg\";\n\nlist($width,$height) = getimagesize($filename);\n\n$width...
2008/11/30
[ "https://Stackoverflow.com/questions/328468", "https://Stackoverflow.com", "https://Stackoverflow.com/users/428190/" ]
328,475
<p>So far I've seen many posts dealing with equality of floating point numbers. The standard answer to a question like "how should we decide if x and y are equal?" is</p> <pre><code>abs(x - y) &lt; epsilon </code></pre> <p>where epsilon is a <em>fixed</em>, small constant. This is because the "operands" x and y are o...
[ { "answer_id": 328509, "author": "leppie", "author_id": 15541, "author_profile": "https://Stackoverflow.com/users/15541", "pm_score": 1, "selected": false, "text": "div(max(a, b), min(a, b)) < eps + 1\n" }, { "answer_id": 28751714, "author": "Franz D.", "author_id": 46101...
2008/11/30
[ "https://Stackoverflow.com/questions/328475", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18770/" ]
328,485
<p>WCF is Microsoft's replacement for .Net Remoting and Web services. It's critical to understand if you are a .NET component developer. </p> <p>The best reference for WCF appears to be (by word of mouth, blogs and Amazon) Juval Lowy's "Programming WCF Services," published by O'Reilly.</p> <p>This book is advertise...
[ { "answer_id": 9511632, "author": "Mili Milutinovic", "author_id": 1241974, "author_profile": "https://Stackoverflow.com/users/1241974", "pm_score": 1, "selected": false, "text": "ServiceModelEx" } ]
2008/11/30
[ "https://Stackoverflow.com/questions/328485", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1572436/" ]
328,492
<p>How can I send a monitor into/out-of a different power state (like sleep)?</p>
[ { "answer_id": 9511632, "author": "Mili Milutinovic", "author_id": 1241974, "author_profile": "https://Stackoverflow.com/users/1241974", "pm_score": 1, "selected": false, "text": "ServiceModelEx" } ]
2008/11/30
[ "https://Stackoverflow.com/questions/328492", "https://Stackoverflow.com", "https://Stackoverflow.com/users/115/" ]
328,496
<p>What are some <em>common</em>, <em>real world examples</em> of using the Builder Pattern? What does it buy you? Why not just use a Factory Pattern?</p>
[ { "answer_id": 328505, "author": "Dustin", "author_id": 39975, "author_profile": "https://Stackoverflow.com/users/39975", "pm_score": 3, "selected": false, "text": "m.expects(once())\n .method(\"testMethod\")\n .with(eq(1), eq(2))\n .returns(\"someResponse\");\n" }, { "a...
2008/11/30
[ "https://Stackoverflow.com/questions/328496", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7705/" ]
328,500
<p>what is the proper way to scale an SDL Surface? I found one explanation online but it required redrawing the Surface pixel by pixel. It seems like there should be some way of doing this natively through SDL rather than redrawing the image like that. I haven't been able to find anything in the SDL documentation that ...
[ { "answer_id": 28560314, "author": "Martin G", "author_id": 3545094, "author_profile": "https://Stackoverflow.com/users/3545094", "pm_score": 1, "selected": false, "text": "SDL_RenderCopyEx" }, { "answer_id": 30970536, "author": "Justin Stephens", "author_id": 5034414, ...
2008/11/30
[ "https://Stackoverflow.com/questions/328500", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3552/" ]
328,521
<p>The execvp() function executes the program that is given as an argument. It checks the $PATH variable to find the program. I'm writing something in which I would like to check to see if several programs exist before calling any exec() functions. What's the best way to do this?</p>
[ { "answer_id": 330228, "author": "joveha", "author_id": 40668, "author_profile": "https://Stackoverflow.com/users/40668", "pm_score": 0, "selected": false, "text": "struct stat st;\nif (stat(path, &st)) {\n // path doesn't exist\n}\n" } ]
2008/11/30
[ "https://Stackoverflow.com/questions/328521", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
328,525
<p>How can I set default value in ActiveRecord?</p> <p>I see a post from Pratik that describes an ugly, complicated chunk of code: <a href="http://m.onkey.org/2007/7/24/how-to-set-default-values-in-your-model" rel="noreferrer">http://m.onkey.org/2007/7/24/how-to-set-default-values-in-your-model</a></p> <pre><code>cla...
[ { "answer_id": 328691, "author": "John Topley", "author_id": 1450, "author_profile": "https://Stackoverflow.com/users/1450", "pm_score": 2, "selected": false, "text": "initialize" }, { "answer_id": 328870, "author": "Mike Breen", "author_id": 22346, "author_profile": ...
2008/11/30
[ "https://Stackoverflow.com/questions/328525", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2477/" ]
328,549
<p>I have an ASPX page where I am uploading an image to server for on a serverside button click event. In my page, it will show the available image if it exists. When I upload an image, it will replace the old one with the new one. Now after uploading also the same image is getting displayed. How can tackle this? I us...
[ { "answer_id": 328569, "author": "LeJeune", "author_id": 37955, "author_profile": "https://Stackoverflow.com/users/37955", "pm_score": 0, "selected": false, "text": "Response.Redirect(Request.URL)\n" } ]
2008/11/30
[ "https://Stackoverflow.com/questions/328549", "https://Stackoverflow.com", "https://Stackoverflow.com/users/40521/" ]
328,566
<p>I'm using WatiN, NUnit and ReSharper to run my ASP.NET unit tests inside Visual Studio. I'd like (if it's not already running) to start Cassini to run my tests against.</p> <p>Is this possible? How would I do it?</p>
[ { "answer_id": 328616, "author": "Roger Lipscombe", "author_id": 8446, "author_profile": "https://Stackoverflow.com/users/8446", "pm_score": 2, "selected": false, "text": "private static void GetDevelopmentServerVPathAndPortFromProjectFile(\n string csprojFileName,\n out string dev...
2008/11/30
[ "https://Stackoverflow.com/questions/328566", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8446/" ]
328,568
<p>I'm thinking how to arrange a deployed python application which will have a </p> <ol> <li>Executable script located in /usr/bin/ which will provide a CLI to functionality implemented in</li> <li>A library installed to wherever the current site-packages directory is.</li> </ol> <p>Now, currently, I have the followi...
[ { "answer_id": 328579, "author": "Martin v. Löwis", "author_id": 33006, "author_profile": "https://Stackoverflow.com/users/33006", "pm_score": 0, "selected": false, "text": "foo" }, { "answer_id": 328589, "author": "Matt Campbell", "author_id": 41110, "author_profile"...
2008/11/30
[ "https://Stackoverflow.com/questions/328568", "https://Stackoverflow.com", "https://Stackoverflow.com/users/39167/" ]
328,577
<p>I'm a long time C++/Java developer trying to get into Python and am looking for the stereotypical "Python for C++ Developers" article, but coming up blank. I've seen these sort of things for C#, Java, etc, and they're incredibly useful for getting up to speed on language features and noteworthy differences. Anyone...
[ { "answer_id": 328599, "author": "Matt Campbell", "author_id": 41110, "author_profile": "https://Stackoverflow.com/users/41110", "pm_score": 2, "selected": false, "text": "urllib2.py" } ]
2008/11/30
[ "https://Stackoverflow.com/questions/328577", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13257/" ]
328,600
<p>I'm using LINQ to Entities (not LINQ to SQL) and I'm having trouble creating an 'IN' style query. Here is my query at the moment:</p> <pre><code>var items = db.InventoryItem .Include("Kind") .Include("PropertyValues") .Include("PropertyValues.KindProperty") ...
[ { "answer_id": 328677, "author": "liggett78", "author_id": 19762, "author_profile": "https://Stackoverflow.com/users/19762", "pm_score": 4, "selected": true, "text": ".Where(string.Format(\"it.ID in {0}\", string.Join(\",\", valueIds.ToArray())));\n" }, { "answer_id": 2190729, ...
2008/11/30
[ "https://Stackoverflow.com/questions/328600", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4541/" ]
328,622
<p>I understand that floating point calculations have accuracy issues and there are plenty of questions explaining why. My question is if I run the same calculation twice, can I always rely on it to produce the same result? What factors might affect this?</p> <ul> <li>Time between calculations?</li> <li>Current stat...
[ { "answer_id": 1008262, "author": "Grumbel", "author_id": 28113, "author_profile": "https://Stackoverflow.com/users/28113", "pm_score": 2, "selected": false, "text": "y == x" }, { "answer_id": 5712709, "author": "Ergwun", "author_id": 177018, "author_profile": "https:...
2008/11/30
[ "https://Stackoverflow.com/questions/328622", "https://Stackoverflow.com", "https://Stackoverflow.com/users/40944/" ]
328,623
<p>UPDATE: Thank you all for your input. Some additional information.</p> <p>It's really just a small chunk of markup (20 lines) I'm working with and had aimed to to leverage a regex to do the work.</p> <p>I also do have the ability to hack up the script (an ecommerce one) to insert the classes as the navigation is ...
[ { "answer_id": 328626, "author": "Dustin", "author_id": 39975, "author_profile": "https://Stackoverflow.com/users/39975", "pm_score": 2, "selected": false, "text": ".first" }, { "answer_id": 328658, "author": "PhiLho", "author_id": 15459, "author_profile": "https://St...
2008/11/30
[ "https://Stackoverflow.com/questions/328623", "https://Stackoverflow.com", "https://Stackoverflow.com/users/41903/" ]
328,655
<p>How do I add a the <a href="http://github.com/technoweenie/restful-authentication/tree/master" rel="nofollow noreferrer">http://github.com/technoweenie/restful-authentication/tree/master</a> plugin to my Rails project and the commit it to the git repo ? I need it to be committed with the project.</p> <p>I have tri...
[ { "answer_id": 328663, "author": "Dustin", "author_id": 39975, "author_profile": "https://Stackoverflow.com/users/39975", "pm_score": 2, "selected": false, "text": "rm -rf restful_authentication/.git" }, { "answer_id": 328674, "author": "tardate", "author_id": 6329, "...
2008/11/30
[ "https://Stackoverflow.com/questions/328655", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
328,661
<p>I used to use the implicit call of toString when wanting some debug info about an object, because in case of the object is null it does not throw an Exception.</p> <p>For instance: </p> <pre><code>System.out.println("obj: "+obj); </code></pre> <p>instead of:</p> <pre><code>System.out.println("obj: "+obj.toStrin...
[ { "answer_id": 328668, "author": "Dustin", "author_id": 39975, "author_profile": "https://Stackoverflow.com/users/39975", "pm_score": 7, "selected": true, "text": "String s = String.valueOf(obj);\n" }, { "answer_id": 328675, "author": "Draemon", "author_id": 26334, "a...
2008/11/30
[ "https://Stackoverflow.com/questions/328661", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12860/" ]
328,673
<p>Is there an elegant way in Perl to find the newest file in a directory (newest by modification date)?</p> <p>What I have so far is searching for the files I need, and for each one get it's modification time, push into an array containing the filename, modification time, then sort it.</p> <p>There must be a better ...
[ { "answer_id": 328686, "author": "Nathan Fellman", "author_id": 1084, "author_profile": "https://Stackoverflow.com/users/1084", "pm_score": 4, "selected": false, "text": "ls" }, { "answer_id": 328687, "author": "rjray", "author_id": 6421, "author_profile": "https://St...
2008/11/30
[ "https://Stackoverflow.com/questions/328673", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13523/" ]
328,682
<p>I am using RRDtool for storing data for displaying graphs. I update the RRD by RRDs::update and this fails when trying to rewrite the information, means update data for a time in the past (e.g. someone moved the system timer back). The error I get is: </p> <pre><code>ERROR: Cannot update /opt/dashboard/rrd/Disk/19...
[ { "answer_id": 11645890, "author": "Vladimir Goshev", "author_id": 1168700, "author_profile": "https://Stackoverflow.com/users/1168700", "pm_score": 2, "selected": false, "text": "#!/bin/sh\nrrdtool dump \"$1\" | perl -ne 'BEGIN {$t=`date +%s`; chomp($t);} $a=$_; if ($a =~ /lastupdate.\\...
2008/11/30
[ "https://Stackoverflow.com/questions/328682", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
328,692
<p>In my application, a user has_many tickets. Unfortunately, the tickets table does not have a user_id: it has a user_login (it is a legacy database). I am going to change that someday, but for now this change would have too many implications.</p> <p>So how can I build a "user has_many :tickets" association through...
[ { "answer_id": 328694, "author": "dgtized", "author_id": 34450, "author_profile": "https://Stackoverflow.com/users/34450", "pm_score": 1, "selected": false, "text": ":foreign_key" }, { "answer_id": 329086, "author": "MiniQuark", "author_id": 38626, "author_profile": "...
2008/11/30
[ "https://Stackoverflow.com/questions/328692", "https://Stackoverflow.com", "https://Stackoverflow.com/users/38626/" ]
328,704
<p>I use Netbeans IDE (6.5) and I have a SQLite 2.x database. I installed a JDBC SQLite driver from <a href="http://www.zentus.com/sqlitejdbc/" rel="nofollow noreferrer">zentus.com</a> and added a new driver in Nebeans services panel. Then tried to connect to my database file from Services > Databases using this URL fo...
[ { "answer_id": 3011156, "author": "Toleg", "author_id": 363038, "author_profile": "https://Stackoverflow.com/users/363038", "pm_score": 0, "selected": false, "text": "CLASSPATH" } ]
2008/11/30
[ "https://Stackoverflow.com/questions/328704", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9394/" ]
328,718
<p>The <a href="http://code.google.com/p/v8/wiki/BuildingOnWindows" rel="nofollow noreferrer">build instructions of V8 JavaScript Engine</a> mention only Visual Studio 2005 and 2008. Has anybody been successful with <a href="http://mingw.org/" rel="nofollow noreferrer">MinGW</a> on Windows XP/Vista?</p>
[ { "answer_id": 1149334, "author": "the_drow", "author_id": 85140, "author_profile": "https://Stackoverflow.com/users/85140", "pm_score": 2, "selected": true, "text": "linkers = ['gnulink', 'mslink', 'ilink', 'linkloc', 'ilink32' ]\nc_compilers = ['mingw', 'msvc', 'gcc', 'intelc', 'icl'...
2008/11/30
[ "https://Stackoverflow.com/questions/328718", "https://Stackoverflow.com", "https://Stackoverflow.com/users/30289/" ]
328,722
<p>My current code is this:</p> <pre><code>int volume = Alert.getVolume(); // reads 100 Alert.setVolume(0); </code></pre> <p>It DOESN'T change the volume setting, like it would be supposed to do Even calling <code>Alert.mute(true);</code> doesn't produce any good effect. <code>Audio.setVolume(0);</code> also doesn't...
[ { "answer_id": 331036, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 1, "selected": false, "text": "javax.microedition.lcdui.Alert" }, { "answer_id": 1421886, "author": "Maksym Gontar", "author_id": 67407, ...
2008/11/30
[ "https://Stackoverflow.com/questions/328722", "https://Stackoverflow.com", "https://Stackoverflow.com/users/39680/" ]
328,727
<p>When I am stuck with a problem:</p> <ul> <li>I search Google for code snippets.</li> <li>I look at isolating the problem, so that I can better explain it to others in order to get answers.</li> </ul> <p>What search techniques do you use to find the solution to your problem?</p> <p>I started asking questions in St...
[ { "answer_id": 328733, "author": "cletus", "author_id": 18393, "author_profile": "https://Stackoverflow.com/users/18393", "pm_score": 3, "selected": false, "text": "$fields = $_SESSION[\"fields\"]; // $fields is an associative array\n$fields[\"blah\"] = \"foo\";\n" } ]
2008/11/30
[ "https://Stackoverflow.com/questions/328727", "https://Stackoverflow.com", "https://Stackoverflow.com/users/32670/" ]
328,730
<p>I have a dev branch that hasn't been touched for a while. I merged the trunk into it to integrate many fixes/changes in the main line since it was branched out, but now I have many small conflicts (merge-left/merge-right).</p> <p>I want the latest trunk revision to be used to resolve each conflict. Is there a comma...
[ { "answer_id": 328779, "author": "Avi", "author_id": 1605, "author_profile": "https://Stackoverflow.com/users/1605", "pm_score": 2, "selected": false, "text": "--accept theirs-full" }, { "answer_id": 7476036, "author": "Rondo", "author_id": 442968, "author_profile": "...
2008/11/30
[ "https://Stackoverflow.com/questions/328730", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10585/" ]
328,743
<p>I have this code :-</p> <pre><code>using (System.Security.Cryptography.SHA256 sha2 = new System.Security.Cryptography.SHA256Managed()) { .. } </code></pre> <p>Do I need to put this line of code, just BEFORE I leave that dispose scope .. or does the dispose 'call' that already.</p> <pre><code>sha2.Clear(); </...
[ { "answer_id": 328825, "author": "Brian Rasmussen", "author_id": 38206, "author_profile": "https://Stackoverflow.com/users/38206", "pm_score": 1, "selected": false, "text": "Clear" } ]
2008/11/30
[ "https://Stackoverflow.com/questions/328743", "https://Stackoverflow.com", "https://Stackoverflow.com/users/30674/" ]
328,747
<p>I have problem with return statment &gt;.&lt; I want to store all magazine names into</p> <pre><code>ArrayList&lt;String&gt; ListNameMagazine = new ArrayList&lt;String&gt;(); </code></pre> <p>I have a DB; in the DB there is a table <code>name_magazine</code> and the data in <code>name_magazine</code> is</p> <blockqu...
[ { "answer_id": 328760, "author": "xan", "author_id": 15667, "author_profile": "https://Stackoverflow.com/users/15667", "pm_score": 4, "selected": true, "text": "while (rs.next()) { \n\n //System.out.println(\"Result:\"+rs.getString(1));\n\n just_try = rs.getString(1);\n\n return ju...
2008/11/30
[ "https://Stackoverflow.com/questions/328747", "https://Stackoverflow.com", "https://Stackoverflow.com/users/41780/" ]
328,763
<p><strong>Update:</strong> This turned into a blog post, with updated links and code, over at my blog: <a href="https://egilhansen.com/2008/12/01/how-to-take-control-of-style-sheets-in-asp-net-themes-with-the-styleplaceholder-and-style-control/" rel="nofollow noreferrer">https://egilhansen.com/2008/12/01/how-to-take-c...
[ { "answer_id": 463358, "author": "Simon_Weaver", "author_id": 16940, "author_profile": "https://Stackoverflow.com/users/16940", "pm_score": 0, "selected": false, "text": "<%@ Register TagPrefix=\"ass\" Namespace=\"Assimilated.WebControls.Stylesheet\" %>\n" } ]
2008/11/30
[ "https://Stackoverflow.com/questions/328763", "https://Stackoverflow.com", "https://Stackoverflow.com/users/32809/" ]
328,765
<p>I have a object of type <code>ICollection&lt;string&gt;</code>. What is the best way to convert to <code>string[]</code>. </p> <p>How can this be done in .NET 2?<BR> How can this be done cleaner in later version of C#, perhaps using LINQ in C# 3?</p>
[ { "answer_id": 328767, "author": "AdrianoKF", "author_id": 27232, "author_profile": "https://Stackoverflow.com/users/27232", "pm_score": 6, "selected": true, "text": "string[] array = new string[collection.Count];\ncollection.CopyTo(array, 0);\n" }, { "answer_id": 328769, "au...
2008/11/30
[ "https://Stackoverflow.com/questions/328765", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4653/" ]
328,768
<p>After moving to .NET 2.0+ is there ever a reason to still use the systems.Collections namespace (besides maintaining legacy code)? Should the generics namespace always be used instead?</p>
[ { "answer_id": 328811, "author": "Cameron MacFarland", "author_id": 3820, "author_profile": "https://Stackoverflow.com/users/3820", "pm_score": 0, "selected": false, "text": "List<Person>" } ]
2008/11/30
[ "https://Stackoverflow.com/questions/328768", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4653/" ]
328,772
<p>I have a class that inherits a generic dictionary and an inteface</p> <pre><code>public class MyDictionary: Dictionary&lt;string, IFoo&gt;, IMyDictionary { } </code></pre> <p>the issue is that consumers of this class are looking for the '.Keys' and ".Values" properties of the interface so i added:</p> <pre><code>...
[ { "answer_id": 328782, "author": "Nathan W", "author_id": 6335, "author_profile": "https://Stackoverflow.com/users/6335", "pm_score": 2, "selected": false, "text": "class IFoo\n{ }\n\ninterface MyDictionary\n{\n ICollection<string> Keys { get; }\n\n /// <summary>\n /// \n ///...
2008/11/30
[ "https://Stackoverflow.com/questions/328772", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4653/" ]
328,793
<p>The <code>curses.ascii</code> module has some nice functions defined, that allow for example to recognize which characters are printable (<code>curses.ascii.isprint(ch)</code>).</p> <p>But, diffrent character codes can be printable depending on which locale setting is being used. For example, there are certain poli...
[ { "answer_id": 328807, "author": "Ignacio Vazquez-Abrams", "author_id": 20862, "author_profile": "https://Stackoverflow.com/users/20862", "pm_score": 3, "selected": true, "text": ">>> unicodedata.category(u'ą')[0] in 'LNPS'\nTrue\n" } ]
2008/11/30
[ "https://Stackoverflow.com/questions/328793", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4172/" ]
328,806
<p>If I've got a variable that contains the fully-qualified name of a file (for example, a project file), should it be called <code>projectFile</code>, <code>projectFileName</code> or <code>projectPath</code>? Or something else?</p>
[ { "answer_id": 328810, "author": "Tomalak", "author_id": 18771, "author_profile": "https://Stackoverflow.com/users/18771", "pm_score": 4, "selected": true, "text": "FileName" }, { "answer_id": 328812, "author": "Kent Fredric", "author_id": 15614, "author_profile": "ht...
2008/11/30
[ "https://Stackoverflow.com/questions/328806", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8446/" ]
328,830
<p>what is the value of using IDictionary here?</p>
[ { "answer_id": 328836, "author": "Konrad Rudolph", "author_id": 1968, "author_profile": "https://Stackoverflow.com/users/1968", "pm_score": 6, "selected": true, "text": "Dictionary" }, { "answer_id": 328838, "author": "Arjan Einbu", "author_id": 19594, "author_profile...
2008/11/30
[ "https://Stackoverflow.com/questions/328830", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4653/" ]
328,832
<p>I've been facing this issue where, the hibernate objects on serialization produces unexpect xmls containing all the instrumented code from Hibernate.</p> <p>We did some cleaning of the object before serializing the object.</p> <p>But, is there a standard option available to serialize the object directly?</p>
[ { "answer_id": 329214, "author": "Dan Vinton", "author_id": 21849, "author_profile": "https://Stackoverflow.com/users/21849", "pm_score": 2, "selected": false, "text": "Set<T>" }, { "answer_id": 6719331, "author": "Tomek Lipski", "author_id": 848017, "author_profile":...
2008/11/30
[ "https://Stackoverflow.com/questions/328832", "https://Stackoverflow.com", "https://Stackoverflow.com/users/31590/" ]
328,834
<ol> <li><p>Consider:</p> <pre><code>char *p=NULL; free(p) // or delete p; </code></pre> <p>What will happen if I use <code>free</code> and <code>delete</code> on <code>p</code>?</p></li> <li><p>If a program takes a long time to execute, say 10 minutes, is there any way to reduce its running time to 5 minutes?</p></l...
[ { "answer_id": 328841, "author": "activout.se", "author_id": 20444, "author_profile": "https://Stackoverflow.com/users/20444", "pm_score": 4, "selected": false, "text": "free(p)" }, { "answer_id": 328909, "author": "cic", "author_id": 4771, "author_profile": "https://...
2008/11/30
[ "https://Stackoverflow.com/questions/328834", "https://Stackoverflow.com", "https://Stackoverflow.com/users/41522/" ]
328,850
<p>I am developing an Adobe AIR application which stores data locally using a SQLite database. At any time, I want the end user to synchronize his/her local data to a central MySQL database.</p> <p>Any tips, advice for getting this right? Performance and stability is the key (besides security ;))</p>
[ { "answer_id": 328841, "author": "activout.se", "author_id": 20444, "author_profile": "https://Stackoverflow.com/users/20444", "pm_score": 4, "selected": false, "text": "free(p)" }, { "answer_id": 328909, "author": "cic", "author_id": 4771, "author_profile": "https://...
2008/11/30
[ "https://Stackoverflow.com/questions/328850", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
328,851
<p>With a class in Python, how do I define a function to print every single instance of the class in a format defined in the function?</p>
[ { "answer_id": 328856, "author": "S.Lott", "author_id": 10661, "author_profile": "https://Stackoverflow.com/users/10661", "pm_score": 3, "selected": false, "text": "class MyClassFactory( object ):\n theWholeList= []\n def __call__( self, *args, **kw ):\n x= MyClass( *args, ...
2008/11/30
[ "https://Stackoverflow.com/questions/328851", "https://Stackoverflow.com", "https://Stackoverflow.com/users/33061/" ]
328,857
<p>How to run NAnt scripts in command line and get the timings of each task on the log file?</p> <pre><code>using nant &lt;record&gt; task or NAnt -buildfile:testscript.build testnanttarget </code></pre> <p>This produces console output but I can't see any timing information.</p> <p>All I want each log message prefi...
[ { "answer_id": 329162, "author": "wimh", "author_id": 33499, "author_profile": "https://Stackoverflow.com/users/33499", "pm_score": 4, "selected": true, "text": "<tstamp />\n" }, { "answer_id": 11365688, "author": "aked", "author_id": 1060656, "author_profile": "https...
2008/11/30
[ "https://Stackoverflow.com/questions/328857", "https://Stackoverflow.com", "https://Stackoverflow.com/users/32670/" ]
328,898
<p>I'm looking for ideas on how to implement audit trails for my objects in C#, for the current project,basically I need to:</p> <ol> <li>Store the old values and new values of a given object.</li> <li>Record creation of new objects.</li> <li>Deletion of old object.</li> </ol> <p>Is there any generic way of doing this,...
[ { "answer_id": 432698, "author": "Ray Booysen", "author_id": 42124, "author_profile": "https://Stackoverflow.com/users/42124", "pm_score": 2, "selected": false, "text": "public interface INotifyProperyChanged<T>\n{\n event PropertyChangedEventHandler<T> PropertyChanged;\n}\n\n publi...
2008/11/30
[ "https://Stackoverflow.com/questions/328898", "https://Stackoverflow.com", "https://Stackoverflow.com/users/39278/" ]
328,914
<p>How should I check if my ISP blocks port 25?</p>
[ { "answer_id": 329104, "author": "abatishchev", "author_id": 41956, "author_profile": "https://Stackoverflow.com/users/41956", "pm_score": 5, "selected": true, "text": "cmd> telnet <some well known email provider IP> 25\n" }, { "answer_id": 338830, "author": "joveha", "au...
2008/11/30
[ "https://Stackoverflow.com/questions/328914", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16039/" ]
328,915
<p>I've been using the following snippet in developements for years. Now all of a sudden I get a DB Error: no such field warning</p> <pre><code>$process = "process"; $create = $connection-&gt;query ( "INSERT INTO summery (process) VALUES($process)" ); if (DB::isError($create)) die($create-&gt;getMessage($create));...
[ { "answer_id": 329223, "author": "Zan Lynx", "author_id": 13422, "author_profile": "https://Stackoverflow.com/users/13422", "pm_score": 3, "selected": false, "text": "my $process=1234;\nmy $ins_process = $dbh->prepare(\"INSERT INTO summary (process) values(?)\");\n$ins_process->execute($...
2008/11/30
[ "https://Stackoverflow.com/questions/328915", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
328,922
<p>I have a <code>mysql</code> database filled up and running on a <em>Windows</em> computer, is there any tool to transfer the database to another computer (running <em>Ubuntu</em>)?</p> <p>Else I'll just write a <code>script</code> to take all the data base into <code>SQL</code> and <em>insert</em> it on the other c...
[ { "answer_id": 328928, "author": "benlumley", "author_id": 39161, "author_profile": "https://Stackoverflow.com/users/39161", "pm_score": 6, "selected": true, "text": "mysqldump -u username -p databasename > dumpfile.sql\n" }, { "answer_id": 608536, "author": "AdamK", "aut...
2008/11/30
[ "https://Stackoverflow.com/questions/328922", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26004/" ]
328,925
<p>When I code like this: </p> <pre><code>ServerSocketChannel ssc = ServerSocketChannel.open(); InetSocketAddress sa = new InetSocketAddress("localhost",8888); ssc.socket().bind(sa); ssc.configureBlocking(false); ssc.socket().accept(); </code></pre> <p>the <code>ServerSocket.accept()</code> method throws <code>j...
[ { "answer_id": 431506, "author": "Brian Clapper", "author_id": 53495, "author_profile": "https://Stackoverflow.com/users/53495", "pm_score": 2, "selected": false, "text": "ServerSocketChannel.accept()" }, { "answer_id": 546437, "author": "Nick", "author_id": 21399, "a...
2008/11/30
[ "https://Stackoverflow.com/questions/328925", "https://Stackoverflow.com", "https://Stackoverflow.com/users/41940/" ]
328,936
<p>I want to get from any Unix-like system (if this is possible) a unique id that will be persistent every time my application runs in the same machine. If it is possible, I want to get the same id from Linux or FreeBSD or Solaris, etc... I don't want to generate a new id for each machine, but get an already existent i...
[ { "answer_id": 328973, "author": "Martin v. Löwis", "author_id": 33006, "author_profile": "https://Stackoverflow.com/users/33006", "pm_score": 3, "selected": false, "text": "hostid" }, { "answer_id": 329023, "author": "CesarB", "author_id": 28258, "author_profile": "h...
2008/11/30
[ "https://Stackoverflow.com/questions/328936", "https://Stackoverflow.com", "https://Stackoverflow.com/users/41944/" ]
328,938
<p>EF has been out for awhile now and I'm considering evaluating it - what have your experiences been?</p> <p>I am interested in both web and desktop applications, and maybe some comparisons between EF and other ORM tools that you've used. </p> <p>Learning curve is a factor since there is a team involved. Is this thi...
[ { "answer_id": 329369, "author": "Timothy Khouri", "author_id": 11917, "author_profile": "https://Stackoverflow.com/users/11917", "pm_score": 1, "selected": false, "text": "Contains" } ]
2008/11/30
[ "https://Stackoverflow.com/questions/328938", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16082/" ]
328,944
<p>How do i check in C++ if a file is a regular file (and is not a directory, a pipe, etc.)? I need a function isFile(). </p> <pre><code>DIR *dp; struct dirent *dirp; while ((dirp = readdir(dp)) != NULL) { if ( isFile(dirp)) { cout &lt;&lt; "IS A FILE!" &lt;&lt; endl; i++; } </code></pre> <p>I've tried comparin...
[ { "answer_id": 328948, "author": "Martin v. Löwis", "author_id": 33006, "author_profile": "https://Stackoverflow.com/users/33006", "pm_score": 4, "selected": true, "text": "#include <sys/stat.h>\n\nstruct stat sb;\n\nif (stat(pathname, &sb) == 0 && S_ISREG(sb.st_mode))\n{\n // file ex...
2008/11/30
[ "https://Stackoverflow.com/questions/328944", "https://Stackoverflow.com", "https://Stackoverflow.com/users/39796/" ]
328,946
<p>On researching another question I noted that the <code>stat</code> function in Perl can take a dirhandle as its argument (instead of a filehandle or filename).</p> <p>However I can't find any examples of correct use of this - there are none in the Perl manual.</p> <p>Can anyone show an example of how to use it?</p...
[ { "answer_id": 328971, "author": "genehack", "author_id": 39933, "author_profile": "https://Stackoverflow.com/users/39933", "pm_score": 2, "selected": false, "text": "stat" }, { "answer_id": 328979, "author": "Robert Gamble", "author_id": 25222, "author_profile": "htt...
2008/11/30
[ "https://Stackoverflow.com/questions/328946", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6782/" ]
328,955
<p>Thanks for a <a href="https://stackoverflow.com/questions/327893/how-to-write-a-compare-function-for-qsort-from-stdlib">solution in C</a>, now I would like to achieve this in C++ using std::sort and vector:</p> <pre><code>typedef struct { double x; double y; double alfa; } pkt; </code></pre> <p><code>vector&...
[ { "answer_id": 328959, "author": "Konrad Rudolph", "author_id": 1968, "author_profile": "https://Stackoverflow.com/users/1968", "pm_score": 6, "selected": true, "text": "std::sort" }, { "answer_id": 328981, "author": "Johannes Schaub - litb", "author_id": 34509, "auth...
2008/11/30
[ "https://Stackoverflow.com/questions/328955", "https://Stackoverflow.com", "https://Stackoverflow.com/users/41839/" ]
328,962
<p>I wrote a Win Forms app to test how a LinkLabel class works. It appears to be fine until I click on the changed LinkLabel. The Form1.cs code is below:</p> <pre><code>using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using Syste...
[ { "answer_id": 7297967, "author": "Chamika Sandamal", "author_id": 880434, "author_profile": "https://Stackoverflow.com/users/880434", "pm_score": 1, "selected": false, "text": "ColorDialog" }, { "answer_id": 7298042, "author": "Damith", "author_id": 2558060, "author_...
2008/11/30
[ "https://Stackoverflow.com/questions/328962", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
328,964
<p>Is there any lib that convert very long numbers to string just copying the data?</p> <p>These one-liners are too slow:</p> <pre><code>def xlong(s): return sum([ord(c) &lt;&lt; e*8 for e,c in enumerate(s)]) def xstr(x): return chr(x&amp;255) + xstr(x &gt;&gt; 8) if x else '' print xlong('abcd'*1024) % 666...
[ { "answer_id": 328967, "author": "ironfroggy", "author_id": 19687, "author_profile": "https://Stackoverflow.com/users/19687", "pm_score": 2, "selected": false, "text": "packed = struct.pack('l', 123456)\nassert struct.unpack('l', packed)[0] == 123456\n" }, { "answer_id": 329011, ...
2008/11/30
[ "https://Stackoverflow.com/questions/328964", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
328,965
<p>Does anyone know how to auto-mount an <a href="http://aws.amazon.com/ebs/" rel="nofollow noreferrer">Elastic Block Storage</a> (EBS) volume when starting a Windows 2003 instance in Amazon's <a href="http://aws.amazon.com/ec2/" rel="nofollow noreferrer">Elastic Compute Cloud</a> (EC2)?</p>
[ { "answer_id": 422575, "author": "Chris Markle", "author_id": 1505846, "author_profile": "https://Stackoverflow.com/users/1505846", "pm_score": 2, "selected": false, "text": "#!/usr/bin/ruby\n\nrequire 'rubygems'\nrequire 'right_aws'\nrequire 'net/http'\n\nurl = 'http://169.254.169.254/2...
2008/11/30
[ "https://Stackoverflow.com/questions/328965", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16997/" ]
328,976
<p>Give me some of your thoughts on which is a better coding practice/makes more efficient code/looks prettier/whatever: Increasing and improving your ability to use if statements to anticipate and catch potential problems? Or simply making good use of try/catch in general?</p> <p>Let's say this is for Java (if it m...
[ { "answer_id": 328998, "author": "Karl", "author_id": 36093, "author_profile": "https://Stackoverflow.com/users/36093", "pm_score": 3, "selected": false, "text": "if" } ]
2008/11/30
[ "https://Stackoverflow.com/questions/328976", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19825/" ]
329,020
<p>I have set up a sort of introspection-enabling C++ library that allows, using minimum macros and a fair amount of template trickery, to declare structures and classes that get enriched with some meta-information.</p> <p>This meta-information captures all important details about each field of the struct/class that y...
[ { "answer_id": 334544, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 1, "selected": false, "text": " class xmlstream\n {\n ...\n };\n\n class ibase\n {\n void read( xmlstream& rStream ) = 0;\n void write( xmlstream& rS...
2008/11/30
[ "https://Stackoverflow.com/questions/329020", "https://Stackoverflow.com", "https://Stackoverflow.com/users/41789/" ]
329,029
<p>The title basically spells it out. What interfaces have you written that makes you proud and you use a lot. I guess the guys that wrote <code>IEnumerable&lt;T&gt;</code> and not least <code>IQueryable&lt;T&gt;</code> had a good feeling after creating those.</p>
[ { "answer_id": 329045, "author": "Konrad Rudolph", "author_id": 1968, "author_profile": "https://Stackoverflow.com/users/1968", "pm_score": 1, "selected": false, "text": "IEnumerable" }, { "answer_id": 329106, "author": "Jon Skeet", "author_id": 22656, "author_profile...
2008/11/30
[ "https://Stackoverflow.com/questions/329029", "https://Stackoverflow.com", "https://Stackoverflow.com/users/29519/" ]
329,033
<p>In .NET there is the <code>CultureInfo</code> class in the <code>System.Globalization</code> namespace. It has two similar properties both returning values of the <code>CultureInfo</code> type: <code>CurrentCulture</code> and <code>CurrentUICulture</code>.</p> <p>What is the difference between them? </p> <p>Which ...
[ { "answer_id": 329041, "author": "Tomalak", "author_id": 18771, "author_profile": "https://Stackoverflow.com/users/18771", "pm_score": 10, "selected": true, "text": "CurrentCulture" }, { "answer_id": 3627020, "author": "foxontherock", "author_id": 437946, "author_prof...
2008/11/30
[ "https://Stackoverflow.com/questions/329033", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6461/" ]
329,039
<p>I would like to write a program that will identify a machine( for licensing purposes), I tought about getting the following information and to compile an xml file with this data:</p> <ol> <li>MAC address.</li> <li>CPU data (serial, manufacture, etc)</li> <li>MotherBoard Identification. (serial, manufacture, etc)</l...
[ { "answer_id": 329096, "author": "ravenspoint", "author_id": 16582, "author_profile": "https://Stackoverflow.com/users/16582", "pm_score": 0, "selected": false, "text": "/** *************************************\n\n return string containing first MAC address on computer\n\n NOTE: requi...
2008/11/30
[ "https://Stackoverflow.com/questions/329039", "https://Stackoverflow.com", "https://Stackoverflow.com/users/33030/" ]
329,043
<p>I need a conditional compilation switch that knows if I am compiling for the mono or MS .NET runtime. How can I do this? </p>
[ { "answer_id": 329072, "author": "Will Dean", "author_id": 987, "author_profile": "https://Stackoverflow.com/users/987", "pm_score": 7, "selected": true, "text": "__MonoCS__" } ]
2008/11/30
[ "https://Stackoverflow.com/questions/329043", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3024/" ]
329,044
<p>I'm using the following as a way of seeing listing the various methods in my developement</p> <pre><code>print basename(__FILE__) . "::serve_table()" </code></pre> <p>is there any function that's able to return the name of a class method so I don't have to trpe it each time?</p>
[ { "answer_id": 329047, "author": "grepsedawk", "author_id": 14388, "author_profile": "https://Stackoverflow.com/users/14388", "pm_score": 3, "selected": false, "text": "__FUNCTION__" }, { "answer_id": 329050, "author": "Konrad Rudolph", "author_id": 1968, "author_prof...
2008/11/30
[ "https://Stackoverflow.com/questions/329044", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
329,058
<p>Why do you think Microsoft wants us to go through IEnumerable to get to IEnumerator? Isn't the presence or absence of a valid cast to IEnumerator for a given type enough to determine if the type is enumerable or not?</p> <p>For example whats wrong with the following?</p> <pre><code>class MyClass : IEnumerator { ...
[ { "answer_id": 329551, "author": "Daniel Earwicker", "author_id": 27423, "author_profile": "https://Stackoverflow.com/users/27423", "pm_score": 1, "selected": false, "text": "int matchCount = 0;\n\nforeach (var x in myList)\n{\n foreach (var y in myList)\n {\n if (x == y)\n ...
2008/11/30
[ "https://Stackoverflow.com/questions/329058", "https://Stackoverflow.com", "https://Stackoverflow.com/users/39648/" ]
329,059
<p>This is a second-hand question from an OS development site, but it made me curious since I couldn't find a decent explanation anywhere.</p> <p>When compiling and linking a free-standing C++ program using gcc, sometimes a linker error like this occurs:</p> <pre><code>out/kernel.o:(.eh_frame+0x11): undefined referen...
[ { "answer_id": 329101, "author": "Adam Rosenfield", "author_id": 9530, "author_profile": "https://Stackoverflow.com/users/9530", "pm_score": 3, "selected": false, "text": "libstd++" }, { "answer_id": 329161, "author": "Johannes Schaub - litb", "author_id": 34509, "aut...
2008/11/30
[ "https://Stackoverflow.com/questions/329059", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3121/" ]
329,061
<p>What are the tensions between multithreading and exception-safety in C++? Are there good guidelines to follow? Does a thread terminate because of an uncaught exception?</p>
[ { "answer_id": 329084, "author": "Adam Rosenfield", "author_id": 9530, "author_profile": "https://Stackoverflow.com/users/9530", "pm_score": 4, "selected": true, "text": "terminate()" }, { "answer_id": 329478, "author": "Michael Burr", "author_id": 12711, "author_prof...
2008/11/30
[ "https://Stackoverflow.com/questions/329061", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19630/" ]
329,063
<p>For example so that it works like this toString (Var x)= "x"</p>
[ { "answer_id": 329070, "author": "mipadi", "author_id": 28804, "author_profile": "https://Stackoverflow.com/users/28804", "pm_score": 1, "selected": false, "text": "show" }, { "answer_id": 1711075, "author": "Michael Steele", "author_id": 71116, "author_profile": "htt...
2008/11/30
[ "https://Stackoverflow.com/questions/329063", "https://Stackoverflow.com", "https://Stackoverflow.com/users/41000/" ]
329,065
<p>I have a stored procedure that returns values from a temp table. In my DBML, it displays (None) for the return type. What is the trick to get it to recognize the columns from my temp table?</p> <pre><code>CREATE PROCEDURE [dbo].[GetCategoryPriceRanges] @CategoryId int AS BEGIN DECLARE @MinPrice money, @MaxPric...
[ { "answer_id": 3896813, "author": "brooks", "author_id": 470968, "author_profile": "https://Stackoverflow.com/users/470968", "pm_score": 0, "selected": false, "text": "SET FMTONLY OFF" } ]
2008/11/30
[ "https://Stackoverflow.com/questions/329065", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3047/" ]
329,118
<p>I need to activate a JButton ActionListener within a JDialog so I can do some unit testing using JUnit.</p> <p>Basically I have this:</p> <pre><code> public class MyDialog extends JDialog { public static int APPLY_OPTION= 1; protected int buttonpressed; protected JButton okButton; public MyDial...
[ { "answer_id": 329153, "author": "Tom Hawtin - tackline", "author_id": 4725, "author_profile": "https://Stackoverflow.com/users/4725", "pm_score": 4, "selected": true, "text": "AbstractButton.doClick" }, { "answer_id": 330204, "author": "Markus Lausberg", "author_id": 390...
2008/11/30
[ "https://Stackoverflow.com/questions/329118", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3485/" ]
329,142
<p>Every time I start Visual Studio 2008, the first time I try to run the project I get the error CS0006 The metadata file ... could not be found. If I do a rebuild of the complete solution it works.</p> <p>Some information about the solution:</p> <ul> <li><p>I'm building in debug mode and Visual Studio complains abo...
[ { "answer_id": 9921584, "author": "maksim09", "author_id": 1133426, "author_profile": "https://Stackoverflow.com/users/1133426", "pm_score": 2, "selected": false, "text": "C:\\WINDOWS\\microsoft.net\\framework\\v…\\Temporary ASP.NET File\\" } ]
2008/11/30
[ "https://Stackoverflow.com/questions/329142", "https://Stackoverflow.com", "https://Stackoverflow.com/users/143/" ]
329,144
<p>This is a question brought up in a local user group mailing list at dot.net.nz ...</p> <blockquote> <p>I when I create an XHTML page old-fashioned way, I used to use the following syntax for my CSS declarations:</p> </blockquote> <pre><code>&lt;link rel=”stylesheet” type=”text/css” media=”screen” href=”css...
[ { "answer_id": 329179, "author": "technophile", "author_id": 23029, "author_profile": "https://Stackoverflow.com/users/23029", "pm_score": 1, "selected": false, "text": "@media print\n{\n /* Print CSS rules here */\n}\n" }, { "answer_id": 329182, "author": "gius", "aut...
2008/11/30
[ "https://Stackoverflow.com/questions/329144", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19377/" ]
329,145
<p>Assuming the following directory structure,</p> <pre><code>htdocs/ images/ css/ .htaccess system/ index.php ... </code></pre> <p>I would like to route all incoming requests through that php script. I have been trying some rewrite rules within the htaccess, but I can't seem to be able to route to files th...
[ { "answer_id": 329173, "author": "Robert K", "author_id": 24950, "author_profile": "https://Stackoverflow.com/users/24950", "pm_score": 2, "selected": false, "text": "index.php" }, { "answer_id": 329176, "author": "rojoca", "author_id": 41967, "author_profile": "https...
2008/11/30
[ "https://Stackoverflow.com/questions/329145", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1951/" ]
329,151
<p>jQuery selectors are wonderful, but I sometimes I find myself typing them over and over, and it gets a little annoying.</p> <pre><code> $('#mybutton').click(function() { $('#message-box').doSomething(); $('#message-box').doSomethingElse(); $('#message-box').attr('something', 'something'); }); </code></...
[ { "answer_id": 329155, "author": "Pim Jager", "author_id": 35197, "author_profile": "https://Stackoverflow.com/users/35197", "pm_score": 5, "selected": true, "text": "$('#mybutton').click(function() {\n $('#message-box').doSomething().doSomethingElse().attr('something', 'something');\n ...
2008/11/30
[ "https://Stackoverflow.com/questions/329151", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4636/" ]
329,174
<p>I've been asked to measure the performance of a fortran program that solves differential equations on a multi-CPU system. My employer insists that I measure FLOP/s (Floating operations per second) and compare the results with benchmarks (<a href="http://www.netlib.org/linpack/" rel="noreferrer">LINPACK</a>) but I am...
[ { "answer_id": 988121, "author": "Mike Dunlavey", "author_id": 23771, "author_profile": "https://Stackoverflow.com/users/23771", "pm_score": 1, "selected": false, "text": "exp()" }, { "answer_id": 64246807, "author": "m1m1k", "author_id": 738895, "author_profile": "ht...
2008/11/30
[ "https://Stackoverflow.com/questions/329174", "https://Stackoverflow.com", "https://Stackoverflow.com/users/39473/" ]
329,197
<p>In <code>SQL Server</code>, I can do something like this:</p> <pre><code>UPDATE tbl1 SET col2 = tbl2.col2 FROM table1 tbl1 INNER JOIN table2 tbl2 ON tbl1.col1 = tbl2.col1 </code></pre> <p>I haven't bothered to look whether this is part of any SQL standard or not, and I'm sure there are other ways to do...
[ { "answer_id": 329208, "author": "Gregory Higley", "author_id": 27779, "author_profile": "https://Stackoverflow.com/users/27779", "pm_score": 1, "selected": false, "text": "INSERT OR REPLACE INTO" }, { "answer_id": 2509921, "author": "Trey Jackson", "author_id": 6148, ...
2008/11/30
[ "https://Stackoverflow.com/questions/329197", "https://Stackoverflow.com", "https://Stackoverflow.com/users/27779/" ]
329,210
<p>When creating a UIView with a navigation bar in interface builder, the top bar takes some space, but the view still has the same size. This mean that the bottom of the view is not visible.</p> <p>Is there a way to get the "visible size" of a UIView? I would like to show a subview at the bottom of the screen, but ...
[ { "answer_id": 329597, "author": "Matt Gallagher", "author_id": 36103, "author_profile": "https://Stackoverflow.com/users/36103", "pm_score": 2, "selected": false, "text": "view" } ]
2008/11/30
[ "https://Stackoverflow.com/questions/329210", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9936/" ]
329,213
<p>I'm experimenting with the Tiny MCE editor. We also use jQuery, and I noticed that the standard Tiny MCE install includes a file called <code>tiny_mce_jquery.js</code>. Can anyone enlighten me as to what that's for? Oddly, I can't find anything about it online. Should I reference it in addition to the standard Tiny ...
[ { "answer_id": 329597, "author": "Matt Gallagher", "author_id": 36103, "author_profile": "https://Stackoverflow.com/users/36103", "pm_score": 2, "selected": false, "text": "view" } ]
2008/11/30
[ "https://Stackoverflow.com/questions/329213", "https://Stackoverflow.com", "https://Stackoverflow.com/users/239663/" ]
329,216
<p>First off, I apologize if this doesn't make sense. I'm new to XHTML, CSS and JavaScript.</p> <p>I gather that in XHTML, the correct way to have a nested page is as follows (instead of an iframe):</p> <pre><code>&lt;object name="nestedPage" data="http://abc.com/page.html" type="text/html" width="500" height="400" ...
[ { "answer_id": 329222, "author": "Vilx-", "author_id": 41360, "author_profile": "https://Stackoverflow.com/users/41360", "pm_score": 0, "selected": false, "text": "<iframe>s" }, { "answer_id": 329233, "author": "Javache", "author_id": 1074, "author_profile": "https://...
2008/11/30
[ "https://Stackoverflow.com/questions/329216", "https://Stackoverflow.com", "https://Stackoverflow.com/users/82/" ]
329,252
<p>Greetings,</p> <p>I have problems (when trying to print from c# to certain printers that do not have large print areas. Is there a way to shrink to printable area (like Adobe Acrobat do)? Thanks!</p>
[ { "answer_id": 329372, "author": "Joel Coehoorn", "author_id": 3043, "author_profile": "https://Stackoverflow.com/users/3043", "pm_score": 0, "selected": false, "text": "System.Drawing.Printing" } ]
2008/11/30
[ "https://Stackoverflow.com/questions/329252", "https://Stackoverflow.com", "https://Stackoverflow.com/users/34920/" ]
329,256
<p>What's the best way to consume REST web services from .NET?</p>
[ { "answer_id": 329885, "author": "Shane K", "author_id": 4643, "author_profile": "https://Stackoverflow.com/users/4643", "pm_score": 5, "selected": false, "text": "using System.Net; \n\nstring param = \"hello\";\n\nstring url = String.Format(\"http://somedomain.com/samplerequest?greeting...
2008/11/30
[ "https://Stackoverflow.com/questions/329256", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
329,259
<p>I have an MPI program which compiles and runs, but I would like to step through it to make sure nothing bizarre is happening. Ideally, I would like a simple way to attach GDB to any particular process, but I'm not really sure whether that's possible or how to do it. An alternative would be having each process write ...
[ { "answer_id": 843436, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 2, "selected": false, "text": "static void DebugWait(int rank) {\n char a;\n\n if(rank == 0) {\n scanf(\"%c\", &a);\n printf(\"%d: Sta...
2008/11/30
[ "https://Stackoverflow.com/questions/329259", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1891/" ]
329,264
<p>I have Swing java application with network communications to several "Players" that are represented as player objects, each with their own communication thread. The app has a "Team" object managing all player objects. Several UI components listen to events passed from the players through the Team object. </p> <p>In...
[ { "answer_id": 329387, "author": "Tom Hawtin - tackline", "author_id": 4725, "author_profile": "https://Stackoverflow.com/users/4725", "pm_score": 2, "selected": false, "text": "EventQueue.invokeLater" } ]
2008/11/30
[ "https://Stackoverflow.com/questions/329264", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18756/" ]
329,307
<p>I'm revisiting som old code of mine and have stumbled upon a method for getting the title of a website based on its url. It's not really what you would call a stable method as it often fails to produce a result and sometimes even produces incorrect results. Also, sometimes it fails to show some of the characters fro...
[ { "answer_id": 329324, "author": "Timothy Khouri", "author_id": 11917, "author_profile": "https://Stackoverflow.com/users/11917", "pm_score": 7, "selected": true, "text": "WebClient x = new WebClient();\nstring source = x.DownloadString(\"http://www.singingeels.com/\");\n" }, { "...
2008/11/30
[ "https://Stackoverflow.com/questions/329307", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4055/" ]
329,309
<p>Just wondering if there is any way (in C) to get the contents of the console buffer, preferably as some kind of char array. It is going to be written to a file, so if I am missing out on something stupid that will do exactly that, then point it out. It can be Windows-specific. I am using MinGW (gcc 3.4.5).</p> <p>T...
[ { "answer_id": 330787, "author": "plan9assembler", "author_id": 1710672, "author_profile": "https://Stackoverflow.com/users/1710672", "pm_score": 1, "selected": false, "text": "rl_line_buffer\n" }, { "answer_id": 40433532, "author": "nikau6", "author_id": 2780612, "au...
2008/11/30
[ "https://Stackoverflow.com/questions/329309", "https://Stackoverflow.com", "https://Stackoverflow.com/users/41981/" ]
329,333
<p>Has anybody seen such a thing? Small self-sufficient modules are preferred.</p>
[ { "answer_id": 329338, "author": "Robert Gamble", "author_id": 25222, "author_profile": "https://Stackoverflow.com/users/25222", "pm_score": 3, "selected": false, "text": ">>> from sympy import *\n>>> a = Rational(1,2)\n\n>>> a\n1/2\n\n>>> a*2\n1\n\n>>> Rational(2)**50/Rational(10)**50\n...
2008/11/30
[ "https://Stackoverflow.com/questions/329333", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20310/" ]
329,355
<p>I'm using .NET 3.5, trying to recursively delete a directory using:</p> <pre><code>Directory.Delete(myPath, true); </code></pre> <p>My understanding is that this should throw if files are in use or there is a permissions problem, but otherwise it should delete the directory and all of its contents.</p> <p>However...
[ { "answer_id": 329502, "author": "Jeremy Edwards", "author_id": 42005, "author_profile": "https://Stackoverflow.com/users/42005", "pm_score": 8, "selected": false, "text": "Directory.Delete" }, { "answer_id": 981360, "author": "Community", "author_id": -1, "author_pro...
2008/11/30
[ "https://Stackoverflow.com/questions/329355", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5142/" ]
329,359
<p>I faced a little trouble - I do not know if I can define my own operators for my classes. For example:<br></p> <pre><code>type TMinMatrix = class(TMatrix) private RowAmount: Byte; ColAmount: Byte; Data: DataMatrix; DemVector, SupVector: SupplyDemand; public constructor Create...
[ { "answer_id": 329901, "author": "Gerry Coll", "author_id": 22545, "author_profile": "https://Stackoverflow.com/users/22545", "pm_score": 2, "selected": false, "text": "TSubclass(Dest).Field1 := Field1;\nTSubclass(Dest).Field2 := Field2;\n" }, { "answer_id": 1384477, "author"...
2008/11/30
[ "https://Stackoverflow.com/questions/329359", "https://Stackoverflow.com", "https://Stackoverflow.com/users/28298/" ]
329,399
<p>In C++, on the stack, a simple variable is assigned a memory address so that we can use a pointer to contain this memory to point to it; then is a pointer also assigned a memory address?</p> <p>If yes, can we have a pointer of pointers?</p>
[ { "answer_id": 329403, "author": "Johannes Schaub - litb", "author_id": 34509, "author_profile": "https://Stackoverflow.com/users/34509", "pm_score": 4, "selected": false, "text": "int a;\nint b;\nint * pa = &a;\nint ** ppa = &pa;\n\n// set a to 10\n**ppa = 10;\n\n// set pa so it points ...
2008/11/30
[ "https://Stackoverflow.com/questions/329399", "https://Stackoverflow.com", "https://Stackoverflow.com/users/36064/" ]
329,411
<p>config file :</p> <pre><code>&lt;system.net&gt; &lt;mailSettings&gt; &lt;smtp from="YYYYY@xxxxxx.com"&gt; &lt;network host="mail.xxxxxx.com" port="25" password="password" userName="user@xxxxxx.com" defaultCredentials="false" /&gt; &lt;/smtp&gt; &lt;/mailSettings&gt; &lt;/system.net&gt; </code></pre> <p>I've alread...
[ { "answer_id": 329432, "author": "Todd Smith", "author_id": 31624, "author_profile": "https://Stackoverflow.com/users/31624", "pm_score": 2, "selected": false, "text": "<configuration>\n <system.net>\n <mailSettings>\n <smtp from=\"YYYYY@xxxxxx.com\">\n <network host=\"ma...
2008/11/30
[ "https://Stackoverflow.com/questions/329411", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
329,423
<p>I understand how Map is easily parallelizable - each computer/CPU can just operate on a small portion of the array.</p> <p>Is Reduce/foldl parallelizable? It seems like each computation depends on the previous one. Is it just parallelizable for certain types of functions?</p>
[ { "answer_id": 329461, "author": "strager", "author_id": 39992, "author_profile": "https://Stackoverflow.com/users/39992", "pm_score": 1, "selected": false, "text": "// Original\nresult = null;\nforeach(item in map) {\n result += item;\n}\n\n// Parallel\nresultArray = array();\nmapPar...
2008/11/30
[ "https://Stackoverflow.com/questions/329423", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15055/" ]
329,429
<p>You know how Subversion stores a copy of every file it has checked-out in the hidden .svn folders? The website I'm building is pretty big (has over 1Gig of PDF files). These PDF files will very rarely change throughout the existence of the website.</p> <p>I was wondering if there was a way of telling Subversion tha...
[ { "answer_id": 329433, "author": "Greg Hewgill", "author_id": 893, "author_profile": "https://Stackoverflow.com/users/893", "pm_score": 2, "selected": false, "text": "svn export" } ]
2008/11/30
[ "https://Stackoverflow.com/questions/329429", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21406/" ]
329,447
<p>I've got a form inside an <code>&lt;asp:Content&gt;</code> block that is being submitted to a controller. For one of the controls, I need to get some information from it directly that won't happen automatically by calling <code>UpdateModel()</code>.</p> <p>However, in the <code>Request.Form</code> dictionary, the ...
[ { "answer_id": 329552, "author": "tvanfosson", "author_id": 12950, "author_profile": "https://Stackoverflow.com/users/12950", "pm_score": 0, "selected": false, "text": "string editorKey = null;\nforeach (string key in Request.Form.Keys)\n{\n if (key.EndsWith( \"$AuthorBio\" ))\n {\...
2008/11/30
[ "https://Stackoverflow.com/questions/329447", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9913/" ]
329,477
<p>I have an SQL 2005 table, let's call it Orders, in the format:</p> <pre><code>OrderID, OrderDate, OrderAmount 1, 25/11/2008, 10 2, 25/11/2008, 2 3, 30/1002008, 5 </code></pre> <p>Then I need to produce a report table showing the ordered amount on each day in the last 7 days:</p> <pre><code>Day,...
[ { "answer_id": 329515, "author": "Timothy Khouri", "author_id": 11917, "author_profile": "https://Stackoverflow.com/users/11917", "pm_score": 3, "selected": false, "text": "CREATE TABLE #MyDates ( TargetDate DATETIME )\nINSERT INTO #MyDates VALUES CONVERT(DATETIME, CONVERT(VARCHAR, GETDA...
2008/11/30
[ "https://Stackoverflow.com/questions/329477", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3263/" ]
329,490
<p>in Microsoft Access, is there a way which I can programatically set the Confirm Action Queries flag on the options screen to False? Ideally when the database is started up I would like to check if it's true, and if so, mark it as false for the currently logged in user.</p> <p>The application is locked down reasonab...
[ { "answer_id": 329524, "author": "Harry Steinhilber", "author_id": 6118, "author_profile": "https://Stackoverflow.com/users/6118", "pm_score": 2, "selected": true, "text": "If Application.GetOption(\"Confirm Action Queries\") Then\n Application.SetOption \"Confirm Action Queries\", Fa...
2008/11/30
[ "https://Stackoverflow.com/questions/329490", "https://Stackoverflow.com", "https://Stackoverflow.com/users/30140/" ]
329,497
<p>i have code like, sorry i dont have the exact code now. but its valid.</p> <pre><code>&lt;iframe src="..." borderframe="0" scrolling="no" width=728px" height="90px"&gt;&lt;/iframe&gt; </code></pre> <p>the target is a html file that contains code for a banner. everything displays well. but when i resize browser or...
[ { "answer_id": 780820, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 0, "selected": false, "text": "0.5px" } ]
2008/11/30
[ "https://Stackoverflow.com/questions/329497", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
329,498
<p>I've recently started with Python, and am enjoying the "batteries included" design. I'e already found out I can import time, math, re, urllib, but don't know how to know that something is builtin rather than writing it from scratch.</p> <p>What's included, and where can I get other good quality libraries from?</p>
[ { "answer_id": 329510, "author": "ConcernedOfTunbridgeWells", "author_id": 15401, "author_profile": "https://Stackoverflow.com/users/15401", "pm_score": 5, "selected": true, "text": "try:\n import foobar\nexcept:\n print 'No foobar module'\n" }, { "answer_id": 329518, "...
2008/11/30
[ "https://Stackoverflow.com/questions/329498", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16511/" ]
329,500
<p>I would like to use <code>[Authorize]</code> for every action in my admin controller except the <code>Login</code> action. </p> <pre><code>[Authorize (Roles = "Administrator")] public class AdminController : Controller { // what can I place here to disable authorize? public ActionResult Login() { ...
[ { "answer_id": 329562, "author": "tvanfosson", "author_id": 12950, "author_profile": "https://Stackoverflow.com/users/12950", "pm_score": 5, "selected": true, "text": "[AdminAuthorize (Roles = \"Administrator\", Exempt = \"Login, Logout\") ]\npublic class AdminController : Controller\n{\...
2008/11/30
[ "https://Stackoverflow.com/questions/329500", "https://Stackoverflow.com", "https://Stackoverflow.com/users/31624/" ]
329,516
<p>I'm using the following code to have a non-JS navigation:</p> <pre><code>&lt;ol id="navigation"&gt; &lt;li id="home"&gt;&lt;a href="#"&gt;&lt;img src="./images/nav/home-hover.png" alt="Home" /&gt;&lt;/li&gt; ... &lt;/ol&gt; </code></pre> <p>And the CSS:</p> <pre><code>#navigation a { display: block; ...
[ { "answer_id": 329550, "author": "Kornel", "author_id": 27009, "author_profile": "https://Stackoverflow.com/users/27009", "pm_score": 3, "selected": true, "text": "<a>" }, { "answer_id": 329992, "author": "Jason", "author_id": 22786, "author_profile": "https://Stackov...
2008/11/30
[ "https://Stackoverflow.com/questions/329516", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2025/" ]
329,517
<p>There is a simple C++ method to use pattern matching on strings? The code should sound like this:</p> <pre><code>if (regexpcmp("l?nole*[0-9]", "linoleum1")) { //we have a match! } else { //no match } </code></pre>
[ { "answer_id": 329522, "author": "Reunanen", "author_id": 19254, "author_profile": "https://Stackoverflow.com/users/19254", "pm_score": 4, "selected": false, "text": "const boost::regex e(\"l?nole*[0-9]\");\nif (regex_match(\"linoleum1\", e)) {\n //we have a match!\n} else {\n //no mat...
2008/11/30
[ "https://Stackoverflow.com/questions/329517", "https://Stackoverflow.com", "https://Stackoverflow.com/users/39796/" ]
329,535
<p>What's the best way to get a list of users that are assigned to a SharePoint portal?</p>
[ { "answer_id": 333183, "author": "Ryan Smith", "author_id": 10420, "author_profile": "https://Stackoverflow.com/users/10420", "pm_score": 2, "selected": false, "text": "Dim Site As New SPSite(\"SiteURL\")\nDim AllUsers As SPUserCollection = Site.RootWeb.AllUsers\nDim u As SPUser\nFor Eac...
2008/11/30
[ "https://Stackoverflow.com/questions/329535", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10420/" ]
329,547
<p>I have some code that I am putting in the code-behind of a master page. This master page is my main layout and the purpose of the code is to check whether the user is logged in and take the appropriate action depending on whether they are or not. I would be interested in hearing alternate methods on how to approach ...
[ { "answer_id": 330171, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 2, "selected": false, "text": "<authentication mode=\"Forms\">\n <forms loginUrl=\"~/Account/Login\"/>\n</authentication>\n" } ]
2008/11/30
[ "https://Stackoverflow.com/questions/329547", "https://Stackoverflow.com", "https://Stackoverflow.com/users/39430/" ]