qid
int64
4
22.2M
question
stringlengths
18
48.3k
answers
list
date
stringlengths
10
10
metadata
list
396,495
<p><strong>Background:</strong> JEdit (and some other text editors as well) support a feature called <a href="http://groups.csail.mit.edu/uid/projects/simuledit/usenix01.html" rel="nofollow noreferrer">Multiple simultaneous text insertion points</a>. (at least that's what I'm calling it here).</p> <p>To understand wha...
[ { "answer_id": 396535, "author": "Charlie Martin", "author_id": 35092, "author_profile": "https://Stackoverflow.com/users/35092", "pm_score": 3, "selected": false, "text": "M-x find-grep" }, { "answer_id": 399143, "author": "Trey Jackson", "author_id": 6148, "author_p...
2008/12/28
[ "https://Stackoverflow.com/questions/396495", "https://Stackoverflow.com", "https://Stackoverflow.com/users/42223/" ]
396,500
<p>Is there any way to render a Silverlight text to a path or graphics object <strong>at runtime</strong>? I know this can be done using the design tools, but I want to be able to do this on the fly.</p> <p>I've seen an example that <a href="http://blogs.msdn.com/webnext/archive/2007/05/22/silverlight-convert-text-to-...
[ { "answer_id": 6070579, "author": "Bathineni", "author_id": 761357, "author_profile": "https://Stackoverflow.com/users/761357", "pm_score": 0, "selected": false, "text": "/// Method tested with SilverLight 2.0\n\n\n// this method will generates path with the data string\n\npublic PathGeo...
2008/12/28
[ "https://Stackoverflow.com/questions/396500", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5/" ]
396,506
<p>I am looking to find a librray that emulates part of the capabilities of Ruby's ERB library. ie substitute text for variables between &lt;% and %>. I dont need the code execution part that ERB provides but if you know of something that has this I would be super appreciative.</p>
[ { "answer_id": 396637, "author": "Patrik Svensson", "author_id": 936, "author_profile": "https://Stackoverflow.com/users/936", "pm_score": 2, "selected": false, "text": "Substitutioner sub = new Substitutioner(\n \"Hello world <%=Wow%>! My name is <%=Name%>\");\n\nMyClass myClass = ne...
2008/12/28
[ "https://Stackoverflow.com/questions/396506", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10676/" ]
396,513
<p>As I've been incorporating the Linq mindset, I have been more and more inclined to pass around collections via the <code>IEnumerable&lt;T&gt;</code> generic type which seems to form the basis of most Linq operations.</p> <p>However I wonder, with the late evaluation of the <code>IEnumerable&lt;T&gt;</code> generic ...
[ { "answer_id": 396541, "author": "Lasse V. Karlsen", "author_id": 267, "author_profile": "https://Stackoverflow.com/users/267", "pm_score": 2, "selected": false, "text": "T[]" }, { "answer_id": 396544, "author": "Jay Bazuzi", "author_id": 5314, "author_profile": "http...
2008/12/28
[ "https://Stackoverflow.com/questions/396513", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5056/" ]
396,519
<p>I'm working on a program that uses PHP's internal array pointers to iterate along a multidimensional array. I need to get an element from the current row, and I've been doing it like so:</p> <pre><code>$arr[key($arr)]['item'] </code></pre> <p>However, I'd much prefer to use something like:</p> <pre><code>current(...
[ { "answer_id": 396532, "author": "Adam Wright", "author_id": 1200, "author_profile": "https://Stackoverflow.com/users/1200", "pm_score": 5, "selected": true, "text": "function getvalue($array, $key)\n{\n return $array[$key];\n}\n" }, { "answer_id": 398104, "author": "chelmer...
2008/12/28
[ "https://Stackoverflow.com/questions/396519", "https://Stackoverflow.com", "https://Stackoverflow.com/users/658/" ]
396,521
<pre><code>int z = 1; double result = Math.Log(z); //works </code></pre> <p>However trying to do the same thing with an array of numbers doesn't work:</p> <pre><code>int[] z = new [] {1,2,3,4}; double[] result = Math.Log(z); //Syntax 1 - error CS1503: Argument '1': cannot convert from 'int[]' to...
[ { "answer_id": 396534, "author": "user21826", "author_id": 21826, "author_profile": "https://Stackoverflow.com/users/21826", "pm_score": -1, "selected": false, "text": "\nfor (int i = 0; i < z.Length; i++)\n{\n Math.Log(z[i]);\n}\n" }, { "answer_id": 396552, "author": "jrcs3...
2008/12/28
[ "https://Stackoverflow.com/questions/396521", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
396,545
<p>Are there any Vi clones that are still in wide use today (besides Viper mode in Emacs ;)), other than Vim? If so, what are the pros/cons to using it instead of Vim?</p>
[ { "answer_id": 411090, "author": "Dave Sherohman", "author_id": 18914, "author_profile": "https://Stackoverflow.com/users/18914", "pm_score": 0, "selected": false, "text": "elvis" } ]
2008/12/28
[ "https://Stackoverflow.com/questions/396545", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
396,557
<p>Using a few different patterns but they each come up with this error - so what's wrong?</p> <p>My shortest one to diagnose is:</p> <pre><code>$pattern = "&lt;img([^&gt;]*[^/])&gt;"; preg_match_all($pattern, $subject, $matches); </code></pre> <p>Thanks</p>
[ { "answer_id": 396563, "author": "PEZ", "author_id": 44639, "author_profile": "https://Stackoverflow.com/users/44639", "pm_score": 4, "selected": false, "text": "$pattern = \"#<img([^>]*[^/])>#i\";\n" }, { "answer_id": 396571, "author": "Waquo", "author_id": 34149, "a...
2008/12/28
[ "https://Stackoverflow.com/questions/396557", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
396,567
<p>Is there a standard way to do an <code>fopen</code> with a Unicode string file path?</p>
[ { "answer_id": 396587, "author": "TokenMacGuy", "author_id": 49287, "author_profile": "https://Stackoverflow.com/users/49287", "pm_score": 2, "selected": false, "text": "$ locale\nLANG=en_US.UTF-8\nLC_CTYPE=\"en_US.UTF-8\"\n" }, { "answer_id": 396606, "author": "rob", "au...
2008/12/28
[ "https://Stackoverflow.com/questions/396567", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3153/" ]
396,569
<p>Currently, I only know a way of doing RPC for POJOs in Java, and is with the very complex EJB/JBoss solution. </p> <p>Is there any better way of providing a similar functionality with a thiner layer (within or without a Java EE container), using RMI or something that can serialize and send full blown objects over t...
[ { "answer_id": 396775, "author": "cletus", "author_id": 18393, "author_profile": "https://Stackoverflow.com/users/18393", "pm_score": 3, "selected": true, "text": "HttpSession" } ]
2008/12/28
[ "https://Stackoverflow.com/questions/396569", "https://Stackoverflow.com", "https://Stackoverflow.com/users/861/" ]
396,579
<p>I'm trying to create a randomized maze in C++, but I can't start because I don't know how to create grids or cells. How could I create it? And I also want to create it using ASCII characters. how can i store it in array? (can any one give a sample code and some explanation so i can understand it better)</p> <p>Anot...
[ { "answer_id": 396600, "author": "ShreevatsaR", "author_id": 4958, "author_profile": "https://Stackoverflow.com/users/4958", "pm_score": 3, "selected": false, "text": "(x,y)" }, { "answer_id": 396611, "author": "stalepretzel", "author_id": 1615, "author_profile": "htt...
2008/12/28
[ "https://Stackoverflow.com/questions/396579", "https://Stackoverflow.com", "https://Stackoverflow.com/users/49609/" ]
396,586
<p>I am looking for a XSL snippet that simply returns the XML unaltered. It sounds trivial but I can't seem to find an example anywhere on the web. Any help out there? </p>
[ { "answer_id": 396595, "author": "krosenvold", "author_id": 23691, "author_profile": "https://Stackoverflow.com/users/23691", "pm_score": 0, "selected": false, "text": "<xsl:template match =\"/\">\n <xsl:copy-of select=\".\"/>\n</xsl:template>\n" }, { "answer_id": 396694, "a...
2008/12/28
[ "https://Stackoverflow.com/questions/396586", "https://Stackoverflow.com", "https://Stackoverflow.com/users/49611/" ]
396,589
<p>Can I develop a windows application using .NET framework and IBM.Data.DB2 provider to access a DB2 database running on OS/390?</p> <p>Thanks in advance.</p>
[ { "answer_id": 396863, "author": "paxdiablo", "author_id": 14860, "author_profile": "https://Stackoverflow.com/users/14860", "pm_score": 1, "selected": false, "text": "db2jcc_cisuz.jar" } ]
2008/12/28
[ "https://Stackoverflow.com/questions/396589", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
396,594
<p>Is there any way to force PHP to blow up (error, whatever) if I misspell a variable name? What about if I'm using an instance of a class and I spell the name of a variable wrong?</p> <p>[I know that I should just get used to it, but maybe there's a way to enforce name checking?] </p> <p>Thanks!</p> <p><strong>Edi...
[ { "answer_id": 396604, "author": "Ryan Doherty", "author_id": 956, "author_profile": "https://Stackoverflow.com/users/956", "pm_score": 1, "selected": false, "text": "error_reporting(E_ALL);\n" }, { "answer_id": 396605, "author": "PEZ", "author_id": 44639, "author_pro...
2008/12/28
[ "https://Stackoverflow.com/questions/396594", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8047/" ]
396,610
<p>I have a DateTime which I want to store in a Date MySQL column. I am using MySQLi and prepared statements. </p> <p>When binding parameters, I cannot specify date as a type, only strings and integers.</p> <p>How do I convert the DateTime to a MySQL date string representation? There is very little documentation on t...
[ { "answer_id": 396628, "author": "Bill Karwin", "author_id": 20860, "author_profile": "https://Stackoverflow.com/users/20860", "pm_score": 3, "selected": true, "text": "SELECT * FROM MyTable WHERE DateTimeCol = ?\n" } ]
2008/12/28
[ "https://Stackoverflow.com/questions/396610", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
396,620
<p>I'm wondering if there is an equivalent function to PHP's <code>call_user_func()</code> in ASP.NET application. I'm looking to do a conversion from a PHP application to ASP.NET as a means of teaching myself the language, by taking a CMS I built professionally and trying to recreate it in this other language.</p> <p...
[ { "answer_id": 396653, "author": "Oli", "author_id": 12870, "author_profile": "https://Stackoverflow.com/users/12870", "pm_score": 0, "selected": false, "text": "System.Reflection.MethodInfo method = this.GetType().GetMethod(myMethodName);\n// method.Invoke(args, null);\n" }, { "...
2008/12/28
[ "https://Stackoverflow.com/questions/396620", "https://Stackoverflow.com", "https://Stackoverflow.com/users/41654/" ]
396,621
<p>I'm trying to combine a number of <code>List&lt;T&gt; where T:IGetTime</code> (i.e <code>T</code> will always have method <code>getTime()</code>).</p> <p>Then I'm trying order the items by the <code>DateTime</code> that <code>getTime()</code> returns. </p> <p>My LINQ looks like this:</p> <pre><code>public static ...
[ { "answer_id": 396629, "author": "Jon Skeet", "author_id": 22656, "author_profile": "https://Stackoverflow.com/users/22656", "pm_score": 6, "selected": true, "text": "IEnumerable<X>" }, { "answer_id": 397917, "author": "Amy B", "author_id": 8155, "author_profile": "ht...
2008/12/28
[ "https://Stackoverflow.com/questions/396621", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5648/" ]
396,644
<p>I'm interested in using something other than the <strong>C</strong> preprocessor to preprocess my <strong>C</strong> and Objective-C source code. Are there good alternatives?</p> <p>An example would be something that allowed one to escape out into a python or perl snippet in the middle of <strong>C</strong> code, ...
[ { "answer_id": 396692, "author": "strager", "author_id": 39992, "author_profile": "https://Stackoverflow.com/users/39992", "pm_score": 2, "selected": false, "text": "#include" }, { "answer_id": 397000, "author": "Norman Ramsey", "author_id": 41661, "author_profile": "...
2008/12/28
[ "https://Stackoverflow.com/questions/396644", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17320/" ]
396,649
<p>Is it possible to retrieve the geometric position (i.e. top/left offsets from either the parent element, the page, etc) of a text node?</p>
[ { "answer_id": 49642909, "author": "fregante", "author_id": 288906, "author_profile": "https://Stackoverflow.com/users/288906", "pm_score": 3, "selected": false, "text": "Range.getBoundingClientRect()" }, { "answer_id": 59525891, "author": "Eejdoowad", "author_id": 314082...
2008/12/28
[ "https://Stackoverflow.com/questions/396649", "https://Stackoverflow.com", "https://Stackoverflow.com/users/27122/" ]
396,663
<p>For testing purposes I need my ABAP program to wait for few seconds. How can this be done?</p>
[ { "answer_id": 396903, "author": "Esti", "author_id": 25687, "author_profile": "https://Stackoverflow.com/users/25687", "pm_score": 6, "selected": true, "text": "WAIT UP TO 42 SECONDS.\nWAIT UP TO '0.5' SECONDS. \" decimals are possible since ABAP 7.40 SP 8\n" } ]
2008/12/28
[ "https://Stackoverflow.com/questions/396663", "https://Stackoverflow.com", "https://Stackoverflow.com/users/25737/" ]
396,674
<p>I'm working on a WordPress template and need to add a hyperlink to the cartoon bubble at the top of the page. The bubble, as far as I can tell, is php. Where do I insert the href?</p> <pre><code>&lt;h1&gt;&lt;a href=&quot;&lt;?php bloginfo('url'); ?&gt;/&quot;&gt;&lt;?php bloginfo('name'); ?&gt;&lt;/a&gt;&lt;/h1&gt;...
[ { "answer_id": 396681, "author": "Patryk Kordylewski", "author_id": 30927, "author_profile": "https://Stackoverflow.com/users/30927", "pm_score": 1, "selected": false, "text": "<h1><a href=\"<?php echo bloginfo('url'); ?>/\"><?php echo bloginfo('name'); ?></a></h1>\n" }, { "answe...
2008/12/28
[ "https://Stackoverflow.com/questions/396674", "https://Stackoverflow.com", "https://Stackoverflow.com/users/39781/" ]
396,684
<p>How should I perform garbage collection in a program that consists of multiple threads or processes?</p> <p>How can I scan the stack from each of those threads and processes?</p> <p>Does each process require its own garbage collection routine? Is it a good idea to run the garbage collector in a separate thread/pro...
[ { "answer_id": 396700, "author": "Hrvoje Prgeša", "author_id": 45875, "author_profile": "https://Stackoverflow.com/users/45875", "pm_score": 3, "selected": false, "text": "no-return function XY (int):\n load_param 1 \n ipush 1\n iadd\n call Z (assume: int function Z (int, int))\n new som...
2008/12/28
[ "https://Stackoverflow.com/questions/396684", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21711/" ]
396,706
<p>Is it ok to do the following:</p> <pre><code>View(new {Object A, Object B}) </code></pre> <p>Or should Object A and Object B be explicitly declared in a new type?</p> <p>Thanks.</p>
[ { "answer_id": 396715, "author": "Marc Gravell", "author_id": 23354, "author_profile": "https://Stackoverflow.com/users/23354", "pm_score": 3, "selected": true, "text": "TypeDescriptor" }, { "answer_id": 396719, "author": "Todd Smith", "author_id": 31624, "author_prof...
2008/12/28
[ "https://Stackoverflow.com/questions/396706", "https://Stackoverflow.com", "https://Stackoverflow.com/users/49632/" ]
396,739
<p>Quite often I come across a nice looking or functional website, and wonder what technology was used to create it. What techniques are available to figure out what a particular website was built with?</p> <p>Few frameworks seem to include any kind of generator meta tag like web editors do. Are there any tell-tale si...
[ { "answer_id": 396774, "author": "Milo", "author_id": 49649, "author_profile": "https://Stackoverflow.com/users/49649", "pm_score": 2, "selected": false, "text": "__VIEWSTATE" }, { "answer_id": 7540125, "author": "basilboli", "author_id": 633980, "author_profile": "ht...
2008/12/28
[ "https://Stackoverflow.com/questions/396739", "https://Stackoverflow.com", "https://Stackoverflow.com/users/42974/" ]
396,748
<p>I am wondering if there is away (possibly a better way) to order by the order of the values in an IN() clause.</p> <p>The problem is that I have 2 queries, one that gets all of the IDs and the second that retrieves all the information. The first creates the order of the IDs which I want the second to order by. The ...
[ { "answer_id": 396758, "author": "chaos", "author_id": 47529, "author_profile": "https://Stackoverflow.com/users/47529", "pm_score": 1, "selected": false, "text": "SELECT name, description, ...\nWHERE id IN\n (SELECT id FROM table1 WHERE...)\nORDER BY\n (SELECT display_order FROM t...
2008/12/28
[ "https://Stackoverflow.com/questions/396748", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5441/" ]
396,749
<p>What is the recommended method for escaping variables before inserting them into the database in Java?</p> <p>As I understand, I can use PreparedStatement.setString() to escape the data, but PreparedStatement seems somewhat impractical if I don't plan to run the same query ever again.. Is there a better way to do i...
[ { "answer_id": 396765, "author": "S.Lott", "author_id": 10661, "author_profile": "https://Stackoverflow.com/users/10661", "pm_score": 6, "selected": true, "text": "PreparedStatement" } ]
2008/12/28
[ "https://Stackoverflow.com/questions/396749", "https://Stackoverflow.com", "https://Stackoverflow.com/users/49644/" ]
396,756
<p>I'm creating an API for a module and after I created several methods inside my classes, I asked myself this question.</p> <p>Right now, and as an example, I'm doing this:</p> <pre><code>public Company GetMonitoredCompany( String companyName ) { ... } public List&lt;Company&gt; GetMonitoredCompanies( ) { ... } </co...
[ { "answer_id": 396837, "author": "Alex", "author_id": 42707, "author_profile": "https://Stackoverflow.com/users/42707", "pm_score": 1, "selected": false, "text": "ListMonitoredCompanies\n" } ]
2008/12/28
[ "https://Stackoverflow.com/questions/396756", "https://Stackoverflow.com", "https://Stackoverflow.com/users/28004/" ]
396,817
<p>Following on from my question on the <em><a href="https://stackoverflow.com/questions/396778/legalities-of-screen-scraping">Legalities of screen scraping</a></em>, even if it's illegal people will still try, so:</p> <p><strong>What technical mechanisms can be employed to <em>prevent</em> or at least disincentivise ...
[ { "answer_id": 899267, "author": "Dave", "author_id": 9056, "author_profile": "https://Stackoverflow.com/users/9056", "pm_score": 2, "selected": false, "text": " Price : 1\n Price : 2\n Price\\n:\\n3\n" } ]
2008/12/28
[ "https://Stackoverflow.com/questions/396817", "https://Stackoverflow.com", "https://Stackoverflow.com/users/42974/" ]
396,830
<p>I work at a small LAMP Development Studio where the idea has been to just get the code done and go on to the next item on the list.</p> <p>The team works in Zend Studio 5.5 connected to the Live server via FTP or SFTP. What they love about this is the speed of their deployment of code (since its just modifying live...
[ { "answer_id": 397682, "author": "SchizoDuckie", "author_id": 18077, "author_profile": "https://Stackoverflow.com/users/18077", "pm_score": 2, "selected": false, "text": " echo(' updating from svn<br>' );\n $username = Settings::Load()->Get('svn','username');\n $password = Setti...
2008/12/28
[ "https://Stackoverflow.com/questions/396830", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22459/" ]
396,856
<p>I don't understand how classes are used. The following code gives me an error when I try to use the class.</p> <pre><code>class MyStuff: def average(a, b, c): # Get the average of three numbers result = a + b + c result = result / 3 return result # Now use the function `average` from th...
[ { "answer_id": 396871, "author": "Ryan", "author_id": 49139, "author_profile": "https://Stackoverflow.com/users/49139", "pm_score": 7, "selected": true, "text": "x = mystuff()\nprint x.average(9,18,27)\n" }, { "answer_id": 396875, "author": "Suraj", "author_id": 39446, ...
2008/12/28
[ "https://Stackoverflow.com/questions/396856", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12386/" ]
396,896
<p>I would like to change the contents of the list of a <code>JComboBox</code> (like adding another list in place of and older one). Is there any way I might be able to do that? Thanks in advance!</p>
[ { "answer_id": 8386476, "author": "pal", "author_id": 482808, "author_profile": "https://Stackoverflow.com/users/482808", "pm_score": 3, "selected": false, "text": "oldComboBox.setModel(new JComboBox<>(new_items).getModel());\n" } ]
2008/12/29
[ "https://Stackoverflow.com/questions/396896", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23486/" ]
396,905
<p>I'm using Delphi 2007.</p> <p>I am copying files to a remote drive. When the copying ends, I shutdown/standby the machine. It can happen that some files don't get copied from buffer to disk, and the remote disk gets disconnected, so the backup is not completed. I need to detect disk activity on that disk to properl...
[ { "answer_id": 396982, "author": "Wouter van Nifterick", "author_id": 38813, "author_profile": "https://Stackoverflow.com/users/38813", "pm_score": 3, "selected": false, "text": "// ==================== DISC DRIVE MONITOR =====================================\n//\n// Class and Component ...
2008/12/29
[ "https://Stackoverflow.com/questions/396905", "https://Stackoverflow.com", "https://Stackoverflow.com/users/48705/" ]
396,913
<p>If I have a certain week number (eg 51) and a given year (eg 2008), how do I find the date of the first Monday of that same week?</p> <p>Many thanks</p>
[ { "answer_id": 396926, "author": "Robert Gamble", "author_id": 25222, "author_profile": "https://Stackoverflow.com/users/25222", "pm_score": 6, "selected": true, "text": ">>> import time\n>>> time.asctime(time.strptime('2008 50 1', '%Y %W %w'))\n'Mon Dec 15 00:00:00 2008'\n" }, { ...
2008/12/29
[ "https://Stackoverflow.com/questions/396913", "https://Stackoverflow.com", "https://Stackoverflow.com/users/143732/" ]
396,930
<p>It would appear that CHM help files are no longer the help file format of choice.</p> <p>WinHelp<br> - obsolete</p> <p>HtmlHelp (CHM)<br> - not supported on Vista by default<br> - does not work well on a network share</p> <p>Help 2 (HXS)<br> - I understand this is used in VS2005+ for displaying help</p> <p>W...
[ { "answer_id": 396939, "author": "Lasse V. Karlsen", "author_id": 267, "author_profile": "https://Stackoverflow.com/users/267", "pm_score": 3, "selected": false, "text": "this.Mode = Modes.Rant;\n" } ]
2008/12/29
[ "https://Stackoverflow.com/questions/396930", "https://Stackoverflow.com", "https://Stackoverflow.com/users/48499/" ]
396,933
<p>I need some mind reading here, since I am trying to do what I do not completely understand.</p> <p>There is a 32-bit application (electronic trading application called CQG) which provides a COM API for external access. I have sample programs and scripts which access this API from Excel, .NET (C++, VB and C#) and s...
[ { "answer_id": 3527714, "author": "xwiz", "author_id": 425939, "author_profile": "https://Stackoverflow.com/users/425939", "pm_score": 1, "selected": false, "text": "bcdedit.exe /set {current} nx AlwaysOff\n" } ]
2008/12/29
[ "https://Stackoverflow.com/questions/396933", "https://Stackoverflow.com", "https://Stackoverflow.com/users/49678/" ]
396,943
<p>How do we combine <a href="https://stackoverflow.com/questions/19412/how-to-request-a-random-row-in-sql">How to request a random row in SQL?</a> and <a href="https://stackoverflow.com/questions/183124/multiple-random-values-in-sql-server-2005">Multiple random values in SQL Server 2005</a> to select N random rows usi...
[ { "answer_id": 396946, "author": "Lasse V. Karlsen", "author_id": 267, "author_profile": "https://Stackoverflow.com/users/267", "pm_score": 3, "selected": false, "text": "SELECT * FROM table ORDER BY RAND() LIMIT 1\n" }, { "answer_id": 15528393, "author": "mtillberg", "au...
2008/12/29
[ "https://Stackoverflow.com/questions/396943", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14731/" ]
396,947
<p>Is it possible to detect if a page is opened in 2 different browsers?</p> <p>I have built an small app, that stores some data in $_SESSION, and the problem is that when multiple tabs gets opened, the session vars gets overwritten (search filters in a search form) and so the tabs may display the same results for app...
[ { "answer_id": 396969, "author": "George Stocker", "author_id": 16587, "author_profile": "https://Stackoverflow.com/users/16587", "pm_score": 0, "selected": false, "text": "$_SESSION" }, { "answer_id": 396979, "author": "Laodimos", "author_id": 49461, "author_profile"...
2008/12/29
[ "https://Stackoverflow.com/questions/396947", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11301/" ]
396,955
<p>For fun when I have time, I like to code games to see how hard it is or just because I want to see how it works from the inside or just for personal challenge. I just like coding. For now, I made <a href="http://pages.videotron.com/spirch/FredGames" rel="nofollow noreferrer">these ones</a>.</p> <p>So I made a Sudok...
[ { "answer_id": 397165, "author": "joel.neely", "author_id": 3525, "author_profile": "https://Stackoverflow.com/users/3525", "pm_score": 3, "selected": false, "text": " 1 2 3 4 | 5 6 7 8 | 9 10 11 12 | 13 14 15 16\n 5 6 7 8 | 9 10 11 12 | 13 14 15 16 | 1 2 3 4\n 9 10 11 12...
2008/12/29
[ "https://Stackoverflow.com/questions/396955", "https://Stackoverflow.com", "https://Stackoverflow.com/users/40868/" ]
396,973
<p>I'm developing a web-based, turn-based strategy game which takes place on a 10x10 board.</p> <p>Each tile represents an area of land and has its own set of statistics (eg, income, population, fertility, natural resources).</p> <p>Each time the client loads it will download all of the information for the game (ie, ...
[ { "answer_id": 397011, "author": "Soviut", "author_id": 46914, "author_profile": "https://Stackoverflow.com/users/46914", "pm_score": 1, "selected": false, "text": "Table Board\n{\n BigInt id;\n String name;\n Date date_played;\n etc...\n}\n\nTable Tile\n{\n BigInt id;\n ...
2008/12/29
[ "https://Stackoverflow.com/questions/396973", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
397,001
<p>I want to automatically commit the database when we copy files from one branch to the other in Subversion. Is it safe to use <code>svn commmit</code> as part of a pre-commit hook assuming that we do it in very specific cases?</p>
[ { "answer_id": 397092, "author": "Otto", "author_id": 9594, "author_profile": "https://Stackoverflow.com/users/9594", "pm_score": 3, "selected": true, "text": "svn commit" } ]
2008/12/29
[ "https://Stackoverflow.com/questions/397001", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1959/" ]
397,019
<p>I am not sure what the problem is but I keep receiving this error when I try to use a while statement in my code.</p> <blockquote> <p>Invalid token 'while' in class, struct, or interface member declaration</p> </blockquote> <p>I want to use a while loop to have something continuously update while a statement...
[ { "answer_id": 28347042, "author": "NealWalters", "author_id": 160245, "author_profile": "https://Stackoverflow.com/users/160245", "pm_score": 0, "selected": false, "text": "public static string GetPasswordForEnvironment)\n" }, { "answer_id": 55128606, "author": "santhu Style...
2008/12/29
[ "https://Stackoverflow.com/questions/397019", "https://Stackoverflow.com", "https://Stackoverflow.com/users/49549/" ]
397,034
<p>So I was writing up a simple binary tree in Python and came across [...]</p> <p>I don't believe this to be related to the Ellipsis object, more it seems to have something to do with an infinity loop (due to Python's shallow copy?). The source of this infinity loop and why it doesn't get expanded while expanding whe...
[ { "answer_id": 397054, "author": "CAdaker", "author_id": 30579, "author_profile": "https://Stackoverflow.com/users/30579", "pm_score": 5, "selected": false, "text": ">>> a = [1,2]\n>>> a.append(a)\n>>> a\n[1, 2, [...]]\n>>> \n" }, { "answer_id": 397057, "author": "Ned Batchel...
2008/12/29
[ "https://Stackoverflow.com/questions/397034", "https://Stackoverflow.com", "https://Stackoverflow.com/users/40172/" ]
397,052
<p>I'm writing some functional tests for a controller in rails, using mocha to do mocking/stubbing. </p> <p>Is there a way to prevent the template from being rendered during the test, so that I can test only the code in the controller?</p> <p>It looks like rspec provides something like this, but I'm not using rspec.<...
[ { "answer_id": 397188, "author": "J Cooper", "author_id": 38803, "author_profile": "https://Stackoverflow.com/users/38803", "pm_score": 0, "selected": false, "text": "render_to_string" }, { "answer_id": 397668, "author": "Starr Horne", "author_id": 37708, "author_prof...
2008/12/29
[ "https://Stackoverflow.com/questions/397052", "https://Stackoverflow.com", "https://Stackoverflow.com/users/37708/" ]
397,064
<p>Imagine I am doing something like this:</p> <pre><code>void *p = malloc (1000); *((char*)p) = some_opcode; *((char*)p+1) = another_opcode; // for the sake of the example: the opcodes are ok .... etc... </code></pre> <p>How can I define a function pointer to call p as if it was a function? (i'm using VC++ 2008 exp...
[ { "answer_id": 397066, "author": "Eclipse", "author_id": 8701, "author_profile": "https://Stackoverflow.com/users/8701", "pm_score": 3, "selected": false, "text": "typedef void (*voidFunc)();\n\nchar *p = malloc (1000);\np[0] = some_opcode;\np[1] = another_opcode; // for the sake of the ...
2008/12/29
[ "https://Stackoverflow.com/questions/397064", "https://Stackoverflow.com", "https://Stackoverflow.com/users/49710/" ]
397,073
<p>I've a requirement of creating a HttpHandler that will serve an image file (simple static file) and also it'll insert a record in the SQL Server table. (e.g <a href="http://site/some.img" rel="nofollow noreferrer">http://site/some.img</a>, where some.img being a HttpHandler) I need an in-memory object (like Generic ...
[ { "answer_id": 400476, "author": "patridge", "author_id": 48700, "author_profile": "https://Stackoverflow.com/users/48700", "pm_score": 0, "selected": false, "text": "Private Shared Sub CacheRemovalCallbackFunction(ByVal cacheKey As String, ByVal cacheObject As Object, ByVal removalReaso...
2008/12/29
[ "https://Stackoverflow.com/questions/397073", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1683839/" ]
397,075
<p>In C and C++, what is the difference between <code>exit()</code> and <code>abort()</code>? I am trying to end my program after an error (not an exception).</p>
[ { "answer_id": 397079, "author": "Brian R. Bondy", "author_id": 3153, "author_profile": "https://Stackoverflow.com/users/3153", "pm_score": 5, "selected": false, "text": "SomeClassType someobject;\n\nvoid myProgramIsTerminating1(void)\n{\n cout<<\"exit function 1\"<<endl;\n}\n\nvoid myP...
2008/12/29
[ "https://Stackoverflow.com/questions/397075", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
397,085
<p>I have a problem with CDATA deserialization using standard .Net XmlSerializer.</p> <p><strong>Update</strong>: I get XML from external system and I can't influence it's format so I can't make CData be enclosed in a separate Element of Attribute.</p> <p>Serialization gives this:</p> <pre><code>&lt;?xml version="1....
[ { "answer_id": 397462, "author": "oefe", "author_id": 49793, "author_profile": "https://Stackoverflow.com/users/49793", "pm_score": 4, "selected": true, "text": "<MyClass><![CDATA[Hello, world!]]></MyClass>\n" }, { "answer_id": 9086885, "author": "Sebastian Castaldi", "au...
2008/12/29
[ "https://Stackoverflow.com/questions/397085", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1423922/" ]
397,094
<p>I have 3 drop down list having Date,Month ,Year.So when Updating I want this 3 Field to be a single Datafield in Sql Database. Iam using Asp.Net 2.0 Version(VB.Net).(Now these 3 Dropdown list values are saved as 3 Datafields in sql Database)</p>
[ { "answer_id": 397098, "author": "Dave Markle", "author_id": 24995, "author_profile": "https://Stackoverflow.com/users/24995", "pm_score": 2, "selected": false, "text": "Dim cmd as SqlCommand(\"update tableX set dt = @var where ID = 1\");\ncmd.Parameters.AddWithValue(\"@var\", new DateTi...
2008/12/29
[ "https://Stackoverflow.com/questions/397094", "https://Stackoverflow.com", "https://Stackoverflow.com/users/49722/" ]
397,113
<p>We have a user provided string that may contain unicode characters, and we want the robot to type that string.</p> <p>How do you convert a string into keyCodes that the robot will use?<br> How do you do it so it is also java version independant (1.3 -> 1.6)?</p> <p>What we have working for "ascii" chars is</p> <p...
[ { "answer_id": 397152, "author": "javamonkey79", "author_id": 27657, "author_profile": "https://Stackoverflow.com/users/27657", "pm_score": 2, "selected": false, "text": "Robot robot = new Robot();\nchar curChar = 'Ã';\n\n// -- isUnicode( char ) should be pretty easy to figure out\nif ( ...
2008/12/29
[ "https://Stackoverflow.com/questions/397113", "https://Stackoverflow.com", "https://Stackoverflow.com/users/37558/" ]
397,117
<p>I have a window with a title on it. When the user selects a choice from a drop down list, the title image can change. The problem is when the image loads, it's a blurred, stretched, and pixelated. These are PNG files I'm working with and they look good prior to setting the source dynamically.</p> <p>Here's the code...
[ { "answer_id": 397345, "author": "Nir", "author_id": 3509, "author_profile": "https://Stackoverflow.com/users/3509", "pm_score": 6, "selected": true, "text": "string strUri2 = String.Format(@\"pack://application:,,,/MyAseemby;component/resources/main titles/{0}\", CurrenSelection.TitleIm...
2008/12/29
[ "https://Stackoverflow.com/questions/397117", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22451/" ]
397,121
<p>Hopefully I'm just missing something obvious, but I'm trying to get my head around the differences between the Load and the Shown events in <a href="http://en.wikipedia.org/wiki/Windows_Forms" rel="noreferrer">Windows Forms</a>.</p> <p>Traditionally, I've only used Load (or actually OnLoad, since I think it's clean...
[ { "answer_id": 397124, "author": "Fredou", "author_id": 40868, "author_profile": "https://Stackoverflow.com/users/40868", "pm_score": 1, "selected": false, "text": "Public Class Form1\n\nPrivate Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Loa...
2008/12/29
[ "https://Stackoverflow.com/questions/397121", "https://Stackoverflow.com", "https://Stackoverflow.com/users/43534/" ]
397,125
<p>I'm trying to read the target file/directory of a shortcut (<code>.lnk</code>) file from Python. Is there a headache-free way to do it? The spec is way over my head. I don't mind using Windows-only APIs.</p> <p>My ultimate goal is to find the <code>&quot;(My) Videos&quot;</code> folder on Windows XP and Vista. On XP...
[ { "answer_id": 397137, "author": "gak", "author_id": 11125, "author_profile": "https://Stackoverflow.com/users/11125", "pm_score": 3, "selected": false, "text": "import os, sys\nimport pythoncom\nfrom win32com.shell import shell, shellcon\n\nshortcut = pythoncom.CoCreateInstance (\n she...
2008/12/29
[ "https://Stackoverflow.com/questions/397125", "https://Stackoverflow.com", "https://Stackoverflow.com/users/109696/" ]
397,128
<p>I wrote a device controller (rs232) and it is being used successfully, however users want to view data and control the device (or perhaps communicate through my program) from Excel. I dismissed DDE as an option and found that RTD (IRtdServer) is probably a good start (though no way to send data back to the "server"...
[ { "answer_id": 397137, "author": "gak", "author_id": 11125, "author_profile": "https://Stackoverflow.com/users/11125", "pm_score": 3, "selected": false, "text": "import os, sys\nimport pythoncom\nfrom win32com.shell import shell, shellcon\n\nshortcut = pythoncom.CoCreateInstance (\n she...
2008/12/29
[ "https://Stackoverflow.com/questions/397128", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10755/" ]
397,142
<p>I have a class called User with static function loginRequired(), which returns false if the user is logged in and true if the user is logged out. It also appends an error to an error class that I created that tells the person using the site that they must be logged in to view the content.</p> <p>The idea is that fo...
[ { "answer_id": 397176, "author": "nickf", "author_id": 9021, "author_profile": "https://Stackoverflow.com/users/9021", "pm_score": 3, "selected": true, "text": "require_login()" }, { "answer_id": 397187, "author": "Anthony", "author_id": 49478, "author_profile": "http...
2008/12/29
[ "https://Stackoverflow.com/questions/397142", "https://Stackoverflow.com", "https://Stackoverflow.com/users/29595/" ]
397,148
<p>OK, I'm aware that triple-quotes strings can serve as multiline comments. For example,</p> <pre><code>"""Hello, I am a multiline comment""" </code></pre> <p>and </p> <pre><code>'''Hello, I am a multiline comment''' </code></pre> <p>But technically speaking these are strings, correct?</p> <p>I've googled...
[ { "answer_id": 397192, "author": "stalepretzel", "author_id": 1615, "author_profile": "https://Stackoverflow.com/users/1615", "pm_score": 0, "selected": false, "text": "#a comment" }, { "answer_id": 397216, "author": "Charlie Martin", "author_id": 35092, "author_profi...
2008/12/29
[ "https://Stackoverflow.com/questions/397148", "https://Stackoverflow.com", "https://Stackoverflow.com/users/24059/" ]
397,153
<p>I have a these structures definitions</p> <pre><code>typedef struct my_s { int x; int y; } my_T; typedef struct your_s { my_T * x; } your_T; your_T array[MAX_COL][MAX_ROW]; </code></pre> <p>To initialize the array's pointer to NULL, can I do:</p> <pre><code>memset (array, 0, sizeof(array)) </code></pr...
[ { "answer_id": 397162, "author": "rampion", "author_id": 9859, "author_profile": "https://Stackoverflow.com/users/9859", "pm_score": 2, "selected": false, "text": "your_T array[MAX_COL][MAX_ROW] = {{{0}}};\n" }, { "answer_id": 397166, "author": "Johannes Schaub - litb", "...
2008/12/29
[ "https://Stackoverflow.com/questions/397153", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
397,184
<p>I am trying to use jCarousel plugin for jQuery in order to provide my website users with scrollable (horizontal) content.</p> <p>The content I am mentioning is basically user defined <code>&lt;li&gt;</code> elements, styled so that they have a feel and look of a tab. so basically I am trying to achieve the same eff...
[ { "answer_id": 408404, "author": "Borgar", "author_id": 27388, "author_profile": "https://Stackoverflow.com/users/27388", "pm_score": 4, "selected": true, "text": "<div class=\"scrollable\">\n <div class=\"window\">\n <div class=\"space\">\n <ul class=\"tabs\">\n <li clas...
2008/12/29
[ "https://Stackoverflow.com/questions/397184", "https://Stackoverflow.com", "https://Stackoverflow.com/users/49742/" ]
397,185
<p>I need to enable the <a href="http://au2.php.net/manual/en/book.mcrypt.php" rel="noreferrer">mcrypt</a> functions on my website, except I'm on a shared host (running linux) and obviously don't have access to the <code>php.ini</code> file. There does seem to be options for installing PEAR modules but a search told me...
[ { "answer_id": 397207, "author": "UnkwnTech", "author_id": 115, "author_profile": "https://Stackoverflow.com/users/115", "pm_score": 3, "selected": true, "text": "wget http://superb-east.dl.sourceforge.net/sourceforge/mcrypt/libmcrypt-2.5.8.tar.gz\ntar -xzvf libmcrypt-2.5.8.tar.gz\ncd li...
2008/12/29
[ "https://Stackoverflow.com/questions/397185", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9021/" ]
397,250
<p>The list of valid XML characters is well known, as defined by the spec it's:</p> <pre><code>#x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF] </code></pre> <p>My question is whether or not it's possible to make a PCRE regular expression for this (or its inverse) without actually hard-coding th...
[ { "answer_id": 961504, "author": "Jeff Atwood", "author_id": 1, "author_profile": "https://Stackoverflow.com/users/1", "pm_score": 7, "selected": false, "text": "[\\u0009\\u000a\\u000d\\u0020-\\uD7FF\\uE000-\\uFFFD]\n" }, { "answer_id": 9351128, "author": "Yuval Rimar", "...
2008/12/29
[ "https://Stackoverflow.com/questions/397250", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23845/" ]
397,253
<p>I need to pull large Unicode textual strings (e.g. 200Mb) from a Database (nvarchar) and store in memory for processing. i.e. I need random access to all parts of the strings.</p> <p>Looking at this from strictly memory centric point of view, what are the pro’s and con’s of using a System.IO.MemoryStream versus a S...
[ { "answer_id": 397388, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 4, "selected": true, "text": "List<byte> // has a nicer interface for processing\n" } ]
2008/12/29
[ "https://Stackoverflow.com/questions/397253", "https://Stackoverflow.com", "https://Stackoverflow.com/users/46100/" ]
397,257
<p>I have a WPF listbox which displays messages. It contains an avatar on the left side and the username and message stacked vertically to the right of the avatar. The layout is fine until the message text should word wrap, but instead I get a horizontal scroll bar on the listbox. </p> <p>I've Googled and found soluti...
[ { "answer_id": 397287, "author": "Nash", "author_id": 49761, "author_profile": "https://Stackoverflow.com/users/49761", "pm_score": 8, "selected": true, "text": "TextBlock" }, { "answer_id": 41594571, "author": "eldor", "author_id": 1915999, "author_profile": "https:/...
2008/12/29
[ "https://Stackoverflow.com/questions/397257", "https://Stackoverflow.com", "https://Stackoverflow.com/users/100/" ]
397,263
<p>I'm used to doing Java programming, where you never really have to think about pointers when programming. However, at the moment I'm writing a program in C++. When making classes that have members of other classes, when should I use pointers and when should I not? For example, when would I want to do this:</p> <pre...
[ { "answer_id": 397267, "author": "Reunanen", "author_id": 19254, "author_profile": "https://Stackoverflow.com/users/19254", "pm_score": 6, "selected": true, "text": "Bar" }, { "answer_id": 397269, "author": "kgiannakakis", "author_id": 24054, "author_profile": "https:...
2008/12/29
[ "https://Stackoverflow.com/questions/397263", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
397,283
<p>I have a class Test in C:/proj/test_xml/Test.java. Given parser.parse("test.xml"); I need a way to parse test.xml whether it is in current directory, proj or in C:/ Also, the solution should not make use of java.io</p> <p>Thanks</p>
[ { "answer_id": 397267, "author": "Reunanen", "author_id": 19254, "author_profile": "https://Stackoverflow.com/users/19254", "pm_score": 6, "selected": true, "text": "Bar" }, { "answer_id": 397269, "author": "kgiannakakis", "author_id": 24054, "author_profile": "https:...
2008/12/29
[ "https://Stackoverflow.com/questions/397283", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
397,293
<p>I'm looking for a high performance method or library for scanning all files on disk or in a given directory and grabbing their basic stats - filename, size, and modification date. </p> <p>I've written a python program that uses <code>os.walk</code> along with <code>os.path.getsize</code> to get the file list, and i...
[ { "answer_id": 397539, "author": "rob", "author_id": 43927, "author_profile": "https://Stackoverflow.com/users/43927", "pm_score": 2, "selected": false, "text": "os.walk" }, { "answer_id": 397647, "author": "S.Lott", "author_id": 10661, "author_profile": "https://Stac...
2008/12/29
[ "https://Stackoverflow.com/questions/397293", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13055/" ]
397,301
<p>I was reading <a href="https://stackoverflow.com/questions/392397/arrays-whats-the-point">this post</a> the other night about the inner workings of the Array, and learned a lot from the answers posted, especially from <a href="https://stackoverflow.com/questions/392397/arrays-whats-the-point#392426">Jonathan Holland...
[ { "answer_id": 397796, "author": "Jason S", "author_id": 44330, "author_profile": "https://Stackoverflow.com/users/44330", "pm_score": 2, "selected": false, "text": "A=[0,1,4,9,16];\n" }, { "answer_id": 400298, "author": "Vilx-", "author_id": 41360, "author_profile": ...
2008/12/29
[ "https://Stackoverflow.com/questions/397301", "https://Stackoverflow.com", "https://Stackoverflow.com/users/44084/" ]
397,320
<p>I am having a frame-based webpage with 3 frames. A topliner, a navigation on the left side and a content frame on the bottom right side.</p> <p>Now, I want to show up a popup-menu when the user right-clicks on the content-frame. Because a div-container can not go out of the frame, my idea was, placing the whole fra...
[ { "answer_id": 400404, "author": "qbeuek", "author_id": 5348, "author_profile": "https://Stackoverflow.com/users/5348", "pm_score": 1, "selected": false, "text": "window.createPopup(...)\n" } ]
2008/12/29
[ "https://Stackoverflow.com/questions/397320", "https://Stackoverflow.com", "https://Stackoverflow.com/users/49772/" ]
397,332
<p>Ctrl M-L doesn't toggle all the regions in vb.net (2008) when there's a hierarchy between the regions. I don't like regions. Is there a way to expand ALL the regions or remove them permanently? </p>
[ { "answer_id": 397344, "author": "Bernhard Hofmann", "author_id": 39722, "author_profile": "https://Stackoverflow.com/users/39722", "pm_score": 1, "selected": false, "text": " <Element Type=\"Type\" Id=\"DefaultType\">\n <Elements>\n <Element>\n <Elements />\n ...
2008/12/29
[ "https://Stackoverflow.com/questions/397332", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5232/" ]
397,337
<p>I develop tools in Autodesk Maya. Many of the tools I build have simple windowed GUIs for the animators and modellers to use. These GUIs often contain what you'd normally expect to see in any basic window; labels, lists, menus, buttons, textfields, etc. However, there are limitations to the complexity of the UIs ...
[ { "answer_id": 399413, "author": "Matt", "author_id": 49135, "author_profile": "https://Stackoverflow.com/users/49135", "pm_score": 3, "selected": true, "text": "def initializePumpThread():\n global pumpedThread\n global app\n if pumpedThread == None:\n app = QtGui.QAppli...
2008/12/29
[ "https://Stackoverflow.com/questions/397337", "https://Stackoverflow.com", "https://Stackoverflow.com/users/46914/" ]
397,341
<p>I'm reading through "A Gentle Introduction to Haskell," and early on it uses this example, which works fine in GHC and horribly in my brain:</p> <pre><code>initial = 0 next resp = resp process req = req+1 reqs = client initial resps resps ...
[ { "answer_id": 397352, "author": "Jon", "author_id": 25111, "author_profile": "https://Stackoverflow.com/users/25111", "pm_score": 2, "selected": false, "text": "take 10 reqs" }, { "answer_id": 397442, "author": "xtofl", "author_id": 6610, "author_profile": "https://S...
2008/12/29
[ "https://Stackoverflow.com/questions/397341", "https://Stackoverflow.com", "https://Stackoverflow.com/users/38803/" ]
397,346
<p>Is possible to set an image as an iPhone application unique icon in code instead of adding a PNG format image file and naming it <code>Icon.png</code>?</p>
[ { "answer_id": 400121, "author": "Ryan E", "author_id": 31344, "author_profile": "https://Stackoverflow.com/users/31344", "pm_score": 1, "selected": true, "text": "<key>CFBundleIconFile</key>\n<string>app.png</string>\n" } ]
2008/12/29
[ "https://Stackoverflow.com/questions/397346", "https://Stackoverflow.com", "https://Stackoverflow.com/users/35405/" ]
397,355
<p>How do I create subdomains in ASP.NET? I have few links on my homepage(Home.aspx) Example: Link1 and Link2</p> <p>I need to create two sub domains link1.example.com and link2.example.com and redirect to them. I will be using Response.Redirect for navigation. </p> <p>Questions: Do the files need to reside in diffe...
[ { "answer_id": 397896, "author": "patridge", "author_id": 48700, "author_profile": "https://Stackoverflow.com/users/48700", "pm_score": 3, "selected": true, "text": "RewriteCond %{HTTP_Host} ^(?~new-sub-domain.yourdomain.com).*$ [I]\nRewriteRule ^(.*)$ http://www.yourdomain.com/new-sub-d...
2008/12/29
[ "https://Stackoverflow.com/questions/397355", "https://Stackoverflow.com", "https://Stackoverflow.com/users/48307/" ]
397,384
<p>EDIT:</p> <p>I'm told that making you guys read means I get less attention. My apologies. Here's a simpler version:</p> <p>Bill got $100 dollars worth of items from a store.</p> <p>He wants to return enough of the items to get exactly $30 dollars back.</p> <p>The store has a Point of Return system that will help...
[ { "answer_id": 397466, "author": "WW.", "author_id": 14663, "author_profile": "https://Stackoverflow.com/users/14663", "pm_score": 2, "selected": true, "text": "SELECT\n i1.id AS id1,\n NULL AS id2,\n NULL AS id3,\n i1.amount\nFROM\n items i1\nUNION ALL\nSELECT\n i1.id AS id1...
2008/12/29
[ "https://Stackoverflow.com/questions/397384", "https://Stackoverflow.com", "https://Stackoverflow.com/users/49478/" ]
397,396
<p>In my web app I use several asmx (Web Services) from the same provider, they have one for this, other for that, but all require a SOAP Header with Authentication.</p> <p>It is simple to add the Authentication:</p> <pre><code>public static SoCredentialsHeader AttachCredentialHeader() { SoCredentialsHeader ch = ...
[ { "answer_id": 402268, "author": "Ricardo Villamil", "author_id": 19314, "author_profile": "https://Stackoverflow.com/users/19314", "pm_score": 0, "selected": false, "text": "public static T AttachDiaryCredentialHeader<T>() where T: class\n{\n T ch = new T();\n Type objType = ch.Ge...
2008/12/29
[ "https://Stackoverflow.com/questions/397396", "https://Stackoverflow.com", "https://Stackoverflow.com/users/28004/" ]
397,404
<p>Say we have:</p> <pre><code> Class Base { virtual void f(){g();}; virtual void g(){//Do some Base related code;} }; Class Derived : public Base { virtual void f(){Base::f();}; virtual void g(){//Do some Derived related code}; }; int main() { Base *pBase = new Derived; pBase->f(); ...
[ { "answer_id": 397409, "author": "Johannes Schaub - litb", "author_id": 34509, "author_profile": "https://Stackoverflow.com/users/34509", "pm_score": 7, "selected": true, "text": "Base::g();\n" }, { "answer_id": 398392, "author": "user48956", "author_id": 48956, "auth...
2008/12/29
[ "https://Stackoverflow.com/questions/397404", "https://Stackoverflow.com", "https://Stackoverflow.com/users/46418/" ]
397,410
<p>I accumulated a quite a lot of data in a raw form (csv and binary) - 4GB per day for a few months to be precise.</p> <p>I decided to join the civilized world and use database to access the data and I wondered what would be the correct layout; the format is quite simple: a few rows for every time tick (bid, ask, tim...
[ { "answer_id": 397421, "author": "cletus", "author_id": 18393, "author_profile": "https://Stackoverflow.com/users/18393", "pm_score": 4, "selected": true, "text": "CREATE TABLE instrument (\n id BIGINT NOT NULL AUTO_INCREMENT,\n code CHAR(4),\n company_name VARCHAR(100),\n PRIMARY KE...
2008/12/29
[ "https://Stackoverflow.com/questions/397410", "https://Stackoverflow.com", "https://Stackoverflow.com/users/28772/" ]
397,412
<p>I have recently been exploring Apache Ofbiz and was impressed by its ability to customize most areas of the application: UI, workflow, entities.</p> <p>Is there any similar (not necessarily an ERP system) application developed in C#/.Net which offers a similar level of customization?</p> <p>I am looking for examp...
[ { "answer_id": 397421, "author": "cletus", "author_id": 18393, "author_profile": "https://Stackoverflow.com/users/18393", "pm_score": 4, "selected": true, "text": "CREATE TABLE instrument (\n id BIGINT NOT NULL AUTO_INCREMENT,\n code CHAR(4),\n company_name VARCHAR(100),\n PRIMARY KE...
2008/12/29
[ "https://Stackoverflow.com/questions/397412", "https://Stackoverflow.com", "https://Stackoverflow.com/users/46279/" ]
397,425
<p>In which situations should I choose to use a functional programming language over a more verbose object-oriented language like C++, C# or Java?</p> <p>I understand what functional programming is, what I don't really understand is for what types of problems is it a perfect solution?</p>
[ { "answer_id": 397882, "author": "Phil", "author_id": 49642, "author_profile": "https://Stackoverflow.com/users/49642", "pm_score": 1, "selected": false, "text": "logger.expects(once()).method(\"error\")\n .with( and(stringContains(action),stringContains(cause)) );" } ]
2008/12/29
[ "https://Stackoverflow.com/questions/397425", "https://Stackoverflow.com", "https://Stackoverflow.com/users/47630/" ]
397,426
<p>Currently I'm having a problem with generating class files from a xsd with repeating elements. I’m using the custom tool ‘MsDatasetGenerator’ in VS2005 SP1 witch create a typed dataset from the xsd for c#. I’m trying to parse the xml by this schema</p> <pre><code> &lt;?xml version="1.0" encoding=\"utf-8\"?&gt; &...
[ { "answer_id": 397446, "author": "nick_alot", "author_id": 46100, "author_profile": "https://Stackoverflow.com/users/46100", "pm_score": 1, "selected": false, "text": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<xs:schema id=\"XSDobject\" targetNamespace=\"http://tempuri.org/XSDobject.x...
2008/12/29
[ "https://Stackoverflow.com/questions/397426", "https://Stackoverflow.com", "https://Stackoverflow.com/users/49788/" ]
397,430
<p>I want to write a cocoa application which downloads a file using ftp. I read about the NSURL class which has "NSURLHandle FTP Property Keys". I want to know how do I make use of these constants to provide username and password to the ftp site.</p>
[ { "answer_id": 397431, "author": "csl", "author_id": 21028, "author_profile": "https://Stackoverflow.com/users/21028", "pm_score": 1, "selected": false, "text": "ftp://user:pass@ftp.somewhere.com/path/to/file\n" } ]
2008/12/29
[ "https://Stackoverflow.com/questions/397430", "https://Stackoverflow.com", "https://Stackoverflow.com/users/39270/" ]
397,435
<p>I've a DLL assembly, in which there are various classes. Each class has around 50-100 members and 4-5 functions. How can I create a list of all the classes and their respective members using a VB.NET program?</p> <p>I need to show to the user for performing an operation using a particular class.</p>
[ { "answer_id": 397451, "author": "amazedsaint", "author_id": 45956, "author_profile": "https://Stackoverflow.com/users/45956", "pm_score": 4, "selected": false, "text": "Assembly thisAsm = Assembly.GetExecutingAssembly();\nList<Type> types = thisAsm.GetTypes().Where(t => t.IsClass && !t....
2008/12/29
[ "https://Stackoverflow.com/questions/397435", "https://Stackoverflow.com", "https://Stackoverflow.com/users/49372/" ]
397,465
<p>Is it possible to use the ASP.Net Range validator when the format string is dd/MMM/yyyy?</p>
[ { "answer_id": 397693, "author": "HectorMac", "author_id": 1400, "author_profile": "https://Stackoverflow.com/users/1400", "pm_score": 0, "selected": false, "text": "Thread.CurrentThread.CurrentCulture = \n CultureInfo.CreateSpecificCulture(\"en-GB\");\nThread.CurrentThread.CurrentUIC...
2008/12/29
[ "https://Stackoverflow.com/questions/397465", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21586/" ]
397,477
<p>In my asp.net-mvc website I have a field that usually has a string (from database) but can from time to time contain nothing. Because IE doesn't know how to handle the css "empty-cells" tag, empty table cells need to be filled with an &amp;nbsp;<br> I thought </p> <pre><code>Html.Encode(" "); </code></pre> <p>wo...
[ { "answer_id": 397531, "author": "devio", "author_id": 21336, "author_profile": "https://Stackoverflow.com/users/21336", "pm_score": 3, "selected": true, "text": "public class MyHtml\n{\n public static string Encode(string s)\n {\n if (string.IsNullOrEmpty(s) || s.Trim()==\"...
2008/12/29
[ "https://Stackoverflow.com/questions/397477", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11333/" ]
397,483
<p>What is the best way to have an associative array with arbitrary value types for each key in C++?</p> <p>Currently my plan is to create a "value" class with member variables of the types I will be expecting. For example:</p> <pre><code>class Value { int iValue; Value(int v) { iValue = v; } std::strin...
[ { "answer_id": 397487, "author": "Bombe", "author_id": 43582, "author_profile": "https://Stackoverflow.com/users/43582", "pm_score": 2, "selected": false, "text": "Value" }, { "answer_id": 397493, "author": "Johannes Schaub - litb", "author_id": 34509, "author_profile...
2008/12/29
[ "https://Stackoverflow.com/questions/397483", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11125/" ]
397,488
<p>Is there something like python's interactive REPL mode, but for Java? So that I can, for example, type <code>InetAddress.getAllByName( localHostName )</code> in a window, and immediately get results, without all this public static void nightmare() thing?</p>
[ { "answer_id": 397496, "author": "speciousfool", "author_id": 39584, "author_profile": "https://Stackoverflow.com/users/39584", "pm_score": 4, "selected": false, "text": ">>> from java.net import *\n>>> InetAddress.getAllByName(\"google.com\")\narray(java.net.InetAddress,[google.com/209....
2008/12/29
[ "https://Stackoverflow.com/questions/397488", "https://Stackoverflow.com", "https://Stackoverflow.com/users/34161/" ]
397,489
<p>After making a few modifications to a rails app I am tinkering on, railroad stopped working. The verbose output gives some clues. I wonder if other folks have encountered this and if there are some pointers for fixing this problem. Is it a data modeling error? Is it a problem with railroad? Error log follows...</p> ...
[ { "answer_id": 397496, "author": "speciousfool", "author_id": 39584, "author_profile": "https://Stackoverflow.com/users/39584", "pm_score": 4, "selected": false, "text": ">>> from java.net import *\n>>> InetAddress.getAllByName(\"google.com\")\narray(java.net.InetAddress,[google.com/209....
2008/12/29
[ "https://Stackoverflow.com/questions/397489", "https://Stackoverflow.com", "https://Stackoverflow.com/users/39584/" ]
397,495
<p>i want to compare the current time and file creation time in Perl but both are in different format. localtime is in this format:</p> <pre><code>22116291110813630 </code></pre> <p>and file creation time is </p> <pre><code>Today, December 29, 2008, 2:38:37 PM </code></pre> <p>How do i compare which one is greater ...
[ { "answer_id": 397526, "author": "ysth", "author_id": 17389, "author_profile": "https://Stackoverflow.com/users/17389", "pm_score": 2, "selected": false, "text": "localtime" }, { "answer_id": 397540, "author": "Nathan Fellman", "author_id": 1084, "author_profile": "ht...
2008/12/29
[ "https://Stackoverflow.com/questions/397495", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
397,507
<p>I just wanted to check with you guys if you know what the maximum number of rows - in a combo / list is. I know that VB6 had a 32k limit - I couldn't find anything to confirm with a quick google search so I thought I'd throw it out to the experts.</p> <p>Cheers, Dave</p>
[ { "answer_id": 399383, "author": "Mitch Wheat", "author_id": 16076, "author_profile": "https://Stackoverflow.com/users/16076", "pm_score": 1, "selected": false, "text": "BeginUpdate" } ]
2008/12/29
[ "https://Stackoverflow.com/questions/397507", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26446/" ]
397,524
<p>I want to retrieve a set of records from a database, do a rs.next() and then assign the result of this to a variable to pass to a method that will use this record, in the same way that I would without assigning it to a variable and passing it to a method is there any way to do this? I'm using JAVA (1.5)</p> <hr> <...
[ { "answer_id": 397546, "author": "OscarRyz", "author_id": 20654, "author_profile": "https://Stackoverflow.com/users/20654", "pm_score": 1, "selected": true, "text": "while( rs.next() ) { \n list.add( createFrom( rs ) );\n}\n\n...\n\npublic Object createFrom( ResultSet rs ) { // Here ...
2008/12/29
[ "https://Stackoverflow.com/questions/397524", "https://Stackoverflow.com", "https://Stackoverflow.com/users/49805/" ]
397,537
<p>I want to insert multiple invisible watermarks into my JPEG pictures through C# code. That means that I need a .NET library that does this work and not some external batch application.</p> <p>Any suggestions?</p>
[ { "answer_id": 397559, "author": "splattne", "author_id": 6461, "author_profile": "https://Stackoverflow.com/users/6461", "pm_score": 1, "selected": false, "text": " ICoverFile cover = new BMPCoverFile(\"cover.bmp\");\n cover.CreateStegoFile(\"stego.bmp\",\"Hello\",\"MyPwd\"); \n" ...
2008/12/29
[ "https://Stackoverflow.com/questions/397537", "https://Stackoverflow.com", "https://Stackoverflow.com/users/49807/" ]
397,556
<p>I've got an enum like this:</p> <pre><code>public enum MyLovelyEnum { FirstSelection, TheOtherSelection, YetAnotherOne }; </code></pre> <p>I got a property in my DataContext:</p> <pre><code>public MyLovelyEnum VeryLovelyEnum { get; set; } </code></pre> <p>And I got three RadioButtons in my WPF client...
[ { "answer_id": 406798, "author": "Lars", "author_id": 42809, "author_profile": "https://Stackoverflow.com/users/42809", "pm_score": 10, "selected": true, "text": "public class EnumBooleanConverter : IValueConverter\n{\n #region IValueConverter Members\n public object Convert(object val...
2008/12/29
[ "https://Stackoverflow.com/questions/397556", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7021/" ]
397,558
<p>How can I make a text entry field that takes the input characters and displays it in another place, character by character as a the typest type them!</p>
[ { "answer_id": 397570, "author": "quark", "author_id": 46680, "author_profile": "https://Stackoverflow.com/users/46680", "pm_score": 2, "selected": false, "text": "<input type=\"text\" id=\"textField\" />\n<br />\n<span id=\"textOutput\"></span>\n\n<script type=\"text/javascript\">\n\n ...
2008/12/29
[ "https://Stackoverflow.com/questions/397558", "https://Stackoverflow.com", "https://Stackoverflow.com/users/49809/" ]
397,572
<p>I am writing a cocoa application which has a NSWindow. I want to change the background color of the window to a specific color. But the window properties in the inspector only provide "Textured Window" alternative. How can I make the color of the window as desired?</p>
[ { "answer_id": 397607, "author": "diciu", "author_id": 2811, "author_profile": "https://Stackoverflow.com/users/2811", "pm_score": 1, "selected": false, "text": "- (id)initWithContentRect:(NSRect)contentRect\n styleMask:(NSUInteger)styleMask\n backing:(NSB...
2008/12/29
[ "https://Stackoverflow.com/questions/397572", "https://Stackoverflow.com", "https://Stackoverflow.com/users/39270/" ]
397,581
<p>Let's assume I'm a complete lazy bum and I don't want to invest the several dozen keystrokes needed for my own exception class (it's not utterly important which gets used, really). However, to pretend I'm following good practices here, I want a pre-existing one that best fits my situation.</p> <p><strong>Problem:<...
[ { "answer_id": 397586, "author": "C. K. Young", "author_id": 13, "author_profile": "https://Stackoverflow.com/users/13", "pm_score": 5, "selected": true, "text": "IllegalArgumentException" }, { "answer_id": 397823, "author": "Phil", "author_id": 49642, "author_profile...
2008/12/29
[ "https://Stackoverflow.com/questions/397581", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19825/" ]
397,601
<p>Reading source code of sample projects, such as Beast and Bort, are recommended as a good way to learn rails. But I found myself getting lost in reading source code of these projects, cause the included plugins might bring in some strange code without any hint, such as <code>"require"</code> or <code>"include"</code...
[ { "answer_id": 398213, "author": "Samuel", "author_id": 32465, "author_profile": "https://Stackoverflow.com/users/32465", "pm_score": 3, "selected": true, "text": "class Demo::Sub::HelloController < ActionController::Base\n\nend\n" } ]
2008/12/29
[ "https://Stackoverflow.com/questions/397601", "https://Stackoverflow.com", "https://Stackoverflow.com/users/44512/" ]
397,612
<p>Given the <a href="http://www.drdobbs.com/dangers-of-suid-shell-scripts/199101190" rel="nofollow noreferrer">dangers of SUID shell scripts</a>, is there a more secure way of giving passwordless access to scripts (bash, PHP) with root permissions in Linux?</p> <p>(Ubuntu 8.10)</p>
[ { "answer_id": 397616, "author": "C. K. Young", "author_id": 13, "author_profile": "https://Stackoverflow.com/users/13", "pm_score": 3, "selected": false, "text": "sudoers" } ]
2008/12/29
[ "https://Stackoverflow.com/questions/397612", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20074/" ]
397,628
<p>I'm getting this error message on all projects (including brand new empty templates) I'm trying to build with Visual Studio 2008:</p> <blockquote> <p>Unexpected debug information initialization error -- 'Failed to find a required export in the runtime.'</p> </blockquote> <p>The <a href="http://msdn.microso...
[ { "answer_id": 397683, "author": "David Schmitt", "author_id": 4918, "author_profile": "https://Stackoverflow.com/users/4918", "pm_score": 2, "selected": true, "text": "csc.exe" } ]
2008/12/29
[ "https://Stackoverflow.com/questions/397628", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4918/" ]
397,631
<p>I hope someone could help me on this.</p> <p>I want to add a month to a database date, but I want to prevent two jumping over month on those days at the end.</p> <p>For instance I may have:</p> <p>Jan 31 2009 </p> <p>And I want to get</p> <p>Feb 28 2009 </p> <p>and not </p> <p>March 2 2009 </p> <p>Next date...
[ { "answer_id": 397698, "author": "Tony Andrews", "author_id": 18747, "author_profile": "https://Stackoverflow.com/users/18747", "pm_score": 5, "selected": true, "text": "SQL> select add_months(date '2008-01-31',1) from dual;\n\nADD_MONTHS(\n-----------\n29-FEB-2008\n\nSQL> select add_mon...
2008/12/29
[ "https://Stackoverflow.com/questions/397631", "https://Stackoverflow.com", "https://Stackoverflow.com/users/20654/" ]
397,667
<p>This is my first question in this forum... I have a file with numerous data fields (both numeric and characters) in the file. I want to delimit the file with set of delimiter length like 2,5,1,9,6 etc.</p> <p>(<em>Alternatively: I have a list of field lengths such as 2,5,1,9,6, and I want to insert comma delimiters...
[ { "answer_id": 397671, "author": "Bombe", "author_id": 43582, "author_profile": "https://Stackoverflow.com/users/43582", "pm_score": 1, "selected": false, "text": "String newString = line.substring(0, firstComma) + \",\" + line.substring(firstComma + 1);\n" }, { "answer_id": 3976...
2008/12/29
[ "https://Stackoverflow.com/questions/397667", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
397,677
<p>I have a piece of text, that I wish to show truncated, but when clicked it will expand to show the rest. Clicking again should truncate it.</p> <p>I was trying to use the onclick event to handle this as follows (<strong>WARNING</strong>: Do not run following code without reading below...):</p> <pre><code>&lt;span ...
[ { "answer_id": 397690, "author": "Andreas Grech", "author_id": 44084, "author_profile": "https://Stackoverflow.com/users/44084", "pm_score": 3, "selected": true, "text": "showAllComment" }, { "answer_id": 397844, "author": "foxy", "author_id": 30119, "author_profile":...
2008/12/29
[ "https://Stackoverflow.com/questions/397677", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1478/" ]
397,684
<p>I have used <a href="http://www.ericmmartin.com/projects/simplemodal/" rel="nofollow noreferrer">SimpleModal</a>. Now the problem is the resizing of the modal dialog. I have a confirm dialog, and it is basically small after pressing Yes.</p> <p>The second one is <code>my.php</code> and it contains large data. I am ...
[ { "answer_id": 790332, "author": "tghw", "author_id": 2363, "author_profile": "https://Stackoverflow.com/users/2363", "pm_score": 2, "selected": false, "text": ">> $('.modalContainer').addClass('wide')\n" }, { "answer_id": 809901, "author": "brianpeiris", "author_id": 224...
2008/12/29
[ "https://Stackoverflow.com/questions/397684", "https://Stackoverflow.com", "https://Stackoverflow.com/users/44984/" ]