qid int64 4 19.1M | question stringlengths 18 48.3k | answers list | date stringlengths 10 10 | metadata list |
|---|---|---|---|---|
189,588 | <p>I've been led to believe that for single variable assignment in T-SQL, <code>set</code> is the best way to go about things, for two reasons:</p>
<ul>
<li>it's the ANSI standard for variable assignment</li>
<li>it's actually faster than doing a SELECT (for a single variable)</li>
</ul>
<p>So...</p>
<pre><code>SELE... | [
{
"answer_id": 189727,
"author": "Pittsburgh DBA",
"author_id": 10224,
"author_profile": "https://Stackoverflow.com/users/10224",
"pm_score": 4,
"selected": true,
"text": "SET NOCOUNT ON\n\nDECLARE @runs int\nDECLARE @i int, @j int\nSET @runs = 1\nSET @i = 0\nSET @j = 0\n\nDECLARE @dtSta... | 2008/10/09 | [
"https://Stackoverflow.com/questions/189588",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1030/"
] |
189,621 | <p>I am wondering if someone can put a bit of an authoritative reference summary of when the !important declaration in CSS does <strong>not</strong> work to override inline styles.</p>
| [
{
"answer_id": 189661,
"author": "Matt Mitchell",
"author_id": 364,
"author_profile": "https://Stackoverflow.com/users/364",
"pm_score": 4,
"selected": false,
"text": "someselector {\n property: value !important;\n same-property: another-value;\n}\n"
},
{
"answer_id": 71161879,... | 2008/10/09 | [
"https://Stackoverflow.com/questions/189621",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/364/"
] |
189,645 | <p>Given the following code (that doesn't work):</p>
<pre><code>while True:
# Snip: print out current state
while True:
ok = get_input("Is this ok? (y/n)")
if ok.lower() == "y": break 2 # This doesn't work :(
if ok.lower() == "n": break
# Do more proces... | [
{
"answer_id": 189664,
"author": "S.Lott",
"author_id": 10661,
"author_profile": "https://Stackoverflow.com/users/10661",
"pm_score": 7,
"selected": false,
"text": "class GetOutOfLoop( Exception ):\n pass\n\ntry:\n done= False\n while not done:\n isok= False\n whil... | 2008/10/10 | [
"https://Stackoverflow.com/questions/189645",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15537/"
] |
189,680 | <p>i am looking for opinions if the following problem maybe has a better/different/common solution:</p>
<hr>
<p>I have a database for products which contains the names of the products in english (the default language of this application) and i need translations of the names if available.</p>
<p>Currently i have this... | [
{
"answer_id": 189693,
"author": "Daniel Spiewak",
"author_id": 9815,
"author_profile": "https://Stackoverflow.com/users/9815",
"pm_score": 4,
"selected": true,
"text": "CREATE TABLE products_l10n\n(\n product_id serial NOT NULL,\n language_id int NOT NULL,\n \"name\" character varyin... | 2008/10/10 | [
"https://Stackoverflow.com/questions/189680",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/21566/"
] |
189,694 | <p>I'm exporting data programatically from Excel to SQL Server 2005 using SqlBulkCopy. It works great, the only problem I have is that it doesn't preserve the row sequence i have in Excel file. I don't have a column to order by, I just want the records to be inserted in the same order they appear in the Excel Spreadshe... | [
{
"answer_id": 189728,
"author": "abarax",
"author_id": 24390,
"author_profile": "https://Stackoverflow.com/users/24390",
"pm_score": 0,
"selected": false,
"text": "def file1 = new File('c:\\\\temp\\\\yourSpreadsheet.csv')\ndef file2 = new File('c:\\\\temp\\\\yourInsertScript.sql')\n\nde... | 2008/10/10 | [
"https://Stackoverflow.com/questions/189694",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3661/"
] |
189,708 | <p>Is there any way of determining whether or not a specific temp table has been created in a session without referencing the tempdb database that it was created on? Users are allocated to a specific tempdb when they log in, so I don't know which tempdb they'll be using.</p>
<p>I don't need to specify a tempdb to sele... | [
{
"answer_id": 356175,
"author": "Jonathan",
"author_id": 6910,
"author_profile": "https://Stackoverflow.com/users/6910",
"pm_score": 3,
"selected": false,
"text": "SELECT object_id('#tmpTable')\n SELECT object_id('tempdb..#tmpTable')\n SELECT object_id('##tmpTable')\n IF NULLIF(object_i... | 2008/10/10 | [
"https://Stackoverflow.com/questions/189708",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1030/"
] |
189,725 | <p>During recent discussions at work, someone referred to a trampoline function.</p>
<p>I have read the description at <a href="http://en.wikipedia.org/wiki/Trampoline_(computers)" rel="noreferrer">Wikipedia</a>. It is enough to give a general idea of the functionality, but I would like something a bit more concrete.... | [
{
"answer_id": 189818,
"author": "ephemient",
"author_id": 20713,
"author_profile": "https://Stackoverflow.com/users/20713",
"pm_score": 3,
"selected": false,
"text": "#include <stdlib.h>\n#include <string.h>\n/* sort an array, starting at address `base`,\n * containing `nmemb` members, ... | 2008/10/10 | [
"https://Stackoverflow.com/questions/189725",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10703/"
] |
189,751 | <p>I've setup a static website on GAE using hints found elsewhere, but can't figure out how to return a 404 error. My app.yaml file looks like</p>
<pre><code>- url: (.*)/
static_files: static\1/index.html
upload: static/index.html
- url: /
static_dir: static
</code></pre>
<p>with all the static html/jpg files ... | [
{
"answer_id": 189935,
"author": "Alexander Kojevnikov",
"author_id": 712,
"author_profile": "https://Stackoverflow.com/users/712",
"pm_score": 6,
"selected": true,
"text": "- url: /.*\n script: main.py\n from google.appengine.ext import webapp\nfrom google.appengine.ext.webapp.util imp... | 2008/10/10 | [
"https://Stackoverflow.com/questions/189751",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/26683/"
] |
189,765 | <p>I have a query that ran fine on SQL2005 but moving the database to SQL2008 gives me the error from the title.</p>
<p>The code that is the problem is a call to CONTAINS, CONTAINSTABLE or FREETEXT with an empty parameter. However I'm trying to only call or join when there is a value like such</p>
<pre><code>where (@... | [
{
"answer_id": 347232,
"author": "NotMe",
"author_id": 2424,
"author_profile": "https://Stackoverflow.com/users/2424",
"pm_score": 6,
"selected": false,
"text": "\"\" '' @search_term = '\"\"' declare @SearchTerm nvarchar(250)\n\nSET @SearchTerm = '\"\"'\n\nselect UserId, U.Description, ... | 2008/10/10 | [
"https://Stackoverflow.com/questions/189765",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6084/"
] |
189,770 | <p>How would you go about retrieving the @@IDENTITY value for each row when the SQLDataAdapater.Update is executed on a table?</p>
<p>eg. Is it possible to modify/intercept the InsertCommand, generated by the SQLCommandBuilder, to say add an output parameter, and then retrieve its value in the da.RowUpdated event???</... | [
{
"answer_id": 347232,
"author": "NotMe",
"author_id": 2424,
"author_profile": "https://Stackoverflow.com/users/2424",
"pm_score": 6,
"selected": false,
"text": "\"\" '' @search_term = '\"\"' declare @SearchTerm nvarchar(250)\n\nSET @SearchTerm = '\"\"'\n\nselect UserId, U.Description, ... | 2008/10/10 | [
"https://Stackoverflow.com/questions/189770",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1885/"
] |
189,780 | <p>I have an odd problem...I'm using a documentation generator which generates a lot of output like docs/foo.php.html. It's XHTML, and thus contains <code><?xml...></code> tags at the beginning of file. The problem is, Apache has somehow decided to run it through the PHP interpreter, even though ".php" appears in... | [
{
"answer_id": 189810,
"author": "John Millikin",
"author_id": 3560,
"author_profile": "https://Stackoverflow.com/users/3560",
"pm_score": 2,
"selected": false,
"text": "short_open_tag = 0\n"
},
{
"answer_id": 190221,
"author": "alexandrul",
"author_id": 19756,
"autho... | 2008/10/10 | [
"https://Stackoverflow.com/questions/189780",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14569/"
] |
189,787 | <p>I have never seen a way to do this nicely, i would be interested in seeing how others do it. Currently i format it like this:</p>
<pre><code>public Booking createVehicleBooking(Long officeId,
Long start,
Long end,
... | [
{
"answer_id": 189793,
"author": "John Millikin",
"author_id": 3560,
"author_profile": "https://Stackoverflow.com/users/3560",
"pm_score": 4,
"selected": false,
"text": "public Booking createVehicleBooking(\n Long officeId, \n Long start, \n Long end,\n String origin, \n S... | 2008/10/10 | [
"https://Stackoverflow.com/questions/189787",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/24390/"
] |
189,791 | <p>Compared to most people on this site I am admittedly a novice. I wanted to get some advice from the pros on how to avoid making stupid errors in your code. </p>
<p>Is there anyone else who had the problem when they were first starting out of missing some detail that causes big problems? Are there any habits or beha... | [
{
"answer_id": 189866,
"author": "Skittles",
"author_id": 26300,
"author_profile": "https://Stackoverflow.com/users/26300",
"pm_score": 1,
"selected": false,
"text": " // Create local variables\n\n // Get the connection string from the config file\n\n // Create Try C... | 2008/10/10 | [
"https://Stackoverflow.com/questions/189791",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/25012/"
] |
189,850 | <p>What is the <a href="http://en.wikipedia.org/wiki/MIME" rel="noreferrer">MIME</a> type of javascript? </p>
<p>More specifically, what is the right thing to put in the "type" attribute of a script tag? <code>application/x-javascript</code> and <code>text/javascript</code> seem to be the main contenders.</p>
| [
{
"answer_id": 1998417,
"author": "ekerner",
"author_id": 233060,
"author_profile": "https://Stackoverflow.com/users/233060",
"pm_score": 5,
"selected": false,
"text": "text/javascript application/javascript application/x-javascript type=\"text/javascript\" application/x-javascript"
}
... | 2008/10/10 | [
"https://Stackoverflow.com/questions/189850",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6007/"
] |
189,855 | <p>Which would be a neat implemenation of a N-ary tree in C language?</p>
<p>Particulary, I want to implement an n-ary tree, not self-ballancing, with an unbound number of children in each node, in which each node holds an already defined struct, like this for example:</p>
<pre><code>struct task {
char command[MAX_... | [
{
"answer_id": 189900,
"author": "Matt J",
"author_id": 18528,
"author_profile": "https://Stackoverflow.com/users/18528",
"pm_score": 5,
"selected": true,
"text": "struct task {\n char command[MAX_LENGTH];\n int required_time;\n};\n\nstruct TreeNode;\n\nstruct ListNode {\n struct Tree... | 2008/10/10 | [
"https://Stackoverflow.com/questions/189855",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/26699/"
] |
189,878 | <p>I'm looking for a regex that will allow me to validate whether or not a string is the reference to a website address, or a specific page in that website. </p>
<p>So it would match:</p>
<pre><code>http://google.com
ftp://google.com
http://google.com/
http://lots.of.subdomains.google.com
</code></pre>
<p>But not:</... | [
{
"answer_id": 189941,
"author": "Paige Ruten",
"author_id": 813,
"author_profile": "https://Stackoverflow.com/users/813",
"pm_score": 4,
"selected": true,
"text": "(http|ftp|https)://([a-zA-Z0-9\\-\\.]+)/?\n"
},
{
"answer_id": 190053,
"author": "Dov Wasserman",
"author_i... | 2008/10/10 | [
"https://Stackoverflow.com/questions/189878",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4965/"
] |
189,887 | <p>is there an if statement when it comes to mysql query statements?</p>
<p>when i am updating a table record, i want to only update certain columns if they have a value to be updated.</p>
<p>for example, i want an update table function, and there is a table for volunteers and a table for people who just want email u... | [
{
"answer_id": 190011,
"author": "Darryl Hein",
"author_id": 5441,
"author_profile": "https://Stackoverflow.com/users/5441",
"pm_score": 3,
"selected": true,
"text": "UPDATE volunteer, people\nSET volunteer.email = 'me@email.com',\n people.email = 'other@gmail.com',\n people.first_... | 2008/10/10 | [
"https://Stackoverflow.com/questions/189887",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/26130/"
] |
189,889 | <p>I'm having a problem using the java.text.MessageFormat object.</p>
<p>I'm trying to create SQL insert statements. The problem is, when I do something like this:</p>
<pre><code>MessageFormat messageFormat = "insert into {0} values ( '{1}', '{2}', '{3}', {4} )";
Object[] args = { str0, str1, str2, str3, str4 };
St... | [
{
"answer_id": 189896,
"author": "Chris Boran",
"author_id": 25660,
"author_profile": "https://Stackoverflow.com/users/25660",
"pm_score": 4,
"selected": false,
"text": "\"'{0}'\" \"{0}\" '' String \"'{''}'\" '{ '' }' '{' '}' \"{'}\" \"{}\""
},
{
"answer_id": 189898,
"author"... | 2008/10/10 | [
"https://Stackoverflow.com/questions/189889",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12983/"
] |
189,892 | <p>If I have an array of a fixed size depending on how it is defined and used, I typically use one of two ways to reference it.</p>
<p>Array type 1: Since it is a fixed size based on a define, I just use that define in all my loops referencing it.</p>
<pre><code>#define MAXPLAYERS 4
int playerscores[MAXPLAYERS];
fo... | [
{
"answer_id": 189907,
"author": "Alex B",
"author_id": 23643,
"author_profile": "https://Stackoverflow.com/users/23643",
"pm_score": 4,
"selected": true,
"text": "#define ARRAY_COUNT(x) (sizeof(x)/sizeof((x)[0]))\n\n...\n\nstruct foo arr[100];\n...\n\nfor (i = 0; i < ARRAY_COUNT(arr); +... | 2008/10/10 | [
"https://Stackoverflow.com/questions/189892",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13676/"
] |
189,903 | <p>At the <a href="http://www.binpress.com" rel="noreferrer">startup</a> I'm working at we are now considering scaling solutions for our database. Things get somewhat confusing (for me at least) with MySQL, which has the <a href="http://dev.mysql.com/doc/refman/5.0/en/faqs-mysql-cluster.html" rel="noreferrer">MySQL clu... | [
{
"answer_id": 222837,
"author": "Zak",
"author_id": 2112692,
"author_profile": "https://Stackoverflow.com/users/2112692",
"pm_score": 2,
"selected": false,
"text": "#\n# Log names\n#\n\nlog-bin=binlog\nrelay-log=relaylog\nlog-error=errors.log\n\n#\n# Log tuning\n#\n\nsync_bi... | 2008/10/10 | [
"https://Stackoverflow.com/questions/189903",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10585/"
] |
189,906 | <p>I'm trying to upgrade my subversion server (I have it hosted with Dreamhost)</p>
<p>This is what I run:</p>
<ul>
<li>wget <a href="http://subversion.tigris.org/downloads/subversion-1.5.2.tar.bz2" rel="nofollow noreferrer">http://subversion.tigris.org/downloads/subversion-1.5.2.tar.bz2</a></li>
<li>wget <a href="ht... | [
{
"answer_id": 189948,
"author": "Aupajo",
"author_id": 10407,
"author_profile": "https://Stackoverflow.com/users/10407",
"pm_score": 3,
"selected": false,
"text": "mkdir ~/src\ncd ~/src\nwget http://subversion.tigris.org/downloads/subversion-1.5.2.tar.bz2\nwget http://subversion.tigris.... | 2008/10/10 | [
"https://Stackoverflow.com/questions/189906",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18274/"
] |
189,921 | <p>I'm trying to port an old library (that doesn't use namespaces as far as I can tell) to modern compilers. One of my targets can't tell the difference between System::TObject and ::TObject (without a namespace). System::TObject is native to the compiler.</p>
<p>I've tried a using directive, i.e. using ::TObject;</p>... | [
{
"answer_id": 189957,
"author": "Jim Buck",
"author_id": 2666,
"author_profile": "https://Stackoverflow.com/users/2666",
"pm_score": 0,
"selected": false,
"text": "#define TObject TMadeUpNameObject\n"
},
{
"answer_id": 189990,
"author": "John Dibling",
"author_id": 24153... | 2008/10/10 | [
"https://Stackoverflow.com/questions/189921",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/22885/"
] |
189,934 | <p>I'm trying to convert some code that worked great in VB, but I can't figure out what objects to use in .Net. </p>
<pre><code> Dim oXMLHttp As XMLHTTP
oXMLHttp = New XMLHTTP
oXMLHttp.open "POST", "https://www.server.com/path", False
oXMLHttp.setRequestHeader "Content-Type", "application/x-www-form-ur... | [
{
"answer_id": 189966,
"author": "Booji Boy",
"author_id": 1433,
"author_profile": "https://Stackoverflow.com/users/1433",
"pm_score": 2,
"selected": true,
"text": "Imports System.Net\nImports System.Web.HttpUtility\n\nPublic Class XMLHTTP\n'Makes an internet connection to specified URL ... | 2008/10/10 | [
"https://Stackoverflow.com/questions/189934",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/232/"
] |
189,943 | <p>Here's what I would like to do:</p>
<p>I'm taking pictures with a webcam at regular intervals. Sort of like a time lapse thing. However, if nothing has really changed, that is, the picture pretty much <em>looks</em> the same, I don't want to store the latest snapshot.</p>
<p>I imagine there's some way of quantif... | [
{
"answer_id": 190061,
"author": "Mr Fooz",
"author_id": 25050,
"author_profile": "https://Stackoverflow.com/users/25050",
"pm_score": 5,
"selected": false,
"text": "i1 i2"
},
{
"answer_id": 196882,
"author": "elifiner",
"author_id": 15109,
"author_profile": "https://... | 2008/10/10 | [
"https://Stackoverflow.com/questions/189943",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20498/"
] |
189,947 | <p>Have a n-tire web application and search often times out after 30 secs. How to detect the root cause of the problem?</p>
| [
{
"answer_id": 190061,
"author": "Mr Fooz",
"author_id": 25050,
"author_profile": "https://Stackoverflow.com/users/25050",
"pm_score": 5,
"selected": false,
"text": "i1 i2"
},
{
"answer_id": 196882,
"author": "elifiner",
"author_id": 15109,
"author_profile": "https://... | 2008/10/10 | [
"https://Stackoverflow.com/questions/189947",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/26365/"
] |
189,972 | <p>I know of the following:</p>
<ul>
<li>The venerable <code>getopt(3)</code></li>
<li>The extended <code>getopt_long</code></li>
<li>glibc's <a href="http://www.gnu.org/software/libtool/manual/libc/Argp.html" rel="noreferrer"><code>argp</code></a> parser for Unix-style argument vectors</li>
<li><a href="http://develo... | [
{
"answer_id": 189980,
"author": "John Millikin",
"author_id": 3560,
"author_profile": "https://Stackoverflow.com/users/3560",
"pm_score": 2,
"selected": false,
"text": "popt glib glib getopt"
},
{
"answer_id": 191821,
"author": "dmckee --- ex-moderator kitten",
"author_i... | 2008/10/10 | [
"https://Stackoverflow.com/questions/189972",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20713/"
] |
189,976 | <p>This is more of a design question. </p>
<p>I am building a tool that displays business objects in various ways (ie Tree Nodes, List View Items, Combo Boxes, Text Fields, etc). Anytime the user changes any of one of them, an event is raised that signals that that business object has been changed or the collection ... | [
{
"answer_id": 189991,
"author": "Community",
"author_id": -1,
"author_profile": "https://Stackoverflow.com/users/-1",
"pm_score": 2,
"selected": false,
"text": "public delegate void ObjectRefresh(BusinessObject obj);\n public event ObjectRefresh;\n if (ObjectRefresh)\n ObjectRefresh(... | 2008/10/10 | [
"https://Stackoverflow.com/questions/189976",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
189,985 | <p>I want to put Apache 2.2.9 in front of a Weblogic 9.2 server on Windows XP. What does it take to do that ?<br></p>
<p>I probably need mod_proxy on the apache side ? <br></p>
<p>As far as Weblogic and apache are concerned, is there something similar to mod_jk ?<br></p>
<p>I would like this setup so that I can intr... | [
{
"answer_id": 5527885,
"author": "Ujjwal",
"author_id": 249186,
"author_profile": "https://Stackoverflow.com/users/249186",
"pm_score": 1,
"selected": false,
"text": "update httpd.conf to load weblogic_module --> mod_wl_20.so\n\n<IfModule mod_weblogic.c> \n WebLogicCluster w1s1.com:... | 2008/10/10 | [
"https://Stackoverflow.com/questions/189985",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11142/"
] |
189,988 | <p>An idiom commonly used in OO languages like Python and Ruby is instantiating an object and chaining methods that return a reference to the object itself, such as:</p>
<pre><code>s = User.new.login.get_db_data.get_session_data
</code></pre>
<p>In PHP, it is possible to replicate this behavior like so:</p>
<pre><co... | [
{
"answer_id": 190014,
"author": "Community",
"author_id": -1,
"author_profile": "https://Stackoverflow.com/users/-1",
"pm_score": 3,
"selected": false,
"text": "<?php\n\n class User\n {\n function __construct()\n {\n }\n\n function Login()\n {\n ... | 2008/10/10 | [
"https://Stackoverflow.com/questions/189988",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/16034/"
] |
189,993 | <p>When I use ApacheBench to test https, the error is returned, "ssl handshake failed".</p>
<p>How can I use ApacheBench to test https?</p>
| [
{
"answer_id": 4149548,
"author": "naugtur",
"author_id": 173077,
"author_profile": "https://Stackoverflow.com/users/173077",
"pm_score": 3,
"selected": false,
"text": "#!/bin/bash\nK=200; \nHTTPSA='https://192.168.1.103:443/' \ndate +%M-%S-%N>wgetres.txt\nfor (( c=1; c<=$K; c++ ))... | 2008/10/10 | [
"https://Stackoverflow.com/questions/189993",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
190,006 | <p>I've studied C programming in college some years ago and have developed some medium applications back then (nothing serious). Now I have to develop some more 'advanced' C applications (involving POSIX threads and RPC), but right now I'm a little rusty even with the basics.</p>
<p>Can anyone recommend me good online... | [
{
"answer_id": 202919,
"author": "Frank Szczerba",
"author_id": 8964,
"author_profile": "https://Stackoverflow.com/users/8964",
"pm_score": 2,
"selected": false,
"text": "man printf info printf"
}
] | 2008/10/10 | [
"https://Stackoverflow.com/questions/190006",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/26699/"
] |
190,007 | <p>When developing Java applications, I often override Object methods (usually equals and hashCode). I would like some way to systematically check that I'm adhering to the contract for Object methods for every one of my classes. For example, I want tests that assert that for equal objects, the hash code is also equal... | [
{
"answer_id": 13152063,
"author": "Jeff Bowman",
"author_id": 1426891,
"author_profile": "https://Stackoverflow.com/users/1426891",
"pm_score": 0,
"selected": false,
"text": "EqualsTester a.equals(b) a.hashCode() == b.hashCode() new EqualsTester()\n .addEqualityGroup(\"hello\", \"h\" ... | 2008/10/10 | [
"https://Stackoverflow.com/questions/190007",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8217/"
] |
190,010 | <p>In the <a href="https://docs.python.org/2/library/threading.html#thread-objects" rel="noreferrer">Python documentation</a>
it says:</p>
<blockquote>
<p>A thread can be flagged as a "daemon thread". The significance of this
flag is that the entire Python program exits when only daemon threads
are left. The ini... | [
{
"answer_id": 68556232,
"author": "Rohit",
"author_id": 6695608,
"author_profile": "https://Stackoverflow.com/users/6695608",
"pm_score": 4,
"selected": false,
"text": "dameon daemon daemon non-daemon non-daemon non-daemon daemon daemon daemon daemon daemon daemon non-daemon non-daemon ... | 2008/10/10 | [
"https://Stackoverflow.com/questions/190010",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/16148/"
] |
190,045 | <p>I have a large int[] array and a much smaller int[] array. I want to fill up the large array with values from the small array, by repeat copying the small array into the large array until it is full (so that large[0] = large[13] = large[26] ... = small[0] etc.). I already have a simple method:</p>
<pre><code>int ... | [
{
"answer_id": 68556232,
"author": "Rohit",
"author_id": 6695608,
"author_profile": "https://Stackoverflow.com/users/6695608",
"pm_score": 4,
"selected": false,
"text": "dameon daemon daemon non-daemon non-daemon non-daemon daemon daemon daemon daemon daemon daemon non-daemon non-daemon ... | 2008/10/10 | [
"https://Stackoverflow.com/questions/190045",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14606/"
] |
190,049 | <p>Given a table structure like this:</p>
<pre><code>CREATE TABLE `user` (
`id` int(10) unsigned NOT NULL auto_increment,
`name` varchar(32) NOT NULL,
`username` varchar(16) NOT NULL,
`password` char(32) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `username` (`username`)
);
</code></pre>
<p>Is there any use... | [
{
"answer_id": 190079,
"author": "Darryl Hein",
"author_id": 5441,
"author_profile": "https://Stackoverflow.com/users/5441",
"pm_score": 3,
"selected": true,
"text": "LIMIT"
},
{
"answer_id": 190081,
"author": "JR Lawhorne",
"author_id": 22917,
"author_profile": "http... | 2008/10/10 | [
"https://Stackoverflow.com/questions/190049",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9021/"
] |
190,054 | <p>I've been refactoring my models and controllers in an effort to remove code duplication, and so far it seems to be all peachy creamy. Currently I've got a bit of code that is common to two of my controllers, like so:</p>
<pre><code>def process_filters
# Filter hash we're going to pass to the model
filter_to_use ... | [
{
"answer_id": 190079,
"author": "Darryl Hein",
"author_id": 5441,
"author_profile": "https://Stackoverflow.com/users/5441",
"pm_score": 3,
"selected": true,
"text": "LIMIT"
},
{
"answer_id": 190081,
"author": "JR Lawhorne",
"author_id": 22917,
"author_profile": "http... | 2008/10/10 | [
"https://Stackoverflow.com/questions/190054",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/841/"
] |
190,059 | <p>I'm trying to create a c++ library for use on windows/MSVC.</p>
<p>My problem is that it seems that in order to link properly, I need to distribute a bunch of different versions, linked against different versions of MSVC's c++ runtimes - single and multi-threaded, debug and release, different compiler versions, var... | [
{
"answer_id": 190074,
"author": "C. K. Young",
"author_id": 13,
"author_profile": "https://Stackoverflow.com/users/13",
"pm_score": 0,
"selected": false,
"text": "std::tr1::shared_ptr msvcrt.dll msvcrt"
}
] | 2008/10/10 | [
"https://Stackoverflow.com/questions/190059",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9042/"
] |
190,066 | <p>Does anyone have some good information on the usage of the .SaveChanges() method?</p>
<p>I am experiencing a variety of issues when attempting to use the .SaveChanges() method on my data context object. I am taking data from an existing data source, creating the appropriate EntityFramework/DataService objects, pop... | [
{
"answer_id": 359658,
"author": "Maghis",
"author_id": 45355,
"author_profile": "https://Stackoverflow.com/users/45355",
"pm_score": 3,
"selected": true,
"text": "int i = 0;\nforeach (var item in collection)\n{\n // do something with your data\n if ((i++ % 10) == 0)\n conte... | 2008/10/10 | [
"https://Stackoverflow.com/questions/190066",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/25719/"
] |
190,102 | <p>I want to use data binding with an XML document to populate a simple form that shows details about a list of people. I've got it all set up and working like so right now:</p>
<pre><code><Window x:Class="DataBindingSample.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://s... | [
{
"answer_id": 191467,
"author": "aogan",
"author_id": 4795,
"author_profile": "https://Stackoverflow.com/users/4795",
"pm_score": 2,
"selected": true,
"text": " <TextBox Name=\"nameText\">\n <TextBox.Text>\n <Binding XPath=\"*[local-name()='Name']\" />\n </TextBox.Text>\n </... | 2008/10/10 | [
"https://Stackoverflow.com/questions/190102",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/25968/"
] |
190,108 | <p>I am having trouble grabbing the values from the form once processed. I need your help.</p>
<pre><code>function updateUser($table, $id) {
if($_POST) {
processUpdate($table, $id);
} else {
updateForm($table, $id);
}
}
function processUpdate($table, $id) {
print $table; //testing
... | [
{
"answer_id": 190120,
"author": "Community",
"author_id": -1,
"author_profile": "https://Stackoverflow.com/users/-1",
"pm_score": 2,
"selected": true,
"text": "<form method = \"post\" action = \"...\">\n $_POST $HTTP_POST_VARS"
}
] | 2008/10/10 | [
"https://Stackoverflow.com/questions/190108",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/26130/"
] |
190,135 | <p>I need to generate random numbers in the range 1 - 10000 continuously with out duplication.
Any recommendations?</p>
<p>Description: we are building a new version for our application, which maintains records in Sqlite DB. in the last version of our application, we did not had unique key for each record. But now wi... | [
{
"answer_id": 190182,
"author": "Martin York",
"author_id": 14065,
"author_profile": "https://Stackoverflow.com/users/14065",
"pm_score": 2,
"selected": false,
"text": "#include <iostream>\n#include <vector>\n#include <algorithm>\n\n\nclass GaranteedNoRepeatRandom\n{\n public:\n ... | 2008/10/10 | [
"https://Stackoverflow.com/questions/190135",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/21045/"
] |
190,138 | <p>I want to create a collection in VB.NET, but I only want it to accept objects of a certain type. For example, I want to create a class called "FooCollection" that acts like a collection in every way, but only accepts objects of type "Foo".</p>
<p>I thought I could do this using generics, using the following syntax:... | [
{
"answer_id": 190153,
"author": "Andrew Moore",
"author_id": 26210,
"author_profile": "https://Stackoverflow.com/users/26210",
"pm_score": 4,
"selected": true,
"text": "List(Of Foo) System.Collections.Generic Private myList As New List(Of Foo) 'Creates a Foo List'\nPrivate myIntList As ... | 2008/10/10 | [
"https://Stackoverflow.com/questions/190138",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8114/"
] |
190,145 | <p>I know it's a long shot, but is there some package or means to insert emoticons into a LaTeX document?</p>
| [
{
"answer_id": 190195,
"author": "freespace",
"author_id": 8297,
"author_profile": "https://Stackoverflow.com/users/8297",
"pm_score": 3,
"selected": false,
"text": "0x2639 0x263B 0x2686 0x2689"
},
{
"answer_id": 190321,
"author": "ADEpt",
"author_id": 10105,
"author_... | 2008/10/10 | [
"https://Stackoverflow.com/questions/190145",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1630/"
] |
190,160 | <p>I am currently developing a Rails application using a database that was designed before I was aware of Rails existence.<br>
I have currently created some migrations to add some new tables and new columns to existing tables.</p>
<p>I would like to have the migrations to recreate the full database.</p>
<p>Which step... | [
{
"answer_id": 192585,
"author": "Thomas Brice",
"author_id": 8179,
"author_profile": "https://Stackoverflow.com/users/8179",
"pm_score": 3,
"selected": true,
"text": "rake db:schema:dump db/schema.rb db/schema.rb RAILS_ENV=production rake db:schema:dump schema.rb"
},
{
"answer_i... | 2008/10/10 | [
"https://Stackoverflow.com/questions/190160",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14755/"
] |
190,168 | <p>I am trying to set my DOS environment variable in Ruby, and have it persist after the script exits. For example, if I want a ruby script <code>set_abc_env.rb</code> to set environment variable 'ABC' to 'blah', I expect to run the following:</p>
<pre><code>C:> echo %ABC%
C:> set_abc_env.rb
C:> echo %ABC% bl... | [
{
"answer_id": 190437,
"author": "Alexander Prokofyev",
"author_id": 11256,
"author_profile": "https://Stackoverflow.com/users/11256",
"pm_score": 6,
"selected": true,
"text": "i = ENV['ABC']; # nil\nENV['ABC'] = '123';\ni = ENV['ABC']; # '123'\n require 'win32/registry.rb'\n\nWin32::Reg... | 2008/10/10 | [
"https://Stackoverflow.com/questions/190168",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/24560/"
] |
190,184 | <p>I often use the <code>execv()</code> function in C++, but if some of the arguments are in C++ strings, it annoys me that I cannot do this:</p>
<pre><code>const char *args[4];
args[0] = "/usr/bin/whatever";
args[1] = filename.c_str();
args[2] = someparameter.c_str();
args[3] = 0;
execv(args[0], args);
</c... | [
{
"answer_id": 190208,
"author": "C. K. Young",
"author_id": 13,
"author_profile": "https://Stackoverflow.com/users/13",
"pm_score": 6,
"selected": true,
"text": "const_cast c_str() argv[] envp[] const argv[] envp[]"
},
{
"answer_id": 5433327,
"author": "Tomi",
"author_id... | 2008/10/10 | [
"https://Stackoverflow.com/questions/190184",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5324/"
] |
190,194 | <p>How do you create a database backup of a mysql database in VB.Net? </p>
| [
{
"answer_id": 256271,
"author": "SecretDeveloper",
"author_id": 2720,
"author_profile": "https://Stackoverflow.com/users/2720",
"pm_score": 1,
"selected": false,
"text": "mysqldump --host=[HOSTNAME] --user=[USER] --password=[PASSWORD] -R [DATABASE NAME] > [PATH TO BACKUP FILE]\n mysql -... | 2008/10/10 | [
"https://Stackoverflow.com/questions/190194",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/25078/"
] |
190,198 | <p>I am trying to generate equivalent MD5 hashes in both JavaScript and .Net. Not having done either, I decided to use against a third party calculation - this <a href="http://www.johnmaguire.us/tools/hashcalc/index.php?strtohash=password&mode=hash" rel="nofollow noreferrer">web site</a> for the word "password". ... | [
{
"answer_id": 190206,
"author": "Greg Hewgill",
"author_id": 893,
"author_profile": "https://Stackoverflow.com/users/893",
"pm_score": 0,
"selected": false,
"text": "$ echo -n password | md5\n5f4dcc3b5aa765d61d8327deb882cf99\n"
},
{
"answer_id": 190210,
"author": "Mark Glori... | 2008/10/10 | [
"https://Stackoverflow.com/questions/190198",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/525/"
] |
190,224 | <p>I've made some unit tests (in test class). The tutorial I've read said that I should make a TestSuite for the unittests.</p>
<p>Odd is that when I'm running the unit test directly (selecting the test class - Run as jUnit test) everything is working fine, altough when I'm trying the same thing with the test suite th... | [
{
"answer_id": 190347,
"author": "bernhardrusch",
"author_id": 3056,
"author_profile": "https://Stackoverflow.com/users/3056",
"pm_score": 4,
"selected": true,
"text": "import org.junit.runner.RunWith;\nimport org.junit.runners.Suite;\nimport org.junit.runners.Suite.SuiteClasses;\n\n\n@R... | 2008/10/10 | [
"https://Stackoverflow.com/questions/190224",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3056/"
] |
190,227 | <p>Assume my objects are in perfect working order (i.e. TDD makes me think they work).</p>
<p>I have a list that I create like this (except indented properly):</p>
<pre><code>var result = from v in vendors
from p in v.Products
orderby p.Name
select p;
</code></pre>
<p>This work... | [
{
"answer_id": 190234,
"author": "Omer van Kloeten",
"author_id": 4979,
"author_profile": "https://Stackoverflow.com/users/4979",
"pm_score": 3,
"selected": false,
"text": "var result = from v in vendors\n from p in v.Products\n where requiredAttributes.All(a => p... | 2008/10/10 | [
"https://Stackoverflow.com/questions/190227",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2122/"
] |
190,229 | <p><code>itoa()</code> is a really handy function to convert a number to a string. Linux does not seem to have <code>itoa()</code>, is there an equivalent function or do I have to use <code>sprintf(str, "%d", num)</code>?</p>
| [
{
"answer_id": 190235,
"author": "Matt J",
"author_id": 18528,
"author_profile": "https://Stackoverflow.com/users/18528",
"pm_score": 8,
"selected": true,
"text": "libc itoa() sprintf(target_string,\"%d\",source_int) snprintf(target_string, size_of_target_string_in_bytes, \"%d\", source_... | 2008/10/10 | [
"https://Stackoverflow.com/questions/190229",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5324/"
] |
190,232 | <pre><code>inline int factorial(int n)
{
if(!n) return 1;
else return n*factorial(n-1);
}
</code></pre>
<p>As I was reading <a href="https://rads.stackoverflow.com/amzn/click/com/0201543303" rel="noreferrer" rel="nofollow noreferrer">this</a>, found that the above code would lead to "infinite compilation" if n... | [
{
"answer_id": 190256,
"author": "Matt J",
"author_id": 18528,
"author_profile": "https://Stackoverflow.com/users/18528",
"pm_score": 5,
"selected": false,
"text": "inline #pragma --max-inline-insns-recursive"
},
{
"answer_id": 190268,
"author": "Derek Park",
"author_id":... | 2008/10/10 | [
"https://Stackoverflow.com/questions/190232",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/26724/"
] |
190,236 | <p>I have found no way of dumping the stack on all threads in .NET. Neither a signal to be send to the process nor programatic access to all the threads. I can only get access to the current thread via Thread.CurrentThread.</p>
<p>Any tricks ?</p>
| [
{
"answer_id": 190247,
"author": "smaclell",
"author_id": 22914,
"author_profile": "https://Stackoverflow.com/users/22914",
"pm_score": 0,
"selected": false,
"text": "Using System.Diagnostics;\n\nvar threads = Process.GetCurrentProcess().Threads;\n"
},
{
"answer_id": 190271,
... | 2008/10/10 | [
"https://Stackoverflow.com/questions/190236",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
190,243 | <p>One of our internally written tool is fed a cvs commit trace of the form:</p>
<pre><code>Checking in src/com/package/AFile.java;
/home/cvs/src/com/package/AFile.java,v <-- Afile.java
new revision: 1.1.2.56; previous revision: 1.1.2.55
done
</code></pre>
<p>The tool then acquires the file from cvs by... | [
{
"answer_id": 190317,
"author": "ADEpt",
"author_id": 10105,
"author_profile": "https://Stackoverflow.com/users/10105",
"pm_score": 6,
"selected": true,
"text": "cvs checkout -r <revision> -p filename.ext > ~/tmp/filename.ext\n cvs export -r <revision> -d ~/tmp module/filename.ext\n"
... | 2008/10/10 | [
"https://Stackoverflow.com/questions/190243",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18027/"
] |
190,251 | <p>I have a multi-table query, similar to this (simplified version)</p>
<pre><code>SELECT columns, count(table2.rev_id) As rev_count, sum(table2.rev_rating) As sum_rev_rating
FROM table1
LEFT JOIN table2
ON table1.dom_id = table2.rev_domain_from
WHERE dom_lastreview != 0 AND rev_status = 1
GROUP BY dom_url
ORDER B... | [
{
"answer_id": 190319,
"author": "Steven A. Lowe",
"author_id": 9345,
"author_profile": "https://Stackoverflow.com/users/9345",
"pm_score": 1,
"selected": false,
"text": "SELECT columns, count(table2.rev_id) As rev_count, \n sum(table2.rev_rating) As sum_rev_rating,\n sum(table2.re... | 2008/10/10 | [
"https://Stackoverflow.com/questions/190251",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
190,253 | <p>I am after documentation on using wildcard or regular expressions (not sure on the exact terminology) with a jQuery selector.</p>
<p>I have looked for this myself but have been unable to find information on the syntax and how to use it. Does anyone know where the documentation for the syntax is?</p>
<p>EDIT: The a... | [
{
"answer_id": 190255,
"author": "Xenph Yan",
"author_id": 264,
"author_profile": "https://Stackoverflow.com/users/264",
"pm_score": 9,
"selected": true,
"text": "div <div class=\"asdf\">\n :regex $(\"div:regex(class, .*sd.*)\")\n : jQuery.expr[':'] jQuery.expr.pseudos.regex = jQuery.exp... | 2008/10/10 | [
"https://Stackoverflow.com/questions/190253",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5360/"
] |
190,257 | <p>What is the best database schema to track role-based access controls for a web application?</p>
<p>I am using Rails, but the RBAC plugin linked by Google looks unmaintained (only 300 commits to SVN; latest was almost a year ago).</p>
<p>The concept is simple enough to implement from scratch, yet complex and import... | [
{
"answer_id": 195766,
"author": "Yuval",
"author_id": 2819,
"author_profile": "https://Stackoverflow.com/users/2819",
"pm_score": 2,
"selected": false,
"text": "rule 14: guest role + page name + read permission\nrule 46: approver role + add column + execute permission\n"
}
] | 2008/10/10 | [
"https://Stackoverflow.com/questions/190257",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2938/"
] |
190,270 | <p>I just got a dedicated server from a hosting company, and for some reason, it didn't have IIS installed.
It did have .Net 2.0, though.</p>
<p>So I installed IIS, but now my ASP.net websites won't work.
I just get a 404, no event log entries, nothing...</p>
<p>I noticed in the redistributable package information th... | [
{
"answer_id": 190276,
"author": "WebDude",
"author_id": 15360,
"author_profile": "https://Stackoverflow.com/users/15360",
"pm_score": 5,
"selected": true,
"text": "aspnet_regiis -i\n C:\\WINDOWS\\Microsoft.NET\\Framework\\v2.0.50727\n"
}
] | 2008/10/10 | [
"https://Stackoverflow.com/questions/190270",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3314/"
] |
190,292 | <p>I'm currently working with PHPUnit to try and develop tests alongside what I'm writing, however, I'm currently working on writing the Session Manager, and am having issues doing so...</p>
<p>The constructor for the Session handling class is</p>
<pre><code>private function __construct()
{
if (!headers_sent())
... | [
{
"answer_id": 190498,
"author": "troelskn",
"author_id": 18180,
"author_profile": "https://Stackoverflow.com/users/18180",
"pm_score": 6,
"selected": true,
"text": "echo header exit session_start WebTestCase"
},
{
"answer_id": 282582,
"author": "Kornel",
"author_id": 270... | 2008/10/10 | [
"https://Stackoverflow.com/questions/190292",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20010/"
] |
190,295 | <p>How do I test the concrete methods of an abstract class with PHPUnit?</p>
<p>I'd expect that I'd have to create some sort of object as part of the test. Though, I've no idea the best practice for this or if PHPUnit allows for this.</p>
| [
{
"answer_id": 2241159,
"author": "Victor Farazdagi",
"author_id": 238300,
"author_profile": "https://Stackoverflow.com/users/238300",
"pm_score": 9,
"selected": true,
"text": "abstract class AbstractClass\n{\n public function concreteMethod()\n {\n return $this->abstractMet... | 2008/10/10 | [
"https://Stackoverflow.com/questions/190295",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20010/"
] |
190,296 | <p>What are the best practices for modeling inheritance in databases?</p>
<p>What are the trade-offs (e.g. queriability)?</p>
<p>(I'm most interested in SQL Server and .NET, but I also want to understand how other platforms address this issue.)</p>
| [
{
"answer_id": 190306,
"author": "Brad Wilson",
"author_id": 1554,
"author_profile": "https://Stackoverflow.com/users/1554",
"pm_score": 9,
"selected": true,
"text": "class Person {\n public int ID;\n public string FirstName;\n public string LastName;\n}\n\nclass Employee : Pers... | 2008/10/10 | [
"https://Stackoverflow.com/questions/190296",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/73794/"
] |
190,326 | <p>How can I find out the decorated name that will be asigned to each method name ? I'm trying to find out what the decorated name is , so that I may export it , in a DLL .</p>
| [
{
"answer_id": 190333,
"author": "Greg Hewgill",
"author_id": 893,
"author_profile": "https://Stackoverflow.com/users/893",
"pm_score": 3,
"selected": false,
"text": "__declspec(dllexport)"
},
{
"answer_id": 190346,
"author": "Michael Burr",
"author_id": 12711,
"autho... | 2008/10/10 | [
"https://Stackoverflow.com/questions/190326",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11234/"
] |
190,344 | <p>Problem is described and demonstrated on the following links:</p>
<ul>
<li><a href="https://web.archive.org/web/20081123055336/http://paulstovell.com/blog/wpf-why-is-my-text-so-blurry" rel="noreferrer">Paul Stovell WPF: Blurry Text Rendering </a></li>
<li><a href="http://www.gamedev.net/community/forums/topic.asp... | [
{
"answer_id": 1631635,
"author": "Isak Savo",
"author_id": 8521,
"author_profile": "https://Stackoverflow.com/users/8521",
"pm_score": 5,
"selected": false,
"text": "<!-- don't do this --->\n<Border>\n <Border.Effect>\n <DropShadowEffect BlurRadius=\"25\" ShadowDepth=\"0\" ... | 2008/10/10 | [
"https://Stackoverflow.com/questions/190344",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/438025/"
] |
190,368 | <p>In Scala, is it possible to get the string representation of a type at runtime? I am trying to do something along these lines:</p>
<pre><code>def printTheNameOfThisType[T]() = {
println(T.toString)
}
</code></pre>
| [
{
"answer_id": 190574,
"author": "svrist",
"author_id": 86,
"author_profile": "https://Stackoverflow.com/users/86",
"pm_score": 4,
"selected": true,
"text": "10:48 <seet_> http://stackoverflow.com/questions/190368/getting-the-string-representation-of-a-type-at-runtime-in-scala <-- isnt t... | 2008/10/10 | [
"https://Stackoverflow.com/questions/190368",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10475/"
] |
190,376 | <p>An interesting issue came up recently. We came across some code that is using <code>hashCode()</code> as a salt source for MD5 encryption but this raises the question: will <code>hashCode()</code> return the same value for the same object on different VMs, different JDK versions and operating systems? Even if its ... | [
{
"answer_id": 191851,
"author": "Michael Myers",
"author_id": 13531,
"author_profile": "https://Stackoverflow.com/users/13531",
"pm_score": 2,
"selected": false,
"text": "s[0]*31^(n-1) + s[1]*31^(n-2) + ... + s[n-1]\n"
}
] | 2008/10/10 | [
"https://Stackoverflow.com/questions/190376",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18393/"
] |
190,380 | <p>I am trying to store more than 1 data item at a single index in my linked-list. All of the examples in my textbook seem to illustrate adding only 1 piece of data per index. I'm assuming it is possible to add more?</p>
<p>For example, using the Collections API to store an integer I would do the following:</p>
<pr... | [
{
"answer_id": 190390,
"author": "Community",
"author_id": -1,
"author_profile": "https://Stackoverflow.com/users/-1",
"pm_score": 2,
"selected": false,
"text": "private struct Node\n{\n int Num1;\n int Num2;\n int Num3;\n}\n LinkedList<Node> list = new LnkedList<Node>();\n\nNod... | 2008/10/10 | [
"https://Stackoverflow.com/questions/190380",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14013/"
] |
190,385 | <p>How do I manipulate images at the pixel level in C#?</p>
<p>I need to be able to read/modify each bitmap pixel RGB values separately. </p>
<p>A code sample would be appreciated.</p>
| [
{
"answer_id": 190420,
"author": "mattlant",
"author_id": 14642,
"author_profile": "https://Stackoverflow.com/users/14642",
"pm_score": 4,
"selected": false,
"text": " public static Bitmap Diff(Bitmap src1, Bitmap src2, int x1, int y1, int x2, int y2, int width, int height)\n{\n Bi... | 2008/10/10 | [
"https://Stackoverflow.com/questions/190385",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3515/"
] |
190,396 | <p>How do you use the <strong>CSS</strong> <code>content</code> property to add <strong>HTML</strong> entities?</p>
<p>Using something like this just prints <code>&nbsp;</code> to the screen instead of the non-breaking space:</p>
<pre class="lang-css prettyprint-override"><code>.breadcrumbs a:before {
content: '&... | [
{
"answer_id": 190406,
"author": "John Millikin",
"author_id": 3560,
"author_profile": "https://Stackoverflow.com/users/3560",
"pm_score": 5,
"selected": false,
"text": ".breadcrumbs a:before {\n content: '>\\00a0';\n}\n"
},
{
"answer_id": 190412,
"author": "mathieu",
"a... | 2008/10/10 | [
"https://Stackoverflow.com/questions/190396",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9021/"
] |
190,421 | <p>Is there a PHP function to find out the name of the caller function in a given function?</p>
| [
{
"answer_id": 190425,
"author": "Christian C. Salvadó",
"author_id": 5445,
"author_profile": "https://Stackoverflow.com/users/5445",
"pm_score": 4,
"selected": false,
"text": "debug_backtrace()"
},
{
"answer_id": 190426,
"author": "Paul Dixon",
"author_id": 6521,
"au... | 2008/10/10 | [
"https://Stackoverflow.com/questions/190421",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
190,431 | <p>My motivation for trying out git-svn is the effortless merging and branching. Then I noticed that man git-svn(1) says: </p>
<blockquote>
<p>Running git-merge or git-pull is NOT recommended on a branch you plan
to dcommit from. Subversion does not represent merges in any
reasonable or useful fashion; so users ... | [
{
"answer_id": 190447,
"author": "Greg Hewgill",
"author_id": 893,
"author_profile": "https://Stackoverflow.com/users/893",
"pm_score": 6,
"selected": false,
"text": "git svn dcommit -n"
},
{
"answer_id": 1526673,
"author": "luntain",
"author_id": 5978,
"author_profil... | 2008/10/10 | [
"https://Stackoverflow.com/questions/190431",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5179/"
] |
190,450 | <p>Up until recently, I've been storing multiple values into different hashes with the same keys as follows:</p>
<pre><code>%boss = (
"Allan" => "George",
"Bob" => "George",
"George" => "lisa" );
%status = (
"Allan" => "Contractor",
"Bob" => "Part-time",
"George" => "... | [
{
"answer_id": 190467,
"author": "Vinko Vrsalovic",
"author_id": 5190,
"author_profile": "https://Stackoverflow.com/users/5190",
"pm_score": 6,
"selected": true,
"text": "~> more test.pl\n%chums = ( \"Allan\" => {\"Boss\" => \"George\", \"Status\" => \"Contractor\"},\n \"Bob\" ... | 2008/10/10 | [
"https://Stackoverflow.com/questions/190450",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14860/"
] |
190,454 | <p>I have a very large (~6GB) SVN repository, for which I've written a batch file script to do an incremental backup each day. The script checks when the last backup was run and dumps only the revisions since then.</p>
<p>The files are named: <code>backup-{lower_revision}-{higher_revision}.svn</code> eg: <code>backup-... | [
{
"answer_id": 3315992,
"author": "PuO2",
"author_id": 399977,
"author_profile": "https://Stackoverflow.com/users/399977",
"pm_score": 0,
"selected": false,
"text": "svn look youngest [live_repo]\nsvn look youngest [copied_repo]\n"
}
] | 2008/10/10 | [
"https://Stackoverflow.com/questions/190454",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9021/"
] |
190,461 | <p>I asked <a href="https://stackoverflow.com/questions/188043/security-crytography-stupid-challege-response-protocol">here</a> about a protocol that I was asked to implement, and how secure it was. Since it seemed clear from the very beginning that it was shit. Being so I ask:</p>
<p>Can you guys point me to some ver... | [
{
"answer_id": 195444,
"author": "Huibert Gill",
"author_id": 1254442,
"author_profile": "https://Stackoverflow.com/users/1254442",
"pm_score": 2,
"selected": false,
"text": "md5(login_name + domain_or_appname_salt + password);\n"
}
] | 2008/10/10 | [
"https://Stackoverflow.com/questions/190461",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/366094/"
] |
190,464 | <p>This is a pretty-much theoretical question, but..</p>
<p><strong>How much of an operating system could be written in a language like Python, Ruby, Perl, or Lisp, Haskell etc?</strong></p>
<p>It seems like a lot of the stuff like init.d could trivially be done in a scripting language. One of the firewall-device-OS'... | [
{
"answer_id": 190482,
"author": "Matthew Scharley",
"author_id": 15537,
"author_profile": "https://Stackoverflow.com/users/15537",
"pm_score": 2,
"selected": false,
"text": "sh sh"
},
{
"answer_id": 1678386,
"author": "L̲̳o̲̳̳n̲̳̳g̲̳̳p̲̳o̲̳̳k̲̳̳e̲̳̳",
"author_id": 80243,... | 2008/10/10 | [
"https://Stackoverflow.com/questions/190464",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/745/"
] |
190,476 | <p>I have those maps in my repository. </p>
<pre><code>public IQueryable<AwType> GetAwTypes()
{
return from awt in _db.AwTypes
select new AwType
{
Id = awt.Id,
Header = awt.Header,
Description = awt.Description
};
}
public IQuerya... | [
{
"answer_id": 198446,
"author": "Amy B",
"author_id": 8155,
"author_profile": "https://Stackoverflow.com/users/8155",
"pm_score": 2,
"selected": true,
"text": "var awGroups = from aw in _repository.GetAws()\ngroup aw by aw.AwType.ID into newGroup //changed to group on ID\nselect newGro... | 2008/10/10 | [
"https://Stackoverflow.com/questions/190476",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11374/"
] |
190,480 | <p>How to to configure apache + mod_lisp + clisp and set up a "Hello World!"? I couldn't find any complete howto on the subject. Thanks.</p>
<p>Edit: Vebjorn's solution works, but then I don't how to code the "hello world!". Can anyone tell me how to proceed? There's something like SWANKing the clisp, then connect to ... | [
{
"answer_id": 190567,
"author": "Vebjorn Ljosa",
"author_id": 17498,
"author_profile": "https://Stackoverflow.com/users/17498",
"pm_score": 3,
"selected": false,
"text": "sudo apxs -i -c mod_lisp.c httpd.conf sudo apachectl restart"
}
] | 2008/10/10 | [
"https://Stackoverflow.com/questions/190480",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/26416/"
] |
190,493 | <p>I am trying to figure out how to add a custom control to the iPhone MoviePlayer.
For an example of what I am trying to do see the following image.</p>
<p><img src="https://i.stack.imgur.com/Zt5MG.jpg" alt="alt text"></p>
<p>I am trying to add something like the controls on the right and left of the basic movie con... | [
{
"answer_id": 194646,
"author": "kdbdallas",
"author_id": 26728,
"author_profile": "https://Stackoverflow.com/users/26728",
"pm_score": 4,
"selected": true,
"text": "id vvController = [theMovie videoViewController];\n[[vvController _overlayView] addSubview:mainView];\n"
},
{
"an... | 2008/10/10 | [
"https://Stackoverflow.com/questions/190493",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/26728/"
] |
190,504 | <p>I've been working on a project in Delphi 7 where I wanted to have forms inherit components from other forms. I was able to get this working, but came across the following issues (and I'm going to post the solutions to hopefully help others in the future):</p>
<ol>
<li>In the .pas file of a form, I would change the ... | [
{
"answer_id": 190506,
"author": "Liron Yahdav",
"author_id": 62,
"author_profile": "https://Stackoverflow.com/users/62",
"pm_score": 6,
"selected": true,
"text": "type TMyForm = class(TAncestorForm) inherited object inherited MyForm: TMyForm var AncestorForm: TAncestorForm; uses unAnces... | 2008/10/10 | [
"https://Stackoverflow.com/questions/190504",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/62/"
] |
190,524 | <p>I have created some extra functionality on my Linq-to-SQL classes to make things easier as I develop my applications. For example I have defined a property that retrieves active contracts from a list of contracts. However if I try to use this property in a lambda expression or in general in a query it either throws ... | [
{
"answer_id": 190655,
"author": "Marc Gravell",
"author_id": 23354,
"author_profile": "https://Stackoverflow.com/users/23354",
"pm_score": 3,
"selected": true,
"text": " public static Expression<Func<Customer, bool>> HasActiveContract\n {\n get { return cust => cust.Contrac... | 2008/10/10 | [
"https://Stackoverflow.com/questions/190524",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/26746/"
] |
190,525 | <p>I'm not sure how familiar people are with the hobbit monitoring system - <a href="http://hobbitmon.sourceforge.net/" rel="nofollow noreferrer">http://hobbitmon.sourceforge.net/</a> - but I've got a tricky question.</p>
<p>I've got a custom test, which returns two NCV values. One value normally returns ~300 millisec... | [
{
"answer_id": 190655,
"author": "Marc Gravell",
"author_id": 23354,
"author_profile": "https://Stackoverflow.com/users/23354",
"pm_score": 3,
"selected": true,
"text": " public static Expression<Func<Customer, bool>> HasActiveContract\n {\n get { return cust => cust.Contrac... | 2008/10/10 | [
"https://Stackoverflow.com/questions/190525",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18673/"
] |
190,542 | <p>I'm using Java for accessing Alfresco content server via it's web service API for importing some content into it. Content should have some NamedValue properties set to UTF-8(cyrillic) string. I keep getting the Sax parser exception:</p>
<pre><code>org.xml.sax.SAXParseException: An invalid XML character (Unicode: 0x... | [
{
"answer_id": 197082,
"author": "Aleksandar Marinkovic",
"author_id": 26747,
"author_profile": "https://Stackoverflow.com/users/26747",
"pm_score": 3,
"selected": true,
"text": "alfresco-web-service-client.jar bcprov-jdk15-136.jar xmlsec-1.4.0.jar bcprov-jdk15-137.jar xmlsec-1.4.1.jar"
... | 2008/10/10 | [
"https://Stackoverflow.com/questions/190542",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/26747/"
] |
190,543 | <p>Is it possible to programmatically, or otherwise, increase the width of the Windows console window? Or do I need to create a wrapper program that looks and acts like the console somehow? Are there any programs around that do this already? I use Cygwin extensively in my development, and it seems a little ridiculous t... | [
{
"answer_id": 190603,
"author": "kgiannakakis",
"author_id": 24054,
"author_profile": "https://Stackoverflow.com/users/24054",
"pm_score": 1,
"selected": false,
"text": "size"
},
{
"answer_id": 8848967,
"author": "rob",
"author_id": 799759,
"author_profile": "https:/... | 2008/10/10 | [
"https://Stackoverflow.com/questions/190543",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15537/"
] |
190,553 | <p>In the following code, both <code>amp_swap()</code> and <code>star_swap()</code> seems to be doing the same thing. So why will someone prefer to use one over the other? Which one is the preferred notation and why? Or is it just a matter of taste?</p>
<pre><code>#include <iostream>
using namespace std;
void ... | [
{
"answer_id": 190564,
"author": "John Millikin",
"author_id": 3560,
"author_profile": "https://Stackoverflow.com/users/3560",
"pm_score": 1,
"selected": false,
"text": "(int *param) (int ¶m)"
},
{
"answer_id": 190565,
"author": "Mark Ingram",
"author_id": 986,
"a... | 2008/10/10 | [
"https://Stackoverflow.com/questions/190553",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7205/"
] |
190,559 | <p><em>When using threads I sometimes visualise them as weaving together 3 or more dimensional interconnections between Objects in a Spatial context. This isn't a general use case scenario, but for what I do it is a useful way to think about it.</em></p>
<h3>Are there any APIs which you use which aid threading?</h3>
<... | [
{
"answer_id": 190651,
"author": "Chris Vest",
"author_id": 13251,
"author_profile": "https://Stackoverflow.com/users/13251",
"pm_score": 5,
"selected": true,
"text": "java.util.concurrent"
},
{
"answer_id": 705084,
"author": "Yuval Adam",
"author_id": 24545,
"author_... | 2008/10/10 | [
"https://Stackoverflow.com/questions/190559",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4857/"
] |
190,560 | <p>I am trying to animate a change in backgroundColor using jQuery on mouseover.</p>
<p>I have checked some example and I seem to have it right, it works with other properties like fontSize, but with backgroundColor I get and "Invalid Property" js error.
The element I am working with is a div.</p>
<pre><code>$(".user... | [
{
"answer_id": 590065,
"author": "menardmam",
"author_id": 71830,
"author_profile": "https://Stackoverflow.com/users/71830",
"pm_score": 6,
"selected": false,
"text": "<!-- include Google's AJAX API loader -->\n<script src=\"http://www.google.com/jsapi\"></script>\n<!-- load JQuery and U... | 2008/10/10 | [
"https://Stackoverflow.com/questions/190560",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6125/"
] |
190,590 | <p>Ruby has a wealth of conditional constructs, including <code>if</code>/<code>unless</code>, <code>while</code>/<code>until</code> etc.</p>
<p>The <code>while</code> block from C:</p>
<pre><code>while (condition) {
...
}
</code></pre>
<p>can be directly translated to Ruby:</p>
<pre><code>while condition
... | [
{
"answer_id": 190591,
"author": "Cristian Diaconescu",
"author_id": 11545,
"author_profile": "https://Stackoverflow.com/users/11545",
"pm_score": 6,
"selected": true,
"text": "loop break loop do\n ...\n break unless condition\nend\n"
},
{
"answer_id": 190626,
"author":... | 2008/10/10 | [
"https://Stackoverflow.com/questions/190590",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11545/"
] |
190,593 | <p>I'm creating some text boxes on my form programmatically which I need to reference later using FindControl.</p>
<p>I've put the FindControl instruction in the page load method after the code which creates them but get an error:</p>
<blockquote>
<p><strong>Object reference not set to an instance of an object.</st... | [
{
"answer_id": 190628,
"author": "rslite",
"author_id": 15682,
"author_profile": "https://Stackoverflow.com/users/15682",
"pm_score": 2,
"selected": false,
"text": "TextBox txt = new TextBox();\n...\ntxt.Text = \"Text\";\n"
},
{
"answer_id": 237659,
"author": "Brian Boatright... | 2008/10/10 | [
"https://Stackoverflow.com/questions/190593",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/26126/"
] |
190,594 | <p>I have a Rails app that I need to deploy. Here are the facts:</p>
<ul>
<li>The app was developed on Windows and requires Windows binary gems</li>
<li>The app is to be deployed onto an Open Solaris shared server (Joyent)</li>
<li>I do not have permissions to install gems on the server</li>
<li>For the non-binary gem... | [
{
"answer_id": 190669,
"author": "Christoph Schiessl",
"author_id": 20467,
"author_profile": "https://Stackoverflow.com/users/20467",
"pm_score": 0,
"selected": false,
"text": "vendor/gems"
}
] | 2008/10/10 | [
"https://Stackoverflow.com/questions/190594",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1944/"
] |
190,597 | <p>Say I have class A with</p>
<pre><code>class A {
final String foo() {
// .. computing result, contacting database, whatever ..
return "some computed value";
}
// ... and a bazillion other methods, some of them final.
}
</code></pre>
<p>Now I have class B with</p>
<pre><code>class B {
String method... | [
{
"answer_id": 197066,
"author": "David Turner",
"author_id": 10171,
"author_profile": "https://Stackoverflow.com/users/10171",
"pm_score": 0,
"selected": false,
"text": "public class Jobber {\n\n public final String foo() {\n return fooFactory() ;\n }\n\n String fooFacto... | 2008/10/10 | [
"https://Stackoverflow.com/questions/190597",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6583/"
] |
190,598 | <p>Delphi 2009 has changed its string type to use 2 bytes to represent a character, which allows support for unicode char sets. Now when you get sizeof(string) you get length(String) * sizeof(char) . Sizeof(char) currently being 2. </p>
<p>What I am interested in is whether anyone knows of a way which on a characte... | [
{
"answer_id": 190604,
"author": "Greg Hewgill",
"author_id": 893,
"author_profile": "https://Stackoverflow.com/users/893",
"pm_score": 4,
"selected": true,
"text": "if ord(c) < 128 then\n // is an ascii character\n"
},
{
"answer_id": 190630,
"author": "Toon Krijthe",
... | 2008/10/10 | [
"https://Stackoverflow.com/questions/190598",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6244/"
] |
190,625 | <p>I have created the following stored procedure..</p>
<pre><code>CREATE PROCEDURE [dbo].[UDSPRBHPRIMBUSTYPESTARTUP]
(
@CODE CHAR(5)
, @DESC VARCHAR(255) OUTPUT
)
AS
DECLARE @SERVERNAME nvarchar(30)
DECLARE @DBASE nvarchar(30)
DECLARE @SQL nvarchar(2000)
SET @SERVERNAME =
Convert(nvarchar,
(SELECT spData FRO... | [
{
"answer_id": 190648,
"author": "tpower",
"author_id": 18107,
"author_profile": "https://Stackoverflow.com/users/18107",
"pm_score": 0,
"selected": false,
"text": "CREATE FUNCTION [dbo].[my_function]\n(\n @par2 UNIQUEIDENTIFIER, \n @par2 UNIQUEIDENTIFIER,\n @par3 UNIQU... | 2008/10/10 | [
"https://Stackoverflow.com/questions/190625",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/978/"
] |
190,629 | <p>I am writing a drop-in replacement for a legacy application in Java. One of the requirements is that the ini files that the older application used have to be read as-is into the new Java Application. The format of this ini files is the common windows style, with header sections and key=value pairs, using # as the ... | [
{
"answer_id": 190633,
"author": "Mario Ortegón",
"author_id": 2309,
"author_profile": "https://Stackoverflow.com/users/2309",
"pm_score": 8,
"selected": true,
"text": "Ini ini = new Ini(new File(filename));\njava.util.prefs.Preferences prefs = new IniPreferences(ini);\nSystem.out.printl... | 2008/10/10 | [
"https://Stackoverflow.com/questions/190629",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2309/"
] |
190,642 | <p>The code below crashes IE6 for some reason. Much as IE is god-awful, i have never seen this before. Does anyone have any ideas?</p>
<pre><code><div id="edit">
<?php
$a = $_POST['category'];
if ($a == "")
{
$a = $_GET['category'];
}
$result = mysql_query("SELECT * FROM media WHERE related_page_id = $... | [
{
"answer_id": 190657,
"author": "Rimas Kudelis",
"author_id": 25804,
"author_profile": "https://Stackoverflow.com/users/25804",
"pm_score": 0,
"selected": false,
"text": "&"
},
{
"answer_id": 190659,
"author": "Community",
"author_id": -1,
"author_profile": "http... | 2008/10/10 | [
"https://Stackoverflow.com/questions/190642",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
190,667 | <p>I'm using a CListCtrl control to display information in my MFC app. At the moment I have LVS_EX_CHECKBOXES set in SetExtendedStyle so all rows in the control have a checkbox next to them. What I would like however is that only some of the rows in the control have checkboxes. Is this possible ? If it is how is this d... | [
{
"answer_id": 190728,
"author": "Serge Wautier",
"author_id": 12379,
"author_profile": "https://Stackoverflow.com/users/12379",
"pm_score": 4,
"selected": true,
"text": "LVITEM lvi;\nlvi.stateMask = LVIS_STATEIMAGEMASK;\nlvi.state = INDEXTOSTATEIMAGEMASK(0);\n::SendMessage(m_hWnd, LVM_S... | 2008/10/10 | [
"https://Stackoverflow.com/questions/190667",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3875/"
] |
190,675 | <p>How can I read the colors of an image with python using google app engine?</p>
<p><strong>Example:</strong> I like to build a function to determine the most striking colors of an image to set a harmonic background color for it.</p>
| [
{
"answer_id": 193432,
"author": "Constantin",
"author_id": 20310,
"author_profile": "https://Stackoverflow.com/users/20310",
"pm_score": 2,
"selected": false,
"text": "import png\n\npoint = (10, 20) # coordinates of pixel to read\n\nreader = png.Reader(filename='image.png') # streams ar... | 2008/10/10 | [
"https://Stackoverflow.com/questions/190675",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/26763/"
] |
190,681 | <p><a href="http://en.wikipedia.org/wiki/Loop_unwinding" rel="noreferrer">Loop unwinding</a> is a common way to help the compiler to optimize performance. I was wondering if and to what extent the performance gain is affected by what is in the body of the loop:</p>
<ol>
<li>number of statements</li>
<li>number of func... | [
{
"answer_id": 191051,
"author": "Coincoin",
"author_id": 42,
"author_profile": "https://Stackoverflow.com/users/42",
"pm_score": 1,
"selected": false,
"text": "for(int i=0; i<256; i++)\n{\n a+=(ptr + i) << 8;\n a-=(ptr + i - k) << 8;\n // And possibly some more\n}\n #define UNR... | 2008/10/10 | [
"https://Stackoverflow.com/questions/190681",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19863/"
] |
190,691 | <p>I'm working with dRuby and basicly I'm calling a remote method that returns me an object.</p>
<p>In the clientside I have this code:</p>
<pre><code>handle_error(response) if response.is_a?(Error)
</code></pre>
<p>where response is the DRbObject. (I've developed this code before using dRuby and I'm returning an Er... | [
{
"answer_id": 195616,
"author": "Federico Builes",
"author_id": 161,
"author_profile": "https://Stackoverflow.com/users/161",
"pm_score": 2,
"selected": false,
"text": "response.kind_of?(Error)\n response.respond_to?(some_method_on_your_errors)\n"
}
] | 2008/10/10 | [
"https://Stackoverflow.com/questions/190691",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/22083/"
] |
190,701 | <p>I'm writing a small article on humanly readable alternatives to Guids/UIDs, for example those used on TinyURL for the url hashes (which are often printed in magazines, so need to be short).</p>
<p>The simple uid I'm generating is - 6 characters: either a lowercase letter (a-z) or 0-9. </p>
<p>"According to my calc... | [
{
"answer_id": 190719,
"author": "Sklivvz",
"author_id": 7028,
"author_profile": "https://Stackoverflow.com/users/7028",
"pm_score": 5,
"selected": false,
"text": "Id URL\n 1 http://google.com\n 2 ...\n... ...\n156 ...\n... ...\n http://example.com/1\nhttp://example.com/2\n...\nhttp:/... | 2008/10/10 | [
"https://Stackoverflow.com/questions/190701",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/21574/"
] |
190,702 | <p>Given this data set:</p>
<pre><code>ID Name City Birthyear
1 Egon Spengler New York 1957
2 Mac Taylor New York 1955
3 Sarah Connor Los Angeles 1959
4 Jean-Luc Picard La Barre 2305
5 Ellen Ripley Nostromo 2092
6 James T. Kirk Riverside... | [
{
"answer_id": 190735,
"author": "Tomalak",
"author_id": 18771,
"author_profile": "https://Stackoverflow.com/users/18771",
"pm_score": 2,
"selected": false,
"text": "SELECT\n Id, Name, City, Birthyear\nFROM\n TheTable\nWHERE\n Id IN (SELECT TOP 1 Id FROM TheTable i WHERE i.City = TheT... | 2008/10/10 | [
"https://Stackoverflow.com/questions/190702",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/999/"
] |
190,714 | <p>I have a Java application that's very String-heavy - it takes a feed of huge numbers of big, different String objects.</p>
<p>Do I need to worry about the String Constant Pool for memory and performance?</p>
<p>Is there any way to see how big the pool is at any point?</p>
| [
{
"answer_id": 190754,
"author": "Mario Ortegón",
"author_id": 2309,
"author_profile": "https://Stackoverflow.com/users/2309",
"pm_score": 2,
"selected": false,
"text": "-XX:MaxPermSize=64m\n"
},
{
"answer_id": 190848,
"author": "mfx",
"author_id": 8015,
"author_profi... | 2008/10/10 | [
"https://Stackoverflow.com/questions/190714",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2362/"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.