qid
int64
4
19.1M
question
stringlengths
18
48.3k
answers
list
date
stringlengths
10
10
metadata
list
22,431
<p>I am looking for information on handling search in different ORMs.</p> <p>Currently I am redeveloping some old application in PHP and one of requirements is: make everything or almost everything searchable, so user just types "punkrock live" and the app finds videos clips, music tracks, reviews, upcoming events or ...
[ { "answer_id": 302878, "author": "lo_fye", "author_id": 3407, "author_profile": "https://Stackoverflow.com/users/3407", "pm_score": 1, "selected": false, "text": "public function save(PropelPDO $con = null)\n{\n if($this->getIsSearchable())\n {\n // update your search i...
2008/08/22
[ "https://Stackoverflow.com/questions/22431", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2169/" ]
22,444
<p>I have this gigantic ugly string:</p> <pre class="lang-none prettyprint-override"><code>J0000000: Transaction A0001401 started on 8/22/2008 9:49:29 AM J0000010: Project name: E:\foo.pf J0000011: Job name: MBiek Direct Mail Test J0000020: Document 1 - Completed successfully </code></pre> <p>I'm trying to extract piec...
[ { "answer_id": 22449, "author": "jj33", "author_id": 430, "author_profile": "https://Stackoverflow.com/users/430", "pm_score": 8, "selected": true, "text": ".* ? Project name:\\s+(.*?)\\s+J[0-9]{7}:\n" }, { "answer_id": 22457, "author": "Konrad Rudolph", "author_id": 1968...
2008/08/22
[ "https://Stackoverflow.com/questions/22444", "https://Stackoverflow.com", "https://Stackoverflow.com/users/305/" ]
22,459
<p>I'm getting some strange, intermittent, data aborts (&lt; 5% of the time) in some of my code, when calling <code>memset()</code>. The problem is that is usually doesn't happen unless the code is running for a couple days, so it's hard to catch it in the act.</p> <p>I'm using the following code:</p> <pre><code>cha...
[ { "answer_id": 22473, "author": "Joel Spolsky", "author_id": 4, "author_profile": "https://Stackoverflow.com/users/4", "pm_score": 5, "selected": true, "text": "malloc NULL" }, { "answer_id": 22486, "author": "FreeMemory", "author_id": 2132, "author_profile": "https:/...
2008/08/22
[ "https://Stackoverflow.com/questions/22459", "https://Stackoverflow.com", "https://Stackoverflow.com/users/194/" ]
22,474
<p>How do I select all records that contain "LCS" within the title column in sql.</p>
[ { "answer_id": 22476, "author": "Owen", "author_id": 2109, "author_profile": "https://Stackoverflow.com/users/2109", "pm_score": 3, "selected": true, "text": "SELECT * FROM TABLE WHERE TABLE.TITLE LIKE '%LCS%';\n" }, { "answer_id": 22489, "author": "SQLMenace", "author_id...
2008/08/22
[ "https://Stackoverflow.com/questions/22474", "https://Stackoverflow.com", "https://Stackoverflow.com/users/453046/" ]
22,500
<p>The <a href="http://en.wikipedia.org/wiki/ANSI_C" rel="noreferrer">Wikipedia article on ANSI C</a> says:</p> <blockquote> <p>One of the aims of the ANSI C standardization process was to produce a superset of K&amp;R C (the first published standard), incorporating many of the unofficial features subsequently intro...
[ { "answer_id": 22516, "author": "FreeMemory", "author_id": 2132, "author_profile": "https://Stackoverflow.com/users/2132", "pm_score": 4, "selected": false, "text": "int f( p, q, r ) \nint p, float q, double r; \n{ \n // Code goes here \n}\n" }, { "answer_id": 55632, "...
2008/08/22
[ "https://Stackoverflow.com/questions/22500", "https://Stackoverflow.com", "https://Stackoverflow.com/users/572/" ]
22,503
<p>I have a form view, in the edit template I have two drop downs. Drop down 1 is explicitly set with a list of allowed values. It is also set to autopostback. Drop down 2 is databound to an objectdatasource, this objectdatasource uses the first dropdown as one of it's parameters. (The idea is that drop down 1 limits ...
[ { "answer_id": 183587, "author": "craigmoliver", "author_id": 12252, "author_profile": "https://Stackoverflow.com/users/12252", "pm_score": 2, "selected": false, "text": "FormView fv = (FormView)sender;\nDropDownList ddl = (DropDownList)fv.FindControl(\"ProjectList\");\nddl.SelectedValue...
2008/08/22
[ "https://Stackoverflow.com/questions/22503", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2496/" ]
22,509
<p>I have an ASP.NET webforms application (3.5 SP1) that I'm working on, and attempting to enable gzip fpr HTML and CSS that comes down the pipe. I'm using <a href="http://www.stardeveloper.com/articles/display.html?article=2007110401&amp;page=1" rel="nofollow noreferrer">this implementation</a> (and tried a few others...
[ { "answer_id": 22585, "author": "travis", "author_id": 1414, "author_profile": "https://Stackoverflow.com/users/1414", "pm_score": 4, "selected": true, "text": "%systemroot%\\system32\\inetsrv\\MetaBase.xml Location =\"/LM/W3SVC/Filters/Compression/gzip\" png css js HcFileExtensions aspx...
2008/08/22
[ "https://Stackoverflow.com/questions/22509", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1212/" ]
22,519
<p>I have a folder in my web server used for the users to upload photos using an ASP page.</p> <p>Is it safe enough to give IUSR write permissions to the folder? Must I secure something else? I am afraid of hackers bypassing the ASP page and uploading content directly to the folder.</p> <p>I'm using ASP classic and I...
[ { "answer_id": 24401, "author": "chrisofspades", "author_id": 2614, "author_profile": "https://Stackoverflow.com/users/2614", "pm_score": 0, "selected": false, "text": "set fs=Server.CreateObject(\"Scripting.FileSystemObject\")\nset f=fs.GetFile(\"upload.jpg\")\n'image mime types or imag...
2008/08/22
[ "https://Stackoverflow.com/questions/22519", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2385/" ]
22,524
<p>Example: You have a shortcut <code>s</code> to <code>SomeProgram</code> in the current directory.</p> <p>In <code>cmd.exe</code>, you can type <code>s</code> and it will launch the program.</p> <p>In PowerShell, typing <code>s</code> gives:</p> <blockquote> <p><code>The term 's' is not recognized as a cmdlet, f...
[ { "answer_id": 23687, "author": "slipsec", "author_id": 1635, "author_profile": "https://Stackoverflow.com/users/1635", "pm_score": 2, "selected": false, "text": "& \"C:\\WINDOWS\\Microsoft.NET\\Framework\\v2.0.50727\\aspnet_regiis.exe\" -r | out-null\n" }, { "answer_id": 23694, ...
2008/08/22
[ "https://Stackoverflow.com/questions/22524", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2495/" ]
22,528
<p>I would like to have a reference for the pros and cons of using include <strong>files vs objects(classes)</strong> when developing PHP applications.</p> <p>I know I would benefit from having one place to go for this answer...I have a few opinions of my own but I look forward to hearing others.</p> <p><strong>A Sim...
[ { "answer_id": 22551, "author": "Konrad Rudolph", "author_id": 1968, "author_profile": "https://Stackoverflow.com/users/1968", "pm_score": 1, "selected": false, "text": "include include __autoload" }, { "answer_id": 22578, "author": "Brian Warshaw", "author_id": 1344, ...
2008/08/22
[ "https://Stackoverflow.com/questions/22528", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2490/" ]
22,552
<p>I have a regex that is going to end up being a bit long and it'd make it much easier to read to have it across multiple lines.</p> <p>I tried this but it just barfs.</p> <pre><code>preg_match( '^J[0-9]{7}:\s+ (.*?) #Extract the Transaction Start Date msg \s+J[0-9]{7}:\s+Project\sname:\s+ ...
[ { "answer_id": 22572, "author": "Konrad Rudolph", "author_id": 1968, "author_profile": "https://Stackoverflow.com/users/1968", "pm_score": 4, "selected": true, "text": "preg_match(\"/\n test\n/x\", $foo, $bar);\n" }, { "answer_id": 22574, "author": "Mark Biek", "author...
2008/08/22
[ "https://Stackoverflow.com/questions/22552", "https://Stackoverflow.com", "https://Stackoverflow.com/users/305/" ]
22,566
<p>How do I get Perl to read the contents of a given directory into an array?</p> <p><a href="https://en.wikipedia.org/wiki/Grave_accent#Use_in_programming" rel="noreferrer">Backticks</a> can do it, but is there some method using 'scandir' or a similar term?</p>
[ { "answer_id": 22573, "author": "jj33", "author_id": 430, "author_profile": "https://Stackoverflow.com/users/430", "pm_score": 7, "selected": true, "text": "opendir(D, \"/path/to/directory\") || die \"Can't open directory: $!\\n\";\nwhile (my $f = readdir(D)) {\n print \"\\$f = $f\\n\...
2008/08/22
[ "https://Stackoverflow.com/questions/22566", "https://Stackoverflow.com", "https://Stackoverflow.com/users/277/" ]
22,570
<p>Here is the issue I am having: I have a large query that needs to compare datetimes in the where clause to see if two dates are on the same day. My current solution, which sucks, is to send the datetimes into a UDF to convert them to midnight of the same day, and then check those dates for equality. When it comes ...
[ { "answer_id": 22579, "author": "jason saldo", "author_id": 1293, "author_profile": "https://Stackoverflow.com/users/1293", "pm_score": 3, "selected": false, "text": "where\nyear(date1) = year(date2)\nand month(date1) = month(date2)\nand day(date1) = day(date2)\n" }, { "answer_id...
2008/08/22
[ "https://Stackoverflow.com/questions/22570", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1219/" ]
22,617
<p>I need to find out how to format numbers as strings. My code is here:</p> <pre><code>return str(hours)+":"+str(minutes)+":"+str(seconds)+" "+ampm </code></pre> <p>Hours and minutes are integers, and seconds is a float. the str() function will convert all of these numbers to the tenths (0.1) place. So instead of ...
[ { "answer_id": 22624, "author": "Konrad Rudolph", "author_id": 1968, "author_profile": "https://Stackoverflow.com/users/1968", "pm_score": 8, "selected": true, "text": "hours, minutes, seconds = 6, 56, 33\nf'{hours:02}:{minutes:02}:{seconds:02} {\"pm\" if hours > 12 else \"am\"}'\n str.f...
2008/08/22
[ "https://Stackoverflow.com/questions/22617", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2504/" ]
22,623
<p>What are the best practices to consider when catching exceptions and re-throwing them? I want to make sure that the <code>Exception</code> object's <code>InnerException</code> and stack trace are preserved. Is there a difference between the following code blocks in the way they handle this?</p> <pre><code>try { ...
[ { "answer_id": 22628, "author": "Darren Kopp", "author_id": 77, "author_profile": "https://Stackoverflow.com/users/77", "pm_score": 9, "selected": true, "text": "throw; try {\n // something that bombs here\n} catch (Exception ex)\n{\n throw;\n}\n throw ex; throw ex;" }, { "an...
2008/08/22
[ "https://Stackoverflow.com/questions/22623", "https://Stackoverflow.com", "https://Stackoverflow.com/users/357/" ]
22,676
<p>I have a small utility that I use to download an MP3 file from a website on a schedule and then builds/updates a podcast XML file which I've added to iTunes.</p> <p>The text processing that creates/updates the XML file is written in Python. However, I use wget inside a Windows <code>.bat</code> file to download the...
[ { "answer_id": 22682, "author": "Corey", "author_id": 1595, "author_profile": "https://Stackoverflow.com/users/1595", "pm_score": 10, "selected": true, "text": "urllib.request.urlopen() import urllib.request\nwith urllib.request.urlopen('http://www.example.com/') as f:\n html = f.read...
2008/08/22
[ "https://Stackoverflow.com/questions/22676", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2109/" ]
22,696
<p>OK, here is my problem, without being too specific for reasons of being fired for putting company practices on the internet.</p> <p>There are spreadsheets made. These are uploaded to the database. I need to filter out duplicates from uploading. The only way to do this is by making sure that for each and every entry...
[ { "answer_id": 24673, "author": "Fionnuala", "author_id": 2548, "author_profile": "https://Stackoverflow.com/users/2548", "pm_score": 1, "selected": false, "text": "INSERT INTO ToUpdate ( Field1, Field2 )\nSELECT e.H1, e.H2\nFROM (SELECT * FROM [Sheet1$] IN '' [Excel 8.0;HDR=YES;IMEX=1;d...
2008/08/22
[ "https://Stackoverflow.com/questions/22696", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
22,697
<p>What's the best framework for creating mock objects in Java? Why? What are the pros and cons of each framework?</p>
[ { "answer_id": 23048, "author": "Brian Laframboise", "author_id": 1557, "author_profile": "https://Stackoverflow.com/users/1557", "pm_score": 9, "selected": true, "text": "import static org.mockito.Mockito.*;\n\nList mockedList = mock(List.class);\nmockedList.clear();\nverify(mockedList)...
2008/08/22
[ "https://Stackoverflow.com/questions/22697", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2030/" ]
22,708
<p>How would you determine the column name (e.g. "AQ" or "BH") of the nth column in Excel?</p> <p>Edit: A language-agnostic algorithm to determine this is the main goal here.</p>
[ { "answer_id": 22715, "author": "Joseph Sturtevant", "author_id": 317, "author_profile": "https://Stackoverflow.com/users/317", "pm_score": 6, "selected": true, "text": "public static string Column(int column)\n{\n column--;\n if (column >= 0 && column < 26)\n return ((char)...
2008/08/22
[ "https://Stackoverflow.com/questions/22708", "https://Stackoverflow.com", "https://Stackoverflow.com/users/940/" ]
22,720
<p>I have a listening port on my server that I'm connecting to using a Java class and the <code>Socket</code> interface, i.e.</p> <pre><code>Socket mySocket = new Socket(host,port); </code></pre> <p>I then grab an <code>OutputStream</code>, decorate with a <code>PrintWriter</code> in autoflush mode and I'm laughing -...
[ { "answer_id": 22803, "author": "James A. Rosen", "author_id": 1190, "author_profile": "https://Stackoverflow.com/users/1190", "pm_score": 2, "selected": true, "text": "isOutputShutdown() SocketWatcher Thread Socket SocketClosedException" } ]
2008/08/22
[ "https://Stackoverflow.com/questions/22720", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2362/" ]
22,732
<p>I am trying to do some string concatenation/formatting, but it's putting all the parameters into the first placeholder.</p> <p><strong>Code</strong></p> <pre><code>function CreateAppPoolScript([string]$AppPoolName, [string]$AppPoolUser, [string]$AppPoolPass) { # Command to create an IIS application pool $A...
[ { "answer_id": 22770, "author": "Paul Roub", "author_id": 1324, "author_profile": "https://Stackoverflow.com/users/1324", "pm_score": 7, "selected": true, "text": "$s = CreateAppPoolScript \"name\" \"user\" \"pass\"\n cscript adsutil.vbs CREATE \"w3svc/AppPools/name\" IIsApplicationPool\...
2008/08/22
[ "https://Stackoverflow.com/questions/22732", "https://Stackoverflow.com", "https://Stackoverflow.com/users/636/" ]
22,764
<p>In Ruby 1.8 and earlier,</p> <pre><code>Foo </code></pre> <p>is a constant (a Class, a Module, or another constant). Whereas</p> <pre><code>foo </code></pre> <p>is a variable. The key difference is as follows:</p> <pre><code>module Foo bar = 7 BAZ = 8 end Foo::BAZ # =&gt; 8 Foo::bar # NoMethodError: und...
[ { "answer_id": 25592, "author": "Orion Edwards", "author_id": 234, "author_profile": "https://Stackoverflow.com/users/234", "pm_score": 2, "selected": false, "text": "String#upcase String#downcase" }, { "answer_id": 25610, "author": "Julio César", "author_id": 2148, "...
2008/08/22
[ "https://Stackoverflow.com/questions/22764", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1190/" ]
22,801
<p>It's about PHP but I've no doubt many of the same comments will apply to other languages.</p> <p>Simply put, what are the differences in the different types of loop for PHP? Is one faster/better than the others or should I simply put in the most readable loop?</p> <pre><code>for ($i = 0; $i &lt; 10; $i++) { # ...
[ { "answer_id": 22810, "author": "wvdschel", "author_id": 2018, "author_profile": "https://Stackoverflow.com/users/2018", "pm_score": 0, "selected": false, "text": "for while Foreach" }, { "answer_id": 22811, "author": "mercutio", "author_id": 1951, "author_profile": "...
2008/08/22
[ "https://Stackoverflow.com/questions/22801", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1384652/" ]
22,807
<p>Wondering if there is a better why in the WHERE clause of choosing records when you need to look at effective start and end dates?</p> <p>Currently this how I've done it in the past on MS SQL Server. Just worried about the date and not the time. I'm using SQL Server 2005.</p> <pre><code>AND Convert(datetime, Conv...
[ { "answer_id": 22809, "author": "Darren Kopp", "author_id": 77, "author_profile": "https://Stackoverflow.com/users/77", "pm_score": -1, "selected": false, "text": "ep.EffectiveStartDate BETWEEN @date1 AND @date2\n declare @date1 datetime, @date2 datetime; \nset @date1 = cast('10/1/2000'...
2008/08/22
[ "https://Stackoverflow.com/questions/22807", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2526/" ]
22,814
<p>I need to see the contents of the viewstate of an asp.net page. I looked for a viewstate decoder, found <a href="http://www.testingreflections.com/node/view/3424" rel="noreferrer">Fridz Onion's ViewState Decoder</a> but it asks for the url of a page to get its viewstate. Since my viewstate is formed after a postback...
[ { "answer_id": 10605023, "author": "Sameer Alibhai", "author_id": 2343, "author_profile": "https://Stackoverflow.com/users/2343", "pm_score": 4, "selected": false, "text": "using System;\nusing System.Collections;\nusing System.Text;\nusing System.IO;\nusing System.Web.UI;\n\n\nnamespace...
2008/08/22
[ "https://Stackoverflow.com/questions/22814", "https://Stackoverflow.com", "https://Stackoverflow.com/users/31505/" ]
22,816
<p>I know the following libraries for drawing charts in an SWT/Eclipse RCP application:</p> <ul> <li><a href="http://www.eclipse.org/articles/article.php?file=Article-BIRTChartEngine/index.html" rel="noreferrer">Eclipse BIRT Chart Engine</a> (Links to an article on how to use it)</li> <li><a href="http://www.jfree.org...
[ { "answer_id": 43112, "author": "Ryan P", "author_id": 1539, "author_profile": "https://Stackoverflow.com/users/1539", "pm_score": 5, "selected": true, "text": "Composite comp = new Composite(parent, SWT.NONE | SWT.EMBEDDED);\nFrame frame = SWT_AWT.new_Frame(comp);\nJFreeChart chart = cr...
2008/08/22
[ "https://Stackoverflow.com/questions/22816", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1793/" ]
22,836
<p>In Perl, what is a good way to perform a replacement on a string using a regular expression and store the value in a different variable, without changing the original?</p> <p>I usually just copy the string to a new variable then bind it to the <code>s///</code> regex that does the replacement on the new string, but...
[ { "answer_id": 22896, "author": "John Siracusa", "author_id": 164, "author_profile": "https://Stackoverflow.com/users/164", "pm_score": 9, "selected": true, "text": "(my $newstring = $oldstring) =~ s/foo/bar/g;\n /r my $newstring = $oldstring =~ s/foo/bar/gr; \n g perldoc perlrequick" ...
2008/08/22
[ "https://Stackoverflow.com/questions/22836", "https://Stackoverflow.com", "https://Stackoverflow.com/users/277/" ]
22,879
<p>I'm able to connect to and read an excel file no problem. But when importing data such as zipcodes that have leading zeros, how do you prevent excel from guessing the datatype and in the process stripping out leading zeros?</p>
[ { "answer_id": 22908, "author": "palehorse", "author_id": 312, "author_profile": "https://Stackoverflow.com/users/312", "pm_score": 4, "selected": true, "text": "Provider=Microsoft.ACE.OLEDB.12.0;\n Data Source=c:\\path\\to\\myfile.xlsx;\n Extended Properties=\\\"Excel 12.0 Xml;IME...
2008/08/22
[ "https://Stackoverflow.com/questions/22879", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1874/" ]
22,880
<p>Specifically this is regarding when using a client session cookie to identify a session on the server.</p> <p>Is the best answer to use SSL/HTTPS encryption for the entire web site, and you have the best guarantee that no man in the middle attacks will be able to sniff an existing client session cookie?</p> <p>And...
[ { "answer_id": 6532807, "author": "Nima", "author_id": 822755, "author_profile": "https://Stackoverflow.com/users/822755", "pm_score": -1, "selected": false, "text": "$ip=$_SERVER['REMOTE_ADDER'];\n$_SESSEION['ip']=$ip;\n" }, { "answer_id": 19726572, "author": "Alexandru", ...
2008/08/22
[ "https://Stackoverflow.com/questions/22880", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1341/" ]
22,909
<p>I want to show HTML content inside Flash. Is there some way to do this? I am talking about full blown HTML (with JavaScript if possible).</p>
[ { "answer_id": 22921, "author": "Theo", "author_id": 1109, "author_profile": "https://Stackoverflow.com/users/1109", "pm_score": 1, "selected": false, "text": "htmlText" } ]
2008/08/22
[ "https://Stackoverflow.com/questions/22909", "https://Stackoverflow.com", "https://Stackoverflow.com/users/184/" ]
22,935
<p>Does anyone have a technique for generating SQL table create (and data insert) commands pragmatically from a CSV (or sheet in a .xls) file? </p> <p>I've got a third party database system which I'd like to populate with data from a csv file (or sheet in a xls file) but the importer supplied can't create the table s...
[ { "answer_id": 22948, "author": "SQLMenace", "author_id": 740, "author_profile": "https://Stackoverflow.com/users/740", "pm_score": 2, "selected": true, "text": "SELECT * INTO NewTablenNmeHere\nFROM OPENROWSET( 'Microsoft.Jet.OLEDB.4.0', \n'Excel 8.0;Database=C:\\testing.xls','SELECT * F...
2008/08/22
[ "https://Stackoverflow.com/questions/22935", "https://Stackoverflow.com", "https://Stackoverflow.com/users/39040/" ]
22,976
<p>I've got a JavaScript "object", built this way:</p> <pre><code>function foo() { this.length = 0; } foo.prototype.getLength = function() { return this.length; } ... </code></pre> <p>I know how to emulate namespaces with singleton JavaScript objects, but what is the best way to "namepace" an object such as...
[ { "answer_id": 22998, "author": "Nickolay", "author_id": 1026, "author_profile": "https://Stackoverflow.com/users/1026", "pm_score": 2, "selected": false, "text": "namespace.foo = function foo() {...}\nnamespace.foo.prototype.getLength = function() { ... }\n (function() {\n function foo...
2008/08/22
[ "https://Stackoverflow.com/questions/22976", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2536/" ]
22,979
<p>I'm looking for a way to poll different servers and check that SQL server is up and running. I'm writing my code in C#. I don't particularly care about individual databases, just that SQL server is running and responsive.</p> <p>Any ideas?</p>
[ { "answer_id": 451160, "author": "Benjamin Autin", "author_id": 1440933, "author_profile": "https://Stackoverflow.com/users/1440933", "pm_score": 2, "selected": false, "text": "System.Data.Sql.SqlDataSourceEnumerator" } ]
2008/08/22
[ "https://Stackoverflow.com/questions/22979", "https://Stackoverflow.com", "https://Stackoverflow.com/users/178/" ]
22,988
<p>I have several "ASP:TextBox" controls on a form (about 20).<br> When the form loads, the text boxes are populated from a database.<br> The user can change the populated values, and when they submit the form, I take the values posted to the server and conditionally save them (determined by some business logic).<br> A...
[ { "answer_id": 23058, "author": "Jon Erickson", "author_id": 1950, "author_profile": "https://Stackoverflow.com/users/1950", "pm_score": 3, "selected": false, "text": "protected void Page_Load(object sender, EventArgs e)\n{\n if (!Page.IsPostBack)\n {\n // populate text boxe...
2008/08/22
[ "https://Stackoverflow.com/questions/22988", "https://Stackoverflow.com", "https://Stackoverflow.com/users/418/" ]
23,027
<p>While setting up CruiseControl, I added a buildpublisher block to the publisher tasks:</p> <pre><code>&lt;buildpublisher&gt; &lt;sourceDir&gt;C:\MyBuild\&lt;/sourceDir&gt; &lt;publishDir&gt;C:\MyBuildPublished\&lt;/publishDir&gt; &lt;alwaysPublish&gt;false&lt;/alwaysPublish&gt; &lt;/buildpublisher&gt; </code...
[ { "answer_id": 32681, "author": "Mike", "author_id": 2848, "author_profile": "https://Stackoverflow.com/users/2848", "pm_score": 1, "selected": false, "text": "<MSBuild Projects=\"@(VSProjects)\"\n Properties=\"Configuration=$(Configuration)\">\n <Output TaskParameter=\"TargetOutputs\"...
2008/08/22
[ "https://Stackoverflow.com/questions/23027", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1965/" ]
23,083
<p>In the Windows applications I work on, we have a custom framework that sits directly above Win32 (don't ask). When we create a window, our normal practice is to put <code>this</code> in the window's user data area via <code>SetWindowLong(hwnd, GWL_USERDATA, this)</code>, which allows us to have an MFC-like callback...
[ { "answer_id": 23101, "author": "Chris", "author_id": 2134, "author_profile": "https://Stackoverflow.com/users/2134", "pm_score": 6, "selected": true, "text": "LONG_PTR SetWindowLongPtr( \n HWND hWnd,\n int nIndex,\n LONG_PTR dwNewLong\n);\n SetWindowLongPtr(hWnd, GWLP_USER...
2008/08/22
[ "https://Stackoverflow.com/questions/23083", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2354/" ]
23,094
<p>What's the best way to handle a user going back to a page that had cached items in an asp.net app? Is there a good way to capture the back button (event?) and handle the cache that way?</p>
[ { "answer_id": 24334, "author": "travis", "author_id": 1414, "author_profile": "https://Stackoverflow.com/users/1414", "pm_score": 4, "selected": true, "text": "Response.Cache.SetExpires(DateTime.Now.AddSeconds(60));\nResponse.Cache.SetCacheability(HttpCacheability.Public);\nResponse.Cac...
2008/08/22
[ "https://Stackoverflow.com/questions/23094", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1874/" ]
23,102
<p>I'm pretty green still when it comes to web programming, I've spent most of my time on client applications. So I'm curious about the common exploits I should fear/test for in my site.</p>
[ { "answer_id": 23116, "author": "Rob Cooper", "author_id": 832, "author_profile": "https://Stackoverflow.com/users/832", "pm_score": 3, "selected": false, "text": "bool UserCredentialsOK(User user)\n{\n\n if (user.Name == \"modesty\")\n return false;\n else\n // perfo...
2008/08/22
[ "https://Stackoverflow.com/questions/23102", "https://Stackoverflow.com", "https://Stackoverflow.com/users/580/" ]
23,106
<p>What is the best method to parse multiple, discrete, custom XML documents with Java?</p>
[ { "answer_id": 23121, "author": "jcsalterego", "author_id": 1416, "author_profile": "https://Stackoverflow.com/users/1416", "pm_score": 2, "selected": false, "text": "org.xml.sax.XMLReader" }, { "answer_id": 5299265, "author": "Valdis", "author_id": 438990, "author_pr...
2008/08/22
[ "https://Stackoverflow.com/questions/23106", "https://Stackoverflow.com", "https://Stackoverflow.com/users/828/" ]
23,124
<p>As the title mentions, I have a timeout callback handler on an ajax call, and I want to be able to test that condition but nothing is coming to mind immediately on ways I can force my application to hit that state, any suggestions?</p>
[ { "answer_id": 23131, "author": "Andy", "author_id": 1993, "author_profile": "https://Stackoverflow.com/users/1993", "pm_score": 2, "selected": false, "text": "<?php\n sleep(10); //sleep for 10 seconds.\n print \"This script has finished.\";\n>\n" }, { "answer_id": 23227, ...
2008/08/22
[ "https://Stackoverflow.com/questions/23124", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2272/" ]
23,169
<p>When using Groovy <code>MarkupBuilder</code>, I have places where I need to output text into the document, or call a function which outputs text into the document. Currently, I'm using the undefined tag <em>"text"</em> to do the output. Is there a better way to write this code?</p> <pre><code>li { text("${type.g...
[ { "answer_id": 23734, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 2, "selected": false, "text": "void text(n){\n builder.yield n\n}\n" }, { "answer_id": 81815, "author": "Hank Gay", "author_id": 4203, ...
2008/08/22
[ "https://Stackoverflow.com/questions/23169", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
23,175
<p>This is mostly geared toward desktop application developers. <br />How do I design a caching block which plays nicely with the GC? <br />How do I tell the GC that I have just done a cache sweep and it is time to do a GC? <br />How do I get an accurate measure of when it is time to do a cache sweep?</p> <p>Are th...
[ { "answer_id": 23734, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 2, "selected": false, "text": "void text(n){\n builder.yield n\n}\n" }, { "answer_id": 81815, "author": "Hank Gay", "author_id": 4203, ...
2008/08/22
[ "https://Stackoverflow.com/questions/23175", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1490/" ]
23,178
<p>Is there a .NET variable that returns the "All Users" directory?</p>
[ { "answer_id": 23194, "author": "Kibbee", "author_id": 1862, "author_profile": "https://Stackoverflow.com/users/1862", "pm_score": 4, "selected": true, "text": "system.environment System.Environment.GetEnvironmentVariable(\"ALLUSERSPROFILE\")\n" }, { "answer_id": 23202, "auth...
2008/08/22
[ "https://Stackoverflow.com/questions/23178", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1632/" ]
23,190
<p>I am working on a function to establish the entropy of a distribution. It uses a copula, if any are familiar with that. I need to sum up the values in the array based on which dimensions are &quot;cared about.&quot;</p> <p>Example: Consider the following example...</p> <pre> Dimension 0 (across) _ _ _ _ _ _ _ _ _...
[ { "answer_id": 23275, "author": "nlucaroni", "author_id": 157, "author_profile": "https://Stackoverflow.com/users/157", "pm_score": 0, "selected": false, "text": "[1] --> [1,2,3,4,5,6,...]\n[2] --> [1,2,3,4,5,6,...]\n[3] --> [1,2,3,4,5,6,...]\n[4] --> [1,2,3,4,5,6,...]\n[5] --> [1,2,3,4,...
2008/08/22
[ "https://Stackoverflow.com/questions/23190", "https://Stackoverflow.com", "https://Stackoverflow.com/users/522/" ]
23,197
<p>I have a library that reads/writes to a USB-device using CreateFile() API. The device happens to implement the HID-device profile, such that it's compatible with Microsoft's HID class driver.</p> <p>Some other application installed on the system is opening the device in read/write mode with no share mode. Which pre...
[ { "answer_id": 23219, "author": "Eric Z Beard", "author_id": 1219, "author_profile": "https://Stackoverflow.com/users/1219", "pm_score": 1, "selected": false, "text": "//Open file on the device\ndeviceHandle = \n CreateFile (deviceDetail->DevicePath, \n GENERIC_READ, FILE_SHARE_REA...
2008/08/22
[ "https://Stackoverflow.com/questions/23197", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2146/" ]
23,209
<p>I'm building an application against some legacy, third party libraries, and having problems with the linking stage. I'm trying to compile with Visual Studio 9. My compile command is:</p> <pre><code>cl -DNT40 -DPOMDLL -DCRTAPI1=_cdecl -DCRTAPI2=cdecl -D_WIN32 -DWIN32 -DWIN32_LEAN_AND_MEAN -DWNT -DBYPASS_FLEX -D_IN...
[ { "answer_id": 44886, "author": "Henk", "author_id": 4613, "author_profile": "https://Stackoverflow.com/users/4613", "pm_score": 2, "selected": false, "text": "DEFAULTLIB:\"libc\npmtd\" /DEFAULTLI\nB:\"uuid.lib\" /DE\nFAULTLIB:\"uuid.l\nib\" /include:?id\n@?$num_put@DV?$o\nstreambuf_iter...
2008/08/22
[ "https://Stackoverflow.com/questions/23209", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1322/" ]
23,216
<p>I can never remember the differences in regular expression syntax used by tools like <a href="http://en.wikipedia.org/wiki/Grep" rel="noreferrer">grep</a> and <a href="http://en.wikipedia.org/wiki/AWK" rel="noreferrer">AWK</a>, or languages like Python and PHP. Generally, Perl has the most expansive syntax, but I'm ...
[ { "answer_id": 23232, "author": "yukondude", "author_id": 726, "author_profile": "https://Stackoverflow.com/users/726", "pm_score": 4, "selected": false, "text": "grep egrep" } ]
2008/08/22
[ "https://Stackoverflow.com/questions/23216", "https://Stackoverflow.com", "https://Stackoverflow.com/users/726/" ]
23,217
<p>I've been making a concerted effort to improve my javascript skills lately by reading as much javascript code as I can. In doing this I've sometimes seen the <code>javascript:</code> prefix appended to the front of event handler attributes in HTML element tags. What's the purpose of this prefix? Basically, is there ...
[ { "answer_id": 23222, "author": "TheSmurf", "author_id": 1975282, "author_profile": "https://Stackoverflow.com/users/1975282", "pm_score": 5, "selected": true, "text": "javascript: href href onclick <a href=\"javascript:someFunction();\">Blah</a>\n <a href=\"\" onclick=\"someFunction();\...
2008/08/22
[ "https://Stackoverflow.com/questions/23217", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1680/" ]
23,228
<p>Compare</p> <pre><code>String.Format("Hello {0}", "World"); </code></pre> <p>with</p> <pre><code>"Hello {0}".Format("World"); </code></pre> <p>Why did the .Net designers choose a static method over an instance method? What do you think?</p>
[ { "answer_id": 23248, "author": "Dan Blair", "author_id": 1327, "author_profile": "https://Stackoverflow.com/users/1327", "pm_score": 1, "selected": false, "text": "String.Format() Int32.Parse() long.TryParse() StringBuilder StringBuilder.AppendFormat()" }, { "answer_id": 23253, ...
2008/08/22
[ "https://Stackoverflow.com/questions/23228", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2361/" ]
23,250
<p>I was curious about how other people use the <strong>this</strong> keyword. I tend to use it in constructors, but I may also use it throughout the class in other methods. Some examples:</p> <p>In a constructor:</p> <pre><code>public Light(Vector v) { this.dir = new Vector(v); } </code></pre> <p>Elsewhere</p> ...
[ { "answer_id": 23264, "author": "Corey", "author_id": 1595, "author_profile": "https://Stackoverflow.com/users/1595", "pm_score": 7, "selected": false, "text": "class Vector3\n{\n float x;\n float y;\n float z;\n\n public Vector3(float x, float y, float z)\n {\n thi...
2008/08/22
[ "https://Stackoverflow.com/questions/23250", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2016/" ]
23,277
<p>I've read the Wikipedia articles for both <a href="http://en.wikipedia.org/wiki/Procedural_programming" rel="noreferrer">procedural programming</a> and <a href="http://en.wikipedia.org/wiki/Functional_programming" rel="noreferrer">functional programming</a>, but I'm still slightly confused. Could someone boil it dow...
[ { "answer_id": 23693, "author": "Brad Gilbert", "author_id": 1337, "author_profile": "https://Stackoverflow.com/users/1337", "pm_score": 7, "selected": false, "text": "sub factorial ( UInt:D $n is copy ) returns UInt {\n\n # modify \"outside\" state\n state $call-count++;\n # in this ...
2008/08/22
[ "https://Stackoverflow.com/questions/23277", "https://Stackoverflow.com", "https://Stackoverflow.com/users/572/" ]
23,287
<p>What is the best approach to calculating the largest prime factor of a number?</p> <p>I'm thinking the most efficient would be the following:</p> <ol> <li>Find lowest prime number that divides cleanly</li> <li>Check if result of division is prime</li> <li>If not, find next lowest</li> <li>Go to 2.</li> </ol> <p>I...
[ { "answer_id": 31235, "author": "palotasb", "author_id": 3063, "author_profile": "https://Stackoverflow.com/users/3063", "pm_score": -1, "selected": false, "text": "N return(N) Sqrt(N) N is divisible by Prime Return(Prime)" }, { "answer_id": 202429, "author": "Ralph M. Ricken...
2008/08/22
[ "https://Stackoverflow.com/questions/23287", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1951/" ]
23,372
<p>What would be the best method for getting a custom element (that is using J2ME native Graphics) painted on LWUIT elements?</p> <p>The custom element is an implementation from mapping library, that paints it's content (for example Google map) to Graphics object. How would it be possible to paint the result directly ...
[ { "answer_id": 86279, "author": "Honza", "author_id": 8621, "author_profile": "https://Stackoverflow.com/users/8621", "pm_score": 2, "selected": false, "text": "private Image buffer = null; // keep this\n\nint[] bufferArray = new int[desiredWidth * desiredHeight];\njavax.microedition.lcd...
2008/08/22
[ "https://Stackoverflow.com/questions/23372", "https://Stackoverflow.com", "https://Stackoverflow.com/users/706/" ]
23,376
<p>Has anyone found a good compression format for MS Sqlserver databases? If so, what do you use and are you pleased with how it performs? </p> <p>My company frequently will compress a database snapshot from one of our clients and download it so we have a local copy for testing and dev purposes. We tried zip in the pa...
[ { "answer_id": 26428, "author": "dlamblin", "author_id": 459, "author_profile": "https://Stackoverflow.com/users/459", "pm_score": 1, "selected": false, "text": "cat file | gzip > file.gz" }, { "answer_id": 73290927, "author": "MrCalvin", "author_id": 3175384, "author...
2008/08/22
[ "https://Stackoverflow.com/questions/23376", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2188/" ]
23,397
<p>How do I implement some logic that will allow me to reproduce on Windows the functionality that I have on Linux with the <code>fork()</code> system call, using Python?</p> <p>I'm specifically trying to execute a method on the SAPI Com component, while continuing the other logic in the main thread without blocking o...
[ { "answer_id": 23510, "author": "Eli Courtwright", "author_id": 1694, "author_profile": "https://Stackoverflow.com/users/1694", "pm_score": 2, "selected": false, "text": " from threading import Thread\n \n def separate_computations(x, y):\n print sum(x for i in range(y)) ...
2008/08/22
[ "https://Stackoverflow.com/questions/23397", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2555/" ]
23,399
<p>I've got an interesting design question. I'm designing the security side of our project, to allow us to have different versions of the program for different costs and also to allow Manager-type users to grant or deny access to parts of the program to other users. Its going to web-based and hosted on our servers.</...
[ { "answer_id": 23432, "author": "Eric Z Beard", "author_id": 1219, "author_profile": "https://Stackoverflow.com/users/1219", "pm_score": 3, "selected": true, "text": "UserResources\n-------------\nUserId FK->Users\nResourceId FK->Resources\n if exists (select 1 from UserResources \nwhere...
2008/08/22
[ "https://Stackoverflow.com/questions/23399", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1470/" ]
23,445
<p>I have two collections of the same object, <code>Collection&lt;Foo&gt; oldSet</code> and <code>Collection&lt;Foo&gt; newSet</code>. The required logic is as follow:</p> <ul> <li>if <code>foo</code> is in(*) <code>oldSet</code> but not <code>newSet</code>, call <code>doRemove(foo)</code></li> <li>else if <code>foo<...
[ { "answer_id": 23944, "author": "martinatime", "author_id": 1353, "author_profile": "https://Stackoverflow.com/users/1353", "pm_score": 4, "selected": false, "text": "Collection<Foo> oldSet = ...;\nCollection<Foo> newSet = ...;\n\nprivate Collection difference(Collection a, Collection b)...
2008/08/22
[ "https://Stackoverflow.com/questions/23445", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2551/" ]
23,446
<p>Have just started using Visual Studio Professional's built-in unit testing features, which as I understand, uses MS Test to run the tests.</p> <p>The .trx file that the tests produce is xml, but was wondering if there was an easy way to convert this file into a more "manager-friendly" format?</p> <p>My ultimate go...
[ { "answer_id": 289473, "author": "Preet Sangha", "author_id": 30225, "author_profile": "https://Stackoverflow.com/users/30225", "pm_score": 2, "selected": false, "text": "<xsl:stylesheet version=\"2.0\" \n xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\"\n ...
2008/08/22
[ "https://Stackoverflow.com/questions/23446", "https://Stackoverflow.com", "https://Stackoverflow.com/users/443/" ]
23,448
<p>Has anyone worked with <a href="http://www.google.com.br/url?sa=t&amp;ct=res&amp;cd=1&amp;url=http%3A%2F%2Fen.wikipedia.org%2Fwiki%2FDomain-specific_programming_language&amp;ei=QyWvSIXcC4foebjSlHs&amp;usg=AFQjCNFsZOnJm-AGmi5sxai8YI-0Al6wfA&amp;sig2=6nX5EkUmNkEwiSKAkUeyZQ" rel="noreferrer">DSLs (Domain Specific Langu...
[ { "answer_id": 31770859, "author": "SemanticBeeng", "author_id": 4032515, "author_profile": "https://Stackoverflow.com/users/4032515", "pm_score": 1, "selected": false, "text": " object Main extends App {\n //Required for doing LocalDate comparisons...a scalaism\n implicit val LocalDa...
2008/08/22
[ "https://Stackoverflow.com/questions/23448", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2015/" ]
23,511
<p>I'm working with Subversion based on Windows and would like to write an easy utility in .NET for working with the Apache password file. I understand that it uses a function referred to as MD5Crypt, but I can't seem to find a description of the algorithm beyond that at some point it uses MD5 to create a hash.</p> <...
[ { "answer_id": 23557, "author": "Mark Harrison", "author_id": 116, "author_profile": "https://Stackoverflow.com/users/116", "pm_score": 2, "selected": false, "text": "System.Security.Cryptography.MD5CryptoServiceProvider md5 = new\nSystem.Security.Cryptography.MD5CryptoServiceProvider();...
2008/08/22
[ "https://Stackoverflow.com/questions/23511", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1954/" ]
23,566
<p>On IIS 6, what does an IIS reset do? </p> <p>Please compare to recycling an app pool and stopping and starting an ASP.NET web site.</p> <p>If you replace a DLL or edit/replace the web.config on an ASP.NET web site is that the same as stopping and starting that web site?</p>
[ { "answer_id": 23573, "author": "Michael Stum", "author_id": 91, "author_profile": "https://Stackoverflow.com/users/91", "pm_score": 3, "selected": false, "text": "web.config /bin" }, { "answer_id": 23581, "author": "jonezy", "author_id": 2272, "author_profile": "http...
2008/08/22
[ "https://Stackoverflow.com/questions/23566", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1463/" ]
23,569
<p>How do you calculate the distance between 2 cities? </p>
[ { "answer_id": 23632, "author": "Jared Updike", "author_id": 2543, "author_profile": "https://Stackoverflow.com/users/2543", "pm_score": 1, "selected": false, "text": "// Cities are points x0,y0 and x1,y1 in kilometers or miles or Smoots[1]\ndx = x1 - x0;\ndy = y1 - y0;\ndist = sqrt(dx*d...
2008/08/22
[ "https://Stackoverflow.com/questions/23569", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2141/" ]
23,578
<p>And on top of that, are there cases where one has to use the global assembly cache or where one cannot use it?</p>
[ { "answer_id": 23635, "author": "Kev", "author_id": 419, "author_profile": "https://Stackoverflow.com/users/419", "pm_score": 4, "selected": false, "text": "AllowPartiallyTrustedCallers [PermissionSet(SecurityAction.Assert, Unrestricted=true)]\n" } ]
2008/08/22
[ "https://Stackoverflow.com/questions/23578", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2374/" ]
23,603
<p>I'm developing a library alongside several projects that use it, and I've found myself frequently modifying the library at the same time as a project (e.g., adding a function to the library and immediately using it in the project).<br> As a result, the project would no longer compile with previous versions of the li...
[ { "answer_id": 23702, "author": "tghw", "author_id": 2363, "author_profile": "https://Stackoverflow.com/users/2363", "pm_score": 2, "selected": false, "text": "/\n /trunk\n /tags\n /branches\n svn copy trunk/ tags/TagName\n" }, { "answer_id": 23816, "author": "Orion Edward...
2008/08/22
[ "https://Stackoverflow.com/questions/23603", "https://Stackoverflow.com", "https://Stackoverflow.com/users/112/" ]
23,620
<p>I'm using TinyMCE in an ASP.Net project, and I need a spell check. The only TinyMCE plugins I've found use PHP on the server side, and I guess I could just break down and install PHP on my server and do that, but quite frankly, what a pain. I don't want to do that.</p> <p>As it turns out, Firefox's built-in spell c...
[ { "answer_id": 23733, "author": "Shog9", "author_id": 811, "author_profile": "https://Stackoverflow.com/users/811", "pm_score": 2, "selected": false, "text": "gecko_spellcheck tinyMCE.init() tinyMCE.init({\n mode : \"textareas\",\n theme : \"simple\",\n gecko_spellcheck : true\n...
2008/08/22
[ "https://Stackoverflow.com/questions/23620", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2527/" ]
23,689
<p>Does anyone know of a .NET date/time parser similar to <a href="http://chronic.rubyforge.org/" rel="noreferrer">Chronic for Ruby</a> (handles stuff like "tomorrow" or "3pm next thursday")?</p> <p>Note: I do write Ruby (which is how I know about Chronic) but this project must use .NET.</p>
[ { "answer_id": 23833, "author": "Burton", "author_id": 1493, "author_profile": "https://Stackoverflow.com/users/1493", "pm_score": 2, "selected": false, "text": "Private Function ConvertDateTimeToStringRelativeToNow(ByVal d As DateTime) As String\n Dim diff As TimeSpan = DateTime.Now(...
2008/08/22
[ "https://Stackoverflow.com/questions/23689", "https://Stackoverflow.com", "https://Stackoverflow.com/users/521/" ]
23,715
<p>Has anyone had any success running two different web servers -- such as Apache and CherryPy -- alongside each other on the same machine? I am experimenting with other web servers right now, and I'd like to see if I can do my experiments while keeping my other sites up and running. You could say that this isn't so ...
[ { "answer_id": 23732, "author": "Gary Richardson", "author_id": 2506, "author_profile": "https://Stackoverflow.com/users/2506", "pm_score": 4, "selected": true, "text": "NameVirtualHost *\n<virtualhost *>\n ServerName other.site.com\n\n # assumes CherryPy listens on port 8080\n ProxyP...
2008/08/22
[ "https://Stackoverflow.com/questions/23715", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2321/" ]
23,755
<p>When implementing a needle search of a haystack in an object-oriented way, you essentially have three alternatives:</p> <pre><code>1. needle.find(haystack) 2. haystack.find(needle) 3. searcher.find(needle, haystack)</code></pre> <p>Which do you prefer, and why?</p> <p>I know some people prefer the second altern...
[ { "answer_id": 23756, "author": "Konrad Rudolph", "author_id": 1968, "author_profile": "https://Stackoverflow.com/users/1968", "pm_score": 3, "selected": false, "text": "needle.find(haystack) haystack.find(needle) haystack.find(needle)" }, { "answer_id": 23769, "author": "Mik...
2008/08/22
[ "https://Stackoverflow.com/questions/23755", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1709/" ]
23,763
<p>I'm working on some code to colorize an image in Java. Basically what I'd like to do is something along the lines of GIMP's colorize command, so that if I have a BufferedImage and a Color, I can colorize the Image with the given color. Anyone got any ideas? My current best guess at doing something like this is to ge...
[ { "answer_id": 23795, "author": "Nick", "author_id": 1490, "author_profile": "https://Stackoverflow.com/users/1490", "pm_score": 3, "selected": false, "text": "Y = 0.3*R + 0.59*G + 0.11*B ((R1+Y)/2,(G1+Y)/2,(B1+Y)/2) (R1,G1,B1)" }, { "answer_id": 27185, "author": "Bernie Pere...
2008/08/22
[ "https://Stackoverflow.com/questions/23763", "https://Stackoverflow.com", "https://Stackoverflow.com/users/85/" ]
23,787
<p>What is the best way to find something in a list? I know LINQ has some nice tricks, but let's also get suggestions for C# 2.0. Lets get the best refactorings for this common code pattern.</p> <p>Currently I use code like this:</p> <pre><code>// mObjList is a List&lt;MyObject&gt; MyObject match = null; foreach (M...
[ { "answer_id": 23794, "author": "Konrad Rudolph", "author_id": 1968, "author_profile": "https://Stackoverflow.com/users/1968", "pm_score": 1, "selected": false, "text": "break T Find<T>(IEnumerable<T> items, Predicate<T> p) {\n foreach (T item in items)\n if (p(item))\n ...
2008/08/23
[ "https://Stackoverflow.com/questions/23787", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1490/" ]
23,802
<p>I'm wondering what the best practice is for handling the problem with having to "include" so many files in my PHP scripts in order to ensure that all the classes I need to use are accessible to my script. </p> <p>Currently, I'm just using <a href="http://php.net/manual/en/function.include-once.php" rel="nofollow no...
[ { "answer_id": 23805, "author": "Konrad Rudolph", "author_id": 1968, "author_profile": "https://Stackoverflow.com/users/1968", "pm_score": 0, "selected": false, "text": "__autoload __autoload" }, { "answer_id": 23806, "author": "JasonMichael", "author_id": 1935, "auth...
2008/08/23
[ "https://Stackoverflow.com/questions/23802", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1862/" ]
23,853
<p>I am using Struts + Velocity in a Java application, but after I submit a form, the confirmation page (Velocity template) shows the variable names instead an empty label, like the Age in following example:</p> <blockquote> <p><strong>Name</strong>: Fernando</p> <p><strong>Age</strong>: {person.age}</p> <p><strong>Sex...
[ { "answer_id": 23879, "author": "Jason Sparks", "author_id": 512, "author_profile": "https://Stackoverflow.com/users/512", "pm_score": 7, "selected": true, "text": "$!variable\n" } ]
2008/08/23
[ "https://Stackoverflow.com/questions/23853", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2274/" ]
23,867
<p>The <code>Close</code> method on an <code>ICommunicationObject</code> can throw two types of exceptions as MSDN outlines <a href="http://msdn.microsoft.com/en-us/library/ms195520.aspx" rel="nofollow noreferrer">here</a>. I understand why the <code>Close</code> method can throw those exceptions, but what I don't unde...
[ { "answer_id": 23879, "author": "Jason Sparks", "author_id": 512, "author_profile": "https://Stackoverflow.com/users/512", "pm_score": 7, "selected": true, "text": "$!variable\n" } ]
2008/08/23
[ "https://Stackoverflow.com/questions/23867", "https://Stackoverflow.com", "https://Stackoverflow.com/users/781/" ]
23,899
<p>I've got to do some significant development in a large, old, spaghetti-ridden ASP system. I've been away from ASP for a long time, focusing my energies on Rails development.</p> <p>One basic step I've taken is to refactor pages into subs and functions with meaningful names, so that at least it's easy to understand @...
[ { "answer_id": 60404, "author": "Christopher Mahan", "author_id": 479, "author_profile": "https://Stackoverflow.com/users/479", "pm_score": 5, "selected": true, "text": "<font size=3>crap</font>" } ]
2008/08/23
[ "https://Stackoverflow.com/questions/23899", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2477/" ]
23,907
<p>Basically I want to get the number of lines-of-code in the repository after each commit.</p> <p>The only (really crappy) ways I have found is to use <code>git filter-branch</code> to run <code>wc -l *</code>, and a script that runs <code>git reset --hard</code> on each commit, then runs <code>wc -l</code></p> <p>T...
[ { "answer_id": 35664, "author": "fserb", "author_id": 3702, "author_profile": "https://Stackoverflow.com/users/3702", "pm_score": 5, "selected": false, "text": "git log --shortstat --reverse --pretty=oneline\n #!/usr/bin/python\n\n\"\"\"\nDisplay the per-commit size of the current git br...
2008/08/23
[ "https://Stackoverflow.com/questions/23907", "https://Stackoverflow.com", "https://Stackoverflow.com/users/745/" ]
23,918
<p>I'm trying to do a simple rotation in OpenGL but must be missing the point. I'm not looking for a specific fix so much as a quick explanation or link that explains OpenGL rotation more generally.</p> <p>At the moment I have code like this:</p> <pre><code>glPushMatrix(); glRotatef(90.0, 0.0, 1.0, 0.0); glBegin(...
[ { "answer_id": 23925, "author": "spate", "author_id": 2276, "author_profile": "https://Stackoverflow.com/users/2276", "pm_score": 3, "selected": false, "text": "glMatrixMode(GL_MODELVIEW);\n" } ]
2008/08/23
[ "https://Stackoverflow.com/questions/23918", "https://Stackoverflow.com", "https://Stackoverflow.com/users/364/" ]
23,930
<p>I want to see all the different ways you can come up with, for a factorial subroutine, or program. The hope is that anyone can come here and see if they might want to learn a new language.</p> <h2>Ideas:</h2> <ul> <li>Procedural</li> <li>Functional</li> <li>Object Oriented</li> <li>One liners</li> <li>Obfuscated</li...
[ { "answer_id": 23932, "author": "Brad Gilbert", "author_id": 1337, "author_profile": "https://Stackoverflow.com/users/1337", "pm_score": 2, "selected": false, "text": "multi factorial ( Int $n where { $n <= 0 } ){\n return 1;\n}\nmulti factorial ( Int $n ){\n return $n * factorial( $n...
2008/08/23
[ "https://Stackoverflow.com/questions/23930", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1337/" ]
23,931
<p>Given two different image files (in whatever format I choose), I need to write a program to predict the chance if one being the illegal copy of another. The author of the copy may do stuff like rotating, making negative, or adding trivial details (as well as changing the dimension of the image).</p> <p>Do you know ...
[ { "answer_id": 3445087, "author": "Tom Gullen", "author_id": 356635, "author_profile": "https://Stackoverflow.com/users/356635", "pm_score": 8, "selected": false, "text": "white\nred\nblue\ngreen\nblack\n FFFFFF|000000|FDFD44|FFFFFF\n" }, { "answer_id": 3464874, "author": "na...
2008/08/23
[ "https://Stackoverflow.com/questions/23931", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
23,962
<p>For example, Look at the code that calculates the n-th Fibonacci number:</p> <pre><code>fib(int n) { if(n==0 || n==1) return 1; return fib(n-1) + fib(n-2); } </code></pre> <p>The problem with this code is that it will generate stack overflow error for any number greater than 15 (in most computers)....
[ { "answer_id": 23973, "author": "roo", "author_id": 716, "author_profile": "https://Stackoverflow.com/users/716", "pm_score": 1, "selected": false, "text": "class fibstorage {\n\n\n bool has-result(int n) { return fibresults.contains(n); }\n int get-result(int n) { return fibresult...
2008/08/23
[ "https://Stackoverflow.com/questions/23962", "https://Stackoverflow.com", "https://Stackoverflow.com/users/184/" ]
23,970
<p>Joe Van Dyk <a href="http://www.zenspider.com/pipermail/ruby/2008-August/004223.html" rel="noreferrer">asked the Ruby mailing list</a>:</p> <blockquote> <p>Hi,</p> <p>In Ruby, I guess you can't marshal a lambda/proc object, right? Is that possible in lisp or other languages?</p> <p>What I was trying ...
[ { "answer_id": 3705317, "author": "dominic", "author_id": 122875, "author_profile": "https://Stackoverflow.com/users/122875", "pm_score": 4, "selected": false, "text": "code = %{\n lambda {\"hello ruby code\".split(\" \").each{|e| puts e + \"!\"}}\n}\n eval code\n %{} %{ [] {} }" },...
2008/08/23
[ "https://Stackoverflow.com/questions/23970", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1190/" ]
23,996
<p>I'm working with <a href="http://webby.rubyforge.org" rel="nofollow noreferrer" title="Webby">Webby</a> and am looking for some clarification. Can I define attributes like <code>title</code> or <code>author</code> in my layout?</p>
[ { "answer_id": 26243, "author": "Mando Escamilla", "author_id": 1388162, "author_profile": "https://Stackoverflow.com/users/1388162", "pm_score": 2, "selected": true, "text": "SITE.page_defaults['title'] = \"My awesome title\"\nSITE.page_defaults['author'] = \"Shaz...
2008/08/23
[ "https://Stackoverflow.com/questions/23996", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2165/" ]
24,041
<p>I'm using markdown to edit this question right now. In some <a href="http://en.wikipedia.org/wiki/Wikipedia:How_to_edit_a_page#Wiki_markup" rel="noreferrer">wikis</a> I used wiki markup. Are they the same thing? Are they related? Please explain. If I want to implement one or the other in a web project (like stackove...
[ { "answer_id": 24093, "author": "Keith", "author_id": 905, "author_profile": "https://Stackoverflow.com/users/905", "pm_score": 7, "selected": false, "text": "<ul>\n <li>Item one</li>\n <li>Item two</li>\n</ul>\n * Item one\n* Item two\n" } ]
2008/08/23
[ "https://Stackoverflow.com/questions/24041", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1363/" ]
24,046
<p>I do some minor programming and web work for a local community college. Work that includes maintaining a very large and soul destroying website that consists of a hodge podge of VBScript, javascript, Dreamweaver generated cruft and a collection of add-ons that various conmen have convinced them to buy over the years...
[ { "answer_id": 24059, "author": "Stefan Ladwig", "author_id": 2585, "author_profile": "https://Stackoverflow.com/users/2585", "pm_score": 3, "selected": false, "text": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n<html>\n<head><title>Safari Back Button Test</title>...
2008/08/23
[ "https://Stackoverflow.com/questions/24046", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2051/" ]
24,109
<p>I want to expand my programming horizons to Linux. A good, dependable basic toolset is important, and what is more basic than an IDE?</p> <p>I could find these SO topics:</p> <ul> <li><a href="https://stackoverflow.com/questions/2756/lightweight-ide-for-linux">Lightweight IDE for linux</a> and</li> <li><a href="ht...
[ { "answer_id": 24156, "author": "Konrad Rudolph", "author_id": 1968, "author_profile": "https://Stackoverflow.com/users/1968", "pm_score": 5, "selected": false, "text": "man $ man toolname\n $ make make .gvimrc g++ ld gdb DDD gdb TextBox cmd.exe :tabe :e gt :help gt" }, { "answer...
2008/08/23
[ "https://Stackoverflow.com/questions/24109", "https://Stackoverflow.com", "https://Stackoverflow.com/users/46/" ]
24,130
<p>Which is better to use in PHP, a 2D array or a class? I've included an example of what I mean by this.</p> <pre><code>// Using a class class someClass { public $name; public $height; public $weight; function __construct($name, $height, $weight) { $this -&gt; name = $name; ...
[ { "answer_id": 24134, "author": "Brian Warshaw", "author_id": 1344, "author_profile": "https://Stackoverflow.com/users/1344", "pm_score": 4, "selected": true, "text": "weight getWeight() setWeight() setWeight() public function setWeight($weight)\n{\n if($weight >= 0)\n {\n $...
2008/08/23
[ "https://Stackoverflow.com/questions/24130", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1384652/" ]
24,168
<p>When writing database queries in something like TSQL or PLSQL, we often have a choice of iterating over rows with a cursor to accomplish the task, or crafting a single SQL statement that does the same job all at once.</p> <p>Also, we have the choice of simply pulling a large set of data back into our application an...
[ { "answer_id": 24211, "author": "Mark Brackett", "author_id": 2199, "author_profile": "https://Stackoverflow.com/users/2199", "pm_score": 4, "selected": false, "text": "--Cursor\nDECLARE @phoneNumber char(7)\nDECLARE c CURSOR LOCAL FAST_FORWARD FOR\n SELECT PhoneNumber FROM Customer WH...
2008/08/23
[ "https://Stackoverflow.com/questions/24168", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1219/" ]
24,200
<p>I am hitting some performance bottlenecks with my C# client inserting bulk data into a SQL Server 2005 database and I'm looking for ways in which to speed up the process.</p> <p>I am already using the SqlClient.SqlBulkCopy (which is based on TDS) to speed up the data transfer across the wire which helped a lot, but...
[ { "answer_id": 2899468, "author": "JohnB", "author_id": 287311, "author_profile": "https://Stackoverflow.com/users/287311", "pm_score": 5, "selected": false, "text": "--Disable Index ALTER INDEX [IX_Users_UserID] SalesDB.Users DISABLE\nGO\n--Enable Index ALTER INDEX [IX_Users_UserID] Sal...
2008/08/23
[ "https://Stackoverflow.com/questions/24200", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1948/" ]
24,207
<p>I'm trying to use “rusage” statistics in my program to get data similar to that of the <a href="http://en.wikipedia.org/wiki/Time_%28Unix%29" rel="nofollow noreferrer">time</a> tool. However, I'm pretty sure that I'm doing something wrong. The values seem about right but can be a bit weird at times. I didn't find go...
[ { "answer_id": 26827, "author": "Mike Haboustak", "author_id": 2146, "author_profile": "https://Stackoverflow.com/users/2146", "pm_score": 2, "selected": false, "text": "static int timeval_diff_ms(timeval const& end, timeval const& start) {\n int micro_seconds = (end.tv_sec - start.t...
2008/08/23
[ "https://Stackoverflow.com/questions/24207", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1968/" ]
24,221
<p>What is the purpose of annotations in Java? I have this fuzzy idea of them as somewhere in between a comment and actual code. Do they affect the program at run time?</p> <p>What are their typical usages?</p> <p>Are they unique to Java? Is there a C++ equivalent?</p>
[ { "answer_id": 24227, "author": "Konrad Rudolph", "author_id": 1968, "author_profile": "https://Stackoverflow.com/users/1968", "pm_score": 4, "selected": false, "text": "@Override" }, { "answer_id": 24335, "author": "Eli Courtwright", "author_id": 1694, "author_profil...
2008/08/23
[ "https://Stackoverflow.com/questions/24221", "https://Stackoverflow.com", "https://Stackoverflow.com/users/142/" ]
24,241
<p>Can you use windows hooks or other methods to do code injection with c#? I've seen lots of things about code injection but all of them are done in C/C++. I don't know either of those languages and have a really hard time translating. Does anyone have any ideas on how to do this?</p>
[ { "answer_id": 39620743, "author": "unknown6656", "author_id": 3902603, "author_profile": "https://Stackoverflow.com/users/3902603", "pm_score": 2, "selected": false, "text": "IntPtr _methodPtr IntPtr _methodPtrAux _methodPtr public static unsafe int? InjectAndRunX86ASM(this Func<int> de...
2008/08/23
[ "https://Stackoverflow.com/questions/24241", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2128/" ]
24,270
<p>As far as I can tell, in spite of the countless millions or billions spent on OOP education, languages, and tools, OOP has not improved developer productivity or software reliability, nor has it reduced development costs. Few people use OOP in any rigorous sense (few people adhere to or understand principles such as...
[ { "answer_id": 24331, "author": "Konrad Rudolph", "author_id": 1968, "author_profile": "https://Stackoverflow.com/users/1968", "pm_score": 4, "selected": false, "text": "HANDLE" }, { "answer_id": 24361, "author": "Konrad Rudolph", "author_id": 1968, "author_profile": ...
2008/08/23
[ "https://Stackoverflow.com/questions/24270", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2131/" ]
24,279
<p>In my second year of University we were "taught" Haskell, I know almost nothing about it and even less about functional programming.</p> <p>What is functional programming, why and/xor where would I want to use it instead of non-functional programming and am I correct in thinking that C is a non-functional programmi...
[ { "answer_id": 24301, "author": "John with waffle", "author_id": 279, "author_profile": "https://Stackoverflow.com/users/279", "pm_score": 2, "selected": false, "text": "SomeKindOfRecord<T> getOrCreate(T thing) { \n if(localMap.contains(thing)) { return localMap.get(thing); }\n Som...
2008/08/23
[ "https://Stackoverflow.com/questions/24279", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1384652/" ]
24,298
<p>I'm looking for a pre-built solution I can use in my RoR application. I'm ideally looking for something similar to the ASP.NET Forms authentication that provides email validation, sign-up controls, and allows users to reset their passwords. Oh yeah, and easily allows me to pull the user that is currently logged in...
[ { "answer_id": 741170, "author": "Brian Armstrong", "author_id": 76486, "author_profile": "https://Stackoverflow.com/users/76486", "pm_score": 7, "selected": true, "text": "has_secure_password" }, { "answer_id": 1901005, "author": "sarahhodne", "author_id": 231245, "a...
2008/08/23
[ "https://Stackoverflow.com/questions/24298", "https://Stackoverflow.com", "https://Stackoverflow.com/users/168/" ]
24,315
<p>In C# I can use the FileSystemWatcher object to watch for a specific file and raise an event when it is created, modified, etc.</p> <p>The problem I have with this class is that it raises the event the moment the file becomes created, even if the process which created the file is still in the process of writing. I ...
[ { "answer_id": 24429, "author": "Kibbee", "author_id": 1862, "author_profile": "https://Stackoverflow.com/users/1862", "pm_score": 3, "selected": false, "text": " Public Sub WriteToFile(ByVal FilePath As String, ByVal FileName As String, ByVal Data() As Byte)\n Dim FileOpen As Boo...
2008/08/23
[ "https://Stackoverflow.com/questions/24315", "https://Stackoverflow.com", "https://Stackoverflow.com/users/392/" ]
24,451
<p>I've long been under the impression that <code>goto</code> should never be used if possible.</p> <p>However, while perusing libavcodec (which is written in C) the other day, I was surprised to notice multiple uses of it.</p> <p>Is it ever advantageous to use <code>goto</code> in a language that supports loops and fu...
[ { "answer_id": 24475, "author": "Konrad Rudolph", "author_id": 1968, "author_profile": "https://Stackoverflow.com/users/1968", "pm_score": 5, "selected": false, "text": "goto goto goto finally goto return goto goto goto" }, { "answer_id": 24511, "author": "Jakub Šturc", "...
2008/08/23
[ "https://Stackoverflow.com/questions/24451", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1597/" ]
24,468
<p>When I try to run a .NET assembly (<code>boo.exe</code>) from a network share (mapped to a drive), it fails since it's only partially trusted:</p> <pre><code>Unhandled Exception: System.Security.SecurityException: That assembly does not allow partially trusted callers. at System.Security.CodeAccessSecurityEngine...
[ { "answer_id": 26376, "author": "Tomi Kyöstilä", "author_id": 616, "author_profile": "https://Stackoverflow.com/users/616", "pm_score": 2, "selected": false, "text": "caspol caspol -addgroup 1.2 -url file:///H:/* FullTrust\n" } ]
2008/08/23
[ "https://Stackoverflow.com/questions/24468", "https://Stackoverflow.com", "https://Stackoverflow.com/users/616/" ]
24,470
<p>Trying to find some simple SQL Server PIVOT examples. Most of the examples that I have found involve counting or summing up numbers. I just want to pivot some string data. For example, I have a query returning the following.</p> <pre><code>Action1 VIEW Action1 EDIT Action2 VIEW Action3 VIEW Action3 EDIT ...
[ { "answer_id": 24538, "author": "vzczc", "author_id": 224, "author_profile": "https://Stackoverflow.com/users/224", "pm_score": 3, "selected": false, "text": "select \n distinct a,\n (select distinct t2.b from t t2 where t1.a=t2.a and t2.b='VIEW'),\n (select distinct t2.b from...
2008/08/23
[ "https://Stackoverflow.com/questions/24470", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2626/" ]
24,495
<p>I have a Struts + Velocity structure like for example, a Person class, whose one property is a Car object (with its own getter/setter methods) and it is mapped to a Velocity form that submits to an Action, using ModelDriven and getModel structure.</p> <p>I what to put a button on the form that shows "View Car" if c...
[ { "answer_id": 24510, "author": "Brian Matthews", "author_id": 1969, "author_profile": "https://Stackoverflow.com/users/1969", "pm_score": 4, "selected": true, "text": "#if($car)\n" }, { "answer_id": 64065, "author": "Nathan Bubna", "author_id": 8131, "author_profile"...
2008/08/23
[ "https://Stackoverflow.com/questions/24495", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2274/" ]
24,515
<p>Not very technical, but... I have to implement a bad words filter in a new site we are developing. So I need a "good" bad words list to feed my db with... any hint / direction? Looking around with google I <a href="http://urbanoalvarez.es/blog/2008/04/04/bad-words-list/" rel="noreferrer">found this</a> one, and it's...
[ { "answer_id": 24615, "author": "UnkwnTech", "author_id": 115, "author_profile": "https://Stackoverflow.com/users/115", "pm_score": 6, "selected": true, "text": "<?php\n\n/**\n * @author unkwntech@unkwndesign.com\n **/\n\nif($_GET['act'] == 'do')\n {\n $pattern['a'] = '/[a]/'; $replac...
2008/08/23
[ "https://Stackoverflow.com/questions/24515", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1178/" ]
24,516
<p>I'm trying to parse a grammar in ocamlyacc (pretty much the same as regular yacc) which supports function application with no operators (like in Ocaml or Haskell), and the normal assortment of binary and unary operators. I'm getting a reduce/reduce conflict with the '-' operator, which can be used both for subtracti...
[ { "answer_id": 24589, "author": "James A. Rosen", "author_id": 1190, "author_profile": "https://Stackoverflow.com/users/1190", "pm_score": 4, "selected": true, "text": "expr simple_expr expr_with_prefix simple_expr (expr_with_prefix) a(b(c)) (a(b))(c) applied_expression (applied_expressi...
2008/08/23
[ "https://Stackoverflow.com/questions/24516", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1891/" ]