qid
int64
4
19.1M
question
stringlengths
18
48.3k
answers
list
date
stringlengths
10
10
metadata
list
218,911
<p>I have the classical table with expandable and collapsible records that if expanded show several subrecords (as new records in the same parent table, not some child div/child table). I am also using tablesorter and absolutely love it.</p> <p>The problem is that tablesorter isn't keeping expanded child records next ...
[ { "answer_id": 222579, "author": "Josh", "author_id": 2204759, "author_profile": "https://Stackoverflow.com/users/2204759", "pm_score": 1, "selected": false, "text": "$(\"tbody tr[class^='parent']\", table).each(function() {\n $(this).after($(\"tbody tr[class^='child\"+$(this).attr(\"cla...
2008/10/20
[ "https://Stackoverflow.com/questions/218911", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2204759/" ]
218,912
<p>Is there a command like <code>cat</code> in linux which can return a specified quantity of characters from a file?</p> <p>e.g., I have a text file like:</p> <pre><code>Hello world this is the second line this is the third line </code></pre> <p>And I want something that would return the first 5 characters, which w...
[ { "answer_id": 218940, "author": "Dan", "author_id": 17121, "author_profile": "https://Stackoverflow.com/users/17121", "pm_score": 9, "selected": true, "text": "head head -c 100 file # returns the first 100 bytes in the file\n head tail tail -c 100 file # returns the last 100 bytes in ...
2008/10/20
[ "https://Stackoverflow.com/questions/218912", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2011/" ]
218,935
<p>I'm pretty sure one would do this using the os.plock(op) function, but I have no idea how. Also, if there's a better way, I'd be grateful to find out. Code snippets are very welcome. </p>
[ { "answer_id": 218943, "author": "Dan Lenski", "author_id": 20789, "author_profile": "https://Stackoverflow.com/users/20789", "pm_score": 3, "selected": false, "text": "popen() subprocess" }, { "answer_id": 218970, "author": "mipadi", "author_id": 28804, "author_profi...
2008/10/20
[ "https://Stackoverflow.com/questions/218935", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
218,969
<p>I have a problem perplexing me to no end. When I run the following query against an access database:</p> <pre><code>SELECT * FROM PreferredSpacer INNER JOIN SpacerThickness ON PreferredSpacer.SpacerTypeID = SpacerThickness.SpacerTypeID ORDER BY PreferredSpacer.UnitTypeID DESC </code></pre> <p>(UnitTypeID field i...
[ { "answer_id": 219061, "author": "David Hay", "author_id": 17784, "author_profile": "https://Stackoverflow.com/users/17784", "pm_score": 0, "selected": false, "text": "SELECT PreferredSpacer.UnitTypeID\nFROM PreferredSpacer, SpacerThickness\nWHERE PreferredSpacer.SpacerTypeID = SpacerThi...
2008/10/20
[ "https://Stackoverflow.com/questions/218969", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17784/" ]
218,987
<p>I want to use Sharepoint with python (C-Python)</p> <p>Has anyone tried this before ?</p>
[ { "answer_id": 222242, "author": "Blauohr", "author_id": 22176, "author_profile": "https://Stackoverflow.com/users/22176", "pm_score": 3, "selected": false, "text": "import sys\n\n# we use suds -> https://fedorahosted.org/suds\nfrom suds import WebFault\nfrom suds.client import *\nimport...
2008/10/20
[ "https://Stackoverflow.com/questions/218987", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22176/" ]
218,988
<p>I am attempting to pass information from a task created within a workflow to its corresponding task form. Prior to the CreateTask activity, I create an SPWorkflowTaskProperties and fill it with the usual info (title, assigned-to, etc). I also add some elements to the ExtendedProperties property. However, those cu...
[ { "answer_id": 580360, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 0, "selected": false, "text": "<z:row xmlns:z=\"#RowsetSchema\" \n ows_Instructions=\"\" \n ows_Body=\"\"\n ows_Comments=\"\"\n ows_ApprovalStatu...
2008/10/20
[ "https://Stackoverflow.com/questions/218988", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5782/" ]
218,989
<p>We have inherited an ant build file but now need to deploy to both 32bit and 64bit systems.</p> <p>The non-Java bits are done with GNUMakefiles where we just call "uname" to get the info. Is there a similar or even easier way to mimic this with ant?</p>
[ { "answer_id": 219032, "author": "matt b", "author_id": 4249, "author_profile": "https://Stackoverflow.com/users/4249", "pm_score": 2, "selected": false, "text": "dist ant -Dbuild.target=32 dist\n ant -Dbuild.target=64 dist\n ${build.target} ${os.arch}" }, { "answer_id": 4709520,...
2008/10/20
[ "https://Stackoverflow.com/questions/218989", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6525/" ]
219,009
<p>If I view the HTML generated by one of my Jasper reports in IE7 I see the following: </p> <pre><code>&lt;BR /&gt;&lt;BR /&gt; &lt;A name="JR_PAGE_ANCHOR_0_1"&gt; &lt;TABLE style="WIDTH: 1000px" cellSpacing="0" cellPadding="0" bgColor="#ffffff" border="0"&gt; &lt;-- table body omitted --&gt; &lt;/TABLE&gt; </code></...
[ { "answer_id": 219119, "author": "PhiLho", "author_id": 15459, "author_profile": "https://Stackoverflow.com/users/15459", "pm_score": 1, "selected": false, "text": "<br /> a" }, { "answer_id": 72798989, "author": "ebey", "author_id": 8712753, "author_profile": "https:...
2008/10/20
[ "https://Stackoverflow.com/questions/219009", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2648/" ]
219,046
<p>I'm trying to construct a query that will include a column indicating whether or not a user has downloaded a document. I have a table called HasDownloaded with the following columns: id, documentID, memberID. Finding out whether a user has downloaded a <em>specific</em> document is easy; but I need to generate a que...
[ { "answer_id": 219053, "author": "matt b", "author_id": 4249, "author_profile": "https://Stackoverflow.com/users/4249", "pm_score": 6, "selected": true, "text": "SELECT Documents.name, HasDownloaded.id FROM Documents\nLEFT JOIN HasDownloaded ON HasDownloaded.documentID = Documents.id \n ...
2008/10/20
[ "https://Stackoverflow.com/questions/219046", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4965/" ]
219,055
<p>I'm trying to get some code working that a previous developer has written. Yep, he now left the company. :-(</p> <p>I have a JSON RPC call being made from the JS code. The JS all runs fine and the callback method gets an object back (not an error object).</p> <p>But the method on the Java class never gets hit. The...
[ { "answer_id": 219095, "author": "matt b", "author_id": 4249, "author_profile": "https://Stackoverflow.com/users/4249", "pm_score": 1, "selected": false, "text": "smd() updateRowValueForField()" }, { "answer_id": 219103, "author": "extraneon", "author_id": 24582, "aut...
2008/10/20
[ "https://Stackoverflow.com/questions/219055", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26778/" ]
219,079
<p>In ActivePerl, "ppm" installs a package from the Internet, "ppm install x.ppd" installs from a ppd file, but most CPAN packages are distributed as <em>.tar.gz</em></p> <p>How do you supply modules to a machine running ActivePerl that doesn't have an Internet connection? ("make" will probably not be available.)</p>...
[ { "answer_id": 219207, "author": "Pat", "author_id": 238, "author_profile": "https://Stackoverflow.com/users/238", "pm_score": 3, "selected": false, "text": "ppm install x.ppd\n" }, { "answer_id": 10831042, "author": "JB.", "author_id": 1214248, "author_profile": "htt...
2008/10/20
[ "https://Stackoverflow.com/questions/219079", "https://Stackoverflow.com", "https://Stackoverflow.com/users/46478/" ]
219,089
<p>I'm looking for an abstract base class or master page solution that will prevent anyone from doing XSRF using both a token and ttl. Can anyone point me in the right direction?</p> <p>Edit: The ideal solution will leverage the cookie that the default membership provider sends down to the client.</p>
[ { "answer_id": 230746, "author": "Toran Billups", "author_id": 2701, "author_profile": "https://Stackoverflow.com/users/2701", "pm_score": 0, "selected": false, "text": " public class PreventXSRF : MasterPage\n {\n\n HttpCookie mCookie = null;\n FormsAuthenticationTicket mPreviou...
2008/10/20
[ "https://Stackoverflow.com/questions/219089", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2701/" ]
219,096
<p>When my application opens too many windows the taskbar groups them into one button. Each window has its own icon, but the grouping icon is the default "unknown"-kind icon.</p> <p>How can I set the grouping icon?</p>
[ { "answer_id": 219128, "author": "Tomalak", "author_id": 18771, "author_profile": "https://Stackoverflow.com/users/18771", "pm_score": 2, "selected": false, "text": "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Classes\\Applications\\explorer.exe]\n\"TaskbarGroupIcon\"=\"C:\\Windows\\Explorer.exe,13\"...
2008/10/20
[ "https://Stackoverflow.com/questions/219096", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23372/" ]
219,109
<p>Obviously I could create a <code>Calendar</code> object with the date and use <code>get(DAY)</code> on it, but knowing Groovy, I would guess there is an easier, quicker way I just don't know about?</p> <p><strong>Answer</strong></p> <pre><code>(date1..date2).size() == 1 // true if two dates are on same calendar da...
[ { "answer_id": 219133, "author": "Ruben", "author_id": 26919, "author_profile": "https://Stackoverflow.com/users/26919", "pm_score": 4, "selected": true, "text": "def today = new Date()\ndef yesterday = today-1\nassert (yesterday..today).size() == 2\n" }, { "answer_id": 35921172,...
2008/10/20
[ "https://Stackoverflow.com/questions/219109", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6583/" ]
219,110
<p>I have a <a href="http://en.wikipedia.org/wiki/Bluehost" rel="noreferrer">Bluehost</a> account where I can run Python scripts as CGI. I guess it's the simplest CGI, because to run I have to define the following in <code>.htaccess</code>:</p> <pre><code>Options +ExecCGI AddType text/html py AddHandler cgi-script .py...
[ { "answer_id": 505534, "author": "James Brady", "author_id": 29903, "author_profile": "https://Stackoverflow.com/users/29903", "pm_score": 6, "selected": false, "text": "def simple_app(environ, start_response):\n \"\"\"Simplest possible application object\"\"\"\n status = '200 OK'\...
2008/10/20
[ "https://Stackoverflow.com/questions/219110", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8206/" ]
219,120
<p>I'm working on keyboard input for a very basic kernel that I'm developing and I'm completely stuck. I can't seem to find any information online that can show me the information I need to know.</p> <p>My kernel is running in protected mode right now, so I can't use the real mode keyboard routines without jumping int...
[ { "answer_id": 33234973, "author": "Ciro Santilli OurBigBook.com", "author_id": 895245, "author_profile": "https://Stackoverflow.com/users/895245", "pm_score": 1, "selected": false, "text": "sudo apt-get install build-essential qemu\nsudo ln -s /usr/bin/qemu-system-i386 /usr/bin/qemu\ngi...
2008/10/20
[ "https://Stackoverflow.com/questions/219120", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19521/" ]
219,135
<p>I have been reading carefully through the mediawiki documentation but I have not been able to find out how to create new groups. </p> <p>When I look at Special:Userrights, I see only 3 groups : Bots, Sysops, Bureaycrats</p> <p>I would like to create my own custom groups, so I can use some extensions like the <a h...
[ { "answer_id": 219213, "author": "jeph perro", "author_id": 28351, "author_profile": "https://Stackoverflow.com/users/28351", "pm_score": 1, "selected": false, "text": "$wgGroupPermissions['TomatoUsers']['read'] = true;\n$wgGroupPermissions['TomatoUsers']['edit'] = false;\n" }, { ...
2008/10/20
[ "https://Stackoverflow.com/questions/219135", "https://Stackoverflow.com", "https://Stackoverflow.com/users/28351/" ]
219,138
<p>I need to run a Linux CLI command and get its stdout output from C.</p> <p>I can use pipe() to create a pipe, then fork/exec, redirecting child's stdout descriptor into the pipe before calling exec(), and reading from the pipe in parent. Plus I'll need to wait on the child.</p> <p>Is there a simple call to do fork...
[ { "answer_id": 219150, "author": "dmckee --- ex-moderator kitten", "author_id": 2509, "author_profile": "https://Stackoverflow.com/users/2509", "pm_score": 1, "selected": false, "text": "popen() pclose() popen() pclose()" }, { "answer_id": 219709, "author": "humble_guru", ...
2008/10/20
[ "https://Stackoverflow.com/questions/219138", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23420/" ]
219,139
<p>I'm trying to use stl algorithm for_each without proliferating templates throughout my code. std::for_each wants to instantiate MyFunctor class by value, but it can't since its abstract. I've created a functor adapter class which passes a pointer around and then derefernces it when appropriate.</p> <p>My Question: ...
[ { "answer_id": 219199, "author": "xtofl", "author_id": 6610, "author_profile": "https://Stackoverflow.com/users/6610", "pm_score": 3, "selected": false, "text": "functional #include <functional>\n\nusing namespace std;\nfor_each( vec.begin(), vec.end(), :mem_fun_ptr( &MyClass::f ) );\n m...
2008/10/20
[ "https://Stackoverflow.com/questions/219139", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1575281/" ]
219,151
<p>I want to create a WCF-service hosted in IIS6 and disable anonymous authentication in IIS. And don't use SSL.</p> <p>So only way I have is to use basicHttpBinging with <code>TransportCredentialOnly</code>, itsn't it?</p> <p>I create a virtual directory, set Windows Integrated Auth and uncheck "Enable Anonymous Acc...
[ { "answer_id": 219270, "author": "Sixto Saez", "author_id": 9711, "author_profile": "https://Stackoverflow.com/users/9711", "pm_score": 3, "selected": false, "text": "<services>\n <!-- Note: the service name must match the configuration name for the service implementation. -->\n <s...
2008/10/20
[ "https://Stackoverflow.com/questions/219151", "https://Stackoverflow.com", "https://Stackoverflow.com/users/27703/" ]
219,168
<p><a href="http://en.wikipedia.org/wiki/Literate_programming" rel="noreferrer">Literate programming</a> is a way of developing software where documentation comes first, then the coding. One writes the documentation of a code snippet, and then writes the implementation of the snippet. The visual appearance of the softw...
[ { "answer_id": 33870729, "author": "user5595141", "author_id": 5595141, "author_profile": "https://Stackoverflow.com/users/5595141", "pm_score": 1, "selected": false, "text": "% /* begin of literate program \n\\documentstyle{article}\n\\usepackage{listings}\n\n\\lstdefinitions here I do ...
2008/10/20
[ "https://Stackoverflow.com/questions/219168", "https://Stackoverflow.com", "https://Stackoverflow.com/users/29688/" ]
219,219
<p>Is it possible to to change a <code>&lt;span&gt;</code> tag (or <code>&lt;div&gt;</code>) to preformat its contents like a <code>&lt;pre&gt;</code> tag would using only CSS?</p>
[ { "answer_id": 219230, "author": "Diodeus - James MacFarlane", "author_id": 12579, "author_profile": "https://Stackoverflow.com/users/12579", "pm_score": 9, "selected": true, "text": "pre {\n display: block;\n unicode-bidi: embed;\n font-family: monospace;\n white-space: pre;...
2008/10/20
[ "https://Stackoverflow.com/questions/219219", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1432/" ]
219,226
<p>Recently I have been studying recursion; how to write it, analyze it, etc. I have thought for a while that recurrence and recursion were the same thing, but some problems on recent homework assignments and quizzes have me thinking there are slight differences, that 'recurrence' is the way to describe a recursive pro...
[ { "answer_id": 219238, "author": "David Koelle", "author_id": 2197, "author_profile": "https://Stackoverflow.com/users/2197", "pm_score": 1, "selected": false, "text": "function r(int n) \n{\n if (n == 2) return 1;\n if (n == 1) return 1;\n return 2 * r(n-2) + r(n-1); // I guess we'r...
2008/10/20
[ "https://Stackoverflow.com/questions/219226", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23323/" ]
219,243
<pre><code>function Submit_click() { if (!bValidateFields()) return; } function bValidateFields() { /// &lt;summary&gt;Validation rules&lt;/summary&gt; /// &lt;returns&gt;Boolean&lt;/returns&gt; ... } </code></pre> <p>So, when I type the call to my bValidateFields() function intellisence in Visual Studio doesn'...
[ { "answer_id": 219279, "author": "SaaS Developer", "author_id": 7215, "author_profile": "https://Stackoverflow.com/users/7215", "pm_score": 0, "selected": false, "text": "/// <reference>" } ]
2008/10/20
[ "https://Stackoverflow.com/questions/219243", "https://Stackoverflow.com", "https://Stackoverflow.com/users/28098/" ]
219,245
<p>I'm looking for a way to transform a genuine string into it's hexadecimal value in SQL. I'm looking something that is Informix-friendly but I would obviously prefer something database-neutral </p> <p>Here is the select I am using now:</p> <pre><code>SELECT SomeStringColumn from SomeTable </code></pre> <p>Here is ...
[ { "answer_id": 219310, "author": "stephenbayer", "author_id": 18893, "author_profile": "https://Stackoverflow.com/users/18893", "pm_score": 4, "selected": false, "text": "SELECT master.dbo.fn_varbintohexstr(CAST(SomeStringColumn AS varbinary)) \nFROM SomeTable\n SELECT master.dbo.fn_...
2008/10/20
[ "https://Stackoverflow.com/questions/219245", "https://Stackoverflow.com", "https://Stackoverflow.com/users/244/" ]
219,285
<p>Nowadays, we have tons of Javascript libraries per page in addition to the Javascript files we write ourselves. How do you manage them all? How do you minify them in an organized way? </p>
[ { "answer_id": 219333, "author": "pkaeding", "author_id": 4257, "author_profile": "https://Stackoverflow.com/users/4257", "pm_score": 1, "selected": false, "text": "/\n+--/javascript/\n +-- lib/\n +-- admin/\n +-- compnent1/\n +-- compnent2/\n" }, { "answer_id": 21934...
2008/10/20
[ "https://Stackoverflow.com/questions/219285", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10352/" ]
219,323
<p>Here is a stripped down version of what I use to authenticate users, it works fine on my PHP v5.0.2/MySQL 4.0.21 server, but fails on my PHP v5.1.6/MySQL v5.0.45 server.</p> <p>In the code below, should I be aware of anything that might not be supported by the newer version of PHP &amp; MySQL? Global variables have...
[ { "answer_id": 219341, "author": "changelog", "author_id": 5646, "author_profile": "https://Stackoverflow.com/users/5646", "pm_score": 3, "selected": true, "text": "$HTTP_POST_VARS $_POST <?php // Enable displaying errors\nerror_reporting(E_ALL);\nini_set('display_errors', '1');\n" } ]
2008/10/20
[ "https://Stackoverflow.com/questions/219323", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26130/" ]
219,329
<p>I have inherited a django+fastcgi application which needs to be modified to perform a lengthy computation (up to half an hour or more). What I want to do is run the computation in the background and return a "your job has been started" -type response. While the process is running, further hits to the url should retu...
[ { "answer_id": 397968, "author": "sastanin", "author_id": 25450, "author_profile": "https://Stackoverflow.com/users/25450", "pm_score": 2, "selected": false, "text": "myjob.py import sys\nfrom time import sleep\n\ni = 0\nwhile i < 1000:\n print 'myjob:', i \n i=i+1\n sleep(0.1)...
2008/10/20
[ "https://Stackoverflow.com/questions/219329", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
219,338
<p>I'm using JQuery's jquery.corner.js to create rounded corners on some td tags, and they look fine in IE EXCEPT </p> <ol> <li>if you open a new tab and then come back to the page</li> <li>if you go to another tab, click a link, then come back to the page</li> <li>if you hover over a javascript-executing div / menu (...
[ { "answer_id": 950410, "author": "Kris", "author_id": 22237, "author_profile": "https://Stackoverflow.com/users/22237", "pm_score": 0, "selected": false, "text": "$('.selected').css('background-color', '#3296C0');\n $('#top-nav li a').hover(function(){\n $(this).corners('top');\n...
2008/10/20
[ "https://Stackoverflow.com/questions/219338", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1943/" ]
219,360
<p>I've got a unfinished project that a developer just didn't finish and didn't leave any documentation about the installation process. I've downloaded the production directory to my windows machine (running InstantRails 2), I created the databases as required in the <code>database.yml</code> and I tried to run the <co...
[ { "answer_id": 219383, "author": "Chris Bunch", "author_id": 422, "author_profile": "https://Stackoverflow.com/users/422", "pm_score": 1, "selected": false, "text": "uninitialized constant Admin" }, { "answer_id": 219397, "author": "Luke Francl", "author_id": 17965, "...
2008/10/20
[ "https://Stackoverflow.com/questions/219360", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18642/" ]
219,368
<p>I got a little problem I can't figure out. I have a server side MarshalByRefObject that I'm trying to wrap a transparent proxy around on the client side. Here's the setup:</p> <pre><code>public class ClientProgram { public static void Main( string[] args ) { ITest test = (ITest)Activator.GetObject( type...
[ { "answer_id": 219442, "author": "bh213", "author_id": 28912, "author_profile": "https://Stackoverflow.com/users/28912", "pm_score": 0, "selected": false, "text": "ITest test = (ITest)Activator.GetObject( typeof( ITest ), \"http://127.0.0.1:8765/Test.rem\" );\nRealProxy p2 = RemotingServ...
2008/10/20
[ "https://Stackoverflow.com/questions/219368", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
219,369
<p>I want to display some WPF elements near to the selected item of a ListView. How can I obtain the coordinates (screen or relative) of the selected ListViewItem? </p> <pre><code>&lt;ListView x:Name="TechSchoolListView" ClipToBounds="False" Width="Auto" Height="Auto" HorizontalContentAlignment="Stre...
[ { "answer_id": 219450, "author": "ChaosSpeeder", "author_id": 205962, "author_profile": "https://Stackoverflow.com/users/205962", "pm_score": 2, "selected": false, "text": " UIElement selectedContainer = (UIElement) TechSchoolListView.ItemContainerGenerator.ContainerFromIndex(Tech...
2008/10/20
[ "https://Stackoverflow.com/questions/219369", "https://Stackoverflow.com", "https://Stackoverflow.com/users/205962/" ]
219,381
<p>I'm in the process of refactoring a project. I've got an entire subfolder which is known to be broken. Is there any declarative way to exclude that folder from the compile temporarily while I test the refactoring thus far?</p> <p>I realize I could delete the folder, but I'd like to do this through configuration i...
[ { "answer_id": 21044137, "author": "L.Barral", "author_id": 3004607, "author_profile": "https://Stackoverflow.com/users/3004607", "pm_score": 3, "selected": false, "text": "<PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \"> <ExcludeFoldersFromDeployment>Fold...
2008/10/20
[ "https://Stackoverflow.com/questions/219381", "https://Stackoverflow.com", "https://Stackoverflow.com/users/337/" ]
219,396
<p>I'm writing a mobile content adaptation plugin for a bespoke CMS in PHP. The CMS contains <code>&lt;img/&gt;</code> links to images with absolute URLs which are all 400 pixels wide and vary in height.</p> <p>I'd like to parse the HTML (which is stored in MySQL) and re-scale each image to a new width - this will var...
[ { "answer_id": 219407, "author": "Owen", "author_id": 4853, "author_profile": "https://Stackoverflow.com/users/4853", "pm_score": 2, "selected": false, "text": "<img src=\"/images/image.php?height=200&width=200&source=filename.jpg\" />\n" } ]
2008/10/20
[ "https://Stackoverflow.com/questions/219396", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
219,402
<p>I want to find a linux command that can return a part of the string. In most programming languages, it's the <code>substr()</code> function. Does bash have any command that can be used for this purpose. I want to be able to do something like this... <code>substr "abcdefg" 2 3</code> - prints <code>cde</code>.</p> <...
[ { "answer_id": 219409, "author": "dmckee --- ex-moderator kitten", "author_id": 2509, "author_profile": "https://Stackoverflow.com/users/2509", "pm_score": 7, "selected": false, "text": "${parameter:offset}\n${parameter:offset:length}\n Substring Expansion. Expands to up to ...
2008/10/20
[ "https://Stackoverflow.com/questions/219402", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15595/" ]
219,420
<p>Working through some programming interview challenges I found online, I had to write an algorithm to reverse a const char * and return a pointer to a new char *. I think I have it, but to make it work properly I had to do some wonky stuff - basically having to account for the null-terminating character myself. Someh...
[ { "answer_id": 219432, "author": "nsayer", "author_id": 13757, "author_profile": "https://Stackoverflow.com/users/13757", "pm_score": 4, "selected": false, "text": "int length = strlen(string);\nfor(int i = 0; i < length/2; i++) {\n char c = string[i];\n string[i] = string[length - i];...
2008/10/20
[ "https://Stackoverflow.com/questions/219420", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
219,425
<p>Is contract to interface as object is to class?</p> <p>What is the need to differentiate identical things like this, from the code to the executing code? I sort of get the idea behind naming a class a class and the instantiated executing class an object, but overall, is that the only reason for these semi-redundan...
[ { "answer_id": 219493, "author": "Bill the Lizard", "author_id": 1288, "author_profile": "https://Stackoverflow.com/users/1288", "pm_score": 3, "selected": false, "text": "int" } ]
2008/10/20
[ "https://Stackoverflow.com/questions/219425", "https://Stackoverflow.com", "https://Stackoverflow.com/users/29345/" ]
219,431
<p>during beta testing we discovered connection pooling error messages . Therefore I have been going through the code and closing down the SqlDataReader objects wherever they have been left unclosed. What I need to know is how to close a datareader (or if there is a need at all to close) that is specified in the Select...
[ { "answer_id": 219490, "author": "John Rudy", "author_id": 14048, "author_profile": "https://Stackoverflow.com/users/14048", "pm_score": 2, "selected": false, "text": "SqlDataSource ObjectDataSource Close() using ObjectDataSource" }, { "answer_id": 220046, "author": "tvanfoss...
2008/10/20
[ "https://Stackoverflow.com/questions/219431", "https://Stackoverflow.com", "https://Stackoverflow.com/users/262613/" ]
219,434
<p>What query can return the names of all the stored procedures in a SQL Server database</p> <p>If the query could exclude system stored procedures, that would be even more helpful.</p>
[ { "answer_id": 219440, "author": "Bob Probst", "author_id": 12424, "author_profile": "https://Stackoverflow.com/users/12424", "pm_score": 1, "selected": false, "text": "select * \n from dbo.sysobjects\n where xtype = 'P'\n and status > 0\n" }, { "answer_id": 219441, "auth...
2008/10/20
[ "https://Stackoverflow.com/questions/219434", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
219,470
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="https://stackoverflow.com/questions/53629/history-of-changes-to-a-particular-line-of-code-in-subversion">History of changes to a particular line of code in Subversion?</a> </p> </blockquote> <p>Using SVN and/or Tortoise SVN (or any other SVN tool...
[ { "answer_id": 219471, "author": "Menkboy", "author_id": 29539, "author_profile": "https://Stackoverflow.com/users/29539", "pm_score": 1, "selected": true, "text": "svn blame" }, { "answer_id": 219513, "author": "heckj", "author_id": 19477, "author_profile": "https://...
2008/10/20
[ "https://Stackoverflow.com/questions/219470", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16911/" ]
219,475
<p>I'm working with a client that needs to generate millions of the alphanumeric codes used in magazine scratch-off cards, bottlecap prizes, and so on. They have to be short enough to print on a cap, they want to make sure that ambiguous characters like 1 and I, 0 and O, etc. are not included, and they have to be expli...
[ { "answer_id": 219557, "author": "ojrac", "author_id": 20760, "author_profile": "https://Stackoverflow.com/users/20760", "pm_score": 5, "selected": true, "text": "$last = null;\nwhile ($current = getnext()) {\n if ($last == $current) {\n push($toDelete, $current);\n }\n $...
2008/10/20
[ "https://Stackoverflow.com/questions/219475", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19411/" ]
219,482
<p>If anyone has experience using Oracle text (<code>CTXSYS.CONTEXT</code>), I'm wondering how to handle user input when the user wants to search for names that may contain an apostrophe.</p> <p>Escaping the ' seems to work in some cases, but not for 's at the end of the word - s is in the list of stop words, and so s...
[ { "answer_id": 41787290, "author": "Dima Korobskiy", "author_id": 534217, "author_profile": "https://Stackoverflow.com/users/534217", "pm_score": 1, "selected": false, "text": "PARAMETERS('STOPLIST ctxsys.empty_stoplist') \\ {input}" } ]
2008/10/20
[ "https://Stackoverflow.com/questions/219482", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4782/" ]
219,519
<p>What I'm looking for is a basic equivalent of JavaScript's <code>Array::join()</code> whereby you pass in a separator character and uses that in its return string of all the subscripts. I could certainly write my own function using a <code>StringBuilder</code> or whatnot, but there <em>must</em> be something built ...
[ { "answer_id": 219521, "author": "Joel Coehoorn", "author_id": 3043, "author_profile": "https://Stackoverflow.com/users/3043", "pm_score": 3, "selected": true, "text": "String.Join() char sep = GetSeparatorChar();\nobject[] toJoin = GetToJoin();\nstring joined = toJoin.Aggregate((x,y) =>...
2008/10/20
[ "https://Stackoverflow.com/questions/219519", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9642/" ]
219,525
<p>I remember working on a project with a group of developers and they always wanted static html text to be inside of an out tag (<code>&lt;c:out value="words" /&gt;</code>). I don't remember why this was the case.</p> <p>Is this really a best practice when building jsp pages? What are the advantages/disadvantages...
[ { "answer_id": 219546, "author": "Bill the Lizard", "author_id": 1288, "author_profile": "https://Stackoverflow.com/users/1288", "pm_score": 2, "selected": false, "text": "c:out <c:out value=\"Hello ${user.firstName} ${user.lastName}\"/>\n" }, { "answer_id": 219657, "author":...
2008/10/20
[ "https://Stackoverflow.com/questions/219525", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17337/" ]
219,530
<p>I've been searching around and haven't found any reference to tools that can create Safari's webarchive format.</p> <p>Does anyone have pointers to code for creating this format, or at least a format reference documentation?</p> <p>Ideally I'd like to build a tool that takes a directory and splits out a webarchive...
[ { "answer_id": 238676, "author": "Sören Kuklau", "author_id": 1600, "author_profile": "https://Stackoverflow.com/users/1600", "pm_score": 4, "selected": true, "text": ".webarchive Mac-PropertyList" }, { "answer_id": 3334276, "author": "Ortwin Gentz", "author_id": 235297, ...
2008/10/20
[ "https://Stackoverflow.com/questions/219530", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2846/" ]
219,547
<p>I have a python script that is a http-server: <a href="http://paste2.org/p/89701" rel="nofollow noreferrer">http://paste2.org/p/89701</a>, when benchmarking it against ApacheBench (ab) with a concurrency level (-c switch) that is lower then or equal to the value i specified in the socket.listen()-call in the sourcec...
[ { "answer_id": 219671, "author": "Florian Bösch", "author_id": 19435, "author_profile": "https://Stackoverflow.com/users/19435", "pm_score": 4, "selected": true, "text": "import thread, socket, Queue\n\nconnections = Queue.Queue()\nnum_threads = 10\nbacklog = 10\n\ndef request():\n wh...
2008/10/20
[ "https://Stackoverflow.com/questions/219547", "https://Stackoverflow.com", "https://Stackoverflow.com/users/452521/" ]
219,559
<p>I have a table of data, and I allow people to add meta data to that table.</p> <p>I give them an interface that allows them to treat it as though they're adding extra columns to the table their data is stored in, but I'm actually storing the data in another table.</p> <pre><code>Data Table DataID Data Meta ...
[ { "answer_id": 219578, "author": "Bill the Lizard", "author_id": 1288, "author_profile": "https://Stackoverflow.com/users/1288", "pm_score": 1, "selected": false, "text": "SELECT DataTable.Data AS Data, MetaTable.MetaData AS Date, MetaTable.MetaName AS Name\nFROM DataTable, MetaTable\nWH...
2008/10/20
[ "https://Stackoverflow.com/questions/219559", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2915/" ]
219,569
<p>I need to store a url in a MySQL table. What's the best practice for defining a field that will hold a URL with an undetermined length?</p>
[ { "answer_id": 219579, "author": "Daniel Spiewak", "author_id": 9815, "author_profile": "https://Stackoverflow.com/users/9815", "pm_score": 5, "selected": false, "text": "VARCHAR(512) TEXT CLOB VARCHAR" }, { "answer_id": 219582, "author": "Bob Probst", "author_id": 12424,...
2008/10/20
[ "https://Stackoverflow.com/questions/219569", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22325/" ]
219,570
<p>I was asked for a comprehensive breakdown on space used within a specific database. I know I can use <em>sys.dm_db_partition_stats</em> in SQL Server 2005 to figure out how much space each <em>table</em> in a database is using, but is there any way to determine the individual and total size of the <em>stored proced...
[ { "answer_id": 219675, "author": "Bob Probst", "author_id": 12424, "author_profile": "https://Stackoverflow.com/users/12424", "pm_score": 2, "selected": false, "text": "--create a temp table to hold the data\ncreate table ##sptext (sptext varchar(1000))\ngo\n\n--generate the code to inse...
2008/10/20
[ "https://Stackoverflow.com/questions/219570", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21398/" ]
219,581
<p>I'm looking to add a tooltip to each row in a bound datagrid in vb.net winforms. How can this be done?</p>
[ { "answer_id": 219771, "author": "Ricardo Villamil", "author_id": 19314, "author_profile": "https://Stackoverflow.com/users/19314", "pm_score": 2, "selected": true, "text": "System.Windows.Forms.ToolTip formToolTip = new System.Windows.Forms.ToolTip();\nformToolTip .SetToolTip(item, \"Ro...
2008/10/20
[ "https://Stackoverflow.com/questions/219581", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3259/" ]
219,585
<p>Is there a way to include all the jar files within a directory in the classpath?</p> <p>I'm trying <code>java -classpath lib/*.jar:. my.package.Program</code> and it is not able to find class files that are certainly in those jars. Do I need to add each jar file to the classpath separately? </p>
[ { "answer_id": 219663, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 3, "selected": false, "text": "<path id=\"base.class.path\">\n <pathelement path=\"${resources.dir}\"/>\n <fileset dir=\"${extensions.dir}\" includes=\...
2008/10/20
[ "https://Stackoverflow.com/questions/219585", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13435/" ]
219,590
<p>What is the best way to localize a collection (IEnumerable)? From the BL I retrieve a collection of entities which still need to localized, I figured I write a method which extends the IEnumerable and returns the localized list. </p> <p>How can i get the code underneath working? Any ideas? Maybe better options? ...
[ { "answer_id": 219611, "author": "Darren Kopp", "author_id": 77, "author_profile": "https://Stackoverflow.com/users/77", "pm_score": 2, "selected": false, "text": "public static IEnumerable<string> Localize(this IEnumerable<string> items, CultureInfo culture)\n{\n foreach (string item...
2008/10/20
[ "https://Stackoverflow.com/questions/219590", "https://Stackoverflow.com", "https://Stackoverflow.com/users/27857/" ]
219,594
<p>I'm wondering what the best way is to have a "if all else fails catch it".</p> <p>I mean, you're handling as much exceptions as possible in your application, but still there are bound to be bugs, so I need to have something that catches all unhandled exceptions so I can collect information and store them in a datab...
[ { "answer_id": 219607, "author": "ine", "author_id": 4965, "author_profile": "https://Stackoverflow.com/users/4965", "pm_score": 4, "selected": false, "text": "Application_Error Global.asax MyApplication_UnhandledException ApplicationEvents" }, { "answer_id": 219703, "author"...
2008/10/20
[ "https://Stackoverflow.com/questions/219594", "https://Stackoverflow.com", "https://Stackoverflow.com/users/28149/" ]
219,604
<p>How would you convert a parapraph to hex notation, and then back again into its original string form?</p> <p>(C#)</p> <p>A side note: would putting the string into hex format shrink it the most w/o getting into hardcore shrinking algo's?</p>
[ { "answer_id": 219619, "author": "Corey Goldberg", "author_id": 16148, "author_profile": "https://Stackoverflow.com/users/16148", "pm_score": 1, "selected": false, "text": "public string ConvertToHex(string asciiString)\n{\n string hex = \"\";\n foreach (char c in asciiString)\n ...
2008/10/20
[ "https://Stackoverflow.com/questions/219604", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
219,628
<p>I used to have a custom preferences class for my applications. For my next hobby project i wanted to switch to the Preferences API. But the put and get functions require a default value and i do not want to spread default values all over the source files. Even though my project is small i can not imagine changing de...
[ { "answer_id": 8429583, "author": "Kareem", "author_id": 1087529, "author_profile": "https://Stackoverflow.com/users/1087529", "pm_score": 2, "selected": false, "text": "AbstractPreferences" } ]
2008/10/20
[ "https://Stackoverflow.com/questions/219628", "https://Stackoverflow.com", "https://Stackoverflow.com/users/29742/" ]
219,637
<p>The code is,</p> <pre><code>set VAR=before if "%VAR%" == "before" ( set VAR=after; echo %VAR% ) </code></pre> <p>What will the preceding Windows .bat file code segment display? Why? (i.e. why doesn't it behave as you might first think)?</p>
[ { "answer_id": 219658, "author": "Sean Sexton", "author_id": 22357, "author_profile": "https://Stackoverflow.com/users/22357", "pm_score": 3, "selected": true, "text": "set VAR=before\n\nif \"%VAR%\" == \"before\" (\n\n set VAR=after;\n\n echo !VAR!\n\n)\n" }, { "answer_id": 21...
2008/10/20
[ "https://Stackoverflow.com/questions/219637", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22357/" ]
219,668
<p>I'm looking for best practices to integrate log4net to SharePoint for web request, feature activation and all timer stuff. </p> <p>I have several subprojects in my farm, and I would like to have only one Log4Net.config file.</p> <p><strong>[Edit]</strong><br> Not only I need to configure log4net for the web appli...
[ { "answer_id": 222646, "author": "Alex Angas", "author_id": 6651, "author_profile": "https://Stackoverflow.com/users/6651", "pm_score": 1, "selected": false, "text": "<configuration ...>\n ...\n <configSections>\n <section name=\"log4net\" type=\"log4net.Config.Log4NetConfigurationS...
2008/10/20
[ "https://Stackoverflow.com/questions/219668", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22970/" ]
219,684
<p>Could someone please explain the best way to connect to an Interbase 7.1 database using .NET/C#?</p> <p>The application will be installed on many end user computers so the less "add-ons" that I will have to package with my application the better.</p>
[ { "answer_id": 26587576, "author": "Rick cf", "author_id": 2320107, "author_profile": "https://Stackoverflow.com/users/2320107", "pm_score": 0, "selected": false, "text": "connectionstring1 = \"DriverName=Interbase;Database=\" + database + \";User_Name=\" + userid + \";Password=\" + pass...
2008/10/20
[ "https://Stackoverflow.com/questions/219684", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
219,716
<p>A cross join performs a cartesian product on the tuples of the two sets.</p> <pre><code>SELECT * FROM Table1 CROSS JOIN Table2 </code></pre> <p>Which circumstances render such an SQL operation particularly useful?</p>
[ { "answer_id": 219758, "author": "Dave DuPlantis", "author_id": 8174, "author_profile": "https://Stackoverflow.com/users/8174", "pm_score": 8, "selected": true, "text": "select \n size,\n color\nfrom\n sizes CROSS JOIN colors\n select\n hour,\n minute\nfrom\n hours CROS...
2008/10/20
[ "https://Stackoverflow.com/questions/219716", "https://Stackoverflow.com", "https://Stackoverflow.com/users/27765/" ]
219,719
<p>SQL databases seem to be the cornerstone of most software. However, it seems optimized for textual data. In fact when doing any queries involving numerical data, integers specifically, it seems inefficient that the numbers are getting converted to text and then back to native formats both ways between the applicatio...
[ { "answer_id": 219750, "author": "Lou Franco", "author_id": 3937, "author_profile": "https://Stackoverflow.com/users/3937", "pm_score": 1, "selected": false, "text": "stmt = conn.Prepare(\"SELECT * FROM TABLE where x in (?, ?, ?)\");\nstmt.SetInt(0, x);\nstmt.SetInt(1, y);\nstmt.SetInt(2...
2008/10/20
[ "https://Stackoverflow.com/questions/219719", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1892/" ]
219,770
<p>In Visual Studio, I often use objects only for RAII purposes. For example:</p> <pre><code>ScopeGuard close_guard = MakeGuard( &amp;close_file, file ); </code></pre> <p>The whole purpose of <em>close_guard</em> is to make sure that the file will be close on function exit, it is not used anywhere else. However, Vi...
[ { "answer_id": 219791, "author": "Jorge Ferreira", "author_id": 6508, "author_profile": "https://Stackoverflow.com/users/6508", "pm_score": 4, "selected": true, "text": "#pragma warning #pragma warning #pragma warning( push )\n#pragma warning( disable : 4705 ) // replace 4705 with warnin...
2008/10/20
[ "https://Stackoverflow.com/questions/219770", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9936/" ]
219,776
<p>I wanna get the Timedate value from another page using request.querystring and then use it an query to compare and pull up the matching datas. The function for the query in linq is:</p> <pre><code> protected void User_Querytime() { DataClasses2DataContext dc1 = new DataClasses2DataContext(); String D...
[ { "answer_id": 219805, "author": "Marc Gravell", "author_id": 23354, "author_profile": "https://Stackoverflow.com/users/23354", "pm_score": 2, "selected": true, "text": "DateTime when = DateTime.Parse(data);\nDateTime when = DateTime.ParseExact(data);\nDateTime when = Convert.ToDateTime(...
2008/10/20
[ "https://Stackoverflow.com/questions/219776", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
219,783
<p>I can't seems to change the default color of the required field validator. In the source it is:</p> <pre><code>&lt;span class="required"&gt;*&lt;/span&gt; &lt;asp:RequiredFieldValidator ID="valReq_txtTracks" runat="server" ControlToValidate="txtTracks" Display="Dynamic" /&gt; </code></pre> <p>Here's what ...
[ { "answer_id": 219794, "author": "mohammedn", "author_id": 29268, "author_profile": "https://Stackoverflow.com/users/29268", "pm_score": 2, "selected": false, "text": "<asp:RequiredFieldValidator runat=\"server\" \n CssClass=\"error-text\"\n style=\"\"\n ErrorMessage=\"required\...
2008/10/20
[ "https://Stackoverflow.com/questions/219783", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12252/" ]
219,788
<p>I have a large (700kb) Flex .swf file representing the main file of a site. </p> <p>For performance testing I wanted to try and move it off to Amazon S3 hosting (which i have already done with certain videos and large files). </p> <p>I went ahead and did that, and updated the html page to reference the remote .swf...
[ { "answer_id": 220518, "author": "fenomas", "author_id": 10651, "author_profile": "https://Stackoverflow.com/users/10651", "pm_score": 0, "selected": false, "text": "base base base flashvars" }, { "answer_id": 221028, "author": "grapefrukt", "author_id": 914, "author_...
2008/10/20
[ "https://Stackoverflow.com/questions/219788", "https://Stackoverflow.com", "https://Stackoverflow.com/users/24727/" ]
219,798
<h2>I'm looking to add some lookup lists in the database, but I want them to be easy localizable (SQL 2005, ADO.NET)</h2> <p>This would include:</p> <ul> <li>Easy Management of multiple languages at the same time</li> <li>Easy Retrieval of values from the database</li> <li>Fallback language (in case the selected lang...
[ { "answer_id": 219871, "author": "Diodeus - James MacFarlane", "author_id": 12579, "author_profile": "https://Stackoverflow.com/users/12579", "pm_score": 2, "selected": false, "text": "MessageToken DisplayText LangCode\nfirewood Fire wood en\nfirewood Bois ...
2008/10/20
[ "https://Stackoverflow.com/questions/219798", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23795/" ]
219,808
<p>I am completely new to LINQ in C#/.NET. I understand that I could use it to convert a DataSet into an Array/List, am I able to go in the opposite direction?</p> <p>I'm using NPlot to generate a graph of captured prices, which are stored in a List, where PriceInformation is a class containing two public doubles and...
[ { "answer_id": 219877, "author": "Amy B", "author_id": 8155, "author_profile": "https://Stackoverflow.com/users/8155", "pm_score": 4, "selected": true, "text": "//extension method to convert my type to an object array.\npublic static object[] ToObjectArray(this MyClass theSource)\n{\n o...
2008/10/20
[ "https://Stackoverflow.com/questions/219808", "https://Stackoverflow.com", "https://Stackoverflow.com/users/25462/" ]
219,815
<p>I've seen some very good questions on Stack Overflow concerning delegates, events, and the .NET implementation of these two features. One question in particular, "<a href="https://stackoverflow.com/questions/213638/how-do-c-events-work-behind-the-scenes#213651">How do C# Events work behind the scenes?</a>", produce...
[ { "answer_id": 219835, "author": "Marc Gravell", "author_id": 23354, "author_profile": "https://Stackoverflow.com/users/23354", "pm_score": 4, "selected": true, "text": ".field public string Foo // public field\n.property instance string Bar // public property\n{\n .get instance strin...
2008/10/20
[ "https://Stackoverflow.com/questions/219815", "https://Stackoverflow.com", "https://Stackoverflow.com/users/28350/" ]
219,827
<p>I am trying to fill a form in a php application from a C# client (Outlook addin). I used Fiddler to see the original request from within the php application and the form is transmitted as a multipart/form. Unfortunately .Net does not come with native support for this type of forms (WebClient has only a method for up...
[ { "answer_id": 220015, "author": "dnolan", "author_id": 29086, "author_profile": "https://Stackoverflow.com/users/29086", "pm_score": 6, "selected": true, "text": "public class PostData\n{\n\n private List<PostDataParam> m_Params;\n\n public List<PostDataParam> Params\n {\n ...
2008/10/20
[ "https://Stackoverflow.com/questions/219827", "https://Stackoverflow.com", "https://Stackoverflow.com/users/29876/" ]
219,833
<p>I'm collecting metadata using the sys.* views, and according to the documentation, the sys.identity_columns view will return the seed and increment values like so.</p> <pre><code>CREATE TABLE ident_test ( test_id int IDENTITY(1000,10), other int ) SELECT name, seed_value, increment_value FROM sys.identity_co...
[ { "answer_id": 219850, "author": "Cade Roux", "author_id": 18255, "author_profile": "https://Stackoverflow.com/users/18255", "pm_score": 0, "selected": false, "text": "IDENTITY SELECT c.name, i.seed_value, i.increment_value\nFROM sys.columns c\nINNER JOIN sys.identity_columns i\n ON i...
2008/10/20
[ "https://Stackoverflow.com/questions/219833", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4525/" ]
219,851
<p>I want a method of the class: "<code>One</code>" ("<code>AccessibleWithinSameNamespace</code>") to be accessible by the class: "<code>Two</code>", without having "<code>Two</code>" extending "<code>One</code>".</p> <p>Both classes are in the same namespace, so I'm thinking that maybe there's an access-modifier that...
[ { "answer_id": 219858, "author": "Jorge Villuendas Zapatero", "author_id": 27097, "author_profile": "https://Stackoverflow.com/users/27097", "pm_score": 3, "selected": true, "text": "namespace Test\n{\n class One\n {\n public void AccessibleToAll()\n {\n }\n\n\...
2008/10/20
[ "https://Stackoverflow.com/questions/219851", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20946/" ]
219,868
<p>I am working on a simple notification service that will be used to deliver messages to the users surfing a website. The notifications do not have to be sent in real time but it might be a better user experience if they happened more frequently than say every 5 minutes. The data being sent to and from the client is n...
[ { "answer_id": 220066, "author": "savetheclocktower", "author_id": 25720, "author_profile": "https://Stackoverflow.com/users/25720", "pm_score": 1, "selected": false, "text": "cometd" } ]
2008/10/20
[ "https://Stackoverflow.com/questions/219868", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22914/" ]
219,870
<p>I have a WordPress site (2.6.2) in which I have set the Home page to a static page instead of the normal posts page. The ID of this page is 2, so in the WordPress template I have changed the <code>wp_list_pages</code> to look like this:</p> <pre><code>&lt;?php wp_list_pages('exclude=2&amp;title_li=&amp;depth=1' ); ...
[ { "answer_id": 220157, "author": "micahwittman", "author_id": 11181, "author_profile": "https://Stackoverflow.com/users/11181", "pm_score": 3, "selected": true, "text": "wp_enqueue_script('jquery');\n wp_enqueue_script( 'jquery', '/path/to/your/jquery.js', false, '1.2.1');\n if(window.lo...
2008/10/20
[ "https://Stackoverflow.com/questions/219870", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8047/" ]
219,881
<p>Is there a preference or behavior difference between using:</p> <pre><code>if(obj.getClass().isArray()) {} </code></pre> <p>and</p> <pre><code>if(obj instanceof Object[]) {} </code></pre> <p>?</p>
[ { "answer_id": 219898, "author": "hazzen", "author_id": 5066, "author_profile": "https://Stackoverflow.com/users/5066", "pm_score": 0, "selected": false, "text": "String[] instanceof Object[]" }, { "answer_id": 219998, "author": "erickson", "author_id": 3474, "author_...
2008/10/20
[ "https://Stackoverflow.com/questions/219881", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5309/" ]
219,904
<p>If I have a property that I want to let inheritors write to, but keep readonly externally, what is the preferred way to implement this? I usually go with something like this:</p> <pre><code>private object m_myProp; public object MyProp { get { return m_myProp; } } protected void SetMyProp(object value) { m_...
[ { "answer_id": 219913, "author": "Marc Gravell", "author_id": 23354, "author_profile": "https://Stackoverflow.com/users/23354", "pm_score": 6, "selected": true, "text": "private object m_myProp;\npublic object MyProp\n{\n get { return m_myProp; }\n protected set { m_myProp = value;...
2008/10/20
[ "https://Stackoverflow.com/questions/219904", "https://Stackoverflow.com", "https://Stackoverflow.com/users/27414/" ]
219,914
<p>I've often used pointers to const objects, like so...</p> <pre><code>const int *p; </code></pre> <p>That simply means that you can't change the integer that <code>p</code> is pointing at through <code>p</code>. But I've also seen reference to const pointers, declared like this...</p> <pre><code>int* const p; </co...
[ { "answer_id": 219932, "author": "James Curran", "author_id": 12725, "author_profile": "https://Stackoverflow.com/users/12725", "pm_score": 2, "selected": false, "text": "struct MyClass\n{\n char* const ptr;\n MyClass(char* str) :ptr(str) {}\n\n void SomeFunc(MyOtherClass moc)\n...
2008/10/20
[ "https://Stackoverflow.com/questions/219914", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12193/" ]
219,928
<p>Everyone has this huge massively parallelized supercomputer on their desktop in the form of a graphics card GPU.</p> <ul> <li>What is the "hello world" equivalent of the GPU community?</li> <li>What do I do, where do I go, to get started programming the GPU for the major GPU vendors?</li> </ul> <p>-Adam</p>
[ { "answer_id": 12980973, "author": "Kyle Niemeyer", "author_id": 1569494, "author_profile": "https://Stackoverflow.com/users/1569494", "pm_score": 3, "selected": false, "text": "#pragma acc kernels int i;\nfloat a = 2.0;\nfloat b[10000];\n#pragma acc kernels\nfor (i = 0; i < 10000; ++i) ...
2008/10/20
[ "https://Stackoverflow.com/questions/219928", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2915/" ]
219,982
<p>e.g,</p> <pre><code>foo1 foo2 foo10 foo100 </code></pre> <p>rather than</p> <pre><code>foo1 foo10 foo100 foo2 </code></pre> <p>Update: not interested in coding the sort myself (although that's interesting in its own right), but having the database to do the sort for me.</p>
[ { "answer_id": 219985, "author": "Mark Harrison", "author_id": 116, "author_profile": "https://Stackoverflow.com/users/116", "pm_score": 4, "selected": true, "text": "select * from t\n order by to_number(regexp_substr(a,'^[0-9]+')),\n to_number(regexp_substr(a,'[0-9]+$')),\n ...
2008/10/20
[ "https://Stackoverflow.com/questions/219982", "https://Stackoverflow.com", "https://Stackoverflow.com/users/116/" ]
219,999
<p>I am connecting to a MySQL database with PHP and the CodeIgniter Framework. I want to store my passwords encrypted in the database and would like to know the best way to do this.</p>
[ { "answer_id": 220134, "author": "vt.", "author_id": 3905, "author_profile": "https://Stackoverflow.com/users/3905", "pm_score": 2, "selected": false, "text": "$hasher = new PasswordHash(8, false);\n\n// Before storing a password\n$hash = $hasher->HashPassword($password);\n\n// To check ...
2008/10/20
[ "https://Stackoverflow.com/questions/219999", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
220,010
<p>Ok, so I know that global variables are considered bad, and the singleton pattern is overused. And I have read in many places that a class should do only one task and contain only those variables that allow it to accomplish that one task. However, while working on my latest project, I actually thought about these r...
[ { "answer_id": 230888, "author": "ravenspoint", "author_id": 16582, "author_profile": "https://Stackoverflow.com/users/16582", "pm_score": 2, "selected": false, "text": "class CsolverApp : public CWinApp\n{\npublic:\n\ncData theData;\n\n…\n #include “solver.h”\n\ntheApp.theData.somepubli...
2008/10/20
[ "https://Stackoverflow.com/questions/220010", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23504/" ]
220,020
<h2>Caution: This question is over nine years old!</h2> <p>Your best option is to search for newer questions, or to search the answers below looking for your specific version of MVC, as many answers here are obsolete now. </p> <p>If you do find an answer that works for your version, please make sure the answer cont...
[ { "answer_id": 220041, "author": "mmacaulay", "author_id": 22152, "author_profile": "https://Stackoverflow.com/users/22152", "pm_score": 5, "selected": false, "text": "\n<input type=\"checkbox\" name=\"applyChanges\" />\n \nvar checkBox = Request.Form[\"applyChanges\"];\n\nif (checkBox =...
2008/10/20
[ "https://Stackoverflow.com/questions/220020", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
220,021
<p>I am trying to use log4net in an ASP.NET application with Visual Studio 2005. I have declared an instance of the logger like so:</p> <pre><code>Private Shared ReadOnly log As ILog = LogManager.GetLogger("") </code></pre> <p>I am trying to use it in the following manner:</p> <pre><code>If log.IsDebugEnabled Then ...
[ { "answer_id": 220037, "author": "Tim Scott", "author_id": 29493, "author_profile": "https://Stackoverflow.com/users/29493", "pm_score": 5, "selected": false, "text": "[assembly: XmlConfigurator(Watch = true)]\n log4net.config [assembly: log4net.Config.XmlConfigurator(ConfigFile = \"log4...
2008/10/20
[ "https://Stackoverflow.com/questions/220021", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19977/" ]
220,026
<p>I am attempting to import mxml files that I developed with Emacs into a new project in FlexBuilder...I have created a project and manually added all my MXML and actionscript files into FlexBuilder. </p> <p>I now can't figure out how to run the application. I believe the problem lies in the fact that FlexBuilder bel...
[ { "answer_id": 370835, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 0, "selected": false, "text": "<applications> \n<application path=\"com/example/games/game1/Main.as\"/> \n<application path=\"com/example/games/game2/Main.as...
2008/10/20
[ "https://Stackoverflow.com/questions/220026", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1638/" ]
220,031
<p>Previously, settings for deployments of an ASP.NET application were stored in multiple configuration files under the Web.config config sections using a KEY/VALUE format. We are moving these 'site module options' to the database for a variety of reasons. </p> <p>Here are the two options we are mulling over at the mo...
[ { "answer_id": 223450, "author": "Brad Patton", "author_id": 27989, "author_profile": "https://Stackoverflow.com/users/27989", "pm_score": 1, "selected": false, "text": "/// <summary>\n/// The time passwords expire, in days, if ExpirePasswords is on\n/// </summary>\npublic int PasswordEx...
2008/10/20
[ "https://Stackoverflow.com/questions/220031", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
220,044
<p>Which sorting algorithm works best on mostly sorted data?</p>
[ { "answer_id": 220069, "author": "Jason Cohen", "author_id": 4926, "author_profile": "https://Stackoverflow.com/users/4926", "pm_score": 4, "selected": false, "text": "k 1..n el[k] >= el[k-1] 1..k-1 k>T T k" }, { "answer_id": 220750, "author": "zaphod", "author_id": 13871...
2008/10/20
[ "https://Stackoverflow.com/questions/220044", "https://Stackoverflow.com", "https://Stackoverflow.com/users/29783/" ]
220,051
<p>I'm not the best at PHP and would be extremely grateful if somebody could help. Basically I need to parse each line of a datafeed and just get each bit of information between each "|" - then I can add it to a database. I think I can handle getting the information from between the "|"'s by using explode but I need a ...
[ { "answer_id": 220072, "author": "Randy", "author_id": 9361, "author_profile": "https://Stackoverflow.com/users/9361", "pm_score": 3, "selected": true, "text": "$lines = file(\"filename\");\nforeach($lines as $line) {\n $parts = explode(\"|\", $line);\n // do the database inserts h...
2008/10/20
[ "https://Stackoverflow.com/questions/220051", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26823/" ]
220,075
<p>OK, so I readily concede that I'm a newbie when it comes to continuous integration.</p> <p>That being said, I'm trying to set up a CC.NET environment to educate myself, but I'm having trouble finding the information I need to get the automated build portion set up.</p> <p>As I understand it, in C# the .csproj file...
[ { "answer_id": 221129, "author": "bh213", "author_id": 28912, "author_profile": "https://Stackoverflow.com/users/28912", "pm_score": 2, "selected": false, "text": "<MSBuild Projects=\"MySolution.sln\" Targets=\"Clean; Rebuild\" Properties=\"Configuration=$(BuildMode);\">\n" } ]
2008/10/20
[ "https://Stackoverflow.com/questions/220075", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1108/" ]
220,084
<p>Inspired by <a href="https://stackoverflow.com/questions/220044/which-sort-algorithm-works-best-on-mostly-sorted-data">this question</a></p> <p>The choice of which algorithm to use to sort a collection can be made better if we know ahead of time how well sorted a collection is. Is there a way we can measure (or mai...
[ { "answer_id": 220091, "author": "Jason Cohen", "author_id": 4926, "author_profile": "https://Stackoverflow.com/users/4926", "pm_score": 2, "selected": false, "text": "10" }, { "answer_id": 2099258, "author": "Aaron Couture", "author_id": 254612, "author_profile": "ht...
2008/10/20
[ "https://Stackoverflow.com/questions/220084", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8123/" ]
220,097
<p>I'm trying to find out how to read/write to the extended file properties in C# e.g. Comment, Bit Rate, Date Accessed, Category etc that you can see in Windows explorer. Any ideas how to do this? EDIT: I'll mainly be reading/writing to video files (AVI/DIVX/...)</p>
[ { "answer_id": 220141, "author": "Mark Cidade", "author_id": 1659, "author_profile": "https://Stackoverflow.com/users/1659", "pm_score": 5, "selected": false, "text": "GetDetailsOf() shell32.dll" }, { "answer_id": 325659, "author": "Dirk Vollmar", "author_id": 40347, ...
2008/10/20
[ "https://Stackoverflow.com/questions/220097", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1769/" ]
220,100
<p>How do I enable double-buffering of a control using C# (Windows forms)?</p> <p>I have a panel control which I am drawing stuff into and also an owner-drawn tab control. Both suffer from flicker, so how can I enable double-buffering?</p>
[ { "answer_id": 220166, "author": "David Wengier", "author_id": 489, "author_profile": "https://Stackoverflow.com/users/489", "pm_score": 5, "selected": true, "text": "this.DoubleBuffered = true;\nthis.SetStyle(ControlStyles.UserPaint | \n ControlStyles.AllPaintingInWmPaint |...
2008/10/20
[ "https://Stackoverflow.com/questions/220100", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13227/" ]
220,110
<p>I'm looking for a Java library that is geared towards network math and already tested. Nothing particularly fancy, just something to hold ips and subnets, and do things like print a subnet mask or calculate whether an IP is within a given subnet. </p> <p>Should I roll my own, or is there already a robust library ...
[ { "answer_id": 48216779, "author": "Sean F", "author_id": 6801443, "author_profile": "https://Stackoverflow.com/users/6801443", "pm_score": 2, "selected": false, "text": " String ipv6 = \"2001:db8:57AB:0000:0000:0000:0000:0001\";\n String ipv6subnet = \"2001:db8::/32\";\n String...
2008/10/20
[ "https://Stackoverflow.com/questions/220110", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13703/" ]
220,112
<p>I like to keep my websites extremely light and fast, but of course I need some kind of user tracking and analytics. </p> <p>It seems like Google Analytics always takes significant enough processing time that I'd like to replace it with something faster (and/or hosted locally), perhaps having less features. </p> <p...
[ { "answer_id": 6131702, "author": "roberkules", "author_id": 45948, "author_profile": "https://Stackoverflow.com/users/45948", "pm_score": 0, "selected": false, "text": "// first thing to do, make sure _gaq is defined:\nvar _gaq = _gaq || [];\n\n// set your account settings:\n_gaq.push([...
2008/10/20
[ "https://Stackoverflow.com/questions/220112", "https://Stackoverflow.com", "https://Stackoverflow.com/users/25066/" ]
220,123
<p>I am trying to write a little backup program for friends and family and want it to be as simple to use a possible. I don't want to have to ask the user where to backup their data to, I just want to search for and use the first USB hard drive connected to the computer. Obtaining the unique ID of the hard drive would ...
[ { "answer_id": 220836, "author": "gregmac", "author_id": 7913, "author_profile": "https://Stackoverflow.com/users/7913", "pm_score": 1, "selected": false, "text": "foreach (IO.DriveInfo drive in IO.DriveInfo.GetDrives()) {\n if ((drive.DriveType == IO.DriveType.Removable)) {\n // thi...
2008/10/20
[ "https://Stackoverflow.com/questions/220123", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1142/" ]
220,126
<p>Let's say I have the following code:</p> <pre><code>@sites = Site.find(session[:sites]) # will be an array of Site ids @languages = Language.for_sites(@sites) </code></pre> <p>for_sites is a named_scope in the Language model that returns the languages associated with those sites, and languages are associated with ...
[ { "answer_id": 220504, "author": "JasonOng", "author_id": 6048, "author_profile": "https://Stackoverflow.com/users/6048", "pm_score": 0, "selected": false, "text": "class Array\n\n def languages\n ...\n end\n\nend\n" }, { "answer_id": 220593, "author": "Orion Edwards", ...
2008/10/20
[ "https://Stackoverflow.com/questions/220126", "https://Stackoverflow.com", "https://Stackoverflow.com/users/140/" ]
220,142
<p>I need to output the contents of a text field using MS Query Analyzer. I have tried this:</p> <pre><code>select top 1 text from myTable </code></pre> <p>(where text is a <code>text</code> field)</p> <p>and</p> <pre><code>DECLARE @data VarChar(8000) select top 1 @data = text from myTable PRINT @data </code></pre...
[ { "answer_id": 220232, "author": "Ryan Abbott", "author_id": 27908, "author_profile": "https://Stackoverflow.com/users/27908", "pm_score": 4, "selected": true, "text": "DECLARE @limit as int,\n @charLen as int,\n @current as int,\n @chars as varchar(8000)\n\nSET @lim...
2008/10/20
[ "https://Stackoverflow.com/questions/220142", "https://Stackoverflow.com", "https://Stackoverflow.com/users/80/" ]
220,146
<p>My applications installer offers the user the ability to run the application as a service through use of the <code>srvany.exe</code> application. To remove the application on uninstall, I've been using the application <code>instsrv.exe</code> with the following command:</p> <blockquote> <p>instsrv "myservice" RE...
[ { "answer_id": 8461061, "author": "DmitryK", "author_id": 155584, "author_profile": "https://Stackoverflow.com/users/155584", "pm_score": 0, "selected": false, "text": "SC STOP servicename\nSC DELETE servicename\n" } ]
2008/10/20
[ "https://Stackoverflow.com/questions/220146", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18836/" ]
220,147
<p>Can someone please let me know how to get the different segments of the three rows that are intersecting in different ways using SQL? The three rows in #t2 represent sets A,B, C - I am looking for A I B, A I C, B I C, A I B I C, A' , B', C' etc., (7 possible segments with 3 rows as in a Venn diagram) where I is the ...
[ { "answer_id": 220284, "author": "Amy B", "author_id": 8155, "author_profile": "https://Stackoverflow.com/users/8155", "pm_score": 0, "selected": false, "text": "SELECT key2,\n CASE\n WHEN InA = 1 and InB = 1 and InC = 1 THEN 'ABC'\n WHEN InA = 0 and InB = 1 and InC = 1 THEN 'BC'\n W...
2008/10/20
[ "https://Stackoverflow.com/questions/220147", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26309/" ]
220,149
<p>I want to capture the HTTP request header fields, primarily the Referer and User-Agent, within my client-side JavaScript. How may I access them?</p> <hr> <p>Google Analytics manages to get the data via JavaScript that they have you embed in you pages, so it is definitely possible.</p> <blockquote> <p><strong>R...
[ { "answer_id": 220169, "author": "Grant Wagner", "author_id": 9254, "author_profile": "https://Stackoverflow.com/users/9254", "pm_score": 7, "selected": true, "text": "document.referrer navigator.userAgent" }, { "answer_id": 4315364, "author": "Tommy Lacroix", "author_id"...
2008/10/20
[ "https://Stackoverflow.com/questions/220149", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13930/" ]
220,159
<p>I'd like to log the <em>call trace</em> during certain points, like failed assertions, or uncaught exceptions.</p>
[ { "answer_id": 220168, "author": "Max Stewart", "author_id": 18338, "author_profile": "https://Stackoverflow.com/users/18338", "pm_score": 3, "selected": false, "text": "#import <ExceptionHandling/NSExceptionHandler.h>\n\n[[NSExceptionHandler defaultExceptionHandler] \n ...
2008/10/20
[ "https://Stackoverflow.com/questions/220159", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10184/" ]
220,165
<p>I'm trying to learn GNUMake for a small project I'm working on. So far, even the "basic" tutorials seem pretty rough and I've yet to make sense of the makefile syntax.</p> <p>Does anyone have some good resources for an absolute beginner to get familiar with GNUMake?</p>
[ { "answer_id": 11355908, "author": "FooF", "author_id": 709646, "author_profile": "https://Stackoverflow.com/users/709646", "pm_score": 0, "selected": false, "text": "info pinfo" } ]
2008/10/20
[ "https://Stackoverflow.com/questions/220165", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1473493/" ]
220,176
<p>If I download a .gem file to a folder in my computer, can I install it later using <code>gem install</code>?</p>
[ { "answer_id": 220181, "author": "Chris Bunch", "author_id": 422, "author_profile": "https://Stackoverflow.com/users/422", "pm_score": 9, "selected": true, "text": "gem install" }, { "answer_id": 286347, "author": "JasonTrue", "author_id": 13433, "author_profile": "ht...
2008/10/20
[ "https://Stackoverflow.com/questions/220176", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14755/" ]