qid
int64
4
19.1M
question
stringlengths
18
48.3k
answers
list
date
stringlengths
10
10
metadata
list
100,820
<p>I have a JSF woodstock table with checkboxes. When a row is selected I want to do some processing with those items. I managed to get a selection of RowKey objects but can't find out how to get the original objects I put in back. The table is populated by an ObjectListDataProvider.</p>
[ { "answer_id": 3472860, "author": "Nikordaris", "author_id": 300269, "author_profile": "https://Stackoverflow.com/users/300269", "pm_score": 0, "selected": false, "text": "<ui:radioButton id=\"radioButton1\" name=\"radioButton-group1\" valueChangeListener=\"#{MyBeanPage.radioButton1_proc...
2008/09/19
[ "https://Stackoverflow.com/questions/100820", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18702/" ]
100,824
<p>The code below shows a sample that I've used recently to explain the different behaviour of structs and classes to someone brand new to development. Is there a better way of doing so? (Yes - the code uses public fields - that's purely for brevity)</p> <pre><code>namespace StructsVsClasses { class Program { ...
[ { "answer_id": 101153, "author": "Hallgrim", "author_id": 15454, "author_profile": "https://Stackoverflow.com/users/15454", "pm_score": 2, "selected": true, "text": "class PointClass {\n int double X;\n int double Y;\n}\n\nclass Circle {\n PointClass Center = new PointClass() { X = 0,...
2008/09/19
[ "https://Stackoverflow.com/questions/100824", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7872/" ]
100,829
<p>I'm trying to write a script to allow me to log in to a console servers 48 ports so that I can quickly determine what devices are connected to each serial line.</p> <p>Essentially I want to be able to have a script that, given a list of hosts/ports, telnets to the first device in the list and leaves me in interacti...
[ { "answer_id": 100879, "author": "user11323", "author_id": 11323, "author_profile": "https://Stackoverflow.com/users/11323", "pm_score": 3, "selected": false, "text": "#!/usr/bin/expect -f\nspawn telnet $host_name\nexpect {\n \"T0>\" {}\n -re \"Connection refused|No ro...
2008/09/19
[ "https://Stackoverflow.com/questions/100829", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6306/" ]
100,841
<p>I've had a bug in our software that occurs when I receive a connection timeout. These errors are very rare (usually when my connection gets dropped by our internal network). How can I generate this kind of effect artificially so I can test our software? </p> <p>If it matters the app is written in C++/MFC using CAsy...
[ { "answer_id": 16048032, "author": "Henrik Heimbuerger", "author_id": 6278, "author_profile": "https://Stackoverflow.com/users/6278", "pm_score": 4, "selected": false, "text": "Python 2.7.4 (default, Apr 6 2013, 19:54:46) [MSC v.1500 32 bit (Intel)] on win32\nType \"help\", \"copyright\...
2008/09/19
[ "https://Stackoverflow.com/questions/100841", "https://Stackoverflow.com", "https://Stackoverflow.com/users/986/" ]
100,853
<p>While editing an aspx file I found both these opening tags used for seemingly the same thing. Is there a difference and if yes, what is it?</p>
[ { "answer_id": 100888, "author": "Johannes Hädrich", "author_id": 18246, "author_profile": "https://Stackoverflow.com/users/18246", "pm_score": 5, "selected": true, "text": "<%= <% Repsonse.Write() <%=myProperty + \" additional Text\" %>\n <%#" } ]
2008/09/19
[ "https://Stackoverflow.com/questions/100853", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5018/" ]
100,854
<p>I have C++ project (VS2005) which includes header file with version number in #define directive. Now I need to include exactly the same number in twin C# project. What is the best way to do it?</p> <p>I'm thinking about including this file as a resource, then parse it at a runtime with regex to recover version numb...
[ { "answer_id": 100913, "author": "Skizz", "author_id": 1898, "author_profile": "https://Stackoverflow.com/users/1898", "pm_score": 2, "selected": false, "text": "// version header file\n#define Version \"1.01\"\n\n// C# code\n#include \"version.h\"\n// somewhere in a class\nstring versio...
2008/09/19
[ "https://Stackoverflow.com/questions/100854", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7162/" ]
100,860
<p>As most of you would know, if I drop a file named app_offline.htm in the root of an asp.net application, it takes the application offline <a href="http://asp-net-whidbey.blogspot.com/2006/04/aspnet-20-features-appofflinehtm.html" rel="nofollow noreferrer">as detailed here</a>.</p> <p>You would also know, that while...
[ { "answer_id": 100881, "author": "leppie", "author_id": 15541, "author_profile": "https://Stackoverflow.com/users/15541", "pm_score": 1, "selected": false, "text": "<httpRuntime enable = \"False\"/>\n" }, { "answer_id": 100928, "author": "mdb", "author_id": 8562, "aut...
2008/09/19
[ "https://Stackoverflow.com/questions/100860", "https://Stackoverflow.com", "https://Stackoverflow.com/users/380/" ]
100,898
<p>What's the best / simplest / most accurate way to detect the browser of a user?</p> <p>Ease of extendability and implementation is a plus.</p> <p>The less technologies used, the better.</p> <p>The solution can be server side, client side, or both. The results should eventually end up at the server, though.</p> <...
[ { "answer_id": 100908, "author": "ConroyP", "author_id": 2287, "author_profile": "https://Stackoverflow.com/users/2287", "pm_score": 3, "selected": false, "text": "$.browser alert($.browser.name); // Alerts Firefox for me\n" }, { "answer_id": 100918, "author": "Twan", "a...
2008/09/19
[ "https://Stackoverflow.com/questions/100898", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6681/" ]
100,904
<p>Per man pages, snprintf is returning number of bytes written from glibc version 2.2 onwards. But on lower versions of libc2.2 and HP-UX, it returns a positive integer, which could lead to a buffer overflow.</p> <p>How can one overcome this and write portable code?</p> <p>Edit : For want of more clarity</p> <p>Thi...
[ { "answer_id": 100936, "author": "finnw", "author_id": 12048, "author_profile": "https://Stackoverflow.com/users/12048", "pm_score": 0, "selected": false, "text": "int my_snprintf(char *buf, size_t n, const char *fmt, ...)\n{\n va_list va;\n int nchars;\n FILE *tf = tmpfile();\n...
2008/09/19
[ "https://Stackoverflow.com/questions/100904", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18657/" ]
100,917
<p>I'm trying to read data from a Delphi DBIV database, every time I access the database it creates a Paradox.lck and a Pdoxusrs.lck file. I'm using only a TQuery Object to do this (nothing else). can I access a Delphi DBIV database without it creating these lock files?</p>
[ { "answer_id": 100936, "author": "finnw", "author_id": 12048, "author_profile": "https://Stackoverflow.com/users/12048", "pm_score": 0, "selected": false, "text": "int my_snprintf(char *buf, size_t n, const char *fmt, ...)\n{\n va_list va;\n int nchars;\n FILE *tf = tmpfile();\n...
2008/09/19
[ "https://Stackoverflow.com/questions/100917", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
100,948
<p>I installed MySQL via <a href="http://en.wikipedia.org/wiki/MacPorts" rel="noreferrer">MacPorts</a>. What is the command I need to stop the server (I need to test how my application behave when MySQL is dead)?</p>
[ { "answer_id": 100953, "author": "Dan", "author_id": 17121, "author_profile": "https://Stackoverflow.com/users/17121", "pm_score": 4, "selected": false, "text": "sudo /Library/StartupItems/MySQLCOM/MySQLCOM stop\n" }, { "answer_id": 100958, "author": "Bartosz Blimke", "au...
2008/09/19
[ "https://Stackoverflow.com/questions/100948", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7473/" ]
100,959
<p>I am aware of <a href="http://cocoamysql.sourceforge.net/" rel="noreferrer">CocoaMySQL</a> but I have not seen a Mac GUI for SQLite, is there one?</p> <p>My Google search didn't turn up any Mac related GUI's which is why I'm asking here rather than Google.</p>
[ { "answer_id": 10430316, "author": "Joony", "author_id": 448287, "author_profile": "https://Stackoverflow.com/users/448287", "pm_score": 7, "selected": false, "text": "Application supports iTunes file sharing" } ]
2008/09/19
[ "https://Stackoverflow.com/questions/100959", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1384652/" ]
100,976
<p>I have an application in which a gecko browser is embedded. The application is crashing when I try to access any https url's because nss is not properly initialised at this point. The crash is in PK11_TokenExists(). I want to block my browser from rendering https sites. If a user clicks on a https link I can block t...
[ { "answer_id": 2418646, "author": "NineBerry", "author_id": 101087, "author_profile": "https://Stackoverflow.com/users/101087", "pm_score": 1, "selected": false, "text": "OnStateChange nsIWebProgressListener aStateFlags STATE_IS_DOCUMENT STATE_START aRequest nsIRequest nsIChannel URI can...
2008/09/19
[ "https://Stackoverflow.com/questions/100976", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
100,990
<p>How could I get the Fault Detail sent by a SoapFaultClientException ? I use a WebServiceTemplate as shown below :</p> <pre><code>WebServiceTemplate ws = new WebServiceTemplate(); ws.setMarshaller(client.getMarshaller()); ws.setUnmarshaller(client.getUnMarshaller()); try { MyResponse resp = (MyResponse) = ws.mar...
[ { "answer_id": 11082098, "author": "holmis83", "author_id": 1463522, "author_profile": "https://Stackoverflow.com/users/1463522", "pm_score": 3, "selected": false, "text": "private Element getDetail(SoapFaultClientException e) throws TransformerException {\n TransformerFactory transfo...
2008/09/19
[ "https://Stackoverflow.com/questions/100990", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18714/" ]
100,993
<p>I'm new to both Web Services and RMI and I wonder which is the better way to do remoting between different web applications, when these applications are all written in Java, that is when different programming languages don't matter (which would be the advantage of WS).</p> <p>While on the one hand I would guess tha...
[ { "answer_id": 36574041, "author": "Steve O 1969", "author_id": 5605103, "author_profile": "https://Stackoverflow.com/users/5605103", "pm_score": 1, "selected": false, "text": "org.springframework.remoting.rmi.RmiServiceExporter\n" } ]
2008/09/19
[ "https://Stackoverflow.com/questions/100993", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18722/" ]
101,012
<p>Our rails app is designed as a single code base linking to multiple client databases. Based on the subdomain the app determines which db to connect to.</p> <p>We use liquid templates to customise the presentation for each client. We are unable to customise the generic 'We're Sorry, somethign went wrong..' message f...
[ { "answer_id": 101027, "author": "mislav", "author_id": 11687, "author_profile": "https://Stackoverflow.com/users/11687", "pm_score": 4, "selected": true, "text": "rescue_from class ApplicationController < ActionController::Base\n rescue_from MyAppError, :with => :show_errors\n\n def s...
2008/09/19
[ "https://Stackoverflow.com/questions/101012", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
101,029
<p>Do you know of any compilers that only requires one or two clicks on the source code to compile? Having to configure it to do it doesn't count, nor does having to go to a terminal and write a word or two.</p> <p>Extra points are given if you can give your own view as to why so few compilers have a gui included, or ...
[ { "answer_id": 101173, "author": "Jez", "author_id": 15478, "author_profile": "https://Stackoverflow.com/users/15478", "pm_score": 0, "selected": false, "text": "make" } ]
2008/09/19
[ "https://Stackoverflow.com/questions/101029", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17500/" ]
101,033
<p>I want to create a stored procedure with one argument which will return different sets of records depending on the argument. What is the way to do this? Can I call it from plain SQL?</p>
[ { "answer_id": 101064, "author": "Thilo", "author_id": 14955, "author_profile": "https://Stackoverflow.com/users/14955", "pm_score": 5, "selected": false, "text": "create function test_cursor \n return sys_refcursor\n is\n c_result sys_refcursor;\...
2008/09/19
[ "https://Stackoverflow.com/questions/101033", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
101,038
<p>I have a Win32 TreeCtrl where the user can rename the tree labels. I process the TVN_ENDLABELEDIT message to do this.</p> <p>In certain cases I need to change the text that the user entered. Basically the user can enter a short name during edit and I want to replace it with a longer text.</p> <p>To do this I chang...
[ { "answer_id": 101088, "author": "ChrisN", "author_id": 3853, "author_profile": "https://Stackoverflow.com/users/3853", "pm_score": 2, "selected": false, "text": "LPSTR_TEXTCALLBACK pszText TVN_ENDLABELEDIT TreeView_SetItem" } ]
2008/09/19
[ "https://Stackoverflow.com/questions/101038", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
101,046
<p>I cannot understand the Oracle documentation. :-(</p> <p>Does anybody know how to fetch multiple rows of simple data from Oracle via OCI?</p> <p>I currently use <code>OCIDefineByPos</code> to define single variables (I only need to do this for simple integers -- <code>SQLT_INT</code>/4-byte ints) and then fetch a ...
[ { "answer_id": 101088, "author": "ChrisN", "author_id": 3853, "author_profile": "https://Stackoverflow.com/users/3853", "pm_score": 2, "selected": false, "text": "LPSTR_TEXTCALLBACK pszText TVN_ENDLABELEDIT TreeView_SetItem" } ]
2008/09/19
[ "https://Stackoverflow.com/questions/101046", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6525/" ]
101,055
<p>What makes a language a scripting language? I've heard some people say &quot;when it gets interpreted instead of compiled&quot;. That would make PHP (for example) a scripting language. Is that the only criterion? Or are there other criteria?</p> <h3>See also:</h3> <ul> <li><a href="https://stackoverflow.com/question...
[ { "answer_id": 101075, "author": "Grey Panther", "author_id": 1265, "author_profile": "https://Stackoverflow.com/users/1265", "pm_score": 3, "selected": false, "text": "perl my_source.pl" }, { "answer_id": 1281922, "author": "Paul Biggar", "author_id": 104021, "author...
2008/09/19
[ "https://Stackoverflow.com/questions/101055", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6400/" ]
101,066
<p><strong>EDIT</strong></p> <p>What small things which are too easy to overlook do I need to do before deploying a rails application? </p> <p>I have set up <a href="https://stackoverflow.com/questions/101275/what-do-i-need-to-do-on-deployment-of-a-rails-application">another question</a> for any task that takes more ...
[ { "answer_id": 101315, "author": "Laurie Young", "author_id": 7473, "author_profile": "https://Stackoverflow.com/users/7473", "pm_score": 4, "selected": true, "text": "rake gems:unpack config/environment.rb app/controllers/application.rb filter_parameter_logging :password, :password_conf...
2008/09/19
[ "https://Stackoverflow.com/questions/101066", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7473/" ]
101,070
<p>If you are writing a <em>simple</em> little loop, what <em>should</em> you name the counter?</p> <p><em>Provide example loops!</em></p>
[ { "answer_id": 101071, "author": "just mike", "author_id": 12293, "author_profile": "https://Stackoverflow.com/users/12293", "pm_score": 4, "selected": false, "text": "i j k x y r c w h // recommended style ● // \"typical\" single-letter style\n ...
2008/09/19
[ "https://Stackoverflow.com/questions/101070", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12293/" ]
101,072
<p>Was this an oversight? Or is it to do with the JVM?</p>
[ { "answer_id": 692078, "author": "David Citron", "author_id": 5309, "author_profile": "https://Stackoverflow.com/users/5309", "pm_score": 6, "selected": true, "text": "Object myObj = new Object();\n myObj Object myObj null null" }, { "answer_id": 6227525, "author": "Stephen C...
2008/09/19
[ "https://Stackoverflow.com/questions/101072", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4857/" ]
101,079
<p>I used to work in a place where a common practice was to use Pair Programming. I remember how many small things we could learn from each other when working together on the code. Picking up new shortcuts, code snippets etc. with time significantly improved our efficiency of writing code.</p> <p>Since I started worki...
[ { "answer_id": 101091, "author": "Galwegian", "author_id": 3201, "author_profile": "https://Stackoverflow.com/users/3201", "pm_score": 5, "selected": false, "text": "DELETE BEGIN TRANSACTION COMMIT" }, { "answer_id": 102316, "author": "HLGEM", "author_id": 9034, "auth...
2008/09/19
[ "https://Stackoverflow.com/questions/101079", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3241/" ]
101,096
<p>I have an Exchange mailbox linked as a table in an MS Access app. This is primarily used for reading, but I would also like to be able to "move" messages to another folder. </p> <p>Unfortunately this is not as simple as writing in a second linked mailbox, because apparently I can not edit some fields. Some critic...
[ { "answer_id": 102406, "author": "Fionnuala", "author_id": 2548, "author_profile": "https://Stackoverflow.com/users/2548", "pm_score": 1, "selected": false, "text": " Set oApp = CreateObject(\"Outlook.Application\")\n\nSet oNS = oApp.GetNamespace(\"MAPI\")\n\nSet oMailItems = oNS.GetDefa...
2008/09/19
[ "https://Stackoverflow.com/questions/101096", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
101,100
<p>Can anyone recommend a simple API that will allow me to use read a CSV input file, do some simple transformations, and then write it.</p> <p>A quick google has found <a href="http://flatpack.sourceforge.net/" rel="noreferrer">http://flatpack.sourceforge.net/</a> which looks promising.</p> <p>I just wanted to check...
[ { "answer_id": 105649, "author": "Jay R.", "author_id": 5074, "author_profile": "https://Stackoverflow.com/users/5074", "pm_score": 6, "selected": false, "text": "import au.com.bytecode.opencsv.CSVReader;" }, { "answer_id": 2146086, "author": "kbg", "author_id": 258315, ...
2008/09/19
[ "https://Stackoverflow.com/questions/101100", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10171/" ]
101,125
<p>Is there a way to check if the user has a different version of the CSS cached by their browser and if so force their browser to pull the new version?</p>
[ { "answer_id": 101131, "author": "Kent Fredric", "author_id": 15614, "author_profile": "https://Stackoverflow.com/users/15614", "pm_score": 0, "selected": false, "text": "<body class=\"style2\">\n\n<body class=\"style1\">\n" }, { "answer_id": 101188, "author": "David Heggie",...
2008/09/19
[ "https://Stackoverflow.com/questions/101125", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
101,128
<p>How do I read text from the (windows) clipboard with python?</p>
[ { "answer_id": 101167, "author": "Sakin", "author_id": 12818, "author_profile": "https://Stackoverflow.com/users/12818", "pm_score": 8, "selected": true, "text": "import win32clipboard\n\n# set clipboard data\nwin32clipboard.OpenClipboard()\nwin32clipboard.EmptyClipboard()\nwin32clipboar...
2008/09/19
[ "https://Stackoverflow.com/questions/101128", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17493/" ]
101,145
<p>How can someone validate that a specific element exists in an XML file? Say I have an ever changing XML file and I need to verify every element exists before reading/parsing it. </p>
[ { "answer_id": 101160, "author": "Chris James", "author_id": 3193, "author_profile": "https://Stackoverflow.com/users/3193", "pm_score": 6, "selected": false, "text": "if(doc.SelectSingleNode(\"//mynode\")==null)....\n" }, { "answer_id": 6649224, "author": "sangam", "auth...
2008/09/19
[ "https://Stackoverflow.com/questions/101145", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
101,151
<p>I have the following scenario:</p> <pre> public class CarManager { .. public long AddCar(Car car) { try { string username = _authorizationManager.GetUsername(); ... long id = _carAccessor.AddCar(username, car.Id, car.Name, ....); if(id == 0) { ...
[ { "answer_id": 101438, "author": "Josh Freed", "author_id": 14548, "author_profile": "https://Stackoverflow.com/users/14548", "pm_score": 1, "selected": false, "text": "AddCarTestAuthorizationManagerException() AddCarTestCarAccessorNoId() AddCarTestCarAccessorException() AddCars() AddCar...
2008/09/19
[ "https://Stackoverflow.com/questions/101151", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15771/" ]
101,156
<p>I need to count and check how much of some images is placed in folder od web server. Example- images get names from <code>user_id</code>, and on example I have <code>user_id 27</code>, and my images are:</p> <pre><code>27_1.jpg, 27_2.jpg, 27_3.jpg, ... </code></pre> <p>How to check and write to database this thing...
[ { "answer_id": 101230, "author": "hometoast", "author_id": 2009, "author_profile": "https://Stackoverflow.com/users/2009", "pm_score": 2, "selected": false, "text": "IO.Directory.GetFiles(\"\\translated\\path\",\"27_*.jpg\").Count()\n" }, { "answer_id": 101236, "author": "Web...
2008/09/19
[ "https://Stackoverflow.com/questions/101156", "https://Stackoverflow.com", "https://Stackoverflow.com/users/205368/" ]
101,162
<p>How do you return a serialized JSON object to the client side using ASP.NET MVC via an AJAX call?</p>
[ { "answer_id": 101256, "author": "David Bick", "author_id": 4914, "author_profile": "https://Stackoverflow.com/users/4914", "pm_score": 6, "selected": true, "text": "public ActionResult MyAction()\n{\n ... // Populate myObject\n return new JsonResult{ Data = myObject };\n}\n $.getJ...
2008/09/19
[ "https://Stackoverflow.com/questions/101162", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
101,174
<p>In Python there is a really neat function called <code>zip</code> which can be used to iterate through two lists at the same time:</p> <pre><code>list1 = [1, 2, 3] list2 = ["a", "b", "c"] for v1, v2 in zip(list1, list2): print v1 + " " + v2 </code></pre> <p>The above code should produce the following:</p> <pr...
[ { "answer_id": 101207, "author": "aku", "author_id": 1196, "author_profile": "https://Stackoverflow.com/users/1196", "pm_score": 3, "selected": false, "text": "class Pair<T1, T2>\n{\n public T1 First { get; set;}\n public T2 Second { get; set;}\n}\n\nstatic IEnumerable<Pair<T1, T2>...
2008/09/19
[ "https://Stackoverflow.com/questions/101174", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16047/" ]
101,180
<p>I need to communicate with an XML-RPC server from a .NET 2.0 client. Can you recommend any libraries?</p> <p>EDIT: Having tried XML-RPC.Net, I like the way it generates dynamic proxies, it is very neat. Unfortunately, as always, things are not so simple. I am accessing an XML-RPC service which uses the unorthodox t...
[ { "answer_id": 375036, "author": "Troy J. Farrell", "author_id": 26244, "author_profile": "https://Stackoverflow.com/users/26244", "pm_score": 3, "selected": true, "text": "ISumAndDiff proxy = (ISumAndDiff)XmlRpcProxyGen.Create(typeof(ISumAndDiff));\nproxy.XmlRpcMethod = \"Id1234_SumAndD...
2008/09/19
[ "https://Stackoverflow.com/questions/101180", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16881/" ]
101,184
<p>I'm building an installer for an application. The user gets to select a datasource they have configured and nominate what type of database it is. I want to confirm that the database type is indeed Oracle, and if possible, what version of Oracle they are running by sending a SQL statement to the datasource.</p>
[ { "answer_id": 101197, "author": "Tony Andrews", "author_id": 18747, "author_profile": "https://Stackoverflow.com/users/18747", "pm_score": 9, "selected": true, "text": "select * from v$version;\n BANNER\n----------------------------------------------------------------\nOracle Database 1...
2008/09/19
[ "https://Stackoverflow.com/questions/101184", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10750/" ]
101,195
<p>I'm playing with the wonderful <a href="http://hudson.gotdns.com/wiki/display/HUDSON/FindBugs+Plugin" rel="nofollow noreferrer">FindBugs plugin</a> for <a href="http://hudson-ci.org/" rel="nofollow noreferrer">Hudson</a>. Ideally, I'd like to have the build fail if FindBugs finds any problems. Is this possible?</p> ...
[ { "answer_id": 142245, "author": "Tom", "author_id": 22850, "author_profile": "https://Stackoverflow.com/users/22850", "pm_score": 2, "selected": false, "text": "<findbugs ... warningsProperty=\"findbugsFailure\"/> <fail if=\"findbugsFailure\">" } ]
2008/09/19
[ "https://Stackoverflow.com/questions/101195", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
101,196
<p>Is there a way to trigger a garbage collection in a .NET process from another process or from inside WinDBG?</p> <p>There are the Managed Debugging Assistants that force a collection as you move across a native/managed boundary, and <a href="http://en.wikipedia.org/wiki/AQtime" rel="noreferrer">AQTime</a> seems to ...
[ { "answer_id": 35159075, "author": "Eric Boumendil", "author_id": 249742, "author_profile": "https://Stackoverflow.com/users/249742", "pm_score": 4, "selected": false, "text": "PerfView.exe ForceGC [ProcessName | Process ID] /AcceptEULA\n" } ]
2008/09/19
[ "https://Stackoverflow.com/questions/101196", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5764/" ]
101,198
<p>I'm building an installer for an application. The user gets to select a datasource they have configured and nominate what type of database it is. I want to confirm that the database type is indeed Postgres, and if possible, what version of Postgres they are running by sending a SQL statement to the datasource.</p>
[ { "answer_id": 101210, "author": "Galwegian", "author_id": 3201, "author_profile": "https://Stackoverflow.com/users/3201", "pm_score": 2, "selected": false, "text": "SELECT version();\n" }, { "answer_id": 101214, "author": "Matthias Kestenholz", "author_id": 317346, "...
2008/09/19
[ "https://Stackoverflow.com/questions/101198", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10750/" ]
101,212
<p>Net::HTTP can be rather cumbersome for the standard use case!</p>
[ { "answer_id": 101542, "author": "Aaron Hinni", "author_id": 12086, "author_profile": "https://Stackoverflow.com/users/12086", "pm_score": 3, "selected": false, "text": "gem install rest-open-uri\n response = open('https://wherever/foo',\n :method => :put,\n ...
2008/09/19
[ "https://Stackoverflow.com/questions/101212", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18751/" ]
101,223
<p>I have a pivot table on an olap cube. I can go into a page field and manually deselect multiple items. How can I do this in VBA based on a list of items I need excluded? (n.b. I do not have a corrresponding list of items I need included)</p> <p>I know how to exclude these items in other ways, by altering the underl...
[ { "answer_id": 101464, "author": "juan", "author_id": 1782, "author_profile": "https://Stackoverflow.com/users/1782", "pm_score": 0, "selected": false, "text": "((MOE.PivotField)pivotTableObject.PivotFields(\"[NAME]\")).Delete();\n" }, { "answer_id": 102734, "author": "Hobbo"...
2008/09/19
[ "https://Stackoverflow.com/questions/101223", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6387/" ]
101,238
<p>I've got many assemblies/projects in the same c#/.net solution. A setting needs to be saved by people using the web application gui, and then a console app and some test projects need to access the same file. Where should I put the file and how to access it?</p> <p>I've tried using "AppDomain.CurrentDomain.BaseDire...
[ { "answer_id": 101287, "author": "Pop Catalin", "author_id": 4685, "author_profile": "https://Stackoverflow.com/users/4685", "pm_score": 2, "selected": false, "text": " Path.Combine(\n Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData),\n \"[Compa...
2008/09/19
[ "https://Stackoverflow.com/questions/101238", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3397/" ]
101,244
<pre><code>/etc/init.d/* /etc/rc{1-5}.d/* </code></pre>
[ { "answer_id": 101246, "author": "px.", "author_id": 18769, "author_profile": "https://Stackoverflow.com/users/18769", "pm_score": 2, "selected": false, "text": "/sbin/chkconfig /sbin/chkconfig /etc/rc.d/init.d/" }, { "answer_id": 101277, "author": "dsm", "author_id": 778...
2008/09/19
[ "https://Stackoverflow.com/questions/101244", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18769/" ]
101,258
<p>I want to search for <code>$maximumTotalAllowedAfterFinish</code> and replace it with <code>$minimumTotalAllowedAfterFinish</code>. Instead of typing the long text:</p> <pre><code>:%s/$maximumTotalAllowedAfterFinish/$minimumTotalAllowedAfterFinish/g </code></pre> <p>Is there a way to COPY these long variable names...
[ { "answer_id": 101281, "author": "Johannes Hoff", "author_id": 3102, "author_profile": "https://Stackoverflow.com/users/3102", "pm_score": 4, "selected": false, "text": "q: Enter" }, { "answer_id": 101285, "author": "tzot", "author_id": 6899, "author_profile": "https:...
2008/09/19
[ "https://Stackoverflow.com/questions/101258", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4639/" ]
101,265
<p>Inspired by another question asking about the missing <code>Zip</code> function:</p> <p>Why is there no <code>ForEach</code> extension method on the <code>IEnumerable</code> interface? Or anywhere? The only class that gets a <code>ForEach</code> method is <code>List&lt;&gt;</code>. Is there a reason why it's missing...
[ { "answer_id": 101278, "author": "aku", "author_id": 1196, "author_profile": "https://Stackoverflow.com/users/1196", "pm_score": 6, "selected": false, "text": "public static void ForEach<T>(\n this IEnumerable<T> source,\n Action<T> action)\n{\n foreach (T element in source) \n ...
2008/09/19
[ "https://Stackoverflow.com/questions/101265", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3820/" ]
101,267
<p>When I used to write libraries in C/C++ I got into the habit of having a method to return the compile date/time. This was always a compiled into the library so would differentiate builds of the library. I got this by returning a #define in the code:</p> <p>C++:</p> <pre><code>#ifdef _BuildDateTime_ char* SomeCl...
[ { "answer_id": 101293, "author": "basszero", "author_id": 287, "author_profile": "https://Stackoverflow.com/users/287", "pm_score": 1, "selected": false, "text": "Enumeration<URL> resources = Thread.currentThread().getContextClassLoader().getResources(\"META-INF/MANIFEST.MF\");\n" }, ...
2008/09/19
[ "https://Stackoverflow.com/questions/101267", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18744/" ]
101,268
<p>What are the lesser-known but useful features of the Python programming language?</p> <ul> <li>Try to limit answers to Python core.</li> <li>One feature per answer.</li> <li>Give an example and short description of the feature, not just a link to documentation.</li> <li>Label the feature using a title as the first l...
[ { "answer_id": 101276, "author": "cleg", "author_id": 29503, "author_profile": "https://Stackoverflow.com/users/29503", "pm_score": 7, "selected": false, "text": "import this\n# btw look at this module's source :)\n" }, { "answer_id": 101280, "author": "Oko", "author_id":...
2008/09/19
[ "https://Stackoverflow.com/questions/101268", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2679/" ]
101,270
<p>I want to use Vim's quickfix features with the output from Visual Studio's devenv build process or msbuild.</p> <p>I've created a batch file called build.bat which executes the devenv build like this:</p> <pre><code>devenv MySln.sln /Build Debug </code></pre> <p>In vim I've pointed the :make command to that batch...
[ { "answer_id": 102454, "author": "Jay Bazuzi", "author_id": 5314, "author_profile": "https://Stackoverflow.com/users/5314", "pm_score": 1, "selected": false, "text": "msbuild MySln.sln /Configuration:Debug msbuild /?" }, { "answer_id": 161090, "author": "Simon Buchan", "a...
2008/09/19
[ "https://Stackoverflow.com/questions/101270", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4407/" ]
101,326
<p>I've set up wildcard mapping on IIS 6, by adding "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll", and ensured "Verify that file exists" is not checked :</p> <ul> <li>on the "websites" directory in IIS</li> <li>on the website</li> </ul> <p>However, after a iisreset, when I go to <a href="http://mys...
[ { "answer_id": 103661, "author": "Christopher G. Lewis", "author_id": 13532, "author_profile": "https://Stackoverflow.com/users/13532", "pm_score": 3, "selected": true, "text": " <system.web>\n <httpHandlers>\n <add path=\"*.gif\" verb=\"GET,HEAD\" type=\"System.Web.StaticFileHa...
2008/09/19
[ "https://Stackoverflow.com/questions/101326", "https://Stackoverflow.com", "https://Stackoverflow.com/users/971/" ]
101,329
<p>In particular, wouldn't there have to be some kind of function pointer in place anyway? </p>
[ { "answer_id": 101349, "author": "m_pGladiator", "author_id": 446104, "author_profile": "https://Stackoverflow.com/users/446104", "pm_score": 2, "selected": false, "text": "virtual" }, { "answer_id": 101583, "author": "Richard Corden", "author_id": 11698, "author_prof...
2008/09/19
[ "https://Stackoverflow.com/questions/101329", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3153/" ]
101,338
<p>Is it valid to have a 'choice' of 'group' elements when defining an XML Schema (XSD)</p> <p>i.e. is the following valid</p> <pre><code>&lt;xs:complexType name=&quot;HeaderType&quot;&gt; &lt;xs:sequence&gt; &lt;xs:element name=&quot;reservation-number&quot; type=&quot;ReservationNumberType&quot; minOccurs=&quot...
[ { "answer_id": 101772, "author": "Dunderklumpen", "author_id": 16239, "author_profile": "https://Stackoverflow.com/users/16239", "pm_score": 4, "selected": true, "text": "<xs:group name=\"ReservationGroup\">\n <xs:sequence>\n <xs:element name=\"date\"/>\n <xs:element nam...
2008/09/19
[ "https://Stackoverflow.com/questions/101338", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15452/" ]
101,362
<p>How do you generate passwords?</p> <ul> <li>Random Characters?</li> <li>Passphrases?</li> <li>High Ascii?</li> </ul> <p>Something like this?</p> <pre><code>cat /dev/urandom | strings </code></pre>
[ { "answer_id": 101368, "author": "Douglas Leeder", "author_id": 3978, "author_profile": "https://Stackoverflow.com/users/3978", "pm_score": 4, "selected": false, "text": "#!/usr/bin/env python\n\nfrom random import choice\nimport getopt\nimport string\nimport sys\n\ndef GenPasswd():\n ...
2008/09/19
[ "https://Stackoverflow.com/questions/101362", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18769/" ]
101,363
<p>I'm using Castle Windsor for dependency injection in my test project. I'm trying to create an instance one of my 'Repository' classes. "It works fine on my machine", but when I run a nightly build in TFS, my tests are not able to load said classes.</p> <pre><code>private static readonly WindsorContainer _container ...
[ { "answer_id": 101368, "author": "Douglas Leeder", "author_id": 3978, "author_profile": "https://Stackoverflow.com/users/3978", "pm_score": 4, "selected": false, "text": "#!/usr/bin/env python\n\nfrom random import choice\nimport getopt\nimport string\nimport sys\n\ndef GenPasswd():\n ...
2008/09/19
[ "https://Stackoverflow.com/questions/101363", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12756/" ]
101,386
<p>Does PHP have a method of having auto-generated class variables? I <em>think</em> I've seen something like this before but I'm not certain.</p> <pre><code>public class TestClass { private $data = array(); public function TestClass() { $this-&gt;data['firstValue'] = "cheese"; } } </code></pre> ...
[ { "answer_id": 131455, "author": "David Stockton", "author_id": 21897, "author_profile": "https://Stackoverflow.com/users/21897", "pm_score": 3, "selected": false, "text": "__get() public class TestClass {\n private $data = array();\n\n // Since you're using PHP5, you should be usi...
2008/09/19
[ "https://Stackoverflow.com/questions/101386", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12870/" ]
101,422
<p>Why does the JavaScript function <code>encodeURIComponent</code> encode spaces to the hex Unicode value <code>%20</code> instead of <code>+</code>. Should URI parameters not spaces to <code>+</code>? ­­­­­­­­­­­­­­­­­­­­­­­­­­­</p>
[ { "answer_id": 1590896, "author": "user192649", "author_id": 192649, "author_profile": "https://Stackoverflow.com/users/192649", "pm_score": 0, "selected": false, "text": "items = (A beautiful world)\nforeach( item in $items ) echo \"* $item\"\n render-list A beautiful world\n http://tes...
2008/09/19
[ "https://Stackoverflow.com/questions/101422", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18793/" ]
101,427
<p>I was wondering are there any security concerns with adding crossdomain.xml to the root of an application server? Can it be added to any other parts of the server and are you aware of any work arounds that dont require the server to have this file in place?</p> <p>Thanks Damien</p>
[ { "answer_id": 217651, "author": "Ronnie Liew", "author_id": 1987, "author_profile": "https://Stackoverflow.com/users/1987", "pm_score": 1, "selected": false, "text": "http://mysubdomain.mydomain.com/fu/bar/ http://mysubdomin.mydomain.com/crossdomain.xml" } ]
2008/09/19
[ "https://Stackoverflow.com/questions/101427", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11612/" ]
101,439
<p>What is the most efficient way given to raise an integer to the power of another integer in C?</p> <pre><code>// 2^3 pow(2,3) == 8 // 5^5 pow(5,5) == 3125 </code></pre>
[ { "answer_id": 101473, "author": "Doug T.", "author_id": 8123, "author_profile": "https://Stackoverflow.com/users/8123", "pm_score": 3, "selected": false, "text": "struct IeeeFloat\n{\n\n unsigned int base : 23;\n unsigned int exponent : 8;\n unsigned int signBit : 1;\n};\n\n\nu...
2008/09/19
[ "https://Stackoverflow.com/questions/101439", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8123/" ]
101,449
<p>I'm guessing I need to implement an <code>NVelocityViewEngine</code> and <code>NVelocityView</code> - but before I do I wanted to check to see if anyone has already done this.</p> <p>I can't see anything in the <a href="http://mvccontrib.googlecode.com/svn/trunk/" rel="nofollow noreferrer">trunk</a> for <a href="htt...
[ { "answer_id": 101473, "author": "Doug T.", "author_id": 8123, "author_profile": "https://Stackoverflow.com/users/8123", "pm_score": 3, "selected": false, "text": "struct IeeeFloat\n{\n\n unsigned int base : 23;\n unsigned int exponent : 8;\n unsigned int signBit : 1;\n};\n\n\nu...
2008/09/19
[ "https://Stackoverflow.com/questions/101449", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8542/" ]
101,460
<p>At the moment, I am doing a number of searches which include "html" in them, for example "html rearrange". Unfortunately, I get a lot of hits from sites that include "rearrange" on a .html page but have no mention of html in the page itself.</p> <p>Is there a way to prevent search terms from matching urls?</p>
[ { "answer_id": 14548483, "author": "Cinder", "author_id": 1291313, "author_profile": "https://Stackoverflow.com/users/1291313", "pm_score": 1, "selected": false, "text": "rearrange intext:html" } ]
2008/09/19
[ "https://Stackoverflow.com/questions/101460", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6445/" ]
101,461
<p>Most languages (Ruby included) allow number literals to be written in at least three bases: decimal, octal and hexadecimal. Numbers in decimal base is the usual thing and are written as (most) people naturally write numbers, 96 is written as <code>96</code>. Numbers prefixed by a zero are usually interpreted as octa...
[ { "answer_id": 101479, "author": "Thelema", "author_id": 12874, "author_profile": "https://Stackoverflow.com/users/12874", "pm_score": 3, "selected": false, "text": "0b01011\n" }, { "answer_id": 101482, "author": "Purfideas", "author_id": 4615, "author_profile": "http...
2008/09/19
[ "https://Stackoverflow.com/questions/101461", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17801/" ]
101,463
<p>I know how to change the schema of a table in SQL server 2005:</p> <pre><code>ALTER SCHEMA NewSchama TRANSFER dbo.Table1 </code></pre> <p>But how can i check and/or alter stored procedures that use the old schema name?</p> <p>Sorry: I mean: There are stored procedures that have the old schema name of the table in...
[ { "answer_id": 45588910, "author": "Luqman Cheema", "author_id": 4411751, "author_profile": "https://Stackoverflow.com/users/4411751", "pm_score": 0, "selected": false, "text": "CREATE SCHEMA Reporting\n ALTER SCHEMA Reporting TRANSFER dbo.Reports \n ALTER SCHEMA 'newSchema' TRANSFER 'ol...
2008/09/19
[ "https://Stackoverflow.com/questions/101463", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13262/" ]
101,470
<p>Does anybody know if there is a feasible way on Windows XP to programmatically create and configure a user account so that after logging in from the console (no terminal services) a specific app is launched and the user is "locked" to that app ?</p> <p>The user should be prevented from doing anything else with the ...
[ { "answer_id": 483553, "author": "Chris Becke", "author_id": 27491, "author_profile": "https://Stackoverflow.com/users/27491", "pm_score": 2, "selected": false, "text": "[SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Image File Execution Options\\taskmgr.exe]\nDebugger=\"A path to an ...
2008/09/19
[ "https://Stackoverflow.com/questions/101470", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18780/" ]
101,487
<p>I have some code which collects points (consed integers) from a loop which looks something like this:</p> <pre><code>(loop for x from 1 to 100 for y from 100 downto 1 collect `(,x . ,y)) </code></pre> <p>My question is, is it correct to use <code>`(,x . ,y)</code> in this situation?</p> <p>E...
[ { "answer_id": 101503, "author": "Kyle Cronin", "author_id": 658, "author_profile": "https://Stackoverflow.com/users/658", "pm_score": 1, "selected": false, "text": "(cons x y)\n (defun genint (stop)\n (if (= stop 1) '(1)\n (append (genint (- stop 1)) (list stop))))\n\n(defun genpa...
2008/09/19
[ "https://Stackoverflow.com/questions/101487", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7780/" ]
101,497
<p>I have Flex Builder 3 installed on two Windows machines and the same project on both of them. On one computer, the CSS styles I defined are shown in design view; on the other computer they are not applied. Is there any reason why it might not work on one?</p>
[ { "answer_id": 101503, "author": "Kyle Cronin", "author_id": 658, "author_profile": "https://Stackoverflow.com/users/658", "pm_score": 1, "selected": false, "text": "(cons x y)\n (defun genint (stop)\n (if (= stop 1) '(1)\n (append (genint (- stop 1)) (list stop))))\n\n(defun genpa...
2008/09/19
[ "https://Stackoverflow.com/questions/101497", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15525/" ]
101,532
<p>When I run a Flex application in the debug flash player I get an exception pop up as soon as something unexpected happened. However when a customer uses the application he does not use the debug flash player. In this case he does not get an exception pop up, but he UI is not working.</p> <p>So for supportability re...
[ { "answer_id": 101953, "author": "Richard Szalay", "author_id": 3603, "author_profile": "https://Stackoverflow.com/users/3603", "pm_score": 7, "selected": true, "text": "public class UncaughtErrorEventExample extends Sprite\n{\n public function UncaughtErrorEventExample()\n {\n ...
2008/09/19
[ "https://Stackoverflow.com/questions/101532", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7524/" ]
101,533
<p>I have created a C# class file by using a XSD-file as an input. One of my properties look like this:</p> <pre><code> private System.DateTime timeField; [System.Xml.Serialization.XmlElementAttribute(DataType="time")] public System.DateTime Time { get { return this.timeField; } set { ...
[ { "answer_id": 101667, "author": "Matt Howells", "author_id": 16881, "author_profile": "https://Stackoverflow.com/users/16881", "pm_score": 5, "selected": false, "text": "[XmlElement(DataType=\"string\",ElementName=\"Time\")]\npublic String TimeString\n{\n get { return this.timeField....
2008/09/19
[ "https://Stackoverflow.com/questions/101533", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2257/" ]
101,536
<p>I am looking for a drop-down JavaScript menu.</p> <p>It should be the simplest and most elegant accessible menu that works in IE6 and Firefox 2 also. It would be fine if it worked on an unnumbered list (<code>ul</code>) so the user can use the page without JavaScript support.</p> <p>Which one do you recommend and ...
[ { "answer_id": 101612, "author": "Daniel Papasian", "author_id": 7548, "author_profile": "https://Stackoverflow.com/users/7548", "pm_score": 2, "selected": false, "text": "\njQuery.fn.ddnav = function() {\n this.wrap(\"\");\n this.each(function() {\n var sel ...
2008/09/19
[ "https://Stackoverflow.com/questions/101536", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18631/" ]
101,540
<p>How do I get an element or element list by it's tag name. Take for example that I want all elements from <code>&lt;h1&gt;&lt;/h1&gt;</code>. ­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­</p>
[ { "answer_id": 101563, "author": "Matthias Kestenholz", "author_id": 317346, "author_profile": "https://Stackoverflow.com/users/317346", "pm_score": 4, "selected": true, "text": "Array.from(document.getElementsByTagName('a')) Array.from(document.querySelectorAll('a')) Array.from()" }, ...
2008/09/19
[ "https://Stackoverflow.com/questions/101540", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6078/" ]
101,541
<p>I've got an application that uses a hibernate(annotations)/mysql combination for ORM. In that application, I got an entity with a Date field. I'm looking for a way to select on that date within a time range (so <code>hh:mm:ss</code> without the date part). </p> <p>In MySQL there's a function <code>TIME(expression)<...
[ { "answer_id": 101615, "author": "Sietse", "author_id": 6400, "author_profile": "https://Stackoverflow.com/users/6400", "pm_score": 2, "selected": false, "text": "second(...), minute(...), hour(...), day(...), month(...), year(...)" }, { "answer_id": 101637, "author": "Adam H...
2008/09/19
[ "https://Stackoverflow.com/questions/101541", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3197/" ]
101,569
<p>I need to write a module to detect similar documents. I have read many papers of fingerprints of documents techniques and others, but I do not know how to write code or implement such a solution. The algorithm should work for Chinese, Japanese, English and German language or be language independent. How can I accomp...
[ { "answer_id": 101605, "author": "nosklo", "author_id": 17160, "author_profile": "https://Stackoverflow.com/users/17160", "pm_score": 3, "selected": false, "text": "get_close_matches() >>> get_close_matches('appel', ['ape', 'apple', 'peach', 'puppy'])\n['apple', 'ape']\n" }, { "a...
2008/09/19
[ "https://Stackoverflow.com/questions/101569", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17451/" ]
101,574
<p>I want a list of hyperlinks on a basic html page, which point to files on our corporate intranet.</p> <p>When a user clicks the link, I want the file to open. They are excel spreadsheets, and this is an intranet environment, so I can count on everyone having Excel installed.</p> <p>I've tried two things:</p> <ol>...
[ { "answer_id": 101586, "author": "diciu", "author_id": 2811, "author_profile": "https://Stackoverflow.com/users/2811", "pm_score": 2, "selected": false, "text": "<a href=\"file://server/directory/file.xlsx\" target=\"_blank\">" }, { "answer_id": 101608, "author": "Sam Reynold...
2008/09/19
[ "https://Stackoverflow.com/questions/101574", "https://Stackoverflow.com", "https://Stackoverflow.com/users/672/" ]
101,597
<p>Let's say I have the following HTML:</p> <pre><code>&lt;table id="foo"&gt; &lt;th class="sortasc"&gt;Header&lt;/th&gt; &lt;/table&gt; &lt;table id="bar"&gt; &lt;th class="sortasc"&gt;Header&lt;/th&gt; &lt;/table&gt; </code></pre> <p>I know that I can do the following to get all of the <strong>th</strong> elem...
[ { "answer_id": 101762, "author": "levik", "author_id": 4465, "author_profile": "https://Stackoverflow.com/users/4465", "pm_score": 2, "selected": false, "text": "var table = document.getElementById('tableId');\nvar headers = table.getElementsByTagName('th');\nvar headersIWant = [];\nfor ...
2008/09/19
[ "https://Stackoverflow.com/questions/101597", "https://Stackoverflow.com", "https://Stackoverflow.com/users/305/" ]
101,604
<p>I decided to try <a href="http://www.screwturn.eu/" rel="nofollow noreferrer">http://www.screwturn.eu/</a> wiki as a code snippet storage utility. So far I am very impressed, but what irkes me is that when I copy paste my code that I want to save, '&lt;'s and '[' (<a href="http://en.wikipedia.org/wiki/Character_enco...
[ { "answer_id": 101650, "author": "oglester", "author_id": 2017, "author_profile": "https://Stackoverflow.com/users/2017", "pm_score": 0, "selected": false, "text": "&gt; &lt;" }, { "answer_id": 101651, "author": "The Brawny Man", "author_id": 11936, "author_profile": ...
2008/09/19
[ "https://Stackoverflow.com/questions/101604", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18664/" ]
101,647
<p>How do you schedule a task in Windows XP to run when you shutdown windows. Such that I want to run a simple command line program I wrote in c# everytime I shut down windows. There doesn't seem to be an option in scheduled tasks to perform this task when my computer shuts down.</p>
[ { "answer_id": 101679, "author": "Neil Neyman", "author_id": 3240, "author_profile": "https://Stackoverflow.com/users/3240", "pm_score": 3, "selected": false, "text": "c:\\directory\\myProgram.exe\nC:\\WINDOWS\\system32\\shutdown.exe -s -f -t 0\n" }, { "answer_id": 45770722, ...
2008/09/19
[ "https://Stackoverflow.com/questions/101647", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6204/" ]
101,664
<p>Is there a setting in ReSharper 4 (or even Visual Studio itself...) that forces a warning if I forget to wrap code in a <code>using</code> block, or omit the proper Dispose call in a <code>finally</code> block?</p>
[ { "answer_id": 102576, "author": "Jay Bazuzi", "author_id": 5314, "author_profile": "https://Stackoverflow.com/users/5314", "pm_score": 2, "selected": false, "text": "Dispose() DEBUG" } ]
2008/09/19
[ "https://Stackoverflow.com/questions/101664", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1853/" ]
101,693
<p>I get an error everytime I upload my webapp to the provider. Because of the customErrors mode, all I see is the default "Runtime error" message, instructing me to turn off customErrors to view more about the error.</p> <p>Exasperated, I've set my web.config to look like this:</p> <pre><code>&lt;?xml version="1.0"?...
[ { "answer_id": 352626, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 8, "selected": true, "text": "<system.web> <deployment retail=\"true\" />\n <deployment retail=\"false\" />\n machine.config %windir%\\Microsoft.NET\\Framewo...
2008/09/19
[ "https://Stackoverflow.com/questions/101693", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3263/" ]
101,708
<p>In VB.net I'm using the TcpClient to retrieve a string of data. I'm constantly checking the .Connected property to verify if the client is connected but even if the client disconnects this still returns true. What can I use as a workaround for this?</p> <p>This is a stripped down version of my current code:</p> ...
[ { "answer_id": 3783019, "author": "Sean P", "author_id": 240405, "author_profile": "https://Stackoverflow.com/users/240405", "pm_score": 1, "selected": false, "text": "if (client.Client.Poll(0, SelectMode.SelectRead))\n{\n byte[] checkConn = new byte[1];\n\n if (client.Client.Recei...
2008/09/19
[ "https://Stackoverflow.com/questions/101708", "https://Stackoverflow.com", "https://Stackoverflow.com/users/77830/" ]
101,709
<p>I am implementing a comment control that allows a person to select comments and have them sent to specified departments. The email needs to be formatted in a specific way, and I was wondering what the best way to do this would be.</p> <p>Should I just hard code all of the style information into one massive method,...
[ { "answer_id": 101760, "author": "Matt Howells", "author_id": 16881, "author_profile": "https://Stackoverflow.com/users/16881", "pm_score": 0, "selected": false, "text": "<p>Dear |FIRST_NAME|,\n" } ]
2008/09/19
[ "https://Stackoverflow.com/questions/101709", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12096/" ]
101,718
<p>What is the best way to draw a variable width line without using glLineWidth? Just draw a rectangle? Various parallel lines? None of the above?</p>
[ { "answer_id": 102156, "author": "Ozgur Ozcitak", "author_id": 976, "author_profile": "https://Stackoverflow.com/users/976", "pm_score": 4, "selected": false, "text": "// Draws a line between (x1,y1) - (x2,y2) with a start thickness of t1 and\n// end thickness t2.\nvoid DrawLine(float x1...
2008/09/19
[ "https://Stackoverflow.com/questions/101718", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12423/" ]
101,742
<p>I have a Google App Engine app - <a href="http://mylovelyapp.appspot.com/" rel="noreferrer">http://mylovelyapp.appspot.com/</a> It has a page - mylovelypage</p> <p>For the moment, the page just does <code>self.response.out.write('OK')</code></p> <p>If I run the following Python at my computer:</p> <pre><code>impo...
[ { "answer_id": 103410, "author": "dalelane", "author_id": 477, "author_profile": "https://Stackoverflow.com/users/477", "pm_score": 5, "selected": false, "text": "import os\nimport urllib\nimport urllib2\nimport cookielib\n\nusers_email_address = \"billy.bob@gmail.com\"\nusers_password ...
2008/09/19
[ "https://Stackoverflow.com/questions/101742", "https://Stackoverflow.com", "https://Stackoverflow.com/users/477/" ]
101,752
<p>I used <code>git pull</code> and had a merge conflict:</p> <pre><code>unmerged: some_file.txt You are in the middle of a conflicted merge. </code></pre> <p>How do I abandon my changes to the file and keep only the pulled changes?</p>
[ { "answer_id": 101773, "author": "David Precious", "author_id": 4040, "author_profile": "https://Stackoverflow.com/users/4040", "pm_score": 7, "selected": false, "text": "git reset git revert svn revert git revert git reset svn revert" }, { "answer_id": 102309, "author": "Pat...
2008/09/19
[ "https://Stackoverflow.com/questions/101752", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18666/" ]
101,754
<p>We are working on an <a href="http://en.wikipedia.org/wiki/S60_%28software_platform%29" rel="noreferrer">S60</a> version and this platform has a nice Python API..</p> <p>However, there is nothing official about Python on Android, but since <a href="http://en.wikipedia.org/wiki/Jython" rel="noreferrer">Jython</a> ex...
[ { "answer_id": 973765, "author": "unmounted", "author_id": 11596, "author_profile": "https://Stackoverflow.com/users/11596", "pm_score": 8, "selected": false, "text": "import android\ndroid = android.Android()\ncode = droid.scanBarcode()\nisbn = int(code['result']['SCAN_RESULT'])\nurl = ...
2008/09/19
[ "https://Stackoverflow.com/questions/101754", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9951/" ]
101,767
<p>I'm trying to use cygwin as a build environment under Windows. I have some dependencies on 3rd party packages, for example, GTK+. </p> <p>Normally when I build under Linux, in my Makefile I can add a call to pkg-config as an argument to gcc, so it comes out like so:</p> <pre> gcc example.c `pkg-config --libs --cfl...
[ { "answer_id": 102136, "author": "Tobias Kunze", "author_id": 6070, "author_profile": "https://Stackoverflow.com/users/6070", "pm_score": 2, "selected": false, "text": "which make\nmake --version\n" }, { "answer_id": 102543, "author": "Tobias Kunze", "author_id": 6070, ...
2008/09/19
[ "https://Stackoverflow.com/questions/101767", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16080/" ]
101,777
<p>Let's say I have this code:</p> <pre><code>if (md5($_POST[$foo['bar']]) == $somemd5) { doSomethingWith(md5($_POST[$foo['bar']]); } </code></pre> <p>I could shorten that down by doing:</p> <pre><code>$value = md5($_POST[$foo['bar']]; if ($value == $somemd5) { doSomethingWith($value); } </code></pre> <p>But is...
[ { "answer_id": 101867, "author": "Paweł Hajdan", "author_id": 9403, "author_profile": "https://Stackoverflow.com/users/9403", "pm_score": 1, "selected": false, "text": " doSomethingWith($value);\n" } ]
2008/09/19
[ "https://Stackoverflow.com/questions/101777", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15214/" ]
101,783
<p>Anyone happen to have a sample script for recursing a given directory in a filesystem with Powershell? Ultimately what I'm wanting to do is create a script that will generate NSIS file lists for me given a directory. Something very similar to what was done <a href="http://blogs.oracle.com/duffblog/2006/12/dynamic_fi...
[ { "answer_id": 106413, "author": "halr9000", "author_id": 6637, "author_profile": "https://Stackoverflow.com/users/6637", "pm_score": 2, "selected": false, "text": "$path = \"c:\\path\\to\\program\"\n$installFiles = \"installfiles_list.txt\"\n$uninstFiles = \"uninstfiles_list.txt\"\n$fil...
2008/09/19
[ "https://Stackoverflow.com/questions/101783", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18831/" ]
101,806
<p>I am working on an application that installs a system wide keyboard hook. I do not want to install this hook when I am running a debug build from inside the visual studio (or else it would hang the studio and eventually the system), and I can avoid this by checking if the DEBUG symbol is defined.</p> <p>However, wh...
[ { "answer_id": 101812, "author": "TraumaPony", "author_id": 18658, "author_profile": "https://Stackoverflow.com/users/18658", "pm_score": 7, "selected": true, "text": "System.Diagnostics.Debugger.IsAttached" }, { "answer_id": 101915, "author": "William Casarin", "author_i...
2008/09/19
[ "https://Stackoverflow.com/questions/101806", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17378/" ]
101,825
<p>That is, I'd like to have a tuple of values.</p> <p>The use case on my mind:</p> <pre><code>Dictionary&lt;Pair&lt;string, int&gt;, object&gt; </code></pre> <p>or</p> <pre><code>Dictionary&lt;Triple&lt;string, int, int&gt;, object&gt; </code></pre> <p>Are there built-in types like Pair or Triple? Or what's the b...
[ { "answer_id": 101858, "author": "Timothy Carter", "author_id": 4660, "author_profile": "https://Stackoverflow.com/users/4660", "pm_score": 4, "selected": false, "text": "public struct Pair<T1, T2>\n{\n public T1 First;\n public T2 Second;\n}\n\npublic struct Triple<T1, T2, T3>\n{\...
2008/09/19
[ "https://Stackoverflow.com/questions/101825", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2351099/" ]
101,850
<p>Take this code:</p> <pre><code>&lt;?php if (isset($_POST['action']) &amp;&amp; !empty($_POST['action'])) { $action = $_POST['action']; } if ($action) { echo $action; } else { echo 'No variable'; } ?&gt; </code></pre> <p>And then access the file with ?action=test Is there any way of preventing $action...
[ { "answer_id": 101879, "author": "owenmarshall", "author_id": 9806, "author_profile": "https://Stackoverflow.com/users/9806", "pm_score": 6, "selected": true, "text": "register_globals" }, { "answer_id": 101898, "author": "Lucas Oman", "author_id": 6726, "author_profi...
2008/09/19
[ "https://Stackoverflow.com/questions/101850", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15214/" ]
101,868
<p>Is there any easy to install/use (on unix) database migration tools like Rails Migrations? I really like the idea, but installing ruby/rails purely to manage my database migrations seems overkill.</p>
[ { "answer_id": 102353, "author": "Otto", "author_id": 9594, "author_profile": "https://Stackoverflow.com/users/9594", "pm_score": 1, "selected": false, "text": "rake db/migrate activerecord actviesupport railties" }, { "answer_id": 104903, "author": "Ryan McGeary", "autho...
2008/09/19
[ "https://Stackoverflow.com/questions/101868", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3839/" ]
101,877
<p>How can I add Page transitions effects like IE in Safari for web pages?</p>
[ { "answer_id": 101961, "author": "Ilya Kochetov", "author_id": 15329, "author_profile": "https://Stackoverflow.com/users/15329", "pm_score": 3, "selected": true, "text": "var xmlhttp;\nvar timerId = 0;\nvar op = 1;\n\nfunction getPageFx() {\n url = \"/transpage2.html\";\n if (window.XM...
2008/09/19
[ "https://Stackoverflow.com/questions/101877", "https://Stackoverflow.com", "https://Stackoverflow.com/users/191/" ]
101,880
<ul> <li>I start up my application which uses a Jetty server, using port 9000.</li> <li>I then shut down my application with Ctrl-C</li> <li>I check with "netstat -a" and see that the port 9000 is no longer being used.</li> <li>I restart my application and get:</li> </ul> <blockquote> <pre><code>[ERROR,9/19 15:31:08] ...
[ { "answer_id": 101906, "author": "freespace", "author_id": 8297, "author_profile": "https://Stackoverflow.com/users/8297", "pm_score": 1, "selected": false, "text": "setReuseAddress(true) bind()" } ]
2008/09/19
[ "https://Stackoverflow.com/questions/101880", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6583/" ]
101,893
<p>This concept is a new one for me -- I first came across it at the <a href="http://developer.yahoo.com/yui/articles/hosting/#configure" rel="nofollow noreferrer">YUI dependency configurator</a>. Basically, instead of having multiple requests for many files, the files are chained into one http request to cut down on p...
[ { "answer_id": 101941, "author": "David McLaughlin", "author_id": 3404, "author_profile": "https://Stackoverflow.com/users/3404", "pm_score": 4, "selected": true, "text": "perl build-project-master.pl core.js class1.js etc.js /path/to/live/js/file.js\n" }, { "answer_id": 14414073...
2008/09/19
[ "https://Stackoverflow.com/questions/101893", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13243/" ]
101,935
<p>Is there a way (without installing any libraries) of validating XML using a custom DTD in PHP?</p>
[ { "answer_id": 101962, "author": "owenmarshall", "author_id": 9806, "author_profile": "https://Stackoverflow.com/users/9806", "pm_score": 4, "selected": true, "text": "<?php\n$dom = new DOMDocument;\n$dom->Load('book.xml');\nif ($dom->validate()) {\n echo \"This document is valid!\\n\...
2008/09/19
[ "https://Stackoverflow.com/questions/101935", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18856/" ]
101,949
<p>I am using WPF and I have an image of an 8.5" * 11" piece of paper on a Canvas. I am then rotating the image using a RotateTransform, with the axis being in the middle of the page (that is, RotateTransformOrigin="0.5,0.5"). How can I find the actual location on the canvas of the corners of the image?</p>
[ { "answer_id": 106585, "author": "Jobi Joy", "author_id": 8091, "author_profile": "https://Stackoverflow.com/users/8091", "pm_score": 0, "selected": false, "text": "_image.TranslatePoint(new Point(0, 0), _canvas);\n" } ]
2008/09/19
[ "https://Stackoverflow.com/questions/101949", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18153/" ]
101,958
<p>I recently discovered that our company has a set of coding guidelines (hidden away in a document management system where no one can find it). It generally seems pretty sensible, and keeps away from the usual religious wars about where to put '{'s and whether to use hard tabs. However, it does suggest that "lines SHO...
[ { "answer_id": 101984, "author": "VonC", "author_id": 6309, "author_profile": "https://Stackoverflow.com/users/6309", "pm_score": 5, "selected": false, "text": "gofmt rustfmt" }, { "answer_id": 102048, "author": "Onorio Catenacci", "author_id": 2820, "author_profile":...
2008/09/19
[ "https://Stackoverflow.com/questions/101958", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1105/" ]
101,986
<p>A sysadmin teacher told me one day that I should learn to use "make" because I could use it for a lot of other things that just triggering complilations.</p> <p>I never got the chance to talk longer about it. Do you have any good example ?</p> <p>As a bonus, isn't it this tool deprecated, and what are modern alter...
[ { "answer_id": 102051, "author": "tzot", "author_id": 6899, "author_profile": "https://Stackoverflow.com/users/6899", "pm_score": 0, "selected": false, "text": "postfix squid POSTMAP=/usr/sbin/postmap\nPOSTFIX=/usr/sbin/postfix\n\nHASHES=transport access virtual canonical relocated annoy...
2008/09/19
[ "https://Stackoverflow.com/questions/101986", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9951/" ]
102,003
<p>The default 64 MB max heap memory can be small for a large Java application. Are there any applet parameter to increment this for a signed applet?</p> <p>For a Java program this is a simple command line parameter but how this work for an applet in the browser.</p>
[ { "answer_id": 4149222, "author": "Mayur", "author_id": 503789, "author_profile": "https://Stackoverflow.com/users/503789", "pm_score": 2, "selected": false, "text": "j2se version=\"1.6+\" initial-heap-size=\"256m\" max-heap-size=\"1024m\"\n href=\"http://java.sun.com/products/autodl/...
2008/09/19
[ "https://Stackoverflow.com/questions/102003", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12631/" ]
102,009
<p>In C++, when is it best to use the stack? When is it best to use the heap?</p>
[ { "answer_id": 102145, "author": "Doug T.", "author_id": 8123, "author_profile": "https://Stackoverflow.com/users/8123", "pm_score": 4, "selected": false, "text": "int main()\n{ \n if (...)\n {\n int i = 0;\n }\n // I know that i is no longer needed here, so declaring i in t...
2008/09/19
[ "https://Stackoverflow.com/questions/102009", "https://Stackoverflow.com", "https://Stackoverflow.com/users/75350/" ]
102,049
<p>For example:</p> <pre><code>me$ FOO="BAR * BAR" me$ echo $FOO BAR file1 file2 file3 file4 BAR </code></pre> <p>and using the <code>\</code> escape character:</p> <pre><code>me$ FOO="BAR \* BAR" me$ echo $FOO BAR \* BAR </code></pre> <p>I'm obviously doing something stupid.</p> <p>How do I get the output <code>B...
[ { "answer_id": 102073, "author": "tzot", "author_id": 6899, "author_profile": "https://Stackoverflow.com/users/6899", "pm_score": 3, "selected": false, "text": "FOO='BAR * BAR'\necho \"$FOO\"\n" }, { "answer_id": 102074, "author": "Rafał Dowgird", "author_id": 12166, ...
2008/09/19
[ "https://Stackoverflow.com/questions/102049", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2108/" ]
102,055
<p>I am trying to make a div, that when you click it turns into an input box, and focuses it. I am using prototype to achieve this. This works in both Chrome and Firefox, but not in IE. IE refuses to focus the newly added input field, even if I set a 1 second timeout.</p> <p>Basically the code works like this:</p> <p...
[ { "answer_id": 102152, "author": "17 of 26", "author_id": 2284, "author_profile": "https://Stackoverflow.com/users/2284", "pm_score": 3, "selected": true, "text": "setTimeout(\"setFocus\", 0);\n\nfunction setFocus()\n{\n editElement.focus();\n}\n" } ]
2008/09/19
[ "https://Stackoverflow.com/questions/102055", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3355/" ]