qid int64 4 19.1M | question stringlengths 18 48.3k | answers list | date stringlengths 10 10 | metadata list |
|---|---|---|---|---|
157,959 | <p>When I ssh into a remote production server I would like the colour scheme of my terminal window to change to something brigh and scary, preferably red, to warn me that I am touching a live scary server. </p>
<p>How can I make it automatically detect that I have ssh'ed somewhere, and if that somewhere is on a specif... | [
{
"answer_id": 157984,
"author": "Milhous",
"author_id": 17712,
"author_profile": "https://Stackoverflow.com/users/17712",
"pm_score": 3,
"selected": false,
"text": "red='\\e[0;31m'\nPS1=\"$\\[${red}\\]\"\n #touch .bashrc\n"
},
{
"answer_id": 158170,
"author": "skymt",
"a... | 2008/10/01 | [
"https://Stackoverflow.com/questions/157959",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7473/"
] |
158,008 | <p>I'm updating some old AWStats config files to filter out some specific IP ranges. Here's the pertinent section of the config file:</p>
<pre><code># Do not include access from clients that match following criteria.
# If your log file contains IP addresses in host field, you must enter here
# matching IP addresses cr... | [
{
"answer_id": 158086,
"author": "Casper",
"author_id": 18729,
"author_profile": "https://Stackoverflow.com/users/18729",
"pm_score": 0,
"selected": false,
"text": "c:\\perlpath\\perl.exe awstats.pl config=yourconfigfile -update -logfile=yourlogfile\n"
},
{
"answer_id": 158114,
... | 2008/10/01 | [
"https://Stackoverflow.com/questions/158008",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/751/"
] |
158,044 | <p>How do I use the UNIX command <code>find</code> to search for files created on a specific date?</p>
| [
{
"answer_id": 158074,
"author": "Jeff MacDonald",
"author_id": 22374,
"author_profile": "https://Stackoverflow.com/users/22374",
"pm_score": 5,
"selected": false,
"text": "find ./ -type f -ls |grep '10 Sep'\n [root@pbx etc]# find /var/ -type f -ls | grep \"Dec 24\"\n791235 4 -rw-r--r... | 2008/10/01 | [
"https://Stackoverflow.com/questions/158044",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/473/"
] |
158,070 | <p>I have a hidden DIV which contains a toolbar-like menu.</p>
<p>I have a number of DIVs which are enabled to show the menu DIV when the mouse hovers over them.</p>
<p>Is there a built-in function which will move the menu DIV to the top right of the active (mouse hover) DIV? I'm looking for something like <code>$(me... | [
{
"answer_id": 158176,
"author": "Jacob",
"author_id": 22107,
"author_profile": "https://Stackoverflow.com/users/22107",
"pm_score": 9,
"selected": false,
"text": "<div id=\"menu\" style=\"display: none;\">\n <!-- menu stuff in here -->\n <ul><li>Menu item</li></ul>\n</div>\n\n<div c... | 2008/10/01 | [
"https://Stackoverflow.com/questions/158070",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11249/"
] |
158,104 | <p>I've discovered that any time I do the following:</p>
<pre><code>echo '<a href="http://" title="bla">huzzah</a>';
</code></pre>
<p>I end up with the following being rendered to the browser:</p>
<pre><code><a href="http:///" title="bla">huzzah</a>
</code></pre>
<p>This is particularly anno... | [
{
"answer_id": 158115,
"author": "Fire Lancer",
"author_id": 6266,
"author_profile": "https://Stackoverflow.com/users/6266",
"pm_score": 2,
"selected": false,
"text": "echo '<a href=\"http://someothersite.com\">Link</a>';\necho '<a href=\"anotherpage.php\">Some page</a>';\necho '<a href=... | 2008/10/01 | [
"https://Stackoverflow.com/questions/158104",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/22216/"
] |
158,121 | <p>Using the Sun Java VM 1.5 or 1.6 on Windows, I connect a non-blocking socket. I then fill a <code>ByteBuffer</code> with a message to output, and attempt to <code>write()</code> to the SocketChannel.</p>
<p>I expect the write to complete only partially if the amount to be written is greater than the amount of spac... | [
{
"answer_id": 158144,
"author": "Clay",
"author_id": 16429,
"author_profile": "https://Stackoverflow.com/users/16429",
"pm_score": 0,
"selected": false,
"text": "SO_SNDBUF"
},
{
"answer_id": 158409,
"author": "Alexander",
"author_id": 16724,
"author_profile": "https:... | 2008/10/01 | [
"https://Stackoverflow.com/questions/158121",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/24173/"
] |
158,122 | <p>I have what I believe to be a fairly well structured .NET 3.5 forms application (Unit Tests, Dependency Injection, SoC, the forms simply relay input and display output and don't do any logic, yadda yadda) I am just missing the winforms knowledge for how to get this bit to work.</p>
<p>When a connection to the datab... | [
{
"answer_id": 158286,
"author": "RickL",
"author_id": 7261,
"author_profile": "https://Stackoverflow.com/users/7261",
"pm_score": 2,
"selected": false,
"text": " public new void Hide()\n {\n if (this.InvokeRequired)\n {\n this.BeginInvoke((MethodInvoker)de... | 2008/10/01 | [
"https://Stackoverflow.com/questions/158122",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5056/"
] |
158,124 | <p>It's surprising how difficult it is to find a simple, concise answer to this question:</p>
<ol>
<li>I have a file, foo.zip, on my website</li>
<li>What can I do to find out how many people have accessed this file?</li>
<li>I could use Tomcat calls if necessary</li>
</ol>
| [
{
"answer_id": 158142,
"author": "Sean Bright",
"author_id": 21926,
"author_profile": "https://Stackoverflow.com/users/21926",
"pm_score": 5,
"selected": true,
"text": "grep foo.zip /path/to/access.log | grep 200 | wc -l\n"
},
{
"answer_id": 12405503,
"author": "Ashraf Zaman"... | 2008/10/01 | [
"https://Stackoverflow.com/questions/158124",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2197/"
] |
158,133 | <p>They both seem to fulfill the same purpose. When would I chose one over the other?</p>
| [
{
"answer_id": 9672255,
"author": "Brian Gideon",
"author_id": 158779,
"author_profile": "https://Stackoverflow.com/users/158779",
"pm_score": 3,
"selected": false,
"text": "WaitHandle Monitor.Wait Monitor.Pulse Monitor.Wait Monitor.Pulse Monitor Monitor.Wait WaitHandle.WaitOne Wait Wait... | 2008/10/01 | [
"https://Stackoverflow.com/questions/158133",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
158,149 | <p>Is there a way to validate on the client side browser whether the size of a file being uploaded from a JSP page is over a set size limit without forcing the user to upload the entire file only to find out it was too large?</p>
<p>I would like to stay away from any proprietary controls or techniques like Flash or Ac... | [
{
"answer_id": 158179,
"author": "Eli Courtwright",
"author_id": 1694,
"author_profile": "https://Stackoverflow.com/users/1694",
"pm_score": 3,
"selected": true,
"text": "request.getHeader(\"Content-Length\")"
}
] | 2008/10/01 | [
"https://Stackoverflow.com/questions/158149",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5061/"
] |
158,151 | <p>Is there a one button way to save a screenshot directly to a file in Windows?</p>
<br>
TheSoftwareJedi accurately answered above question for Windows 8 and 10. Below original extra material remains for posterity.
<blockquote>
<p>This is a very important question as the 316K views shows as of 2021.
Asked in 2008, SO... | [
{
"answer_id": 158171,
"author": "Patrick Desjardins",
"author_id": 13913,
"author_profile": "https://Stackoverflow.com/users/13913",
"pm_score": 7,
"selected": true,
"text": "using System;\nusing System.Drawing;\nusing System.IO;\nusing System.Drawing.Imaging;\nusing System.Runtime.Inte... | 2008/10/01 | [
"https://Stackoverflow.com/questions/158151",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2197/"
] |
158,152 | <p>I have a .NET TCP Client that sends high volumes of messages to a (.NET async) TCP server.</p>
<p>I need to keep sending messages to the server but I run out of ports on the client due to TIME_WAIT. </p>
<p>How can a program continually and reliably send messages without using all of the available ports?</p>
<p>... | [
{
"answer_id": 158199,
"author": "Bill the Lizard",
"author_id": 1288,
"author_profile": "https://Stackoverflow.com/users/1288",
"pm_score": 1,
"selected": false,
"text": "open socket connection\n\nwhile(running)\n send messages over socket\n\nclose socket connection\n"
},
{
"... | 2008/10/01 | [
"https://Stackoverflow.com/questions/158152",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/21826/"
] |
158,172 | <p>I have some decimal data that I am pushing into a SharePoint list where it is to be viewed. I'd like to restrict the number of significant figures displayed in the result data based on my knowledge of the specific calculation. Sometimes it'll be 3, so 12345 will become 12300 and 0.012345 will become 0.0123. Occas... | [
{
"answer_id": 158810,
"author": "Community",
"author_id": -1,
"author_profile": "https://Stackoverflow.com/users/-1",
"pm_score": -1,
"selected": false,
"text": "private static string FormatToSignificantFigures(decimal number, int amount)\n{\n if (number > 1)\n {\n int fact... | 2008/10/01 | [
"https://Stackoverflow.com/questions/158172",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/404/"
] |
158,174 | <p>I've been reading through a lot of the rookie Java questions on <code>finalize()</code> and find it kind of bewildering that no one has really made it plain that finalize() is an unreliable way to clean up resources. I saw someone comment that they use it to clean up Connections, which is really scary since the onl... | [
{
"answer_id": 158196,
"author": "Paul Tomblin",
"author_id": 3333,
"author_profile": "https://Stackoverflow.com/users/3333",
"pm_score": 5,
"selected": false,
"text": "finalize()"
},
{
"answer_id": 158216,
"author": "John M",
"author_id": 20734,
"author_profile": "ht... | 2008/10/01 | [
"https://Stackoverflow.com/questions/158174",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8528/"
] |
158,175 | <p>How can you relatively position elements in WPF?
The standard model is to use layout managers for everything, but what if you want to position elements (on a Canvas, for example) simply based on the position of other elements?</p>
<p>For example, you may want one element (say a button) to be attached the side of an... | [
{
"answer_id": 161532,
"author": "Dave Arkell",
"author_id": 4002,
"author_profile": "https://Stackoverflow.com/users/4002",
"pm_score": 4,
"selected": false,
"text": "<Canvas>\n <StackPanel Canvas.Left=\"100\" Canvas.Top=\"100\" Orientation=\"Horizontal\">\n <Button>Button 1</Button... | 2008/10/01 | [
"https://Stackoverflow.com/questions/158175",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/24177/"
] |
158,189 | <p><a href="http://www.techonthenet.com/oracle/functions/trunc_date.php]" rel="noreferrer">This page</a> mentions how to trunc a timestamp to minutes/hours/etc. in Oracle.</p>
<p>How would you trunc a timestamp to seconds in the same manner?</p>
| [
{
"answer_id": 158252,
"author": "Tony Andrews",
"author_id": 18747,
"author_profile": "https://Stackoverflow.com/users/18747",
"pm_score": 6,
"selected": true,
"text": "DATE TRUNC TIMESTAMP DATE select cast(systimestamp as date) \n from dual;\n"
},
{
"answer_id": 158322,
"a... | 2008/10/01 | [
"https://Stackoverflow.com/questions/158189",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/686/"
] |
158,209 | <p>curious if anyone might have some insight in how I would do the following to a binary number:</p>
<p>convert </p>
<pre><code> 01+0 -> 10+1 (+ as in regular expressions, one or more)
01 -> 10
10 -> 01
</code></pre>
<p>so,</p>
<pre><code>10101000010100011100
01010100101010100010
</code></pr... | [
{
"answer_id": 158258,
"author": "Uhall",
"author_id": 19129,
"author_profile": "https://Stackoverflow.com/users/19129",
"pm_score": 5,
"selected": true,
"text": "unsigned myBitOperation(unsigned x)\n{\n return ((x<<1) | (x>>1)) & (~x);\n}\n"
}
] | 2008/10/01 | [
"https://Stackoverflow.com/questions/158209",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/157/"
] |
158,219 | <p>I have a C# application that includes the following code:</p>
<pre><code>string file = "relativePath.txt";
//Time elapses...
string contents = File.ReadAllText(file);
</code></pre>
<p>This works fine, most of the time. The file is read relative to the directory that the app was started from. However, in testin... | [
{
"answer_id": 158292,
"author": "Greg B",
"author_id": 1741868,
"author_profile": "https://Stackoverflow.com/users/1741868",
"pm_score": 1,
"selected": false,
"text": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Windows.Forms;\n... | 2008/10/01 | [
"https://Stackoverflow.com/questions/158219",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/96/"
] |
158,232 | <p>After following the instructions in INSTALL.W64 I have two problems:</p>
<ul>
<li>The code is still written to the "out32" folder. I need to be able to link to both 32-bit and 64-bit versions of the library on my workstation, so I don't want the 64-bit versions to clobber the 32-bit libs.</li>
<li>The output is sti... | [
{
"answer_id": 5218838,
"author": "lrascao",
"author_id": 648012,
"author_profile": "https://Stackoverflow.com/users/648012",
"pm_score": 1,
"selected": false,
"text": " echo \"Building x64 OpenSSL\"\n # save the path of the x86 msdev\n MSDEVPATH_x86=$MSDEVPATH\n # and set a new var with... | 2008/10/01 | [
"https://Stackoverflow.com/questions/158232",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/21784/"
] |
158,241 | <p>What I want to do is to remove all accents and umlauts from a string, turning "lärm" into "larm" or "andré" into "andre". What I tried to do was to utf8_decode the string and then use strtr on it, but since my source file is saved as UTF-8 file, I can't enter the ISO-8859-15 characters for all umlauts - the editor i... | [
{
"answer_id": 158247,
"author": "BlaM",
"author_id": 999,
"author_profile": "https://Stackoverflow.com/users/999",
"pm_score": 1,
"selected": false,
"text": "echo strtr(utf8_decode($input), \n utf8_decode('ŠŒŽšœžŸ¥µÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýÿ')... | 2008/10/01 | [
"https://Stackoverflow.com/questions/158241",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/999/"
] |
158,268 | <p>Ok I have two modules, each containing a class, the problem is their classes reference each other.</p>
<p>Lets say for example I had a room module and a person module containing CRoom and CPerson.</p>
<p>The CRoom class contains infomation about the room, and a CPerson list of every one in the room.</p>
<p>The CP... | [
{
"answer_id": 158326,
"author": "Brian",
"author_id": 9493,
"author_profile": "https://Stackoverflow.com/users/9493",
"pm_score": 3,
"selected": false,
"text": " class CRoom(object):\n person = CPerson(\"a person\")\n class CRoom(object):\n def getPerson(self): return CPerson(\"s... | 2008/10/01 | [
"https://Stackoverflow.com/questions/158268",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6266/"
] |
158,279 | <p>I've updated <strong>php.ini</strong> and moved <strong>php_mysql.dll</strong> as explained in <a href="https://stackoverflow.com/questions/11919/how-do-i-get-php-and-mysql-working-on-iis-70#94341">steps 6 and 8 here.</a></p>
<p>I get this error…</p>
<pre>Fatal error: Call to undefined function mysql_connec... | [
{
"answer_id": 158538,
"author": "Richard Harrison",
"author_id": 19624,
"author_profile": "https://Stackoverflow.com/users/19624",
"pm_score": 4,
"selected": true,
"text": "extension_dir = \"H:\\apps\\php\\ext\\\"\nextension=php_mysql.dll\n"
}
] | 2008/10/01 | [
"https://Stackoverflow.com/questions/158279",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/83/"
] |
158,283 | <p>I have two vista Business machines. I have IE 7 installed on both. On my first machine (Computer1) if I go to this site (<a href="http://www.quirksmode.org/js/detect.html" rel="nofollow noreferrer">http://www.quirksmode.org/js/detect.html</a>), it says I am using "Explorer 6 on Windows". If I use Computer2 with V... | [
{
"answer_id": 158378,
"author": "Grant Wagner",
"author_id": 9254,
"author_profile": "https://Stackoverflow.com/users/9254",
"pm_score": 4,
"selected": true,
"text": "Computer1: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; ... | 2008/10/01 | [
"https://Stackoverflow.com/questions/158283",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11771/"
] |
158,310 | <p>Is there a tool (preferably free) which will translate Oracle's PL/SQL stored procedure language into Postgresql's PL/pgSQL stored procedure language?</p>
| [
{
"answer_id": 4037746,
"author": "Community",
"author_id": -1,
"author_profile": "https://Stackoverflow.com/users/-1",
"pm_score": 2,
"selected": false,
"text": "CREATE OR REPLACE FUNCTION trunc(\n parmDate DATE ,\n parmFormat VARCHAR ) \nRETURNS date \nAS $$\nDECLARE\n varPlSql... | 2008/10/01 | [
"https://Stackoverflow.com/questions/158310",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13930/"
] |
158,319 | <p>For all major browsers (except IE), the JavaScript <code>onload</code> event doesn’t fire when the page loads as a result of a back button operation — it only fires when the page is first loaded.</p>
<p>Can someone point me at some sample cross-browser code (Firefox, Opera, Safari, IE, …) that solves this problem? ... | [
{
"answer_id": 158373,
"author": "palehorse",
"author_id": 312,
"author_profile": "https://Stackoverflow.com/users/312",
"pm_score": 3,
"selected": false,
"text": "<html>\n<head>\n <title>Test Page</title>\n <script src=\"http://code.jquery.com/jquery-latest.js\" type=\"text/javasc... | 2008/10/01 | [
"https://Stackoverflow.com/questions/158319",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/24190/"
] |
158,324 | <p>I have a basic model in which i have specified some of the fields to validate the presence of. in the create action in the controller i do the standard:</p>
<pre><code>@obj = SomeObject.new(params[:some_obj])
if @obj.save
flash[:notice] = "ok"
redirect...
else
flash[:error] = @obj.errors.full_messages.collec... | [
{
"answer_id": 158499,
"author": "Ryan Bigg",
"author_id": 15245,
"author_profile": "https://Stackoverflow.com/users/15245",
"pm_score": 4,
"selected": true,
"text": "render :action => :new"
},
{
"answer_id": 161156,
"author": "Grant Hutchins",
"author_id": 6304,
"aut... | 2008/10/01 | [
"https://Stackoverflow.com/questions/158324",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18811/"
] |
158,330 | <p>I am starting a project for which we will have a thin client, sending requests and getting responses from a server.</p>
<p>We are still in the planning stages, so we have a choice to settle on either an Eclipse based GUI (Eclipse plugin) or using GWT as a fromtend for the application.</p>
<p>I am not very familiar... | [
{
"answer_id": 158499,
"author": "Ryan Bigg",
"author_id": 15245,
"author_profile": "https://Stackoverflow.com/users/15245",
"pm_score": 4,
"selected": true,
"text": "render :action => :new"
},
{
"answer_id": 161156,
"author": "Grant Hutchins",
"author_id": 6304,
"aut... | 2008/10/01 | [
"https://Stackoverflow.com/questions/158330",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7780/"
] |
158,336 | <p>I need to remove temp files on Tomcat startup, the pass to a folder which contains temp files is in applicationContext.xml.</p>
<p>Is there a way to run a method/class only on Tomcat startup?</p>
| [
{
"answer_id": 158358,
"author": "skaffman",
"author_id": 21234,
"author_profile": "https://Stackoverflow.com/users/21234",
"pm_score": 7,
"selected": true,
"text": "ServletContextListener contextInitialized() <listener>\n <listener-class>my.Listener</listener-class>\n</listener>\n pac... | 2008/10/01 | [
"https://Stackoverflow.com/questions/158336",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/23968/"
] |
158,341 | <p>Is there a way to turn this 'feature' off? </p>
| [
{
"answer_id": 158351,
"author": "Shawn",
"author_id": 26,
"author_profile": "https://Stackoverflow.com/users/26",
"pm_score": 4,
"selected": true,
"text": "Tools -> Options -> Sql Server Object Explorer -> General Scripting Options Script USE <database> -> False"
}
] | 2008/10/01 | [
"https://Stackoverflow.com/questions/158341",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/26/"
] |
158,359 | <p>I need to know, from within Powershell, if the current drive is a mapped drive or not.</p>
<p>Unfortunately, Get-PSDrive is not working "as expected":</p>
<pre><code>PS:24 H:\temp
>get-psdrive h
Name Provider Root CurrentLocation
---- -------- ---- ---------------
H Fi... | [
{
"answer_id": 158456,
"author": "Jeff Stong",
"author_id": 2459,
"author_profile": "https://Stackoverflow.com/users/2459",
"pm_score": 4,
"selected": true,
"text": "PS H:\\> $x = new-object system.io.driveinfo(\"h:\\\")\nPS H:\\> $x.drivetype\nNetwork\n"
},
{
"answer_id": 158518... | 2008/10/01 | [
"https://Stackoverflow.com/questions/158359",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12344/"
] |
158,371 | <p>I have recently inherited a couple of applications that run as windows services, and I am having problems providing a gui (accessible from a context menu in system tray) with both of them.</p>
<p>The reason why we need a gui for a windows service is in order to be able to re-configure the behaviour of the windows s... | [
{
"answer_id": 158425,
"author": "Mihai Limbășan",
"author_id": 14444,
"author_profile": "https://Stackoverflow.com/users/14444",
"pm_score": 3,
"selected": false,
"text": "GetMachineAccountSid()"
},
{
"answer_id": 158537,
"author": "mdb",
"author_id": 8562,
"author_p... | 2008/10/01 | [
"https://Stackoverflow.com/questions/158371",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/24175/"
] |
158,375 | <p>I want to clear the Firebug console of the JavaScript already sent.</p>
<p>Does something like <code>console.clear()</code> exist and work?</p>
| [
{
"answer_id": 158452,
"author": "James",
"author_id": 21677,
"author_profile": "https://Stackoverflow.com/users/21677",
"pm_score": 3,
"selected": false,
"text": "for(var i in console) {\n console.log(i);\n}\n"
},
{
"answer_id": 657368,
"author": "Community",
"author_... | 2008/10/01 | [
"https://Stackoverflow.com/questions/158375",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/24197/"
] |
158,382 | <p>For some reason, lately the *.UDL files on many of my client systems are no longer compatible as they were once saved as ANSI files, which is no longer compatible with the expected UNICODE file format. The end result is an error dialog which states "the file is not a valid compound file". </p>
<p>What is the easi... | [
{
"answer_id": 158435,
"author": "gabr",
"author_id": 4997,
"author_profile": "https://Stackoverflow.com/users/4997",
"pm_score": 4,
"selected": true,
"text": "var\n strAnsi : TGpTextFile;\n strUnicode: TGpTextFile;\nbegin\n strAnsi := TGpTextFile.Create('c:\\0\\test.udl');\n try\n... | 2008/10/01 | [
"https://Stackoverflow.com/questions/158382",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9217/"
] |
158,384 | <p>If I use mod_rewrite to control all my 301 redirects, does this happen before my page is served? so if I also have a bunch of redirect rules in a php script that runs on my page, will the .htaccess kick in first?</p>
| [
{
"answer_id": 2095929,
"author": "DrDol",
"author_id": 254234,
"author_profile": "https://Stackoverflow.com/users/254234",
"pm_score": 1,
"selected": false,
"text": "wget -S --spider http://yourdomain.com\n"
},
{
"answer_id": 12573644,
"author": "Lucas",
"author_id": 113... | 2008/10/01 | [
"https://Stackoverflow.com/questions/158384",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/24200/"
] |
158,388 | <p>I have a little program that I want to make open automatically when my mac is started up.</p>
<p>Because this program accepts command line arguments, its not as simple as just going to System Prefs/Accounts/Login items and adding it there...</p>
<p>From google, I read that I can create a .profile file in my user's... | [
{
"answer_id": 158401,
"author": "rpj",
"author_id": 23498,
"author_profile": "https://Stackoverflow.com/users/23498",
"pm_score": 5,
"selected": true,
"text": "launchd .profile .bashrc"
},
{
"answer_id": 164204,
"author": "Community",
"author_id": -1,
"author_profile... | 2008/10/01 | [
"https://Stackoverflow.com/questions/158388",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/24109/"
] |
158,392 | <p>I'm currently designing a brand new database. In school, we always learned to put a primary key in each table.</p>
<p>I read a lot of articles/discussions/newsgroups posts saying that it's better to use unique constraint (aka unique index for some db) instead of PK.</p>
<p>What's your point of view?</p>
| [
{
"answer_id": 158491,
"author": "Jarrett Meyer",
"author_id": 5834,
"author_profile": "https://Stackoverflow.com/users/5834",
"pm_score": 0,
"selected": false,
"text": "timestamp"
}
] | 2008/10/01 | [
"https://Stackoverflow.com/questions/158392",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17766/"
] |
158,431 | <p>I was wondering if it is possible to not attach Excel sheet if it is empty, and maybe write a different comment in the email if empty.</p>
<p>When I go to report delivery options, there's no such configuration.</p>
<p><strong>Edit</strong>: I'm running SQL Server Reporting Services 2005.</p>
<p>Some possible work... | [
{
"answer_id": 218626,
"author": "Erick B",
"author_id": 1373,
"author_profile": "https://Stackoverflow.com/users/1373",
"pm_score": 0,
"selected": false,
"text": "SELECT * FROM REPORT_SUBSCRIBERS WHERE EXISTS (SELECT QUERY_FROM_YOUR_REPORT)\n SELECT 'person1@domain.com; person2@domain.c... | 2008/10/01 | [
"https://Stackoverflow.com/questions/158431",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5704/"
] |
158,436 | <p>I have written a small ASP.NET application. It runs fine when running it with the small IIS installation that comes with Visual Studio 2005, but not when trying with IIS. I created the virtual directory in IIS where the application is located (done it though both IIS and VS 2005), but it does not work. In the beginn... | [
{
"answer_id": 19309204,
"author": "Pramesh",
"author_id": 2868435,
"author_profile": "https://Stackoverflow.com/users/2868435",
"pm_score": 1,
"selected": false,
"text": "%windir%\\Microsoft.NET\\Framework64\\v4.0.30319\\aspnet_regiis.exe -i\n %windir%\\Microsoft.NET\\Framework\\v4.0.30... | 2008/10/01 | [
"https://Stackoverflow.com/questions/158436",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
158,438 | <p>I have a website where we use Javascript to submit the login form. On Firefox it prompts the user to remember their password, when they login, but on IE7 it doesn't.</p>
<p>After doing some research it looks like the user is only prompted in IE7 when the form is submitted via a Submit control. I've created some s... | [
{
"answer_id": 158550,
"author": "Zack The Human",
"author_id": 18265,
"author_profile": "https://Stackoverflow.com/users/18265",
"pm_score": 4,
"selected": true,
"text": "<html>\n <head>\n <title>test autocomplete</title>\n <script type=\"text/javascript\">\n ... | 2008/10/01 | [
"https://Stackoverflow.com/questions/158438",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/869/"
] |
158,457 | <p>So I have a daemon running on a Linux system, and I want to have a record of its activities: a log. The question is, what is the "best" way to accomplish this?</p>
<p>My first idea is to simply open a file and write to it.</p>
<pre><code>FILE* log = fopen("logfile.log", "w");
/* daemon works...needs to write to lo... | [
{
"answer_id": 158471,
"author": "Vinko Vrsalovic",
"author_id": 5190,
"author_profile": "https://Stackoverflow.com/users/5190",
"pm_score": 8,
"selected": true,
"text": "man 3 syslog\n #include <stdio.h>\n#include <unistd.h>\n#include <syslog.h>\n\nint main(void) {\n\n openlog(\"slog\",... | 2008/10/01 | [
"https://Stackoverflow.com/questions/158457",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12926/"
] |
158,460 | <p>I am looking for a C# library for getting files or directory from a directory using a complex pattern like the one used in Ant:</p>
<ul>
<li><code>dir1/dir2/**/SVN/*</code> --> Matches all files in SVN directories that are located anywhere in the directory tree under dir1/dir2</li>
<li><code>**/test/**</code> --> M... | [
{
"answer_id": 171183,
"author": "Jay Bazuzi",
"author_id": 5314,
"author_profile": "https://Stackoverflow.com/users/5314",
"pm_score": -1,
"selected": false,
"text": "* -> [^\\/]*\n** -> .*\n"
}
] | 2008/10/01 | [
"https://Stackoverflow.com/questions/158460",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12248/"
] |
158,474 | <p>Supposedly, it is possible to get this from Google Maps or some such service. (US addresses only is not good enough.)</p>
| [
{
"answer_id": 15645608,
"author": "Nate Wildermuth",
"author_id": 1535103,
"author_profile": "https://Stackoverflow.com/users/1535103",
"pm_score": 2,
"selected": false,
"text": "function get_lat_long($address) {\n $res = drupal_http_request('http://maps.googleapis.com/maps/api/geocode... | 2008/10/01 | [
"https://Stackoverflow.com/questions/158474",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18651/"
] |
158,479 | <p>I have a PDF file, which contains data that we need to import into a database. The files seem to be pdf scans of printed alphanumeric text. Looks like 10 pt. Times New Roman. </p>
<p>Are there any tools or components that can will allow me to recognize and parse this text?</p>
| [
{
"answer_id": 158824,
"author": "Mark Brackett",
"author_id": 2199,
"author_profile": "https://Stackoverflow.com/users/2199",
"pm_score": 6,
"selected": true,
"text": "' lifted from http://en.wikipedia.org/wiki/Microsoft_Office_Document_Imaging\nDim inputFile As String = \"C:\\test\\mul... | 2008/10/01 | [
"https://Stackoverflow.com/questions/158479",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/24204/"
] |
158,482 | <p>This question is based on <a href="https://stackoverflow.com/questions/150514/custom-method-in-model-to-return-an-object">another question of mine</a>(thankfully answered).</p>
<p>So if in a model I have this:</p>
<pre><code>def self.find_extended
person = Person.find(:first)
complete_name = person.firstna... | [
{
"answer_id": 158504,
"author": "Ryan Bigg",
"author_id": 15245,
"author_profile": "https://Stackoverflow.com/users/15245",
"pm_score": 1,
"selected": false,
"text": "attr_accessor :complete_name\n person.complete_name= person.firstname + ', ' + person.lastname"
},
{
"answer_id"... | 2008/10/01 | [
"https://Stackoverflow.com/questions/158482",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3718/"
] |
158,492 | <p>How do I perform a network login, to access a shared driver for instance, programmatically in c#? The same can be achieved by either attempting to open a share through the explorer, or by the net use shell command.</p>
| [
{
"answer_id": 158530,
"author": "Vivek",
"author_id": 7418,
"author_profile": "https://Stackoverflow.com/users/7418",
"pm_score": 4,
"selected": true,
"text": "[DllImport(\"mpr.dll\")]\n public static extern int WNetAddConnection2A\n (\n [MarshalAs(UnmanagedType.LPArray)] NETRESOUR... | 2008/10/01 | [
"https://Stackoverflow.com/questions/158492",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13855/"
] |
158,502 | <p>I am trying to use the JQuery UI datepicker (latest stable version 1.5.2) on an IE6 website. But I am having the usual problems with combo boxes (selects) on IE6 where they float above other controls. I have tried adding the bgIframe plugin after declaring the datepicker with no luck.</p>
<p>My guess is that the .u... | [
{
"answer_id": 173829,
"author": "Steve Davies",
"author_id": 24209,
"author_profile": "https://Stackoverflow.com/users/24209",
"pm_score": 0,
"selected": false,
"text": "if ($.browser.msie && parseInt($.browser.version, 10) < 7) // fix IE < 7 select problems\n$('iframe.ui-datepicker-cov... | 2008/10/01 | [
"https://Stackoverflow.com/questions/158502",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/24209/"
] |
158,508 | <p>I have some formulas in my reports, and to prevent divsion by zero I do like this in the expression field:</p>
<p>=IIF(Fields!F1.Value <> 0, Fields!F2.Value/Fields!F1.Value, 0)</p>
<p>This normally works fine, but when both F1 and F2 are zero, I get "#Error" in the report, and I get this warning: "The Value exp... | [
{
"answer_id": 158527,
"author": "Joel Coehoorn",
"author_id": 3043,
"author_profile": "https://Stackoverflow.com/users/3043",
"pm_score": 2,
"selected": false,
"text": "Fields!F2.Value/Fields!F1.Value Fields!F1.Value <> 0"
},
{
"answer_id": 159003,
"author": "Bjorn Reppen",
... | 2008/10/01 | [
"https://Stackoverflow.com/questions/158508",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3308/"
] |
158,514 | <p>According to <a href="http://git-scm.com/docs/git-svn" rel="noreferrer">the manual</a>, <code>git dcommit</code> “will create a revision in SVN for each commit in git.” But is there a way to avoid multiple Subversion revisions? That is, to have git merge all changes prior to performing the <code>svn commit</code>?</... | [
{
"answer_id": 158570,
"author": "davetron5000",
"author_id": 3029,
"author_profile": "https://Stackoverflow.com/users/3029",
"pm_score": 6,
"selected": true,
"text": "git-merge --squash"
},
{
"answer_id": 163719,
"author": "andy",
"author_id": 21482,
"author_profile"... | 2008/10/01 | [
"https://Stackoverflow.com/questions/158514",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/446328/"
] |
158,519 | <p>I need advice on how to handle relatively large set of flags in my SQL2k8 table.</p>
<p>Two question, bear with me please :)</p>
<p>Let's say I have 20 flags I'd like to store for one record.</p>
<p>For example:</p>
<p>CanRead = 0x1
CanWrite = 0x2
CanModify = 0x4
...
and so on to the final flag 2^20</p>
<p>Now,... | [
{
"answer_id": 158560,
"author": "Vinko Vrsalovic",
"author_id": 5190,
"author_profile": "https://Stackoverflow.com/users/5190",
"pm_score": 3,
"selected": false,
"text": "WHERE (Permissions & CanWrite) = CanWrite \nOR (Permissions & CanModify) = CanModify\n"
},
{
"answer_id": 15... | 2008/10/01 | [
"https://Stackoverflow.com/questions/158519",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
158,520 | <p>In PowerShell, even if it's possible to know if a drive is a network drive: see <a href="https://stackoverflow.com/questions/158359/in-powershell-how-can-i-determine-if-the-current-drive-is-a-networked-drive-or">In PowerShell, how can I determine if the current drive is a networked drive or not?</a></p>
<p>When I t... | [
{
"answer_id": 158531,
"author": "EBGreen",
"author_id": 1358,
"author_profile": "https://Stackoverflow.com/users/1358",
"pm_score": 3,
"selected": true,
"text": "Get-WMIObject -query \"Select ProviderName From Win32_LogicalDisk Where DeviceID='H:'\"\n"
},
{
"answer_id": 36550346... | 2008/10/01 | [
"https://Stackoverflow.com/questions/158520",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12344/"
] |
158,521 | <p>I have a working LINQ to SQL model. I want to be able to use the same model but with a connection to a DataSet object, instead of SQL Server.</p>
<p>I need to be able to query the model, modify fields, as well as do insert and delete operations. Is there an easy way to accomplish this?</p>
<p>I noticed <a href="... | [
{
"answer_id": 158545,
"author": "Mark Cidade",
"author_id": 1659,
"author_profile": "https://Stackoverflow.com/users/1659",
"pm_score": 2,
"selected": true,
"text": "DataContext.GetChangeSet()"
}
] | 2008/10/01 | [
"https://Stackoverflow.com/questions/158521",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3347/"
] |
158,539 | <p>break line tag is not working in firefox, neither in chrome. When i see the source of my page i get: </p>
<pre><code><p>Zugang zu Testaccount:</br></br>peter petrelli </br></br>sein Standardpwd.</br></br>peter.heroes.com</p>
</code></pre>
<p>However when i do view se... | [
{
"answer_id": 158549,
"author": "Jason Navarrete",
"author_id": 3920,
"author_profile": "https://Stackoverflow.com/users/3920",
"pm_score": 7,
"selected": true,
"text": "<br /> </br>"
},
{
"answer_id": 158551,
"author": "andyuk",
"author_id": 2108,
"author_profile": ... | 2008/10/01 | [
"https://Stackoverflow.com/questions/158539",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2138/"
] |
158,544 | <p>Can you do a better code? I need to check/uncheck all childs according to parent and when an child is checked, check parent, when all childs are unchecked uncheck parent.</p>
<pre><code> $(".parent").children("input").click(function() {
$(this).parent().siblings("input").attr("checked", this.checked);
});
$... | [
{
"answer_id": 159786,
"author": "Hafthor",
"author_id": 4489,
"author_profile": "https://Stackoverflow.com/users/4489",
"pm_score": 2,
"selected": true,
"text": "$(\".parent\").children(\"input\").click(function() {\n $(this).parent().siblings(\"input\").attr(\"checked\", this.checke... | 2008/10/01 | [
"https://Stackoverflow.com/questions/158544",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20683/"
] |
158,546 | <p>I'm creating a networked server for a boggle-clone I wrote in python, which accepts users, solves the boards, and scores the player input. The dictionary file I'm using is 1.8MB (the ENABLE2K dictionary), and I need it to be available to several game solver classes. Right now, I have it so that each class iterates... | [
{
"answer_id": 158753,
"author": "Rodrigo Queiro",
"author_id": 20330,
"author_profile": "https://Stackoverflow.com/users/20330",
"pm_score": 5,
"selected": true,
"text": "import dictionary\n\ndictionary.words[whatever]\n words = {}\n\n# read file and add to 'words'\n"
},
{
"answ... | 2008/10/01 | [
"https://Stackoverflow.com/questions/158546",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/24208/"
] |
158,557 | <p>I've seen that it's possible to get the latitude and longitude (geocoding, like in <a href="http://code.google.com/apis/maps/documentation/services.html#Geocoding" rel="nofollow noreferrer">Google Maps API</a>) from a street address, but is it possible to do the reverse and get the street address when you know what ... | [
{
"answer_id": 235382,
"author": "Mika Tuupola",
"author_id": 24433,
"author_profile": "https://Stackoverflow.com/users/24433",
"pm_score": 4,
"selected": false,
"text": "http://maps.google.com/maps/geo?output=xml&oe=utf-8&ll=LAT,LON&key=API_KEY\n"
},
{
"answer_id": 2883694,
... | 2008/10/01 | [
"https://Stackoverflow.com/questions/158557",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5548/"
] |
158,568 | <p>I have a temporary file with data that's returned as part of a SOAP response via a MTOM binary attachment. I would like to trash it as soon as the method call "ends" (i.e., finishes transferring). What's the best way for me to do this? The best way I can figure out how to do this is to delete them when the sessio... | [
{
"answer_id": 158597,
"author": "Steven M. Cherry",
"author_id": 24193,
"author_profile": "https://Stackoverflow.com/users/24193",
"pm_score": 0,
"selected": false,
"text": "File script = File.createTempFile(\"temp\", \".tmp\", new File(\"./\"));\n... use the file ...\nscript.delete(); ... | 2008/10/01 | [
"https://Stackoverflow.com/questions/158568",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12979/"
] |
158,574 | <p>In several cases I want to add a toolbar to the top of the iPhone keyboard (as in iPhone Safari when you're navigating form elements, for example). </p>
<p>Currently I am specifying the toolbar's rectangle with constants but because other elements of the interface are in flux - toolbars and nav bars at the top of ... | [
{
"answer_id": 158739,
"author": "Andrew Grant",
"author_id": 1043,
"author_profile": "https://Stackoverflow.com/users/1043",
"pm_score": -1,
"selected": false,
"text": "#define KEYBOARD_HEIGHT 240 // example - can't remember the exact size\n#define TOOLBAR_HEIGHT 30\n\ntoolBarRect.origi... | 2008/10/01 | [
"https://Stackoverflow.com/questions/158574",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/24213/"
] |
158,585 | <p>I am trying to add a timed delay in a C++ program, and was wondering if anyone has any suggestions on what I can try or information I can look at?</p>
<p>I wish I had more details on how I am implementing this timed delay, but until I have more information on how to add a timed delay I am not sure on how I should e... | [
{
"answer_id": 158589,
"author": "J.J.",
"author_id": 21204,
"author_profile": "https://Stackoverflow.com/users/21204",
"pm_score": 5,
"selected": false,
"text": "#include <unistd.h>\nsleep(3);//sleeps for 3 second\n"
},
{
"answer_id": 158602,
"author": "Mathias Brossard",
... | 2008/10/01 | [
"https://Stackoverflow.com/questions/158585",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20229/"
] |
158,628 | <p>I have a function in a native DLL defined as follows:</p>
<pre><code>#include <string>
void SetPath(string path);
</code></pre>
<p>I tried to put this in Microsoft's P/Invoke Interop Assistant, but it chokes on the "string" class (which I think is from MFC?).</p>
<p>I have tried marshaling it as a variety o... | [
{
"answer_id": 158802,
"author": "JaredPar",
"author_id": 23283,
"author_profile": "https://Stackoverflow.com/users/23283",
"pm_score": 2,
"selected": false,
"text": "void SetPath(__in const WCHAR* path);\n"
},
{
"answer_id": 16007278,
"author": "xInterop",
"author_id": 2... | 2008/10/01 | [
"https://Stackoverflow.com/questions/158628",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/194/"
] |
158,633 | <p>What VBA code is required to perform an HTTP POST from an Excel spreadsheet?</p>
| [
{
"answer_id": 158647,
"author": "Mark Biek",
"author_id": 305,
"author_profile": "https://Stackoverflow.com/users/305",
"pm_score": 3,
"selected": false,
"text": "ServerXMLHTTP MSXML"
},
{
"answer_id": 158657,
"author": "Bill the Lizard",
"author_id": 1288,
"author_p... | 2008/10/01 | [
"https://Stackoverflow.com/questions/158633",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4023/"
] |
158,634 | <p>Is it possible to do a cast within a LINQ query (for the compiler's sake)?</p>
<p>The following code isn't terrible, but it would be nice to make it into one query:</p>
<pre><code>Content content = dataStore.RootControl as Controls.Content;
List<TabSection> tabList = (from t in content.ChildControls
... | [
{
"answer_id": 158675,
"author": "Chris Ammerman",
"author_id": 2729,
"author_profile": "https://Stackoverflow.com/users/2729",
"pm_score": 6,
"selected": true,
"text": "from TabSection t in content.ChildControls\n"
},
{
"answer_id": 158676,
"author": "Jared",
"author_id"... | 2008/10/01 | [
"https://Stackoverflow.com/questions/158634",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12999/"
] |
158,651 | <p>You do you manage the same presenter working with different repositories using the MVP pattern? </p>
<p>I just have multiple constructor overloads and the presenter simply uses the one that is suitable for the scenario. </p>
<pre><code>AddCustomerPresenter presenter = new AddCustomerPresenter(this,customerReposito... | [
{
"answer_id": 158788,
"author": "Community",
"author_id": -1,
"author_profile": "https://Stackoverflow.com/users/-1",
"pm_score": 1,
"selected": false,
"text": "IRepository { /* .. */ }\nCustomerRepository : IRepository { /* .. */ }\nArchiveRepository : IRepository { /* .. */ }\n AddCus... | 2008/10/01 | [
"https://Stackoverflow.com/questions/158651",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3797/"
] |
158,664 | <p>I have a lot of changes in a working folder, and something screwed up trying to do an update.</p>
<p>Now when I issue an 'svn cleanup' I get:</p>
<pre><code>>svn cleanup .
svn: In directory '.'
svn: Error processing command 'modify-wcprop' in '.'
svn: 'MemPoolTests.cpp' is not under version control
</code></pre... | [
{
"answer_id": 158723,
"author": "Ken",
"author_id": 20074,
"author_profile": "https://Stackoverflow.com/users/20074",
"pm_score": 4,
"selected": false,
"text": "cd dir_above_borked\nmv borked_dir borked_dir.bak\nsvn update borked_dir\n svn checkout -N borked_dir # Non-recursive, but d... | 2008/10/01 | [
"https://Stackoverflow.com/questions/158664",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3631/"
] |
158,665 | <p>I want to delete all directories and subdirectories under a root directory that are contain "tmp" in their names. This should include any .svn files too. My first guess is to use </p>
<pre><code><delete>
<dirset dir="${root}">
<include name="**/*tmp*" />
</dirset>
</dele... | [
{
"answer_id": 158672,
"author": "Blauohr",
"author_id": 22176,
"author_profile": "https://Stackoverflow.com/users/22176",
"pm_score": 3,
"selected": false,
"text": "<delete includeemptydirs=\"true\">\n <fileset dir=\"${root}\">\n <include name=\"**/*tmp*/*\" />\n </filese... | 2008/10/01 | [
"https://Stackoverflow.com/questions/158665",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4737/"
] |
158,673 | <p>I'd like to check if the current browser supports the onbeforeunload event.
The common javascript way to do this does not seem to work:</p>
<pre><code>if (window.onbeforeunload) {
alert('yes');
}
else {
alert('no');
}
</code></pre>
<p>Actually, it only checks whether some handler has been attached to the e... | [
{
"answer_id": 158738,
"author": "rfunduk",
"author_id": 210,
"author_profile": "https://Stackoverflow.com/users/210",
"pm_score": -1,
"selected": false,
"text": "if( $.browser.msie ) {\n alert( 'no' );\n}\n $.browser.msie"
},
{
"answer_id": 158743,
"author": "curtisk",
... | 2008/10/01 | [
"https://Stackoverflow.com/questions/158673",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12111/"
] |
158,703 | <p>Scott Hanselman <a href="http://www.hanselman.com/blog/UsingTheASPNETCacheOutsideOfASPNET.aspx" rel="noreferrer">says yes</a>.</p>
<blockquote>
<p>Adding System.Web to your non-web project is a good way to get folks to panic. Another is adding a reference to Microsoft.VisualBasic in a C# application. Both are rea... | [
{
"answer_id": 158734,
"author": "Mark Cidade",
"author_id": 1659,
"author_profile": "https://Stackoverflow.com/users/1659",
"pm_score": 2,
"selected": false,
"text": "Insert() CacheItemUpdateCallback"
}
] | 2008/10/01 | [
"https://Stackoverflow.com/questions/158703",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2361/"
] |
158,706 | <p>I'm using the Excel interop in C# (<code>ApplicationClass</code>) and have placed the following code in my finally clause:</p>
<pre><code>while (System.Runtime.InteropServices.Marshal.ReleaseComObject(excelSheet) != 0) { }
excelSheet = null;
GC.Collect();
GC.WaitForPendingFinalizers();
</code></pre>
<p>Although th... | [
{
"answer_id": 158751,
"author": "Philip Fourie",
"author_id": 11123,
"author_profile": "https://Stackoverflow.com/users/11123",
"pm_score": 6,
"selected": false,
"text": "excelApp.Quit();\nMarshal.ReleaseComObject (excelWB);\nMarshal.ReleaseComObject (excelApp);\nexcelApp = null;\n"
}... | 2008/10/01 | [
"https://Stackoverflow.com/questions/158706",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11989/"
] |
158,710 | <p>I'm trying to use CSS (<strong>under <code>@media print</code></strong>) and JavaScript to print a one-page document with a given piece of text made as large as possible while still fitting inside a given width. The length of the text is not known beforehand, so simply using a fixed-width font is not an option.</p>... | [
{
"answer_id": 163931,
"author": "Kev",
"author_id": 16777,
"author_profile": "https://Stackoverflow.com/users/16777",
"pm_score": 1,
"selected": true,
"text": "function make_big(id) // must be an inline element inside a block-level element\n{\n var e = document.getElementById(id);\n ... | 2008/10/01 | [
"https://Stackoverflow.com/questions/158710",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/16777/"
] |
158,716 | <p>The question gives all necessary data: what is an efficient algorithm to generate a sequence of <em>K</em> non-repeating integers within a given interval <em>[0,N-1]</em>. The trivial algorithm (generating random numbers and, before adding them to the sequence, looking them up to see if they were already there) is v... | [
{
"answer_id": 158733,
"author": "tucuxi",
"author_id": 15472,
"author_profile": "https://Stackoverflow.com/users/15472",
"pm_score": 2,
"selected": false,
"text": " /* generate N sorted, non-duplicate integers in [0, max] */\n int *generate(int n, int max) {\n int i, m, a; \n i... | 2008/10/01 | [
"https://Stackoverflow.com/questions/158716",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15472/"
] |
158,750 | <p>I am wondering if there is a way to combine multiple images into a single image using only JavaScript. Is this something that Canvas will be able to do. The effect can be done with positing, but can you combine them into a single image for download?</p>
<p><strong>Update Oct 1, 2008:</strong></p>
<p>Thanks for t... | [
{
"answer_id": 16028008,
"author": "mikeslattery",
"author_id": 1205867,
"author_profile": "https://Stackoverflow.com/users/1205867",
"pm_score": 5,
"selected": true,
"text": "<img id=\"img1\" src=\"imgfile1.png\">\n<img id=\"img2\" src=\"imgfile2.png\">\n<canvas id=\"canvas\"></canvas>\... | 2008/10/01 | [
"https://Stackoverflow.com/questions/158750",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/415/"
] |
158,760 | <p>I am looking for any examples or guides to using Linq over WCF (n-tier application). Please specify if you are showing something for Linq-to-SQL or Linq-to-entities. I would like to see usage examples for both. </p>
<p>I am wondering how things like deffered execution works over WCF (if it works at all)? Cyclic ref... | [
{
"answer_id": 158797,
"author": "Mark Cidade",
"author_id": 1659,
"author_profile": "https://Stackoverflow.com/users/1659",
"pm_score": 4,
"selected": true,
"text": " static void Main(string[] args)\n {\n var context=new WebDataContext(\"http://localhost:18752/Northwind.svc\"... | 2008/10/01 | [
"https://Stackoverflow.com/questions/158760",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19854/"
] |
158,772 | <p>I'm writing a series of Windows services. I want them to fail if errors are thrown during startup (in <code>OnStart()</code> method). I had assumed that merely throwing an error in <code>OnStart()</code> would do this, but I'm finding that instead it "Starts" and presents me with a message stating "The service has... | [
{
"answer_id": 11870740,
"author": "Sean",
"author_id": 240430,
"author_profile": "https://Stackoverflow.com/users/240430",
"pm_score": 4,
"selected": false,
"text": "ExitCode protected override void OnStart(string[] args) {\n try {\n // Start your service\n }catch (Exceptio... | 2008/10/01 | [
"https://Stackoverflow.com/questions/158772",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/16487/"
] |
158,778 | <p>Let's say you have a function that returns a date:</p>
<pre><code>Date myFunc(paramA, paramB){
//conditionally return a date?
}
</code></pre>
<p>Is it appropriate to return <code>null</code> from this function? This seems ugly because it forces clients to check for <code>null</code>.</p>
<p>The "null object" ... | [
{
"answer_id": 158803,
"author": "Garth Gilmour",
"author_id": 2635682,
"author_profile": "https://Stackoverflow.com/users/2635682",
"pm_score": 0,
"selected": false,
"text": "if(employee.hasCustomPayday()) {\n //throws a runtime exception if no payday\n Date d = emp.customPayday()... | 2008/10/01 | [
"https://Stackoverflow.com/questions/158778",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1129162/"
] |
158,780 | <p>I'm trying to iterate all the controls on a form and enable ClearType font smoothing. Something like this:</p>
<pre><code>procedure TForm4.UpdateControls(AParent: TWinControl);
var
I: Integer;
ACtrl: TControl;
tagLOGFONT: TLogFont;
begin
for I := 0 to AParent.ControlCount-1 do
begin
ACtrl:= AParent.Co... | [
{
"answer_id": 158841,
"author": "gabr",
"author_id": 4997,
"author_profile": "https://Stackoverflow.com/users/4997",
"pm_score": 4,
"selected": true,
"text": "if IsPublishedProp(ACtrl, 'Font') then\n ModifyFont(TFont(GetOrdProp(ACtrl, 'Font')))\n function ContainsNonemptyControl(contro... | 2008/10/01 | [
"https://Stackoverflow.com/questions/158780",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19610/"
] |
158,783 | <p>I really want to be able to have a way to take an app that currently gets its settings using <strong>ConfigurationManager.AppSettings["mysettingkey"]</strong> to actually have those settings come from a centralized database instead of the app.config file. I can make a custom config section for handling this sort of... | [
{
"answer_id": 159546,
"author": "azamsharp",
"author_id": 3797,
"author_profile": "https://Stackoverflow.com/users/3797",
"pm_score": 1,
"selected": false,
"text": "ConfigurationFromDatabaseManager.AppSettings[\"key\"] instead of ConfigurationSettings[\"key\"].\n"
},
{
"answer_i... | 2008/10/01 | [
"https://Stackoverflow.com/questions/158783",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14101/"
] |
158,800 | <p>I have an ASPX page (On server A) which is invoked using NTLM credentials. Part of that page's job is to call an HTML page (On server B) and proxy it back to the client. (The firewall allows access to A, but not to B. The user would normally be allowed access to both servers.). Server B is also not open to anony... | [
{
"answer_id": 159033,
"author": "mattlant",
"author_id": 14642,
"author_profile": "https://Stackoverflow.com/users/14642",
"pm_score": 0,
"selected": false,
"text": "<authentication mode=\"Windows\" />\n<identity impersonate=\"true\" />\n"
}
] | 2008/10/01 | [
"https://Stackoverflow.com/questions/158800",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10031/"
] |
158,804 | <p>I've installed .NET Framework 3.5 SP1 on web server (Server 2008 Enterprise), so running IIS 7.0.</p>
<p>I want to change the version of .NET Framework used by an existing site. So I right-click on appropriate Application Pool and selected Edit Application Pool. The .NET Framework dropdown does not include an exp... | [
{
"answer_id": 158825,
"author": "Brownie",
"author_id": 6600,
"author_profile": "https://Stackoverflow.com/users/6600",
"pm_score": 5,
"selected": true,
"text": "c:\\windows\\assembly"
}
] | 2008/10/01 | [
"https://Stackoverflow.com/questions/158804",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/22357/"
] |
158,814 | <p>What does it indicate to see a query that has a low cost in the explain plan but a high consistent gets count in autotrace? In this case the cost was in the 100's and the CR's were in the millions.</p>
| [
{
"answer_id": 158825,
"author": "Brownie",
"author_id": 6600,
"author_profile": "https://Stackoverflow.com/users/6600",
"pm_score": 5,
"selected": true,
"text": "c:\\windows\\assembly"
}
] | 2008/10/01 | [
"https://Stackoverflow.com/questions/158814",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
158,818 | <p>First off, let me start off that I am not a .net developer. The reason why I am asking this question is that we rolled out our REST-API and one of our first integration partners is a .net shop.</p>
<p>So basically we assumed that .net would provide some sort of wrapper to create JSON, but the developer in question ... | [
{
"answer_id": 158838,
"author": "bdukes",
"author_id": 2688,
"author_profile": "https://Stackoverflow.com/users/2688",
"pm_score": 3,
"selected": false,
"text": "Dim yourData As String() = { \"Hello\", \"World\" }\nDim jsonSerialiser As New System.Web.Script.Serialization.JavaScriptSeri... | 2008/10/01 | [
"https://Stackoverflow.com/questions/158818",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2859/"
] |
158,836 | <p>what is a good way to select a random element from a map? C++. It is my understanding that maps don't have random access iterators. The key is a long long and the map is sparsely populated. </p>
| [
{
"answer_id": 158865,
"author": "James Curran",
"author_id": 12725,
"author_profile": "https://Stackoverflow.com/users/12725",
"pm_score": 6,
"selected": false,
"text": "map<...> MyMap;\niterator item = MyMap.begin();\nstd::advance( item, random_0_to_n(MyMap.size()) );\n"
},
{
"... | 2008/10/01 | [
"https://Stackoverflow.com/questions/158836",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8264/"
] |
158,848 | <p>I'm pulling my hair out on what should be an insanely simple problem. We are running WebSphere IHS (Apache) through an F5 BigIP. BigIP is doing the https translation for us. Our url (changed for web, not valid) is <a href="https://superniftyserver.com/lawson/portal" rel="noreferrer">https://superniftyserver.com/l... | [
{
"answer_id": 158903,
"author": "Tanj",
"author_id": 4275,
"author_profile": "https://Stackoverflow.com/users/4275",
"pm_score": 0,
"selected": false,
"text": "LoadModule rewrite_module modules/mod_rewrite.so\n"
},
{
"answer_id": 4473740,
"author": "Christoph ... | 2008/10/01 | [
"https://Stackoverflow.com/questions/158848",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
158,856 | <p>Is there a way to have a file that is modified / touched whenever the WC is updated to a new revision? Or, as the second-best option, whenever <code>svn update</code> is executed?</p>
<p>Here's the motivation: I want to have the SVN revision number inside my executable. So I have to run SubWCRev as part of the buil... | [
{
"answer_id": 158899,
"author": "Community",
"author_id": -1,
"author_profile": "https://Stackoverflow.com/users/-1",
"pm_score": 3,
"selected": true,
"text": "fc REM ***UNTESTED***\nFC temp.rev curr.rev | FIND \"FC: no dif\" > nul \nIF NOT ERRORLEVEL 1 COPY /Y temp.rev curr.rev\nDEL te... | 2008/10/01 | [
"https://Stackoverflow.com/questions/158856",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7224/"
] |
158,864 | <p>I've read and followed <a href="http://developer.yahoo.com/yui/menu/" rel="nofollow noreferrer">YUI's tutorial</a> for subscribing to Menu events. I also looked through the API and bits of the code for Menu, MenuBar, and Custom Events, but the following <em>refuses</em> to work</p>
<pre><code>// oMenuBar is a Menu... | [
{
"answer_id": 161550,
"author": "Hank Gay",
"author_id": 4203,
"author_profile": "https://Stackoverflow.com/users/4203",
"pm_score": 0,
"selected": false,
"text": "oMenu.subscribe('keypress', function () { alert(\"I'm your friendly neighborhood keypress listener.\")});\n Menu keypress"
... | 2008/10/01 | [
"https://Stackoverflow.com/questions/158864",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13200/"
] |
158,889 | <p>I'm writing an application which reads large arrays of floats and performs some simple operations with them. I'm using floats, because I thought it'd be faster than doubles, but after doing some research I've found that there's some confusion about this topic. Can anyone elaborate on this?</p>
| [
{
"answer_id": 4610390,
"author": "CReeK",
"author_id": 564742,
"author_profile": "https://Stackoverflow.com/users/564742",
"pm_score": 2,
"selected": false,
"text": "double\n-----------------------------\n1 core = 990 ms\n4 cores = 340 ms\n6 cores = 282 ms\n8 cores = 250 ms\n\nfloat\n-... | 2008/10/01 | [
"https://Stackoverflow.com/questions/158889",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7839/"
] |
158,893 | <p>How do I limit the types of HTML that a user can input into a textbox? I'm running a small forum using some custom software that I'm beta testing, but I need to know how to limit the HTML input. Any suggestions?</p>
| [
{
"answer_id": 158904,
"author": "warren",
"author_id": 4418,
"author_profile": "https://Stackoverflow.com/users/4418",
"pm_score": 0,
"selected": false,
"text": "find open tag (<)\nif contents != allowed tag, remove tag (from <..>)\n"
},
{
"answer_id": 158916,
"author": "Jee... | 2008/10/01 | [
"https://Stackoverflow.com/questions/158893",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5509/"
] |
158,895 | <p>What needs to be done to have your .NET application show up in Window's system tray as icon?</p>
<p>And how do you handle mousebutton clicks on said icon?</p>
| [
{
"answer_id": 158927,
"author": "tom.dietrich",
"author_id": 15769,
"author_profile": "https://Stackoverflow.com/users/15769",
"pm_score": 6,
"selected": true,
"text": "Private Sub frmMain_Resize(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Resize\n If M... | 2008/10/01 | [
"https://Stackoverflow.com/questions/158895",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15328/"
] |
158,908 | <p>How would I upload a file to a webserver using c++ and MFC. We are not using .Net. Would I need to open a socket and do everything myself? If so, where is a good reference to follow?</p>
| [
{
"answer_id": 209505,
"author": "JonDrnek",
"author_id": 6701,
"author_profile": "https://Stackoverflow.com/users/6701",
"pm_score": 2,
"selected": false,
"text": "DWORD dwTotalRequestLength;\nDWORD dwChunkLength;\nDWORD dwReadLength;\nDWORD dwResponseLength;\nCHttpFile* pHTTP = NULL;\n... | 2008/10/01 | [
"https://Stackoverflow.com/questions/158908",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6701/"
] |
158,914 | <p>I've got some code that resizes an image so I can get a scaled chunk of the center of the image - I use this to take a <code>UIImage</code> and return a small, square representation of an image, similar to what's seen in the album view of the Photos app. (I know I could use a <code>UIImageView</code> and adjust the ... | [
{
"answer_id": 712553,
"author": "HitScan",
"author_id": 9490,
"author_profile": "https://Stackoverflow.com/users/9490",
"pm_score": 8,
"selected": false,
"text": "CGImageCreateWithImageInRect(CGImageRef, CGRect) CGImageRef imageRef = CGImageCreateWithImageInRect([largeImage CGImage], cr... | 2008/10/01 | [
"https://Stackoverflow.com/questions/158914",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/24168/"
] |
158,933 | <p>I have an array of characters that are Points and I want to take any character and be able to loop through that array and find the top 3 closest (using Point.distance) neighbors. Could anyone give me an idea of how to do this?</p>
| [
{
"answer_id": 159294,
"author": "grapefrukt",
"author_id": 914,
"author_profile": "https://Stackoverflow.com/users/914",
"pm_score": 2,
"selected": false,
"text": "package {\n\n import flash.geom.Point;\n import flash.display.Sprite;\n\n public class TestCase extends Sprite {\... | 2008/10/01 | [
"https://Stackoverflow.com/questions/158933",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
158,940 | <p>Is it possible to reset the alternate buffer in a vim session to what it was previously?</p>
<p>By alternate buffer, I mean the one that is referred to by #, i.e. the one that is displayed when you enter cntl-^.</p>
<p>Say I've got two files open main.c and other.c and :ls gives me:</p>
<pre><code> 1 %a "main.... | [
{
"answer_id": 60732165,
"author": "NeilG",
"author_id": 134044,
"author_profile": "https://Stackoverflow.com/users/134044",
"pm_score": 2,
"selected": false,
"text": ":bd :ls! :buffers! u :bw CTRL-^ No alternate file :b2 :buffers :buffers! :buffers :bd :buffers! :b<num>"
}
] | 2008/10/01 | [
"https://Stackoverflow.com/questions/158940",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2974/"
] |
158,943 | <p>I know that services like my.yahoo.com allow you to add content from RSS feeds to your personal page, but in general they are links which draw the user to the site which provided the feed. What are the legalities and implications of using RSS feeds as a data source for a site which repackages the data so as to be u... | [
{
"answer_id": 159070,
"author": "AdamKG",
"author_id": 16361,
"author_profile": "https://Stackoverflow.com/users/16361",
"pm_score": 2,
"selected": false,
"text": "GET /feed/ HTTP 1.0 200 OK 403 Forbidden"
},
{
"answer_id": 179687,
"author": "Peter Turner",
"author_id": ... | 2008/10/01 | [
"https://Stackoverflow.com/questions/158943",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13930/"
] |
158,966 | <p>I'm thinking floats. For the record I'm also using NHibernate.</p>
| [
{
"answer_id": 158972,
"author": "Bob King",
"author_id": 6897,
"author_profile": "https://Stackoverflow.com/users/6897",
"pm_score": 6,
"selected": true,
"text": "decimal"
}
] | 2008/10/01 | [
"https://Stackoverflow.com/questions/158966",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1122/"
] |
158,968 | <p>Could someone explain to me in simple terms the easiest way to change the indentation behavior of Vim based on the file type? For instance, if I open a Python file it should indent with 2 spaces, but if I open a Powershell script it should use 4 spaces.</p>
| [
{
"answer_id": 158987,
"author": "Paul Tomblin",
"author_id": 3333,
"author_profile": "https://Stackoverflow.com/users/3333",
"pm_score": 6,
"selected": false,
"text": "autocmd BufRead,BufNewFile *.c,*.h,*.java set noic cin noexpandtab\nautocmd BufRead,BufNewFile *.pl syntax on\n"
... | 2008/10/01 | [
"https://Stackoverflow.com/questions/158968",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1358/"
] |
158,975 | <p>I'm making a request from an <code>UpdatePanel</code> that takes more then 90 seconds. I'm getting this timeout error:</p>
<blockquote>
<p>Microsoft JScript runtime error:
Sys.WebForms.PageRequestManagerTimeoutException: The server request
timed out.</p>
</blockquote>
<p>Does anyone know if there is a way to... | [
{
"answer_id": 159004,
"author": "ctrlShiftBryan",
"author_id": 6161,
"author_profile": "https://Stackoverflow.com/users/6161",
"pm_score": 4,
"selected": false,
"text": "<script type=\"text/javascript\"> \n Sys.WebForms.PageRequestManager.getInstance().add_endRequest(function (se... | 2008/10/01 | [
"https://Stackoverflow.com/questions/158975",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6161/"
] |
158,986 | <p>I am <strong>very</strong> new to the entity framework, so please bear with me...</p>
<p>How can I relate two objects from different contexts together?</p>
<p>The example below throws the following exception:</p>
<blockquote>
<p>System.InvalidOperationException: The
relationship between the two objects
cann... | [
{
"answer_id": 159042,
"author": "Quintin Robinson",
"author_id": 12707,
"author_profile": "https://Stackoverflow.com/users/12707",
"pm_score": 5,
"selected": true,
"text": "void MyFunction()\n{\n using (TCPSEntities model = new TCPSEntities())\n {\n EmployeeRoles er = model... | 2008/10/01 | [
"https://Stackoverflow.com/questions/158986",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4050/"
] |
158,993 | <p>I need to, preferably in C# - but c++ will do, find a way to filter the list of printers in the windows print dialog for any windows printing.</p>
<p>I have come across WinAPIOverride and have figured I am going to have to write my own dll which overrides the method to get the printers list, then filter it and retu... | [
{
"answer_id": 436837,
"author": "sven",
"author_id": 46,
"author_profile": "https://Stackoverflow.com/users/46",
"pm_score": 2,
"selected": false,
"text": " ManagementScope objScope = new ManagementScope(ManagementPath.DefaultPath); //For the local Access\n objScope.Connect();\n\n... | 2008/10/01 | [
"https://Stackoverflow.com/questions/158993",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
159,006 | <p>Is there a way to find the maximum and minimum defined values of an enum in c++?</p>
| [
{
"answer_id": 159018,
"author": "Jeff Yates",
"author_id": 23234,
"author_profile": "https://Stackoverflow.com/users/23234",
"pm_score": 8,
"selected": true,
"text": "enum MyPretendEnum\n{\n Apples,\n Oranges,\n Pears,\n Bananas,\n First = Apples,\n Last = Bananas\n};\n Firs... | 2008/10/01 | [
"https://Stackoverflow.com/questions/159006",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17693/"
] |
159,011 | <p>Here is my question,</p>
<p>Would it be possible, knowing that classic asp support server-side javascript, to be able to generate "server side HTML" to send to the client like
Response.write $(page).html()</p>
<p>Of course it would be great to use jQuery to do it because it's easy to parse complicated structure... | [
{
"answer_id": 166296,
"author": "AnthonyWJones",
"author_id": 17516,
"author_profile": "https://Stackoverflow.com/users/17516",
"pm_score": 3,
"selected": true,
"text": "function XmlWrapper(elem) { this.element = elem; }\nXmlWrapper.prototype.addChild = function(name) {\n var elem = ... | 2008/10/01 | [
"https://Stackoverflow.com/questions/159011",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1775/"
] |
159,015 | <p>What is the use of a Dispatcher Object in WPF?</p>
| [
{
"answer_id": 72422140,
"author": "user3856437",
"author_id": 3856437,
"author_profile": "https://Stackoverflow.com/users/3856437",
"pm_score": 0,
"selected": false,
"text": "Dispatcher.Invoke() only the Dispatcher can update the objects in your UI from a non-UI thread public PaginatedO... | 2008/10/01 | [
"https://Stackoverflow.com/questions/159015",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2744/"
] |
159,017 | <p>Is there any way to format a string by name rather than position in C#?</p>
<p>In python, I can do something like this example (shamelessly stolen from <a href="http://docs.python.org/lib/typesseq-strings.html" rel="noreferrer">here</a>):</p>
<pre><code>>>> print '%(language)s has %(#)03d quote types.' % ... | [
{
"answer_id": 159029,
"author": "Joel Coehoorn",
"author_id": 3043,
"author_profile": "https://Stackoverflow.com/users/3043",
"pm_score": 2,
"selected": false,
"text": "String.Format(\"{0} has {1} quote types.\", \"C#\", \"1\");\n string MyString = \"{language} has {n} quote types.\";\n... | 2008/10/01 | [
"https://Stackoverflow.com/questions/159017",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2147/"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.