qid
int64
4
22.2M
question
stringlengths
18
48.3k
answers
list
date
stringlengths
10
10
metadata
list
338,934
<p>I am using the SharpZipLib open source .net library from <a href="http://www.icsharpcode.net" rel="nofollow noreferrer">www.icsharpcode.net</a></p> <p>My goal is to unzip an xml file and read it into a dataset. However I get the following error reading the file into a dataset: "Data at the root level is invalid. Li...
[ { "answer_id": 338991, "author": "Marc Gravell", "author_id": 23354, "author_profile": "https://Stackoverflow.com/users/23354", "pm_score": 2, "selected": true, "text": "IDisposable" }, { "answer_id": 339208, "author": "Ron Skufca", "author_id": 4096, "author_profile"...
2008/12/03
[ "https://Stackoverflow.com/questions/338934", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4096/" ]
338,935
<p>I am binding a List to a DataGridView. One property of the SomeObject class will be a status code (ex. Red, Yellow, Green). Can I "bind" the status to the background color of a cell easily? How about binding to a tooltip also?</p>
[ { "answer_id": 340067, "author": "Dave R.", "author_id": 42841, "author_profile": "https://Stackoverflow.com/users/42841", "pm_score": 6, "selected": true, "text": "using System.Drawing;\nusing System.Windows.Forms;\n\nnamespace WindowsFormsApplication1\n{\n public partial class Form1...
2008/12/03
[ "https://Stackoverflow.com/questions/338935", "https://Stackoverflow.com", "https://Stackoverflow.com/users/36590/" ]
338,944
<p>I'm working on a JIRA implementation and need to make use of the API. </p> <p>Does anyone know of an existing .NET wrapper for the JIRA SOAP API? </p>
[ { "answer_id": 6009304, "author": "Patrik Lindström", "author_id": 648076, "author_profile": "https://Stackoverflow.com/users/648076", "pm_score": 4, "selected": false, "text": "this.JiraSrvTalker.createIssue(string In0 and,RemoteIssue In1)\n" }, { "answer_id": 7157754, "auth...
2008/12/03
[ "https://Stackoverflow.com/questions/338944", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3452/" ]
338,945
<p>When debugging my VS2005 project, I get the following error when I attempt to step into the function that returns the <em>vScenarioDescriptions</em> local variable it's struggling with...</p> <p><em><a href="http://people.ict.usc.edu/~crotchett/images/symbolnotdefined.JPG" rel="nofollow noreferrer">image no longer ...
[ { "answer_id": 338958, "author": "Adam Rosenfield", "author_id": 9530, "author_profile": "https://Stackoverflow.com/users/9530", "pm_score": 0, "selected": false, "text": "namespace::" }, { "answer_id": 339039, "author": "Michael Burr", "author_id": 12711, "author_pro...
2008/12/03
[ "https://Stackoverflow.com/questions/338945", "https://Stackoverflow.com", "https://Stackoverflow.com/users/191808/" ]
338,950
<p>How would one code the following C# code in Managed C++</p> <pre><code>void Foo() { using (SqlConnection con = new SqlConnection("connectionStringGoesHere")) { //do stuff } } </code></pre> <p><strong>Clarificaton:</strong> For managed objects.</p>
[ { "answer_id": 339109, "author": "Mike Hall", "author_id": 18202, "author_profile": "https://Stackoverflow.com/users/18202", "pm_score": -1, "selected": false, "text": "void Foo()\n{\n {\n SqlConnection con = new SqlConnection(\"connectionStringGoesHere\");\n // do stuff...
2008/12/03
[ "https://Stackoverflow.com/questions/338950", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4066/" ]
338,951
<p>I'm writing an application that can be started either as a standard WinForms app or in unattended mode from the command-line. The application was built using the VS 2k5 standard WinForms template.</p> <p>When the application is executed from the command-line, I want it to output information that can be captured by ...
[ { "answer_id": 415064, "author": "Michael Burr", "author_id": 12711, "author_profile": "https://Stackoverflow.com/users/12711", "pm_score": 4, "selected": false, "text": "IMAGE_SUBSYSTEM_WINDOWS_GUI" }, { "answer_id": 70998076, "author": "Zhu Panda", "author_id": 17470361...
2008/12/03
[ "https://Stackoverflow.com/questions/338951", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5287/" ]
338,978
<p>Here's my table: </p> <pre><code>CREATE TABLE `alums_alumphoto` ( `id` int(11) NOT NULL auto_increment, `alum_id` int(11) NOT NULL, `photo_id` int(11) default NULL, `media_id` int(11) default NULL, `updated` datetime NOT NULL, PRIMARY KEY (`id`), KEY `alums_alumphoto_alum_id` (`alum_id...
[ { "answer_id": 339015, "author": "yogman", "author_id": 24349, "author_profile": "https://Stackoverflow.com/users/24349", "pm_score": 4, "selected": true, "text": "> CREATE TABLE alums_alumphoto_new LIKE alums_alumphoto;\n> ALTER TABLE .... // Drop constraint\n> ALTER TABLE .... // Drop ...
2008/12/03
[ "https://Stackoverflow.com/questions/338978", "https://Stackoverflow.com", "https://Stackoverflow.com/users/35579/" ]
338,981
<p>My dilema:</p> <p>In .htaccess in my website's root:</p> <pre><code>RewriteEngine On RewriteCond %{HTTP_HOST} !^www\.example\.com [NC] RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L] </code></pre> <p>In .htaccess in the subdirectory /foo</p> <pre><code>RewriteEngine On RewriteRule ^page1\.html$ /foo/page2...
[ { "answer_id": 339188, "author": "Owen", "author_id": 4853, "author_profile": "https://Stackoverflow.com/users/4853", "pm_score": 2, "selected": false, "text": "/.htaccess" }, { "answer_id": 339287, "author": "Community", "author_id": -1, "author_profile": "https://St...
2008/12/03
[ "https://Stackoverflow.com/questions/338981", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16272/" ]
338,986
<p>In a <a href="http://www.hackification.com/2008/12/03/linq-to-entities-the-blackberry-storm-of-orms/" rel="nofollow noreferrer">controversial blog post</a> today, Hackification pontificates on what appears to be a bug in the new LINQ To Entities framework: </p> <blockquote> <p>Suppose I search for a customer:</p>...
[ { "answer_id": 339000, "author": "dtc", "author_id": 32892, "author_profile": "https://Stackoverflow.com/users/32892", "pm_score": 1, "selected": false, "text": "from o in alice.Orders where o.Item == \"Item_Name\" select o\n" }, { "answer_id": 378216, "author": "CraftyFella"...
2008/12/03
[ "https://Stackoverflow.com/questions/338986", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1965/" ]
338,988
<p>How do you get/set the absolute position of a MovieClip in Flash/AS3? And by absolute, I mean its position relative to the stage's origo.</p> <p>I currently have this setter:</p> <pre><code>class MyMovieClip extends MovieClip { function set xAbs(var x:Number):void { this.x = -(this.parent.localToGlobal(new...
[ { "answer_id": 339068, "author": "moritzstefaner", "author_id": 23069, "author_profile": "https://Stackoverflow.com/users/23069", "pm_score": 3, "selected": false, "text": "var x=this.parent.localToGlobal(new Point(this.x,0)).x; \n" }, { "answer_id": 2256564, "author": "paran...
2008/12/03
[ "https://Stackoverflow.com/questions/338988", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7724/" ]
339,004
<p>We are busy developing a Java web service for a client. There are two possible choices:</p> <ul> <li><p>Store the encrypted user name / password on the web service client. Read from a config. file on the client side, decrypt and send.</p></li> <li><p>Store the encrypted user name / password on the web server. Read ...
[ { "answer_id": 339769, "author": "Gennady Shumakher", "author_id": 42512, "author_profile": "https://Stackoverflow.com/users/42512", "pm_score": 5, "selected": false, "text": "// only the first 8 Bytes of the constructor argument are used \n// as material for generating the keySpec\nDESK...
2008/12/03
[ "https://Stackoverflow.com/questions/339004", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9922/" ]
339,007
<p>How do I pad a numeric string with zeroes to the left, so that the string has a specific length?</p>
[ { "answer_id": 339012, "author": "Konrad Rudolph", "author_id": 1968, "author_profile": "https://Stackoverflow.com/users/1968", "pm_score": 8, "selected": false, "text": "zfill" }, { "answer_id": 339013, "author": "Harley Holcombe", "author_id": 1057, "author_profile"...
2008/12/03
[ "https://Stackoverflow.com/questions/339007", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
339,041
<p>I've been working with LINQ To SQL for a little while now and when it comes to removing an entity from the DB, I've always called the table's .DeleteOnSubmit and passed in the entity. Sometimes I've found myself writing something like:</p> <pre><code>db.Users.DeleteOnSubmit(db.Users.Where(c =&gt; c.ID == xyz).Selec...
[ { "answer_id": 339099, "author": "Adam Lassek", "author_id": 1249, "author_profile": "https://Stackoverflow.com/users/1249", "pm_score": 0, "selected": false, "text": "db.spDeleteUserById(id);\n" }, { "answer_id": 339198, "author": "Christopher Edwards", "author_id": 2941...
2008/12/03
[ "https://Stackoverflow.com/questions/339041", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
339,044
<p>A puzzler from a coworker that I cannot figure out...</p> <pre><code>update btd.dbo.tblpayroll set empname = ( select b.Legal_Name from ( SELECT Legal_Name, Employee_ID FROM Com.dbo.Workers ...
[ { "answer_id": 339080, "author": "tvanfosson", "author_id": 12950, "author_profile": "https://Stackoverflow.com/users/12950", "pm_score": 3, "selected": true, "text": "update btd.dbo.tblpayroll\nset empname = ( select Legal_Name\n from Com.dbo.Workers\n ...
2008/12/03
[ "https://Stackoverflow.com/questions/339044", "https://Stackoverflow.com", "https://Stackoverflow.com/users/37379/" ]
339,045
<p>I'm not of the Perl world, so some of this is new to me. I'm running Ubuntu Hardy LTS with apache2 and mod_fcgid packages installed. I'd like to get MT4 running under fcgid rather than mod-cgi (it seems to run OK with plain-old CGI).</p> <p>I can't seem to get even a simple Perl script to run under fcgid. I creat...
[ { "answer_id": 339094, "author": "mat", "author_id": 42083, "author_profile": "https://Stackoverflow.com/users/42083", "pm_score": 2, "selected": false, "text": "use FCGI;\n\nmy $count = 0;\nmy $request = FCGI::Request();\n\nwhile($request->Accept() >= 0) {\n print(\"Content-type: tex...
2008/12/03
[ "https://Stackoverflow.com/questions/339045", "https://Stackoverflow.com", "https://Stackoverflow.com/users/323748/" ]
339,053
<p>Using python 2.4 and the built-in <code>ZipFile</code> library, I cannot read very large zip files (greater than 1 or 2 GB) because it wants to store the entire contents of the uncompressed file in memory. Is there another way to do this (either with a third-party library or some other hack), or must I "shell out" ...
[ { "answer_id": 339506, "author": "S.Lott", "author_id": 10661, "author_profile": "https://Stackoverflow.com/users/10661", "pm_score": 5, "selected": true, "text": "import zipfile\nimport zlib\nimport os\n\nsrc = open( doc, \"rb\" )\nzf = zipfile.ZipFile( src )\nfor m in zf.infolist():\n...
2008/12/03
[ "https://Stackoverflow.com/questions/339053", "https://Stackoverflow.com", "https://Stackoverflow.com/users/27020/" ]
339,054
<p>I'm updating my code generator and have a choice between implementing a method stub as a Virtual Method in a base class or a partial method in the generated code. Is there any performance difference between the two?</p>
[ { "answer_id": 339118, "author": "Marc Gravell", "author_id": 23354, "author_profile": "https://Stackoverflow.com/users/23354", "pm_score": 3, "selected": true, "text": "callvirt" } ]
2008/12/03
[ "https://Stackoverflow.com/questions/339054", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2723/" ]
339,056
<p>I need to be able to allow query strings that contain characters like '&lt;' and '>'. However, putting something like id=mi&lt;ke into the the URL will output an error page saying:</p> <p><em>A potentially dangerous Request.QueryString value was detected from the client (id="mi&lt;ke").</em></p> <p>If I first url ...
[ { "answer_id": 339104, "author": "Andrew Rollings", "author_id": 40410, "author_profile": "https://Stackoverflow.com/users/40410", "pm_score": 4, "selected": true, "text": "System.Text.ASCIIEncoding.ASCII.GetBytes\n" }, { "answer_id": 339115, "author": "tvanfosson", "auth...
2008/12/03
[ "https://Stackoverflow.com/questions/339056", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18202/" ]
339,063
<p>When would I implement IDispose on a class as opposed to a destructor? I read <a href="http://www.dotnetspider.com/resources/1382-Understanding-IDisposable-pattern.aspx" rel="noreferrer">this article</a>, but I'm still missing the point. </p> <p>My assumption is that if I implement IDispose on an object, I can ex...
[ { "answer_id": 339077, "author": "Marc Gravell", "author_id": 23354, "author_profile": "https://Stackoverflow.com/users/23354", "pm_score": 8, "selected": true, "text": "IDisposable" }, { "answer_id": 339085, "author": "Igal Tabachnik", "author_id": 8205, "author_prof...
2008/12/03
[ "https://Stackoverflow.com/questions/339063", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20133/" ]
339,088
<p>I'm getting an error compiling my VSTO (Visual Studio Tools for Office) project in VS.</p> <p>It says <strong>"Value does not fall within the expected range."</strong> and <strong>"There was an error during installation"</strong></p>
[ { "answer_id": 37077112, "author": "Mehdi Khademloo", "author_id": 4038978, "author_profile": "https://Stackoverflow.com/users/4038978", "pm_score": 0, "selected": false, "text": "vsto" } ]
2008/12/03
[ "https://Stackoverflow.com/questions/339088", "https://Stackoverflow.com", "https://Stackoverflow.com/users/41021/" ]
339,089
<p>In the iPhone SDK I don't see the same <code>SCDynamicStore</code> used on Mac OS X to get the SSID name that your wireless network is currently connected to isn't available. </p> <p>Is there a way to get the SSID name that the iPhone is currently connected to? </p> <p>I see some apps do it (<a href="http://itune...
[ { "answer_id": 27191680, "author": "MSA", "author_id": 4279108, "author_profile": "https://Stackoverflow.com/users/4279108", "pm_score": 2, "selected": false, "text": "#import <SystemConfiguration/CaptiveNetwork.h>\n\nCFArrayRef myArray = CNCopySupportedInterfaces();\nCFDictionaryRef myD...
2008/12/03
[ "https://Stackoverflow.com/questions/339089", "https://Stackoverflow.com", "https://Stackoverflow.com/users/29263/" ]
339,100
<p>I’m selecting data on an old database which has an abused status column. The status column has multiple pieces of information in it. Values are like ‘New Contact YYYY’, ‘Online YYYY’, ‘Updated YYYY’, ‘Withdrawn YYYY’, etc…. As you may have guessed, YYYY represents the year … which I need.</p> <p>In the past I’ve ...
[ { "answer_id": 339125, "author": "Tim C", "author_id": 7585, "author_profile": "https://Stackoverflow.com/users/7585", "pm_score": 4, "selected": true, "text": "SELECT SUBSTRING(FieldName, PATINDEX('%[0-9][0-9][0-9][0-9]%', FieldName), 4)\nFROM TableName\n" }, { "answer_id": 3391...
2008/12/03
[ "https://Stackoverflow.com/questions/339100", "https://Stackoverflow.com", "https://Stackoverflow.com/users/29043/" ]
339,105
<p>I'm really struggling with grasping how to effectively use FasterCSV to accomplish what I want.</p> <p>I have a CSV file; say:</p> <pre><code>ID,day,site test,tuesday,cnn.com bozo,friday,fark.com god,monday,xkcd.com test,saturday,whatever.com </code></pre> <p>I what to go through this file and end up with a hash ...
[ { "answer_id": 339147, "author": "Eli", "author_id": 5958, "author_profile": "https://Stackoverflow.com/users/5958", "pm_score": 0, "selected": false, "text": "row.to_hash" }, { "answer_id": 339148, "author": "mat", "author_id": 42083, "author_profile": "https://Stack...
2008/12/03
[ "https://Stackoverflow.com/questions/339105", "https://Stackoverflow.com", "https://Stackoverflow.com/users/32154/" ]
339,106
<p>Some time ago I got this error when building ANY Visual Studio Deployment project.</p> <p><strong>"Unrecoverable build error"</strong> </p> <p><em>I thought my VS installation was corrupted or I deleted some important files, but ...</em></p>
[ { "answer_id": 339111, "author": "Robin Rodricks", "author_id": 41021, "author_profile": "https://Stackoverflow.com/users/41021", "pm_score": 6, "selected": true, "text": "regsvr32 \"C:\\Program Files\\Common Files\\Microsoft Shared\\MSI Tools\\mergemod.dll\"\nregsvr32 ole32.dll\n" }, ...
2008/12/03
[ "https://Stackoverflow.com/questions/339106", "https://Stackoverflow.com", "https://Stackoverflow.com/users/41021/" ]
339,130
<p>I'm trying to generate a JSON response that includes some HTML. Thus, I have <code>/app/views/foo/bar.json.erb</code>:</p> <pre><code>{ someKey: 'some value', someHTML: "&lt;%= h render(:partial =&gt; '/foo/baz') -%&gt;" } </code></pre> <p>I want it to render <code>/app/views/foo/_baz.html.erb</code>, but it ...
[ { "answer_id": 340335, "author": "roninek", "author_id": 42642, "author_profile": "https://Stackoverflow.com/users/42642", "pm_score": 3, "selected": false, "text": "render :file" }, { "answer_id": 340432, "author": "James A. Rosen", "author_id": 1190, "author_profile...
2008/12/03
[ "https://Stackoverflow.com/questions/339130", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1190/" ]
339,133
<p>The scenario: we have a web system that automatically generates office 2003 excel files "on the fly" (using the 2003 XML file format, not the binary format.) These files do get kept on the web server for various things.</p> <p>Now, we're in a situation where the client would really like us to take the xls files ge...
[ { "answer_id": 339215, "author": "Fionnuala", "author_id": 2548, "author_profile": "https://Stackoverflow.com/users/2548", "pm_score": 2, "selected": true, "text": "strXLToOpen = \"C:\\Docs\\ltd.xls\" \nstrXLToImport = \"C:\\Docs\\ltd2.xls\"\n\nSet cn = CreateObject(\"ADODB.Connection\")...
2008/12/03
[ "https://Stackoverflow.com/questions/339133", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19074/" ]
339,146
<p>I don't know why this bothers me so much, but when I create websites, I always try to do all my styling with CSS. However one thing I always have to remember to do when I'm working with tables is add cellspacing="0" and cellpadding="0"</p> <p>Why is there not a CSS property to override these antiquated HTML 4 attr...
[ { "answer_id": 339154, "author": "Jimmy", "author_id": 4435, "author_profile": "https://Stackoverflow.com/users/4435", "pm_score": 0, "selected": false, "text": "table { border-collapse:collapse; }\n" }, { "answer_id": 339164, "author": "mat", "author_id": 42083, "aut...
2008/12/03
[ "https://Stackoverflow.com/questions/339146", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10420/" ]
339,150
<p>I have been banging my head on this one all day. The C++ project I am currently working on has a requirement to display an editable value. The currently selected digit displays the incremented value above and decremented value below for said digit. It is useful to be able to reference the editable value as both a...
[ { "answer_id": 339161, "author": "Loki", "author_id": 39057, "author_profile": "https://Stackoverflow.com/users/39057", "pm_score": 4, "selected": true, "text": "char string[99];\nsprintf(string,\"%f\",floatValue);\n" }, { "answer_id": 339877, "author": "Mr.Ree", "author_...
2008/12/03
[ "https://Stackoverflow.com/questions/339150", "https://Stackoverflow.com", "https://Stackoverflow.com/users/43028/" ]
339,170
<p>I have a client who had to rebuild his automated build server. He checked out his project folder from my subversion server but is now no longer able to commit - he gets this error:</p> <pre><code>Error: Commit failed (details follow): Error: Cannot write to the prototype revision file of transaction '551-1' becau...
[ { "answer_id": 339246, "author": "Jason Coco", "author_id": 34218, "author_profile": "https://Stackoverflow.com/users/34218", "pm_score": 3, "selected": false, "text": "svnadmin lstxns /path/to/repository\n" }, { "answer_id": 11630965, "author": "Defense Contractor", "aut...
2008/12/03
[ "https://Stackoverflow.com/questions/339170", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9731/" ]
339,172
<p>Is there any possibility that GetPropInfo returns nil even if the given class is declared with correct {$METHODINFO} directives.</p> <pre><code> type ... ... {$METHODINFO ON} TMyClass = class private fField: integer; published property Field: integer read fField write fField; ...
[ { "answer_id": 339301, "author": "utku_karatas", "author_id": 14716, "author_profile": "https://Stackoverflow.com/users/14716", "pm_score": 4, "selected": true, "text": " type \n TMyClass = class; \n ... \n ...\n {$METHODINFO ON}\n TMyClass = class\n private\n ...
2008/12/03
[ "https://Stackoverflow.com/questions/339172", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14716/" ]
339,180
<p>I run all my integers through a <code>(int)Integer</code> to make them safe to use in my query strings.</p> <p>I also run my strings through this function code:-</p> <pre><code>if(!get_magic_quotes_gpc()) { $string = mysql_real_escape_string($string); } $pattern = array("\\'", "\\\"", "\\\\", "...
[ { "answer_id": 339192, "author": "nickf", "author_id": 9021, "author_profile": "https://Stackoverflow.com/users/9021", "pm_score": 3, "selected": true, "text": "$string = $_POST['searchTerm'];\nif (get_magic_quotes_gpc()) {\n $string = stripslashes($string);\n}\n$string = str_replace(...
2008/12/03
[ "https://Stackoverflow.com/questions/339180", "https://Stackoverflow.com", "https://Stackoverflow.com/users/31671/" ]
339,181
<p>In ruby, is there a way to "undefine" a variable or constant once it's been defined?</p> <p>In our rails environemnts, we define one of three contants to be <code>true</code>, depending on the environment: <code>TESTING</code>, <code>DEVELOPMENT</code>, or <code>PRODUCTION</code>. Then, in controller code, we use ...
[ { "answer_id": 339226, "author": "grepsedawk", "author_id": 14388, "author_profile": "https://Stackoverflow.com/users/14388", "pm_score": 2, "selected": false, "text": "environment = :TESTING\n\nif(environment == :TESTING)\n" }, { "answer_id": 339259, "author": "paxdiablo", ...
2008/12/03
[ "https://Stackoverflow.com/questions/339181", "https://Stackoverflow.com", "https://Stackoverflow.com/users/41177/" ]
339,199
<p>First, I know there are methods off of the generic <code>List&lt;&gt;</code> class already in the framework do iterate over the <code>List&lt;&gt;</code>.</p> <p>But as an example, what is the correct syntax to write a ForEach method to iterate over each object of a <code>List&lt;&gt;</code>, and do a <code>Console...
[ { "answer_id": 339206, "author": "Matt Hamilton", "author_id": 615, "author_profile": "https://Stackoverflow.com/users/615", "pm_score": 7, "selected": true, "text": "public void Each<T>(IEnumerable<T> items, Action<T> action)\n{\n foreach (var item in items)\n action(item);\n}...
2008/12/04
[ "https://Stackoverflow.com/questions/339199", "https://Stackoverflow.com", "https://Stackoverflow.com/users/36590/" ]
339,200
<p>Yes, like those pretty buttons on the iPhone. ;)</p> <p>I've been searching and reading for days now and everytime I find something that will get me close (like CreateRoundRectRgn), it blows up because Windows Mobile 6 GDI+ doesn't support it.</p> <p>I can do the whole owner draw thing and such. But how do I cu...
[ { "answer_id": 495489, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 1, "selected": false, "text": "//Set up a brush and pen\nHBRUSH brush = CreateSolidBrush(RGB(255, 0, 0));\nHPEN pen = CreatePen(PS_SOLID, 1, RGB(0, 255, 0));...
2008/12/04
[ "https://Stackoverflow.com/questions/339200", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7599/" ]
339,202
<p>I'm in the process of setting up a php project, but am not very familiar with how to properly use php's include/require commands. My layout currently looks like this:</p> <pre><code>/public --apache points into this directory /public/index.php /public/blah/page.php /utils/util1.php -- useful classes/...
[ { "answer_id": 339219, "author": "Rob Burke", "author_id": 135, "author_profile": "https://Stackoverflow.com/users/135", "pm_score": -1, "selected": false, "text": "require('/sharedhost/yourdomain.com/apache/www/dbutils.php');\n" }, { "answer_id": 339271, "author": "UnkwnTech...
2008/12/04
[ "https://Stackoverflow.com/questions/339202", "https://Stackoverflow.com", "https://Stackoverflow.com/users/945/" ]
339,210
<p>[Meta-note:] I was browsing the question page, getting really tired of "DIVS vs Tables" "When to use tables vs DIVS" "Are Divs better than Tables" "Tables versus CSS" and all the questions that ask <em>THE SAME THING OMG PEOPLE</em> but I would like to see all the ways people tackle the translation of the canonical ...
[ { "answer_id": 339229, "author": "mat", "author_id": 42083, "author_profile": "https://Stackoverflow.com/users/42083", "pm_score": 5, "selected": true, "text": "<form>\n <label for=\"param_1\">Param 1</label>\n <input id=\"param_1\" name=\"param_1\"><br />\n <label for=\"param_2\">Param ...
2008/12/04
[ "https://Stackoverflow.com/questions/339210", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4435/" ]
339,217
<p>I am writing a game in python and have decided to create a DSL for the map data files. I know I could write my own parser with regex, but I am wondering if there are existing python tools which can do this more easily, like re2c which is used in the PHP engine.</p> <p>Some extra info:</p> <ul> <li>Yes, I <em>do</e...
[ { "answer_id": 339300, "author": "Piotr Lesnicki", "author_id": 38796, "author_profile": "https://Stackoverflow.com/users/38796", "pm_score": 2, "selected": false, "text": "ParserElement" }, { "answer_id": 339329, "author": "S.Lott", "author_id": 10661, "author_profil...
2008/12/04
[ "https://Stackoverflow.com/questions/339217", "https://Stackoverflow.com", "https://Stackoverflow.com/users/28835/" ]
339,225
<p>Does anyone know of a short cut to place my name and the date where the cursor is i.e.</p> <pre><code> //021208 DarkAxi0m </code></pre> <p>so i don't keep check what the date is when i'm adding comments. </p> <p>Im using Delphi7, with CnPack And GExperts Installed. I think it should be able to be done with one of...
[ { "answer_id": 339236, "author": "Christopher Chase", "author_id": 11016, "author_profile": "https://Stackoverflow.com/users/11016", "pm_score": 1, "selected": false, "text": " //%Date% DarkAxi0m\n" }, { "answer_id": 343817, "author": "Marek Jedliński", "author_id": 9226...
2008/12/04
[ "https://Stackoverflow.com/questions/339225", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11016/" ]
339,228
<p>Excel macros do not seem to allow the use of "undo" after running them. Is there any way to bake <code>undo</code> functionality into a VBA macro in Excel?</p>
[ { "answer_id": 339239, "author": "paxdiablo", "author_id": 14860, "author_profile": "https://Stackoverflow.com/users/14860", "pm_score": 2, "selected": false, "text": "C22 value 3\nC22 format general\n" }, { "answer_id": 339263, "author": "e.James", "author_id": 33686, ...
2008/12/04
[ "https://Stackoverflow.com/questions/339228", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
339,230
<p>I'm trying to figure out what would be the simplest way to validate required fields without having to do an if statement for each element's name. Perhaps just with a loop and verify its class.</p> <p>What I'm trying to accomplish is to check only the ones that have the class name as "required"</p> <pre><code>&lt;i...
[ { "answer_id": 339251, "author": "tvanfosson", "author_id": 12950, "author_profile": "https://Stackoverflow.com/users/12950", "pm_score": 2, "selected": false, "text": " $(document).ready( function() {\n $('form').validate();\n });\n" }, { "answer_id": 339373, "author": "...
2008/12/04
[ "https://Stackoverflow.com/questions/339230", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
339,231
<p>If I have something like a loop or a set of if/else statements, and I want to return a value from within the nest (see below), is the best way of doing this to assign the value to a field or property and return that?</p> <p>See below:</p> <pre><code>bool b; public bool ifelse(int i) { if(i == 5) { b = true; } el...
[ { "answer_id": 339241, "author": "gcores", "author_id": 40256, "author_profile": "https://Stackoverflow.com/users/40256", "pm_score": 3, "selected": false, "text": "return i == 5;\n" }, { "answer_id": 339242, "author": "DaEagle", "author_id": 43024, "author_profile": ...
2008/12/04
[ "https://Stackoverflow.com/questions/339231", "https://Stackoverflow.com", "https://Stackoverflow.com/users/32484/" ]
339,245
<p>Sorry for the bad title, but I couldn't think of a better one.</p> <p>I'm having a class A and a class B which is kind of a sub class of A, like so:</p> <p>(Is there actually a correct name for it? Isn't "sub class" reserved for inheritance?)</p> <pre><code>class A { int i = 0; class B { int j = 1...
[ { "answer_id": 339267, "author": "Juliet", "author_id": 40516, "author_profile": "https://Stackoverflow.com/users/40516", "pm_score": 2, "selected": false, "text": "class A\n{\n public class B\n {\n public A Parent;\n public B(A parent)\n {\n this.Parent ...
2008/12/04
[ "https://Stackoverflow.com/questions/339245", "https://Stackoverflow.com", "https://Stackoverflow.com/users/36253/" ]
339,262
<p>Given a NxN matrix with 0s and 1s. Set every row that contains a <code>0</code> to all <code>0</code>s and set every column that contains a <code>0</code> to all <code>0</code>s.</p> <p>For example</p> <pre><code>1 0 1 1 0 0 1 1 1 0 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 </code></pre> <p>results in</p> <pre><code>0 0 0 0...
[ { "answer_id": 339294, "author": "Eclipse", "author_id": 8701, "author_profile": "https://Stackoverflow.com/users/8701", "pm_score": 2, "selected": false, "text": "bool matrix[5][5] = \n{ \n {1, 0, 1, 1, 0},\n {0, 1, 1, 1, 0},\n {1, 1, 1, 1, 1},\n {1, 0, 1, 1, 1},\n {1, 1,...
2008/12/04
[ "https://Stackoverflow.com/questions/339262", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20915/" ]
339,266
<p>I'm trying to make a calculator that will take inputs from users and estimate for them how much money they'll save if they use various different VoIP services.</p> <p>I've set it up like this:</p> <pre><code>&lt;form method="get" action="voip_calculator.php"&gt; How much is your monthly phone bill? &lt;inpu...
[ { "answer_id": 339298, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 1, "selected": true, "text": "$monthlyBill = $_GET['monthlybill'];\n" }, { "answer_id": 339316, "author": "Ólafur Waage", "author_id": 22459,...
2008/12/04
[ "https://Stackoverflow.com/questions/339266", "https://Stackoverflow.com", "https://Stackoverflow.com/users/43035/" ]
339,269
<p>Here is the current architecture of my transaction scope source code. The third insert throws an .NET exception (Not a SQL Exception) and it is not rolling back the two previous insert statements. What I am doing wrong?</p> <p><b>EDIT:</b> I removed the try/catch from insert2 and insert3. I also removed the exc...
[ { "answer_id": 339638, "author": "Marc Gravell", "author_id": 23354, "author_profile": "https://Stackoverflow.com/users/23354", "pm_score": 1, "selected": false, "text": "Transaction Binding=Explicit Unbind" }, { "answer_id": 10212867, "author": "Omer Cansizoglu", "author...
2008/12/04
[ "https://Stackoverflow.com/questions/339269", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26327/" ]
339,286
<p>I'm looking for an XML editor that lets me type and copy and paste arbitrary text into an XML element or attribute without requiring me to go back through and escape any characters that must use reserved XML entities (ampersands, angle brackets, or quote marks). XMLSpy came up short.</p>
[ { "answer_id": 339348, "author": "ykaganovich", "author_id": 10026, "author_profile": "https://Stackoverflow.com/users/10026", "pm_score": 2, "selected": false, "text": "a<b" } ]
2008/12/04
[ "https://Stackoverflow.com/questions/339286", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
339,296
<p>Greetings!</p> <p>I have some XML like this:</p> <pre><code>&lt;Root&gt; &lt;AlphaSection&gt; . . . &lt;/AlphaSection&gt; &lt;BetaSection&gt; &lt;Choices&gt; &lt;SetA&gt; &lt;Choice id="choice1"&gt; &lt;Title&gt;Choice 1 Title&lt;/Tit...
[ { "answer_id": 339338, "author": "aku", "author_id": 1196, "author_profile": "https://Stackoverflow.com/users/1196", "pm_score": 2, "selected": true, "text": "element => new {\n ID = element.Attribute(\"id\").Value,\n Title = element.Element(\"Title\").Value...
2008/12/04
[ "https://Stackoverflow.com/questions/339296", "https://Stackoverflow.com", "https://Stackoverflow.com/users/27870/" ]
339,312
<p>This question is more security related than programming related, sorry if it shouldn't be here.</p> <p>I'm currently developing a web application and I'm curious as to why most websites don't mind displaying their exact server configuration in HTTP headers, like versions of Apache and PHP, with complete "mod_perl, ...
[ { "answer_id": 339357, "author": "rmeador", "author_id": 10861, "author_profile": "https://Stackoverflow.com/users/10861", "pm_score": 2, "selected": false, "text": "nmap -O -sV" } ]
2008/12/04
[ "https://Stackoverflow.com/questions/339312", "https://Stackoverflow.com", "https://Stackoverflow.com/users/38072/" ]
339,314
<p>I am working on a ASP.net project created with local file system settings. I am using MVC and Jquery. Jquery is working fine when I run the application in debug mode i.e. in ASP.net Development server. I am trying to host the application in IIS 7. In hosted mode, it does not recognize Jquery and gives scripting erro...
[ { "answer_id": 339336, "author": "Jonathan Lonowski", "author_id": 15031, "author_profile": "https://Stackoverflow.com/users/15031", "pm_score": 2, "selected": false, "text": "Jquery" }, { "answer_id": 341725, "author": "Raja", "author_id": 43049, "author_profile": "h...
2008/12/04
[ "https://Stackoverflow.com/questions/339314", "https://Stackoverflow.com", "https://Stackoverflow.com/users/43049/" ]
339,344
<p>So, I've been looking at <a href="http://hadoop.apache.org/" rel="noreferrer">Hadoop</a> with keen interest, and to be honest I'm fascinated, things don't get much cooler.</p> <p>My only minor issue is I'm a C# developer and it's in Java.</p> <p>It's not that I don't understand the Java as much as I'm looking for ...
[ { "answer_id": 2148366, "author": "Turbo", "author_id": 100518, "author_profile": "https://Stackoverflow.com/users/100518", "pm_score": 3, "selected": false, "text": "IEnumerable<T>" } ]
2008/12/04
[ "https://Stackoverflow.com/questions/339344", "https://Stackoverflow.com", "https://Stackoverflow.com/users/30861/" ]
339,353
<p>How best can I convert instances of double backslashes to a single backslash in a string, but remove any occurrences of single backslash?</p> <p>So this:</p> <pre> \|Testing|ABC:1234\\1000-1\| </pre> <p>Should convert to this:</p> <pre> |Testing|ABC:1234\1000-1| </pre> <p>Ideally I want to avoid a temporary rep...
[ { "answer_id": 339369, "author": "Juliet", "author_id": 40516, "author_profile": "https://Stackoverflow.com/users/40516", "pm_score": 4, "selected": true, "text": "Regex.Replace(input, @\"\\\\(.|$)\", \"$1\");\n" }, { "answer_id": 339396, "author": "GONeale", "author_id":...
2008/12/04
[ "https://Stackoverflow.com/questions/339353", "https://Stackoverflow.com", "https://Stackoverflow.com/users/41211/" ]
339,356
<p>Is there a public, free web service that generates tag clouds? I'm looking for something like Google Chart--URL in, image out.</p>
[ { "answer_id": 62561391, "author": "ty.", "author_id": 219604, "author_profile": "https://Stackoverflow.com/users/219604", "pm_score": 1, "selected": false, "text": "https://quickchart.io/wordcloud?text=Four score and seven years ago our fathers brought forth on this continent, a new nat...
2008/12/04
[ "https://Stackoverflow.com/questions/339356", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13842/" ]
339,370
<p>This question is simple. What function would I use in a PHP script to load data from a URL into a string?</p>
[ { "answer_id": 339383, "author": "chews", "author_id": 33966, "author_profile": "https://Stackoverflow.com/users/33966", "pm_score": 3, "selected": false, "text": "$url_data = file_get_contents(\"http://example.com/examplefile.txt\");\n" }, { "answer_id": 340909, "author": "K...
2008/12/04
[ "https://Stackoverflow.com/questions/339370", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26659/" ]
339,371
<p>I have this method in my db class</p> <pre><code>public function query($queryString) { if (!$this-&gt;_connected) $this-&gt;_connectToDb(); //connect to database $results = mysql_query($queryString, $this-&gt;_dbLink) or trigger_error(mysql_error()); return mysql_num_rows($results) &gt; 0 ?...
[ { "answer_id": 339384, "author": "UnkwnTech", "author_id": 115, "author_profile": "https://Stackoverflow.com/users/115", "pm_score": 3, "selected": true, "text": "public function query($queryString)\n {\n\n if (!$this->_connected) $this->_connectToDb(); //connect to database\n\...
2008/12/04
[ "https://Stackoverflow.com/questions/339371", "https://Stackoverflow.com", "https://Stackoverflow.com/users/31671/" ]
339,387
<p>I'm trying to validate that a submitted URL doesn't already exist in the database.</p> <p>The relevant parts of the Form class look like this:</p> <pre><code>from django.contrib.sites.models import Site class SignUpForm(forms.Form): # ... Other fields ... url = forms.URLField(label='URL for new site, eg: e...
[ { "answer_id": 339463, "author": "S.Lott", "author_id": 10661, "author_profile": "https://Stackoverflow.com/users/10661", "pm_score": 1, "selected": false, "text": "try:\n a = Site.objects.get(domain=url)\n raise forms.ValidationError(\"That URL is already in the database. Please ...
2008/12/04
[ "https://Stackoverflow.com/questions/339387", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3912/" ]
339,397
<p>I'm coming from a C# background and I really like the type inference that C# 3.0 has. I'm trying to do similar things in VB.NET (some of which appear possible), but in some cases the compiler seems to be not nearly as good at inferring the type.</p> <p>For example, I have a method that returns an object of type S...
[ { "answer_id": 7259611, "author": "Jim Wooley", "author_id": 112139, "author_profile": "https://Stackoverflow.com/users/112139", "pm_score": 1, "selected": false, "text": "Public Shared foo = \"Test\"\n" } ]
2008/12/04
[ "https://Stackoverflow.com/questions/339397", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11807/" ]
339,409
<p>I have a problem where I want to read an object from the database using Hibernate, change a value, and save the object. If changing the value takes some time, what's the best way to ensure the underlying object in the database has not changed? I am doing this in one transaction (and one session). </p> <p>The code l...
[ { "answer_id": 339449, "author": "OscarRyz", "author_id": 20654, "author_profile": "https://Stackoverflow.com/users/20654", "pm_score": 0, "selected": false, "text": "session.lock( myObject , LockMode.UPGRADE );\n" } ]
2008/12/04
[ "https://Stackoverflow.com/questions/339409", "https://Stackoverflow.com", "https://Stackoverflow.com/users/43067/" ]
339,412
<p>What is the preferred way to use stored procedures between the following two methods and why:</p> <p>One general SP such as 'GetOrders' which returns all the columns for the table Order. Several different parts of the application will use the same SP.</p> <p>OR</p> <p>Several more specific SPs such as 'GetOrders...
[ { "answer_id": 339449, "author": "OscarRyz", "author_id": 20654, "author_profile": "https://Stackoverflow.com/users/20654", "pm_score": 0, "selected": false, "text": "session.lock( myObject , LockMode.UPGRADE );\n" } ]
2008/12/04
[ "https://Stackoverflow.com/questions/339412", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
339,424
<p>I'm a pretty experienced Grails developer, but most of my experience has been with using grails for serving up JSON/XML to a flex app and some relatively simple HTML websites.</p> <p>I've been diving deeper into using the sitemesh integration in grails and I'm struggling a little to find best practices for some mor...
[ { "answer_id": 343027, "author": "billjamesdev", "author_id": 13824, "author_profile": "https://Stackoverflow.com/users/13824", "pm_score": 5, "selected": true, "text": "<meta name=\"layout\" content=\"editTemplate\" />\n" }, { "answer_id": 921337, "author": "Community", ...
2008/12/04
[ "https://Stackoverflow.com/questions/339424", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8912/" ]
339,429
<p>Is there an SSH client that can present a client side GUI interface to the <a href="http://www.cyberciti.biz/tips/how-to-use-screen-command-under-linux.html" rel="nofollow noreferrer">screen</a>* program?</p> <p>I'm thinking of an SSH program that would hook in with screen's session handling and map client side act...
[ { "answer_id": 830173, "author": "dbr", "author_id": 745, "author_profile": "https://Stackoverflow.com/users/745", "pm_score": 2, "selected": false, "text": "~/.screenrc" } ]
2008/12/04
[ "https://Stackoverflow.com/questions/339429", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1343/" ]
339,455
<p>When I include an image as an &lt;img&gt; tag as well as a background image on a DOM element, the browser sometimes makes two requests for the same image. This also sometimes happens when using the hover pseudo-property. For example:</p> <pre><code>&lt;html&gt; &lt;head&gt; &lt;style&gt; div{ backgrou...
[ { "answer_id": 339458, "author": "Ryan Smith", "author_id": 10420, "author_profile": "https://Stackoverflow.com/users/10420", "pm_score": 0, "selected": false, "text": "<img alt=\"\" src=\"/img/stuff.png\" style=\"display: none;\"/>\n" } ]
2008/12/04
[ "https://Stackoverflow.com/questions/339455", "https://Stackoverflow.com", "https://Stackoverflow.com/users/208/" ]
339,469
<p>I'm using MS Access to create a database with over 5000 contacts. These contacts are separated up into which employee the contact belongs to, and then again into categories for easy searching. What I want to do is create a button that will open up a query in table form (simple), then have check boxes so an employee ...
[ { "answer_id": 340009, "author": "rics", "author_id": 21047, "author_profile": "https://Stackoverflow.com/users/21047", "pm_score": 1, "selected": false, "text": "Private Sub Mail_Click()\n\n Dim r As Recordset\n Dim email As String\n Set r = CurrentDb.OpenRecordset(\"select * f...
2008/12/04
[ "https://Stackoverflow.com/questions/339469", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
339,476
<p>How do I raise an event from a user control that was created dynamically?</p> <p>Here's the code that I'm trying where Bind is a public EventHandler</p> <pre><code>protected indDemographics IndDemographics; protected UserControl uc; override protected void OnInit(EventArgs e) { uc = (UserControl)LoadControl("i...
[ { "answer_id": 339522, "author": "Stephen Wrighton", "author_id": 7516, "author_profile": "https://Stackoverflow.com/users/7516", "pm_score": 3, "selected": true, "text": "public class MyUserControl\n Inherits UserControl\n\n Public Event Bind(sender as object, e as EventArgs)\n\n pub...
2008/12/04
[ "https://Stackoverflow.com/questions/339476", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4888/" ]
339,483
<p>I need to repeatedly remove the first line from a huge text file using a bash script.</p> <p>Right now I am using <code>sed -i -e "1d" $FILE</code> - but it takes around a minute to do the deletion.</p> <p>Is there a more efficient way to accomplish this?</p>
[ { "answer_id": 339543, "author": "Brent ", "author_id": 3764, "author_profile": "https://Stackoverflow.com/users/3764", "pm_score": 1, "selected": false, "text": "While file1 not empty\n file2 = head -n1000 file1\n process file2\n sed -i -e \"1000d\" file1\nend\n" }, { "answer...
2008/12/04
[ "https://Stackoverflow.com/questions/339483", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3764/" ]
339,496
<p>I've been trying to deal with some delimited text files that have non standard delimiters (not comma/quote or tab delimited). The delimiters are random ASCII characters that don't show up often between the delimiters. After searching around, I've seem to have only found no solutions in .NET will suit my needs and ...
[ { "answer_id": 339505, "author": "TheSoftwareJedi", "author_id": 18941, "author_profile": "https://Stackoverflow.com/users/18941", "pm_score": 4, "selected": true, "text": "public IEnumerable<string[]> CreateEnumerable(StreamReader input)\n{\n string line;\n while ((line = input.Re...
2008/12/04
[ "https://Stackoverflow.com/questions/339496", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1469014/" ]
339,508
<p>reference, OpenCv\samples\c\lkdemo.c </p> <p>Anybody know what does the following snippet of codes does ?</p> <p>Code extracted from lkdemo.c</p> <pre><code> for( i = k = 0; i &lt; count; i++ ) { if( add_remove_pt ) { double dx = pt.x - points[1][i]....
[ { "answer_id": 339573, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 2, "selected": false, "text": "if( status[i] ) {\n points[1][k++] = points[1][i]; // <---- Q1\n cvCircle( image, cvPointFrom32f(points[1][i]), 3, CV_R...
2008/12/04
[ "https://Stackoverflow.com/questions/339508", "https://Stackoverflow.com", "https://Stackoverflow.com/users/43076/" ]
339,510
<p>I have a html div layered on top of an interactive flash movie, but when the mouse moves over the div, it can't interact with the flash (the view changes as the mouse moves or is clicked). Is there a way to have the flash recieve the mouse movements and clicks but leaving the html visible?</p> <p>I can't modify the...
[ { "answer_id": 339547, "author": "Dan Herbert", "author_id": 392, "author_profile": "https://Stackoverflow.com/users/392", "pm_score": 2, "selected": false, "text": "<object> \n <param name=\"wmode\" value=\"transparent\" /> \n <embed src=\"example.swf\" wmode=\"transparent\"></emb...
2008/12/04
[ "https://Stackoverflow.com/questions/339510", "https://Stackoverflow.com", "https://Stackoverflow.com/users/43077/" ]
339,515
<p>I'm a developer who builds mainly single page client side web applications where state in maintained on the client-side. Lately some of the applications have become very complex with very rich domain models on the client-side and increasingly complicated UI interactions.</p> <p>As we've gone along we've implemented...
[ { "answer_id": 339547, "author": "Dan Herbert", "author_id": 392, "author_profile": "https://Stackoverflow.com/users/392", "pm_score": 2, "selected": false, "text": "<object> \n <param name=\"wmode\" value=\"transparent\" /> \n <embed src=\"example.swf\" wmode=\"transparent\"></emb...
2008/12/04
[ "https://Stackoverflow.com/questions/339515", "https://Stackoverflow.com", "https://Stackoverflow.com/users/37196/" ]
339,531
<p>I'm hearing that some people believe storing info on the server in a session is a bad idea, that its not secure.<br><br> As a result, in a multi-page business process function, the application is writing data to a db, then retrieving the info when its needed. Is there something necessarily unsafe about storing priva...
[ { "answer_id": 340722, "author": "Tom Hawtin - tackline", "author_id": 4725, "author_profile": "https://Stackoverflow.com/users/4725", "pm_score": 1, "selected": false, "text": "aerlingus.ie" } ]
2008/12/04
[ "https://Stackoverflow.com/questions/339531", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13143/" ]
339,537
<p>When reading lines from a text file using python, the end-line character often needs to be truncated before processing the text, as in the following example:</p> <pre><code>f = open("myFile.txt", "r") for line in f: line = line[:-1] # do something with line </code></pre> <p>Is there an elegant way or idiom...
[ { "answer_id": 339574, "author": "Adam Rosenfield", "author_id": 9530, "author_profile": "https://Stackoverflow.com/users/9530", "pm_score": 3, "selected": false, "text": "'\\n'" }, { "answer_id": 339579, "author": "Vijay Dev", "author_id": 27474, "author_profile": "h...
2008/12/04
[ "https://Stackoverflow.com/questions/339537", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6225/" ]
339,559
<p>I'm following <a href="http://www.stanford.edu/class/cs193p/cgi-bin/index.php" rel="nofollow noreferrer">iPhone dev courses</a> from Stanford Open-University, and I've been blocked for 2 days on <a href="http://cs193p.stanford.edu/downloads/Assignment3.pdf" rel="nofollow noreferrer">assignment3</a>, maybe someone ca...
[ { "answer_id": 339590, "author": "Alex", "author_id": 16974, "author_profile": "https://Stackoverflow.com/users/16974", "pm_score": 1, "selected": false, "text": "#import \"PolygonShape.h\"\n\n@interface CustomView : UIView {\n IBOutlet PolygonShape *polygon;\n}\n\n@property (readwrit...
2008/12/04
[ "https://Stackoverflow.com/questions/339559", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16974/" ]
339,560
<p>I'm working on some upgrades to an internal web analytics system we provide for our clients (in the absence of a preferred vendor or Google Analytics), and I'm working on the following query:</p> <pre><code>select path as EntryPage, count(Path) as [Count] from ( /* Sub-query 1 */ sel...
[ { "answer_id": 339572, "author": "dkretz", "author_id": 31641, "author_profile": "https://Stackoverflow.com/users/31641", "pm_score": 3, "selected": true, "text": " where pv1.Domain = isnull(@Domain, pv1.Domain) \n" }, { "answer_id": 339589, "author": "Sam Saffron", "a...
2008/12/04
[ "https://Stackoverflow.com/questions/339560", "https://Stackoverflow.com", "https://Stackoverflow.com/users/34942/" ]
339,580
<p>I'm looking to log unhandled javascript exceptions. Is there an event that fires when an exception isn't caught? I'm looking to catch the exceptions before they cause javascript errors in the browser, but I'd rather not run my entire application inside of a try/catch. Any help would be appreciated. Thanks!</p> <p>U...
[ { "answer_id": 13435462, "author": "Dave Dopson", "author_id": 407731, "author_profile": "https://Stackoverflow.com/users/407731", "pm_score": 5, "selected": false, "text": "window.onerror = function (msg, url, line) {\n console.log(\"Caught[via window.onerror]: '\" + msg + \"' from \...
2008/12/04
[ "https://Stackoverflow.com/questions/339580", "https://Stackoverflow.com", "https://Stackoverflow.com/users/41122/" ]
339,582
<p>I'm trying to write a (sh -bourne shell) script that processes lines as they are written to a file. I'm attempting to do this by feeding the output of <code>tail -f</code> into a <code>while read</code> loop. This tactic seems to be proper based on my research in Google as well as <a href="https://stackoverflow.com/...
[ { "answer_id": 339604, "author": "Robert Gamble", "author_id": 25222, "author_profile": "https://Stackoverflow.com/users/25222", "pm_score": 0, "selected": false, "text": "tail" }, { "answer_id": 339695, "author": "flolo", "author_id": 36472, "author_profile": "https:...
2008/12/04
[ "https://Stackoverflow.com/questions/339582", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1588/" ]
339,583
<p>So it's trivial to create a Settings style table on the iPhone. The problem is, they add a great deal of code as your Settings have a gamut of options/styled cells. One section might have a check list, another might have cells with accessory disclosures to drill down further, another might be labels with UITextField...
[ { "answer_id": 341183, "author": "jpm", "author_id": 35478, "author_profile": "https://Stackoverflow.com/users/35478", "pm_score": 1, "selected": false, "text": "UITableViewCell" } ]
2008/12/04
[ "https://Stackoverflow.com/questions/339583", "https://Stackoverflow.com", "https://Stackoverflow.com/users/40882/" ]
339,616
<p>With Php when does an included file get included? Is it during a preprocessing stage or is it during script evaluation?</p> <p>Right now I have several scripts that share the same header and footer code, which do input validation and exception handling. Like this:</p> <pre><code>/* validate input */ ... /* process...
[ { "answer_id": 339629, "author": "Tuminoid", "author_id": 40657, "author_profile": "https://Stackoverflow.com/users/40657", "pm_score": 4, "selected": true, "text": "vars.php\n<?php\n\n$color = 'green';\n$fruit = 'apple';\n\n?>\n\ntest.php\n<?php\n\necho \"A $color $fruit\"; // A\n\nincl...
2008/12/04
[ "https://Stackoverflow.com/questions/339616", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15124/" ]
339,620
<p>WPF doesn't provide the ability to have a window that allows resize but doesn't have maximize or minimize buttons. I'd like to able to make such a window so I can have resizable dialog boxes.</p> <p>I'm aware the solution will mean using pinvoke but I'm not sure what to call and how. A search of pinvoke.net didn't ...
[ { "answer_id": 339635, "author": "Matt Hamilton", "author_id": 615, "author_profile": "https://Stackoverflow.com/users/615", "pm_score": 8, "selected": true, "text": "internal static class WindowExtensions\n{\n // from winuser.h\n private const int GWL_STYLE = -16,\n ...
2008/12/04
[ "https://Stackoverflow.com/questions/339620", "https://Stackoverflow.com", "https://Stackoverflow.com/users/483/" ]
339,625
<p>I was told that decimal is implemented as user defined type and other c# types like int have specific opcodes devoted to them. What's the reasoning behind this?</p>
[ { "answer_id": 339650, "author": "Marc Gravell", "author_id": 23354, "author_profile": "https://Stackoverflow.com/users/23354", "pm_score": 5, "selected": true, "text": "decimal" } ]
2008/12/04
[ "https://Stackoverflow.com/questions/339625", "https://Stackoverflow.com", "https://Stackoverflow.com/users/38807/" ]
339,654
<p>When the view property of a UIViewController is accessed, it first checks to see if it's got an existing view, and returns that. If not, it loads its nib or calls -loadView. </p> <p>When a controller receives a -didReceiveMemoryWarning message, the default behavior is to remove that cached view (assuming it's not i...
[ { "answer_id": 340224, "author": "Mike Abdullah", "author_id": 28768, "author_profile": "https://Stackoverflow.com/users/28768", "pm_score": 3, "selected": true, "text": "- (void)setView:(UIView *)view\n{\n if (!view)\n {\n // Clean up code here\n }\n\n [super setView...
2008/12/04
[ "https://Stackoverflow.com/questions/339654", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6694/" ]
339,663
<p>I'm having a problem getting access to a database which lives on a remote server. </p> <p>I have a ASP.NET 2.0 webpage that is trying to connect to a database.<br> The database is accessed via a virtual folder (which I set up in IIS).<br> The virtual folder points at a remote share which contains the database. <...
[ { "answer_id": 339716, "author": "Dhaust", "author_id": 242, "author_profile": "https://Stackoverflow.com/users/242", "pm_score": 0, "selected": false, "text": "<add key=\"conStrVirtual\" value=\"Provider=Microsoft.Jet.OleDb.4.0;Data Source=\\\\databaseServerName\\databaseFolder$\\databa...
2008/12/04
[ "https://Stackoverflow.com/questions/339663", "https://Stackoverflow.com", "https://Stackoverflow.com/users/242/" ]
339,699
<p>I read about Java's type erasure <a href="https://docs.oracle.com/javase/tutorial/java/generics/erasure.html" rel="noreferrer">on Oracle's website</a>.</p> <p><strong>When does type erasure occur?</strong> At compile time or runtime? When the class is loaded? When the class is instantiated?</p> <p>A lot of sites (...
[ { "answer_id": 339702, "author": "Eugene Yokota", "author_id": 3827, "author_profile": "https://Stackoverflow.com/users/3827", "pm_score": 4, "selected": false, "text": "loophole()" }, { "answer_id": 339708, "author": "Jon Skeet", "author_id": 22656, "author_profile":...
2008/12/04
[ "https://Stackoverflow.com/questions/339699", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
339,706
<p>DocumentsController#common_query can handle multiple different request styles.</p> <p>i.e. all docs in batch 4 or all docs tagged "happy"</p> <p>I want a single route to make em pretty, so:</p> <p>/documents/common_query?batch=4</p> <p>/documents/common_query?tag=happy</p> <p>become:</p> <p>/documents/batch/4<...
[ { "answer_id": 339869, "author": "Daniel Lucraft", "author_id": 11951, "author_profile": "https://Stackoverflow.com/users/11951", "pm_score": 1, "selected": true, "text": "ActionController::Routing::Routes.draw do |map|\n map.connect \"documents/:type/:id\", :controller => \"documents_c...
2008/12/04
[ "https://Stackoverflow.com/questions/339706", "https://Stackoverflow.com", "https://Stackoverflow.com/users/37378/" ]
339,709
<p>I need to create an object which exposes an <code>IDictionary&lt;K,V&gt;</code> interface, but I don't want to fill in the entire interface implemntation.</p> <p>It would be nice to have the equivalent of Java's AbstractDictionary, which leaves you very little to impelment a complete dictionary (HashMap, in Java):<...
[ { "answer_id": 339770, "author": "Sergiu Damian", "author_id": 41345, "author_profile": "https://Stackoverflow.com/users/41345", "pm_score": 2, "selected": false, "text": "System.Collections.Generic" }, { "answer_id": 339824, "author": "Jonathan Allen", "author_id": 5274,...
2008/12/04
[ "https://Stackoverflow.com/questions/339709", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19871/" ]
339,710
<p>In my LOB apps I usually wind up with containers that contain a bunch of different textblocks and textboxes for users to enter data. Normally I need to apply a certain margin or vertical/horizontal alignment to each control.</p> <p>Let's say I have Grid on my form that looks like this (a lot of markup was eliminate...
[ { "answer_id": 341236, "author": "David Schmitt", "author_id": 4918, "author_profile": "https://Stackoverflow.com/users/4918", "pm_score": 3, "selected": false, "text": "Resources" } ]
2008/12/04
[ "https://Stackoverflow.com/questions/339710", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17744/" ]
339,714
<p>So I am trying to accomplish something like this:</p> <pre><code>SELECT * FROM table WHERE status_id IN (1,3,4); </code></pre> <p>using Zend_Db_Select... can't find how to do it :( Is it at all possible?</p>
[ { "answer_id": 339718, "author": "xelurg", "author_id": 35520, "author_profile": "https://Stackoverflow.com/users/35520", "pm_score": 3, "selected": false, "text": "$select->where('status_id IN(1,3,4)');\n" }, { "answer_id": 362610, "author": "Martin Rázus", "author_id": ...
2008/12/04
[ "https://Stackoverflow.com/questions/339714", "https://Stackoverflow.com", "https://Stackoverflow.com/users/35520/" ]
339,719
<p>From the haskell report:</p> <blockquote> <p>The quot, rem, div, and mod class methods satisfy these laws if y is non-zero:</p> <pre><code>(x `quot` y)*y + (x `rem` y) == x (x `div` y)*y + (x `mod` y) == x </code></pre> <p><code>quot</code> is integer division truncated toward zero, while the result ...
[ { "answer_id": 339760, "author": "namin", "author_id": 34596, "author_profile": "https://Stackoverflow.com/users/34596", "pm_score": 3, "selected": false, "text": "let buggyOdd x = x `rem` 2 == 1\nbuggyOdd 1 // True\nbuggyOdd (-1) // False (wrong!)\n\nlet odd x = x `mod` 2 == 1\nodd 1 //...
2008/12/04
[ "https://Stackoverflow.com/questions/339719", "https://Stackoverflow.com", "https://Stackoverflow.com/users/486/" ]
339,722
<p>how to get GIF Transparency color in vc++ 6.0 and vc++ 2005 ?</p>
[ { "answer_id": 22986670, "author": "dexterous", "author_id": 2735434, "author_profile": "https://Stackoverflow.com/users/2735434", "pm_score": 0, "selected": false, "text": "void Display(FrameData *FrameInfo)\n{\n\n /*short int ImageStartX = 0;\n short int ImageStartY = 0; */\n ...
2008/12/04
[ "https://Stackoverflow.com/questions/339722", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
339,727
<p>We've got a situation where someone messed up a Commit to our SVN server. A lot of files were deleted, etc. </p> <p><strong>Question:</strong> What is the technique for making the previous (to the bad Commit) revision the HEAD revision? I've seen discussion here on SO for doing this for 1 file, but we'd like to mak...
[ { "answer_id": 339733, "author": "Greg Hewgill", "author_id": 893, "author_profile": "https://Stackoverflow.com/users/893", "pm_score": 1, "selected": false, "text": "svnadmin dump" }, { "answer_id": 339742, "author": "VonC", "author_id": 6309, "author_profile": "http...
2008/12/04
[ "https://Stackoverflow.com/questions/339727", "https://Stackoverflow.com", "https://Stackoverflow.com/users/689/" ]
339,745
<p>I am currently in the process of rewriting an application whereby teachers can plan curriculum online.</p> <p>The application guides teachers through a process of creating a unit of work for their students. The tool is currently used in three states but we have plans to get much bigger than that.</p> <p>One of the...
[ { "answer_id": 1675311, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 0, "selected": false, "text": "A\n B\n C\n D\n E\n" } ]
2008/12/04
[ "https://Stackoverflow.com/questions/339745", "https://Stackoverflow.com", "https://Stackoverflow.com/users/43116/" ]
339,763
<p>I want to do preliminary check if entered string looks like <a href="http://en.wikipedia.org/wiki/Vehicle_identification_number" rel="noreferrer">Vehicle Identification Number (VIN)</a>. I know what it consists of 17 letters and digits, but letters I, O and Q are not allowed inside VIN, so I use this regular express...
[ { "answer_id": 339775, "author": "VonC", "author_id": 6309, "author_profile": "https://Stackoverflow.com/users/6309", "pm_score": 3, "selected": false, "text": "^[0-9A-HJ-NPR-Z]{17}$\n" } ]
2008/12/04
[ "https://Stackoverflow.com/questions/339763", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11256/" ]
339,776
<p>I want to monitor the modifications in a specified directory, and retrieve the exact change information. So I've decided to use the <a href="http://msdn.microsoft.com/en-us/library/aa365465(VS.85).aspx" rel="nofollow noreferrer">ReadDirectoryChangesW()</a> function. But I want to use it asynchronously, which means I...
[ { "answer_id": 339989, "author": "Len Holgate", "author_id": 7925, "author_profile": "https://Stackoverflow.com/users/7925", "pm_score": 2, "selected": false, "text": "ReadDirectoryChangesW()" } ]
2008/12/04
[ "https://Stackoverflow.com/questions/339776", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26404/" ]
339,792
<p>I'm trying to get a class memeber variable list at run time. I know this probably using typeof and reflections. but can't find an example. Please someone shed light for me.</p> <p>Here is pseudo code example:</p> <pre><code>Class Test01 { public string str01; public string str02; public int myint01; } </code><...
[ { "answer_id": 339798, "author": "Jon Skeet", "author_id": 22656, "author_profile": "https://Stackoverflow.com/users/22656", "pm_score": 4, "selected": true, "text": "tt.GetType().GetFields()" }, { "answer_id": 339801, "author": "leppie", "author_id": 15541, "author_p...
2008/12/04
[ "https://Stackoverflow.com/questions/339792", "https://Stackoverflow.com", "https://Stackoverflow.com/users/36674/" ]
339,803
<p>Has anyone seen this before - and can anything be done about it? This link is to a PNG screen shot of a list display in IE - if you look closely, the line height of each element is getting a little bigger for each successive item. The web site look is entirely controlled by CSS.</p> <p><strike>Screen Shot</strike...
[ { "answer_id": 339813, "author": "leppie", "author_id": 15541, "author_profile": "https://Stackoverflow.com/users/15541", "pm_score": 3, "selected": true, "text": "overflow:hidden" }, { "answer_id": 339870, "author": "Stein G. Strindhaug", "author_id": 26115, "author_...
2008/12/04
[ "https://Stackoverflow.com/questions/339803", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8946/" ]
339,829
<p>Is there a built in Javascript function to turn the text string of a month into the numerical equivalent? </p> <p>Ex. I have the name of the month "December" and I want a function to return "12".</p>
[ { "answer_id": 339854, "author": "Dylan Beattie", "author_id": 5017, "author_profile": "https://Stackoverflow.com/users/5017", "pm_score": 1, "selected": false, "text": "function getMonthNumber(monthName) { \n\n // Turn the month name into a parseable date string.\n var dateString ...
2008/12/04
[ "https://Stackoverflow.com/questions/339829", "https://Stackoverflow.com", "https://Stackoverflow.com/users/29297/" ]
339,833
<p>Let say I have a project that I have released under GPL, with the sources available to anyone. Later I find a very similar product, but as closed source, distributed binary-only by someone else.</p> <p>Is there a good way to find out they are using my source code in their product?</p> <p>If the solution is to some...
[ { "answer_id": 339858, "author": "unwind", "author_id": 28169, "author_profile": "https://Stackoverflow.com/users/28169", "pm_score": 2, "selected": false, "text": "stripped" }, { "answer_id": 342545, "author": "yogman", "author_id": 24349, "author_profile": "https://...
2008/12/04
[ "https://Stackoverflow.com/questions/339833", "https://Stackoverflow.com", "https://Stackoverflow.com/users/40657/" ]
339,856
<p>I need to use a datetime.strptime on the text which looks like follows.</p> <p>"Some Random text of undetermined length Jan 28, 1986"</p> <p>how do i do this?</p>
[ { "answer_id": 339884, "author": "gimel", "author_id": 6491, "author_profile": "https://Stackoverflow.com/users/6491", "pm_score": 3, "selected": true, "text": "time" }, { "answer_id": 339886, "author": "Brian", "author_id": 9493, "author_profile": "https://Stackoverf...
2008/12/04
[ "https://Stackoverflow.com/questions/339856", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2220518/" ]
339,861
<p>We need to send email which contains Pound (currency) symbols in ColdFusion. Before sending email, we are dumping the data into a html file for preview. </p> <ol> <li>How to send a email with utf-8 encoding in ColdFusion</li> <li>How to save a file with utf-8 encoding in ColdFusion</li> </ol>
[ { "answer_id": 339865, "author": "Alterlife", "author_id": 36848, "author_profile": "https://Stackoverflow.com/users/36848", "pm_score": 0, "selected": false, "text": "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />" }, { "answer_id": 339878, "author...
2008/12/04
[ "https://Stackoverflow.com/questions/339861", "https://Stackoverflow.com", "https://Stackoverflow.com/users/43056/" ]
339,880
<p>There are many drawbacks to using <code>void *</code> in C (memory related, type related, efficiency wise ...). In spite of them we use them a lot for the flexibility they provide.</p> <p>List the disadvantages/drawbacks using <code>void *</code> (and preferred solution in C - if possible).</p> <p><strong>EDIT:</s...
[ { "answer_id": 339896, "author": "unwind", "author_id": 28169, "author_profile": "https://Stackoverflow.com/users/28169", "pm_score": 2, "selected": false, "text": "void*" }, { "answer_id": 339898, "author": "qrdl", "author_id": 28494, "author_profile": "https://Stack...
2008/12/04
[ "https://Stackoverflow.com/questions/339880", "https://Stackoverflow.com", "https://Stackoverflow.com/users/34590/" ]
339,887
<p>I'm developing my application (on Linux) and sadly it sometimes hangs. I can use <code>Ctrl+C</code> to send sigint, but my program is ignoring sigint because it's too far gone. So I have to do the process-killing-dance:</p> <pre><code>Ctrl+Z $ ps aux | grep process_name $ kill -9 pid </code></pre> <p>Is there a w...
[ { "answer_id": 339905, "author": "Vinko Vrsalovic", "author_id": 5190, "author_profile": "https://Stackoverflow.com/users/5190", "pm_score": 2, "selected": false, "text": "Ctrl+Z\n$ ps aux | grep process_name\n$ kill -9 pid\n" }, { "answer_id": 339915, "author": "camh", "...
2008/12/04
[ "https://Stackoverflow.com/questions/339887", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11951/" ]
339,902
<p>Suppose you are implementing a publication database and creating migrations to represent different publications. Each publication has a "year" associated with it.</p> <p><code>t.column :year, ???</code></p> <p>Would this year be best represented as an integer, date, or datetime?</p>
[ { "answer_id": 340005, "author": "Gordon Wilson", "author_id": 23071, "author_profile": "https://Stackoverflow.com/users/23071", "pm_score": 3, "selected": false, "text": "Date" }, { "answer_id": 341141, "author": "Josh Delsman", "author_id": 40644, "author_profile": ...
2008/12/04
[ "https://Stackoverflow.com/questions/339902", "https://Stackoverflow.com", "https://Stackoverflow.com/users/39584/" ]