qid int64 4 19.1M | question stringlengths 18 48.3k | answers list | date stringlengths 10 10 | metadata list |
|---|---|---|---|---|
272,361 | <p>I wrote a PHP code like this</p>
<pre><code>$site="http://www.google.com";
$content = file_get_content($site);
echo $content;
</code></pre>
<p>But when I remove "http://" from <code>$site</code> I get the following warning:</p>
<blockquote>
<p>Warning:
file_get_contents(www.google.com)
[function.file-get-co... | [
{
"answer_id": 272373,
"author": "Greg",
"author_id": 24181,
"author_profile": "https://Stackoverflow.com/users/24181",
"pm_score": 5,
"selected": false,
"text": "$content = @file_get_contents($site);"
},
{
"answer_id": 272377,
"author": "Roel",
"author_id": 11449,
"a... | 2008/11/07 | [
"https://Stackoverflow.com/questions/272361",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/22634/"
] |
272,368 | <p>If I have a method with a parameter that's an interface, whats the fasts way to see if the interface's reference is of a specific generic type?</p>
<p>More specifically, if I have:</p>
<pre><code>interface IVehicle{}
class Car<T> : IVehicle {}
CheckType(IVehicle param)
{
// How do I check that param is... | [
{
"answer_id": 272393,
"author": "Jon Skeet",
"author_id": 22656,
"author_profile": "https://Stackoverflow.com/users/22656",
"pm_score": 4,
"selected": true,
"text": "Car<int> CheckType(IVehicle param)\n{\n Car<int> car = param as Car<int>;\n if (car != null)\n {\n ...\n... | 2008/11/07 | [
"https://Stackoverflow.com/questions/272368",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1946/"
] |
272,387 | <p>In SQL Server 2005, I want to print out a blank line with the PRINT statement, however, when I run</p>
<pre><code>PRINT ''
</code></pre>
<p>it actually prints a line with a single space.</p>
<p>Does anyone know if it's possible to just print a blank line without the space?</p>
<p>If I print a new line character,... | [
{
"answer_id": 272430,
"author": "Loris",
"author_id": 23824,
"author_profile": "https://Stackoverflow.com/users/23824",
"pm_score": 3,
"selected": false,
"text": "PRINT 'BLABLABLA'\nPRINT ''\n PRINT 'BLABLABLA\n' <- the string finishes here!\n"
},
{
"answer_id": 273013,
"aut... | 2008/11/07 | [
"https://Stackoverflow.com/questions/272387",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
272,401 | <p>Is there a way on the CVS command line to list all files associated with a tag?</p>
| [
{
"answer_id": 272420,
"author": "Bill the Lizard",
"author_id": 1288,
"author_profile": "https://Stackoverflow.com/users/1288",
"pm_score": 1,
"selected": false,
"text": "cvs ls -lR -r tag\n"
},
{
"answer_id": 272497,
"author": "Ken Gentle",
"author_id": 8709,
"autho... | 2008/11/07 | [
"https://Stackoverflow.com/questions/272401",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/21176/"
] |
272,409 | <p>I'd like to be able to place all my ASP Classic include files outside of the web root. This assures no include files can be called directly via the URL. </p>
<p>What is the best way to accomplish this?</p>
<p>I know I can use a <a href="http://msdn.microsoft.com/en-us/library/zwk103ab.aspx" rel="nofollow noreferre... | [
{
"answer_id": 15271867,
"author": "Salman A",
"author_id": 87015,
"author_profile": "https://Stackoverflow.com/users/87015",
"pm_score": 0,
"selected": false,
"text": "E:\\includes\\\n \\include.asp\n \\another.asp\nE:\\websites\\\n \\business-website.com\\... | 2008/11/07 | [
"https://Stackoverflow.com/questions/272409",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/26180/"
] |
272,412 | <p>i want something like this</p>
<ol>
<li><p>the user enter a website link</p></li>
<li><p>i need check the link if the link
doesn't start with 'http://' I want
to append 'http://' to the link .</p></li>
</ol>
<p>how can I do that in PHP ? </p>
| [
{
"answer_id": 272421,
"author": "Tom Haigh",
"author_id": 22224,
"author_profile": "https://Stackoverflow.com/users/22224",
"pm_score": 5,
"selected": true,
"text": "if (stripos($url, 'http://') !== 0) {\n $url = 'http://' . $url;\n}\n"
},
{
"answer_id": 272432,
"author": ... | 2008/11/07 | [
"https://Stackoverflow.com/questions/272412",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/22634/"
] |
272,428 | <p>What is the meaning of the concepts 'covariance' and 'contravariance'?</p>
<p>Given 2 classes, <strong>Animal</strong> and <strong>Elephant</strong> (which inherits from <strong>Animal</strong>), my understanding is that you would get a run-time errors if you try and put an Elephant into an array of Animals, and th... | [
{
"answer_id": 12925555,
"author": "David",
"author_id": 94669,
"author_profile": "https://Stackoverflow.com/users/94669",
"pm_score": 0,
"selected": false,
"text": "var things = new List<IThing<IContent>> { new ConcreteThing() }\n public class ConcreteThing : IThing<ConcreteContent>\n{\... | 2008/11/07 | [
"https://Stackoverflow.com/questions/272428",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/23066/"
] |
272,429 | <p>I have 4 different named instances of SQL Server 2005 on a single server (for testing purposes). There is no default instance on the server.</p>
<p>Because I will eventually need to allow communication to these instances across the firewall, I have set the ports of each instance statically listening on all IPs for ... | [
{
"answer_id": 272567,
"author": "andyhky",
"author_id": 2764,
"author_profile": "https://Stackoverflow.com/users/2764",
"pm_score": 3,
"selected": true,
"text": "> sqlcmd -S\n> tcp:NameOfTheServer\\sqlexpress,1433\n"
}
] | 2008/11/07 | [
"https://Stackoverflow.com/questions/272429",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/24954/"
] |
272,433 | <p>Some programs read the company name that you entered when Windows was installed and display it in the program. How is this done? Are they simply reading the name from the registry?</p>
| [
{
"answer_id": 272496,
"author": "Stefan",
"author_id": 19307,
"author_profile": "https://Stackoverflow.com/users/19307",
"pm_score": 1,
"selected": false,
"text": "int details = SystemParametersInfo(SPI_GETOEMINFO, OEMInfo.Capacity, OEMInfo, 0);\n if (details != 0)\n {\n ... | 2008/11/07 | [
"https://Stackoverflow.com/questions/272433",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
272,438 | <p>Suppose I create a table in Postgresql with a comment on a column:</p>
<pre><code>create table t1 (
c1 varchar(10)
);
comment on column t1.c1 is 'foo';
</code></pre>
<p>Some time later, I decide to add another column:</p>
<pre><code>alter table t1 add column c2 varchar(20);
</code></pre>
<p>I want to look up ... | [
{
"answer_id": 272539,
"author": "Vinko Vrsalovic",
"author_id": 5190,
"author_profile": "https://Stackoverflow.com/users/5190",
"pm_score": 4,
"selected": true,
"text": "CREATE OR REPLACE FUNCTION copy_comment(varchar,int,varchar,varchar) RETURNS int AS $PROC$\nDECLARE\n src_tbl ... | 2008/11/07 | [
"https://Stackoverflow.com/questions/272438",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18625/"
] |
272,454 | <p><a href="http://localhost:50034/Admin/Delete/723" rel="nofollow noreferrer">http://localhost:50034/Admin/Delete/723</a></p>
<p>Always needs this parameter to perform the action, however, if you go to the URL without the parameter, an exception occurs. How do you handle this and redirect back to the main page withou... | [
{
"answer_id": 272472,
"author": "Community",
"author_id": -1,
"author_profile": "https://Stackoverflow.com/users/-1",
"pm_score": 2,
"selected": false,
"text": "public ActionResult Details(int? Id)\n{\n if (Id == null)\n return RedirectToAction(\"Index\");\n return Vie... | 2008/11/07 | [
"https://Stackoverflow.com/questions/272454",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
272,457 | <p>I'm looking into tightening up our ad code by moving it to an external jQuery script, but I obviously still need some HTML to target the ad to. So I was wondering if I can target a noscript element (or within a noscript element) since I'm going to have to leave that on the page anyway, or if I need to have some othe... | [
{
"answer_id": 272474,
"author": "Lasar",
"author_id": 9438,
"author_profile": "https://Stackoverflow.com/users/9438",
"pm_score": 4,
"selected": true,
"text": "<noscript> <noscript> clone()"
},
{
"answer_id": 272545,
"author": "James Hughes",
"author_id": 34671,
"aut... | 2008/11/07 | [
"https://Stackoverflow.com/questions/272457",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/16124/"
] |
272,458 | <p>I want my validation.xml to only check for a null if certain options are selected from a dropdown. So far I have</p>
<pre><code><field property="empFDServiceStartDate" depends="requiredif, date">
<arg0 key="Service Start date" resource="false"/>
<var>
<var-name&g... | [
{
"answer_id": 272495,
"author": "Fred",
"author_id": 33630,
"author_profile": "https://Stackoverflow.com/users/33630",
"pm_score": 0,
"selected": false,
"text": "<field property=\"empFDServiceStartDate\" depends=\"requiredif, date\">\n <arg0 key=\"Service Start date\" resource=\"fals... | 2008/11/07 | [
"https://Stackoverflow.com/questions/272458",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
272,459 | <p>I wonder if there is a way to set the value of #define in run time.</p>
<p>I assume that there is a query for Oracle specific and Sql Server specific at the code below.</p>
<pre><code>#define oracle
// ...
#if oracle
// some code
#else
// some different code.
#endif
</code></pre>
| [
{
"answer_id": 272476,
"author": "Marc Gravell",
"author_id": 23354,
"author_profile": "https://Stackoverflow.com/users/23354",
"pm_score": 2,
"selected": false,
"text": "#if"
}
] | 2008/11/07 | [
"https://Stackoverflow.com/questions/272459",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4215/"
] |
272,479 | <p>This function exists on OS X and allows you to pass custom local to the function. setlocale is not thread-safe, and passing locale as parameter is.</p>
<p>If there is no equivalent, any way of locale-independent printf, or printf just for doubles (%g) will be ok.</p>
| [
{
"answer_id": 272554,
"author": "Sunlight",
"author_id": 33650,
"author_profile": "https://Stackoverflow.com/users/33650",
"pm_score": 2,
"selected": false,
"text": "uselocale printf"
}
] | 2008/11/07 | [
"https://Stackoverflow.com/questions/272479",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9403/"
] |
272,503 | <p>How can I programmatically remove a (known) password from an Excel VBA project?</p>
<p>To be clear: I want to remove the password from the VBA Project, not the workbook or any worksheets.</p>
| [
{
"answer_id": 7835861,
"author": "Uygar Y",
"author_id": 331338,
"author_profile": "https://Stackoverflow.com/users/331338",
"pm_score": 7,
"selected": false,
"text": "xl workbook.xml <workbookProtection workbookPassword=\"XXXX\" lockStructure=\"1\"/> XXXX XXXX <workbookProtection workb... | 2008/11/07 | [
"https://Stackoverflow.com/questions/272503",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11916/"
] |
272,504 | <p>I am using the following code fragment in a php script to safely update a shared resource. </p>
<pre><code>$lock_id = sem_get( ftok( 'tmp/this.lock', 'r'));
sem_acquire($lock_id)
//do something
sem_release($lock_id)
</code></pre>
<p>When I stress test this code with large number of requests I get an error:</p>
<p... | [
{
"answer_id": 272616,
"author": "bog",
"author_id": 20909,
"author_profile": "https://Stackoverflow.com/users/20909",
"pm_score": 2,
"selected": true,
"text": "sem_get() sem_get() sem_op()"
},
{
"answer_id": 272870,
"author": "Rajkumar S",
"author_id": 25453,
"author... | 2008/11/07 | [
"https://Stackoverflow.com/questions/272504",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/25453/"
] |
272,509 | <p>I want to explicitly call a view from my controller.</p>
<p>Right now I have:</p>
<pre><code>def some_action
.. do something ...
respond_to do |format|
format.xml
end
end
</code></pre>
<p>... then it calls my some_action.xml.builder view. How can I call some other view? Is there a parameter in respond... | [
{
"answer_id": 272559,
"author": "Gabe Hollombe",
"author_id": 30632,
"author_profile": "https://Stackoverflow.com/users/30632",
"pm_score": 4,
"selected": false,
"text": "# Renders the template located in [TEMPLATE_ROOT]/weblog/show.r(html|xml) (in Rails, app/views/weblog/show.erb)\n r... | 2008/11/07 | [
"https://Stackoverflow.com/questions/272509",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10333/"
] |
272,511 | <p>Is it possible to write a GUI from inside a function?</p>
<p>The problem is that the callback of all GUI-functions are evaluated in the global workspace. But functions have their own workspace and can not access variables in the global workspace. Is it possible to make the GUI-functions use the workspace of the fun... | [
{
"answer_id": 277818,
"author": "bastibe",
"author_id": 1034,
"author_profile": "https://Stackoverflow.com/users/1034",
"pm_score": 1,
"selected": false,
"text": "function myfunc()\n h_fig = figure;\n\n % add continue_loop to the GUI-handles structure\n fig_handles = guihandles... | 2008/11/07 | [
"https://Stackoverflow.com/questions/272511",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1034/"
] |
272,518 | <p>When I do a ReadLinesFromFile on a file in MSBUILD and go to output that file again, I get all the text on one line. All the Carriage returns and LineFeeds are stripped out.</p>
<pre><code><Project DefaultTargets = "Deploy"
xmlns="http://schemas.microsoft.com/developer/msbuild/2003" >
<Import Project="$(M... | [
{
"answer_id": 274720,
"author": "Todd",
"author_id": 31940,
"author_profile": "https://Stackoverflow.com/users/31940",
"pm_score": 6,
"selected": true,
"text": "ReadLinesFromFile @() <?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project DefaultTargets=\"Build\" xmlns=\"http://schemas.... | 2008/11/07 | [
"https://Stackoverflow.com/questions/272518",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2806/"
] |
272,523 | <p>I am using winsock and C++ to set up a server application. The problem I'm having is that the call to <code>listen</code> results in a first chance exception. I guess normally these can be ignored (?) but I've found others having the same issue I am where it causes the application to hang every once in a while. A... | [
{
"answer_id": 272682,
"author": "Douglas Mayle",
"author_id": 8458,
"author_profile": "https://Stackoverflow.com/users/8458",
"pm_score": 1,
"selected": false,
"text": "listen (m_accept_fd, 5)\n// Limit here ^^^\n"
},
{
"answer_id": 274370,
"author": "Darian Miller",
... | 2008/11/07 | [
"https://Stackoverflow.com/questions/272523",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/34731/"
] |
272,528 | <p>I was thinking of adding some <strong>Achievements</strong> to our internal bug-tracking and time logging system. It's connected to an SQL Server back-end.</p>
<p>At first I thought that the system could be run on the database, using triggers to, for example, know when:</p>
<ul>
<li>you've logged 1000 hours</li>
<... | [
{
"answer_id": 470026,
"author": "ceetheman",
"author_id": 16154,
"author_profile": "https://Stackoverflow.com/users/16154",
"pm_score": 2,
"selected": false,
"text": "Event: TicketCreated\nCondition: UserTicketCount >= 1000\nAchivement: \"Created 1000 tickets\"\n Event: SettingsChanged\... | 2008/11/07 | [
"https://Stackoverflow.com/questions/272528",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12597/"
] |
272,535 | <p>What program can I use to decompile a class file? Will I actually get Java code, or is it just JVM assembly code?</p>
<p>On Java performance questions on this site I often see responses from people who have "decompiled" the Java class file to see how the compiler optimizes certain things.</p>
| [
{
"answer_id": 272595,
"author": "VonC",
"author_id": 6309,
"author_profile": "https://Stackoverflow.com/users/6309",
"pm_score": 10,
"selected": true,
"text": ".class"
},
{
"answer_id": 19144727,
"author": "bmaupin",
"author_id": 399105,
"author_profile": "https://St... | 2008/11/07 | [
"https://Stackoverflow.com/questions/272535",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18511/"
] |
272,541 | <p>Is it possible to disable AJAX without disabling JavaScript completely? </p>
| [
{
"answer_id": 272588,
"author": "Peter Rowell",
"author_id": 17017,
"author_profile": "https://Stackoverflow.com/users/17017",
"pm_score": 5,
"selected": true,
"text": "// ==UserScript==\n// @name Google Clk\n// @namespace googleclk\n// @description Disable Google clic... | 2008/11/07 | [
"https://Stackoverflow.com/questions/272541",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18196/"
] |
272,544 | <p>I'm reading Erica Sadun's <em>iPhone Developer's Cookbook</em>, and ran into a question.</p>
<p>She says in the book that the way to find the user's Documents directory is with the code:</p>
<pre><code>[NSHomeDirectory() stringByAppendingPathComponent:@"Documents"];
</code></pre>
<p>but that seems slightly brittl... | [
{
"answer_id": 272677,
"author": "Ben Gottlieb",
"author_id": 6694,
"author_profile": "https://Stackoverflow.com/users/6694",
"pm_score": 8,
"selected": true,
"text": "NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES)\n var paths = NSSearchP... | 2008/11/07 | [
"https://Stackoverflow.com/questions/272544",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/735/"
] |
272,552 | <p>How can I read the status of the battery on my MacBookPro from my own application?</p>
<p>Googling has so far only revealed APIs for device drivers to handle power events - there's nothing about user-land processes accessing this information.</p>
<p>thanks.</p>
| [
{
"answer_id": 272774,
"author": "Ben Gottlieb",
"author_id": 6694,
"author_profile": "https://Stackoverflow.com/users/6694",
"pm_score": 6,
"selected": true,
"text": "IOPSCopyPowerSourcesInfo() IOPSCopyPowerSourcesList() IOPSGetPowerSourceDescription()"
},
{
"answer_id": 5801914... | 2008/11/07 | [
"https://Stackoverflow.com/questions/272552",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6782/"
] |
272,584 | <p>I have a UITableView cell that is going to have a variable size depending on it's content (potentially several lines of text). </p>
<p>SInce it appears that heightForRowAtIndexPath is called <em>before</em> I layout the cell, I just guess the correct height by calling [NSString sizeWithFont] on my text string. Is t... | [
{
"answer_id": 273008,
"author": "Olie",
"author_id": 34820,
"author_profile": "https://Stackoverflow.com/users/34820",
"pm_score": 4,
"selected": true,
"text": "if (0 == heightTable[index]) {\n heightTable[index] = [self prepLayoutForCellAtIndex:index];\n}\nreturn (heightTable[index]... | 2008/11/07 | [
"https://Stackoverflow.com/questions/272584",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1967/"
] |
272,590 | <p>We are developing a WPF application that uses the System.AddIn framework to host add-ins that display additional WPF content. Everything seems to be working fine, but overnight, the application threw the following NullReferenceException:</p>
<pre>
Message: Error : Object reference not set to an instance of an obje... | [
{
"answer_id": 273008,
"author": "Olie",
"author_id": 34820,
"author_profile": "https://Stackoverflow.com/users/34820",
"pm_score": 4,
"selected": true,
"text": "if (0 == heightTable[index]) {\n heightTable[index] = [self prepLayoutForCellAtIndex:index];\n}\nreturn (heightTable[index]... | 2008/11/07 | [
"https://Stackoverflow.com/questions/272590",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9268/"
] |
272,607 | <p>Is there a way to pre-compute an array of values based on templates? In the following example I would like the 'powers_of_2' array to have 256 values computed at compile-time if that is possible without having to type all of the values.</p>
<pre><code>#include <iostream>
using namespace std;
template <in... | [
{
"answer_id": 272712,
"author": "James Curran",
"author_id": 12725,
"author_profile": "https://Stackoverflow.com/users/12725",
"pm_score": 1,
"selected": false,
"text": "typedef unsigned char BYTE32[32];\nBYTE32 powers_of_2[256] =\n{\n {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0... | 2008/11/07 | [
"https://Stackoverflow.com/questions/272607",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4778/"
] |
272,618 | <p>I've created a MATLAB class, something like:</p>
<pre><code>classdef myclass
properties
x_array = [];
end
methods
function increment(obj,value)
obj.x_array = [obj.x_array ; value);
end
end
end
</code></pre>
<p>The problem is, the property <code>x_array</code> is never modified when I... | [
{
"answer_id": 272920,
"author": "Azim J",
"author_id": 4612,
"author_profile": "https://Stackoverflow.com/users/4612",
"pm_score": 5,
"selected": false,
"text": "classdef myclass<handle\n properties\n x_array = []\n end\n methods\n function obj=increment(obj,val)\... | 2008/11/07 | [
"https://Stackoverflow.com/questions/272618",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/34830/"
] |
272,620 | <p>I am trying to setup a WCF service with multiple endpoints with one of the endpoints using the enableWebScript endpoint behavior so that a Javascript proxy will be created on the client (jsdebug/js).</p>
<p>When adding the Service Reference to my AJAX ScriptManager, the jsdebug file is not found unless the address ... | [
{
"answer_id": 692198,
"author": "Eugene Yokota",
"author_id": 3827,
"author_profile": "https://Stackoverflow.com/users/3827",
"pm_score": 2,
"selected": false,
"text": "<enableWebScript /> service.svc/<operation> service.svc/Add Add <enableWebScript /> UriTemplate"
}
] | 2008/11/07 | [
"https://Stackoverflow.com/questions/272620",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/24188/"
] |
272,630 | <p>I'm desperately searching for a tool allowing me to copy documents with their old versions from a SharePoint 2003 to a SharePoint 2007 site.<br />
Do you know about any simple (and preferably free) tool which does this?<br /></p>
| [
{
"answer_id": 6958763,
"author": "Craig J",
"author_id": 880861,
"author_profile": "https://Stackoverflow.com/users/880861",
"pm_score": 1,
"selected": false,
"text": " ` catch (Exception e)\n {\n Console.WriteLin... | 2008/11/07 | [
"https://Stackoverflow.com/questions/272630",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/34022/"
] |
272,633 | <p>Given the string "ThisStringHasNoSpacesButItDoesHaveCapitals" what is the best way to add spaces before the capital letters. So the end string would be "This String Has No Spaces But It Does Have Capitals"</p>
<p>Here is my attempt with a RegEx</p>
<pre><code>System.Text.RegularExpressions.Regex.Replace(value, "[A... | [
{
"answer_id": 272666,
"author": "Bill the Lizard",
"author_id": 1288,
"author_profile": "https://Stackoverflow.com/users/1288",
"pm_score": 2,
"selected": false,
"text": "value value = System.Text.RegularExpressions.Regex.Replace(value, \"[A-Z]\", \" $0\");\n"
},
{
"answer_id": ... | 2008/11/07 | [
"https://Stackoverflow.com/questions/272633",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/45/"
] |
272,635 | <p>I'm doing some shennanigans with jQuery to put little plus/minus icons next to my expanders. Its similar to the windows file trees, or firebugs code expanders.</p>
<p>It works, but its not specific enough. </p>
<p>Hopefully this makes sense...</p>
<pre><code>$('div.toggle').hide();//hide all divs that are part ... | [
{
"answer_id": 272711,
"author": "Nathan Long",
"author_id": 4376,
"author_profile": "https://Stackoverflow.com/users/4376",
"pm_score": 1,
"selected": false,
"text": "$(this).siblings('img.expander').attr('src','img/content/info-close.gif');\n"
},
{
"answer_id": 272720,
"aut... | 2008/11/07 | [
"https://Stackoverflow.com/questions/272635",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/26107/"
] |
272,638 | <p>Below is what I'm trying to achieve. The problem is "errors" is not defined. If I remove my match logic, the errors are displayed on the web page. Is there anyway of evaluating the text the error contains?</p>
<pre><code><logic:messagesPresent>
<tr>
<td class="errorcicon"><img src="... | [
{
"answer_id": 272711,
"author": "Nathan Long",
"author_id": 4376,
"author_profile": "https://Stackoverflow.com/users/4376",
"pm_score": 1,
"selected": false,
"text": "$(this).siblings('img.expander').attr('src','img/content/info-close.gif');\n"
},
{
"answer_id": 272720,
"aut... | 2008/11/07 | [
"https://Stackoverflow.com/questions/272638",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
272,644 | <p>I have a class called <code>Ship</code> and a class called <code>Lifeboat</code></p>
<p>Lifeboat inherits from Ship.</p>
<p>Ship contains a method called <code>Validate()</code> which is called before save and it has an abstract method called <code>FurtherValidate()</code> which it calls from Validate. The reason ... | [
{
"answer_id": 272654,
"author": "alvin",
"author_id": 15121,
"author_profile": "https://Stackoverflow.com/users/15121",
"pm_score": 3,
"selected": false,
"text": "protected abstract bool FurtherValidate();\n FurtherValidate ValidateCore"
},
{
"answer_id": 272656,
"author": "... | 2008/11/07 | [
"https://Stackoverflow.com/questions/272644",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/27412/"
] |
272,665 | <p>First of all, some background.</p>
<p>We have an order processing system, where staff enter billing data about orders in an app that stores it in a sql server 2000 database. This database isn't the real billing system: it's just a holding location so that the records can be run into a mainframe system via a nightl... | [
{
"answer_id": 272684,
"author": "Cade Roux",
"author_id": 18255,
"author_profile": "https://Stackoverflow.com/users/18255",
"pm_score": 1,
"selected": false,
"text": "SELECT *\nFROM [StaffEntry] s\nLEFT JOIN [MainFrame] m ON m.ItemNumber = s.ItemNumber \n AND m.Customer=s.Customer \n... | 2008/11/07 | [
"https://Stackoverflow.com/questions/272665",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3043/"
] |
272,674 | <p>I am looking for a data structure that operates similar to a hash table, but where the table has a size limit. When the number of items in the hash reaches the size limit, a culling function should be called to get rid of the least-retrieved key/value pairs in the table.</p>
<p>Here's some pseudocode of what I'm w... | [
{
"answer_id": 272729,
"author": "ReneS",
"author_id": 33229,
"author_profile": "https://Stackoverflow.com/users/33229",
"pm_score": 5,
"selected": true,
"text": "LRUList Map LinkedHashMap removeEldestEntry(Map.Entry)"
}
] | 2008/11/07 | [
"https://Stackoverflow.com/questions/272674",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18511/"
] |
272,676 | <p>I would like to print <em>only</em> the contents of a textarea element from a website page. In particular, I would like to ensure that nothing gets clipped by the boundary of the textarea as the contents will be quite large.</p>
<p>What is the best strategy for tackling this?</p>
| [
{
"answer_id": 272689,
"author": "Lou Franco",
"author_id": 3937,
"author_profile": "https://Stackoverflow.com/users/3937",
"pm_score": 2,
"selected": false,
"text": "<link rel=\"stylesheet\" type=\"text/css\" href=\"print.css\" media=\"print\" />\n"
},
{
"answer_id": 273609,
... | 2008/11/07 | [
"https://Stackoverflow.com/questions/272676",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13990/"
] |
272,694 | <p>I've got a strange problem with indexing PDF files in SQL Server 2005, and hope someone can help. My database has a table called MediaFile with the following fields - MediaFileId int identity pk, FileContent image, and FileExtension varchar(5). I've got my web application storing file contents in this table with no... | [
{
"answer_id": 282339,
"author": "Community",
"author_id": -1,
"author_profile": "https://Stackoverflow.com/users/-1",
"pm_score": 0,
"selected": false,
"text": "* SELECT MediaFileId, FileExtension FROM MediaFile WHERE CONTAINS(FileContent, 'house')\n Image varbinary(MAX)"
}
] | 2008/11/07 | [
"https://Stackoverflow.com/questions/272694",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/775/"
] |
272,726 | <p>I have a Stored Procedure that is constantly failing with the error message "Timeout expired," on a specific user.</p>
<p>All other users are able to invoke the sp just fine, and even I am able to invoke the sp normally using the Query Analyzer--it finishes in just 10 seconds. However with the user in question, th... | [
{
"answer_id": 275739,
"author": "gbn",
"author_id": 27535,
"author_profile": "https://Stackoverflow.com/users/27535",
"pm_score": 3,
"selected": false,
"text": "DECLARE @MaskedParam varchar(10)\nSELECT @MaskedParam = @SignaureParam\n\nSELECT...WHERE column = @MaskedParam\n"
}
] | 2008/11/07 | [
"https://Stackoverflow.com/questions/272726",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12772/"
] |
272,730 | <p>How do I limit a SQL Server Profiler trace to a specific database? I can't see how to filter the trace to not see events for all databases on the instance I connect to.</p>
| [
{
"answer_id": 337122,
"author": "Community",
"author_id": -1,
"author_profile": "https://Stackoverflow.com/users/-1",
"pm_score": 3,
"selected": false,
"text": "SELECT * \nFROM master..sysdatabases \nWHERE name like '%your_db_name%' -- Remove this line to see all databases\nORDER BY d... | 2008/11/07 | [
"https://Stackoverflow.com/questions/272730",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
272,738 | <p>Is there any way of pulling in a CSS stylesheet into FireFox 2 or 3 that is not a static file? </p>
<p>Bellow is the code we are using to pull in a stylesheet dynamically generated by a CGI script.</p>
<pre><code><link rel="stylesheet" href="/cgi-bin/Xebra?ShowIt&s=LH4X6I2l4fSYwf4pky4k&shw=795430-0&am... | [
{
"answer_id": 272755,
"author": "scunliffe",
"author_id": 6144,
"author_profile": "https://Stackoverflow.com/users/6144",
"pm_score": 4,
"selected": true,
"text": "Content-type: text/css\n"
},
{
"answer_id": 272766,
"author": "Jake",
"author_id": 24730,
"author_profi... | 2008/11/07 | [
"https://Stackoverflow.com/questions/272738",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18149/"
] |
272,750 | <p>I am writing an application which blocks on input from two <code>istreams</code>.</p>
<p>Reading from either <code>istream</code> is a synchronous (blocking) call, so, I decided to create two <code>Boost::thread</code>s to do the reading.</p>
<p>Either one of these threads can get to the "end" (based on some input... | [
{
"answer_id": 1131988,
"author": "neuro",
"author_id": 135549,
"author_profile": "https://Stackoverflow.com/users/135549",
"pm_score": 1,
"selected": false,
"text": "while(!stopped && !interrupted)\n{\n io.blockingCall(timeout);\n if(!stopped && !interrupted)\n {\n doSom... | 2008/11/07 | [
"https://Stackoverflow.com/questions/272750",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/29701/"
] |
272,764 | <p>I want a small (< 30MB) standalone Windows executable (a single file) that creates a window which asks the user for the location of a directory and then launches a different program in that directory. </p>
<p>This executable has to run on XP, Vista, Server 2003, and Server 2008 versions of Windows in 32-bits an... | [
{
"answer_id": 272795,
"author": "Vinko Vrsalovic",
"author_id": 5190,
"author_profile": "https://Stackoverflow.com/users/5190",
"pm_score": 5,
"selected": true,
"text": "Set WshShell = WScript.CreateObject(\"WScript.Shell\")\nwin = InputBox(\"Please type your Windows folder location.\")... | 2008/11/07 | [
"https://Stackoverflow.com/questions/272764",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8344/"
] |
272,765 | <p>I've created a c# webservice that allows our front end support teams to view and update a few selected Active Directory values using system.directoryservices</p>
<p>Fields that I want to update are [job] title, department, telephone and employeeid.</p>
<p>I can use a service account with "delegates rights" to upda... | [
{
"answer_id": 272777,
"author": "Guy",
"author_id": 993,
"author_profile": "https://Stackoverflow.com/users/993",
"pm_score": 0,
"selected": false,
"text": "string distinguishedname = \"CN=Wicks\\, Guy,OU=Users,DC=ad,DC=com\"\nusing (DirectoryEntry myDirectoryEntry = new DirectoryEntry(... | 2008/11/07 | [
"https://Stackoverflow.com/questions/272765",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/993/"
] |
272,783 | <p>I have a delphi (Win32) web application that can run either as a CGI app, ISAPI or Apache DLL. I want to be able to generate a unique filename prefix (unique for all current requests at a given moment), and figure that the best way to do this would be to use processID (to handle CGI mode) as well as threadID (to han... | [
{
"answer_id": 272789,
"author": "Jamie",
"author_id": 922,
"author_profile": "https://Stackoverflow.com/users/922",
"pm_score": 2,
"selected": false,
"text": "CreateGuid\nGuidToString\n"
},
{
"answer_id": 272812,
"author": "Douglas Mayle",
"author_id": 8458,
"author_... | 2008/11/07 | [
"https://Stackoverflow.com/questions/272783",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11820/"
] |
272,791 | <p>I'm not that familiar with WCF, but I thought I'll learn while trying to consume an existing service.</p>
<p>One of the REST APIs I thought of was the <a href="http://apiwiki.twitter.com/REST+API+Documentation" rel="noreferrer">Twitter API</a>. I thought of developing a WPF client that will just output to the scree... | [
{
"answer_id": 274137,
"author": "Darrel Miller",
"author_id": 6819,
"author_profile": "https://Stackoverflow.com/users/6819",
"pm_score": 3,
"selected": false,
"text": "var client = new HttpClient();\nclient.DefaultHeaders.Authorization = Credential.CreateBasic(\"username\",\"password\"... | 2008/11/07 | [
"https://Stackoverflow.com/questions/272791",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19856/"
] |
272,799 | <p>Is there a (portable) way to rotate text in a HTML table cell by 90°?</p>
<p>(I have a table with many columns and much text for the headings, so I'd like to write it vertically to save space.)</p>
| [
{
"answer_id": 272860,
"author": "Nathan Long",
"author_id": 4376,
"author_profile": "https://Stackoverflow.com/users/4376",
"pm_score": 5,
"selected": false,
"text": "S \nO \nM \nE \n\nT \nE \nX \nT \n \"SOME TEXT\".split(\"\").join(\"\\n\")\n"
},
{
"answer_id": 2416032,... | 2008/11/07 | [
"https://Stackoverflow.com/questions/272799",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/23813/"
] |
272,803 | <p>I have an interesting problem and would appreciate your thoughts for the best solution.
I need to parse a set of logs. The logs are produced by a multi-threaded program and a single process cycle produces several lines of logs.</p>
<p>When parsing these logs I need to pull out specific pieces of information from ea... | [
{
"answer_id": 272972,
"author": "Skip Head",
"author_id": 23271,
"author_profile": "https://Stackoverflow.com/users/23271",
"pm_score": 0,
"selected": false,
"text": "class Parser {\n String currentLine;\n Parser() {\n //Construct parser\n }\n synchronized String readLine(S... | 2008/11/07 | [
"https://Stackoverflow.com/questions/272803",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/35033/"
] |
272,818 | <p>Does anyone know how I can get a list of products belonging to a specific category from within a view file in <a href="http://www.magentocommerce.com/" rel="noreferrer">Magento</a>?</p>
| [
{
"answer_id": 295987,
"author": "Till",
"author_id": 2859,
"author_profile": "https://Stackoverflow.com/users/2859",
"pm_score": 3,
"selected": false,
"text": "<?php\n$_cat = $this->getCurrentCategory();\n$_parent = $_cat->getParentCategory();\n$_categories = $_parent->get... | 2008/11/07 | [
"https://Stackoverflow.com/questions/272818",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
272,821 | <p>What is the best way to get the application name (i.e MyApplication.exe) of the executing assembly from a referenced class library in C#?</p>
<p>I need to open the application's app.config to retrieve some appSettings variables for the referenced DLL.</p>
| [
{
"answer_id": 272833,
"author": "Ray Hayes",
"author_id": 7093,
"author_profile": "https://Stackoverflow.com/users/7093",
"pm_score": 6,
"selected": false,
"text": "// Full-name, e.g. MyApplication, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null\nstring exeAssembly = Assembly.Get... | 2008/11/07 | [
"https://Stackoverflow.com/questions/272821",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/26327/"
] |
272,826 | <p>I've got a PHP command line program running. And I want to connect to a mysql shell straight from PHP. I've done this before in Python using os.execvp But I can't get the same thing to work in PHP.</p>
<p>I've tried the following functions:</p>
<ul>
<li>system</li>
<li>passthru</li>
<li>exec</li>
<li>shell_exec</l... | [
{
"answer_id": 272845,
"author": "acrosman",
"author_id": 24215,
"author_profile": "https://Stackoverflow.com/users/24215",
"pm_score": 0,
"selected": false,
"text": "system('mysql -u root -pxxxx db_name < script.mysql');\n"
},
{
"answer_id": 272894,
"author": "TJ L",
"au... | 2008/11/07 | [
"https://Stackoverflow.com/questions/272826",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/261/"
] |
272,868 | <p>I thought that it would be fun to present some classic CS problems and let people show their algorithm optimization skills. The hope is that we get to see some clever techniques to solve abstract problems that we may be able to implement in practice.</p>
<p>Ideally solutions would be presented in pseudo code with a... | [
{
"answer_id": 272934,
"author": "Erick",
"author_id": 12251,
"author_profile": "https://Stackoverflow.com/users/12251",
"pm_score": 0,
"selected": false,
"text": "delta=1\n\nfor(index=1;index < N;index+=delta) {\n print open locker = index;\n delta+=2;\n opencount++;\n};\n"
},
... | 2008/11/07 | [
"https://Stackoverflow.com/questions/272868",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12251/"
] |
272,876 | <blockquote>
<p>char *strtok(char *s1, const char *s2)</p>
<p>repeated calls to this function break string s1 into "tokens"--that is
the string is broken into substrings,
each terminating with a '\0', where
the '\0' replaces any characters
contained in string s2. The first call
uses the string to be to... | [
{
"answer_id": 272904,
"author": "The Archetypal Paul",
"author_id": 21755,
"author_profile": "https://Stackoverflow.com/users/21755",
"pm_score": 5,
"selected": true,
"text": "char * char *text = \"foobar\";\n char text[7] = \"foobar\";\n strtok null strtok"
},
{
"answer_id": 27... | 2008/11/07 | [
"https://Stackoverflow.com/questions/272876",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14520/"
] |
272,900 | <p>Can anyone explain why following code won't compile? At least on g++ 4.2.4.</p>
<p>And more interesting, why it will compile when I cast MEMBER to int?</p>
<pre><code>#include <vector>
class Foo {
public:
static const int MEMBER = 1;
};
int main(){
vector<int> v;
v.push_back( Fo... | [
{
"answer_id": 272965,
"author": "Drew Hall",
"author_id": 23934,
"author_profile": "https://Stackoverflow.com/users/23934",
"pm_score": 9,
"selected": true,
"text": "class Foo { /* ... */ };\n\nconst int Foo::MEMBER;\n\nint main() { /* ... */ }\n"
},
{
"answer_id": 272982,
"... | 2008/11/07 | [
"https://Stackoverflow.com/questions/272900",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/35281/"
] |
272,908 | <p>I'm trying to install RSpec as a gem after having it installed as a plugin. I've gone ahead and followed the directions found here <a href="http://github.com/dchelimsky/rspec-rails/wikis" rel="noreferrer">http://github.com/dchelimsky/rspec-rails/wikis</a> for the section titled <strong>rspec and rspec-rails gems</s... | [
{
"answer_id": 273526,
"author": "Micah",
"author_id": 19964,
"author_profile": "https://Stackoverflow.com/users/19964",
"pm_score": 1,
"selected": false,
"text": "script/generate rspec_model mymodel\nscript/generate rspec_controller mycontroller\n"
},
{
"answer_id": 273936,
... | 2008/11/07 | [
"https://Stackoverflow.com/questions/272908",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/35564/"
] |
272,910 | <p>When does java let go of a connections to a URL? I don't see a close() method on either URL or URLConnection so does it free up the connection as soon as the request finishes? I'm mainly asking to see if I need to do any clean up in an exception handler.</p>
<pre><code>try {
URL url = new URL("http://foo.bar");
... | [
{
"answer_id": 70305155,
"author": "Artem Mostyaev",
"author_id": 1219012,
"author_profile": "https://Stackoverflow.com/users/1219012",
"pm_score": 0,
"selected": false,
"text": "adb shell ps\n adb shell run-as YOUR_PACKAGE_NAME ls -l /proc/YOUR_PID/fd\n close"
}
] | 2008/11/07 | [
"https://Stackoverflow.com/questions/272910",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14481/"
] |
272,927 | <p>I have a pseudo-realtime data processing application where I would like to use <code>LazyInit<double></code> so I don't do calculations I don't need, but <code>LazyInit<T></code> restricts T to classes. I can work around it, but I'd obviously prefer not to.</p>
<p>Does anybody know why this is?</p>
| [
{
"answer_id": 272937,
"author": "Rob Prouse",
"author_id": 30827,
"author_profile": "https://Stackoverflow.com/users/30827",
"pm_score": 0,
"selected": false,
"text": "LazyInit<double?>\n"
}
] | 2008/11/07 | [
"https://Stackoverflow.com/questions/272927",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4797/"
] |
272,928 | <p>I need to generate buttons initially based on quite a processor and disk intensive search. Each button will represent a selection and trigger a postback. My issue is that the postback does not trigger the command b_Command. I guess because the original buttons have not been re-created. I cannot affort to execute... | [
{
"answer_id": 272992,
"author": "tsilb",
"author_id": 11112,
"author_profile": "https://Stackoverflow.com/users/11112",
"pm_score": 0,
"selected": false,
"text": "<asp:Button id=\"btnCommand\" runat=\"server\" onClick=\"b_Command\" text=\"Submit\" />\n"
},
{
"answer_id": 273093,... | 2008/11/07 | [
"https://Stackoverflow.com/questions/272928",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/22100/"
] |
272,941 | <p>I've done development in both VB6 and VB.NET, and I've used ADODB objects in VB6 to handle recordset navigation (i.e. the MoveFirst, MoveNext, etc. methods), and I have used ADO.NET to handle queries in a row-by-row nature (i.e For Each Row In Table.Rows ...)</p>
<p>But now I seem to have come to a dilemma. I am n... | [
{
"answer_id": 272968,
"author": "StingyJack",
"author_id": 16391,
"author_profile": "https://Stackoverflow.com/users/16391",
"pm_score": 3,
"selected": true,
"text": "Dim ds as DataSet\n\n'populate your DataSet'\n\nFor each dr as DataRow in ds.Tables(<tableIndex>).Rows\n 'Do something ... | 2008/11/07 | [
"https://Stackoverflow.com/questions/272941",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/29115/"
] |
272,964 | <p>If I have a function that returns an object, but this return value is never used by the caller, will the compiler optimize away the copy? (Possibly an always/sometimes/never answer.)</p>
<p>Elementary example:</p>
<pre><code>ReturnValue MyClass::FunctionThatAltersMembersAndNeverFails()
{
//Do stuff to members ... | [
{
"answer_id": 64436238,
"author": "Gukki5",
"author_id": 5689597,
"author_profile": "https://Stackoverflow.com/users/5689597",
"pm_score": 0,
"selected": false,
"text": "mov"
}
] | 2008/11/07 | [
"https://Stackoverflow.com/questions/272964",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/22724/"
] |
272,970 | <p>It seems that all of the documentation I can find about OpenGL-ES says something to the effect of "OpenGL-ES is just like OpenGL, but without a lot of stuff. For example, there's no glBegin or glEnd."</p>
<p>Ok, that's great. So, what ELSE isn't there any of? Or is there a list of what's <em>in</em>? Or maybe a... | [
{
"answer_id": 421839,
"author": "Patrick Hogan",
"author_id": 4065,
"author_profile": "https://Stackoverflow.com/users/4065",
"pm_score": 4,
"selected": false,
"text": "/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.2.sdk/\nSystem/Library/Frameworks/OpenGLES.framework/H... | 2008/11/07 | [
"https://Stackoverflow.com/questions/272970",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/34820/"
] |
272,973 | <p>I have a single form for editing an event, in which the user can (a) edit the details of the event (title, description, dates, etc.) in a FormView and (b) view and edit a ListView of contacts who are registered for the event. </p>
<p>Here's my LinqDataSource, which allows me to add and remove contacts to the event... | [
{
"answer_id": 276419,
"author": "Alexander Taran",
"author_id": 35954,
"author_profile": "https://Stackoverflow.com/users/35954",
"pm_score": 0,
"selected": false,
"text": "create all list items programmaticaly.\ncreate event proggramaticaly.\nevent myevent = new event();\nevent.somepro... | 2008/11/07 | [
"https://Stackoverflow.com/questions/272973",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/239663/"
] |
272,987 | <p>We have a pretty mature COM dll, which we test using DUnit. One of our recent tests creates a few threads, and tests the object from those threads. This test works fine when running the test using the gui front-end, but hangs when running as a console application. Here's a quick pseudo view of what we have in the te... | [
{
"answer_id": 273236,
"author": "Barry Kelly",
"author_id": 3712,
"author_profile": "https://Stackoverflow.com/users/3712",
"pm_score": 4,
"selected": true,
"text": "OnTerminate Synchronize() CheckSynchronize() Application.ProcessMessages() Synchronize() uses Windows, SysUtils, Classes,... | 2008/11/07 | [
"https://Stackoverflow.com/questions/272987",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/22712/"
] |
272,993 | <p>I have a rails template (.rhtml file) generating a Javascript object. It looks something like the following:</p>
<pre><code>var volumes = {
<% for volume in @volumes %>
<%= volume.id %> : <%= volume.data %>
<%= ',' unless volume === @volumes.last %>
<% end %>
};
</code></p... | [
{
"answer_id": 273010,
"author": "Jim Puls",
"author_id": 6010,
"author_profile": "https://Stackoverflow.com/users/6010",
"pm_score": 4,
"selected": true,
"text": "join <%= @volumes.map {|v| \"#{v.id} : #{v.data}\"}.join \",\" %>\n"
},
{
"answer_id": 273472,
"author": "James ... | 2008/11/07 | [
"https://Stackoverflow.com/questions/272993",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10026/"
] |
273,002 | <p>First of all, I will admit I am a novice to web services, although I'm familiar with HTML and basic web stuff. I created a quick-and-dirty web service using Python that calls a stored procedure in a MySQL database, that simply returns a BIGINT value. I want to return this value in the web service, and I want to ge... | [
{
"answer_id": 8336051,
"author": "user1064941",
"author_id": 1064941,
"author_profile": "https://Stackoverflow.com/users/1064941",
"pm_score": 1,
"selected": false,
"text": "def test_soappy():\n \"\"\"test for SOAPpy.SOAPServer\n \"\"\"\n #okay\n # it's good for SOAPpy.SOAPS... | 2008/11/07 | [
"https://Stackoverflow.com/questions/273002",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/31319/"
] |
273,009 | <p>I need to select a datetime column in a table. However, I want the select statement to return the datetime as a nvarchar with the format DD/MM/YYYY.</p>
| [
{
"answer_id": 273020,
"author": "tsilb",
"author_id": 11112,
"author_profile": "https://Stackoverflow.com/users/11112",
"pm_score": 1,
"selected": false,
"text": "select convert(nvarchar(10), datefield, 103)\n"
},
{
"answer_id": 273021,
"author": "Joel Coehoorn",
"author... | 2008/11/07 | [
"https://Stackoverflow.com/questions/273009",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/889/"
] |
273,029 | <p>In converting from short to a byte array I found the following solution on the web but could not quite understand the logic involved.</p>
<pre><code>//buffer is an array of bytes, bytes[]
buffer[position] = (byte)(sample & 0xff);
buffer[position+1] = (byte)((sample >> 8) & 0xff);
</code></pre>
<p>Can... | [
{
"answer_id": 273058,
"author": "Vinko Vrsalovic",
"author_id": 5190,
"author_profile": "https://Stackoverflow.com/users/5190",
"pm_score": 4,
"selected": false,
"text": "1110001100001111 sample\n0000000011111111 0xff\n0000000000001111 sample & 0xff => first byte`\n 0000000011100011 sam... | 2008/11/07 | [
"https://Stackoverflow.com/questions/273029",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
273,039 | <p>In Xcode, I can use <kbd>CMD</kbd>-<kbd>R</kbd> to run (or <kbd>CMD</kbd>-<kbd>Y</kbd> to debug), and my app will compile, install on the phone & start-up. (I've already prepped my phone & Xcode so this part works as expected.)</p>
<p>What I'd <strong><em>LIKE</em></strong> to do is type CMD-<something ... | [
{
"answer_id": 273095,
"author": "Jason Coco",
"author_id": 34218,
"author_profile": "https://Stackoverflow.com/users/34218",
"pm_score": 3,
"selected": true,
"text": "xcodebuild install -configuration Debug\n xcodebuild install -target iPhoneApp -configuration Debug\n"
}
] | 2008/11/07 | [
"https://Stackoverflow.com/questions/273039",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/34820/"
] |
273,043 | <p>We have a Linux application that makes use of OpenSSL's Python bindings and I suspect it is causing random crashes. Occasionally, we see it crash with the message: </p>
<blockquote>
<p>Python Fatal Error: GC Object already tracked</p>
</blockquote>
<p>which would appear to be either a programming error on the pa... | [
{
"answer_id": 273111,
"author": "Alex Coventry",
"author_id": 1941213,
"author_profile": "https://Stackoverflow.com/users/1941213",
"pm_score": 4,
"selected": true,
"text": "(gdb) print PyRun_SimpleString(\"import traceback; traceback.print_stack()\")\n File \"<string>\", line 1, in <m... | 2008/11/07 | [
"https://Stackoverflow.com/questions/273043",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/29825/"
] |
273,048 | <p>How can I calculate the last business day of the month in .NET?</p>
| [
{
"answer_id": 273094,
"author": "shsteimer",
"author_id": 292,
"author_profile": "https://Stackoverflow.com/users/292",
"pm_score": 3,
"selected": false,
"text": "Day day = getLastDayOfMonth\nint days = getDaysInMonth\nfor i = days to 0\n if day is weekday\n if day is not holiday\n ... | 2008/11/07 | [
"https://Stackoverflow.com/questions/273048",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4770/"
] |
273,054 | <p>I'm building the HTML code within an XML DOM object to be used as the contents of the innerHTML of a div element using an XSL template. Traditionally we create a new XML DOM document and add the input parameters as XML Elements for the transform via javascript. This is all very time-consuming as we are basically han... | [
{
"answer_id": 273191,
"author": "scunliffe",
"author_id": 6144,
"author_profile": "https://Stackoverflow.com/users/6144",
"pm_score": 2,
"selected": false,
"text": "javascript:'<xmp>'+window.document.body.outerHTML+'</xmp>';\n"
}
] | 2008/11/07 | [
"https://Stackoverflow.com/questions/273054",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2650/"
] |
273,067 | <p>Sometimes, my UIWebView will have a grey box over part or all of the content. I can't make heads or tails of why it's happening. It happens regularly for certain content.</p>
<p>Thanks!</p>
<p>--Update--</p>
<p>It seems to occur when the webview is not immediately viewable on the screen -- ie i've got a scrollvi... | [
{
"answer_id": 1798343,
"author": "user218755",
"author_id": 218755,
"author_profile": "https://Stackoverflow.com/users/218755",
"pm_score": 0,
"selected": false,
"text": "UIView\n UIScrollView\n UIImageView\n UIWebView\n UIView\n UIScrollView\n UIImageView\n UIWebView\n - (v... | 2008/11/07 | [
"https://Stackoverflow.com/questions/273067",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
273,081 | <p>I have an application that needs to hit the ActiveDirectory to get user permission/roles on startup of the app, and persist throughout. </p>
<p>I don't want to hit AD on every form to recheck the user's permissions, so I'd like the user's role and possibly other data on the logged-in user to be globally available o... | [
{
"answer_id": 273292,
"author": "Mark Brackett",
"author_id": 2199,
"author_profile": "https://Stackoverflow.com/users/2199",
"pm_score": 3,
"selected": true,
"text": "if (Thread.CurrentPrincipal.IsInRole(Roles.Admin)) {\n btnDelete.Visible = false;\n}\n"
}
] | 2008/11/07 | [
"https://Stackoverflow.com/questions/273081",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
273,103 | <p>I have a class that inherits from a base class and implements the following...</p>
<pre><code> Public Function CompareTo(ByVal obj As Object) As Integer Implements System.IComparable.CompareTo
</code></pre>
<p>Now the base class it inherits from also implements this System.IComparable.CompareTo so I'm getting t... | [
{
"answer_id": 273137,
"author": "JaredPar",
"author_id": 23283,
"author_profile": "https://Stackoverflow.com/users/23283",
"pm_score": -1,
"selected": false,
"text": "Public Shadows Function CompareTo(ByVal obj As Object) As Integer Implements System.IComparable.CompareTo\n"
},
{
... | 2008/11/07 | [
"https://Stackoverflow.com/questions/273103",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12842/"
] |
273,126 | <p>I am wondering how the HttpContext is maintained given that the request-response nature of the web is essentially stateless.</p>
<p>Is an identifier being for the HttpContext object being sent as part of the __EVENTTarget / __EVENTARGUMENTS hidden fields so that the HttpRuntime class can create the HttpContext clas... | [
{
"answer_id": 273224,
"author": "Mark Brackett",
"author_id": 2199,
"author_profile": "https://Stackoverflow.com/users/2199",
"pm_score": 4,
"selected": true,
"text": "class HttpSessionState {\n private static readonly Sessions = \n new Dictionary<string, Dictionary<string, object... | 2008/11/07 | [
"https://Stackoverflow.com/questions/273126",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/35559/"
] |
273,141 | <p>I haven't used regular expressions at all, so I'm having difficulty troubleshooting. I want the regex to match only when the contained string is all numbers; but with the two examples below it is matching a string that contains all numbers plus an equals sign like "1234=4321". I'm sure there's a way to change this b... | [
{
"answer_id": 273144,
"author": "Bill the Lizard",
"author_id": 1288,
"author_profile": "https://Stackoverflow.com/users/1288",
"pm_score": 10,
"selected": true,
"text": "Regex regex = new Regex(@\"^\\d$\");\n \"^\\d+$\" \"\\d\" [0-9] ٠١٢٣٤٥٦٧٨٩ \"^[0-9]+$\""
},
{
"answer_id": 2... | 2008/11/07 | [
"https://Stackoverflow.com/questions/273141",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4660/"
] |
273,142 | <p>I'm looking to patch a piece of abandonware with some code.</p>
<p>The software is carbon based, so I can not use an InputManager (at least, I do not think I can). My idea was to add a dylib reference to the mach-o header, and launch a new thread when the initialization routine is called.</p>
<p>I have mucked arou... | [
{
"answer_id": 1990844,
"author": "caleb",
"author_id": 242160,
"author_profile": "https://Stackoverflow.com/users/242160",
"pm_score": 2,
"selected": false,
"text": "set DYLD_INSERT_LIBRARIES to /my/path/libAltInput.dylib\n symoff stroff"
}
] | 2008/11/07 | [
"https://Stackoverflow.com/questions/273142",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
273,145 | <p>A friend of mine downloaded some malware from Facebook, and I'm curious to see what it does without infecting myself. I know that you can't really decompile an .exe, but can I at least view it in Assembly or attach a debugger? </p>
<p>Edit to say it is not a .NET executable, no CLI header.</p>
| [
{
"answer_id": 39520876,
"author": "BullyWiiPlaza",
"author_id": 3764804,
"author_profile": "https://Stackoverflow.com/users/3764804",
"pm_score": 4,
"selected": false,
"text": "x64dbg"
}
] | 2008/11/07 | [
"https://Stackoverflow.com/questions/273145",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/736/"
] |
273,148 | <p>Has anyone tried using these new VS2008 MFC classes yet? I can't seem to find any examples anywhere. Even the VS2008 samples(1) don't mention these classes. (They use CToolTip.)</p>
<p><em>(1) Update: My mistake. I had downloaded the <a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=01AE159F-08CD-49... | [
{
"answer_id": 39520876,
"author": "BullyWiiPlaza",
"author_id": 3764804,
"author_profile": "https://Stackoverflow.com/users/3764804",
"pm_score": 4,
"selected": false,
"text": "x64dbg"
}
] | 2008/11/07 | [
"https://Stackoverflow.com/questions/273148",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4858/"
] |
273,151 | <p>I've used MS Word automation to save a .doc to a .htm. If there are bullet characters in the .doc file, they are saved fine to the .htm, but when I try to read the .htm file into a string (so I can subsequently send to a database for ultimate storage as a string, not a blob), the bullets are converted to question m... | [
{
"answer_id": 273423,
"author": "Ian G",
"author_id": 31765,
"author_profile": "https://Stackoverflow.com/users/31765",
"pm_score": 0,
"selected": false,
"text": ".doc .html File.ReadAllText StreamReader File.ReadAllText <ul style='margin-top:0cm' type=disc> \n <li class=MsoNormal ... | 2008/11/07 | [
"https://Stackoverflow.com/questions/273151",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/29107/"
] |
273,159 | <p>I'm trying to install a site under an alternative port on a server, but the port may be closed by a firewall. Is there a way to ping out or in, on a specific port, to see if it is open?</p>
| [
{
"answer_id": 273188,
"author": "Alnitak",
"author_id": 6782,
"author_profile": "https://Stackoverflow.com/users/6782",
"pm_score": 11,
"selected": true,
"text": "netstat -an telnet host port telnet host:port"
},
{
"answer_id": 4658665,
"author": "Machtyn",
"author_id": ... | 2008/11/07 | [
"https://Stackoverflow.com/questions/273159",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/16794/"
] |
273,169 | <p>How can I dynamically invoke a class method in PHP? The class method is not static. It appears that </p>
<pre><code>call_user_func(...)
</code></pre>
<p>only works with static functions?</p>
<p>Thanks.</p>
| [
{
"answer_id": 273175,
"author": "Neil Williams",
"author_id": 9617,
"author_profile": "https://Stackoverflow.com/users/9617",
"pm_score": 2,
"selected": false,
"text": "call_user_func(array($object, 'methodName'));\n"
},
{
"answer_id": 273176,
"author": "Peter Bailey",
"... | 2008/11/07 | [
"https://Stackoverflow.com/questions/273169",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1638/"
] |
273,192 | <p>How do I check if the directory into which a file is going to be written does exist, and if it does not, create the directory using Python?</p>
| [
{
"answer_id": 273206,
"author": "gone",
"author_id": 26880,
"author_profile": "https://Stackoverflow.com/users/26880",
"pm_score": 6,
"selected": false,
"text": "os.path.exists if not os.path.exists(dir):\n os.mkdir(dir)\n"
},
{
"answer_id": 273208,
"author": "Douglas May... | 2008/11/07 | [
"https://Stackoverflow.com/questions/273192",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13055/"
] |
273,199 | <p>I'm trying to convert some Xaml to HTML using the .NET XslCompiledTransform and am running into difficulties getting the xslt to match Xaml tags. For instance with this Xaml input:</p>
<pre><code><FlowDocument PagePadding="5,0,5,0" AllowDrop="True" NumberSubstitution.CultureSource="User" xmlns="http://schemas.m... | [
{
"answer_id": 273257,
"author": "Robert Rossney",
"author_id": 19403,
"author_profile": "https://Stackoverflow.com/users/19403",
"pm_score": 6,
"selected": true,
"text": "http://schemas.microsoft.com/winfx/2006/xaml/presentation <?xml version=\"1.0\" encoding=\"utf-8\"?>\n<xsl:styleshee... | 2008/11/07 | [
"https://Stackoverflow.com/questions/273199",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1807/"
] |
273,203 | <p>I'm using python\pyodbc and would like to access the second result set of a stored procedure. As near as I can tell, pyodbc does not support multiple result sets. Additionally, I can't modify the stored procedure. Are there any options to access the second result set using SQL or some other work-around? Perhaps crea... | [
{
"answer_id": 313665,
"author": "TJG",
"author_id": 40211,
"author_profile": "https://Stackoverflow.com/users/40211",
"pm_score": 4,
"selected": false,
"text": "nextset() \nimport pyodbc\n\ndb = pyodbc.connect (\"\")\nq = db.cursor ()\nq.execute (\"\"\"\nSELECT TOP 5 * FROM INFORMATION_... | 2008/11/07 | [
"https://Stackoverflow.com/questions/273203",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
273,209 | <p>Is it ever acceptable to have a <a href="http://en.wikipedia.org/wiki/Memory_leak" rel="noreferrer">memory leak</a> in your C or C++ application?</p>
<p>What if you allocate some memory and use it until the very last line of code in your application (for example, a global object's destructor)? As long as the memory... | [
{
"answer_id": 273585,
"author": "Edward Kmett",
"author_id": 34707,
"author_profile": "https://Stackoverflow.com/users/34707",
"pm_score": 3,
"selected": false,
"text": "/proc/self/maps"
},
{
"answer_id": 274042,
"author": "Max Lybbert",
"author_id": 10593,
"author_p... | 2008/11/07 | [
"https://Stackoverflow.com/questions/273209",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3175/"
] |
273,217 | <p>Does anybody know what's going on here:</p>
<p>I run hibernate 3.2.6 against a PostgreSQL 8.3 (installed via fink) database on my Mac OS X. The setup works fine when I use Java 6 and the JDBC 4 driver (postgresql-8.3-603.jdbc4). However, I need this stuff to work with Java 5 and (hence) JDBC 3 (postgresql-8.3-603.j... | [
{
"answer_id": 273391,
"author": "shyam",
"author_id": 7616,
"author_profile": "https://Stackoverflow.com/users/7616",
"pm_score": 1,
"selected": false,
"text": "<property name=\"connection.url\">jdbc:postgresql:test</property>\n <property name=\"connection.url\">jdbc:postgresql://localh... | 2008/11/07 | [
"https://Stackoverflow.com/questions/273217",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4110/"
] |
273,218 | <p>In layman's terms, what's a RDF triple?</p>
| [
{
"answer_id": 273251,
"author": "Adam Ness",
"author_id": 21973,
"author_profile": "https://Stackoverflow.com/users/21973",
"pm_score": 5,
"selected": false,
"text": "\"gcc\" \"Compiles\" \"c\" .\n\"gcc\" \"compiles\" \"Java\" . \n\"gcc\" \"compiles\" \"fortran\" .\n\"gcc\" \"has a webs... | 2008/11/07 | [
"https://Stackoverflow.com/questions/273218",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/35588/"
] |
273,220 | <p>I want to create a library with a modified version of printf and then call LD_PRELOAD so when my program calls printf it uses my version. Can someone explain to me how to use LD_PRELOAD and if there is a something special I need to do in my code or my library? </p>
| [
{
"answer_id": 273259,
"author": "KernelM",
"author_id": 22328,
"author_profile": "https://Stackoverflow.com/users/22328",
"pm_score": -1,
"selected": false,
"text": "printf"
},
{
"answer_id": 273277,
"author": "Steve Baker",
"author_id": 13566,
"author_profile": "htt... | 2008/11/07 | [
"https://Stackoverflow.com/questions/273220",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
273,238 | <p>How do I get:</p>
<pre><code>id Name Value
1 A 4
1 B 8
2 C 9
</code></pre>
<p>to</p>
<pre><code>id Column
1 A:4, B:8
2 C:9
</code></pre>
| [
{
"answer_id": 273319,
"author": "Amy B",
"author_id": 8155,
"author_profile": "https://Stackoverflow.com/users/8155",
"pm_score": 3,
"selected": false,
"text": "------------------------------\n-- Setup\n------------------------------\n\nDECLARE @Source TABLE\n(\n id int,\n Name varcha... | 2008/11/07 | [
"https://Stackoverflow.com/questions/273238",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/889/"
] |
273,242 | <p>Is there anything like Winsplit Revolution for Mac OS X?</p>
| [
{
"answer_id": 2977827,
"author": "Adrian Anttila",
"author_id": 5988,
"author_profile": "https://Stackoverflow.com/users/5988",
"pm_score": 1,
"selected": false,
"text": "tell application \"System Events\"\n set _everyProcess to every process\n repeat with n from 1 to count of _everyP... | 2008/11/07 | [
"https://Stackoverflow.com/questions/273242",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5988/"
] |
273,261 | <p>I have an application where I accept a socket connection from a telnet client and put up a simple, keyboard driven character GUI.</p>
<p>The telnet client, at least on Linux, defaults into line-at-a-time mode, so I always have to do <code>^]mode char</code> manually.</p>
<p>A skim of the relevant RFCs suggests tha... | [
{
"answer_id": 279271,
"author": "Community",
"author_id": -1,
"author_profile": "https://Stackoverflow.com/users/-1",
"pm_score": 3,
"selected": false,
"text": "// IAC WONT LINEMODE IAC WILL ECHO\n\nwrite(s,\"\\377\\375\\042\\377\\373\\001\",6);\n"
},
{
"answer_id": 1068894,
... | 2008/11/07 | [
"https://Stackoverflow.com/questions/273261",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
273,262 | <p>I want to deal with the command line input in Ruby:</p>
<pre><code>> cat input.txt | myprog.rb
> myprog.rb < input.txt
> myprog.rb arg1 arg2 arg3 ...
</code></pre>
<p>What is the best way to do it? In particular I want to deal with blank STDIN, and I hope for an elegant solution.</p>
<pre><code>#!/usr... | [
{
"answer_id": 273415,
"author": "Damir Zekić",
"author_id": 401510,
"author_profile": "https://Stackoverflow.com/users/401510",
"pm_score": 5,
"selected": false,
"text": "#!/usr/bin/env ruby\n\nuntil ARGV.empty? do\n puts \"From arguments: #{ARGV.shift}\"\nend\n\nwhile a = gets\n puts... | 2008/11/07 | [
"https://Stackoverflow.com/questions/273262",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/35580/"
] |
273,273 | <p>I'm looking for a small and fast library implementing an HTTP server in .NET</p>
<p>My general requirements are:</p>
<ul>
<li>Supports multiple simultaneous connections</li>
<li>Only needs to support static content (no server side processing)</li>
<li>HTTP only, HTTPS not needed</li>
<li>Preferably be able to serv... | [
{
"answer_id": 72867512,
"author": "Javid",
"author_id": 492352,
"author_profile": "https://Stackoverflow.com/users/492352",
"pm_score": 0,
"selected": false,
"text": "HttpListener"
}
] | 2008/11/07 | [
"https://Stackoverflow.com/questions/273273",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/194/"
] |
273,275 | <p>Rails has an awesome way of looking up column names and expected datatypes from the DB, alleviating a lot of programming.</p>
<p>I'm trying to build something like this in C#.NET, because we have large tables that are ever changing. I'll be adding parameters like so:</p>
<pre><code>SqlParameter param = new SqlPara... | [
{
"answer_id": 273305,
"author": "tsilb",
"author_id": 11112,
"author_profile": "https://Stackoverflow.com/users/11112",
"pm_score": 2,
"selected": false,
"text": "SqlParameter param = new SqlParameter(\"parametername\", value);\n comm.Parameters.Add(new SqlParameter(\"parametername\",va... | 2008/11/07 | [
"https://Stackoverflow.com/questions/273275",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/25538/"
] |
273,283 | <p>I just added printing capability to a web site using a style sheet (ie. @media print, etc.) and was wondering if I could use a similar method for adding support for mobile devices.</p>
<p>If not, how do I detect a mobile device? My pages are C# (.aspx) and I'd like to scale back the pages for ease of use on a mobi... | [
{
"answer_id": 273289,
"author": "Rob Allen",
"author_id": 149,
"author_profile": "https://Stackoverflow.com/users/149",
"pm_score": 4,
"selected": true,
"text": "<style type=\"text/css\">\n @media handheld\n {\n /* handheld styles */\n }\n</style>\n"
},
{
"answer_i... | 2008/11/07 | [
"https://Stackoverflow.com/questions/273283",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20848/"
] |
273,297 | <p>Few of us would deny the awesomeness of debuggers, but to make it more useful, some tricks can be used. </p>
<p>For example in Python, you can use <strong><em>pass</em></strong> to do absolutely nothing except to leave you room to put a break point and allow you to observe the values in the Watch window. </p>
<p>I... | [
{
"answer_id": 273303,
"author": "FlySwat",
"author_id": 1965,
"author_profile": "https://Stackoverflow.com/users/1965",
"pm_score": 6,
"selected": true,
"text": "System.Diagnostics.Debugger.Break();\n"
},
{
"answer_id": 273322,
"author": "Edward Kmett",
"author_id": 3470... | 2008/11/07 | [
"https://Stackoverflow.com/questions/273297",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10088/"
] |
273,307 | <p>I've got a very small standalone vb.net app that gets run automatically. Every now and then it hits an error condition that I want to log and then keep processing. But, this is far too minor a thing to store in the system's main log - I really just want to append a line to a text file.</p>
<p>What's the least str... | [
{
"answer_id": 273340,
"author": "FlySwat",
"author_id": 1965,
"author_profile": "https://Stackoverflow.com/users/1965",
"pm_score": 2,
"selected": false,
"text": " void logMessage(string message)\n {\n string logFileName = \"log.file\";\n\n File.AppendAllText(logFile... | 2008/11/07 | [
"https://Stackoverflow.com/questions/273307",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19074/"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.