qid
int64
4
19.1M
question
stringlengths
18
48.3k
answers
list
date
stringlengths
10
10
metadata
list
59,425
<p>I'm using MySQL in particular, but I'm hoping for a cross-vendor solution. I'm using the NOW() function to add a timestamp as a column for each record.</p> <pre><code>INSERT INTO messages (typeId, messageTime, stationId, message) VALUES (?, NOW(), ?, ?) </code></pre>
[ { "answer_id": 59437, "author": "Alexander Morland", "author_id": 4013, "author_profile": "https://Stackoverflow.com/users/4013", "pm_score": 3, "selected": true, "text": "SELECT * FROM messages WHERE DATE_SUB(CURDATE(),INTERVAL 1 DAY) <= messageTime\n" }, { "answer_id": 59443, ...
2008/09/12
[ "https://Stackoverflow.com/questions/59425", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1288/" ]
59,444
<p>Is there a system stored procedure to get the version #?</p>
[ { "answer_id": 59457, "author": "Joe Kuemerle", "author_id": 4273, "author_profile": "https://Stackoverflow.com/users/4273", "pm_score": 9, "selected": true, "text": "SELECT @@VERSION \n SELECT SERVERPROPERTY('productversion')\n , SERVERPROPERTY('productlevel')\n , SERVERPROPERTY...
2008/09/12
[ "https://Stackoverflow.com/questions/59444", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4872/" ]
59,451
<p>How do I create a silverlight data template in code? I've seen plenty of examples for WPF, but nothing for Silverlight.</p> <p>Edit: Here's the code I'm now using this for, based on the answer from Santiago below.</p> <pre><code>public DataTemplate Create(Type type) { return (DataTemplate)XamlReader.Load( ...
[ { "answer_id": 72158, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 6, "selected": true, "text": " public static DataTemplate Create(Type type)\n {\n return (DataTemplate) XamlReader.Load(\n @\"<DataTem...
2008/09/12
[ "https://Stackoverflow.com/questions/59451", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5932/" ]
59,456
<p>I'd like to make some custom MenuHeaders in WPF so I can have (for example), an icon and text in a menu item.</p> <p>Normally using MenuItems, if you populate the Header field with straight text, you can add an accelerator by using an underscore. eg, _File</p> <p>However, if I wanted to put in a UserControl, I bel...
[ { "answer_id": 59706, "author": "Alan Le", "author_id": 1133, "author_profile": "https://Stackoverflow.com/users/1133", "pm_score": 2, "selected": false, "text": "<MenuItem Header=\"_Open\">\n <MenuItem.Icon>\n <Image Source=\"images/Open.png\"/>\n </MenuItem.Icon>\n</MenuItem>\n" ...
2008/09/12
[ "https://Stackoverflow.com/questions/59456", "https://Stackoverflow.com", "https://Stackoverflow.com/users/483/" ]
59,465
<p>By default the webjump hotlist has the following which I use quite often:</p> <pre><code>M-x webjump RET Google M-x webjump RET Wikipedia </code></pre> <p>How can I add 'Stackoverflow' to my list?</p>
[ { "answer_id": 59476, "author": "Marcel Levy", "author_id": 676, "author_profile": "https://Stackoverflow.com/users/676", "pm_score": 2, "selected": true, "text": ";; (require 'webjump)\n;; (global-set-key \"\\C-cj\" 'webjump)\n;; (setq webjump-sites\n;; (append '(\n;; ...
2008/09/12
[ "https://Stackoverflow.com/questions/59465", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4872/" ]
59,483
<pre><code>1167 ptr = (void*)getcwd(cwd, MAX_PATH_LENGTH-1); (gdb) n 1168 if (!ptr) { (gdb) print ptr $1 = 0xbff2d96c "/media/MMC-SD/partition1/aaaaaaaaaaa" (gdb) print &amp;cwd $2 = (char (*)[3500]) 0xbff2d96c (gdb) print strlen(cwd) $3 = 36 (gdb) print "%s",cwd $4 = "/media/MMC-SD/partition1/aaaaaaaaaaa", '...
[ { "answer_id": 59509, "author": "oliver", "author_id": 2148773, "author_profile": "https://Stackoverflow.com/users/2148773", "pm_score": 1, "selected": false, "text": "ptr cwd man 3 getcwd ptr cwd ptr" }, { "answer_id": 59517, "author": "mweerden", "author_id": 4285, ...
2008/09/12
[ "https://Stackoverflow.com/questions/59483", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5330/" ]
59,515
<p>I am new to all the anonymous features and need some help. I have gotten the following to work:</p> <pre><code>public void FakeSaveWithMessage(Transaction t) { t.Message = "I drink goats blood"; } public delegate void FakeSave(Transaction t); public void SampleTestFunction() { Expect.Call(delegate { _dao...
[ { "answer_id": 59531, "author": "Chris Marasti-Georg", "author_id": 96, "author_profile": "https://Stackoverflow.com/users/96", "pm_score": 0, "selected": false, "text": "Expect.Call(delegate { _dao.Save(t); }).Do(new EventHandler(delegate(Transaction t2) { t2.CheckInInfo.CheckInMessage ...
2008/09/12
[ "https://Stackoverflow.com/questions/59515", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5056/" ]
59,544
<p>I have the following tables, the <code>groups</code> table which contains hierarchically ordered groups and <code>group_member</code> which stores which groups a user belongs to. </p> <pre><code>groups --------- id parent_id name group_member --------- id group_id user_id ID PARENT_ID NAME -------------------...
[ { "answer_id": 59632, "author": "Kevin Fairchild", "author_id": 3743, "author_profile": "https://Stackoverflow.com/users/3743", "pm_score": 0, "selected": false, "text": "SELECT GroupUsers.User_ID,\n (\n SELECT \n STUFF((SELECT ',' + \n Cast(Group_ID A...
2008/09/12
[ "https://Stackoverflow.com/questions/59544", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2138/" ]
59,557
<p>is there an easy way to transform HTML into markdown with JAVA?</p> <p>I am currently using the Java <strong><a href="http://code.google.com/p/markdownj/" rel="noreferrer">MarkdownJ</a></strong> library to transform markdown to html.</p> <pre><code>import com.petebevin.markdown.MarkdownProcessor; ... public static...
[ { "answer_id": 741062, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 2, "selected": false, "text": "wmd.js wmd_options = {\n // format sent to the server. can also be \"HTML\"\n output: \"Markdown\",\n\n ...
2008/09/12
[ "https://Stackoverflow.com/questions/59557", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2138/" ]
59,560
<p>Of all the forms of CAPTCHA available, which one is the "least crackable" while remaining fairly human readable?</p>
[ { "answer_id": 24972337, "author": "ZeroBased_IX", "author_id": 1888402, "author_profile": "https://Stackoverflow.com/users/1888402", "pm_score": 2, "selected": false, "text": "If honeypotfield <> Empty Then\n \"No Spam TY\"\nElse \n //Proceed with the form \nEnd If\n" } ]
2008/09/12
[ "https://Stackoverflow.com/questions/59560", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5287/" ]
59,599
<p>I have a large classic ASP app that I have to maintain, and I repeatedly find myself thwarted by the lack of short-circuit evaluation capability. E.g., VBScript won't let you get away with:</p> <pre><code>if not isNull(Rs("myField")) and Rs("myField") &lt;&gt; 0 then ... </code></pre> <p>...because if Rs("myField...
[ { "answer_id": 59606, "author": "busse", "author_id": 5702, "author_profile": "https://Stackoverflow.com/users/5702", "pm_score": 3, "selected": false, "text": "if not isNull(Rs(\"myField\")) Then\n if Rs(\"myField\") <> 0 then\n" }, { "answer_id": 59618, "author": "ogleste...
2008/09/12
[ "https://Stackoverflow.com/questions/59599", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1818/" ]
59,628
<p>I have a page results page (you get there after submitting your search query elsewhere) whit a whole bunch of gridviews for different type of data objects.</p> <p>Obviously, some of the queries take longer than the others. How can I make each gridview render as soon as it has the data it needs?</p> <p>This has bee...
[ { "answer_id": 59723, "author": "FlySwat", "author_id": 1965, "author_profile": "https://Stackoverflow.com/users/1965", "pm_score": 3, "selected": true, "text": "if (this.isPostBack && ScriptManager.IsInAsyncPostback)\n" } ]
2008/09/12
[ "https://Stackoverflow.com/questions/59628", "https://Stackoverflow.com", "https://Stackoverflow.com/users/781/" ]
59,635
<p>Since our switch from Visual Studio 6 to Visual Studio 2008, we've been using the MFC90.dll and msvc[pr]90.dlls along with the manifest files in a private side-by-side configuration so as to not worry about versions or installing them to the system.</p> <p>Pre-SP1, this was working fine (and still works fine on our...
[ { "answer_id": 70808, "author": "Roel", "author_id": 11449, "author_profile": "https://Stackoverflow.com/users/11449", "pm_score": 6, "selected": true, "text": "#define _BIND_TO_CURRENT_MFC_VERSION 1\n#define _BIND_TO_CURRENT_CRT_VERSION 1\n #define _BIND_TO_CURRENT_VCLIBS_VERSION 1\n _B...
2008/09/12
[ "https://Stackoverflow.com/questions/59635", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1441/" ]
59,642
<p>What's the best way to determine which version of the .NET Compact Frameworks (including Service Packs) is installed on a device through a .NET application. </p>
[ { "answer_id": 70808, "author": "Roel", "author_id": 11449, "author_profile": "https://Stackoverflow.com/users/11449", "pm_score": 6, "selected": true, "text": "#define _BIND_TO_CURRENT_MFC_VERSION 1\n#define _BIND_TO_CURRENT_CRT_VERSION 1\n #define _BIND_TO_CURRENT_VCLIBS_VERSION 1\n _B...
2008/09/12
[ "https://Stackoverflow.com/questions/59642", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2723/" ]
59,648
<p>I am writing a program to simulate the actual polling data companies like Gallup or Rasmussen publish daily: <em><a href="http://www.gallup.com" rel="nofollow noreferrer">www.gallup.com</a></em> and <em><a href="http://www.rassmussenreports.com" rel="nofollow noreferrer">www.rassmussenreports.com</a></em></p> <p>I'm...
[ { "answer_id": 59662, "author": "Nick Stinemates", "author_id": 4960, "author_profile": "https://Stackoverflow.com/users/4960", "pm_score": 2, "selected": false, "text": ">>> a = [ ['a', 'b'], ['c', 'd'] ]\n>>> a[1]\n['c', 'd']\n>>> a[1][1]\n'd'\n" }, { "answer_id": 59663, "a...
2008/09/12
[ "https://Stackoverflow.com/questions/59648", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6163/" ]
59,651
<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="nof...
[ { "answer_id": 59662, "author": "Nick Stinemates", "author_id": 4960, "author_profile": "https://Stackoverflow.com/users/4960", "pm_score": 2, "selected": false, "text": ">>> a = [ ['a', 'b'], ['c', 'd'] ]\n>>> a[1]\n['c', 'd']\n>>> a[1][1]\n'd'\n" }, { "answer_id": 59663, "a...
2008/09/12
[ "https://Stackoverflow.com/questions/59651", "https://Stackoverflow.com", "https://Stackoverflow.com/users/730/" ]
59,653
<p>Is there a way to get at the ItemContaner of a selected item in a listbox? In Silverlight 2.0 Beta 1 I could, but the container is hidden in Beta 2 of Silverlight 2.0. </p> <p>I'm trying to resize the listbox item when it is unselected to a specific size and when selected to a variable size. I also want to get th...
[ { "answer_id": 86980, "author": "dcstraw", "author_id": 10391, "author_profile": "https://Stackoverflow.com/users/10391", "pm_score": 0, "selected": false, "text": "_ListBox.Items.Add(obj0);\n_ListBox.Items.Add(obj1);\n _ListBox.Items.Add(new ContentControl { Content = obj0 });\n_ListBox...
2008/09/12
[ "https://Stackoverflow.com/questions/59653", "https://Stackoverflow.com", "https://Stackoverflow.com/users/580/" ]
59,655
<p>Given a controller method like: </p> <pre><code>def show @model = Model.find(params[:id]) respond_to do |format| format.html # show.html.erb format.xml { render :xml =&gt; model } end end </code></pre> <p>What's the best way to write an integration test that asserts that the return has the expected...
[ { "answer_id": 59714, "author": "Michael Sepcot", "author_id": 6033, "author_profile": "https://Stackoverflow.com/users/6033", "pm_score": 0, "selected": false, "text": "@request.accept = 'text/xml' # or 'application/xml' I forget which\n assert_equal '<some>xml</some>', @response.body\n...
2008/09/12
[ "https://Stackoverflow.com/questions/59655", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4748/" ]
59,656
<p>Erasing programs such as Eraser recommend overwriting data maybe 36 times.</p> <p>As I understand it all data is stored on a hard drive as 1s or 0s.</p> <p>If an overwrite of random 1s and 0s is carried out once over the whole file then why isn't that enough to remove all traces of the original file?</p>
[ { "answer_id": 60193, "author": "Jesse C. Slicer", "author_id": 3312, "author_profile": "https://Stackoverflow.com/users/3312", "pm_score": 1, "selected": false, "text": "public static void DeleteGutmann(string fileName)\n{\n var fi = new FileInfo(fileName);\n\n if (!fi.Exists)\n ...
2008/09/12
[ "https://Stackoverflow.com/questions/59656", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6164/" ]
59,667
<p>I realize that CHAR is recommended if all my values are fixed-width. But, so what? Why not just pick VARCHAR for all text fields just to be safe.</p>
[ { "answer_id": 59729, "author": "Ethan Post", "author_id": 4527, "author_profile": "https://Stackoverflow.com/users/4527", "pm_score": 6, "selected": false, "text": "varchar char varchar varchar exists in CHAR" }, { "answer_id": 59756, "author": "Hank Gay", "author_id": 4...
2008/09/12
[ "https://Stackoverflow.com/questions/59667", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5592/" ]
59,670
<p>I'm working on an exceedingly large codebase, and recently upgraded to GCC 4.3, which now triggers this warning:</p> <blockquote> <p>warning: deprecated conversion from string constant to ‘char*’</p> </blockquote> <p>Obviously, the correct way to fix this is to find every declaration like</p> <pre><code>char *s = &q...
[ { "answer_id": 59690, "author": "Rob Walker", "author_id": 3631, "author_profile": "https://Stackoverflow.com/users/3631", "pm_score": 6, "selected": false, "text": "#pragma warning" }, { "answer_id": 59741, "author": "Konrad Rudolph", "author_id": 1968, "author_profi...
2008/09/12
[ "https://Stackoverflow.com/questions/59670", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3830/" ]
59,680
<p>In a LotusScript Agent that is being run via WebQueryOpen, how do you get the name of the current server?</p>
[ { "answer_id": 59683, "author": "Derek", "author_id": 5440, "author_profile": "https://Stackoverflow.com/users/5440", "pm_score": 3, "selected": false, "text": "Set s = New NotesSession\nSet db = s.CurrentDatabase\n\nIf db.Server <> \"\" Then\n Set sName = New NotesName(db.Server)\nElse...
2008/09/12
[ "https://Stackoverflow.com/questions/59680", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5440/" ]
59,711
<p>Is there an equivalent operator to Haskell's list difference operator <code>\\</code> in F#?</p>
[ { "answer_id": 59814, "author": "nlucaroni", "author_id": 157, "author_profile": "https://Stackoverflow.com/users/157", "pm_score": 3, "selected": false, "text": "\\ or || & && <OP >OP $OP = |OP &OP ^OP :: -OP +OP *OP /OP %OP\n\n**OP\n !OP ?OP ~OP -OP +OP % %% & &&\n" }, { "answe...
2008/09/12
[ "https://Stackoverflow.com/questions/59711", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4592/" ]
59,719
<p>I need to run a JavaScript function onLoad(), but only do it if the page loaded the first time (i.e. is not the result of a postback).</p> <p>Basically, I need to check for IsPostBack in JavaScript.</p> <p>Thank you.</p>
[ { "answer_id": 59727, "author": "FlySwat", "author_id": 1965, "author_profile": "https://Stackoverflow.com/users/1965", "pm_score": 0, "selected": false, "text": "if (this.IsPostBack)\n{\n Page.ClientScript.RegisterStartupScript(this.GetType(),\"PostbackKey\",\"<script type='text/java...
2008/09/12
[ "https://Stackoverflow.com/questions/59719", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3661/" ]
59,726
<p>Is there a way in .net 2.0 to discover the network alias for the machine that my code is running on? Specifically, if my workgroup sees my machine as //jekkedev01, how do I retrieve that name programmatically?</p>
[ { "answer_id": 229049, "author": "alexandrul", "author_id": 19756, "author_profile": "https://Stackoverflow.com/users/19756", "pm_score": 1, "selected": false, "text": "HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services\\lanmanserver\\parameters srvcomment REG_SZ (string) System.Env...
2008/09/12
[ "https://Stackoverflow.com/questions/59726", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5287/" ]
59,734
<p>My application is using <strong>Dojo 1.1.1</strong> on an <em>SSL-only</em> website. It is currently taking advantage of <code>dijit.ProgressBar</code> and a <code>dijit.form.DateTextBox</code>.</p> <p>Everything works fabulous in <em>Firefox 2 &amp; 3</em>, but as soon as I try the same scripts in <em>IE7</em> the...
[ { "answer_id": 72805, "author": "esarjeant", "author_id": 644, "author_profile": "https://Stackoverflow.com/users/644", "pm_score": 3, "selected": false, "text": "if(dojo.isIE){\n var html=\"<iframe src='javascript:\\\"\\\"'\"\n + \" style='position: absolute; left: 0px; top...
2008/09/12
[ "https://Stackoverflow.com/questions/59734", "https://Stackoverflow.com", "https://Stackoverflow.com/users/644/" ]
59,743
<p>How many possible combinations of the variables a,b,c,d,e are possible if I know that:</p> <pre><code>a+b+c+d+e = 500 </code></pre> <p>and that they are all integers and >= 0, so I know they are finite.</p>
[ { "answer_id": 59824, "author": "Jason Cohen", "author_id": 4926, "author_profile": "https://Stackoverflow.com/users/4926", "pm_score": 3, "selected": false, "text": "public static long getNumCombinations( int summands, int sum )\n{\n if ( summands <= 1 )\n return 1;\n long ...
2008/09/12
[ "https://Stackoverflow.com/questions/59743", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1815/" ]
59,761
<p>I need to disable specific keys (Ctrl and Backspace) in Internet Explorer 6. Is there a registry hack to do this. It has to be IE6. Thanks.</p> <p>Long Edit: </p> <p>@apandit: Whoops. I need to more specific about the backspace thing. When I say disable backspace, I mean disable the ability for Backspace to m...
[ { "answer_id": 59824, "author": "Jason Cohen", "author_id": 4926, "author_profile": "https://Stackoverflow.com/users/4926", "pm_score": 3, "selected": false, "text": "public static long getNumCombinations( int summands, int sum )\n{\n if ( summands <= 1 )\n return 1;\n long ...
2008/09/12
[ "https://Stackoverflow.com/questions/59761", "https://Stackoverflow.com", "https://Stackoverflow.com/users/78/" ]
59,766
<p>I thought jQuery Intellisense was supposed to be improved with SP1. I even downloaded an annotated version of jQuery 1.2.6, but intellisense will not work in a separate jscript file. I have the jQuery library referenced first on my web page in the &lt;head> tag. Am I doing anything wrong?</p>
[ { "answer_id": 59770, "author": "Jason Bunting", "author_id": 1790, "author_profile": "https://Stackoverflow.com/users/1790", "pm_score": 7, "selected": true, "text": "/// <reference path=\"jQuery.js\"/>\n" }, { "answer_id": 271359, "author": "JD Courtoy", "author_id": 23...
2008/09/12
[ "https://Stackoverflow.com/questions/59766", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1284/" ]
59,787
<p>How do you generate and analyze a thread dump from a running JBoss instance?</p>
[ { "answer_id": 11678609, "author": "user98761", "author_id": 98761, "author_profile": "https://Stackoverflow.com/users/98761", "pm_score": 1, "selected": false, "text": "Thread.getAllStackTraces()" }, { "answer_id": 16665089, "author": "Stephan", "author_id": 363573, ...
2008/09/12
[ "https://Stackoverflow.com/questions/59787", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4061/" ]
59,790
<p>I have been hearing the podcast blog for a while, I hope I dont break this. The question is this: I have to insert an xml to a database. This will be for already defined tables and fields. So what is the best way to accomplish this? So far I am leaning toward programatic. I have been seeing varios options, one is D...
[ { "answer_id": 60139, "author": "Scott Saad", "author_id": 4916, "author_profile": "https://Stackoverflow.com/users/4916", "pm_score": 2, "selected": false, "text": "declare @XmlDocumentHandle int\ndeclare @XmlDocument nvarchar(1000)\nset @XmlDocument = N'<ROOT>\n<Customer>\n <FirstNam...
2008/09/12
[ "https://Stackoverflow.com/questions/59790", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
59,819
<p>I would like to be able to define and use a custom type in some of my PowerShell scripts. For example, let's pretend I had a need for an object that had the following structure:</p> <pre><code>Contact { string First string Last string Phone } </code></pre> <p>How would I go about creating this so that ...
[ { "answer_id": 59887, "author": "David Mohundro", "author_id": 4570, "author_profile": "https://Stackoverflow.com/users/4570", "pm_score": 2, "selected": false, "text": "$contact = New-Object PSObject\n\n$contact | Add-Member -memberType NoteProperty -name \"First\" -value \"John\"\n$con...
2008/09/12
[ "https://Stackoverflow.com/questions/59819", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4916/" ]
59,825
<p>Suppose the following:</p> <pre><code>&gt;&gt;&gt; s = set([1, 2, 3]) </code></pre> <p>How do I get a value (any value) out of <code>s</code> without doing <code>s.pop()</code>? I want to leave the item in the set until I am sure I can remove it - something I can only be sure of after an asynchronous call to anoth...
[ { "answer_id": 59841, "author": "Blair Conrad", "author_id": 1199, "author_profile": "https://Stackoverflow.com/users/1199", "pm_score": 11, "selected": true, "text": "for e in s:\n break\n# e is now an element from s\n e = next(iter(s))\n" }, { "answer_id": 59928, "author...
2008/09/12
[ "https://Stackoverflow.com/questions/59825", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2260/" ]
59,829
<p>I have a radio button list on a page that is used to configure products. when the page loads the first time the first list of options is displayed. you select one of them then click a "Next Step" button and the page posts back and shows a new radio button list for step 2. Now if i click a "Previous Step" button i ca...
[ { "answer_id": 59835, "author": "ctrlShiftBryan", "author_id": 6161, "author_profile": "https://Stackoverflow.com/users/6161", "pm_score": 0, "selected": false, "text": "AutoEventWireup = False" }, { "answer_id": 413434, "author": "netseng", "author_id": 32718, "autho...
2008/09/12
[ "https://Stackoverflow.com/questions/59829", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
59,832
<p>I am currently calling the following line of code:</p> <pre><code>java.net.URL connection_url = new java.net.URL("http://&lt;ip address&gt;:&lt;port&gt;/path"); </code></pre> <p>and I get the exception above when it executes. Any ideas as to why this is happening?</p>
[ { "answer_id": 59960, "author": "matt b", "author_id": 4249, "author_profile": "https://Stackoverflow.com/users/4249", "pm_score": 3, "selected": true, "text": "public static void main(String[] args) {\n try {\n java.net.URL connection_url = new java.net.URL(\"http://:/path\");...
2008/09/12
[ "https://Stackoverflow.com/questions/59832", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2328/" ]
59,838
<p>What command checks if a directory exists or not within a Bash shell script?</p>
[ { "answer_id": 59839, "author": "Grundlefleck", "author_id": 4120, "author_profile": "https://Stackoverflow.com/users/4120", "pm_score": 13, "selected": true, "text": "if [ -d \"$DIRECTORY\" ]; then\n echo \"$DIRECTORY does exist.\"\nfi\n if [ ! -d \"$DIRECTORY\" ]; then\n echo \"$DIRE...
2008/09/12
[ "https://Stackoverflow.com/questions/59838", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4120/" ]
59,850
<p>I'd like to create a spring bean that holds the value of a double. Something like:</p> <pre><code>&lt;bean id="doubleValue" value="3.7"/&gt; </code></pre>
[ { "answer_id": 59875, "author": "Pavel Feldman", "author_id": 5507, "author_profile": "https://Stackoverflow.com/users/5507", "pm_score": 5, "selected": true, "text": "<bean id=\"doubleValue\" class=\"java.lang.Double\">\n <constructor-arg index=\"0\" value=\"3.7\"/>\n</bean>\n <bean i...
2008/09/12
[ "https://Stackoverflow.com/questions/59850", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6180/" ]
59,857
<p>Should I use a dedicated network channel between the database and the application server?</p> <p>...or... </p> <p>Connecting both in the switch along with all other computer nodes makes no diference at all?</p> <p>The matter is <strong>performance!</strong></p>
[ { "answer_id": 59875, "author": "Pavel Feldman", "author_id": 5507, "author_profile": "https://Stackoverflow.com/users/5507", "pm_score": 5, "selected": true, "text": "<bean id=\"doubleValue\" class=\"java.lang.Double\">\n <constructor-arg index=\"0\" value=\"3.7\"/>\n</bean>\n <bean i...
2008/09/12
[ "https://Stackoverflow.com/questions/59857", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1100/" ]
59,880
<p>Conventional wisdom states that stored procedures are always faster. So, since they're always faster, use them <strong>ALL THE TIME</strong>.</p> <p>I am pretty sure this is grounded in some historical context where this was once the case. Now, I'm not advocating that Stored Procs are not needed, but I want to know...
[ { "answer_id": 59932, "author": "Matt Rogish", "author_id": 2590, "author_profile": "https://Stackoverflow.com/users/2590", "pm_score": 9, "selected": true, "text": "SELECT *\n FROM table WHERE id BETWEEN 1 AND\n 99999999 SELECT * FROM table WHERE id BETWEEN\n 1 AND 2 SELECT .. FROM y...
2008/09/12
[ "https://Stackoverflow.com/questions/59880", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5619/" ]
59,895
<p>How do I get the path of the directory in which a <a href="http://en.wikipedia.org/wiki/Bash_%28Unix_shell%29" rel="noreferrer">Bash</a> script is located, <em>inside</em> that script?</p> <p>I want to use a Bash script as a launcher for another application. I want to change the working directory to the one where th...
[ { "answer_id": 59916, "author": "matt b", "author_id": 4249, "author_profile": "https://Stackoverflow.com/users/4249", "pm_score": 10, "selected": false, "text": "dirname \"$0\" #!/usr/bin/env bash\n\necho \"The script you are running has basename $( basename -- \"$0\"; ), dirname $( dir...
2008/09/12
[ "https://Stackoverflow.com/questions/59895", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2908/" ]
59,896
<p>I have a page that uses </p> <pre><code>$(id).show("highlight", {}, 2000); </code></pre> <p>to highlight an element when I start a ajax request, that might fail so that I want to use something like</p> <pre><code>$(id).show("highlight", {color: "#FF0000"}, 2000); </code></pre> <p>in the error handler. The proble...
[ { "answer_id": 59904, "author": "Ryan Lanciaux", "author_id": 1385358, "author_profile": "https://Stackoverflow.com/users/1385358", "pm_score": 5, "selected": true, "text": ".stop() .slideUp() .stop() .stop() clearQueue true jumpToEnd .slideUp()" }, { "answer_id": 10280784, "...
2008/09/12
[ "https://Stackoverflow.com/questions/59896", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6093/" ]
59,942
<p>I started a project a long time ago and created a <strong>Data Access Layer</strong> project in my solution but have never developed anything in it. What is the purpose of a data access layer? Are there any good sources that I could learn more about the Data Access Layer?</p>
[ { "answer_id": 4237176, "author": "Shiv Kumar", "author_id": 501146, "author_profile": "https://Stackoverflow.com/users/501146", "pm_score": 5, "selected": false, "text": "GetOrdersForCustomer(42)\n" } ]
2008/09/12
[ "https://Stackoverflow.com/questions/59942", "https://Stackoverflow.com", "https://Stackoverflow.com/users/299/" ]
59,945
<p>We can successfully consume a .NET 2.0 web service from a Flex/AS3 application. Aside from SSL, how else can we make the security more robust (i.e., authentication)?</p>
[ { "answer_id": 196130, "author": "matt eisenberg", "author_id": 14654, "author_profile": "https://Stackoverflow.com/users/14654", "pm_score": 2, "selected": false, "text": "<EnableSession()>" } ]
2008/09/12
[ "https://Stackoverflow.com/questions/59945", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5592/" ]
59,986
<p>I have a simple type that explicitly implemets an Interface.</p> <pre><code>public interface IMessageHeader { string FromAddress { get; set; } string ToAddress { get; set; } } [Serializable] public class MessageHeader:IMessageHeader { private string from; private string to; [XmlAttribute("From")] ...
[ { "answer_id": 59993, "author": "Brannon", "author_id": 5745, "author_profile": "https://Stackoverflow.com/users/5745", "pm_score": 0, "selected": false, "text": "XmlSerializer ser = new XmlSerializer(typeof(IMessageHeader));\n\nIMessageHeader header = (IMessageHeader)ser.Deserialize(dat...
2008/09/12
[ "https://Stackoverflow.com/questions/59986", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1647/" ]
60,000
<p>In C++, can member function pointers be used to point to derived (or even base) class members? </p> <p>EDIT: Perhaps an example will help. Suppose we have a hierarchy of three classes <code>X</code>, <code>Y</code>, <code>Z</code> in order of inheritance. <code>Y</code> therefore has a base class <code>X</code> a...
[ { "answer_id": 60023, "author": "Matt Price", "author_id": 852, "author_profile": "https://Stackoverflow.com/users/852", "pm_score": 4, "selected": false, "text": "#include <iostream>\nusing namespace std;\n\nclass A { \npublic:\n virtual void foo() { cout << \"A::foo\\n\"; }\n};\ncla...
2008/09/12
[ "https://Stackoverflow.com/questions/60000", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1077/" ]
60,009
<p>I've been playing with RSS feeds this week, and for my next trick I want to build one for our internal application log. We have a centralized database table that our myriad batch and intranet apps use for posting log messages. I want to create an RSS feed off of this table, but I'm not sure how to handle the volum...
[ { "answer_id": 421550, "author": "Steve Losh", "author_id": 13498, "author_profile": "https://Stackoverflow.com/users/13498", "pm_score": 1, "selected": false, "text": "r'/rss/(?(\\w*?)/)+' def get_batch_file_messages():\n # Grab all the recent batch files messages here.\n # Maybe ...
2008/09/12
[ "https://Stackoverflow.com/questions/60009", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3043/" ]
60,019
<p>I am wanting to use ActiveScaffold to create <em>assignment</em> records for several <em>students</em> in a single step. The records will all contain identical data, with the exception of the student_id.</p> <p>I was able to override the default form and replace the dropdown box for selecting the student name with...
[ { "answer_id": 60366, "author": "Can Berk Güder", "author_id": 2119, "author_profile": "https://Stackoverflow.com/users/2119", "pm_score": 0, "selected": false, "text": "has_many :students has_and_belongs_to_many :students" }, { "answer_id": 295986, "author": "ARemesal", ...
2008/09/12
[ "https://Stackoverflow.com/questions/60019", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3764/" ]
60,030
<p>In Firefox you can enter the following into the awesome bar and hit enter:</p> <pre><code>javascript:self.resizeTo(1024,768); </code></pre> <p>How do you do the same thing in IE?</p>
[ { "answer_id": 60038, "author": "Ross", "author_id": 2025, "author_profile": "https://Stackoverflow.com/users/2025", "pm_score": 2, "selected": false, "text": "javascript:resizeTo(1024,768);\n" }, { "answer_id": 60209, "author": "Tolle", "author_id": 4260, "author_pro...
2008/09/12
[ "https://Stackoverflow.com/questions/60030", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1496/" ]
60,032
<p>How do I get the key of the current element in a <code>foreach</code> loop in C#?</p> <p>For example:</p> <h2>PHP</h2> <pre><code>foreach ($array as $key =&gt; $value) { echo("$value is assigned to key: $key"); } </code></pre> <h3>What I'm trying to do in C#:</h3> <pre><code>int[] values = { 5, 14, 29, 49, ...
[ { "answer_id": 60047, "author": "Billy Jo", "author_id": 3447, "author_profile": "https://Stackoverflow.com/users/3447", "pm_score": -1, "selected": false, "text": "myKey = Array.IndexOf(values, val);" }, { "answer_id": 60058, "author": "Tyler", "author_id": 5642, "au...
2008/09/12
[ "https://Stackoverflow.com/questions/60032", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2025/" ]
60,033
<p>I want to make a copy of an ActiveRecord object, changing a single field in the process (in addition to the <strong>id</strong>). What is the simplest way to accomplish this?</p> <p>I realize I could create a new record, and then iterate over each of the fields copying the data field-by-field - but I figured there ...
[ { "answer_id": 60053, "author": "Michael Sepcot", "author_id": 6033, "author_profile": "https://Stackoverflow.com/users/6033", "pm_score": 10, "selected": true, "text": "#rails >= 3.1\nnew_record = old_record.dup\n\n# rails < 3.1\nnew_record = old_record.clone\n" }, { "answer_id"...
2008/09/12
[ "https://Stackoverflow.com/questions/60033", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3764/" ]
60,034
<p>I am writing a batch file script using Windows command-line environment and want to change each occurrence of some text in a file (ex. "FOO") with another (ex. "BAR"). What is the simplest way to do that? Any built in functions?</p>
[ { "answer_id": 60055, "author": "Ferruccio", "author_id": 4086, "author_profile": "https://Stackoverflow.com/users/4086", "pm_score": 5, "selected": false, "text": "sed sed sed -c s/FOO/BAR/g filename\n" }, { "answer_id": 60065, "author": "Mike Schall", "author_id": 4231,...
2008/09/12
[ "https://Stackoverflow.com/questions/60034", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4872/" ]
60,046
<p>I'm embedding the Google Maps Flash API in Flex and it runs fine locally with the watermark on it, etc. When I upload it to the server (flex.mydomain.com) I get a sandbox security error listed below: </p> <pre><code>SecurityError: Error #2121: Security sandbox violation: Loader.content: http://mydomain.com/main....
[ { "answer_id": 60453, "author": "Till", "author_id": 2859, "author_profile": "https://Stackoverflow.com/users/2859", "pm_score": 2, "selected": false, "text": "crossdomain.xml" } ]
2008/09/12
[ "https://Stackoverflow.com/questions/60046", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4760/" ]
60,051
<p>My question is pertaining to the best practice for accessing a child object's parent. So let's say a class instantiates another class, that class instance is now referenced with an object. From that child object, what is the best way to reference back to the parent object? Currently I know of a couple ways that I us...
[ { "answer_id": 64085, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 1, "selected": false, "text": "private static const class:Class;\n\npublic static function setClass(_class:Class){\nclass = _class;\n}\npublic static function...
2008/09/12
[ "https://Stackoverflow.com/questions/60051", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1945/" ]
60,070
<p>I am currently in an operating systems class and my teacher spent half of the class period talking about PIDs. She mentioned, as many know, that processes know their parent's ID.</p> <p>My question is this:</p> <p>Does a process's PCB know its child's ID? If so, what is the way to go about it obtaining it?</p>
[ { "answer_id": 60075, "author": "wvdschel", "author_id": 2018, "author_profile": "https://Stackoverflow.com/users/2018", "pm_score": 2, "selected": false, "text": "fork()" } ]
2008/09/12
[ "https://Stackoverflow.com/questions/60070", "https://Stackoverflow.com", "https://Stackoverflow.com/users/73/" ]
60,093
<p>I have a c# asp.net web app. Breakpoints in the database layer are no longer stopping execution but the breakpoints in the UI layer are still working okay. Can anyone hazard a guess why this might be happening?</p> <p>I've checked all the usual suspects (Debug build is on for all projects) and recompiled all projec...
[ { "answer_id": 60106, "author": "Tyler", "author_id": 5642, "author_profile": "https://Stackoverflow.com/users/5642", "pm_score": 1, "selected": false, "text": "Modules View .dlls .PDBs .PDBs .dlls" }, { "answer_id": 1234258, "author": "Jack Marchetti", "author_id": 11765...
2008/09/12
[ "https://Stackoverflow.com/questions/60093", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1463/" ]
60,098
<p>I wrote a simple web service in C# using SharpDevelop (which I just got and I love).</p> <p>The client wanted it in VB, and fortunately there's a Convert To VB.NET feature. It's great. Translated all the code, and it builds. (I've been a "Notepad" guy for a long time, so I may seem a little old-fashioned.)</p> ...
[ { "answer_id": 60108, "author": "FlySwat", "author_id": 1965, "author_profile": "https://Stackoverflow.com/users/1965", "pm_score": 0, "selected": false, "text": "<%@ WebService Class=\"flightinfo.Soap,flightinfo\" %>\n" }, { "answer_id": 201092, "author": "csgero", "auth...
2008/09/12
[ "https://Stackoverflow.com/questions/60098", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4525/" ]
60,160
<p>Does Java have a built-in way to escape arbitrary text so that it can be included in a regular expression? For example, if my users enter "$5", I'd like to match that exactly rather than a "5" after the end of input.</p>
[ { "answer_id": 60161, "author": "Mike Stone", "author_id": 122, "author_profile": "https://Stackoverflow.com/users/122", "pm_score": 10, "selected": true, "text": "Pattern.quote(\"$5\");\n" }, { "answer_id": 60164, "author": "Rob Oxspring", "author_id": 1867, "author_...
2008/09/12
[ "https://Stackoverflow.com/questions/60160", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2338/" ]
60,168
<p>Here is an example of what I've got going on:</p> <pre><code>CREATE TABLE Parent (id BIGINT NOT NULL, PRIMARY KEY (id)) ENGINE=InnoDB; CREATE TABLE Child (id BIGINT NOT NULL, parentid BIGINT NOT NULL, PRIMARY KEY (id), KEY (parentid), CONSTRAINT fk_parent FOREIGN KEY (parentid) REFERENCES Parent (id) ON ...
[ { "answer_id": 60229, "author": "Tony BenBrahim", "author_id": 80075, "author_profile": "https://Stackoverflow.com/users/80075", "pm_score": -1, "selected": false, "text": "\nselect id from persons where -find all children of the grandparents\nparent id in (\n select parentid from per...
2008/09/12
[ "https://Stackoverflow.com/questions/60168", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6198/" ]
60,174
<p>If user input is inserted without modification into an SQL query, then the application becomes vulnerable to <a href="https://stackoverflow.com/a/332367/">SQL injection</a>, like in the following example:</p> <pre class="lang-php prettyprint-override"><code>$unsafe_variable = $_POST['user_input']; mysql_query("IN...
[ { "answer_id": 60180, "author": "Kibbee", "author_id": 1862, "author_profile": "https://Stackoverflow.com/users/1862", "pm_score": 10, "selected": false, "text": "mysql_ mysqli_ pgsql_" }, { "answer_id": 60195, "author": "Tanerax", "author_id": 567, "author_profile": ...
2008/09/12
[ "https://Stackoverflow.com/questions/60174", "https://Stackoverflow.com", "https://Stackoverflow.com/users/428190/" ]
60,204
<p>I was going to ask a question here about whether or not my design for some users/roles database tables was acceptable, but after some research I came across this question:</p> <p><a href="/questions/1451/what-is-the-best-way-to-handle-multiple-permission-types">What is the best way to handle multiple permission typ...
[ { "answer_id": 60206, "author": "Josef", "author_id": 5581, "author_profile": "https://Stackoverflow.com/users/5581", "pm_score": 2, "selected": false, "text": "EXISTS JOIN" }, { "answer_id": 60228, "author": "Brannon", "author_id": 5745, "author_profile": "https://St...
2008/09/13
[ "https://Stackoverflow.com/questions/60204", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
60,208
<p>I want to write a function in Python that returns different fixed values based on the value of an input index. </p> <p>In other languages I would use a <code>switch</code> or <code>case</code> statement, but Python does not appear to have a <code>switch</code> statement. What are the recommended Python solutions ...
[ { "answer_id": 60211, "author": "Greg Hewgill", "author_id": 893, "author_profile": "https://Stackoverflow.com/users/893", "pm_score": 12, "selected": true, "text": "match case def f(x):\n match x:\n case 'a':\n return 1\n case 'b':\n return 2\n ...
2008/09/13
[ "https://Stackoverflow.com/questions/60208", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4907/" ]
60,221
<p>I have always wondered how people update a previous line in a command line. a great example of this is when using the wget command in linux. It creates an ASCII loading bar of sorts that looks like this:</p> <blockquote> <p>[======>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs...
[ { "answer_id": 60226, "author": "hazzen", "author_id": 5066, "author_profile": "https://Stackoverflow.com/users/5066", "pm_score": 7, "selected": true, "text": "curses void DrawProgressBar(int len, double percent) {\n cout << \"\\x1B[2K\"; // Erase the entire current line.\n cout << \"...
2008/09/13
[ "https://Stackoverflow.com/questions/60221", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2128/" ]
60,244
<p>I need to join two binary files with a <code>*.bat</code> script on Windows.</p> <p>How can I achieve that?</p>
[ { "answer_id": 60248, "author": "Greg Hewgill", "author_id": 893, "author_profile": "https://Stackoverflow.com/users/893", "pm_score": 7, "selected": false, "text": "copy /b copy /b file1+file2 destfile\n" }, { "answer_id": 60249, "author": "simon", "author_id": 6040, ...
2008/09/13
[ "https://Stackoverflow.com/questions/60244", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2313/" ]
60,259
<p>Every sample that I have seen uses static XML in the xmldataprovider source, which is then used to databind UI controls using XPath binding. Idea is to edit a dynamic XML (structure known to the developer during coding), using the WPF UI.</p> <p>Has anyone found a way to load a dynamic xml string (for example load...
[ { "answer_id": 395358, "author": "Paul Osterhout", "author_id": 30976, "author_profile": "https://Stackoverflow.com/users/30976", "pm_score": 3, "selected": true, "text": "XmlDataProvider provider = new XmlDataProvider();\n\nif (provider != null)\n{\n System.Xml.XmlDocument doc = new Sy...
2008/09/13
[ "https://Stackoverflow.com/questions/60259", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1747/" ]
60,260
<p>I've been working through <a href="http://gigamonkeys.com/book" rel="nofollow noreferrer">Practical Common Lisp</a> and as an exercise decided to write a macro to determine if a number is a multiple of another number:</p> <p><code>(defmacro multp (value factor)<br> `(= (rem ,value ,factor) 0))</code></p> <p>so...
[ { "answer_id": 60267, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 5, "selected": true, "text": "value factor rem (defun multp (value factor)\n (zerop (rem value factor)))\n zerop (= ... 0)" }, { "answer_id": 81824, ...
2008/09/13
[ "https://Stackoverflow.com/questions/60260", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5303/" ]
60,269
<p>How do I implement a draggable tab using Java Swing? Instead of the static JTabbedPane I would like to drag-and-drop a tab to different position to rearrange the tabs.</p> <p><strong>EDIT</strong>: <a href="http://java.sun.com/docs/books/tutorial/uiswing/dnd/index.html" rel="noreferrer">The Java Tutorials - Drag an...
[ { "answer_id": 60279, "author": "jodonnell", "author_id": 4223, "author_profile": "https://Stackoverflow.com/users/4223", "pm_score": 3, "selected": false, "text": "class DnDTabbedPane extends JTabbedPane {\n private static final int LINEWIDTH = 3;\n private static final String NAME = ...
2008/09/13
[ "https://Stackoverflow.com/questions/60269", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3827/" ]
60,271
<p>What is the best way to write a Safari extension? I've written a couple XUL extensions for Firefox, and now I'd like to write versions of them for Safari. Is there a way that would allow you to add buttons or forms to the browser UI, since this is not possible with an Input manager or Service menu?</p>
[ { "answer_id": 1256724, "author": "Quinn Taylor", "author_id": 120292, "author_profile": "https://Stackoverflow.com/users/120292", "pm_score": 3, "selected": false, "text": "/Library/Internet Plug-ins/" } ]
2008/09/13
[ "https://Stackoverflow.com/questions/60271", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4939/" ]
60,278
<p>In all the Git tutorials I've read they say that you can do:</p> <pre><code>git init git add . git commit </code></pre> <p>When I do that I get a big text file opened up. None of the tutorials seem to address this, so I don't know what to do with the file or what to put in it if anything.</p>
[ { "answer_id": 60283, "author": "Ben Collins", "author_id": 3279, "author_profile": "https://Stackoverflow.com/users/3279", "pm_score": 3, "selected": false, "text": "git commit EDITOR" }, { "answer_id": 60284, "author": "Greg Hewgill", "author_id": 893, "author_profi...
2008/09/13
[ "https://Stackoverflow.com/questions/60278", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
60,285
<p>If it's possible, I'm interested in being able to embed a PostgreSQL database, similar to <a href="http://www.sqlite.org/" rel="noreferrer">sqllite</a>. I've read that it's <a href="http://bytes.com/forum/thread647637.html" rel="noreferrer">not possible</a>. I'm no database expert though, so I want to hear from yo...
[ { "answer_id": 69473393, "author": "elikesprogramming", "author_id": 5141196, "author_profile": "https://Stackoverflow.com/users/5141196", "pm_score": 0, "selected": false, "text": "R duckdb" } ]
2008/09/13
[ "https://Stackoverflow.com/questions/60285", "https://Stackoverflow.com", "https://Stackoverflow.com/users/525/" ]
60,290
<p>Is there a way to change the appearance of an icon (ie. contrast / luminosity) when I hover the cursor, without requiring a second image file (or without requiring a hidden portion of the image)?</p>
[ { "answer_id": 60295, "author": "Paige Ruten", "author_id": 813, "author_profile": "https://Stackoverflow.com/users/813", "pm_score": 4, "selected": true, "text": "<img src=\"image.png\" style=\"opacity: 0.5; filter: alpha(opacity=50)\" />\n" }, { "answer_id": 60322, "author"...
2008/09/13
[ "https://Stackoverflow.com/questions/60290", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3764/" ]
60,293
<p>I have a little problem with a Listview.</p> <p>I can load it with listview items fine, but when I set the background color it doesn't draw the color all the way to the left side of the row [The listViewItems are loaded with ListViewSubItems to make a grid view, only the first column shows the error]. There is a a...
[ { "answer_id": 60339, "author": "moobaa", "author_id": 3569, "author_profile": "https://Stackoverflow.com/users/3569", "pm_score": 4, "selected": true, "text": " ...\n lv.OwnerDraw = true;\n lv.DrawItem += new DrawListViewItemEventHandler( lv_DrawItem );\n ...\n\nvoid lv_Draw...
2008/09/13
[ "https://Stackoverflow.com/questions/60293", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1327/" ]
60,302
<p>If I start a process via Java's <a href="http://java.sun.com/javase/6/docs/api/java/lang/ProcessBuilder.html" rel="noreferrer">ProcessBuilder</a> class, I have full access to that process's standard in, standard out, and standard error streams as Java <code>InputStreams</code> and <code>OutputStreams</code>. However...
[ { "answer_id": 60578, "author": "John Meagher", "author_id": 3535, "author_profile": "https://Stackoverflow.com/users/3535", "pm_score": 5, "selected": true, "text": "// Assume you already have a processBuilder all configured and ready to go\nfinal Process process = processBuilder.start(...
2008/09/13
[ "https://Stackoverflow.com/questions/60302", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5696/" ]
60,352
<p>If all of my <code>__init__.py</code> files are empty, do I have to store them into version control, or is there a way to make <code>distutils</code> create empty <code>__init__.py</code> files during installation?</p>
[ { "answer_id": 60431, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 3, "selected": false, "text": "__init__.py __init__.py" }, { "answer_id": 60506, "author": "dF.", "author_id": 3002, "author_profile": "ht...
2008/09/13
[ "https://Stackoverflow.com/questions/60352", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2679/" ]
60,360
<p>What experience can you share about using multiple AJAX libraries?</p> <p>There are useful features in Prototype, some in jQuery, the Yahoo library, etc. Is it possible to include all libraries and use what you want from each, do they generally all play nicely together with name spaces, etc. For the sake of speed i...
[ { "answer_id": 60432, "author": "Till", "author_id": 2859, "author_profile": "https://Stackoverflow.com/users/2859", "pm_score": 2, "selected": false, "text": "$('#foobar').whatever();\n var jq = jQuery.noConflict();\njq('#foobar').whatever();\n" }, { "answer_id": 61881, "aut...
2008/09/13
[ "https://Stackoverflow.com/questions/60360", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4639/" ]
60,369
<p>I'm currently playing around with <a href="http://pear.php.net/package/HTML_QuickForm" rel="noreferrer">HTML_QuickForm</a> for generating forms in PHP. It seems kind of limited in that it's hard to insert my own javascript or customizing the display and grouping of certain elements.</p> <p>Are there any alternativ...
[ { "answer_id": 60372, "author": "Konrad Rudolph", "author_id": 1968, "author_profile": "https://Stackoverflow.com/users/1968", "pm_score": 4, "selected": true, "text": "$('myFormControl').observe('click', myClickFunction)\n" }, { "answer_id": 62035, "author": "Andrew Taylor",...
2008/09/13
[ "https://Stackoverflow.com/questions/60369", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4883/" ]
60,409
<p>I know in php you can embed variables inside variables, like:</p> <pre><code>&lt;? $var1 = "I\'m including {$var2} in this variable.."; ?&gt; </code></pre> <p>But I was wondering how, and if it was possible to include a function inside a variable. I know I could just write:</p> <pre><code>&lt;?php $var1 = "I\'m i...
[ { "answer_id": 60420, "author": "Jason Weathered", "author_id": 3736, "author_profile": "https://Stackoverflow.com/users/3736", "pm_score": 6, "selected": true, "text": "<?\nfunction somefunc($stuff)\n{\n $output = \"<b>{$stuff}</b>\";\n return $output;\n}\n$somefunc='somefunc';\ne...
2008/09/13
[ "https://Stackoverflow.com/questions/60409", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4867/" ]
60,438
<p>I am using jQuery. I call a JavaScript function with next html:</p> <pre><code>&lt;li&gt;&lt;span&gt;&lt;a href="javascript:uncheckEl('tagVO-$id')"&gt;$tagname&lt;/a&gt;&lt;/span&gt;&lt;/li&gt; </code></pre> <p>I would like to remove the <code>li</code> element and I thought this would be easy with the <code>$(thi...
[ { "answer_id": 60449, "author": "Till", "author_id": 2859, "author_profile": "https://Stackoverflow.com/users/2859", "pm_score": 3, "selected": true, "text": "<li> function unCheckEl(id, ref) {\n (...)\n $(ref).parent().parent().hide(); // this should be your <li>\n}\n <a href=\"javasc...
2008/09/13
[ "https://Stackoverflow.com/questions/60438", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2138/" ]
60,455
<p>Is it possible to to take a screenshot of a webpage with JavaScript and then submit that back to the server?</p> <p>I'm not so concerned with browser security issues. etc. as the implementation would be for <a href="http://msdn.microsoft.com/en-us/library/ms536471(vs.85).aspx" rel="noreferrer">HTA</a>. But is it po...
[ { "answer_id": 63506, "author": "Joel Anair", "author_id": 7441, "author_profile": "https://Stackoverflow.com/users/7441", "pm_score": 6, "selected": true, "text": "Declare Sub keybd_event Lib \"user32\" _\n(ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo...
2008/09/13
[ "https://Stackoverflow.com/questions/60455", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1915/" ]
60,456
<p>I have this in a page :</p> <pre><code>&lt;textarea id="taEditableContent" runat="server" rows="5"&gt;&lt;/textarea&gt; &lt;ajaxToolkit:DynamicPopulateExtender ID="dpeEditPopulate" runat="server" TargetControlID="taEditableContent" ClearContentsDuringUpdate="true" PopulateTriggerControlID="hLink" ServicePat...
[ { "answer_id": 321353, "author": "csgero", "author_id": 21764, "author_profile": "https://Stackoverflow.com/users/21764", "pm_score": 1, "selected": false, "text": "xml:space=\"preserve\" xmlns:xml=\"http://www.w3.org/XML/1998/namespace\"" } ]
2008/09/13
[ "https://Stackoverflow.com/questions/60456", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3263/" ]
60,464
<p>I am fairly new to Emacs and I have been trying to figure out how to change the default folder for <kbd>C-x C-f</kbd> on start-up. For instance when I first load Emacs and hit <kbd>C-x C-f</kbd> its default folder is <code>C:\emacs\emacs-21.3\bin</code>, but I would rather it be the desktop. I believe there is some ...
[ { "answer_id": 60481, "author": "vava", "author_id": 6258, "author_profile": "https://Stackoverflow.com/users/6258", "pm_score": 5, "selected": false, "text": "(cd \"c:/cvsroot/\")\n" }, { "answer_id": 60482, "author": "Bart", "author_id": 4343, "author_profile": "htt...
2008/09/13
[ "https://Stackoverflow.com/questions/60464", "https://Stackoverflow.com", "https://Stackoverflow.com/users/340/" ]
60,470
<p>If I'm running a signed Java applet. Can I load additional classes from remote sources, in the same domain or maybe even the same host, and run them?</p> <p>I'd like to do this without changing pages or even stopping the current applet. Of course, the total size of all classes is too large to load them all at once....
[ { "answer_id": 60615, "author": "jassuncao", "author_id": 1009, "author_profile": "https://Stackoverflow.com/users/1009", "pm_score": 4, "selected": true, "text": "ClassLoader loader = this.getClass().getClassLoader();\nClass clazz = loader.loadClass(\"acme.AppletAddon\");\n URL[] urls =...
2008/09/13
[ "https://Stackoverflow.com/questions/60470", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
60,507
<p>Say I have:</p> <pre><code>void Render(void(*Call)()) { D3dDevice-&gt;BeginScene(); Call(); D3dDevice-&gt;EndScene(); D3dDevice-&gt;Present(0,0,0,0); } </code></pre> <p>This is fine as long as the function I want to use to render is a function or a <code>static</code> member function:</p> <pre><co...
[ { "answer_id": 60512, "author": "mweerden", "author_id": 4285, "author_profile": "https://Stackoverflow.com/users/4285", "pm_score": 2, "selected": false, "text": "void Wrap(T *t) t->Call() Render void Wrap(T *t)\n{\n t->Call();\n}\n\nvoid Render(void (*f)(T *), T *t)\n{\n ...\n f(t);...
2008/09/13
[ "https://Stackoverflow.com/questions/60507", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6266/" ]
60,516
<p>I'm using a few (2 or 3) master pages in my ASP.NET MVC application and they must each display bits of information from the database. Such as a list of sponsors, current fundings status etc.</p> <p>So my question was, where should I put these master-page database calling code?</p> <p>Normally, these should goes in...
[ { "answer_id": 66806, "author": "Dane O'Connor", "author_id": 1946, "author_profile": "https://Stackoverflow.com/users/1946", "pm_score": 0, "selected": false, "text": "protected override ViewResult View(string viewName, string masterName, object model)\n{\n if (model == null)\n {\...
2008/09/13
[ "https://Stackoverflow.com/questions/60516", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3055/" ]
60,558
<p>I need to do some emulation of some old DOS or mainframe terminals in Flex. Something like the image below for example.</p> <p><img src="https://i.stack.imgur.com/qFtvP.png" alt="alt text"></p> <p>The different coloured text is easy enough, but the ability to do different background colours, such as the yellow bac...
[ { "answer_id": 60595, "author": "Theo", "author_id": 1109, "author_profile": "https://Stackoverflow.com/users/1109", "pm_score": 2, "selected": false, "text": "TextField.getCharBoundaries Shape var firstCharBounds : Rectangle = textField.getCharBoundaries(firstCharIndex);\nvar lastCharBo...
2008/09/13
[ "https://Stackoverflow.com/questions/60558", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6277/" ]
60,565
<p>I have a Visual Studio Setup Project that I use to install a fairly simple WinForms application. At the end of the install I have a custom user interface page that shows a single check box which asks the user if they want to run the application. I've seen other installers do this quite often. But I cannot find a way...
[ { "answer_id": 7396841, "author": "Grub", "author_id": 723459, "author_profile": "https://Stackoverflow.com/users/723459", "pm_score": 0, "selected": false, "text": "(typeof(ClassWithinAssemblyToExecute)).Assembly.EntryPoint.Invoke(null, new Object[] {} )\n" } ]
2008/09/13
[ "https://Stackoverflow.com/questions/60565", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6276/" ]
60,569
<p>I want something that looks like a file handle but is really backed by an in-memory buffer to use for I/O redirects. How can I do this?</p>
[ { "answer_id": 65211, "author": "Chris Smith", "author_id": 9073, "author_profile": "https://Stackoverflow.com/users/9073", "pm_score": 1, "selected": false, "text": "/libraries/base/IOBase.lhs" }, { "answer_id": 1047220, "author": "cjs", "author_id": 107294, "author_...
2008/09/13
[ "https://Stackoverflow.com/questions/60569", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5304/" ]
60,570
<p>Backgrounder:</p> <p>The <a href="http://en.wikipedia.org/wiki/Opaque_pointer" rel="noreferrer">PIMPL Idiom</a> (Pointer to IMPLementation) is a technique for implementation hiding in which a public class wraps a structure or class that cannot be seen outside the library the public class is part of.</p> <p>This hi...
[ { "answer_id": 60605, "author": "Xavier Nodet", "author_id": 4177, "author_profile": "https://Stackoverflow.com/users/4177", "pm_score": 6, "selected": true, "text": "Purr() CatImpl Cat::Purr() friend" }, { "answer_id": 60618, "author": "JeffV", "author_id": 445087, "...
2008/09/13
[ "https://Stackoverflow.com/questions/60570", "https://Stackoverflow.com", "https://Stackoverflow.com/users/445087/" ]
60,573
<p>Using C# .NET 2.0, I have a composite data class that does have the <code>[Serializable]</code> attribute on it. I am creating an <code>XMLSerializer</code> class and passing that into the constructor:</p> <pre><code>XmlSerializer serializer = new XmlSerializer(typeof(DataClass)); </code></pre> <p>I am getting an...
[ { "answer_id": 60581, "author": "Lamar", "author_id": 3566, "author_profile": "https://Stackoverflow.com/users/3566", "pm_score": 10, "selected": true, "text": "[XmlIgnore] XmlSerializer [Serializable]" }, { "answer_id": 60596, "author": "Gulzar Nazim", "author_id": 4337,...
2008/09/13
[ "https://Stackoverflow.com/questions/60573", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4653/" ]
60,585
<p>I'm running PHP, Apache, and Windows. I do not have a domain setup, so I would like my website's forms-based authentication to use the local user accounts database built in to Windows (I think it's called SAM).</p> <p>I know that if Active Directory is setup, you can use the PHP LDAP module to connect and authenti...
[ { "answer_id": 66417, "author": "Martin", "author_id": 2581, "author_profile": "https://Stackoverflow.com/users/2581", "pm_score": 0, "selected": false, "text": "// Usage: logonuser.exe /user username /password password [/domain domain]\n// Exit code is 0 on logon success and 1 on failur...
2008/09/13
[ "https://Stackoverflow.com/questions/60585", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2581/" ]
60,590
<p>On a PHP-based web site, I want to send users a download package after they have filled out a short form. The site-initiated download should be similar to sites like download.com, which say "your download will begin in a moment."</p> <p>A couple of <strong>possible approaches</strong> I know about, and browser comp...
[ { "answer_id": 60603, "author": "Mark Biek", "author_id": 305, "author_profile": "https://Stackoverflow.com/users/305", "pm_score": 3, "selected": false, "text": "if(file_exists($filename)) {\n header(\"Pragma: public\");\n header(\"Expires: 0\");\n header(\"Cache-Control: mu...
2008/09/13
[ "https://Stackoverflow.com/questions/60590", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4376/" ]
60,607
<p>What are the pros/cons of doing either way. Is there One Right Way(tm) ?</p>
[ { "answer_id": 60631, "author": "Nick Stinemates", "author_id": 4960, "author_profile": "https://Stackoverflow.com/users/4960", "pm_score": 2, "selected": false, "text": "try {\n $user->login();\n} catch (AuthenticationFailureException $e) {\n set_error_handler(\"my_login_form_han...
2008/09/13
[ "https://Stackoverflow.com/questions/60607", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
60,641
<p>I need to replace all WinAPI calls of the</p> <ul> <li>CreateFile, </li> <li>ReadFile, </li> <li>SetFilePointer,</li> <li>CloseHandle </li> </ul> <p>with my own implementation (which use low-level file reading via Bluetooth). The code, where functions will be replaced, is Video File Player and it already works wit...
[ { "answer_id": 60651, "author": "Maximilian", "author_id": 1733, "author_profile": "https://Stackoverflow.com/users/1733", "pm_score": 0, "selected": false, "text": "#define CreateFile MyCreateFile\n\nHRESULT MyCreateFile(whatever the params are);\n #undef CreateFile\nHRESULT MyCreateFil...
2008/09/13
[ "https://Stackoverflow.com/questions/60641", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2279145/" ]
60,645
<p>Is it possible to use overlapped I/O with an anonymous pipe? CreatePipe() does not have any way of specifying FILE_FLAG_OVERLAPPED, so I assume ReadFile() will block, even if I supply an OVERLAPPED-structure. </p>
[ { "answer_id": 419736, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 6, "selected": true, "text": "/******************************************************************************\\\n* This is a part of the Microsoft Sour...
2008/09/13
[ "https://Stackoverflow.com/questions/60645", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3923/" ]
60,649
<p>I'm looking for suggestions on possible IPC mechanisms that are:</p> <ul> <li><strong>Cross platform</strong> (Win32 and Linux at least)</li> <li>Simple to implement in <strong>C++</strong> as well as the <strong>most common scripting languages</strong> (perl, ruby, python, etc).</li> <li>Finally, <strong>simple to...
[ { "answer_id": 25034401, "author": "Peque", "author_id": 3577054, "author_profile": "https://Stackoverflow.com/users/3577054", "pm_score": 3, "selected": false, "text": "inproc:// ipc:// {tcp|pgm|epgm}:// vmci://" } ]
2008/09/13
[ "https://Stackoverflow.com/questions/60649", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1304/" ]
60,650
<p>Is it possible to to programmatically trigger a postback from server code in ASP.NET? I know that it is possible to do a Response.Redirect or Server.Transfer to redirect to a page, but is there a way to trigger a postback to the same page in server code (<em>i.e.</em> without using javascript trickery to submit a f...
[ { "answer_id": 38018367, "author": "Juls", "author_id": 933511, "author_profile": "https://Stackoverflow.com/users/933511", "pm_score": 1, "selected": false, "text": "using System;\nusing System.Web;\nusing Microsoft.AspNet.SignalR;\nnamespace SignalRChat\n{\n public class ChatHub : H...
2008/09/13
[ "https://Stackoverflow.com/questions/60650", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4849/" ]
60,653
<p>Is global memory initialized in C++? And if so, how?</p> <p>(Second) clarification:</p> <p>When a program starts up, what is in the memory space which will become global memory, prior to primitives being initialized? I'm trying to understand if it is zeroed out, or garbage for example.</p> <p>The situation is: ca...
[ { "answer_id": 60655, "author": "Brian R. Bondy", "author_id": 3153, "author_profile": "https://Stackoverflow.com/users/3153", "pm_score": 4, "selected": true, "text": "int x;\n\nint main(int argc, char**argv)\n{\n assert(x == 0);\n int y;\n //assert(y == 0); <-- wrong can't assume th...
2008/09/13
[ "https://Stackoverflow.com/questions/60653", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2167252/" ]
60,658
<p>In Ruby on Rails Development (or MVC in general), what quick rule should I follow as to where to put logic.</p> <p>Please answer in the affirmative - With <em>Do put this here</em>, rather than <em>Don't put that there</em>.</p>
[ { "answer_id": 63619, "author": "James A. Rosen", "author_id": 1190, "author_profile": "https://Stackoverflow.com/users/1190", "pm_score": 2, "selected": false, "text": "# app/controllers/foos_controller.rb:\nclass FoosController < ApplicationController\n\n def show\n @foo = Foo.find...
2008/09/13
[ "https://Stackoverflow.com/questions/60658", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2167252/" ]
60,664
<p>is it possible to display &#8659; entity in ie6? It is being display in every browser but not IE 6.I am writing markup such as: </p> <pre><code>&lt;span&gt;&amp;#8659;&lt;/span&gt; </code></pre>
[ { "answer_id": 60679, "author": "ConroyP", "author_id": 2287, "author_profile": "https://Stackoverflow.com/users/2287", "pm_score": 4, "selected": true, "text": "Symbol Character Numeric Description\n⇓ &dArr; &#8659; Down double arrow - - * Doesn't show with MS IE6\n" },...
2008/09/13
[ "https://Stackoverflow.com/questions/60664", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2138/" ]
60,672
<p>I want to implement an ISAPI filter like feature using HttpModule in IIS7 running under IIS Integrated Request Processing Pipeline mode.</p> <p>The goal is to look at the incoming request at the Web Server level, and inject some custom HttpHeaders into the request. <code>(for ex: HTTP\_EAUTH\_ID)</code></p> <p>And...
[ { "answer_id": 61224, "author": "Tyler", "author_id": 5642, "author_profile": "https://Stackoverflow.com/users/5642", "pm_score": 0, "selected": false, "text": "HttpRequest.Headers HttpRequest.ServerVariables HttpContext.Current.Items\nHttpContext.Current.Response.Headers\n Request.Param...
2008/09/13
[ "https://Stackoverflow.com/questions/60672", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1647/" ]
60,673
<p>What guidelines do you follow to improve the general quality of your code? Many people have rules about how to write C++ code that (supposedly) make it harder to make mistakes. I've seen people <em>insist</em> that every <code>if</code> statement is followed by a brace block (<code>{...}</code>).</p> <p>I'm interes...
[ { "answer_id": 60712, "author": "David Joyner", "author_id": 1146, "author_profile": "https://Stackoverflow.com/users/1146", "pm_score": 4, "selected": true, "text": "std::auto_ptr std::tr1::shared_ptr boost::shared_ptr boost::scoped_ptr" }, { "answer_id": 60715, "author": "B...
2008/09/13
[ "https://Stackoverflow.com/questions/60673", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1304/" ]