qid int64 4 19.1M | question stringlengths 18 48.3k | answers list | date stringlengths 10 10 | metadata list |
|---|---|---|---|---|
279,473 | <p>currently I have the following code:</p>
<pre><code>String select = qry.substring("select ".length(),qry2.indexOf(" from "));
String[] attrs = select.split(",");
</code></pre>
<p>which works for the most parts but fails if given the following:</p>
<pre><code>qry = "select a,b,c,DATETOSTRING(date_attr_name,'mm/dd/... | [
{
"answer_id": 279499,
"author": "VonC",
"author_id": 6309,
"author_profile": "https://Stackoverflow.com/users/6309",
"pm_score": 2,
"selected": true,
"text": "[^,]+\\([^\\)]+\\)|[^,]+,\n a,b,c,DATETOSTRING(date_attr_name,'mm/dd/yyyy'),f,gg,dr(tt,t,),fff\n a,b,c,DATETOSTRING(date_attr_na... | 2008/11/10 | [
"https://Stackoverflow.com/questions/279473",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/292/"
] |
279,475 | <p>On a web page that is to be displayed on an iPhone, is there a way to get the number pad to come up when the user taps in the field, instead of the qwerty keypad? </p>
<p><a href="http://www.bennadel.com/blog/1197-Defaulting-To-The-Numeric-Keyboard-On-The-iPhone.htm" rel="nofollow noreferrer">This guy says here's h... | [
{
"answer_id": 6951937,
"author": "icktoofay",
"author_id": 200291,
"author_profile": "https://Stackoverflow.com/users/200291",
"pm_score": 2,
"selected": false,
"text": "number text"
}
] | 2008/11/10 | [
"https://Stackoverflow.com/questions/279475",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/21447/"
] |
279,478 | <p>Given a model</p>
<pre><code>class BaseModel < ActiveRecord::Base
validates_presence_of :parent_id
before_save :frobnicate_widgets
end
</code></pre>
<p>and a derived model (the underlying database table has a <code>type</code> field - this is simple rails STI)</p>
<pre><code>class DerivedModel < BaseMod... | [
{
"answer_id": 279584,
"author": "Orion Edwards",
"author_id": 234,
"author_profile": "https://Stackoverflow.com/users/234",
"pm_score": 2,
"selected": false,
"text": "before_validation_on_create before_save before_save.clear\n"
},
{
"answer_id": 279591,
"author": "Orion Edwa... | 2008/11/10 | [
"https://Stackoverflow.com/questions/279478",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/234/"
] |
279,491 | <p>I'm experiencing some problems with CSS and/or tables on my newly redesigned <a href="http://www.artinthepicture.com" rel="nofollow noreferrer">website</a>. Because of the well known "100% div height"-issue, I have resorted to using tables as a structural element of the website. So it looks something like this:</p>
... | [
{
"answer_id": 279517,
"author": "Kyle Trauberman",
"author_id": 21461,
"author_profile": "https://Stackoverflow.com/users/21461",
"pm_score": 0,
"selected": false,
"text": "border: 1px solid red;\n position: relative;\n"
},
{
"answer_id": 279518,
"author": "Konrad Rudolph",
... | 2008/11/10 | [
"https://Stackoverflow.com/questions/279491",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
279,493 | <p>What is the way to avoid phpunit having to call the constructor for a mock object? Otherwise I would need a mock object as constructor argument, another one for that etc. The api seems to be like this:</p>
<pre><code>getMock($className, $methods = array(), array $arguments = array(),
$mockClassName = '', $c... | [
{
"answer_id": 628308,
"author": "Matthew Purdon",
"author_id": 75873,
"author_profile": "https://Stackoverflow.com/users/75873",
"pm_score": 5,
"selected": false,
"text": " // Get a Mock Soap Client object to work with.\n $classToMock = 'SoapClient';\n $methodsToMock = array('_... | 2008/11/10 | [
"https://Stackoverflow.com/questions/279493",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
279,495 | <p>This is a C# console application. I have a function that does something like this:</p>
<pre><code>static void foo()
{
Application powerpointApp;
Presentation presentation = null;
powerpointApp = new Microsoft.Office.Interop.PowerPoint.ApplicationClass();
}
</code></pre>
<p>That's all it does.... | [
{
"answer_id": 2505375,
"author": "Anonymous Type",
"author_id": 141720,
"author_profile": "https://Stackoverflow.com/users/141720",
"pm_score": 1,
"selected": false,
"text": "<runtime>\n\n <generatePublisherEvidence enabled=\"false\"/>\n\n</runtime>\n"
}
] | 2008/11/10 | [
"https://Stackoverflow.com/questions/279495",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12261/"
] |
279,500 | <p>I have a program that I need to run under *nix and windows. because the program takes file paths from files the issue is what to do about the <code>\</code> vs <code>/</code> issue. </p>
<p>My current thought is to put in a regex that converts the wrong one to the right one depending on what system I'm on. This wil... | [
{
"answer_id": 279511,
"author": "Dillie-O",
"author_id": 71,
"author_profile": "https://Stackoverflow.com/users/71",
"pm_score": 1,
"selected": false,
"text": "LoadApplicationData(FileManager.GetDataFilePath)\n"
}
] | 2008/11/10 | [
"https://Stackoverflow.com/questions/279500",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1343/"
] |
279,507 | <p>This could be the dumbest question ever asked but I think it is quite confusing for a Java newbie. </p>
<ol>
<li>Can somebody clarify what is meant by <em>immutable</em>? </li>
<li>Why is a <code>String</code> immutable?</li>
<li>What are the advantages/disadvantages of the immutable objects?</li>
<li>Why should a ... | [
{
"answer_id": 279515,
"author": "eishay",
"author_id": 16201,
"author_profile": "https://Stackoverflow.com/users/16201",
"pm_score": 2,
"selected": false,
"text": "String String s1 = \" abc \";\nString s2 = s1.trim();\n s2 s1"
},
{
"answer_id": 279516,
"author": "Georgy Bo... | 2008/11/10 | [
"https://Stackoverflow.com/questions/279507",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/33203/"
] |
279,523 | <p>I have written an installation class that extends Installer and overrides afterInstall, but I'm getting a null pointer exception. How can I go about debugging my class?</p>
| [
{
"answer_id": 280161,
"author": "stephbu",
"author_id": 12702,
"author_profile": "https://Stackoverflow.com/users/12702",
"pm_score": 6,
"selected": false,
"text": "System.Diagnostics.Debugger.Break()\n"
},
{
"answer_id": 2702598,
"author": "Timex",
"author_id": 179333,
... | 2008/11/10 | [
"https://Stackoverflow.com/questions/279523",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/16684/"
] |
279,524 | <p>I have a class that maintans a reference to a Hashtable and serializes/deserializes that Hashtable. After the call to SerializationInfo.GetValue, the Hashtable is not fully deserialized because the deserialization happens during the IDeserialization calback.</p>
<pre><code>Hashtable hashtable = (Hashtable) info.Get... | [
{
"answer_id": 287887,
"author": "Brian Adams",
"author_id": 32992,
"author_profile": "https://Stackoverflow.com/users/32992",
"pm_score": 2,
"selected": false,
"text": "public BoringClass(SerializationInfo info, StreamingContext context)\n{\n Hashtable hashtable = (Hashtable) info.Ge... | 2008/11/10 | [
"https://Stackoverflow.com/questions/279524",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/36373/"
] |
279,534 | <p>Once a programmer decides to implement <code>IXmlSerializable</code>, what are the rules and best practices for implementing it? I've heard that <code>GetSchema()</code> should return <code>null</code> and <code>ReadXml</code> should move to the next element before returning. Is this true? And what about <code>Write... | [
{
"answer_id": 280077,
"author": "Marc Gravell",
"author_id": 23354,
"author_profile": "https://Stackoverflow.com/users/23354",
"pm_score": 8,
"selected": true,
"text": "Read()"
},
{
"answer_id": 2665097,
"author": "EMP",
"author_id": 20336,
"author_profile": "https:/... | 2008/11/10 | [
"https://Stackoverflow.com/questions/279534",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12971/"
] |
279,546 | <p>How could you calculate the minimum width needed to display a string in X lines, given that text should break on whitespace?</p>
| [
{
"answer_id": 279654,
"author": "John Lemp",
"author_id": 12915,
"author_profile": "https://Stackoverflow.com/users/12915",
"pm_score": 0,
"selected": false,
"text": "public SizeF CalculateWidth(Font font, Graphics graphics, int numOfLines,\n string text)\n{\n... | 2008/11/10 | [
"https://Stackoverflow.com/questions/279546",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4066/"
] |
279,552 | <p>I am using the Ajax Control Toolkit Calendar Extender control. In some fields though I want to display the time along with the date. I have tried just setting the Format to "dd/MM/yyyy hh:mm:ss" but the time section gets wiped off. If the user wants to change the time section they can do it manually, the calendar dr... | [
{
"answer_id": 18371967,
"author": "Rajkumar",
"author_id": 2705954,
"author_profile": "https://Stackoverflow.com/users/2705954",
"pm_score": 1,
"selected": false,
"text": " function dateselect(ev)\n {\n var calendarBehavior1 = $find(\"Calendar1\");\n var d = calendar... | 2008/11/10 | [
"https://Stackoverflow.com/questions/279552",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/27294/"
] |
279,557 | <p>WPF GridSplitter makes my Grid wider than my Window!</p>
<p>I've got a WPF Grid with a GridSplitter. If I resize my columns, then I can make my grid wider than my window and non-viewable.</p>
<p>It starts like this: </p>
<p><a href="http://img201.imageshack.us/img201/9505/onehg6.jpg" rel="nofollow noreferrer">W... | [
{
"answer_id": 281317,
"author": "Abe Heidebrecht",
"author_id": 9268,
"author_profile": "https://Stackoverflow.com/users/9268",
"pm_score": 3,
"selected": false,
"text": "<Grid>\n <Grid.ColumnDefinitions>\n <ColumnDefinition Width=\"2*\" MinWidth=\"100\" />\n <ColumnDef... | 2008/11/10 | [
"https://Stackoverflow.com/questions/279557",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/83/"
] |
279,561 | <p>What is the idiomatic Python equivalent of this C/C++ code?</p>
<pre class="lang-cpp prettyprint-override"><code>void foo()
{
static int counter = 0;
counter++;
printf("counter is %d\n", counter);
}
</code></pre>
<p>specifically, how does one implement the static member at the function level, as oppose... | [
{
"answer_id": 279568,
"author": "gnud",
"author_id": 27204,
"author_profile": "https://Stackoverflow.com/users/27204",
"pm_score": 4,
"selected": false,
"text": "def foo_gen():\n n = 0\n while True:\n n+=1\n yield n\n foo = foo_gen().next\nfor i in range(0,10):\n ... | 2008/11/10 | [
"https://Stackoverflow.com/questions/279561",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10569/"
] |
279,572 | <p>I have a database where one of the common queries is has a "where blobCol is null", I think that this is getting bad performance (as in a full table scan). I have no need to index the contents of the blobCol. </p>
<p>What indexes would improve this? Can an index be built on an expression (blobCol is not null) rathe... | [
{
"answer_id": 279580,
"author": "Vinko Vrsalovic",
"author_id": 5190,
"author_profile": "https://Stackoverflow.com/users/5190",
"pm_score": 3,
"selected": true,
"text": "CREATE INDEX notNullblob ON myTable (blobCol is not NULL);\n"
}
] | 2008/11/10 | [
"https://Stackoverflow.com/questions/279572",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1343/"
] |
279,575 | <p>HI All,</p>
<p>I have a piece of javaScript that removes commas from a provided string (in my case currency values)</p>
<p>It is:</p>
<pre><code> function replaceCommaInCurrency(myField, val)
{
var re = /,/g;
document.net1003Form.myField.value=val.replace(re, '');
}
</code></pre>
<p>'... | [
{
"answer_id": 279604,
"author": "flatline",
"author_id": 20846,
"author_profile": "https://Stackoverflow.com/users/20846",
"pm_score": 2,
"selected": false,
"text": "myField.value = myField.value.replace(re, '');\n var jqField = $(myField);\njqField.val(jqField.val().replace(re, '')); ... | 2008/11/10 | [
"https://Stackoverflow.com/questions/279575",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
279,583 | <p>I have a very basic app that I believe should change the width of an image, but it does nothing... can anyone tell me why, when I click on the image, nothing happens to the image? </p>
<p><em>(note, the image itself doesnt really matter, Im just trying to figure out how to shrink and grow and image in JavaFX)</em><... | [
{
"answer_id": 279604,
"author": "flatline",
"author_id": 20846,
"author_profile": "https://Stackoverflow.com/users/20846",
"pm_score": 2,
"selected": false,
"text": "myField.value = myField.value.replace(re, '');\n var jqField = $(myField);\njqField.val(jqField.val().replace(re, '')); ... | 2008/11/10 | [
"https://Stackoverflow.com/questions/279583",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/26310/"
] |
279,601 | <p>I have a <code>vector</code> that I want to insert into a <code>set</code>. This is one of three different calls (the other two are more complex, involving <code>boost::lambda::if_()</code>), but solving this simple case will help me solve the others.</p>
<pre><code>std::vector<std::string> s_vector;
std::set... | [
{
"answer_id": 279649,
"author": "Ferruccio",
"author_id": 4086,
"author_profile": "https://Stackoverflow.com/users/4086",
"pm_score": 1,
"selected": false,
"text": "for_each() vector<string>::insert() for_each() for_each(s_vector.begin(), s_vector.end(),\n boost::bind(set<string... | 2008/11/10 | [
"https://Stackoverflow.com/questions/279601",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/36378/"
] |
279,610 | <p>I want to create a history table to track field changes across a number of tables in DB2. </p>
<p>I know history is usually done with copying an entire table's structure and giving it a suffixed name (e.g. user --> user_history). Then you can use a pretty simple trigger to copy the old record into the history table... | [
{
"answer_id": 279649,
"author": "Ferruccio",
"author_id": 4086,
"author_profile": "https://Stackoverflow.com/users/4086",
"pm_score": 1,
"selected": false,
"text": "for_each() vector<string>::insert() for_each() for_each(s_vector.begin(), s_vector.end(),\n boost::bind(set<string... | 2008/11/10 | [
"https://Stackoverflow.com/questions/279610",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
279,615 | <p>I've got an NSArrayController, and I'm using KVO to observe the Old/New values of it's selection method.</p>
<p>This works perfectly (triggers when the selection changes, the usual) except that the items in the change dictionary are all null instead of being the old/new selected object. [arrayController selection] ... | [
{
"answer_id": 1220907,
"author": "Tom Dalling",
"author_id": 108105,
"author_profile": "https://Stackoverflow.com/users/108105",
"pm_score": 0,
"selected": false,
"text": "NSKeyValueObservingOptionNew NSKeyValueObservingOptionOld addObserver:forKeyPath:options:context:"
}
] | 2008/11/11 | [
"https://Stackoverflow.com/questions/279615",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1512/"
] |
279,631 | <p>I'm trying to load an external swf movie then adding the ability to drag it around the stage, however whenever I try to do this I just hit a dead end. Are there any limitations on what you can set be draggable or clickable? An example of what I'm doing is below:</p>
<pre><code>public function loadSwf(url:String, sw... | [
{
"answer_id": 282050,
"author": "Iain",
"author_id": 11911,
"author_profile": "https://Stackoverflow.com/users/11911",
"pm_score": 2,
"selected": false,
"text": "ldr.content.mouseChildren = false;"
}
] | 2008/11/11 | [
"https://Stackoverflow.com/questions/279631",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/26081/"
] |
279,634 | <p>I have this piece of Javascript and it just won't work. I allready checked JSlint but that said everything works. Still doesn't work. The javascript is located not in the HTML but is linked in the <code><head></code></p>
<p>note: I am working with a local server, so pageload in instant.</p>
<pre><code>functi... | [
{
"answer_id": 279637,
"author": "mercutio",
"author_id": 1951,
"author_profile": "https://Stackoverflow.com/users/1951",
"pm_score": 4,
"selected": true,
"text": "document.getElementById('addField').onclick = addFileInput;\n a.firstChild.onclick = addFileInput;\n"
}
] | 2008/11/11 | [
"https://Stackoverflow.com/questions/279634",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11795/"
] |
279,655 | <p>I need some help with what is probably a newbie question in terms of modifying phpBB.</p>
<p>I have a whole system developed in PHP, and I would like to integrate phpBB so that people can navigate into the forums and post seamlessly, without logging in again.</p>
<p>Now, using the phpBB users table as the users ta... | [
{
"answer_id": 282181,
"author": "Murat Ayfer",
"author_id": 25910,
"author_profile": "https://Stackoverflow.com/users/25910",
"pm_score": 3,
"selected": false,
"text": "profile_fields profile_fields_data phpbb_hash($password) phpbb/includes/functions.php phpbb/includes/functions.php"
... | 2008/11/11 | [
"https://Stackoverflow.com/questions/279655",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3314/"
] |
279,665 | <p>How can I return the result of a different action or move the user to a different action if there is an error in my <code>ModelState</code> without losing my <code>ModelState</code> information?</p>
<p>The scenario is; <code>Delete</code> action accepts a POST from a DELETE form rendered by my <code>Index</code> Act... | [
{
"answer_id": 279680,
"author": "Ty.",
"author_id": 16948,
"author_profile": "https://Stackoverflow.com/users/16948",
"pm_score": -1,
"selected": false,
"text": "return View(\"Index\");\n return Index();\n"
},
{
"answer_id": 279740,
"author": "tvanfosson",
"author_id": 1... | 2008/11/11 | [
"https://Stackoverflow.com/questions/279665",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3957/"
] |
279,673 | <p>I wonder if it's possible to save all files in a Visual Studio 2008 project into a specific character encoding. I got a solution with mixed encodings and I want to make them all the same (UTF-8 with signature).</p>
<p>I know how to save single files, but how about all files in a project?</p>
| [
{
"answer_id": 280325,
"author": "Martin v. Löwis",
"author_id": 33006,
"author_profile": "https://Stackoverflow.com/users/33006",
"pm_score": 3,
"selected": false,
"text": "import glob, codecs\n\nfor f in glob.glob(\"*.py\"):\n data = open(\"f\", \"rb\").read()\n if data.startswit... | 2008/11/11 | [
"https://Stackoverflow.com/questions/279673",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/33349/"
] |
279,693 | <p>I'm new to cryptography and modular arithmetic. So, I'm sure it's a silly question, but I can't help it. </p>
<p>How do I calculate <em>a</em> from <br>
pow(<em>a</em>,<strong>q</strong>) = 1 (mod <strong>p</strong>), <br>
where <strong>p</strong> and <strong>q</strong> are known? I don't g... | [
{
"answer_id": 279700,
"author": "Adam Liss",
"author_id": 29157,
"author_profile": "https://Stackoverflow.com/users/29157",
"pm_score": 3,
"selected": false,
"text": "p q p q p a q q a q p a q p a q p n p n p a q np a a np q n a"
}
] | 2008/11/11 | [
"https://Stackoverflow.com/questions/279693",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/24622/"
] |
279,696 | <p>Still struggling to understand what best practices are with respect to macros. I'm attempting to write a macro which defines packages on the fly.</p>
<pre><code>(defmacro def-dynamic-package (name)
`(defpackage ,(intern (string-upcase name) "KEYWORD")
(:use :common-lisp)))
</code></pre>
<p>This works fine ... | [
{
"answer_id": 279725,
"author": "Nowhere man",
"author_id": 400277,
"author_profile": "https://Stackoverflow.com/users/400277",
"pm_score": 0,
"selected": false,
"text": "(list 'pathname-name 'path)\n (defun def-dynamic-package (name)\n (defpackage (string-upcase name)\n (:use :comm... | 2008/11/11 | [
"https://Stackoverflow.com/questions/279696",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/32797/"
] |
279,701 | <p>I'm trying to get a handle on if there's a good time to use standard linq keywords or linq extension methods with lambda expressions. They seems to do the same thing, just are written differently. Is it purely a matter of style?</p>
<pre><code>var query = from p in Products
where p.Name.Contains("foo")
or... | [
{
"answer_id": 279738,
"author": "Nathan W",
"author_id": 6335,
"author_profile": "https://Stackoverflow.com/users/6335",
"pm_score": 5,
"selected": false,
"text": "Into var query = (from p in Products\n where p.Name.Contains(\"foo\")\n orderby c.Name\n select p).Into(\"MyTable\... | 2008/11/11 | [
"https://Stackoverflow.com/questions/279701",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/26931/"
] |
279,705 | <p>My shared host did not provide git, so I built and installed it into ~/bin.
When I ran it, I got the following error on most commands, although they were successful. </p>
<blockquote>
<p><code>stdin: is not a tty</code></p>
</blockquote>
<p>I can solve that problem by adding: </p>
<blockquote>
<p><code>defa... | [
{
"answer_id": 279746,
"author": "Denis Hennessy",
"author_id": 35958,
"author_profile": "https://Stackoverflow.com/users/35958",
"pm_score": 2,
"selected": false,
"text": "set :deploy_via, :copy\n"
},
{
"answer_id": 281124,
"author": "Chu Yeow",
"author_id": 25226,
"... | 2008/11/11 | [
"https://Stackoverflow.com/questions/279705",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
279,729 | <p>I am forking a number of processes and I want to measure how long it takes to complete the whole task, that is when all processes forked are completed. Please advise how to make the parent process wait until all child processes are terminated? I want to make sure that I stop the timer at the right moment.</p>
<p>He... | [
{
"answer_id": 279744,
"author": "gnud",
"author_id": 27204,
"author_profile": "https://Stackoverflow.com/users/27204",
"pm_score": 4,
"selected": false,
"text": "while(wait() > 0) { /* no-op */ ; }\n wait() int status;\n[...]\ndo {\n status = wait();\n if(status == -1 && errno != ... | 2008/11/11 | [
"https://Stackoverflow.com/questions/279729",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3515/"
] |
279,748 | <p>I have some code like this:</p>
<pre><code>[AcceptVerbs(HttpVerbs.Post)]
public ActionResult Save([Bind(Prefix="")]Person person)
{
String s = person.property;
/* ... */
}
</code></pre>
<p>But it throws the error: "Cannot use local variable 'person' before it is declared".</p>
<p>What simple thing am I mi... | [
{
"answer_id": 18253246,
"author": "Frankie Lee",
"author_id": 2685909,
"author_profile": "https://Stackoverflow.com/users/2685909",
"pm_score": 2,
"selected": false,
"text": " public ChartData(MetricInfo metricInfo, MetricItem[] metricItems) : this()\n {\n int e... | 2008/11/11 | [
"https://Stackoverflow.com/questions/279748",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/364/"
] |
279,749 | <p>I'm working on a kind of unique app which needs to generate images at specific resolutions according to the device they are displayed on. So the output is different on a regular Windows browser (96ppi), iPhone (163ppi), Android G1 (180ppi), and other devices. I'm wondering if there's a way to detect this automatical... | [
{
"answer_id": 4472024,
"author": "john",
"author_id": 488480,
"author_profile": "https://Stackoverflow.com/users/488480",
"pm_score": 2,
"selected": false,
"text": "<body><div id=\"ppitest\" style=\"width:1in;visible:hidden;padding:0px\"></div></body>\n screenPPI = document.getElementBy... | 2008/11/11 | [
"https://Stackoverflow.com/questions/279749",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
279,753 | <p>I have written code that automatically creates CSS sprites based on the IMG tags in a page and replaces them with DIV's with (what I thought was) appropriate CSS to position the sprite image as a background letting the appropriate part show through -- the problem is that I cannot get DIVs to behave as drop in replac... | [
{
"answer_id": 279777,
"author": "Andy Ford",
"author_id": 17252,
"author_profile": "https://Stackoverflow.com/users/17252",
"pm_score": 5,
"selected": true,
"text": "display: inline-block; display: -moz-inline-block;"
}
] | 2008/11/11 | [
"https://Stackoverflow.com/questions/279753",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2168/"
] |
279,763 | <p>I am trying to write a C program that uses <code>dlysm</code>, and I keep getting an undefined reference to dlysm. I think I need to set my <code>-ldl</code> flags but I have no idea how to do this. </p>
<p>I am very new to linux and setting variables. If this is what I need to do can someone help me out with the c... | [
{
"answer_id": 279767,
"author": "Kknd",
"author_id": 18403,
"author_profile": "https://Stackoverflow.com/users/18403",
"pm_score": 1,
"selected": false,
"text": "-ldl gcc myprog.c -o app -ldl\n"
},
{
"answer_id": 279771,
"author": "gnud",
"author_id": 27204,
"author_... | 2008/11/11 | [
"https://Stackoverflow.com/questions/279763",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
279,769 | <p>How do you convert between a DateTime and a Time object in Ruby?</p>
| [
{
"answer_id": 279785,
"author": "Gordon Wilson",
"author_id": 23071,
"author_profile": "https://Stackoverflow.com/users/23071",
"pm_score": 7,
"selected": true,
"text": " Time DateTime require 'date'\nclass Time\n def to_datetime\n # Convert seconds + microseconds into a fractiona... | 2008/11/11 | [
"https://Stackoverflow.com/questions/279769",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4883/"
] |
279,779 | <p>I know in the MVC Framework, you have the Html Class to create URLs:</p>
<pre><code>Html.ActionLink("About us", "about", "home");
</code></pre>
<p>But what if you want to generate Urls in Webforms?</p>
<p>I haven't found a really good resource on the details on generating URLs with Webf... | [
{
"answer_id": 281340,
"author": "MikeO",
"author_id": 36616,
"author_profile": "https://Stackoverflow.com/users/36616",
"pm_score": 3,
"selected": true,
"text": "Dim routedurl = RouteTable.Routes.GetVirtualPath(context, rvd).VirtualPath\n requestContext.HttpContext.Items(\"RequestContex... | 2008/11/11 | [
"https://Stackoverflow.com/questions/279779",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/26931/"
] |
279,781 | <p>Hey everyone, I am trying to run the following program, but am getting a NullPointerException. I am new to the Java swing library so I could be doing something very dumb. Either way here are my two classes I am just playing around for now and all i want to do is draw a damn circle (ill want to draw a gallow, with a ... | [
{
"answer_id": 279798,
"author": "sblundy",
"author_id": 4893,
"author_profile": "https://Stackoverflow.com/users/4893",
"pm_score": 3,
"selected": true,
"text": "g null paintComponent(Graphics g) public class Gallow extends JPanel {\n public paintComponent(Graphics g){\n g.fil... | 2008/11/11 | [
"https://Stackoverflow.com/questions/279781",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/29326/"
] |
279,782 | <p>Given:</p>
<pre><code>from django.db import models
class Food(models.Model):
"""Food, by name."""
name = models.CharField(max_length=25)
class Cat(models.Model):
"""A cat eats one type of food"""
food = models.ForeignKey(Food)
class Cow(models.Model):
"""A cow eats one type of food"""
... | [
{
"answer_id": 279809,
"author": "Brian M. Hunt",
"author_id": 19212,
"author_profile": "https://Stackoverflow.com/users/19212",
"pm_score": 4,
"selected": false,
"text": "def get_all_related_objects(self, local_only=False):\n\ndef get_all_related_many_to_many_objects(self, local_only=Fa... | 2008/11/11 | [
"https://Stackoverflow.com/questions/279782",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19212/"
] |
279,791 | <p>Suppose the following data schema:</p>
<pre><code>Usage
======
client_id
resource
type
amount
Billing
======
client_id
usage_resource
usage_type
rate
</code></pre>
<p>In this example, suppose I have multiple resources, each of which can be used in many ways. For example, one resource is a <code>widget</code>. <... | [
{
"answer_id": 279838,
"author": "Bill Karwin",
"author_id": 20860,
"author_profile": "https://Stackoverflow.com/users/20860",
"pm_score": 4,
"selected": true,
"text": "id Billing Billing Usage Usage Billing"
},
{
"answer_id": 1081092,
"author": "Michael Sofaer",
"author_... | 2008/11/11 | [
"https://Stackoverflow.com/questions/279791",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4257/"
] |
279,822 | <p>I'm looking for a (preferably free) component for Delphi for users to easily select about 100 different colours.</p>
<p>I've currently got one as part of DevExpress's editors, but it only has about 20 proper colours to choose, with a bunch of other 'Windows' colours like clHighlight, clBtnFace, etc.</p>
<p>It's fo... | [
{
"answer_id": 280103,
"author": "Francesca",
"author_id": 9842,
"author_profile": "https://Stackoverflow.com/users/9842",
"pm_score": 5,
"selected": true,
"text": "object ColorDialog1: TColorDialog\n Options = [cdFullOpen, cdAnyColor]\nend\n"
}
] | 2008/11/11 | [
"https://Stackoverflow.com/questions/279822",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/26305/"
] |
279,833 | <p>I am not looking for links to information on hashing.</p>
<p>I am not looking for the worlds greatest hash function.</p>
<p>I am interested in mini-stories describing</p>
<ul>
<li>The problem domain you were working in</li>
<li>The nature of the data you were working with</li>
<li>What your thought process was in... | [
{
"answer_id": 279893,
"author": "S.Lott",
"author_id": 10661,
"author_profile": "https://Stackoverflow.com/users/10661",
"pm_score": 3,
"selected": true,
"text": "{ \n ( (col1, col2), (col3, col4) ) : [ aRow, anotherRow, row3, ... ],\n ( (col1, col2), (col3, col4) ) : [ row1, row2... | 2008/11/11 | [
"https://Stackoverflow.com/questions/279833",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7734/"
] |
279,837 | <p>It's kind of a C puzzle. You have to tell if the program finish its execution, if so, how much time it takes to run and what it returns to the OS.</p>
<pre><code>static unsigned char buffer[256];
int main(void)
{
unsigned char *p, *q;
q = (p = buffer) + sizeof(buffer);
while (q - p)
{
p = buffer... | [
{
"answer_id": 279855,
"author": "Steven A. Lowe",
"author_id": 9345,
"author_profile": "https://Stackoverflow.com/users/9345",
"pm_score": 4,
"selected": false,
"text": "static unsigned char buffer[256];\nint main(void)\n{\n unsigned char *p, *q;\n q = (p = buffer) + sizeof(buffer); ... | 2008/11/11 | [
"https://Stackoverflow.com/questions/279837",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1876/"
] |
279,854 | <p>If I have a vector of pairs:</p>
<pre><code>std::vector<std::pair<int, int> > vec;
</code></pre>
<p>Is there and easy way to sort the list in <strong>increasing</strong> order based on the second element of the pair?</p>
<p>I know I can write a little function object that will do the work, but is there a... | [
{
"answer_id": 279878,
"author": "Evan Teran",
"author_id": 13430,
"author_profile": "https://Stackoverflow.com/users/13430",
"pm_score": 9,
"selected": true,
"text": "auto std::sort(v.begin(), v.end(), [](auto &left, auto &right) {\n return left.second < right.second;\n});\n std::sor... | 2008/11/11 | [
"https://Stackoverflow.com/questions/279854",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/34502/"
] |
279,860 | <h2>Background</h2>
<p>I'm trying out Scons by setting up a basic C++ sample project that has two sub-projects: </p>
<ul>
<li>Prj1 is an EXE that depends on Prj2</li>
<li>Prj2 is a DLL that exports some functions</li>
</ul>
<p>The problem I'm running into is that the library builds its .obj, .pdb, .lib, .dll, etc. f... | [
{
"answer_id": 279883,
"author": "grieve",
"author_id": 34329,
"author_profile": "https://Stackoverflow.com/users/34329",
"pm_score": 2,
"selected": false,
"text": "env.Install(\"../bin\", <your target exe or dll>)\n env.Alias('install', \"../bin\")\nDefault('install')\n"
},
{
"a... | 2008/11/11 | [
"https://Stackoverflow.com/questions/279860",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2233/"
] |
279,902 | <p>Or better said: When to use array as a field data type in a table?</p>
<p>Which solution provides better search results?</p>
| [
{
"answer_id": 59516125,
"author": "mattdlockyer",
"author_id": 1060487,
"author_profile": "https://Stackoverflow.com/users/1060487",
"pm_score": 3,
"selected": false,
"text": "create table data (\n id serial primary key,\n tags int[],\n data jsonb\n);\n\ncreate table tags (\n ... | 2008/11/11 | [
"https://Stackoverflow.com/questions/279902",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/34565/"
] |
279,907 | <p>What is the best way to display a checkbox in a Crystal Report?</p>
<p>Example: My report has a box for "Male" and "Female", and one should be checked.</p>
<p>My current workaround is to draw a small graphical square, and line it up with a formula which goes like this:</p>
<pre><code>if {table.gender} = "M" then ... | [
{
"answer_id": 281304,
"author": "jons911",
"author_id": 34375,
"author_profile": "https://Stackoverflow.com/users/34375",
"pm_score": 2,
"selected": false,
"text": "0xFE 0xA8"
},
{
"answer_id": 2891048,
"author": "hatem gamil",
"author_id": 298416,
"author_profile": ... | 2008/11/11 | [
"https://Stackoverflow.com/questions/279907",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/672/"
] |
279,912 | <p>I am looking to do some tinkering with openGL and Python and haven't been able to find good reasons for using PyOpenGl versus pyglet</p>
<p>Which would you recommend and why?</p>
| [
{
"answer_id": 38231267,
"author": "Szabolcs Dombi",
"author_id": 6557569,
"author_profile": "https://Stackoverflow.com/users/6557569",
"pm_score": 4,
"selected": false,
"text": "pip install ModernGL\n pyglet.gl.glClearColor pip install moderngl-window prog = ctx.program(\n vertex_sha... | 2008/11/11 | [
"https://Stackoverflow.com/questions/279912",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/16584/"
] |
279,917 | <p>I'm loading data from my database, and exporting to an Excel file via a method I found on this site: <a href="http://www.appservnetwork.com/modules.php?name=News&file=article&sid=8" rel="noreferrer">http://www.appservnetwork.com/modules.php?name=News&file=article&sid=8</a></p>
<p>It works, but what ... | [
{
"answer_id": 279926,
"author": "Bill Karwin",
"author_id": 20860,
"author_profile": "https://Stackoverflow.com/users/20860",
"pm_score": 3,
"selected": false,
"text": "PEAR :: Package :: Spreadsheet_Excel_Writer"
},
{
"answer_id": 281902,
"author": "Eric Caron",
"author... | 2008/11/11 | [
"https://Stackoverflow.com/questions/279917",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20826/"
] |
279,919 | <p>Is there a C function call that can change the last modified date of a file or directory in Windows?</p>
| [
{
"answer_id": 279931,
"author": "FlySwat",
"author_id": 1965,
"author_profile": "https://Stackoverflow.com/users/1965",
"pm_score": 2,
"selected": false,
"text": "BOOL WINAPI SetFileTime(\n __in HANDLE hFile,\n __in_opt const FILETIME *lpCreationTime,\n __in_opt const FILETIME... | 2008/11/11 | [
"https://Stackoverflow.com/questions/279919",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
279,945 | <p>I have a file <code>test.txt</code> that is inside a zip archive <code>test.zip</code>. The permissions on <code>test.txt</code> are out of my control when it's compressed, but now I want them to be group-writeable. I am extracting the file with Python, and don't want to escape out to the shell.</p>
<p><strong>ED... | [
{
"answer_id": 279985,
"author": "John Fouhy",
"author_id": 15154,
"author_profile": "https://Stackoverflow.com/users/15154",
"pm_score": 0,
"selected": false,
"text": "for n in `unzip -l test.zip | awk 'NR > 3 && NF == 4 { print $4 }'`; do unzip -p test.zip $n > $n; done\n"
},
{
... | 2008/11/11 | [
"https://Stackoverflow.com/questions/279945",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1057/"
] |
279,953 | <p>I am using a service component through ASP.NET MVC.
I would like to send the email in a asynchronous way to let the user do other stuff without having to wait for the sending.</p>
<p>When I send a message without attachments it works fine.
When I send a message with at least one in-memory attachment it fails.</p>
... | [
{
"answer_id": 41071322,
"author": "sweetfa",
"author_id": 490614,
"author_profile": "https://Stackoverflow.com/users/490614",
"pm_score": 0,
"selected": false,
"text": " public event EventHandler EmailSendCancelled = delegate { };\n\n public event EventHandler EmailSendFailure = d... | 2008/11/11 | [
"https://Stackoverflow.com/questions/279953",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1195872/"
] |
279,959 | <p>I have an entry in my .vimrc which makes it page down the viewport when I hit the spacebar. It looks like this:</p>
<pre><code>map <Space> <PageDown>
</code></pre>
<p>I want to create another key mapping which pages the viewport up when holding shift and hitting the spacebar. I have tried the following... | [
{
"answer_id": 279973,
"author": "Christian C. Salvadó",
"author_id": 5445,
"author_profile": "https://Stackoverflow.com/users/5445",
"pm_score": 3,
"selected": false,
"text": "map <Space> ^D \" Pagedown when press Space\nmap <S-Space> ^U \" Page Up when press Shift Space\n"
},
{
... | 2008/11/11 | [
"https://Stackoverflow.com/questions/279959",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2476/"
] |
279,962 | <p>How can I export a GridView's data to a Microsoft Excel 2007 file?</p>
<p>Also, does Microsoft Excel 2007 support html elements and tags?</p>
| [
{
"answer_id": 280012,
"author": "Charles Graham",
"author_id": 7705,
"author_profile": "https://Stackoverflow.com/users/7705",
"pm_score": 2,
"selected": false,
"text": "Response.ContentType = \"application/vnd.ms-excel\";\n Response.AppendHeader(\"Content-disposition\", \"attachment; f... | 2008/11/11 | [
"https://Stackoverflow.com/questions/279962",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/36430/"
] |
279,966 | <p>I am building a PHP application in CodeIgniter. CodeIgniter sends all requests to the main controller: <code>index.php</code>. However, I don't like to see <code>index.php</code> in the URI. For example, <code>http://www.example.com/faq/whatever</code> will route to <code>http://www.example.com/index.php/faq/whateve... | [
{
"answer_id": 279986,
"author": "Xenph Yan",
"author_id": 264,
"author_profile": "https://Stackoverflow.com/users/264",
"pm_score": 2,
"selected": false,
"text": "$REQUEST_URI"
},
{
"answer_id": 280068,
"author": "Adam",
"author_id": 13320,
"author_profile": "https:/... | 2008/11/11 | [
"https://Stackoverflow.com/questions/279966",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/27580/"
] |
279,974 | <p>I'm finding myself writing a bunch of related functions dealing with different nouns (clusters, sql servers, servers in general, files, etc.) and put each of these groups of functions in separate files (say cluster_utils.ps1, for example). I want to be able to "import" some of these libraries in my profile and othe... | [
{
"answer_id": 282098,
"author": "Steven Murawski",
"author_id": 1233,
"author_profile": "https://Stackoverflow.com/users/1233",
"pm_score": 2,
"selected": false,
"text": "$global:scriptdirectory= 'c:\\powershellscripts'\n$global:loaded_scripts=@{}\nfunction require(){\n param ([str... | 2008/11/11 | [
"https://Stackoverflow.com/questions/279974",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/36429/"
] |
279,988 | <p>If i try to paste source code in word 2007 the spacing between the lines seems to get messed up as all new lines are spaced way apart compared to a programming text editor.</p>
<p>Can somebody tell me how to paste source code in word 2007 preserving the formatting and the spacing between lines?</p>
| [
{
"answer_id": 446085,
"author": "Nathan Fellman",
"author_id": 1084,
"author_profile": "https://Stackoverflow.com/users/1084",
"pm_score": 0,
"selected": false,
"text": "2html.vim source $VIM/syntax/2html.vim\n"
}
] | 2008/11/11 | [
"https://Stackoverflow.com/questions/279988",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14316/"
] |
279,991 | <p>Please tell me how can save a string with special characters to DB.Special characters may contatin single <code>quotes/double quotes</code> etc.. I am using ASP.NET with C#</p>
| [
{
"answer_id": 280025,
"author": "FlySwat",
"author_id": 1965,
"author_profile": "https://Stackoverflow.com/users/1965",
"pm_score": 0,
"selected": false,
"text": "Using (SqlConnection conn = new SqlConnection(connstr))\n{\n Using (SqlCommand command = new SqlCommand(\"INSERT INTO FOO... | 2008/11/11 | [
"https://Stackoverflow.com/questions/279991",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
280,003 | <p>Preferably in VB.Net, but C# is fine, how can I access the extra properties added to a file by my digital camera, like <code>Date Picture Taken</code>, <code>Shutter Speed</code> or <code>Camera Model</code>?</p>
| [
{
"answer_id": 280117,
"author": "Eric Schoonover",
"author_id": 3957,
"author_profile": "https://Stackoverflow.com/users/3957",
"pm_score": 1,
"selected": false,
"text": "BitmapMetadata System.Windows.Media.Imaging BitmapMetadata"
}
] | 2008/11/11 | [
"https://Stackoverflow.com/questions/280003",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/16415/"
] |
280,014 | <p>I have a script which logs on to a remote server and tries to rename files, using PHP.</p>
<p>The code currently looks something like this example from the php.net website:</p>
<pre><code>if (ftp_rename($conn_id, $old_file, $new_file)) {
echo "successfully renamed $old_file to $new_file\n";
} else {
echo "There ... | [
{
"answer_id": 12910495,
"author": "Peter Hopfgartner",
"author_id": 1630567,
"author_profile": "https://Stackoverflow.com/users/1630567",
"pm_score": 4,
"selected": false,
"text": "$trackErrors = ini_get('track_errors');\nini_set('track_errors', 1);\nif (!@ftp_put($my_ftp_conn_id, $tmpR... | 2008/11/11 | [
"https://Stackoverflow.com/questions/280014",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/242241/"
] |
280,033 | <p>I am new to C++ and I had a few general questions about code separation. I have currently built a small application, all in one file. What I want to do now is convert this into separate files such that they contain similar code or whatnot. My real question right now is, how do I know how to separate things? What i... | [
{
"answer_id": 280048,
"author": "Martin York",
"author_id": 14065,
"author_profile": "https://Stackoverflow.com/users/14065",
"pm_score": 5,
"selected": false,
"text": "Menu.h: Contains the Menu declaration.\nMenu.cpp: Contains the Menu definition.\n"
},
{
"answer_id": 280... | 2008/11/11 | [
"https://Stackoverflow.com/questions/280033",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
280,049 | <p>I want to know when an image has finished loading. Is there a way to do it with a callback?</p>
<p>If not, is there a way to do it at all?</p>
| [
{
"answer_id": 280087,
"author": "keparo",
"author_id": 19468,
"author_profile": "https://Stackoverflow.com/users/19468",
"pm_score": 6,
"selected": false,
"text": " window.onload = function () {\n\n var logo = document.getElementById('sologo');\n\n logo.onload = functio... | 2008/11/11 | [
"https://Stackoverflow.com/questions/280049",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
280,053 | <p>Please help! Have been staring at this for 12 hours; and have looked online and can't find solution.</p>
<p>In my application, I use 2 UIView controls in separate pages/controllers:</p>
<ul>
<li>UIImageView (retrieve data via
NSData dataWithContentsOfUrl)</li>
<li>UIWebView</li>
</ul>
<p>Just to isolate my code, ... | [
{
"answer_id": 1442691,
"author": "Sam",
"author_id": 101750,
"author_profile": "https://Stackoverflow.com/users/101750",
"pm_score": 3,
"selected": false,
"text": "dataWithContentsOfURL: dataWithContentsOfURL:options:error: NSURL *url = [NSURL URLWithString:urlString];\nNSError *error =... | 2008/11/11 | [
"https://Stackoverflow.com/questions/280053",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
280,058 | <p>Basically I need to insert a bunch of data to an Excel file. Creating an OleDB connection appears to be the fastest way but I've seen to have run into memory issues. The memory used by the process seems to keep growing as I execute INSERT queries. I've narrowed them down to only happen when I output to the Excel ... | [
{
"answer_id": 280348,
"author": "onedaywhen",
"author_id": 15354,
"author_profile": "https://Stackoverflow.com/users/15354",
"pm_score": 1,
"selected": false,
"text": "CREATE TABLE CREATE TABLE [EXCEL 8.0;DATABASE=C:\\MyFabricatedWorkbook;HDR=YES].OneRowTable \n(\n x FLOAT\n);\n INSER... | 2008/11/11 | [
"https://Stackoverflow.com/questions/280058",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1469014/"
] |
280,069 | <p>I'm writing a C++ program that doesn't work (I get a segmentation fault) when I compile it with optimizations (options -O1, -O2, -O3, etc.), but it works just fine when I compile it without optimizations.</p>
<p>Is there any chance that the error is in my code? or should I assume that this is a bug in GCC?</p>
<p>... | [
{
"answer_id": 280080,
"author": "Adam Rosenfield",
"author_id": 9530,
"author_profile": "https://Stackoverflow.com/users/9530",
"pm_score": 3,
"selected": false,
"text": "-Wall -Wextra -ansi -pedantic"
},
{
"answer_id": 280082,
"author": "Martin York",
"author_id": 14065... | 2008/11/11 | [
"https://Stackoverflow.com/questions/280069",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/25700/"
] |
280,075 | <p>I'm trying to implement (what I think is) a pretty simple data model for a counter:</p>
<pre><code>class VisitorDayTypeCounter(models.Model):
visitType = models.CharField(max_length=60)
visitDate = models.DateField('Visit Date')
counter = models.IntegerField()
</code></pre>
<p>When someone comes throug... | [
{
"answer_id": 280125,
"author": "Daniel Naab",
"author_id": 32638,
"author_profile": "https://Stackoverflow.com/users/32638",
"pm_score": 3,
"selected": false,
"text": "class VisitorDayTypeCounter(models.Model):\n visitType = models.CharField(max_length=60)\n visitDate = models.Da... | 2008/11/11 | [
"https://Stackoverflow.com/questions/280075",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13868/"
] |
280,101 | <p>What are the best ways (or at least most common ways) in ASP (VBScript) for input handling? My main concerns are HTML/JavaScript injections & SQL injections. Is there some equivalent to PHP's <code>htmlspecialchars</code> or <code>addslashes</code>, et cetera? Or do I have to do it manually with something like s... | [
{
"answer_id": 280259,
"author": "Tomalak",
"author_id": 18771,
"author_profile": "https://Stackoverflow.com/users/18771",
"pm_score": 4,
"selected": true,
"text": "Server.HTMLEncode() ÀDODB.Command ADODB.CommandParameter"
}
] | 2008/11/11 | [
"https://Stackoverflow.com/questions/280101",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/25413/"
] |
280,106 | <p>I am implementing a Comment box facility in my application which user can resize using mouse. This comment box contains a scrollpane which instead contains a <code>JEditorPane</code> in which user can insert comment. I have added the editor pane inside a scroll pane for the following reason:</p>
<p><a href="https:/... | [
{
"answer_id": 1525149,
"author": "Community",
"author_id": -1,
"author_profile": "https://Stackoverflow.com/users/-1",
"pm_score": 2,
"selected": false,
"text": "public static void main(String...args) {\n //our test frame\n JFrame frame = new JFrame(\"JEditorPane inside JScrollPan... | 2008/11/11 | [
"https://Stackoverflow.com/questions/280106",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/22550/"
] |
280,107 | <p>I have often heard this term being used, but I have never really understood it.</p>
<p>What does it mean, and can anyone give some examples/point me to some links?</p>
<p>EDIT: Thanks to everyone for the replies. Can you also tell me how the canonical representation is useful in equals() performance, as stated in ... | [
{
"answer_id": 361827,
"author": "Dov Wasserman",
"author_id": 26010,
"author_profile": "https://Stackoverflow.com/users/26010",
"pm_score": 6,
"selected": false,
"text": "myFile.txt # in current working dir\n../conf/myFile.txt ... | 2008/11/11 | [
"https://Stackoverflow.com/questions/280107",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9195/"
] |
280,109 | <p>I'm creating a data entry app for some in-house stuff.</p>
<p>My team needs to enter info about "items" which can have many "categories" and vice versa.</p>
<p>I need a quick way to let them enter an arbitrary amount of categories.</p>
<p>Here's my idea:</p>
<p>On the item entry page, I'll have it so that initia... | [
{
"answer_id": 361827,
"author": "Dov Wasserman",
"author_id": 26010,
"author_profile": "https://Stackoverflow.com/users/26010",
"pm_score": 6,
"selected": false,
"text": "myFile.txt # in current working dir\n../conf/myFile.txt ... | 2008/11/11 | [
"https://Stackoverflow.com/questions/280109",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
280,115 | <p>I am creating menus in WPF programatically using vb.net. Can someone show me how I can add separator bar to a menu in code? No xaml please.</p>
| [
{
"answer_id": 280194,
"author": "Jeff Donnici",
"author_id": 821,
"author_profile": "https://Stackoverflow.com/users/821",
"pm_score": 7,
"selected": true,
"text": "using System.Windows.Controls;\n\n//\n\nMenu myMenu = new Menu();\nmyMenu.Items.Add(new Separator());\n"
},
{
"ans... | 2008/11/11 | [
"https://Stackoverflow.com/questions/280115",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3566/"
] |
280,127 | <p>I'm bored with surrounding code with try catch like this..</p>
<pre><code>try
{
//some boring stuff
}
catch(Exception ex)
{
//something even more boring stuff
}
</code></pre>
<p>I would like something like</p>
<pre><code>SurroundWithTryCatch(MyMethod)
</code></pre>
<p>I know I can accomplish this behavio... | [
{
"answer_id": 280132,
"author": "stiduck",
"author_id": 35398,
"author_profile": "https://Stackoverflow.com/users/35398",
"pm_score": 2,
"selected": false,
"text": "var user = db.Users.SingleOrDefault(u => u.Username == 3);\n\nif (user == null)\n throw new ArgumentNullException(\"Use... | 2008/11/11 | [
"https://Stackoverflow.com/questions/280127",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/34296/"
] |
280,162 | <p>I have some low level serialization code that is templated, and I need to know the system's endianness at compiletime obviously (because the templates specializes based on the system's endianness). </p>
<p>Right now I have a header with some platform defines, but I'd rather have someway to make assertions about en... | [
{
"answer_id": 280164,
"author": "Johannes Schaub - litb",
"author_id": 34509,
"author_profile": "https://Stackoverflow.com/users/34509",
"pm_score": 3,
"selected": false,
"text": "BOOST_STATIC_ASSERT(!BIG_ENDIAN); static_assert"
},
{
"answer_id": 280526,
"author": "Hasturkun... | 2008/11/11 | [
"https://Stackoverflow.com/questions/280162",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15124/"
] |
280,199 | <p>The library should;</p>
<ul>
<li>Be easy to use and few lines of client code should accomplish much</li>
<li>Be as platform independent as possible. (In case of future ports to other platforms)</li>
<li>Have C++ bindings.</li>
<li>Be mature and stable</li>
</ul>
<p>I would also like to be notified of most HID events... | [
{
"answer_id": 508526,
"author": "Coderer",
"author_id": 26286,
"author_profile": "https://Stackoverflow.com/users/26286",
"pm_score": 2,
"selected": false,
"text": "HKML\\SYSTEM\\CCS\\Control\\DeviceClasses\\{4d1e55...}\\"
}
] | 2008/11/11 | [
"https://Stackoverflow.com/questions/280199",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/36112/"
] |
280,201 | <p>In a html page we use the head tag to add reference to our external .js files .. we can also include script tags in the body .. But how do we include our external .js file in a web user control?</p>
<p>After little googling I got this. It works but is this the only way?</p>
<pre><code>ScriptManager.RegisterStartup... | [
{
"answer_id": 280338,
"author": "Phil Jenkins",
"author_id": 35496,
"author_profile": "https://Stackoverflow.com/users/35496",
"pm_score": 3,
"selected": true,
"text": "Page.ClientScript.RegisterClientScriptInclude(\"key\", \"path/to/script.js\");\n"
}
] | 2008/11/11 | [
"https://Stackoverflow.com/questions/280201",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/25138/"
] |
280,207 | <p>I have an object.</p>
<pre><code> fp = open(self.currentEmailPath, "rb")
p = email.Parser.Parser()
self._currentEmailParsedInstance= p.parse(fp)
fp.close()
</code></pre>
<p>self.currentEmailParsedInstance, from this object I want to get the body of an email, text only no HTML....</p>
<p>How do I do... | [
{
"answer_id": 280238,
"author": "Vinko Vrsalovic",
"author_id": 5190,
"author_profile": "https://Stackoverflow.com/users/5190",
"pm_score": 3,
"selected": true,
"text": "self.currentEmailParsedInstance.get_payload()\n >>> parser = email.parser.Parser()\n>>> message = parser.parse(open('... | 2008/11/11 | [
"https://Stackoverflow.com/questions/280207",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/21537/"
] |
280,222 | <p>I have input consisting of a list of nested lists like this:</p>
<pre><code>l = [[[[[39]]]], [1, 2, 3], [4, [5, 3], 1], [[[[8, 9], 10], 11], 12]]
</code></pre>
<p>I want to sort this list based on the sum of all the numbers in the nested lists... so, the values I want to sort by of l would look like this:</p>
<pr... | [
{
"answer_id": 280224,
"author": "jfs",
"author_id": 4279,
"author_profile": "https://Stackoverflow.com/users/4279",
"pm_score": 3,
"selected": false,
"text": "l.sort(key=sum_nested)\n sum_nested() def sum_nested(astruct):\n try: return sum(map(sum_nested, astruct))\n except TypeEr... | 2008/11/11 | [
"https://Stackoverflow.com/questions/280222",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15055/"
] |
280,229 | <p>I want to add an item to an ASP.Net combobox using Javascript. I can retrieve the ID (No Masterpage). How can I add values to the combobox from Javascript? My present code looks like this.</p>
<pre><code> //Fill the years (counting 100 from the first)
function fillvarYear() {
var dt = $('#txtBDate').... | [
{
"answer_id": 280520,
"author": "FlySwat",
"author_id": 1965,
"author_profile": "https://Stackoverflow.com/users/1965",
"pm_score": 2,
"selected": true,
"text": "string selectedValue = Request.Params[combobox.UniqueId]\n"
}
] | 2008/11/11 | [
"https://Stackoverflow.com/questions/280229",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/33052/"
] |
280,243 | <p>What's the easiest way to use a linked list in python? In scheme, a linked list is defined simply by <code>'(1 2 3 4 5)</code>. Python's lists, <code>[1, 2, 3, 4, 5]</code>, and tuples, <code>(1, 2, 3, 4, 5)</code>, are not, in fact, linked lists, and linked lists have some nice properties such as constant-time conc... | [
{
"answer_id": 280284,
"author": "Martin v. Löwis",
"author_id": 33006,
"author_profile": "https://Stackoverflow.com/users/33006",
"pm_score": 4,
"selected": false,
"text": "def mklist(*args):\n result = None\n for element in reversed(args):\n result = (element, result)\n ... | 2008/11/11 | [
"https://Stackoverflow.com/questions/280243",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15055/"
] |
280,247 | <p>I've tried my best and cannot figure out what happened here. It worked fine in Delphi 4. After upgrading to Delphi 2009, I don't know if this is the way it is supposed to work, or if it's a problem:</p>
<p>This is what my program's menu looks like in Design Mode under Delphi 2009:</p>
<p><a href="https://i.stack.i... | [
{
"answer_id": 280289,
"author": "mghie",
"author_id": 30568,
"author_profile": "https://Stackoverflow.com/users/30568",
"pm_score": 4,
"selected": true,
"text": "WM_DRAWITEM ODS_NOACCEL protected\n procedure WndProc(var Message: TMessage); override;\n procedure TYourForm.WndProc(var Me... | 2008/11/11 | [
"https://Stackoverflow.com/questions/280247",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/30176/"
] |
280,249 | <p>I have created a site, which parses XML files and display its content on the appropriate page. Is my site a dynamic web page or static web page?</p>
<p>How do dynamic and static web pages differ?</p>
<p>I feel it's dynamic, because I parse the content from xml files; initially i don't have any content in my main p... | [
{
"answer_id": 280330,
"author": "dbr",
"author_id": 745,
"author_profile": "https://Stackoverflow.com/users/745",
"pm_score": 2,
"selected": false,
"text": "/view.php?page=index"
}
] | 2008/11/11 | [
"https://Stackoverflow.com/questions/280249",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
280,260 | <p>EDIT: <strong>I would really like to see some general discussion about the formats, their pros and cons!</strong></p>
<p>EDIT2: The 'bounty didn't really help to create the needed discussion, there are a few interesting answers but the comprehensive coverage of the topic is still missing. Six persons marked the que... | [
{
"answer_id": 280291,
"author": "Josh",
"author_id": 10902,
"author_profile": "https://Stackoverflow.com/users/10902",
"pm_score": 4,
"selected": false,
"text": "_(\"Text\"), gettext(\"Text\") bindtextdomain() gettext"
},
{
"answer_id": 501722,
"author": "John Nilsson",
... | 2008/11/11 | [
"https://Stackoverflow.com/questions/280260",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11995/"
] |
280,270 | <p>Using LINQ to Entities sounds like a great way to query against a database and get actual CLR objects that I can modify, data bind against and so forth. But if I perform the same query a second time do I get back references to the same CLR objects or an entirely new set? </p>
<p>I do not want multiple queries to ge... | [
{
"answer_id": 280335,
"author": "Marc Gravell",
"author_id": 23354,
"author_profile": "https://Stackoverflow.com/users/23354",
"pm_score": 0,
"selected": false,
"text": "// uses object identity cache (IIRC)\nvar obj = ctx.Single(x=>x.Id == id);\n // causes round-trip (IIRC)\nvar obj = c... | 2008/11/11 | [
"https://Stackoverflow.com/questions/280270",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6276/"
] |
280,298 | <p>A complicated-sounding term with no good explanations from a simple google search... are there any more academically-oriented folk who could explain this one?</p>
| [
{
"answer_id": 286474,
"author": "Claudiu",
"author_id": 15055,
"author_profile": "https://Stackoverflow.com/users/15055",
"pm_score": 3,
"selected": true,
"text": "public class Hey<T>\n{\n public T idOrInc(T var)\n {\n if (var instanceof Integer)\n return (T)(new... | 2008/11/11 | [
"https://Stackoverflow.com/questions/280298",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15055/"
] |
280,313 | <p>I am trying to merge several XML files in a single XDocument object.</p>
<p>Merge does not exist in XDocument object. I miss this.</p>
<p>Has anyone already implemented a Merge extension method for XDocument, or something similar ?</p>
| [
{
"answer_id": 280379,
"author": "Marc Gravell",
"author_id": 23354,
"author_profile": "https://Stackoverflow.com/users/23354",
"pm_score": 2,
"selected": false,
"text": "XDocument XmLDocument XmlDoucument XDocument XmlDocument ImportNode XDocument XNode.ReadFrom .Add XmlReader/XmlWriter... | 2008/11/11 | [
"https://Stackoverflow.com/questions/280313",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/24472/"
] |
280,324 | <p>I have been using classes for only a short while and when I write a method, I make all variables reference self, e.g. self.foo.</p>
<p>However, I'm looking through the <em>wxPython in Action</em> book and notice that "self" isn't used all the time. For example:</p>
<pre><code> import wx
class TextFrame(wx.Frame):... | [
{
"answer_id": 280332,
"author": "Greg Hewgill",
"author_id": 893,
"author_profile": "https://Stackoverflow.com/users/893",
"pm_score": 2,
"selected": false,
"text": "self panel self"
},
{
"answer_id": 280561,
"author": "Community",
"author_id": -1,
"author_profile": ... | 2008/11/11 | [
"https://Stackoverflow.com/questions/280324",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18676/"
] |
280,331 | <p>This seems like it should be easy but I'm stumped. In WPF, I'd like a TextBox that stretches to the width of it's parent, but only to a maximum width. The problem is that I want it to be left justified within its parent. To get it to stretch you have to use HorizontalAlignment="Stretch", but then the result is cente... | [
{
"answer_id": 280402,
"author": "Kent Boogaart",
"author_id": 5380,
"author_profile": "https://Stackoverflow.com/users/5380",
"pm_score": 6,
"selected": false,
"text": "<Grid>\n <Grid.ColumnDefinitions>\n <ColumnDefinition Width=\"*\" MaxWidth=\"200\"/>\n </Grid.ColumnDefin... | 2008/11/11 | [
"https://Stackoverflow.com/questions/280331",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9045/"
] |
280,345 | <p>I'm trying to start <code>iexplore.exe</code> let it run for 5 seconds and then close it again.</p>
<p><code>iexplore</code> opens just fine however it doesn't close when I call the PostThreadMessage.
Can anyone see what I'm doing wrong? Here is my code:</p>
<pre><code>CString IEPath = "C:\\Program Files\\Interne... | [
{
"answer_id": 280377,
"author": "schnaader",
"author_id": 34065,
"author_profile": "https://Stackoverflow.com/users/34065",
"pm_score": 1,
"selected": false,
"text": "TerminateProcess(procinfo.hProcess, 0);\n"
}
] | 2008/11/11 | [
"https://Stackoverflow.com/questions/280345",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/36476/"
] |
280,347 | <p>How to convert Unicode string into a utf-8 or utf-16 string?
My VS2005 project is using Unicode char set, while sqlite in cpp provide </p>
<pre><code>int sqlite3_open(
const char *filename, /* Database filename (UTF-8) */
sqlite3 **ppDb /* OUT: SQLite db handle */
);
int sqlite3_open16(
const void ... | [
{
"answer_id": 280358,
"author": "1800 INFORMATION",
"author_id": 3146,
"author_profile": "https://Stackoverflow.com/users/3146",
"pm_score": 3,
"selected": false,
"text": "CP_UTF8 CodePage CHAR buf[256]; // or whatever\nWideCharToMultiByte(\n CP_UTF8, \n 0, \n StringToConvert, // the... | 2008/11/11 | [
"https://Stackoverflow.com/questions/280347",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/25749/"
] |
280,356 | <p>In my webpage, I want the website to greet the user, but the username is surrounded by 'single quotations'. Since this isn't to prevent MySQL injection, i just want to remove quotes around my name on the display page.</p>
<p>Ex: Welcome 'user'!
I'm trying to find the way where i can strip the quotations around the ... | [
{
"answer_id": 280366,
"author": "davil",
"author_id": 22592,
"author_profile": "https://Stackoverflow.com/users/22592",
"pm_score": 1,
"selected": false,
"text": "echo 'Welcome ' . trim($login, \"'\");\n"
},
{
"answer_id": 280368,
"author": "Stefan Gehrig",
"author_id": ... | 2008/11/11 | [
"https://Stackoverflow.com/questions/280356",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
280,363 | <p>Spring IoC container gives you <a href="http://static.springframework.org/spring/docs/2.5.x/reference/beans.html#beans-factory-arbitrary-method-replacement" rel="nofollow noreferrer">an option</a> of replacing a method of a bean. Can someone provide a real life example of using this feature to solve real life proble... | [
{
"answer_id": 280433,
"author": "MrM",
"author_id": 319803,
"author_profile": "https://Stackoverflow.com/users/319803",
"pm_score": 0,
"selected": false,
"text": "<bean id=\"propertyConfigurer\" class=\"org.springframework.beans.factory.config.PropertyPlaceholderConfigurer\">\n ... | 2008/11/11 | [
"https://Stackoverflow.com/questions/280363",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4052/"
] |
280,378 | <p>I read a little of the help for my advanced installer 6.5.1 and couldn't find a way to change the version string except by hand.</p>
| [
{
"answer_id": 2076057,
"author": "Fred",
"author_id": 251983,
"author_profile": "https://Stackoverflow.com/users/251983",
"pm_score": 3,
"selected": false,
"text": ":COMPILE_AIP\n\nSET AIP_DIR=\"C:\\Program Files\\Caphyon\\Advanced Installer 7.1.3\"\n\nECHO Advanced Installer Directiry:... | 2008/11/11 | [
"https://Stackoverflow.com/questions/280378",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/30324/"
] |
280,385 | <p>Let's say we have a method signature like </p>
<pre><code>public static function explodeDn($dn, array &$keys = null, array &$vals = null,
$caseFold = self::ATTR_CASEFOLD_NONE)
</code></pre>
<p>we can easily call the method by omitting all parameters after <code>$dn</code>:</p>
<pre><code>$dn=Zend_Ldap... | [
{
"answer_id": 280404,
"author": "Stefan Gehrig",
"author_id": 11354,
"author_profile": "https://Stackoverflow.com/users/11354",
"pm_score": 1,
"selected": false,
"text": "$k=array();\n$v=null;\n$dn=Zend_Ldap_Dn::explodeDn('CN=Alice Baker,CN=Users,DC=example,DC=com', $k, $v, \n Zend_L... | 2008/11/11 | [
"https://Stackoverflow.com/questions/280385",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11354/"
] |
280,389 | <pre><code>function main()
{
Hello();
}
function Hello()
{
// How do you find out the caller function is 'main'?
}
</code></pre>
<p>Is there a way to find out the call stack?</p>
| [
{
"answer_id": 280396,
"author": "Greg Hewgill",
"author_id": 893,
"author_profile": "https://Stackoverflow.com/users/893",
"pm_score": 11,
"selected": true,
"text": "function Hello()\n{\n alert(\"caller is \" + Hello.caller);\n}\n Function.caller function Hello()\n{\n alert(\"call... | 2008/11/11 | [
"https://Stackoverflow.com/questions/280389",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11413/"
] |
280,406 | <p>I have problems with bringing a windows mobile 6 form to the front.
I tried things like this already</p>
<pre><code>Form1 testForm = new Form1();
testForm.Show();
testForm.BringToFront();
testForm.Focus();
</code></pre>
<p>But it's always behind the form that includes that code.
The only things that have worked fo... | [
{
"answer_id": 280478,
"author": "kgiannakakis",
"author_id": 24054,
"author_profile": "https://Stackoverflow.com/users/24054",
"pm_score": 3,
"selected": true,
"text": "[DllImport(\"coredll.dll\")]\nprivate static extern IntPtr FindWindow(string lpClassName, string lpWindowName);\n\n[Dl... | 2008/11/11 | [
"https://Stackoverflow.com/questions/280406",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/36481/"
] |
280,413 | <p><strong>Closed as exact duplicate of <a href="https://stackoverflow.com/questions/171970/how-can-i-find-the-method-that-called-the-current-method">"How can I find the method that called the current method?"</a></strong></p>
<p>Is <a href="https://stackoverflow.com/questions/280389/javascript-how-do-you-find-the-cal... | [
{
"answer_id": 280425,
"author": "Marc Gravell",
"author_id": 23354,
"author_profile": "https://Stackoverflow.com/users/23354",
"pm_score": 5,
"selected": true,
"text": "Console.WriteLine(new StackFrame(1).GetMethod().Name);\n"
},
{
"answer_id": 280432,
"author": "schnaader",... | 2008/11/11 | [
"https://Stackoverflow.com/questions/280413",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/31505/"
] |
280,421 | <p>It seems that when I have one mysql_real_query() function in a continuous while loop, the query will get executed OK.</p>
<p>However, if multiple mysql_real_query() are inside the while loop, one right after the other. Depending on the query, sometimes neither the first query nor second query will execute properly... | [
{
"answer_id": 280456,
"author": "Alnitak",
"author_id": 6782,
"author_profile": "https://Stackoverflow.com/users/6782",
"pm_score": 0,
"selected": false,
"text": "tagBuffer mysql_real_query tagBuffer"
},
{
"answer_id": 282302,
"author": "Bill Karwin",
"author_id": 20860,... | 2008/11/11 | [
"https://Stackoverflow.com/questions/280421",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/28462/"
] |
280,426 | <p>We've got a fairly complex httphandler for handling images. Basically it streams any part of the image at any size that is requested. Some clients use this handler without any problems. But we've got one location that gives us problems, and now it also gives problems on my development environment.</p>
<p>What happe... | [
{
"answer_id": 280436,
"author": "Marc Gravell",
"author_id": 23354,
"author_profile": "https://Stackoverflow.com/users/23354",
"pm_score": 2,
"selected": false,
"text": "MemoryStream const int BUFFER_SIZE = 4096; // pick your poison\nbute[] buffer = new byte[BUFFER_SIZE];\nint bytesRead... | 2008/11/11 | [
"https://Stackoverflow.com/questions/280426",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5043/"
] |
280,428 | <p>I have one autocomplete search, in which by typing few characters it will show all the names, which matches the entered character. I am populating this data in the jsp using DIV tag, by using mouse I'm able to select the names. But I want to select the names in the DIV tag to be selected using the keyboard up and do... | [
{
"answer_id": 280455,
"author": "Shivasubramanian A",
"author_id": 9195,
"author_profile": "https://Stackoverflow.com/users/9195",
"pm_score": 0,
"selected": false,
"text": "event.keyCode"
},
{
"answer_id": 375426,
"author": "EndangeredMassa",
"author_id": 106,
"auth... | 2008/11/11 | [
"https://Stackoverflow.com/questions/280428",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
280,435 | <p>I want to use input from a user as a regex pattern for a search over some text. It works, but how I can handle cases where user puts characters that have meaning in regex?</p>
<p>For example, the user wants to search for Word <code>(s)</code>: regex engine will take the <code>(s)</code> as a group. I want it to tr... | [
{
"answer_id": 280441,
"author": "ddaa",
"author_id": 11549,
"author_profile": "https://Stackoverflow.com/users/11549",
"pm_score": 10,
"selected": true,
"text": "re.escape() re def simplistic_plural(word, text):\n word_or_plural = re.escape(word) + 's?'\n return re.match(word_or_p... | 2008/11/11 | [
"https://Stackoverflow.com/questions/280435",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/288629/"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.