qid
int64
4
19.1M
question
stringlengths
18
48.3k
answers
list
date
stringlengths
10
10
metadata
list
263,639
<p>I've inherited a ASP/VB6 code base (not my forte... yet) and I'm trying tease it apart to figure out the cause on an error message I'm receiving when running the app.</p> <p>I've traced it back through an event that is being raised in on of my classes. Is there away in windows I can search the bulk of the code base...
[ { "answer_id": 263649, "author": "Konrad Rudolph", "author_id": 1968, "author_profile": "https://Stackoverflow.com/users/1968", "pm_score": 3, "selected": false, "text": "find grep" } ]
2008/11/04
[ "https://Stackoverflow.com/questions/263639", "https://Stackoverflow.com", "https://Stackoverflow.com/users/685/" ]
263,640
<p>I've been having performance issues with a high traffic ASP.NET 2.0 site running on Windows 2000. While editing the web.config file I noticed that the authentication mode was set to 'Windows'. I changed it to 'None'. The only users this site has are anonymous and it gets 25,000+ page views at day. Could this hav...
[ { "answer_id": 263649, "author": "Konrad Rudolph", "author_id": 1968, "author_profile": "https://Stackoverflow.com/users/1968", "pm_score": 3, "selected": false, "text": "find grep" } ]
2008/11/04
[ "https://Stackoverflow.com/questions/263640", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12252/" ]
263,676
<p>In a product I work on, there is an iteration loop which can have anywhere between a few hundred to a few million iterations. Each iteration computes a set of statistic variables (double precision), and the number of variables can be up to 1000 (typically 15-50).</p> <p>As part of the loop, we graph the change in ...
[ { "answer_id": 618973, "author": "spoulson", "author_id": 3347, "author_profile": "https://Stackoverflow.com/users/3347", "pm_score": 2, "selected": false, "text": "AVG() MAX() MIN() select time_collected, AVG(value)\nfrom Table\ngroup by UNIX_TIMESTAMP(time_collected)\n" } ]
2008/11/04
[ "https://Stackoverflow.com/questions/263676", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
263,695
<p>On my Mac OS X 10.5 (Leopard) machine, I have installed Git 1.6.0.2 using the <a href="http://code.google.com/p/git-osx-installer/" rel="nofollow noreferrer">git-OSX-Installer</a> from Google Code. The installer installs Git to /usr/local/Git.</p> <p>I would now like to keep up with the latest stable Git release (M...
[ { "answer_id": 263732, "author": "dbr", "author_id": 745, "author_profile": "https://Stackoverflow.com/users/745", "pm_score": 4, "selected": true, "text": "HEAD git checkout /usr/local/git-v1.6.0.2-287-g3791f77/ launchctrl load ~/Library/LaunchAgents/mylaunchagent.plist" }, { "a...
2008/11/04
[ "https://Stackoverflow.com/questions/263695", "https://Stackoverflow.com", "https://Stackoverflow.com/users/32558/" ]
263,697
<p>I have a multidimensional array. I need to search it for a specific range of values, edit those values and return the edited data.</p> <p>Example array:</p> <pre><code>array(3) { ["first"]=&gt; array(1) { [0]=&gt; string(4) "baz1" } ["second"]=&gt; array(1) { [0]=&gt; string(4) "foo1" }...
[ { "answer_id": 263713, "author": "bobwienholt", "author_id": 24257, "author_profile": "https://Stackoverflow.com/users/24257", "pm_score": 3, "selected": false, "text": "function addDashBar($arr)\n{\n foreach ($arr as $key => $value)\n {\n if (is_array($value))\n $a...
2008/11/04
[ "https://Stackoverflow.com/questions/263697", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11252/" ]
263,735
<p>Problem: How can I tell if a selection of text in the CRichEditCtrl has multiple font sizes in it?</p> <hr> <p>Goal: I am sort of making my own RichEdit toolbar (bold, italic, font type, font size, etc). I want to emulate what MS Word does when a selection of text has more than a single font size spanning the sel...
[ { "answer_id": 265414, "author": "DavidK", "author_id": 31394, "author_profile": "https://Stackoverflow.com/users/31394", "pm_score": 2, "selected": true, "text": "CComPtr<IRichEditOle> richOle;\nrichOle.Attach(edit.GetIRichEditOle());\nCComQIPtr<ITextDocument> textDoc(richOle);\n CComPt...
2008/11/04
[ "https://Stackoverflow.com/questions/263735", "https://Stackoverflow.com", "https://Stackoverflow.com/users/34460/" ]
263,741
<p>I built a <strong>[widget][1]</strong> that grabs the URL from the frontmost window in Safari, then allows you to shorten it using the tr.im API. Works sweet as.</p> <p>I want to make this more flexible, so am investigating how to grab an URL from other browsers. Here's the AppleScript that works in Safari:</p> <p...
[ { "answer_id": 268195, "author": "Andrew Hedges", "author_id": 11577, "author_profile": "https://Stackoverflow.com/users/11577", "pm_score": 0, "selected": false, "text": "tell application \"Opera\"\n return URL of front document as string\nend tell\n" }, { "answer_id": 268197...
2008/11/04
[ "https://Stackoverflow.com/questions/263741", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11577/" ]
263,743
<p>How do you get the caret position in a <code>&lt;textarea&gt;</code> using JavaScript?</p> <p>For example: <code>This is| a text</code></p> <p>This should return <code>7</code>.</p> <p>How would you get it to return the strings surrounding the cursor / selection?</p> <p>E.g.: <code>'This is', '', ' a text'</code...
[ { "answer_id": 263796, "author": "Christian C. Salvadó", "author_id": 5445, "author_profile": "https://Stackoverflow.com/users/5445", "pm_score": 8, "selected": true, "text": "function getCaret(node) {\n if (node.selectionStart) {\n return node.selectionStart;\n } else if (!document...
2008/11/04
[ "https://Stackoverflow.com/questions/263743", "https://Stackoverflow.com", "https://Stackoverflow.com/users/32941/" ]
263,748
<p>I normally store all my configs in the registry. Even though I have started using LINQ I would not like to have the DSN in the web.config, but rather let it stay in the registry and attach it (maybe in the Application Start Event) to the System Config.</p> <p>How can this be done?</p> <p>Thanx for any ideas!</p> ...
[ { "answer_id": 264255, "author": "tvanfosson", "author_id": 12950, "author_profile": "https://Stackoverflow.com/users/12950", "pm_score": 1, "selected": false, "text": "Application_Start aspreg_iis Configuration config = WebConfigurationManager.OpenWebConfiguration(\n ...
2008/11/04
[ "https://Stackoverflow.com/questions/263748", "https://Stackoverflow.com", "https://Stackoverflow.com/users/34464/" ]
263,770
<p>I am looking for the best way to customize my Rails log entries (I want to add the user ID in there). I am using Rails 2.1.2. The only way I've found so far is to override method "add" of class BufferedLogger (as defined in active_support/lib/active_support). </p> <p>But it ain't pretty: I have to copy all the code...
[ { "answer_id": 4068231, "author": "Jochen", "author_id": 476686, "author_profile": "https://Stackoverflow.com/users/476686", "pm_score": 1, "selected": false, "text": "after_filter :logging\n def logging\n if logger && logged_in?\n logger.info \"UserID: #{current_user.id.to_s}\"\n en...
2008/11/04
[ "https://Stackoverflow.com/questions/263770", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11814/" ]
263,773
<p>I have a python script that I would like to add a "Shutdown when done" feature to.</p> <p>I know I can use gksudo (when the user clicks on "shutdown when done") to ask the user for root privileges but how can I use those privileges at a later time (when the script is actually finished).</p> <p>I have thought about...
[ { "answer_id": 263851, "author": "dmckee --- ex-moderator kitten", "author_id": 2509, "author_profile": "https://Stackoverflow.com/users/2509", "pm_score": 1, "selected": false, "text": "fork (2) wait (2)" }, { "answer_id": 263859, "author": "dbr", "author_id": 745, "...
2008/11/04
[ "https://Stackoverflow.com/questions/263773", "https://Stackoverflow.com", "https://Stackoverflow.com/users/32933/" ]
263,782
<p>Currently I have subversion set up so that when I make changes in Eclipse PDT, I can commit the changes and they will be saved in /home/administrator/<em>Project File</em>. This file has the /branches /tags and /trunk directories recommended by subversion. I have no problem properly uploading files to the reposito...
[ { "answer_id": 263791, "author": "nickf", "author_id": 9021, "author_profile": "https://Stackoverflow.com/users/9021", "pm_score": 4, "selected": true, "text": "svn export cd /var/www\nsvn export /home/administrator/MyProject/trunk MyProject\n svn export --force /home/...../ MyProject sv...
2008/11/04
[ "https://Stackoverflow.com/questions/263782", "https://Stackoverflow.com", "https://Stackoverflow.com/users/27673/" ]
263,801
<p>I have 15 stored procedures that return data from a common table and then join that table with a specific table to retrieve inventory.</p> <p>Example:</p> <pre><code>Common: tblCommon Specific: tblSpecific </code></pre> <p>Is there way I can pass the name "tblSpecific" into a single stored procedure as a variable...
[ { "answer_id": 263822, "author": "Eoin Campbell", "author_id": 30155, "author_profile": "https://Stackoverflow.com/users/30155", "pm_score": 2, "selected": false, "text": "DECLARE @specificTableName nvarchar(50)\nDECLARE @specificColumnName nvarchar(50)\n\nSET @specificTableName = 'tblSp...
2008/11/04
[ "https://Stackoverflow.com/questions/263801", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
263,815
<p>I have a model being populated by my data layer and then I have a partial view which is rendering an instance of that model.</p> <pre><code>&lt;li class="&lt;%= td.Active ? "youarehere" : string.Empty %&gt; &lt;%= i == ViewData.Model.Count() - 1 ? "last" : string.Empty %&gt;"&gt; </code></pre> <p>The problem is th...
[ { "answer_id": 263908, "author": "Eric Schoonover", "author_id": 3957, "author_profile": "https://Stackoverflow.com/users/3957", "pm_score": 0, "selected": false, "text": "public static string GenerateAttribute(this HtmlHelper hh,\n string name,\n ...
2008/11/04
[ "https://Stackoverflow.com/questions/263815", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3957/" ]
263,816
<p>Alright. I have a query that looks like this:</p> <pre><code>SELECT SUM(`order_items`.`quantity`) as `count`, `menu_items`.`name` FROM `orders`, `menu_items`, `order_items` WHERE `orders`.`id` = `order_items`.`order_id` AND `menu_items`.`id` = `order_items`.`menu_item_id` AND `o...
[ { "answer_id": 263917, "author": "Jamie Love", "author_id": 27308, "author_profile": "https://Stackoverflow.com/users/27308", "pm_score": 2, "selected": false, "text": "SELECT\n name\n , nvl(count, 0) as count\nFROM \n menu_items items \n LEFT JOIN (\n SELECT\n ...
2008/11/04
[ "https://Stackoverflow.com/questions/263816", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16417/" ]
263,820
<p>The first batch file launches a command prompt, i need the second command to be in the ccontext of the first. how can I do this in python?</p> <p>As is, it launches the batch, and blocks until the batch (with its command prompt context) terminates, and then executes <code>devenv</code> without the necessary contex...
[ { "answer_id": 263856, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 2, "selected": false, "text": "'%comspec% /k \"...vcvarsall.bat\" x86 && devenv asdf.sln /rebuild ...'\n" }, { "answer_id": 263881, "author": "Sa...
2008/11/04
[ "https://Stackoverflow.com/questions/263820", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20003/" ]
263,821
<p>For example, I could just git pull and then git checkout HEAD-1. But is there a way of seeing the differences before deciding whether to git pull or not?</p>
[ { "answer_id": 263833, "author": "Greg Hewgill", "author_id": 893, "author_profile": "https://Stackoverflow.com/users/893", "pm_score": 3, "selected": false, "text": "git fetch git log ..origin git pull" }, { "answer_id": 264558, "author": "Aristotle Pagaltzis", "author_i...
2008/11/04
[ "https://Stackoverflow.com/questions/263821", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
263,834
<p>I just lost 50% of my answer on a test because I wrote the code out instead of an algorithm on my midterm, bumping me from an A to a C. Is writing code out still considered an algorithmic representation?</p> <p><a href="http://en.wikipedia.org/wiki/Algorithm#Expressing_algorithms" rel="nofollow noreferrer">Wikipedi...
[ { "answer_id": 263854, "author": "Kent Fredric", "author_id": 15614, "author_profile": "https://Stackoverflow.com/users/15614", "pm_score": 4, "selected": true, "text": "sub foo { \n my @args = @_ ; \n my( $a, $b )=(@args[0],@args[1]); \n for( @{ $a } ){\n $b .= $_ ; \n ...
2008/11/04
[ "https://Stackoverflow.com/questions/263834", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10636/" ]
263,836
<p>We are using an Oracle 11 database and a java development environment (using Eclipse) and would like to migrate several xml schemas to SQL schemas.</p> <p>Have looked ax xsd but really need something that we can run from ant/ Eclipse without SQL Server installed.</p> <p>Regards,</p> <p>Andy</p>
[ { "answer_id": 263854, "author": "Kent Fredric", "author_id": 15614, "author_profile": "https://Stackoverflow.com/users/15614", "pm_score": 4, "selected": true, "text": "sub foo { \n my @args = @_ ; \n my( $a, $b )=(@args[0],@args[1]); \n for( @{ $a } ){\n $b .= $_ ; \n ...
2008/11/04
[ "https://Stackoverflow.com/questions/263836", "https://Stackoverflow.com", "https://Stackoverflow.com/users/34469/" ]
263,838
<p>I usually type my map declarations but was doing some maint and found one without typing. This got me thinking (Oh No!). What is the default typing of a Map declaration. Consider the following:</p> <pre><code>Map map = new HashMap(); map.put("one", "1st"); map.put("two", new Integer(2)); map.put("three", "3rd");...
[ { "answer_id": 263903, "author": "McDowell", "author_id": 304, "author_profile": "https://Stackoverflow.com/users/304", "pm_score": 3, "selected": true, "text": "Map map = new HashMap();\nmap.put(\"one\", \"1st\");\nmap.put(\"two\", new Integer(2));\nmap.put(\"three\", \"3rd\");\nfor (Ob...
2008/11/04
[ "https://Stackoverflow.com/questions/263838", "https://Stackoverflow.com", "https://Stackoverflow.com/users/34475/" ]
263,850
<p>Is there a way to create a Distinct query in HQL. Either by using the "distinct" keyword or some other method. I am not sure if distinct is a valid keywork for HQL, but I am looking for the HQL equivalent of the SQL keyword "distinct".</p>
[ { "answer_id": 263870, "author": "Feet", "author_id": 18340, "author_profile": "https://Stackoverflow.com/users/18340", "pm_score": 8, "selected": true, "text": "String queryString = \"select distinct f from Foo f inner join foo.bars as b\" +\n \" where f.creationDate >= ?...
2008/11/04
[ "https://Stackoverflow.com/questions/263850", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16404/" ]
263,890
<p>As a simple example, I want to write a CLI script which can print <code>=</code> across the entire width of the terminal window.</p> <pre><code>#!/usr/bin/env php &lt;?php echo str_repeat('=', ???); </code></pre> <p>or</p> <pre><code>#!/usr/bin/env python print '=' * ??? </code></pre> <p>or</p> <pre><code>#!/us...
[ { "answer_id": 263900, "author": "TonyUser", "author_id": 22873, "author_profile": "https://Stackoverflow.com/users/22873", "pm_score": 10, "selected": true, "text": "tput cols tput lines" }, { "answer_id": 263919, "author": "pixelbeat", "author_id": 4421, "author_pro...
2008/11/04
[ "https://Stackoverflow.com/questions/263890", "https://Stackoverflow.com", "https://Stackoverflow.com/users/28835/" ]
263,892
<p>I'm using Gnome terminal and I want to change the background color or the profile through a command so I can group some commands in an alias to visually differentiate my windows when I run certain processes. I'm running Ubuntu, and bash is my shell. Are there commands in to do this?</p>
[ { "answer_id": 263957, "author": "Ken", "author_id": 20074, "author_profile": "https://Stackoverflow.com/users/20074", "pm_score": 2, "selected": false, "text": "gnome-terminal --hide-menubar --geometry 115x40+0+0\ngnome-terminal --window-with-profile=logs --hide-menubar --geometry=144x1...
2008/11/04
[ "https://Stackoverflow.com/questions/263892", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
263,899
<p>I have been searching for a way to allow one element of my FileHelpers mapping class to be an array of specific length.</p> <p>For instance, I have a class like this:</p> <pre><code>[DelimitedRecord(",")] public class Example { public string code; public int month; public int day; public double h1;...
[ { "answer_id": 264500, "author": "Marc Gravell", "author_id": 23354, "author_profile": "https://Stackoverflow.com/users/23354", "pm_score": 0, "selected": false, "text": "[DelimitedRecord(\",\")]\npublic class Example\n{\n public string Code {get;set;}\n public int Month {get;set;}...
2008/11/04
[ "https://Stackoverflow.com/questions/263899", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23597/" ]
263,906
<pre><code>AlertEvent::AlertEvent(const std::string&amp; text) : IMEvent(kIMEventAlert, alertText.c_str()), alertText(text) { //inspection at time of crash shows alertText is a valid string } IMEvent::IMEvent(long eventID, const char* details) { //during construction, details==0xcccccccc } </code></pr...
[ { "answer_id": 263911, "author": "Steve Jessop", "author_id": 13005, "author_profile": "https://Stackoverflow.com/users/13005", "pm_score": 2, "selected": false, "text": "alertText.c_str()" }, { "answer_id": 263914, "author": "Adam Holmberg", "author_id": 20688, "auth...
2008/11/04
[ "https://Stackoverflow.com/questions/263906", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20003/" ]
263,913
<p>I am trying to get the DataGridView to render the "insert new row" row as the first row in the grid instead of the last row. How do I go about doing that, is it even possible in the control?</p>
[ { "answer_id": 264014, "author": "jons911", "author_id": 34375, "author_profile": "https://Stackoverflow.com/users/34375", "pm_score": 4, "selected": true, "text": " Dim myrow = existingDataTable.NewRow\n\n existingDataTable.Rows.Add(myrow)\n\n adp.Fill(existingDataTable)\n Wi...
2008/11/04
[ "https://Stackoverflow.com/questions/263913", "https://Stackoverflow.com", "https://Stackoverflow.com/users/32809/" ]
263,926
<p>What are some tiny open source operating systems? I'm looking for something several orders of magnitude smaller than Puppy Linux, Feather Linux, DSL, etc. I want to run a command-line text editor and compiler; anything else is extraneous. I'm looking for a system I can take apart and acquire a fairly good understand...
[ { "answer_id": 11207845, "author": "Deepthought", "author_id": 996882, "author_profile": "https://Stackoverflow.com/users/996882", "pm_score": 2, "selected": false, "text": "qemu bochs gdb git(1) $ git clone git://pdos.csail.mit.edu/xv6/xv6.git" } ]
2008/11/04
[ "https://Stackoverflow.com/questions/263926", "https://Stackoverflow.com", "https://Stackoverflow.com/users/32944/" ]
263,938
<p>For my small wiki application, I mostly need to have the textarea used to edit the contents to use soft (or virtual) wrapping. However, in some cases, not wrapping the content would be preferable. I thought I would do this by simply having a button to turn off wrapping. Here is the simplified code:</p> <pre><code> ...
[ { "answer_id": 264006, "author": "nickf", "author_id": 9021, "author_profile": "https://Stackoverflow.com/users/9021", "pm_score": 0, "selected": false, "text": "wrap <textarea> wrap // this is the onclick handler for your button\ndocument.getElementById(\"nowrapButton\").onclick = funct...
2008/11/05
[ "https://Stackoverflow.com/questions/263938", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
263,945
<p>In the following code I loop through a map and test if an element needs to be erased. Is it safe to erase the element and keep iterating or do I need to collect the keys in another container and do a second loop to call the erase()?</p> <pre><code>map&lt;string, SerialdMsg::SerialFunction_t&gt;::iterator pm_it; fo...
[ { "answer_id": 263958, "author": "Martin York", "author_id": 14065, "author_profile": "https://Stackoverflow.com/users/14065", "pm_score": 9, "selected": true, "text": "auto pm_it = port_map.begin();\nwhile(pm_it != port_map.end())\n{\n if (pm_it->second == delete_this_id)\n {\n ...
2008/11/05
[ "https://Stackoverflow.com/questions/263945", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20889/" ]
263,962
<p>Is there a difference in passing parameters to <code>.load</code></p> <pre><code>$("#myDiv").load("myScript.php?var=x&amp;var2=y&amp;var3=z") </code></pre> <p>vs</p> <pre><code>$("#myDiv").load("myScript.php", {var1:x, var2:y, var3:z}) </code></pre> <p>Also, is there a size limit to how much <code>.load</code> c...
[ { "answer_id": 21646214, "author": "Farshid Saberi", "author_id": 1790801, "author_profile": "https://Stackoverflow.com/users/1790801", "pm_score": 5, "selected": false, "text": "$(\"#myDiv\").load(\"myScript.php?var=x&var2=y&var3=z\")\n $(\"#myDiv\").load(\"myScript.php\", {var:x, var2:...
2008/11/05
[ "https://Stackoverflow.com/questions/263962", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
263,965
<p>Can I convert a string representing a boolean value (e.g., 'true', 'false') into a intrinsic type in JavaScript?</p> <p>I have a hidden form in HTML that is updated based upon a user's selection within a list. This form contains some fields which represent boolean values and are dynamically populated with an intrin...
[ { "answer_id": 264037, "author": "guinaps", "author_id": 27225, "author_profile": "https://Stackoverflow.com/users/27225", "pm_score": 13, "selected": true, "text": "var isTrueSet = (myValue === 'true');\n === isTrueSet true false var myBool = Boolean(\"false\"); // == true\n\nvar myBoo...
2008/11/05
[ "https://Stackoverflow.com/questions/263965", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4599/" ]
263,968
<p>What's the best way to convert NetBeans (Matisse) .form files into .java files, without using the NetBeans IDE itself? Ideally I'd like to package the .form files along with my source code, and generate the .java files at build time. This will prevent developers from "accidentally" adding code to the generated .java...
[ { "answer_id": 20761239, "author": "Naqash", "author_id": 3132530, "author_profile": "https://Stackoverflow.com/users/3132530", "pm_score": 0, "selected": false, "text": ".java .class" } ]
2008/11/05
[ "https://Stackoverflow.com/questions/263968", "https://Stackoverflow.com", "https://Stackoverflow.com/users/29173/" ]
263,977
<p>I'm quite familiar with the reasons for wanting to copy a property vs. retain. (Essentially the value vs. relationship argument. You almost always want to copy strings, for example.)</p> <p>What about NSColor and NSGradient? </p> <p>They both conform to NSCopying, but as currently implemented, are immutable.</p> ...
[ { "answer_id": 264000, "author": "Brian Webster", "author_id": 23324, "author_profile": "https://Stackoverflow.com/users/23324", "pm_score": 2, "selected": false, "text": "copyWithZone: return [self retain] retain copy" } ]
2008/11/05
[ "https://Stackoverflow.com/questions/263977", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
263,985
<p>I want to be replace any occurrence of more than one space with a single space, but take no action in text between quotes.</p> <p>Is there any way of doing this with a Java regex? If so, can you please attempt it or give me a hint?</p>
[ { "answer_id": 264044, "author": "Jeff Hillman", "author_id": 3950, "author_profile": "https://Stackoverflow.com/users/3950", "pm_score": 2, "selected": false, "text": "(\"[^\"\\\\]*(?:\\\\.[^\"\\\\]*)*\")|( +)\n Pattern spaceOrStringRegex = Pattern.compile( \"(\\\"[^\\\"\\\\\\\\]*(?:\\...
2008/11/05
[ "https://Stackoverflow.com/questions/263985", "https://Stackoverflow.com", "https://Stackoverflow.com/users/27677/" ]
263,987
<p>I have a Delphi 5 executable that calls into a .NET assembly via the free <a href="http://sourceforge.net/projects/delphinet/" rel="nofollow noreferrer">Delphi .NET</a> code, and for the most part, this works great. However, one of the requirements of my application is that our clients be able to use this from a ne...
[ { "answer_id": 264001, "author": "Rob Prouse", "author_id": 30827, "author_profile": "https://Stackoverflow.com/users/30827", "pm_score": 2, "selected": false, "text": "CasPol.exe -m -ag 1.2 -url file://\\\\ShawnFa-Srv/Tools/* FullTrust\n" } ]
2008/11/05
[ "https://Stackoverflow.com/questions/263987", "https://Stackoverflow.com", "https://Stackoverflow.com/users/34504/" ]
263,992
<p>I don't want to include relations in my edmx entity framework, I want to have the foreign key field as a normal property in my entity. </p> <p>How can I do that?</p>
[ { "answer_id": 503023, "author": "Neil", "author_id": 61480, "author_profile": "https://Stackoverflow.com/users/61480", "pm_score": 0, "selected": false, "text": "(From o In nw.Orders \n Where o.OrderID = 10281 \n Select o.Customers\n).First\n" }, { "answer_id": 585984, "auth...
2008/11/05
[ "https://Stackoverflow.com/questions/263992", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
264,004
<p>By "code snippet execution", I mean the ability to write a few lines of code, run and test it without having to fire up an IDE and create a dummy project.</p> <p>It's incredibly useful for helping people with a small code sample without creating a project, compiling everything cleanly, sending them the code snippet...
[ { "answer_id": 276431, "author": "Jed", "author_id": 33208, "author_profile": "https://Stackoverflow.com/users/33208", "pm_score": 1, "selected": false, "text": "#!/bin/sh\n\nbody=\"$1\"\nout=$(mktemp /tmp/ccrun-XXXXXX)\nsrc=${out}.c\ncat > ${src} <<EOF\n#include <limits.h>\n#include <st...
2008/11/05
[ "https://Stackoverflow.com/questions/264004", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9922/" ]
264,057
<p>I have some old C code that I would like to combine with some C++ code.</p> <p>The C code used to have has the following includes:</p> <pre><code>#include &lt;windows.h&gt; #include &lt;stdio.h&gt; #include &lt;string.h&gt; #include &quot;mysql.h&quot; </code></pre> <p>Now I'm trying to make it use C++ with iostream...
[ { "answer_id": 264084, "author": "Max Lybbert", "author_id": 10593, "author_profile": "https://Stackoverflow.com/users/10593", "pm_score": 6, "selected": true, "text": "string.h string" }, { "answer_id": 34130770, "author": "Amaresh Kumar", "author_id": 1343196, "auth...
2008/11/05
[ "https://Stackoverflow.com/questions/264057", "https://Stackoverflow.com", "https://Stackoverflow.com/users/28462/" ]
264,080
<p>What is the most efficient way to cacluate the closest power of a 2 or 10 to another number? e.g.</p> <p>3.5 would return 4 for power of 2 and 1 for power of 10</p> <p>123 would return 128 for power of 2 and 100 for power of 10</p> <p>0.24 would return 0.25 for power of 2 and 0.1 for power of 10</p> <p>I'm just ...
[ { "answer_id": 264093, "author": "Greg Hewgill", "author_id": 893, "author_profile": "https://Stackoverflow.com/users/893", "pm_score": 6, "selected": true, "text": "n^round(log_n(x))\n log_n(x) log_n(x) = log(x) / log(n)\n log" }, { "answer_id": 311972, "author": "Vincent Ro...
2008/11/05
[ "https://Stackoverflow.com/questions/264080", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5932/" ]
264,090
<p>How can I make:</p> <p>DELETE FROM foo WHERE id=1 AND <strong>bar not contains id==1</strong></p> <p>To elaborate, how can I remove a row with <code>id = 1</code>, from table <code>foo</code>, only if there is not a row in table <code>bar</code> with <code>id = 1</code>.</p>
[ { "answer_id": 264103, "author": "Ned Batchelder", "author_id": 14343, "author_profile": "https://Stackoverflow.com/users/14343", "pm_score": 5, "selected": true, "text": "DELETE FROM foo WHERE id=1 AND NOT EXISTS (SELECT * FROM bar WHERE id=1)\n" }, { "answer_id": 264517, "a...
2008/11/05
[ "https://Stackoverflow.com/questions/264090", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26004/" ]
264,123
<p>Is there a way to have % in vim find the next ([{ or whatever, even if it is not on the same line?</p> <p>Example:</p> <pre><code>int main(int argc, char ** argv) { #Your cursor is somewhere in this comment, I want #it to get to the ( after printf printf("Hello there.\n"); } </code></pre>
[ { "answer_id": 264137, "author": "Jim Burger", "author_id": 20164, "author_profile": "https://Stackoverflow.com/users/20164", "pm_score": 3, "selected": true, "text": "/{ [enter]\n" }, { "answer_id": 264148, "author": "puetzk", "author_id": 14312, "author_profile": "h...
2008/11/05
[ "https://Stackoverflow.com/questions/264123", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
264,127
<p>I have a program that when it starts, opens a winform (it is the one specified in Application.Run(new ...). From this form I open another form:</p> <pre><code>OtherForm newForm=new OtherForm(); newForm.Show(); </code></pre> <p>How can i communicate from the new winform with the form that opened it? So that I can a...
[ { "answer_id": 264132, "author": "Factor Mystic", "author_id": 1569, "author_profile": "https://Stackoverflow.com/users/1569", "pm_score": 2, "selected": false, "text": "OtherForm newForm=new OtherForm(string title, int data);" }, { "answer_id": 264151, "author": "Jon B", ...
2008/11/05
[ "https://Stackoverflow.com/questions/264127", "https://Stackoverflow.com", "https://Stackoverflow.com/users/31791/" ]
264,128
<p>I am trying to export a Ruby framework via XML-RPC. However I am having some problems when trying to call a method from a class not directly added as a handler to the XML-RPC server. Please see my example below:</p> <p>I have a test Ruby XML-RPC server as follows:</p> <pre><code>require "xmlrpc/server" class Exam...
[ { "answer_id": 264165, "author": "jakber", "author_id": 29812, "author_profile": "https://Stackoverflow.com/users/29812", "pm_score": 4, "selected": true, "text": "def foobar()\n return ExampleFoo.new().foo().bar()\nend\n" } ]
2008/11/05
[ "https://Stackoverflow.com/questions/264128", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14260/" ]
264,140
<p>I've a web service running on server which return data either in XML format or JSON format. I wanted to request a JSON format but using HTTP Post method.</p>
[ { "answer_id": 264380, "author": "Frank Krueger", "author_id": 338, "author_profile": "https://Stackoverflow.com/users/338", "pm_score": 0, "selected": false, "text": "CFURLRef url = CFURLCreateWithString(NULL, CFSTR(\"http://example.com/post\"), NULL);\nCFHTTPMessageRef msg = CFHTTPMess...
2008/11/05
[ "https://Stackoverflow.com/questions/264140", "https://Stackoverflow.com", "https://Stackoverflow.com/users/451867/" ]
264,154
<p>How can I fetch more than 1000 record from data store and put all in one single list to pass to django?</p>
[ { "answer_id": 264171, "author": "Kent Fredric", "author_id": 15614, "author_profile": "https://Stackoverflow.com/users/15614", "pm_score": 4, "selected": false, "text": "LIMIT 1000 OFFSET 0 \n LIMIT 1000 OFFSET 1000 \n SELECT * FROM Foo WHERE ID > 0 AND ID < 1000 \n\n SELECT * FRO...
2008/11/05
[ "https://Stackoverflow.com/questions/264154", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20683/" ]
264,163
<p>I have a somewhat complex WPF application which seems to be 'hanging' or getting stuck in a Wait call when trying to use the dispatcher to invoke a call on the UI thread.</p> <p>The general process is:</p> <ol> <li>Handle the click event on a button</li> <li>Create a new thread (STA) which: creates a new instance ...
[ { "answer_id": 5215784, "author": "Jeff", "author_id": 164438, "author_profile": "https://Stackoverflow.com/users/164438", "pm_score": 2, "selected": false, "text": " if(this.Dispatcher.Thread != Thread.CurrentThread)\n{\n this.Dispatcher.Invoke(DispatcherPriority.Normal, (ThreadStart...
2008/11/05
[ "https://Stackoverflow.com/questions/264163", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18434/" ]
264,196
<p>Are event handlers fired in the order that they attached to the event? If not, can I enforce some kind of order onto the event handlers such that they are called in a specific order?</p>
[ { "answer_id": 264299, "author": "Chad Moran", "author_id": 25416, "author_profile": "https://Stackoverflow.com/users/25416", "pm_score": 2, "selected": false, "text": "MyObject.MyEvent += new MyEventHandler(Wrapper);\n\npublic void Wrapper()\n{\n Method1();\n Method3();\n Metho...
2008/11/05
[ "https://Stackoverflow.com/questions/264196", "https://Stackoverflow.com", "https://Stackoverflow.com/users/358/" ]
264,216
<p>I'm playing around with ASP.net MVC and JQuery at the moment. I've come across behavour which doesn't seem to make sense. </p> <p>I'm calling JQuery's <code>$.getJSON</code> function to populate some div's. The event is triggered on the <code>$(document).ready</code> event. This works perfectly.</p> <p>There is a...
[ { "answer_id": 264351, "author": "Andrew Harry", "author_id": 30576, "author_profile": "https://Stackoverflow.com/users/30576", "pm_score": 4, "selected": false, "text": "var noCache = Date();\n$.getJSON(\"/somepage/someaction\", { \"noCache\": noCache }, Callback);\n" }, { "answ...
2008/11/05
[ "https://Stackoverflow.com/questions/264216", "https://Stackoverflow.com", "https://Stackoverflow.com/users/30576/" ]
264,224
<p>I'm interested in compressing data using Python's <code>gzip</code> module. It happens that I want the compressed output to be deterministic, because that's often a really convenient property for things to have in general -- if some non-gzip-aware process is going to be looking for changes in the output, say, or if...
[ { "answer_id": 264297, "author": "Sean", "author_id": 4919, "author_profile": "https://Stackoverflow.com/users/4919", "pm_score": 0, "selected": false, "text": "def _write_gzip_header(self):\n self.fileobj.write('\\037\\213') # magic header\n self.fileobj.write('\\010')...
2008/11/05
[ "https://Stackoverflow.com/questions/264224", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13871/" ]
264,236
<p>How do you determine what to put in .rhosts file in an VAX openvms system when trying to remotely access the server using a remote shell from Cygwin on windows XP ? .rlogin and rsh are the only methods that can be used to access the VAX server and it must be using Cygwin to remote in to the VAX server. SSH is not an...
[ { "answer_id": 264297, "author": "Sean", "author_id": 4919, "author_profile": "https://Stackoverflow.com/users/4919", "pm_score": 0, "selected": false, "text": "def _write_gzip_header(self):\n self.fileobj.write('\\037\\213') # magic header\n self.fileobj.write('\\010')...
2008/11/05
[ "https://Stackoverflow.com/questions/264236", "https://Stackoverflow.com", "https://Stackoverflow.com/users/34531/" ]
264,243
<p>I'm working on a quick project to monitor/process data. Essentially that's just monitors, schedules and processors. The monitor checks for data (ftp, local, imap, pop, etc) using a schedule and sends new data to a processor. They all have interfaces.</p> <p>I'm trying to find a sane way to use config to configure w...
[ { "answer_id": 264297, "author": "Sean", "author_id": 4919, "author_profile": "https://Stackoverflow.com/users/4919", "pm_score": 0, "selected": false, "text": "def _write_gzip_header(self):\n self.fileobj.write('\\037\\213') # magic header\n self.fileobj.write('\\010')...
2008/11/05
[ "https://Stackoverflow.com/questions/264243", "https://Stackoverflow.com", "https://Stackoverflow.com/users/91911/" ]
264,248
<p>I'm looking into integrating jBPM with my current project, so far so good just including the jpdl jar in my ear and using the spring modules 0.8 jbpm module, however I've got to have a reasonable way of going from my changes to to the process definition in the designer to deployment in production.</p> <p>The path ...
[ { "answer_id": 266157, "author": "shyam", "author_id": 7616, "author_profile": "https://Stackoverflow.com/users/7616", "pm_score": 0, "selected": false, "text": "DeployProcessTask .par jbpm-cfg.xml" }, { "answer_id": 286822, "author": "Harry Lime", "author_id": 21590, ...
2008/11/05
[ "https://Stackoverflow.com/questions/264248", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
264,249
<p>I've been beating my head against this wall for quite some time now, so I thought I'd ask some experts.</p> <p>I need to send an xml string from one computer to the next. I would like to format the xml something like this:</p> <pre><code>&lt;xml&gt; &lt;author&gt;Joe the Magnificent&lt;/author&gt; &lt;title&g...
[ { "answer_id": 264279, "author": "Jim Burger", "author_id": 20164, "author_profile": "https://Stackoverflow.com/users/20164", "pm_score": 2, "selected": false, "text": " Dim settings As XmlWriterSettings = New XmlWriterSettings()\n settings.Indent = true\n settings.IndentChars = (C...
2008/11/05
[ "https://Stackoverflow.com/questions/264249", "https://Stackoverflow.com", "https://Stackoverflow.com/users/34539/" ]
264,266
<p>I have a php web application that is occasionally hanging. When I navigate to the page it will just sit there trying to load for hours, even though max execution is 210. This is an application uses curl behind a proxy to download stuff. Error reporting is set to all, but that dosn't matter since the page is blank ...
[ { "answer_id": 264320, "author": "Owen", "author_id": 4853, "author_profile": "https://Stackoverflow.com/users/4853", "pm_score": 1, "selected": false, "text": "curl_setopt()" }, { "answer_id": 266059, "author": "Zak", "author_id": 2112692, "author_profile": "https://...
2008/11/05
[ "https://Stackoverflow.com/questions/264266", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
264,269
<p>A basic definition and example and a few references for "<a href="http://en.wikipedia.org/wiki/C_preprocessor#X-Macros" rel="nofollow noreferrer">X-Macros</a>" is given in this <a href="http://en.wikipedia.org/wiki/C_preprocessor" rel="nofollow noreferrer">wikipedia entry on the C pre-processor</a>:</p> <blockquot...
[ { "answer_id": 265560, "author": "JayG", "author_id": 5823, "author_profile": "https://Stackoverflow.com/users/5823", "pm_score": 6, "selected": true, "text": "token1##token2 #token X_ERROR /* \n * X Macro() data list\n * Format: Enum, Value, Text\n */\n#define X_ERROR \\\n X(ERROR_NONE...
2008/11/05
[ "https://Stackoverflow.com/questions/264269", "https://Stackoverflow.com", "https://Stackoverflow.com/users/30636/" ]
264,281
<p>Is there a way (in C#) to access the systray? I am not talking about making a notify icon. I want to iterate through the items in the tray (I would guess through the processes but I don't know how to determine what is actually in the tray and what is just a process) and also represent the items with their icons in m...
[ { "answer_id": 264595, "author": "Rob", "author_id": 34224, "author_profile": "https://Stackoverflow.com/users/34224", "pm_score": 4, "selected": true, "text": "NotifyWnd = FindWindowEx(SysTray, 0, \"TrayNotifyWnd\", 0); hHook=SetWindowsHookEx(WH_CALLWNDPROC,HOOKPROC(MsgProc),\n ...
2008/11/05
[ "https://Stackoverflow.com/questions/264281", "https://Stackoverflow.com", "https://Stackoverflow.com/users/34514/" ]
264,290
<p>Sometimes I need to access some servers running Linux (or maybe another Unix-like SO), but I don't know how to verify which <a href="http://en.wikipedia.org/wiki/Linux_distribution" rel="noreferrer">distribution</a> is in use on the server (there are times that even the "responsible" person for the server doesn't kn...
[ { "answer_id": 264294, "author": "matt b", "author_id": 4249, "author_profile": "https://Stackoverflow.com/users/4249", "pm_score": -1, "selected": false, "text": "uname -a" }, { "answer_id": 264298, "author": "Yojik", "author_id": 34532, "author_profile": "https://St...
2008/11/05
[ "https://Stackoverflow.com/questions/264290", "https://Stackoverflow.com", "https://Stackoverflow.com/users/27959/" ]
264,309
<p>There is a similar question going around, but it just got the same old answers that people always give about Regex syntax, but that's not the point here, so please try to not knee jerk the same old answers about regex syntax. Try to be a little more original and personal about it this time.</p> <p>Regex syntax is v...
[ { "answer_id": 264384, "author": "he_the_great", "author_id": 34435, "author_profile": "https://Stackoverflow.com/users/34435", "pm_score": 6, "selected": true, "text": "<TAG\\b[^>]*>(.*?)</TAG>\n" }, { "answer_id": 264416, "author": "AmbroseChapel", "author_id": 242241, ...
2008/11/05
[ "https://Stackoverflow.com/questions/264309", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15124/" ]
264,312
<p>I'm trying to squeeze some more performance out of my rendering pipeline. The (by far) slowest part is performing a java.awt.imaging.LookupOp on a large image. </p> <p>The image size is about 2048x2048.</p> <p>I have figured out that having the filter done along with the drawing operation is much faster than cal...
[ { "answer_id": 272413, "author": "Ryan Boucher", "author_id": 27818, "author_profile": "https://Stackoverflow.com/users/27818", "pm_score": 0, "selected": false, "text": "//Has filter or source image changed?\n// yes, recalculate filter and cache\n// no, render cached image\n" } ]
2008/11/05
[ "https://Stackoverflow.com/questions/264312", "https://Stackoverflow.com", "https://Stackoverflow.com/users/25920/" ]
264,318
<p>I am calling an unmanaged C++ dll that expects a char* as one of its parameters and I want to push a byte[] into it. The project is written in VB.NET. </p> <p>What type of marshalling will work for this?</p>
[ { "answer_id": 264605, "author": "Chris Thompson", "author_id": 5982, "author_profile": "https://Stackoverflow.com/users/5982", "pm_score": 1, "selected": false, "text": " // (c) 2007 Marc Clifton\n /// <summary>\n /// A helper class for pinning a managed structure so that it is...
2008/11/05
[ "https://Stackoverflow.com/questions/264318", "https://Stackoverflow.com", "https://Stackoverflow.com/users/34550/" ]
264,323
<p>Is there a way to delete a folder, lets call it FolderX from an SVN trunk recursively? A quick search on google only tells me how to recursively delete all .svn folders and this is not what I want to do</p>
[ { "answer_id": 264345, "author": "Dana the Sane", "author_id": 2567, "author_profile": "https://Stackoverflow.com/users/2567", "pm_score": 6, "selected": true, "text": "find ./ -name \"FolderX\" | xargs svn delete --force\n for /R . %1 in (*.EXT) do svn delete %1\n" }, { "answer_...
2008/11/05
[ "https://Stackoverflow.com/questions/264323", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17211/" ]
264,339
<p>I'm not sure how to describe this problem, so I think an example is the best way to ask my question:</p> <p>I have two tables with a manyToMany relationship:</p> <p>DriversLicence &lt;-> LicenceClass</p> <p>LicenceClass is things like "Car", "Motorbike", and "Medium Rigid".</p> <p>Using Hibernate Criteria, how c...
[ { "answer_id": 264420, "author": "Nick", "author_id": 34558, "author_profile": "https://Stackoverflow.com/users/34558", "pm_score": 0, "selected": false, "text": "session.createCriteria(DriversLicence.class)\n .add(Expression.or(\n Expression.eq(\"licenceClass.type\", \"Car\"),\n ...
2008/11/05
[ "https://Stackoverflow.com/questions/264339", "https://Stackoverflow.com", "https://Stackoverflow.com/users/34553/" ]
264,350
<p>In traditional embedded programming, we will give a delay function like so:</p> <pre><code>for(i=0;i&lt;255;i++) for(j=0;j&lt;255;j++); </code></pre> <p>In the microprocessor's view, is this how the sleep() function works?</p> <p>Is there an alternative for the sleep() function in C?</p>
[ { "answer_id": 264360, "author": "paxdiablo", "author_id": 14860, "author_profile": "https://Stackoverflow.com/users/14860", "pm_score": 3, "selected": false, "text": "void sleep (unsigned int delay) {\n unsigned int target = peek(0x33) + delay;\n while (peek(0x33) != target);\n}\n...
2008/11/05
[ "https://Stackoverflow.com/questions/264350", "https://Stackoverflow.com", "https://Stackoverflow.com/users/31116/" ]
264,358
<p>let us have a situation in which the following program prints some 10 lines of #</p> <pre><code>for(i=0;i&lt;10;i++) prinf("\n#"); </code></pre> <p>now how to go back to 5 th line and edit that # and change the color of it without clearing the screen or clearing the below 5 lines? <p>I have tried </p> <pre><code>...
[ { "answer_id": 264371, "author": "shoosh", "author_id": 9611, "author_profile": "https://Stackoverflow.com/users/9611", "pm_score": 0, "selected": false, "text": "cprintf(\"\\b#\");\n" }, { "answer_id": 264388, "author": "Adam Liss", "author_id": 29157, "author_profil...
2008/11/05
[ "https://Stackoverflow.com/questions/264358", "https://Stackoverflow.com", "https://Stackoverflow.com/users/31116/" ]
264,372
<p>Is there a reason to sort MultiMap in Java and how to do that?</p>
[ { "answer_id": 271361, "author": "SCdF", "author_id": 1666, "author_profile": "https://Stackoverflow.com/users/1666", "pm_score": 1, "selected": false, "text": "org.apache.commons.collections.MultiMap Collection List org.apache.commons.collections.MultiHashMap ArrayList Collections.sort(...
2008/11/05
[ "https://Stackoverflow.com/questions/264372", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
264,381
<p>I'm doing some searching of tags, and some users like "cat" while others like "Cat" Go figure...</p> <p>Anyways, is there a way to force a particular find to be case sensitive? Such as:</p> <pre><code>Tag.find(:some-special-option-here) </code></pre> <p>Any ideas?</p>
[ { "answer_id": 264389, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 2, "selected": false, "text": "ALTER TABLE `sets` CHANGE `set_name` `set_name` VARCHAR( 64 ) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL\n" }, { "an...
2008/11/05
[ "https://Stackoverflow.com/questions/264381", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19964/" ]
264,385
<p>I'm building my app in vc2008 and testing it on a network of machines.</p> <p>Is there any way, other than installing Visual Studio 2008, to run a debug build of a C++ program on another machine? (i.e. that doesn't have vc2008 installed)</p> <p>Installing the redist package only installs the release mode support D...
[ { "answer_id": 264447, "author": "Franci Penov", "author_id": 17028, "author_profile": "https://Stackoverflow.com/users/17028", "pm_score": 0, "selected": false, "text": "C:\\Program Files\\Common Files\\Merge Modules" } ]
2008/11/05
[ "https://Stackoverflow.com/questions/264385", "https://Stackoverflow.com", "https://Stackoverflow.com/users/33847/" ]
264,395
<p>I've found the "open" command in Mac OS X very handy in the command line. From "man open":</p> <blockquote> <p>The <code>open</code> command opens a file (or a directory or URL), just as if you had double-clicked the file's icon. If no application name is specified, the default application as determin...
[ { "answer_id": 264401, "author": "number5", "author_id": 29489, "author_profile": "https://Stackoverflow.com/users/29489", "pm_score": 9, "selected": true, "text": "xdg-open" }, { "answer_id": 264467, "author": "Jeremy Visser", "author_id": 10839, "author_profile": "h...
2008/11/05
[ "https://Stackoverflow.com/questions/264395", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
264,400
<p>I am trying to do the following in ASP.NET 3.5. Basically, I am binding a LINQDataSource to a DataList. There is a property called "Deleted" and if it is true, I want to display different markup. The following code throws errors:</p> <pre><code>&lt;asp:DataList runat="server"&gt; &lt;ItemTemplate&gt; ...
[ { "answer_id": 264445, "author": "Adrian Clark", "author_id": 148, "author_profile": "https://Stackoverflow.com/users/148", "pm_score": 3, "selected": false, "text": "<asp:DataList runat=\"server\">\n <ItemTemplate>\n <asp:Panel Visible=\"<%# Eval(\"Deleted\") %>\">\n ...
2008/11/05
[ "https://Stackoverflow.com/questions/264400", "https://Stackoverflow.com", "https://Stackoverflow.com/users/40/" ]
264,402
<p>I have used this in my HTML:</p> <pre><code>&lt;q&gt; Hai How r u &lt;/q&gt; </code></pre> <p>Which shows the text in quotes, like "Hai How r u", for example.</p> <p>This is working fine in FF but not in IE 6.0.</p> <p>Please let me know why this happens, and any solutions you might know of. </p> <p>I don't wan...
[ { "answer_id": 264405, "author": "Karan", "author_id": 11110, "author_profile": "https://Stackoverflow.com/users/11110", "pm_score": 0, "selected": false, "text": "\" <b> <i> <q>" }, { "answer_id": 264410, "author": "nickf", "author_id": 9021, "author_profile": "https...
2008/11/05
[ "https://Stackoverflow.com/questions/264402", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22162/" ]
264,414
<p>I've got a Repeater and its SqlDatasource nested inside a Gridview TemplatedField.<br> The Repeater's datasource SelectCommand is set using the FormatString of an Eval from the Gridview.<br> The SelectCommand has a WHERE clause which is to compare a string.<br> Because I have already used the single and double quote...
[ { "answer_id": 264426, "author": "Ty.", "author_id": 16948, "author_profile": "https://Stackoverflow.com/users/16948", "pm_score": 0, "selected": false, "text": "... WHERE (StringField = \\'{0}\\') ...\n" }, { "answer_id": 264443, "author": "Keltex", "author_id": 28260, ...
2008/11/05
[ "https://Stackoverflow.com/questions/264414", "https://Stackoverflow.com", "https://Stackoverflow.com/users/242/" ]
264,428
<p>I am using BSD style pty/tty pairs to implement running a sub shell. When the user exits the sub shell, how do I detect in the master process that this has occurred? I am using select(nfds, &amp;read_fds, NULL, NULL, &amp;timeout); with the master pty file descriptor set in the read_fds on the master side.</p>
[ { "answer_id": 264449, "author": "Adam Liss", "author_id": 29157, "author_profile": "https://Stackoverflow.com/users/29157", "pm_score": 2, "selected": false, "text": "fork() waitpid()" }, { "answer_id": 267422, "author": "Matthew Smith", "author_id": 20889, "author_p...
2008/11/05
[ "https://Stackoverflow.com/questions/264428", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20889/" ]
264,430
<p>I want to be able to get a list of all differences between two JavaScript object graphs, with the property names and values where the deltas occur. </p> <p>For what it is worth, these objects are usually retrieved from the server as JSON and typically are no more than a handful of layers deep (i.e. it may be an arr...
[ { "answer_id": 266306, "author": "Jason Bunting", "author_id": 1790, "author_profile": "https://Stackoverflow.com/users/1790", "pm_score": 4, "selected": false, "text": "function findDifferences(objectA, objectB) {\n var propertyChanges = [];\n var objectGraphPath = [\"this\"];\n (...
2008/11/05
[ "https://Stackoverflow.com/questions/264430", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1790/" ]
264,440
<p>Apple strongly recommends using the binary plist format when reading large XML-based data sets into iPhone apps. Among their reasoning is the fact that XML parsing is very taxing on the iPhone. However, this requires that files residing on the remote web server be converted first.</p> <p>For frequently-changing con...
[ { "answer_id": 264487, "author": "Barry Wark", "author_id": 2140, "author_profile": "https://Stackoverflow.com/users/2140", "pm_score": 3, "selected": false, "text": "NSPropertyListSerialization NSString *xmlPlistPath; // already set\nNSString *outPath; // already set\n\n\nNSData *plistD...
2008/11/05
[ "https://Stackoverflow.com/questions/264440", "https://Stackoverflow.com", "https://Stackoverflow.com/users/32536/" ]
264,441
<pre><code>function array_value_from_key($array,$key) { return !empty($array[$key]) ? $array[$key] : null; } </code></pre> <p>The reason I ask is because I have a class function that returns an array.</p> <p>Instead of having to do</p> <pre><code>$myArray = myClass::giveMeArray(); $myValue = $myArray[$myKey]; <...
[ { "answer_id": 264465, "author": "Jason", "author_id": 33975, "author_profile": "https://Stackoverflow.com/users/33975", "pm_score": 1, "selected": false, "text": "$myValue = @$myArray[$myKey];\n $myValue = (array_key_exists($myKey, $myArray)) ? $myArray[$myKey] : null;\n" }, { "...
2008/11/05
[ "https://Stackoverflow.com/questions/264441", "https://Stackoverflow.com", "https://Stackoverflow.com/users/34561/" ]
264,454
<p>I run Jetty6 yet gladly place Apache in the front if needs be.</p> <p>I would like to have two webserver instances running on the same machine on different ports. I would like the instance on port 80 to redirect the second public domain name to the second webserver on port 8080.</p> <p>This should not be visible t...
[ { "answer_id": 264470, "author": "number5", "author_id": 29489, "author_profile": "https://Stackoverflow.com/users/29489", "pm_score": 2, "selected": false, "text": " ProxyRequests Off\n\n <Proxy *>\n Order deny,allow\n Allow from all\n </Proxy>\n\n ProxyPass / http://l...
2008/11/05
[ "https://Stackoverflow.com/questions/264454", "https://Stackoverflow.com", "https://Stackoverflow.com/users/34565/" ]
264,480
<p>My php is weak and I'm trying to change this string:</p> <pre><code>http://www.example.com/backend.php?/c=crud&amp;m=index&amp;t=care ^ </code></pre> <p>to be:</p> <pre><code>http://www.example.com/backend.php?c=crud&amp;m=index&amp;t=care ^ </c...
[ { "answer_id": 264485, "author": "eyelidlessness", "author_id": 17964, "author_profile": "https://Stackoverflow.com/users/17964", "pm_score": 3, "selected": false, "text": "$str = preg_replace('/\\?\\//', '?', $str);\n" }, { "answer_id": 264490, "author": "Henrik Paul", "...
2008/11/05
[ "https://Stackoverflow.com/questions/264480", "https://Stackoverflow.com", "https://Stackoverflow.com/users/34571/" ]
264,482
<p>I am not able to access localhost https pages in firefox3. It gave the error </p> <blockquote> <p>'Can't connect securely because the SSL protocol has been disabled. (Error code: ssl_error_ssl_disabled)'</p> </blockquote> <p>I enabled all the SSL2 related preferences through about:config and the error changed ...
[ { "answer_id": 264485, "author": "eyelidlessness", "author_id": 17964, "author_profile": "https://Stackoverflow.com/users/17964", "pm_score": 3, "selected": false, "text": "$str = preg_replace('/\\?\\//', '?', $str);\n" }, { "answer_id": 264490, "author": "Henrik Paul", "...
2008/11/05
[ "https://Stackoverflow.com/questions/264482", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16488/" ]
264,495
<p>I've got an application that's using string.compare(string,string) to sort some values. The thing I can't figure out is why "1022" compares as less than "10-23" and "10-23" compares as less than "1024".</p> <p>Is there something specific to the value of "-" that causes this result? Will that overload of string.co...
[ { "answer_id": 264525, "author": "Marc Gravell", "author_id": 23354, "author_profile": "https://Stackoverflow.com/users/23354", "pm_score": 2, "selected": false, "text": "StringComparison.Ordinal string.Compare string s1 = \"-0.67:-0.33:0.33\";\nstring s2 = \"0.67:-0.33:0.33\";\nstring s...
2008/11/05
[ "https://Stackoverflow.com/questions/264495", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3475/" ]
264,496
<p>Should we use Generic Collection to improve safety and performance?</p>
[ { "answer_id": 264506, "author": "FlySwat", "author_id": 1965, "author_profile": "https://Stackoverflow.com/users/1965", "pm_score": 2, "selected": false, "text": "ArrayList list = new ArrayList();\nlist.Add(5);\nlist.Add(\"FooBar\");\n List<int> list = new List();\nlist.Add(5);\n// Comp...
2008/11/05
[ "https://Stackoverflow.com/questions/264496", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
264,508
<p>Here is the scenario. There is content loaded in iframe from other site. I click to some link inside the iframe.</p> <p>Is it possible to catch somehow outside the iframe what is that link? </p> <p>UPDATE Since I recieved question if my intentions are pure, I would explain more on the use case. May be I started in...
[ { "answer_id": 265139, "author": "user34280", "author_id": 34280, "author_profile": "https://Stackoverflow.com/users/34280", "pm_score": 0, "selected": false, "text": "<a href=\"javascript:void(0)\" onclick=\"top.harvestLink(this)\" title=\"Item=foo\" alt=\"\">Foo</a>\n function harvestL...
2008/11/05
[ "https://Stackoverflow.com/questions/264508", "https://Stackoverflow.com", "https://Stackoverflow.com/users/34577/" ]
264,526
<p>I want to determine if a certain window is visible to the user or hidden/occluded. In Windows XP I would use the GetClipBox() function and check for a NULLREGION or empty RECT return value. This worked perfectly fine, but on Windows Vista it does not work if another window is occluding the window. In this case, GetC...
[ { "answer_id": 265497, "author": "flashk", "author_id": 25149, "author_profile": "https://Stackoverflow.com/users/25149", "pm_score": 2, "selected": false, "text": "DwmEnableComposition(DWM_EC_DISABLECOMPOSITION);\n" }, { "answer_id": 265525, "author": "Scott Dorman", "au...
2008/11/05
[ "https://Stackoverflow.com/questions/264526", "https://Stackoverflow.com", "https://Stackoverflow.com/users/25149/" ]
264,530
<p>I need to find two adjacent repeating digits in a string and replace with a single one. How to do this in Java. Some examples:</p> <p>123345 should be 12345 77433211 should be 74321</p>
[ { "answer_id": 264543, "author": "Jake", "author_id": 24730, "author_profile": "https://Stackoverflow.com/users/24730", "pm_score": 0, "selected": false, "text": "var myString='123345'\nmyString.replace(/([0-9])\\1/g,'$1')\n '123334'.replace(/([0-9])\\1+/g,'$1')\n" }, { "answer_i...
2008/11/05
[ "https://Stackoverflow.com/questions/264530", "https://Stackoverflow.com", "https://Stackoverflow.com/users/33203/" ]
264,541
<p>Is there such a thing? </p> <p>I'm talking about something like a C++ <code>new</code> command i.e. allocation of memory which necessitates explicit releasing of the memory (or risk memory leaks).</p> <p>I ask because I remember having to solve some GDI leak problems previously by setting forms/controls/other obje...
[ { "answer_id": 265143, "author": "RS Conley", "author_id": 7890, "author_profile": "https://Stackoverflow.com/users/7890", "pm_score": 4, "selected": true, "text": "Option Explicit Public Event GetRef(ByRef RHS As MyObject)\n\nPublic Function GetMyObject() As MyObject\n Dim Ref As MyO...
2008/11/05
[ "https://Stackoverflow.com/questions/264541", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4368/" ]
264,552
<p>I have a big lump of binary data in a char[] array which I need to interpret as an array of packed 6-bit values.</p> <p>I <em>could</em> sit down and write some code to do this but I'm thinking there has to be a good extant class or function somebody has written already.</p> <p>What I need is something like:</p> ...
[ { "answer_id": 264600, "author": "Marco M.", "author_id": 28375, "author_profile": "https://Stackoverflow.com/users/28375", "pm_score": 1, "selected": false, "text": "int get_bit(char *data, unsigned bitoffset) // returns the n-th bit\n{\n int c = (int)(data[bitoffset >> 3]); // X>>3 ...
2008/11/05
[ "https://Stackoverflow.com/questions/264552", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2994/" ]
264,575
<p>Here is my sample code. It is meant to be an iterative procedure for gauss seidel (matrix solver). Essentially when the error is small enough it breaks out of the while loop.</p> <pre><code>i=1 while (i&gt;0): x_past = x_present j=0 while(j&lt;3): value=0 k=0 while(k&lt;3): ...
[ { "answer_id": 264592, "author": "monkut", "author_id": 24718, "author_profile": "https://Stackoverflow.com/users/24718", "pm_score": 6, "selected": true, "text": ">>> x_present = [4,5,6]\n>>>\n>>> x_past = x_present\n>>>\n>>> x_past\n[4, 5, 6]\n>>>\n>>> x_present.append(7)\n>>>\n>>> x_p...
2008/11/05
[ "https://Stackoverflow.com/questions/264575", "https://Stackoverflow.com", "https://Stackoverflow.com/users/338360/" ]
264,578
<p>i.e. as I compose my test suites to include other suites as well as test cases, is there a global count of how many tests the TestRunner has executed, will be executing?</p> <p>Any way I can progammatically access that count?</p>
[ { "answer_id": 265003, "author": "rampion", "author_id": 9859, "author_profile": "https://Stackoverflow.com/users/9859", "pm_score": 2, "selected": false, "text": "self.methods.grep(/test_/)" }, { "answer_id": 2742102, "author": "Andrew Grimm", "author_id": 38765, "au...
2008/11/05
[ "https://Stackoverflow.com/questions/264578", "https://Stackoverflow.com", "https://Stackoverflow.com/users/34594/" ]
264,582
<p>I know there is a <code>WeakHashMap</code> in <code>java.util</code>, but since it uses <code>WeakReference</code>s for everything, which is only referenced by this <code>Map</code>, referenced objects will get lost on the next GC cycle. So it's nearly useless if you want to cache random data, which is very likely t...
[ { "answer_id": 264591, "author": "VonC", "author_id": 6309, "author_profile": "https://Stackoverflow.com/users/6309", "pm_score": 6, "selected": true, "text": "Cache SoftHashMap CacheBuilder.newBuilder().softKeys() SoftHashMap SoftHashMap ConcurrentMap java.util.Timer" }, { "answ...
2008/11/05
[ "https://Stackoverflow.com/questions/264582", "https://Stackoverflow.com", "https://Stackoverflow.com/users/30294/" ]
264,596
<p>I'm trying to deserialize an xml structure that looks like this:</p> <pre><code>&lt;somecontainer&gt; &lt;key1&gt;Value1&lt;/key1&gt; &lt;key1&gt;Value2&lt;/key1&gt; &lt;key2&gt;Value3&lt;/key2&gt; &lt;key2&gt;Value4&lt;/key2&gt; &lt;/somecontainer&gt; </code></pre> <p>I can basically choose what k...
[ { "answer_id": 264591, "author": "VonC", "author_id": 6309, "author_profile": "https://Stackoverflow.com/users/6309", "pm_score": 6, "selected": true, "text": "Cache SoftHashMap CacheBuilder.newBuilder().softKeys() SoftHashMap SoftHashMap ConcurrentMap java.util.Timer" }, { "answ...
2008/11/05
[ "https://Stackoverflow.com/questions/264596", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23691/" ]
264,609
<p>I want to pass a reference type by value to a method in C#. Is there a way to do it.</p> <p>In C++, I could always rely on the copy constructor to come into play if I wanted to pass by Value. Is there any way in C# except: 1. Explicitly creating a new object 2. Implementing IClonable and then calling Clone method.<...
[ { "answer_id": 264613, "author": "Marc Gravell", "author_id": 23354, "author_profile": "https://Stackoverflow.com/users/23354", "pm_score": 4, "selected": false, "text": "ICloneable" }, { "answer_id": 6080403, "author": "Mohsen", "author_id": 514329, "author_profile":...
2008/11/05
[ "https://Stackoverflow.com/questions/264609", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
264,617
<p>A few months ago I was introduced to the new <a href="http://msdn.microsoft.com/library/system.datetimeoffset.aspx" rel="noreferrer"><code>DateTimeOffset</code></a> type and was glad <a href="http://msdn.microsoft.com/library/system.datetime.aspx" rel="noreferrer"><code>DateTime</code></a>'s flaws with regard to tim...
[ { "answer_id": 264643, "author": "Jon Skeet", "author_id": 22656, "author_profile": "https://Stackoverflow.com/users/22656", "pm_score": 7, "selected": true, "text": "DateTimeOffset DateTimeTimeZone DateTimeOffset" }, { "answer_id": 54658746, "author": "brewmanz", "author...
2008/11/05
[ "https://Stackoverflow.com/questions/264617", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4979/" ]
264,623
<p>Throughout or C# sourcecode we have a lot of comments that miss the actual content such like this:</p> <pre><code>/// &lt;summary&gt; /// &lt;/summary&gt; </code></pre> <p>or this:</p> <pre><code>/// &lt;summary&gt; /// /// &lt;/summary&gt; </code></pre> <p>or this:</p> <pre><code>/// &lt;param Name="flag"&gt;&...
[ { "answer_id": 35051409, "author": "ANIL KHANDEI", "author_id": 5686453, "author_profile": "https://Stackoverflow.com/users/5686453", "pm_score": 0, "selected": false, "text": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<xsl:stylesheet version=\"1.0\" xmlns:xsl=\"http://www.w3.org/1999/...
2008/11/05
[ "https://Stackoverflow.com/questions/264623", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4227/" ]
264,625
<p>Does anyone know how to use CruiseControl.Net to publish to an FTP server?</p>
[ { "answer_id": 1656085, "author": "Sergejs Kravcenko", "author_id": 200351, "author_profile": "https://Stackoverflow.com/users/200351", "pm_score": 2, "selected": false, "text": "edtFTPnet.dll" } ]
2008/11/05
[ "https://Stackoverflow.com/questions/264625", "https://Stackoverflow.com", "https://Stackoverflow.com/users/691/" ]
264,626
<p>I can't seem to get Javascript debugging working for my ASP.NET MVC application even though I can for a traditional ASP.NET WebForm app.</p> <p>I have followed the steps for unchecking the 'Disable Script Debugging' boxes for both IE and other.</p> <p>when I add a simple function to display an alert in both the si...
[ { "answer_id": 1189189, "author": "malckier", "author_id": 102265, "author_profile": "https://Stackoverflow.com/users/102265", "pm_score": 1, "selected": false, "text": " <script type=\"text/javascript\" src=\"../../Scripts/DebugJScript.js?<%=DateTime.Now %>\" ></script> \n" }, ...
2008/11/05
[ "https://Stackoverflow.com/questions/264626", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5132/" ]
264,640
<p>I'd like to create a text field with a dropdown list that lets the user choose some predefined values. The user should also be able to type a new value or select a predefined one from a dropdown list. I know that I can use two widgets for that but in my app it would be more ergonomnic if it was unified in a one widg...
[ { "answer_id": 264648, "author": "Treb", "author_id": 22114, "author_profile": "https://Stackoverflow.com/users/22114", "pm_score": 3, "selected": false, "text": "<select> <input type=\"text\"" }, { "answer_id": 17658653, "author": "Alexandru Boerescu", "author_id": 25842...
2008/11/05
[ "https://Stackoverflow.com/questions/264640", "https://Stackoverflow.com", "https://Stackoverflow.com/users/24028/" ]
264,656
<p><code>getopt()</code> is not behaving as I expect for short options.</p> <p>eg: Invoking the below program with a missing parameter:</p> <p>Valid Case: <code>testopt -d dir -a action -b build</code></p> <p>Error Case: <code>testopt -d -a action -b build</code></p> <p>This did not throw any error as I was expecti...
[ { "answer_id": 264665, "author": "unwind", "author_id": 28169, "author_profile": "https://Stackoverflow.com/users/28169", "pm_score": 0, "selected": false, "text": "getopt() ':' '?'" }, { "answer_id": 264684, "author": "qrdl", "author_id": 28494, "author_profile": "ht...
2008/11/05
[ "https://Stackoverflow.com/questions/264656", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18657/" ]
264,668
<p>I had read that SEO is applicable for static website, which holding the information in the initial page itself. Is it possible to get search engines to index the dynamically added information?</p> <p>I used AJAX for loading information. In this situation how can I optimize a site for search engines?</p>
[ { "answer_id": 270887, "author": "Michael Glenn", "author_id": 9424, "author_profile": "https://Stackoverflow.com/users/9424", "pm_score": 0, "selected": false, "text": "<noscript>" }, { "answer_id": 3095701, "author": "llazzaro", "author_id": 127153, "author_profile"...
2008/11/05
[ "https://Stackoverflow.com/questions/264668", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
264,676
<p>Is this possible? I had troubles with SVN clients not being able to access the repository with the following error message:</p> <blockquote> <p>Repository moved permanently to '<a href="http://svn.example.com/test/" rel="noreferrer">http://svn.example.com/test/</a>'; please relocate</p> </blockquote> <p>If I add...
[ { "answer_id": 266987, "author": "Matthew Scharley", "author_id": 15537, "author_profile": "https://Stackoverflow.com/users/15537", "pm_score": 1, "selected": false, "text": "/svn /repository_name # Rewrite / into /svn to avoid errors that seem to occur when using the root\n# for reposit...
2008/11/05
[ "https://Stackoverflow.com/questions/264676", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15537/" ]
264,680
<p>I have a bunch of JUnit 3 classes which extend TestCase and would like to automatically migrate them to be JUnit4 tests with annotations such as <code>@Before</code>, <code>@After</code>, <code>@Test</code>, etc.<br> Any tool out there to do this in a big batch run?</p>
[ { "answer_id": 677356, "author": "guerda", "author_id": 32043, "author_profile": "https://Stackoverflow.com/users/32043", "pm_score": 7, "selected": true, "text": "import org.junit.After;\nimport org.junit.Before;\nimport org.junit.Test;`\n import junit.framework.TestCase; test* public v...
2008/11/05
[ "https://Stackoverflow.com/questions/264680", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6583/" ]
264,681
<p>We have a Java program run as <strong>root</strong> on Unix, that therefore can read for example the content of the folders <code>/home/user1</code> and <code>/home/user2</code>. However, if the Unix user "user1" is logged in in our application, he should not be able to access "/home/user2" data. We would like to u...
[ { "answer_id": 264751, "author": "CesarB", "author_id": 28258, "author_profile": "https://Stackoverflow.com/users/28258", "pm_score": 2, "selected": false, "text": "setfsuid() setfsgid()" }, { "answer_id": 264754, "author": "Alnitak", "author_id": 6782, "author_profil...
2008/11/05
[ "https://Stackoverflow.com/questions/264681", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19281/" ]