qid int64 4 19.1M | question stringlengths 18 48.3k | answers list | date stringlengths 10 10 | metadata list |
|---|---|---|---|---|
257,551 | <p>I have a method that, given an angle for North and an angle for a bearing, returns a compass point value from 8 possible values (North, NorthEast, East, etc.). I want to create a unit test that gives decent coverage of this method, providing different values for North and Bearing to ensure I have adequate coverage t... | [
{
"answer_id": 257574,
"author": "S.Lott",
"author_id": 10661,
"author_profile": "https://Stackoverflow.com/users/10661",
"pm_score": 3,
"selected": false,
"text": "def testCase215n( self ):\n self.fixture.setCourse( 215 )\n self.fixture.setBearing( 45 )\n self.fixture.calculate... | 2008/11/02 | [
"https://Stackoverflow.com/questions/257551",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/23234/"
] |
257,552 | <p>Does anyone know of a simple way for a C++ program to communicate directly with a MySQL database? I have looked at MySQL++ and found it to be very confusing. If anyone knows of a very simple way of doing this, please let me know.</p>
<p>Thanks</p>
<p>P.S. I am developing on a Windows machine. PHP and MySQL web ... | [
{
"answer_id": 257675,
"author": "MattyT",
"author_id": 7405,
"author_profile": "https://Stackoverflow.com/users/7405",
"pm_score": 3,
"selected": false,
"text": "int id = ...;\nstring name;\nint salary;\n\nsql << \"select name, salary from persons where id = \" << id, into(name), into(s... | 2008/11/02 | [
"https://Stackoverflow.com/questions/257552",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
257,563 | <p>hey, I'm very new to all this so please excuse stupidity :)</p>
<pre><code>import os
import MySQLdb
import time
db = MySQLdb.connect(host="localhost", user="root", passwd="********", db="workspace")
cursor = db.cursor()
tailoutputfile = os.popen('tail -f syslog.log')
while 1:
x = tailoutputfile.readline()... | [
{
"answer_id": 257570,
"author": "Harley Holcombe",
"author_id": 1057,
"author_profile": "https://Stackoverflow.com/users/1057",
"pm_score": 2,
"selected": false,
"text": " cursor.execute(\"INSERT INTO releases (date, cat, name) values (timestring, y[4], y[7]\")\n cursor.execute(\"INSER... | 2008/11/02 | [
"https://Stackoverflow.com/questions/257563",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/33512/"
] |
257,566 | <p>I am attempting to use a Stream Result to return an image from a struts2 application. I seem to be having problem with configuring the action. Here is the configuration:</p>
<pre><code> <result name="success" type="stream">
<param name="contentType">image/jpeg</param>
&l... | [
{
"answer_id": 257646,
"author": "Vincent Ramdhanie",
"author_id": 27439,
"author_profile": "https://Stackoverflow.com/users/27439",
"pm_score": 4,
"selected": true,
"text": "InputStream InputStream"
},
{
"answer_id": 826627,
"author": "Community",
"author_id": -1,
"a... | 2008/11/02 | [
"https://Stackoverflow.com/questions/257566",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/27439/"
] |
257,577 | <p>Im thinking of updating my practices, and looking for a little help and advice!</p>
<p>I do a lot of work on sites that run joomla, oscommerce, drupal etc and so I have created a lot of custom components/plugins and hacks etc. Currently each site has its own folder on my xampp setup. What I would like to do is hav... | [
{
"answer_id": 257617,
"author": "nickf",
"author_id": 9021,
"author_profile": "https://Stackoverflow.com/users/9021",
"pm_score": 3,
"selected": true,
"text": "checkout export"
}
] | 2008/11/02 | [
"https://Stackoverflow.com/questions/257577",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/28241/"
] |
257,583 | <p>I need to schedule several different pages on several different sites to be run at certain times, usually once a night. Is there any software out there to do this? it would be nice if it called the page and then recorded the response and whether the called page was successful run or not. I was using Helm on a dif... | [
{
"answer_id": 259414,
"author": "JoshBaltzell",
"author_id": 29997,
"author_profile": "https://Stackoverflow.com/users/29997",
"pm_score": 4,
"selected": true,
"text": "webrun.vbs http://website.com/page.aspx\n dim URL, oArgs \n\nSet oArgs = WScript.Arguments \n\n if oArgs.Count = ... | 2008/11/02 | [
"https://Stackoverflow.com/questions/257583",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/34548/"
] |
257,587 | <p>How can I bring my WPF application to the front of the desktop? So far I've tried:</p>
<pre><code>SwitchToThisWindow(new WindowInteropHelper(Application.Current.MainWindow).Handle, true);
SetWindowPos(new WindowInteropHelper(Application.Current.MainWindow).Handle, IntPtr.Zero, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);... | [
{
"answer_id": 257741,
"author": "Factor Mystic",
"author_id": 1569,
"author_profile": "https://Stackoverflow.com/users/1569",
"pm_score": 3,
"selected": true,
"text": "void hotkey_execute()\n{\n IntPtr handle = new WindowInteropHelper(Application.Current.MainWindow).Handle;\n Back... | 2008/11/02 | [
"https://Stackoverflow.com/questions/257587",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1569/"
] |
257,605 | <p>I'm currently working on a small project with OCaml; a simple mathematical expression simplifier. I'm supposed to find certain patterns inside an expression, and simplify them so the number of parenthesis inside the expression decreases. So far I've been able to implement most rules except two, for which I've decide... | [
{
"answer_id": 257627,
"author": "vog",
"author_id": 19163,
"author_profile": "https://Stackoverflow.com/users/19163",
"pm_score": 7,
"selected": true,
"text": "begin end let rec filter exp =\n match exp with\n | Var v -> Var v\n | Sum (e1, e2) -> Sum (e1, e2)\n | Prod (e1, e... | 2008/11/02 | [
"https://Stackoverflow.com/questions/257605",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9506/"
] |
257,609 | <p>I am trying to interpret HttpReferer strings in our server logs. It seems like there is quite a high number of empty values.</p>
<p>I am wondering how many of these empty values are due to direct hits from people entering our URL directly into a browser and how many might be due to some kind of blocking utility tha... | [
{
"answer_id": 257657,
"author": "Kent Fredric",
"author_id": 15614,
"author_profile": "https://Stackoverflow.com/users/15614",
"pm_score": -1,
"selected": false,
"text": "3rd-party => site # referrer preferred blank\nlocal => local # referrer preferred kept\n"
}
] | 2008/11/03 | [
"https://Stackoverflow.com/questions/257609",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/16940/"
] |
257,616 | <p>This is the <code>PATH</code> variable without sudo:</p>
<pre><code>$ echo 'echo $PATH' | sh
/opt/local/ruby/bin:/usr/bin:/bin
</code></pre>
<p>This is the <code>PATH</code> variable with sudo:</p>
<pre><code>$ echo 'echo $PATH' | sudo sh
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bi... | [
{
"answer_id": 257644,
"author": "Kent Fredric",
"author_id": 15614,
"author_profile": "https://Stackoverflow.com/users/15614",
"pm_score": 5,
"selected": false,
"text": "PATH man sudo cat >> test.sh\nenv | grep \"MYEXAMPLE\" ;\n^D\n sh test.sh \nMYEXAMPLE=1 sh test.sh\n# MYEXAMPLE=1\nMY... | 2008/11/03 | [
"https://Stackoverflow.com/questions/257616",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/136/"
] |
257,645 | <p>For a random event generator I'm writing I need a simple algorithm to generate random ranges. </p>
<p>So, for example:</p>
<p>I may say I want 10 random intervals, between 1/1 and 1/7, with no overlap, in the states (1,2,3) where state 1 events add up to 1 day, state 2 events add up to 2 days and state 3 events ad... | [
{
"answer_id": 257931,
"author": "Charlie",
"author_id": 18529,
"author_profile": "https://Stackoverflow.com/users/18529",
"pm_score": 0,
"selected": false,
"text": "public static Interval[] GetRandomIntervals( DateTime start, DateTime end,\n StateSummary[] states, int totalIntervals ... | 2008/11/03 | [
"https://Stackoverflow.com/questions/257645",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17174/"
] |
257,653 | <p>Having a problem trying to create a function, as part of a BizTalk helper class that returns a value of type (Microsoft.XLANGs.BaseTypes.XLANGMessage). The function code is as follows:</p>
<pre><code>public XLANGMessage UpdateXML (XLANGMessage inputFile)
{
XmlDocument xDoc = new XmlDocument();
XLANGMessage ou... | [
{
"answer_id": 257702,
"author": "David Hall",
"author_id": 2660,
"author_profile": "https://Stackoverflow.com/users/2660",
"pm_score": 3,
"selected": true,
"text": "XLANGMessage outputFile;\n XLANGMessage outputFile = null;\n TypeOf typeof XMLDocument XLANGMessage XLANGMessage"
}
] | 2008/11/03 | [
"https://Stackoverflow.com/questions/257653",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3810/"
] |
257,658 | <p>I've automated my Ubuntu installation - I've got Python code that runs automatically (after a clean install, but before the first user login - it's in a temporary /etc/init.d/ script) that sets up everything from Apache & its configuration to my personal Gnome preferences. It's the latter that's giving me troubl... | [
{
"answer_id": 260731,
"author": "Jeremy Visser",
"author_id": 10839,
"author_profile": "https://Stackoverflow.com/users/10839",
"pm_score": 3,
"selected": false,
"text": "import dbus\ndummy_bus = dbus.SessionBus()\n dbus.exceptions.DBusException: org.freedesktop.DBus.Error.Spawn.ExecFai... | 2008/11/03 | [
"https://Stackoverflow.com/questions/257658",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1452/"
] |
257,659 | <p>I am wondering how to get a process run at the command line to use less processing power. The problem I'm having is the the process is basically taking over the CPU and taking MySQL and the rest of the server with it. Everything is becoming very slow.</p>
<p>I have used <code>nice</code> before but haven't had much... | [
{
"answer_id": 257667,
"author": "Greg Hewgill",
"author_id": 893,
"author_profile": "https://Stackoverflow.com/users/893",
"pm_score": 0,
"selected": false,
"text": "while true; do done\n top"
},
{
"answer_id": 257669,
"author": "Robert Gamble",
"author_id": 25222,
"... | 2008/11/03 | [
"https://Stackoverflow.com/questions/257659",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5441/"
] |
257,685 | <p>I have a program that uses save files. It needs to load the newest save file, but fall back on the next newest if that one is unavailable or corrupted. Can I use the windows file creation timestamp to tell the order of when they were created, or is this unreliable? I am asking because the "changed" timestamps seem u... | [
{
"answer_id": 257704,
"author": "Kent Fredric",
"author_id": 15614,
"author_profile": "https://Stackoverflow.com/users/15614",
"pm_score": 2,
"selected": false,
"text": "2008_12_31_24_60_60_1000 \n 2008/\n2008/12/\n2008/12/31\n2008/12/31/00-12/\n2008/12/31/13-24/24_60_60_1000 \n 2008/\... | 2008/11/03 | [
"https://Stackoverflow.com/questions/257685",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
257,699 | <p>As I don't use vi all that much and certainly not for my primary editor, I can't remember any of the vi commands. Does anyone have a recommendation for a quick start guide or command summary?</p>
| [
{
"answer_id": 257700,
"author": "Dustin Getz",
"author_id": 20003,
"author_profile": "https://Stackoverflow.com/users/20003",
"pm_score": 2,
"selected": false,
"text": "vim-tutor"
},
{
"answer_id": 257713,
"author": "Ali Afshar",
"author_id": 28380,
"author_profile":... | 2008/11/03 | [
"https://Stackoverflow.com/questions/257699",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6040/"
] |
257,730 | <p>Considering the criteria listed below, which of Python, Groovy or Ruby would you use?</p>
<ul>
<li><em>Criteria (Importance out of 10, 10 being most important)</em></li>
<li>Richness of API/libraries available (eg. maths, plotting, networking) (9)</li>
<li>Ability to embed in desktop (java/c++) applications (8)</li... | [
{
"answer_id": 258333,
"author": "Chris Brooks",
"author_id": 27812,
"author_profile": "https://Stackoverflow.com/users/27812",
"pm_score": 2,
"selected": false,
"text": "// process all files printing out full name (. and .. auto excluded)\n\nnew File(basedir).eachFile{ f->\n\n if (f.... | 2008/11/03 | [
"https://Stackoverflow.com/questions/257730",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/24376/"
] |
257,735 | <p>I'm looking to create a Visual Studio 2008 template that will create a basic project and based on remove certain files/folders based on options the user enters.</p>
<p>Right now, I have followed some tutorials online which have let me create the form to query the user and pass the data into an IWizard class, but I ... | [
{
"answer_id": 666235,
"author": "mackenir",
"author_id": 25457,
"author_profile": "https://Stackoverflow.com/users/25457",
"pm_score": 3,
"selected": true,
"text": "ShouldAddProjectItem ProjectFinishedGenerating ProjectItem file = project.ProjectItems.Item(\"File.cs\");\nfile.Remove();\... | 2008/11/03 | [
"https://Stackoverflow.com/questions/257735",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/33536/"
] |
257,740 | <p>Basically I'm trying to change the <code>Canvas.Left</code> property of an Ellipse Silverlight control in C#. Here is how I'm accessing the control:</p>
<pre><code>Ellipse c1 = this.FindName("Circle1") as Ellipse;
</code></pre>
<p>How would I then set the <code>Canvas.Left</code> property?</p>
<p>Thanks,</p>
<p... | [
{
"answer_id": 257749,
"author": "Bill Reiss",
"author_id": 18967,
"author_profile": "https://Stackoverflow.com/users/18967",
"pm_score": 0,
"selected": false,
"text": "double left=50;\nc1.SetValue(Canvas.LeftProperty, left);\n"
}
] | 2008/11/03 | [
"https://Stackoverflow.com/questions/257740",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12172/"
] |
257,752 | <p>I have whitespace characters showing in the Visual Studio code editor, and I'd like to remove them.</p>
| [
{
"answer_id": 72883944,
"author": "AlainD",
"author_id": 2377399,
"author_profile": "https://Stackoverflow.com/users/2377399",
"pm_score": 0,
"selected": false,
"text": "Visual Studio 2019 Edit > Advanced > View White Space Tools > Options > Environment > Fonts and Colors > Visible Whit... | 2008/11/03 | [
"https://Stackoverflow.com/questions/257752",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
257,753 | <p>As the question implies, I'm looking for a way to programmatically screen grab a given panorama, I.E set a longitude and latitude and POV (pitch, yaw and zoom) and save the grab to the server. So far the most promise has been shown by </p>
<ol>
<li><p>Using .net to control the google earth com api (<a href="http://... | [
{
"answer_id": 12885558,
"author": "shreks7",
"author_id": 1147466,
"author_profile": "https://Stackoverflow.com/users/1147466",
"pm_score": 2,
"selected": false,
"text": "http://maps.googleapis.com/maps/api/streetview?size=400x400&location=40.720032,%20-73.988354&fov=90&heading=235&pitc... | 2008/11/03 | [
"https://Stackoverflow.com/questions/257753",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/28416/"
] |
257,767 | <p>I have a largish Mercurial repository that I've decided would be better as several smaller repositories. Is there a way that I can split the repository and have each piece retain its revision history?</p>
| [
{
"answer_id": 257927,
"author": "Ry4an Brase",
"author_id": 8992,
"author_profile": "https://Stackoverflow.com/users/8992",
"pm_score": 7,
"selected": true,
"text": "--filemap exclude path/you/do/not/want\nrename path/you/do/want .\n"
},
{
"answer_id": 47349707,
"author": "K... | 2008/11/03 | [
"https://Stackoverflow.com/questions/257767",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/207/"
] |
257,768 | <p>I'm looking to create a virtual printer that passes data to my .NET application. I want to then create an installer that installs both the printer and the .NET application. It would we really nice to be able to write it all in C#, but I have a feeling that this will require a printer driver to be written is unmanag... | [
{
"answer_id": 40370083,
"author": "Ogglas",
"author_id": 3850405,
"author_profile": "https://Stackoverflow.com/users/3850405",
"pm_score": 4,
"selected": false,
"text": "Desktop development with C++ .zip <UnzipFolder>\\print\\XPSDrvSmpl XPSDrvSmpl.sln"
}
] | 2008/11/03 | [
"https://Stackoverflow.com/questions/257768",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/30889/"
] |
257,793 | <p>I recently switched my hosting provider and due to the time zone that the server is now in, my code has stopped working. </p>
<p>The hosting server reports in Pacific time, However, my code needs to work with GMT as my site is for the UK market. So, all my displays and searches need to be in the format dd/MM/yyyy</... | [
{
"answer_id": 257807,
"author": "Ray",
"author_id": 233,
"author_profile": "https://Stackoverflow.com/users/233",
"pm_score": 2,
"selected": false,
"text": "DateTime.Parse(\"28/11/2008\", new CultureInfo(\"en-GB\"))\n"
},
{
"answer_id": 257825,
"author": "Pavel Chuchuva",
... | 2008/11/03 | [
"https://Stackoverflow.com/questions/257793",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/26300/"
] |
257,795 | <p>I'm trying to add an header file to dev-C++ but when I compile it it doesn't work.
Here are my exact steps (for my example, I'm trying to get mysql.h to work):</p>
<ol>
<li>copy "mysql.h" into c:\dev-c++\includes</li>
<li>check that in dev-C++ tools > compiler options > directories > c includes and c++ includes hav... | [
{
"answer_id": 257800,
"author": "jpoh",
"author_id": 4368,
"author_profile": "https://Stackoverflow.com/users/4368",
"pm_score": 2,
"selected": false,
"text": "#include \"mysql.h\"\n #include <mysql>\n"
},
{
"answer_id": 45390104,
"author": "Ritesh Aggarwal",
"author_id"... | 2008/11/03 | [
"https://Stackoverflow.com/questions/257795",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/28462/"
] |
257,797 | <p>I wrote a C++ project in VS2005, and used lots of STL container with its plus-in STL. However, I found STL in VS2005 does not have a hash_map in it, I want to use SGI hash_map. How can I change my project to use SGI STL?</p>
<p>Thanks for Brian's method, it works! And it's simple.</p>
| [
{
"answer_id": 257799,
"author": "Brian R. Bondy",
"author_id": 3153,
"author_profile": "https://Stackoverflow.com/users/3153",
"pm_score": 3,
"selected": true,
"text": "#include <hash_map>\nstdext::hash_map\n"
},
{
"answer_id": 258225,
"author": "CesarB",
"author_id": 28... | 2008/11/03 | [
"https://Stackoverflow.com/questions/257797",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/25749/"
] |
257,801 | <p>Here's the scenario:</p>
<p>I have a textbox and a button on a web page. When the button is clicked, I want a popup window to open (using Thickbox) that will show all items that match the value entered in the textbox. I am currently using the IFrame implementation of Thickbox. The problem is that the URL to show... | [
{
"answer_id": 257852,
"author": "Ricky",
"author_id": 653,
"author_profile": "https://Stackoverflow.com/users/653",
"pm_score": 0,
"selected": false,
"text": "$('input#tb').blur(function(){ \n var url = $('input.thickbox').attr('alt');\n var tbVal = $(this).val();\n\n // add the text... | 2008/11/03 | [
"https://Stackoverflow.com/questions/257801",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1574/"
] |
257,805 | <p>I'm having a hard time understanding some git/DCVS concepts. Here's what happened:</p>
<ol>
<li>I created a git project, and imported it from an SVN repo</li>
<li>I made some commits</li>
<li>I wanted to experiment something, so I created a branch called <strong>constants-update</strong></li>
<li>I switched to <str... | [
{
"answer_id": 258295,
"author": "Miguel Ping",
"author_id": 22992,
"author_profile": "https://Stackoverflow.com/users/22992",
"pm_score": 3,
"selected": true,
"text": ".git/hooks/pre-commit # # if (/\\s$/) {\n# bad_line(\"trailing whitespace\", $_);\n# }\n"
}
] | 2008/11/03 | [
"https://Stackoverflow.com/questions/257805",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/22992/"
] |
257,806 | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="https://stackoverflow.com/questions/216007/how-to-determine-total-number-of-open-active-connections-in-ms-sql-server-2005">How to determine total number of open/active connections in ms sql server 2005</a> </p>
</blockquote>
<p>In Oracle, there's... | [
{
"answer_id": 782634,
"author": "Gavin",
"author_id": 78216,
"author_profile": "https://Stackoverflow.com/users/78216",
"pm_score": 3,
"selected": false,
"text": "sp_who"
}
] | 2008/11/03 | [
"https://Stackoverflow.com/questions/257806",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10629/"
] |
257,843 | <p>We have an application that does single sign-on using a centralized authentication server (CAS). We'd like to do single sign-out, such that if the user logs out of one application (say a front-end portal), the user is automatically signed out of all applications using the same single sign-on ticket.</p>
<p>The exp... | [
{
"answer_id": 882702,
"author": "John Leidegren",
"author_id": 58961,
"author_profile": "https://Stackoverflow.com/users/58961",
"pm_score": 2,
"selected": false,
"text": "using System;\nusing System.Reflection;\nusing System.Web;\n\nobject obj = typeof(HttpRuntime).GetProperty(\"CacheI... | 2008/11/03 | [
"https://Stackoverflow.com/questions/257843",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12950/"
] |
257,844 | <p>How can I <strong>quickly</strong> create a large file on a Linux (<a href="http://en.wikipedia.org/wiki/Red_Hat_Linux" rel="noreferrer">Red Hat Linux</a>) system?</p>
<p><a href="http://en.wikipedia.org/wiki/Dd_%28Unix%29" rel="noreferrer">dd</a> will do the job, but reading from <code>/dev/zero</code> and writing... | [
{
"answer_id": 257849,
"author": "Christian C. Salvadó",
"author_id": 5445,
"author_profile": "https://Stackoverflow.com/users/5445",
"pm_score": 8,
"selected": false,
"text": "xfs_mkfile 10240m 10Gigfile fallocate -l 10G 10Gigfile mkfile 10240m 10Gigfile prealloc 10Gigfile 10737418240 m... | 2008/11/03 | [
"https://Stackoverflow.com/questions/257844",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17007/"
] |
257,872 | <p>I want to force Apache to use HTTPS for a particular URL in the following form:</p>
<pre><code>https://www.example.com/signup/*
</code></pre>
<p>so</p>
<p>if someone goes to any of the following example URLs directly, Apache will forward the URL over to the HTTPS equivalent site.</p>
<p>e.g.</p>
<pre><code>http... | [
{
"answer_id": 257878,
"author": "Greg Hewgill",
"author_id": 893,
"author_profile": "https://Stackoverflow.com/users/893",
"pm_score": 2,
"selected": false,
"text": "Redirect 301 /signup https://www.example.com/signup\n"
},
{
"answer_id": 257932,
"author": "Murat Ayfer",
... | 2008/11/03 | [
"https://Stackoverflow.com/questions/257872",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/33554/"
] |
257,877 | <p>I want to trim trailing whitespace at the end of all XHTML paragraphs. I am using Ruby with the REXML library.</p>
<p>Say I have the following in a valid XHTML file:</p>
<pre><code><p>hello <span>world</span> a </p>
<p>Hi there </p>
<p>The End </p>
</code></pre>
<p>... | [
{
"answer_id": 258030,
"author": "AmbroseChapel",
"author_id": 242241,
"author_profile": "https://Stackoverflow.com/users/242241",
"pm_score": 1,
"selected": false,
"text": "normalize-space()"
}
] | 2008/11/03 | [
"https://Stackoverflow.com/questions/257877",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5758/"
] |
257,901 | <p>I'm using this script to display all the images in a folder, but I can't figure out how to get each image's file name to display underneath it. Any suggestions?</p>
<pre><code><?php
$dirname = "images";
$images = scandir($dirname);
$ignore = Array(".", "..", "otherfiletoignore");
foreach($images as $curimg){
... | [
{
"answer_id": 257904,
"author": "nickf",
"author_id": 9021,
"author_profile": "https://Stackoverflow.com/users/9021",
"pm_score": 4,
"selected": true,
"text": "echo \"<img src='images/$curimg' /><br />$curimg<br />\\n\";\n"
}
] | 2008/11/03 | [
"https://Stackoverflow.com/questions/257901",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/32972/"
] |
257,902 | <p>I have seen lots of chat examples in Erlang but what about lists, like a work queue? If I want to build a work queue system, like a project management system, is it possible to re-order messages in a process mailbox or do I have to use message priorities? Are there examples of workflow systems built in Erlang?</p>... | [
{
"answer_id": 258348,
"author": "Adam Lindberg",
"author_id": 2457,
"author_profile": "https://Stackoverflow.com/users/2457",
"pm_score": 4,
"selected": true,
"text": "receive\n {important, Msg} ->\n handle(Msg)\nafter 0 ->\n ok\nend,\nreceive\n OtherMsg ->\n hand... | 2008/11/03 | [
"https://Stackoverflow.com/questions/257902",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/32829/"
] |
257,906 | <p>The activity monitor in sql2k8 allows us to see the most expensive queries. Ok, that's cool, but is there a way I can log this info or get this info via query analyser? I don't really want to have the Sql Management console open and me looking at the activity monitor dashboard.</p>
<p>I want to figure out which que... | [
{
"answer_id": 257944,
"author": "Mitch Wheat",
"author_id": 16076,
"author_profile": "https://Stackoverflow.com/users/16076",
"pm_score": 7,
"selected": true,
"text": " RPC:Completed\n SP:Completed\n SP:StmtCompleted\n SQL:BatchCompleted\n SQL:StmtCompleted\n SELECT DB_ID('dbname') @ID=... | 2008/11/03 | [
"https://Stackoverflow.com/questions/257906",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/30674/"
] |
257,933 | <p>Here's the sit:</p>
<ul>
<li>I have a JSF component which is basically a list of 'documents'</li>
<li>I have any number of document viewer components on the same page.</li>
<li>None of these components "know" about each other. In other words, they cannot be configured at design time to link to each other or anythin... | [
{
"answer_id": 273367,
"author": "branchgabriel",
"author_id": 30807,
"author_profile": "https://Stackoverflow.com/users/30807",
"pm_score": 0,
"selected": false,
"text": " /**\n * Handle document click value change.\n * \n * @param valueChangedEvent the value changed event... | 2008/11/03 | [
"https://Stackoverflow.com/questions/257933",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1666/"
] |
257,992 | <p>I am writing a console application which makes use of the F1 key (for help). Unfortunately, while Konsole (of KDE) doesn't use this key, Gnome Terminal does, so the F1 key becomes inaccessible to my application. I don't think there's a way to detect whether the F1 key is already mapped in the GUI side of things (G... | [
{
"answer_id": 258203,
"author": "Fusion",
"author_id": 6253,
"author_profile": "https://Stackoverflow.com/users/6253",
"pm_score": 1,
"selected": false,
"text": "ps x | grep `ps o ppid,fname | grep bash | grep -v grep | head -1 | awk '{print $1}'` | grep 'gnome-terminal' | wc -l\n"
},... | 2008/11/03 | [
"https://Stackoverflow.com/questions/257992",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/28558/"
] |
258,006 | <p>I'm trying to play a sound file from an iPhone program.</p>
<p>Here's the code:</p>
<pre><code>NSString *path = [[NSBundle mainBundle] pathForResource:@"play" ofType:@"caf"];
NSFileHandle *bodyf = [NSFileHandle fileHandleForReadingAtPath:path];
NSData *body = [bodyf availableData];
NSLog( @"length of play.caf %d",... | [
{
"answer_id": 258046,
"author": "zoul",
"author_id": 17279,
"author_profile": "https://Stackoverflow.com/users/17279",
"pm_score": 0,
"selected": false,
"text": "NSLog EXC_BAD_ACCESS EXC_BAD_ACCESS"
},
{
"answer_id": 259630,
"author": "Chris Hanson",
"author_id": 714,
... | 2008/11/03 | [
"https://Stackoverflow.com/questions/258006",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19391/"
] |
258,007 | <p>How can I make the command button in my VC++ 6.0 dialog visible or invisible on load?</p>
| [
{
"answer_id": 258031,
"author": "arul",
"author_id": 15409,
"author_profile": "https://Stackoverflow.com/users/15409",
"pm_score": 1,
"selected": false,
"text": "BOOL prevState = ShowWindow( itemHandle, SW_HIDE );\n"
},
{
"answer_id": 258209,
"author": "computinglife",
"... | 2008/11/03 | [
"https://Stackoverflow.com/questions/258007",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
258,011 | <p>I am using windsor DI framework in one of my MVC project. The project works fine when I tried to run from Visual Studio 2008.</p>
<p>But when i tried to run the project creating an application in IIS7 then I recieved the following error message:</p>
<blockquote>
<p>Looks like you forgot to register the http modu... | [
{
"answer_id": 258063,
"author": "yfeldblum",
"author_id": 12349,
"author_profile": "https://Stackoverflow.com/users/12349",
"pm_score": 6,
"selected": true,
"text": "system.webServer <configuration>\n <system.web>\n <httpModules>\n <add name=\"PerRequestLifestyle\" ... | 2008/11/03 | [
"https://Stackoverflow.com/questions/258011",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
258,020 | <p>I've read the description of "functionoids" <a href="https://isocpp.org/wiki/faq/pointers-to-members#functionoids" rel="nofollow noreferrer">here</a>. They look like a poor-man's version of Boost::function and Boost::bind. Am I missing something? Is there a good reason to use them if you're already using Boost?</p>
| [
{
"answer_id": 261442,
"author": "Nicola Bonelli",
"author_id": 19630,
"author_profile": "https://Stackoverflow.com/users/19630",
"pm_score": 2,
"selected": false,
"text": "tr1/boost::function tr1::function"
}
] | 2008/11/03 | [
"https://Stackoverflow.com/questions/258020",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12193/"
] |
258,023 | <p>I need to create a panel which should be invisible but the components inside it (for example, JTextArea, JButton, etc.) should be visible. When I click on the invisible panel, it should become visible.</p>
<p>I can only use JRE 1.4 and nothing more than that. :(</p>
<p>Any idea how to create such a transparent pan... | [
{
"answer_id": 258040,
"author": "gizmo",
"author_id": 9396,
"author_profile": "https://Stackoverflow.com/users/9396",
"pm_score": 3,
"selected": false,
"text": "JComponent.setOpaque(false)"
},
{
"answer_id": 258041,
"author": "Peter",
"author_id": 26483,
"author_prof... | 2008/11/03 | [
"https://Stackoverflow.com/questions/258023",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/22550/"
] |
258,028 | <p>I recently installed VS 6.0 after installing VS 2008 and overwrite JIT settings .. when i started VS 2008 option dialog .. it said another debugger has taken over VS 2008 debugger and I asked me to reset .. so I did ..</p>
<p>Now everything works fine except javascript debugging. I am unable to debug javascript .. ... | [
{
"answer_id": 258036,
"author": "Rihan Meij",
"author_id": 29287,
"author_profile": "https://Stackoverflow.com/users/29287",
"pm_score": 2,
"selected": false,
"text": "var myFunction = new function()\n{\n debugger;\n alert('This will not properly attach the debugger');\n}\n var myFunc... | 2008/11/03 | [
"https://Stackoverflow.com/questions/258028",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/25138/"
] |
258,050 | <p><code>CString</code> is quite handy, while <code>std::string</code> is more compatible with STL container. I am using <code>hash_map</code>. However, <code>hash_map</code> does not support <code>CString</code>s as keys, so I want to convert the <code>CString</code> into a <code>std::string</code>.</p>
<p>Writing a <... | [
{
"answer_id": 258052,
"author": "VonC",
"author_id": 6309,
"author_profile": "https://Stackoverflow.com/users/6309",
"pm_score": 8,
"selected": true,
"text": "CString std::string CString cs(\"Hello\");\nstd::string s((LPCTSTR)cs);\n std::string LPCTSTR std::string LPSTR LPCSTR CT2CA CSt... | 2008/11/03 | [
"https://Stackoverflow.com/questions/258050",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/25749/"
] |
258,053 | <p>In excel 2007, I have a formula in a cell like the following:</p>
<pre><code>=COUNTIFS('2008-10-31'!$C:$C;">="&'$A7)
</code></pre>
<p>Now I want to make the name of the sheet ('2008-10-31') be dependent on the value of some cell (say A1). Something like: </p>
<pre><code>=COUNTIFS(A1!$C:$C;">="&'$A7)... | [
{
"answer_id": 258090,
"author": "Tomalak",
"author_id": 18771,
"author_profile": "https://Stackoverflow.com/users/18771",
"pm_score": 3,
"selected": false,
"text": "=INDIRECT(\"SHEET2!A1\")\n=COUNTIFS(INDIRECT(A1 & \"!$C:$C\"); \">=\" & $A7)\n"
},
{
"answer_id": 258161,
"aut... | 2008/11/03 | [
"https://Stackoverflow.com/questions/258053",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/26070/"
] |
258,056 | <p>I need to get the data of an particular <code><td></code>, but I don't have any <code>id</code> or <code>name</code> for that particular <code><td></code>. How do you get the contents of that <code><td></code>?</p>
<p>For example:</p>
<pre><code><table>
<tr><td>name</td>... | [
{
"answer_id": 258067,
"author": "VonC",
"author_id": 6309,
"author_profile": "https://Stackoverflow.com/users/6309",
"pm_score": 1,
"selected": false,
"text": "var tables = document.getElementById('TABLE'); // instead of document.all.tag\nvar rows;\nvar cells;\nvar maxCells = 1;\nvar de... | 2008/11/03 | [
"https://Stackoverflow.com/questions/258056",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
258,062 | <p><em>This is javascript, but a virtually identical regex is failing in PHP too, so I don't think it's language specific</em></p>
<pre><code>var r = new RegExp(
"^(:19|20)?[0-9][0-9]" // optional 19/20 start followed by 2 numbers
+ "-" // a hyphen
+ "(:0?[1-9]|1[0-2]... | [
{
"answer_id": 258066,
"author": "Gareth",
"author_id": 31582,
"author_profile": "https://Stackoverflow.com/users/31582",
"pm_score": 5,
"selected": true,
"text": "(?:19|20) (:19|20)"
},
{
"answer_id": 258118,
"author": "Fusion",
"author_id": 6253,
"author_profile": "... | 2008/11/03 | [
"https://Stackoverflow.com/questions/258062",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9021/"
] |
258,091 | <p>POSIX environments provide at least two ways of accessing files. There's the standard system calls <code>open()</code>, <code>read()</code>, <code>write()</code>, and friends, but there's also the option of using <code>mmap()</code> to map the file into virtual memory.</p>
<p>When is it preferable to use one over ... | [
{
"answer_id": 258097,
"author": "Don Neufeld",
"author_id": 13097,
"author_profile": "https://Stackoverflow.com/users/13097",
"pm_score": 9,
"selected": true,
"text": "mmap mmap mmap A 1MB malloc mmaps A B mmap mmap mmap mmap mmap mmap'd MAP_HASSEMAPHORE mmap mmap mmap X mmap mmap"
},... | 2008/11/03 | [
"https://Stackoverflow.com/questions/258091",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/101/"
] |
258,099 | <p>What is the proper way to terminate a Swing application from the code, and what are the pitfalls?</p>
<p>I'd tried to close my application automatically after a timer fires. But just calling <code>dispose()</code> on the <code>JFrame</code> didn't do the trick - the window vanished but the application did not termi... | [
{
"answer_id": 258102,
"author": "Daniel Spiewak",
"author_id": 9815,
"author_profile": "https://Stackoverflow.com/users/9815",
"pm_score": 4,
"selected": false,
"text": "System.exit(0);\n"
},
{
"answer_id": 258115,
"author": "VonC",
"author_id": 6309,
"author_profile... | 2008/11/03 | [
"https://Stackoverflow.com/questions/258099",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/21499/"
] |
258,119 | <p>I am instantiating a class A (which I am importing from somebody
else, so I can't modify it) into my class X.</p>
<p>Is there a way I can intercept or wrap calls to methods in A?
I.e., in the code below can I call</p>
<pre><code>x.a.p1()
</code></pre>
<p>and get the output</p>
<pre><code>X.pre
A.p1
X.post
</code... | [
{
"answer_id": 258179,
"author": "Peter Hoffmann",
"author_id": 720,
"author_profile": "https://Stackoverflow.com/users/720",
"pm_score": 1,
"selected": false,
"text": "def wrapped(pre, post, f):\n def wrapper(*args, **kwargs):\n pre()\n retval = f(*args, **kwargs)\n ... | 2008/11/03 | [
"https://Stackoverflow.com/questions/258119",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/116/"
] |
258,120 | <p>Is the memory space consumed by one object with 100 attributes the same as that of 100 objects, with one attribute each?</p>
<p>How much memory is allocated for an object?<br>
How much additional space is used when adding an attribute?</p>
| [
{
"answer_id": 258143,
"author": "Jon Skeet",
"author_id": 22656,
"author_profile": "https://Stackoverflow.com/users/22656",
"pm_score": 5,
"selected": false,
"text": "public class SingleByte\n{\n private byte b;\n}\n public class OneHundredBytes\n{\n private byte b00, b01, ..., b9... | 2008/11/03 | [
"https://Stackoverflow.com/questions/258120",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
258,131 | <p>I have signed numbers (2s complement) stored in 32-bit integers, and I want to extract 16-bit fields from them. Is it true that if I extract the low 16 bits from a 32-bit signed number, the result will be correct as long as the original (32-bit) number fits into 16 bits ?</p>
<p>For positive numbers it is trivially... | [
{
"answer_id": 258149,
"author": "Motti",
"author_id": 3848,
"author_profile": "https://Stackoverflow.com/users/3848",
"pm_score": 3,
"selected": true,
"text": "Nibble (-2) = 1110 => Byte(-2) = 1111_1110"
},
{
"answer_id": 258155,
"author": "unwind",
"author_id": 28169,
... | 2008/11/03 | [
"https://Stackoverflow.com/questions/258131",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8206/"
] |
258,132 | <p>Saving data to Postscript in my app results in a Postscript file which I can view without issues in GhostView, but when I try to print it, the printer isn't able to print it because it seems to be invalid.</p>
<p>Is there a way to validate / find errors in Postscript files without actually sending it to a printer? ... | [
{
"answer_id": 258177,
"author": "CesarB",
"author_id": 28258,
"author_profile": "https://Stackoverflow.com/users/28258",
"pm_score": 3,
"selected": true,
"text": "ps2ps -sDEVICE=pswrite ps2ps2 -sDEVICE=ps2write"
},
{
"answer_id": 2981290,
"author": "Kurt Pfeifle",
"autho... | 2008/11/03 | [
"https://Stackoverflow.com/questions/258132",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6583/"
] |
258,134 | <p>I'm doing some FK analysis of our tables by making a directed
graph representing FK dependencies and then traversing the
graph. In my code, I name everything using directed graph
terminology, but I'd like to have something a bit more
"user friendly" in the report.</p>
<p>In this scenario:</p>
<pre><code>create ta... | [
{
"answer_id": 258354,
"author": "WW.",
"author_id": 14663,
"author_profile": "https://Stackoverflow.com/users/14663",
"pm_score": 2,
"selected": false,
"text": "t1 is the parent of t2.\nt2 is the child of t1.\n InvoiceLineItem is a part of Invoice.\nInvoice has one or more InvoiceLineIt... | 2008/11/03 | [
"https://Stackoverflow.com/questions/258134",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/116/"
] |
258,136 | <p>I am investigating a production system where there are several Windows services communicating with each other through TCP/IP sockets. I'm trying to figure out which executable is listening to which IP address and which port on a given machine.</p>
<p>Other than rummaging through each windows service's obscure confi... | [
{
"answer_id": 258140,
"author": "Zoredache",
"author_id": 20267,
"author_profile": "https://Stackoverflow.com/users/20267",
"pm_score": 2,
"selected": false,
"text": "netstat -abn\n"
},
{
"answer_id": 258153,
"author": "mkoeller",
"author_id": 33433,
"author_profile"... | 2008/11/03 | [
"https://Stackoverflow.com/questions/258136",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/33404/"
] |
258,172 | <p>I'm operating a neighbourhood <a href="http://maps.google.de/maps/ms?ie=UTF8&hl=de&msa=0&msid=101021148567197540440.00043fcffa4cdf06fb4bc&ll=51.791948,8.173571&spn=0.033976,0.058365&t=h&z=14" rel="nofollow noreferrer">WIFI network in a rural environment</a>.</p>
<p>Now I'm looking fo a m... | [
{
"answer_id": 258216,
"author": "dbr",
"author_id": 745,
"author_profile": "https://Stackoverflow.com/users/745",
"pm_score": 4,
"selected": true,
"text": "cfgmaker --output=mrtg_myrouter.cfg public@1.2.3.4\n"
}
] | 2008/11/03 | [
"https://Stackoverflow.com/questions/258172",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/33433/"
] |
258,173 | <p>I'm doing .NET 3.5 programming in VB for a class. I have a .mdb database with 3 related tables, and a table adapter with some queries on it that look like this:</p>
<pre><code>SELECT PropertyID, Street, Unit, City, Zip, Type, Bedrooms, Bathrooms, Area, MonthlyRent
FROM tblProperties
</code></pre>
<p>Th... | [
{
"answer_id": 258216,
"author": "dbr",
"author_id": 745,
"author_profile": "https://Stackoverflow.com/users/745",
"pm_score": 4,
"selected": true,
"text": "cfgmaker --output=mrtg_myrouter.cfg public@1.2.3.4\n"
}
] | 2008/11/03 | [
"https://Stackoverflow.com/questions/258173",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/33583/"
] |
258,198 | <p>inside my C# app I runs a 7z process to extract an archive into it's directory</p>
<p>the archive is located in a random-named directory on the %TEMP% directory for example</p>
<blockquote>
<p>C:\Documents and Settings\User\Local
Settings\Temp\vtugoyrc.fd2</p>
</blockquote>
<p>(fullPathFilename = "C:\Document... | [
{
"answer_id": 258338,
"author": "Marc Gravell",
"author_id": 23354,
"author_profile": "https://Stackoverflow.com/users/23354",
"pm_score": 2,
"selected": false,
"text": "WaitForExit() 1>out.txt 2>&1 out.txt"
}
] | 2008/11/03 | [
"https://Stackoverflow.com/questions/258198",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/30324/"
] |
258,204 | <p>I have a dictionary that I normally access with a key, so I need fast random access reads. However for one function I need to process every item in the dictionary where the order is important. It seems to be working OK in tests. Is it OK to depend on the order of items in a dictionary?</p>
| [
{
"answer_id": 258221,
"author": "Eoin Campbell",
"author_id": 30155,
"author_profile": "https://Stackoverflow.com/users/30155",
"pm_score": 0,
"selected": false,
"text": "tpower Dictionary SortedDictionary Dictionary SortedDictionary"
},
{
"answer_id": 258386,
"author": "bru... | 2008/11/03 | [
"https://Stackoverflow.com/questions/258204",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18107/"
] |
258,211 | <pre><code>#!/bin/bash
hello()
{
SRC=$1
DEST=$2
for IP in `cat /opt/ankit/configs/machine.configs` ; do
echo $SRC | grep '*' > /dev/null
if test `echo $?` -eq 0 ; then
for STAR in $SRC ; do
echo -en "$IP"
echo -en "\n\t ARG1=$STAR ARG2=$2\n\n"... | [
{
"answer_id": 258232,
"author": "agnul",
"author_id": 6069,
"author_profile": "https://Stackoverflow.com/users/6069",
"pm_score": 2,
"selected": false,
"text": "$ ls\none.pdf two.pdf three.pdf\n ./test.sh *.pdf /ankit__test/as\n ./test.sh one.pdf two.pdf three.pdf /ankit__test/as\n ./te... | 2008/11/03 | [
"https://Stackoverflow.com/questions/258211",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/24813/"
] |
258,214 | <p>Since version 1.5 Subversion supports to have a local caching-proxy for the main Master-repository. </p>
<p>I got the slave synced and the master replaying the commits to the slave.
Everything works fine so far, but now I am wondering how to do the authentication (working with <a href="http://blogs.open.collab.net... | [
{
"answer_id": 264113,
"author": "Morgan Christiansson",
"author_id": 34516,
"author_profile": "https://Stackoverflow.com/users/34516",
"pm_score": 1,
"selected": false,
"text": "Require valid-user"
}
] | 2008/11/03 | [
"https://Stackoverflow.com/questions/258214",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20319/"
] |
258,218 | <p>In MSBuild, I would like to call a task that extracts all the files in all the project in a specific solution and hold these files in a property that can be passed around to other tasks (for processing etc.)</p>
<p>I was thinking something along the lines of:</p>
<pre><code><ParseSolutionFile SolutionFile="$(Th... | [
{
"answer_id": 261037,
"author": "sliderhouserules",
"author_id": 31385,
"author_profile": "https://Stackoverflow.com/users/31385",
"pm_score": 2,
"selected": false,
"text": "<ItemGroup>\n <Content Include=\"Default.aspx\" />\n <Content Include=\"Web.config\" />\n</ItemGroup>\n<ItemGro... | 2008/11/03 | [
"https://Stackoverflow.com/questions/258218",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9222/"
] |
258,228 | <p>I have been bitten by something unexpected recently. I wanted to make something like that:</p>
<pre><code>try :
thing.merge(iterable) # this is an iterable so I add it to the list
except TypeError :
thing.append(iterable) # this is not iterable, so I add it
</code></pre>
<p>Well, It was working fine unti... | [
{
"answer_id": 258234,
"author": "e-satis",
"author_id": 9951,
"author_profile": "https://Stackoverflow.com/users/9951",
"pm_score": 2,
"selected": false,
"text": "for x in Exception(\"test\") :\n print x\n ....: \n ....: \ntest\n raise Exception(\"test\") \n\nTraceback (m... | 2008/11/03 | [
"https://Stackoverflow.com/questions/258228",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9951/"
] |
258,231 | <p>I have a Table called <em>Product</em> and I have the Table <em>StorageHistory</em>.</p>
<p>Now, Product contains a reference to StorageHistory in it's mappings</p>
<pre><code><set name="StorageHistories" lazy="false">
<key column="ProductId" />
<one-to-many class="StorageHistory" />
</set... | [
{
"answer_id": 269847,
"author": "Min",
"author_id": 14461,
"author_profile": "https://Stackoverflow.com/users/14461",
"pm_score": 0,
"selected": false,
"text": "private ISet _StorageHistories;\npublic virtual ISet StorageHistories {\n protected set { _StorageHistories = value;}\n ... | 2008/11/03 | [
"https://Stackoverflow.com/questions/258231",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/21699/"
] |
258,251 | <p>How do I apply 'use base' in Perl to inherit subs from some base module?</p>
<p>I'm used to C++ inheritance mechanics, and all the sites I googled for this caused more confusion then help. I want to do something like the following:</p>
<pre><code>#! /usr/bin/perl
#The base class to inherit from
use strict;
use war... | [
{
"answer_id": 258308,
"author": "tsee",
"author_id": 13164,
"author_profile": "https://Stackoverflow.com/users/13164",
"pm_score": 2,
"selected": false,
"text": "main->tbSub(2);\n package Derived;\nuse base \"TestBase\";\n\npackage main;\nDerived->somemethod(\"foo\");\n Class->somemetho... | 2008/11/03 | [
"https://Stackoverflow.com/questions/258251",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15161/"
] |
258,264 | <p>Is there any way of using Memcached for fragment caching in Rails?</p>
| [
{
"answer_id": 259239,
"author": "TonyLa",
"author_id": 1295,
"author_profile": "https://Stackoverflow.com/users/1295",
"pm_score": 3,
"selected": true,
"text": " ActionController::Base.cache_store = ActiveSupport::Cache::MemCacheStore.new()\n"
},
{
"answer_id": 1034898,
"au... | 2008/11/03 | [
"https://Stackoverflow.com/questions/258264",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12037/"
] |
258,273 | <p>Heres the link:</p>
<p><a href="http://tinyurl.com/596xva" rel="nofollow noreferrer">DAMNIE6TOHELL</a></p>
<p>As you can see if viewed in glorious 'IE6-o-color', the footer is shifting 1px over to the left.
I'm struggling to find a fix for this, I've whittled it down to a bare minimum of HTML.</p>
<p>Is it someth... | [
{
"answer_id": 258293,
"author": "yoavf",
"author_id": 1011,
"author_profile": "https://Stackoverflow.com/users/1011",
"pm_score": 2,
"selected": true,
"text": "background-position: 50% top;\n"
}
] | 2008/11/03 | [
"https://Stackoverflow.com/questions/258273",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/26107/"
] |
258,275 | <p>I'm trying to run a command-line process (which is extraction of a .7z archive) on a file that lies in a temporary folder on the windows user temp directory
(C:\Documents and Settings\User\Local Settings\Temp), using Process in my c# app.</p>
<p>I think the process return error that happens because of "access denie... | [
{
"answer_id": 258276,
"author": "Marc Gravell",
"author_id": 23354,
"author_profile": "https://Stackoverflow.com/users/23354",
"pm_score": 1,
"selected": false,
"text": "Path.GetTempFileName() string dir = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString());\n"
}
] | 2008/11/03 | [
"https://Stackoverflow.com/questions/258275",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/30324/"
] |
258,284 | <p>In either a Windows or Mac OS X terminal if you type...</p>
<pre><code>nslookup -type=SRV _xmpp-server._tcp.gmail.com
</code></pre>
<p>... (for example) you will receive a bunch of SRV records relating to different google chat servers..</p>
<p>Does anyone have any experience in this area and possibly know how to ... | [
{
"answer_id": 258413,
"author": "Alex Reynolds",
"author_id": 19410,
"author_profile": "https://Stackoverflow.com/users/19410",
"pm_score": 0,
"selected": false,
"text": "system() NSTask NSTask Foundation dig"
},
{
"answer_id": 258799,
"author": "Alnitak",
"author_id": 6... | 2008/11/03 | [
"https://Stackoverflow.com/questions/258284",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/33604/"
] |
258,285 | <p>I'm working through some homework and a question on a previous exam paper asks to name all of the abstract classes in a given UML diagram. Fairly straightforward, I suppose. There are one abstract class and three interfaces. Do these interfaces qualify as abstract classes, in general?</p>
| [
{
"answer_id": 258289,
"author": "Ande Turner",
"author_id": 4857,
"author_profile": "https://Stackoverflow.com/users/4857",
"pm_score": 1,
"selected": false,
"text": ".class .java abstract class"
},
{
"answer_id": 258294,
"author": "VonC",
"author_id": 6309,
"author_... | 2008/11/03 | [
"https://Stackoverflow.com/questions/258285",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13877/"
] |
258,291 | <p>In a visual studio project I have three layers, Data Layer, Business Layer and Presentation Layer. </p>
<p>In the Data Layer I have a few XSLT's that transform some objects into an email, all works fine but I have discovered that the XSLTs do not get built/copied when building. </p>
<p>I have currently, created a ... | [
{
"answer_id": 258854,
"author": "jon without an h",
"author_id": 27578,
"author_profile": "https://Stackoverflow.com/users/27578",
"pm_score": 3,
"selected": true,
"text": "// To get the contents of the resource as a string:\nstring xslt = global::MyNamespace.Properties.Resources.MyXslt... | 2008/11/03 | [
"https://Stackoverflow.com/questions/258291",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11802/"
] |
258,292 | <p>Currently, I have a UIView subclass that "stamps" a single 2px by 2px CGLayerRef across the screen, up to 160 x 240 times.</p>
<p>I currently animate this by moving the UIView "up" the screen 2 pixels (actually, a UIImageView) and then drawing the next "row".</p>
<p>Would using multiple CALayer layers speed up per... | [
{
"answer_id": 258445,
"author": "Alex Reynolds",
"author_id": 19410,
"author_profile": "https://Stackoverflow.com/users/19410",
"pm_score": 1,
"selected": false,
"text": "CAConstraintLayoutManager CAConstraint QuartzCore.h CALayer UIView UIView drawRect drawRect CGLayerRef CGLayerRef UI... | 2008/11/03 | [
"https://Stackoverflow.com/questions/258292",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19410/"
] |
258,296 | <p>I have a models <code>A</code> and <code>B</code>, that are like this:</p>
<pre><code>class A(models.Model):
title = models.CharField(max_length=20)
(...)
class B(models.Model):
date = models.DateTimeField(auto_now_add=True)
(...)
a = models.ForeignKey(A)
</code></pre>
<p>Now I have some <code>A</code> ... | [
{
"answer_id": 258310,
"author": "Jonny Buchanan",
"author_id": 6760,
"author_profile": "https://Stackoverflow.com/users/6760",
"pm_score": 4,
"selected": true,
"text": "extra A.objects.extra(\n select={\n 'b_count': 'SELECT COUNT(*) FROM yourapp_b WHERE yourapp_b.a_id = yourap... | 2008/11/03 | [
"https://Stackoverflow.com/questions/258296",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4172/"
] |
258,317 | <p>I have the following snippet in one of my html pages :</p>
<pre><code><div class="inputboximage">
<div class="value2">
<input name='address1' value='Somewhere' type="text" size="26" maxlength="40" />
<br />
</div>
</div>
</code></pre>
<p>My problem is that I ne... | [
{
"answer_id": 258319,
"author": "Community",
"author_id": -1,
"author_profile": "https://Stackoverflow.com/users/-1",
"pm_score": 6,
"selected": true,
"text": "$(this).parents('div.inputBoxImage').css(...)\n $(this.parentNode)"
},
{
"answer_id": 258341,
"author": "Prody",
... | 2008/11/03 | [
"https://Stackoverflow.com/questions/258317",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/24079/"
] |
258,339 | <p>I have a GUI application that executes (in a new process) "console" applications and parse the output. To redirect the Output i set the pConsole.StartInfo.RedirectStandardOutput to true. I also subscribes to the event pConsole.Exited.</p>
<p>The problem I see is that I have to use Thread.Sleep() in the Exited event... | [
{
"answer_id": 258387,
"author": "Marc Gravell",
"author_id": 23354,
"author_profile": "https://Stackoverflow.com/users/23354",
"pm_score": 2,
"selected": false,
"text": "Join() using (Process proc = Process.Start(psi))\n {\n Thread stdErr = new Thre... | 2008/11/03 | [
"https://Stackoverflow.com/questions/258339",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
258,344 | <p>Is it possible to define a spring-managed EJB3 hibernate listener?</p>
<p>I have this definition in my <strong>persistence.xml</strong>:</p>
<pre><code><properties>
<property name="hibernate.ejb.interceptor"
value="my.class.HibernateAuditInterceptor" />
<property name="hibernate.ej... | [
{
"answer_id": 262992,
"author": "Chochos",
"author_id": 10165,
"author_profile": "https://Stackoverflow.com/users/10165",
"pm_score": 1,
"selected": true,
"text": "<bean id=\"mySessionFactory\" class=\"org.springframework.orm.hibernate3.LocalSessionFactoryBean\">\n <property name=\"d... | 2008/11/03 | [
"https://Stackoverflow.com/questions/258344",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/22992/"
] |
258,355 | <p>I'm trying to find a way to automate some exception logging code to add to the stack information already available.</p>
<p>Is there any way to use reflection to retrieve the values of all variables on the stack (locals and parameters) - I sincerely doubt the names of the variables are available, but in many cases i... | [
{
"answer_id": 258373,
"author": "Marc Gravell",
"author_id": 23354,
"author_profile": "https://Stackoverflow.com/users/23354",
"pm_score": 3,
"selected": true,
"text": " string dir = ...todo...\n try\n {\n // some code\n }\n catch (Exception ex)\n {\n ex.... | 2008/11/03 | [
"https://Stackoverflow.com/questions/258355",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5777/"
] |
258,365 | <p>Here is the directory structure</p>
<pre><code>/domain.com
/public_html
/functions
/image
/mobile
/www
</code></pre>
<p>the /domain.com/public_html/www folder has a file index.php
the default web directory is /user/public_html/www
in the index file is an include that includes the functions with
include"..... | [
{
"answer_id": 258371,
"author": "Gareth",
"author_id": 31582,
"author_profile": "https://Stackoverflow.com/users/31582",
"pm_score": 1,
"selected": false,
"text": "<img src=\"my_php_proxy.php\">\n"
},
{
"answer_id": 258380,
"author": "Aron Rotteveel",
"author_id": 11568,... | 2008/11/03 | [
"https://Stackoverflow.com/questions/258365",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18383/"
] |
258,367 | <p>looking for the standard bug-proofed way to convert "long names" such as "C:\Documents and settings" to their equivalent "short names" "C:\DOCUME~1"</p>
<p>I need this to run an external process from withing my C# app. It fails if I feed it with paths in the "long name".</p>
| [
{
"answer_id": 258382,
"author": "David Arno",
"author_id": 7122,
"author_profile": "https://Stackoverflow.com/users/7122",
"pm_score": 5,
"selected": false,
"text": " const int MAX_PATH = 255;\n\n [DllImport(\"kernel32.dll\", CharSet = CharSet.Auto)]\n public static extern int ... | 2008/11/03 | [
"https://Stackoverflow.com/questions/258367",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/30324/"
] |
258,372 | <p>I have a div container and have defined its style as follows:</p>
<pre><code>div#tbl-container
{
width: 600px;
overflow: auto;
scrollbar-base-color:#ffeaff
}
</code></pre>
<p>This gives me both horizontal and vertical scroll bars automatically once I populate my table which is contained by this... | [
{
"answer_id": 258379,
"author": "Gareth",
"author_id": 31582,
"author_profile": "https://Stackoverflow.com/users/31582",
"pm_score": 1,
"selected": false,
"text": "overflow-x scroll widths heights"
},
{
"answer_id": 258393,
"author": "bobince",
"author_id": 18936,
"a... | 2008/11/03 | [
"https://Stackoverflow.com/questions/258372",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13370/"
] |
258,375 | <p>A lot of iPhone apps use a blue badge to indicate the number of items in the subviews, such as the Mail client:</p>
<p><a href="http://skitch.com/leonho/4xeu/iphoto" rel="noreferrer">iPhoto http://img.skitch.com/20081103-tjr9yupbhgr3sqfh7u56if4rsn.preview.jpg</a></p>
<p>Are there any standards way (or even an API)... | [
{
"answer_id": 258510,
"author": "Kristian",
"author_id": 23246,
"author_profile": "https://Stackoverflow.com/users/23246",
"pm_score": -1,
"selected": false,
"text": "NSDate *now = [NSDate dateWithTimeIntervalSinceNow:0];\nNSString *caldate = [[now \n dateWithCalendarFormat:@\"%b... | 2008/11/03 | [
"https://Stackoverflow.com/questions/258375",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/30883/"
] |
258,376 | <p>How would I specify a color in app.config and then convert that into an actual System.Drawing.Color object at runtime?</p>
| [
{
"answer_id": 258403,
"author": "Marc Gravell",
"author_id": 23354,
"author_profile": "https://Stackoverflow.com/users/23354",
"pm_score": 2,
"selected": false,
"text": "Color TypeConverter static void Main()\n{\n\n Test(Color.Red);\n Test(Color.FromArgb(34,125,75));\n}\nstatic vo... | 2008/11/03 | [
"https://Stackoverflow.com/questions/258376",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1127460/"
] |
258,390 | <p>I have a text file of URLs, about 14000. Below is a couple of examples:</p>
<p><a href="http://www.domainname.com/pagename?CONTENT_ITEM_ID=100&param2=123" rel="nofollow noreferrer">http://www.domainname.com/pagename?CONTENT_ITEM_ID=100&param2=123</a><br />
<a href="http://www.domainname.com/images?IMAGE_ID... | [
{
"answer_id": 258396,
"author": "Graeme Perrow",
"author_id": 1821,
"author_profile": "https://Stackoverflow.com/users/1821",
"pm_score": 3,
"selected": false,
"text": "list2 = filter( lambda x: x.find( 'CONTENT_ITEM_ID ') != -1, list1 )\n function look_for_content_item_id( elem ):\n ... | 2008/11/03 | [
"https://Stackoverflow.com/questions/258390",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/30786/"
] |
258,394 | <p>I am new to Cocoa and need to capture input using scanf to run a program that requires input of four variables one at a time.</p>
<p>Is there any console, window class, canvas, memo class (as in delphi) that will llow me to do this.</p>
<p>Earl Cenac</p>
| [
{
"answer_id": 259901,
"author": "Peter Hosey",
"author_id": 30461,
"author_profile": "https://Stackoverflow.com/users/30461",
"pm_score": 0,
"selected": false,
"text": "scanf NSString +[NSString stringWithUTF8String:] +[NSString stringWithCString:encoding:]"
},
{
"answer_id": 45... | 2008/11/03 | [
"https://Stackoverflow.com/questions/258394",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
258,397 | <p>I am desiging a new website for my company and I am trying to implement switch navigation which is what I have used on all my sites in the past.</p>
<pre><code><?php
switch($x) {
default:
include("inc/main.php");
break;
case "products":
include("inc/products.php");
break;
}
?>
</code></pre>
<p>For some re... | [
{
"answer_id": 258405,
"author": "Alnitak",
"author_id": 6782,
"author_profile": "https://Stackoverflow.com/users/6782",
"pm_score": 5,
"selected": true,
"text": "register_globals $x = $_REQUEST['x']\n $_GET GET $_REQUEST"
},
{
"answer_id": 258410,
"author": "hangy",
"aut... | 2008/11/03 | [
"https://Stackoverflow.com/questions/258397",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/26823/"
] |
258,407 | <p>I need to convert a UNICODE_STRING structure to a simple NULL TERMINATED STRING.</p>
<pre><code>typedef
struct _UNICODE_STRING
{
USHORT Length;
USHORT MaximumLength;
PWSTR Buffer;
}
UNICODE_STRING, *PUNICODE_STRING;
</code></pre>
<p>I can't find a clean sollution on MSDN about it.
Anyone bee... | [
{
"answer_id": 9657638,
"author": "SecurityMatt",
"author_id": 1250976,
"author_profile": "https://Stackoverflow.com/users/1250976",
"pm_score": 0,
"selected": false,
"text": "WCHAR* UnicodeStringToNulTerminated(UNICODE_STRING* str)\n{\n WCHAR* result;\n if(str == NULL)\n return NUL... | 2008/11/03 | [
"https://Stackoverflow.com/questions/258407",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
258,409 | <p>I have a 'generic' boiler plate static method for checking for InvokeRequired and invoking an associated action accordingly.</p>
<p>If an unhandled exception is raised by the action, the stack trace isn't much help because it starts from here. I can get information about the control, but that isn't always much help... | [
{
"answer_id": 9657638,
"author": "SecurityMatt",
"author_id": 1250976,
"author_profile": "https://Stackoverflow.com/users/1250976",
"pm_score": 0,
"selected": false,
"text": "WCHAR* UnicodeStringToNulTerminated(UNICODE_STRING* str)\n{\n WCHAR* result;\n if(str == NULL)\n return NUL... | 2008/11/03 | [
"https://Stackoverflow.com/questions/258409",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11410/"
] |
258,416 | <p>I'm looking for the .NET-preferred way of performing the same type of thing that ShellExecute does in Win32 (opening, printing, etc. for arbitrary file types).</p>
<p>I've been programming Windows for over 20 years, but I'm a complete newbie at .NET, so maybe I'm just looking in the wrong places. I'm currently usin... | [
{
"answer_id": 258465,
"author": "Corey Trager",
"author_id": 9328,
"author_profile": "https://Stackoverflow.com/users/9328",
"pm_score": 5,
"selected": false,
"text": "System.Diagnostics.Process.Start(command)\n"
},
{
"answer_id": 258468,
"author": "Cyril Gupta",
"author... | 2008/11/03 | [
"https://Stackoverflow.com/questions/258416",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6111/"
] |
258,422 | <p>Using qsort in C we pass in a comparison function e.g.</p>
<pre><code>int cmp(const void*, const void*);
</code></pre>
<p>the protoype of qsort expects a <code>int (* )(const void* , const void*)</code> so we call:</p>
<pre><code>qsort(..., cmp);
</code></pre>
<p>but it is equally valid to call:</p>
<pre><code>... | [
{
"answer_id": 258435,
"author": "Jeff Hillman",
"author_id": 3950,
"author_profile": "https://Stackoverflow.com/users/3950",
"pm_score": 3,
"selected": false,
"text": "int main()\n{\n int integer = 0xFFFFFF; \n void (*functionPointer)() = (void(*)())integer; \n\n functionPointer()... | 2008/11/03 | [
"https://Stackoverflow.com/questions/258422",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/26665/"
] |
258,425 | <p>I have a large project for which I am attempting to use TDD.
I am using <a href="http://tut-framework.sourceforge.net/" rel="nofollow noreferrer">Tut</a> as my test framework, which has its flaws but is sufficient for what I need. </p>
<p>I need to exploit link time test seams, <strong>each test must be in its own ... | [
{
"answer_id": 258453,
"author": "sergtk",
"author_id": 13441,
"author_profile": "https://Stackoverflow.com/users/13441",
"pm_score": 3,
"selected": true,
"text": "#pragma comment(lib, \"libname\")\n"
}
] | 2008/11/03 | [
"https://Stackoverflow.com/questions/258425",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1575281/"
] |
258,469 | <p>These seem to mean the same thing. But what term is more appropriate in what context?</p>
| [
{
"answer_id": 258474,
"author": "dove",
"author_id": 30913,
"author_profile": "https://Stackoverflow.com/users/30913",
"pm_score": 2,
"selected": false,
"text": "<property attribute=\"attributeValue\">proopertyValue</property>\n [Attribute]\npublic class Entity\n{\n private int Prope... | 2008/11/03 | [
"https://Stackoverflow.com/questions/258469",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6954/"
] |
258,473 | <p>I am trying to migrate a part of an SVN repository using <code>svnadmin dump</code>.</p>
<p>The provided svndumpfilter tool doesn't manage copy/move/rename dependencies from directories not included in the export.</p>
<p>Is there a tool which can manage these dependencies?</p>
| [
{
"answer_id": 258498,
"author": "Davide Gualano",
"author_id": 28582,
"author_profile": "https://Stackoverflow.com/users/28582",
"pm_score": 0,
"selected": false,
"text": "http://host/project http://host/dependencies svndumpfilter include http://host/project http://host/dependencies < t... | 2008/11/03 | [
"https://Stackoverflow.com/questions/258473",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/33622/"
] |
258,481 | <p>In any (non-web) .net project, the compiler automatically declares the DEBUG and TRACE constants, so I can use conditional compiling to, for example, handle exceptions differently in debug vs release mode.</p>
<p>For example:</p>
<pre><code>#if DEBUG
/* re-throw the exception... */
#else
/* write something... | [
{
"answer_id": 258495,
"author": "Andrew Theken",
"author_id": 32238,
"author_profile": "https://Stackoverflow.com/users/32238",
"pm_score": 4,
"selected": true,
"text": "#if DEBUG\n/* re-throw the exception... */\n#else\n/* write something in the event log... */\n#endif\n"
},
{
... | 2008/11/03 | [
"https://Stackoverflow.com/questions/258481",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/23824/"
] |
258,483 | <h2>Question</h2>
<p>I'm sure many of you have been faced by the challenge of localizing a database backend to an application. If you've not then I'd be pretty confident in saying that the odds of you having to do so in the future is quite large. I'm talking anout storing multiple translations of texts (and the same c... | [
{
"answer_id": 261900,
"author": "TToni",
"author_id": 20703,
"author_profile": "https://Stackoverflow.com/users/20703",
"pm_score": 1,
"selected": false,
"text": "SELECT *\nFrom Product\nWhere Product.ID = 10 AND Product.cultureID = 1\n"
},
{
"answer_id": 261979,
"author": "... | 2008/11/03 | [
"https://Stackoverflow.com/questions/258483",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/25319/"
] |
258,486 | <p>How to calculate the length (in pixels) of a string in Java?</p>
<p>Preferable without using Swing.</p>
<p>EDIT:
I would like to draw the string using the drawString() in Java2D
and use the length for word wrapping.</p>
| [
{
"answer_id": 258499,
"author": "Jon Skeet",
"author_id": 22656,
"author_profile": "https://Stackoverflow.com/users/22656",
"pm_score": 8,
"selected": true,
"text": "Graphics.getFontMetrics FontMetrics FontMetrics.stringWidth Graphics g int width = g.getFontMetrics().stringWidth(text);\... | 2008/11/03 | [
"https://Stackoverflow.com/questions/258486",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/26567/"
] |
258,505 | <p>Is it possible in Actionscript 3 to create a weak reference to an object, so that it can be garbage collected.</p>
<p>I'm creating some classes to make debugging easier, so I don't want the objects to hang around in memory if they are only referenced here (and of course I don't want to fill the code with callbacks ... | [
{
"answer_id": 258507,
"author": "Andres",
"author_id": 1815,
"author_profile": "https://Stackoverflow.com/users/1815",
"pm_score": 2,
"selected": false,
"text": "public class WeakReference\n{\n private var dic\n\n public function WeakReference(object)\n {\n this.dic = ne... | 2008/11/03 | [
"https://Stackoverflow.com/questions/258505",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1815/"
] |
258,529 | <p>Here's an interface:</p>
<pre><code>public interface Foo<T> extends Comparable<Foo<T>> {
...
}
</code></pre>
<p>And there are some classes implementing this interface:</p>
<pre><code>public class Bar extends Something implements Foo<Something> {
public Vector<Foo<Bar>> ... | [
{
"answer_id": 258623,
"author": "Marcus Downing",
"author_id": 1000,
"author_profile": "https://Stackoverflow.com/users/1000",
"pm_score": 4,
"selected": true,
"text": "Vector<A> vector = new Vector<B>();\n Vector<Vector<?>> vector = new Vector<Vector<String>>();\nvector.add(new Vector<... | 2008/11/03 | [
"https://Stackoverflow.com/questions/258529",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
258,534 | <p>I would like to know what the pros and cons are for using an Anemic Domain Model (see link below).</p>
<p><a href="http://www.martinfowler.com/bliki/AnemicDomainModel.html" rel="noreferrer" title="Fowler Article">Fowler Article</a></p>
| [
{
"answer_id": 5847282,
"author": "Eric P",
"author_id": 221291,
"author_profile": "https://Stackoverflow.com/users/221291",
"pm_score": 7,
"selected": false,
"text": "public void Order.AddOrderLine(Product product)\n{\n OrderLines.Add(new OrderLine(product));\n}\n public void OrderSe... | 2008/11/03 | [
"https://Stackoverflow.com/questions/258534",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10589/"
] |
258,556 | <p>I am using the <code>OpenArgs</code> parameter to send a value when using <code>DoCmd.OpenForm</code>:</p>
<pre><code>DoCmd.OpenForm "frmSetOther", acNormal, , , acFormAdd, acDialog, "value"
</code></pre>
<p>I then use <code>Me.OpenArgs</code> inside the opened form to grab the <strong><em>value</em></strong>. It... | [
{
"answer_id": 258779,
"author": "Philippe Grondier",
"author_id": 11436,
"author_profile": "https://Stackoverflow.com/users/11436",
"pm_score": 3,
"selected": true,
"text": "addPropertyToForm \"formFilter\",\"Tbl_myTable.myField LIKE 'A*'\",myFormName\n Function addPropertyToForm(_ \n ... | 2008/11/03 | [
"https://Stackoverflow.com/questions/258556",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15884/"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.