<p>I have a web page that I have hooked up to a <a href="http://en.wikipedia.org/wiki/Stored_procedure" rel="nofollow noreferrer">stored procedure</a>. In this SQL data source, I have a parameter that I'm passing back to the stored procedure of type int.  </p>

<p><a href="http://en.wikipedia.org/wiki/ASP.NET" rel="nofollow noreferrer">ASP.NET</a> seems to want to default to <em>int32</em>, but the number won't get higher than 6.  Is it ok to override the ASP.NET default and put in 16 or will there be a conflict somewhere down the road?</p>

<p>specification: the database field has a length of 4 and precision of 10, if that makes a difference in the answer.</p>

[{'answer_id': 59662, 'author': 'Nick Stinemates', 'author_id': 4960, 'author_profile': 'https://Stackoverflow.com/users/4960', 'pm_score': 2, 'selected': False, 'text': "<p>Are you talking about doing this?</p>\n\n<pre><code>&gt;&gt;&gt; a = [ ['a', 'b'], ['c', 'd'] ]\n&gt;&gt;&gt; a[1]\n['c', 'd']\n&gt;&gt;&gt; a[1][1]\n'd'\n</code></pre>\n"}, {'answer_id': 59663, 'author': 'dF.', 'author_id': 3002, 'author_profile': 'https://Stackoverflow.com/users/3002', 'pm_score': 1, 'selected': False, 'text': '<p>Lists in python can contain any type of object -- If I understand the question correctly, will a <code>list</code> of <code>list</code>s do the job? Something like this (assuming you have a function <code>generate_poll_data()</code> which creates your data:</p>\n\n<pre><code>data = []\n\nfor in xrange(num_iterations):\n    data.append(generate_poll_data())\n</code></pre>\n\n<p>Then, <code>data[n]</code> will be the list of data from the <code>(n-1)</code>th run.</p>\n'}, {'answer_id': 59709, 'author': 'Daren Thomas', 'author_id': 2260, 'author_profile': 'https://Stackoverflow.com/users/2260', 'pm_score': 1, 'selected': False, 'text': "<p>since you are thinking in <em>variables</em>, you might prefer a dictionary over a list of lists:</p>\n\n<pre><code>data = {}\ndata['a'] = [generate_poll_data()]\ndata['b'] = [generate_poll_data()]\n</code></pre>\n\n<p>etc.</p>\n"}, {'answer_id': 59762, 'author': 'Vinay', 'author_id': 6171, 'author_profile': 'https://Stackoverflow.com/users/6171', 'pm_score': 1, 'selected': False, 'text': '<p>I would strongly consider using <a href="https://numpy.org" rel="nofollow noreferrer">NumPy</a> to do this. You get efficient N-dimensional arrays that you can quickly and easily process.</p>\n'}, {'answer_id': 59778, 'author': 'dF.', 'author_id': 3002, 'author_profile': 'https://Stackoverflow.com/users/3002', 'pm_score': 3, 'selected': True, 'text': '<p>Would something like this work?</p>\n<pre><code>from random import randint    \n\nmcworks = []\n\nfor n in xrange(NUM_ITERATIONS):\n    mctest = [randint(0, 100) for i in xrange(5)]\n    if sum(mctest[:3])/3 == mcavg[2]:\n        mcworks.append(mctest) # mcavg is real data\n</code></pre>\n<p>In the end, you are left with a list of valid <code>mctest</code> lists.</p>\n<p>What I changed:</p>\n<ul>\n<li>Used a <a href="https://web.archive.org/web/20080928230016/http://docs.python.org:80/tut/node7.html#SECTION007140000000000000000" rel="nofollow noreferrer">list comprehension</a> to build the data instead of a for loop</li>\n<li>Used <code>random.randint</code> to get random integers</li>\n<li>Used <a href="http://docs.python.org/tut/node5.html" rel="nofollow noreferrer">slices</a> and <code>sum</code> to calculate the average of the first three items</li>\n<li>(To answer your actual question :-) ) Put the results in a list <code>mcworks</code>, instead of creating a new variable for every iteration</li>\n</ul>\n'}, {'answer_id': 53864491, 'author': 'Mattias', 'author_id': 8265788, 'author_profile': 'https://Stackoverflow.com/users/8265788', 'pm_score': 0, 'selected': False, 'text': "<p>A neat way to do it is to use a list of lists in combination with Pandas. Then you are able to create a 3-day rolling average. \nThis makes it easy to search through the results by just adding the real ones as another column, and using the loc function for finding which ones that match.</p>\n\n<pre><code>rand_vals = [randint(0, 100) for i in range(5))]\ndf = pd.DataFrame(data=rand_vals, columns=['generated data'])\ndf['3 day avg'] = df['generated data'].rolling(3).mean()\ndf['mcavg'] = mcavg # the list of real data\n# Extract the resulting list of values\nres = df.loc[df['3 day avg'] == df['mcavg']]['3 day avg'].values\n</code></pre>\n\n<p>This is also neat if you intend to use the same random values for different polls/persons, just add another column with their real values and perform the same search for them. </p>\n"}]
['https://Stackoverflow.com/questions/59651', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/730/']