qid int64 4 22.2M | question stringlengths 18 48.3k | answers list | date stringlengths 10 10 | metadata list |
|---|---|---|---|---|
395,433 | <p>Erlang with mnesia/dets is famous for it slow startup times after a crash. Basically the same issue as with fsck on older filesystems.</p>
<p>But I also experience slow startup times after regular shutdowns: about 8 Minutes for 250 MB on-disk data on a beefy machine.</p>
<p>So I have to do something special on shu... | [
{
"answer_id": 395450,
"author": "Tautologistics",
"author_id": 44481,
"author_profile": "https://Stackoverflow.com/users/44481",
"pm_score": 1,
"selected": false,
"text": "application:stop(mnesia)\n"
},
{
"answer_id": 463413,
"author": "max",
"author_id": 49407,
"aut... | 2008/12/27 | [
"https://Stackoverflow.com/questions/395433",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/49407/"
] |
395,436 | <p>I am using statfs() which gives me the free blocks available to a non-superuser.</p>
<p>I am unsure how to convert this into KB/MB/GB.</p>
<p>The values that are returned are:</p>
<pre><code>fundamental file system block size: 4096
total data blocks in file system: 3805452
free blocks in fs: 63425
free blocks ava... | [
{
"answer_id": 395514,
"author": "kdbdallas",
"author_id": 26728,
"author_profile": "https://Stackoverflow.com/users/26728",
"pm_score": 2,
"selected": false,
"text": "NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);\n\nstruct statfs tStat... | 2008/12/27 | [
"https://Stackoverflow.com/questions/395436",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/26728/"
] |
395,451 | <p>I have a script that I'd like to continue using, but it looks like I either have to find some workaround for a bug in Python 3, or downgrade back to 2.6, and thus having to downgrade other scripts as well...</p>
<p>Hopefully someone here have already managed to find a workaround.</p>
<p>The problem is that due to ... | [
{
"answer_id": 395481,
"author": "jb.",
"author_id": 37522,
"author_profile": "https://Stackoverflow.com/users/37522",
"pm_score": 6,
"selected": true,
"text": "import urllib.request\n# Create an OpenerDirector with support for Basic HTTP Authentication...\nauth_handler = urllib.request.... | 2008/12/27 | [
"https://Stackoverflow.com/questions/395451",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/267/"
] |
395,454 | <p>I'm trying to loop through items of a checkbox list. If it's checked, I want to set a value. If not, I want to set another value. I was using the below, but it only gives me checked items:</p>
<pre><code>foreach (DataRowView myRow in clbIncludes.CheckedItems)
{
MarkVehicle(myRow);
}
</code></pre>
| [
{
"answer_id": 395473,
"author": "JasonS",
"author_id": 1865,
"author_profile": "https://Stackoverflow.com/users/1865",
"pm_score": 5,
"selected": false,
"text": "foreach (ListItem listItem in clbIncludes.Items)\n{\n if (listItem.Selected) { \n //do some work \n }\n else ... | 2008/12/27 | [
"https://Stackoverflow.com/questions/395454",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/46064/"
] |
395,484 | <p>Let's say you have the following chunk of code:</p>
<pre><code><div id="container">
<someelement>This is any element.</someelement>
</div>
</code></pre>
<p>What's the best CSS I could use to horizontally center "someelement" within its containing div?</p>
| [
{
"answer_id": 395493,
"author": "JaredPar",
"author_id": 23283,
"author_profile": "https://Stackoverflow.com/users/23283",
"pm_score": 2,
"selected": false,
"text": "<someelement style=\"margin-left:auto;margin-right:auto\">This is any element</someelement>\n"
},
{
"answer_id": ... | 2008/12/27 | [
"https://Stackoverflow.com/questions/395484",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1615/"
] |
395,486 | <p>Like many of you, I have to deal with a large amount of files: source code, binary downloads, spreadsheets, pdf's, word docs, images, note files, quick scripts, and more.</p>
<p>These files can fall into many categories:</p>
<ul>
<li>Temporary files that should eventually be deleted</li>
<li>Important or useful re... | [
{
"answer_id": 395567,
"author": "Jonathan Leffler",
"author_id": 15168,
"author_profile": "https://Stackoverflow.com/users/15168",
"pm_score": 3,
"selected": true,
"text": "C:\\Filing Cabinet\\"
}
] | 2008/12/27 | [
"https://Stackoverflow.com/questions/395486",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/36041/"
] |
395,504 | <p>I'm wanting to decrement a variable in a MySQL table by one everytime an UPDATE query is ran.</p>
<p>What I have is this, which isn't working:</p>
<p><code>UPDATE forum SET replys = reply-- WHERE fid = '$id'</code></p>
<p>Is this possible in any way, or am I going to have to run a SELECT and get the value first,... | [
{
"answer_id": 395521,
"author": "stu",
"author_id": 12386,
"author_profile": "https://Stackoverflow.com/users/12386",
"pm_score": 5,
"selected": true,
"text": "UPDATE forum SET replys = reply - 1 WHERE fid = '$id'\n"
},
{
"answer_id": 395524,
"author": "duffymo",
"author... | 2008/12/27 | [
"https://Stackoverflow.com/questions/395504",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/36545/"
] |
395,505 | <p>What would be the best compression algorithm to use to compress packets before sending them over the wire? The packets are encoded using JSON. Would LZW be a good one for this or is there something better?</p>
| [
{
"answer_id": 395668,
"author": "afeldspar",
"author_id": 33904,
"author_profile": "https://Stackoverflow.com/users/33904",
"pm_score": 5,
"selected": true,
"text": "{\n \"vector\": {\n \"latitude\": 16,\n \"longitude\": 18,\n \"altitude\": 20\n },\n \"vect... | 2008/12/27 | [
"https://Stackoverflow.com/questions/395505",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/49018/"
] |
395,506 | <p>I'm trying to implement a comet style, long polling connection using an XMLHttpResponse object.
The idea is to maintain an open connection to a server which sends data when it is available (faking push). As soon as the XHR object completes, I need to spawn a new one to wait for any fresh data.</p>
<p>Below is a sni... | [
{
"answer_id": 395610,
"author": "some",
"author_id": 36866,
"author_profile": "https://Stackoverflow.com/users/36866",
"pm_score": 0,
"selected": false,
"text": "<script type=\"text/javascript\">myupdate(\"mydata\");</script> \n"
},
{
"answer_id": 395672,
"author": "Jonathan... | 2008/12/27 | [
"https://Stackoverflow.com/questions/395506",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12161/"
] |
395,509 | <p>I'm new to the Mac OS X, and I'm just about ready to throw my brand new <a href="http://en.wikipedia.org/wiki/MacBook_Pro" rel="nofollow noreferrer">MacBook Pro</a> out the window. Every tutorial on setting up a Django development environment on <a href="http://en.wikipedia.org/wiki/Mac_OS_X_Leopard" rel="nofollow n... | [
{
"answer_id": 395546,
"author": "James Cape",
"author_id": 41044,
"author_profile": "https://Stackoverflow.com/users/41044",
"pm_score": 2,
"selected": false,
"text": "# port install <pkgname>"
},
{
"answer_id": 395568,
"author": "James Brady",
"author_id": 29903,
"a... | 2008/12/27 | [
"https://Stackoverflow.com/questions/395509",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/36680/"
] |
395,525 | <p>I have a funciton that I am currently using to show a hidden div.a_type</p>
<p>How can I modify this code so that instead of fading in the hidden div,
I can add the new div to the DOM</p>
<pre>
jQuery(function(){ // Add Answer
jQuery(".add_answer").click(function(){
if(count >= "4"){
alert('On... | [
{
"answer_id": 395531,
"author": "Pim Jager",
"author_id": 35197,
"author_profile": "https://Stackoverflow.com/users/35197",
"pm_score": 4,
"selected": true,
"text": "$('.a_type:last').insertAfter('<div class=\"a_type\">content</div>');\n"
},
{
"answer_id": 395598,
"author": ... | 2008/12/27 | [
"https://Stackoverflow.com/questions/395525",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/48973/"
] |
395,526 | <p>I am building a CMS and the naming convention for classes has been debated between the other developer involved and myself. The problem arises specifically with "Page", as it is a public class available in a typical library.</p>
<p>A natural response would be to call it MVCMSPage (where MVCMS is the to-be name of t... | [
{
"answer_id": 395545,
"author": "Dan Herbert",
"author_id": 392,
"author_profile": "https://Stackoverflow.com/users/392",
"pm_score": 3,
"selected": true,
"text": "Page"
},
{
"answer_id": 395558,
"author": "tvanfosson",
"author_id": 12950,
"author_profile": "https://... | 2008/12/27 | [
"https://Stackoverflow.com/questions/395526",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/48266/"
] |
395,527 | <p>Which would be the correct format for this XML data, are they equivalent or are there trade offs between the two?</p>
<p>1.</p>
<pre><code><sitemap>
<category name="Animals">
<section title="Dogs">
<page url="/pics/greatdane.jpg" title="Great Dane"/>
</section>
</... | [
{
"answer_id": 395550,
"author": "cletus",
"author_id": 18393,
"author_profile": "https://Stackoverflow.com/users/18393",
"pm_score": 5,
"selected": true,
"text": "<page>\n <name>Sitemap</name>\n</page>\n"
},
{
"answer_id": 395678,
"author": "Steve Steiner",
"author_id":... | 2008/12/27 | [
"https://Stackoverflow.com/questions/395527",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/46108/"
] |
395,549 | <p>Given this:</p>
<pre><code>Interface IBase {string X {get;set;}}
Interface ISuper {string Y {get;set;}}
class Base : IBase {etc...}
class Super : Base, ISuper {etc...}
void Questionable (Base b) {
Console.WriteLine ("The class supports the following interfaces... ")
// The Magic Happens Here
}
</code></pre>
... | [
{
"answer_id": 395560,
"author": "Matt Hamilton",
"author_id": 615,
"author_profile": "https://Stackoverflow.com/users/615",
"pm_score": 2,
"selected": false,
"text": "foreach (var t in b.GetType().GetInterfaces())\n{\n Console.WriteLine(t.ToString());\n}\n"
},
{
"answer_id": ... | 2008/12/27 | [
"https://Stackoverflow.com/questions/395549",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1736623/"
] |
395,555 | <p>I have a string (of undertermined length) that I want to copy a lot of times replacing one character at a time from an array (of undertermined length) of characters.</p>
<p>So say I have this string: 'aa'<br>
And this array: ['a', 'b', 'c', 'd'] </p>
<p>after some magic for-looping stuff there would be an array l... | [
{
"answer_id": 395612,
"author": "Charlie Martin",
"author_id": 35092,
"author_profile": "https://Stackoverflow.com/users/35092",
"pm_score": 0,
"selected": false,
"text": "a = \"abcd\" \nb = \"ba\"\nres = []\nfor i in a: # i is \"a\", \"b\", ...\n for j in b: # j i... | 2008/12/27 | [
"https://Stackoverflow.com/questions/395555",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/35197/"
] |
395,569 | <p>How can I determine how much memory each device driver is consuming? I'm assuming this can be done with some Win32 or .NET API, but I just haven't been able to determine which. </p>
| [
{
"answer_id": 423541,
"author": "bk1e",
"author_id": 8090,
"author_profile": "https://Stackoverflow.com/users/8090",
"pm_score": 4,
"selected": false,
"text": "ExAllocatePoolWithTag"
}
] | 2008/12/27 | [
"https://Stackoverflow.com/questions/395569",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4593/"
] |
395,586 | <p>Can someone tell me why this Grails domain class will not compile (at runtime)?</p>
<pre><code>class Person {
String name
String getSomething(int i) {
}
}
</code></pre>
<p>I get this error when I run with <code>grails run-app</code>:</p>
<pre><code>2008-12-27 15:26:33.955::WARN: Failed startup of co... | [
{
"answer_id": 467370,
"author": "Rob Hruska",
"author_id": 29995,
"author_profile": "https://Stackoverflow.com/users/29995",
"pm_score": 2,
"selected": false,
"text": "def"
},
{
"answer_id": 469922,
"author": "Matthew Taylor",
"author_id": 154560,
"author_profile": "... | 2008/12/27 | [
"https://Stackoverflow.com/questions/395586",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/24396/"
] |
395,592 | <p>While researching the issue of <a href="http://www.subbu.org/blog/2006/08/json-vs-xml" rel="noreferrer">JSON vs XML</a>, I came across <a href="https://stackoverflow.com/questions/325085/when-to-prefer-json-over-xml">this question</a>. Now one of the reasons to prefer JSON was listed as the ease of conversion in Ja... | [
{
"answer_id": 395606,
"author": "Oli",
"author_id": 12870,
"author_profile": "https://Stackoverflow.com/users/12870",
"pm_score": 2,
"selected": false,
"text": "http://yourbank.com/json-api/your-name/statement"
},
{
"answer_id": 430189,
"author": "Mike Samuel",
"author_i... | 2008/12/27 | [
"https://Stackoverflow.com/questions/395592",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18393/"
] |
395,593 | <p>I'm having trouble computing reflection angles for a ball hitting an oblique wall. I'm using an algorithm lifted from this <a href="http://www.johanvanmol.org/content/view/45/37/1/6/" rel="nofollow noreferrer">tutorial</a>. It looks like this (in Actionscript 3), with p1 being the current velocity vector and p2 the ... | [
{
"answer_id": 395603,
"author": "Eugene Yokota",
"author_id": 3827,
"author_profile": "https://Stackoverflow.com/users/3827",
"pm_score": 0,
"selected": false,
"text": "wallvec"
},
{
"answer_id": 395632,
"author": "Raymond Martineau",
"author_id": 33952,
"author_prof... | 2008/12/27 | [
"https://Stackoverflow.com/questions/395593",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2942/"
] |
395,618 | <p>What is the benefit/downside to using a <code>switch</code> statement vs. an <code>if/else</code> in C#. I can't imagine there being that big of a difference, other than maybe the look of your code.</p>
<p>Is there any reason why the resulting IL or associated runtime performance would be radically different?</p>
<... | [
{
"answer_id": 395620,
"author": "kemiller2002",
"author_id": 1942,
"author_profile": "https://Stackoverflow.com/users/1942",
"pm_score": 4,
"selected": false,
"text": "switch(variable)\n{\n case someVariable:\n break;\n default:\n break;\n}\n"
},
{
"answer_id": 395621,
... | 2008/12/28 | [
"https://Stackoverflow.com/questions/395618",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5235/"
] |
395,628 | <p>I can easily define a datatype for a node of a directed graph.</p>
<pre><code>data Node = Node String [Node] derving (Show, Read)
</code></pre>
<p>I can save the graph to a file using show function, then restore it using read. However, show will not cope with a cycle. Is there a trivial way to save and restore a g... | [
{
"answer_id": 395943,
"author": "Paul Johnson",
"author_id": 49220,
"author_profile": "https://Stackoverflow.com/users/49220",
"pm_score": 4,
"selected": true,
"text": "import qualified Data.Map as M\n\ndata Node = Node String [Node]\n\ninstance Show Node where\n show (Node name other... | 2008/12/28 | [
"https://Stackoverflow.com/questions/395628",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5978/"
] |
395,650 | <p>I come from a Java background and with any servlets-based technology, it's trivial to map a range of URLs (eg /reports/<em>, /secure/</em>.do) to a specified servlet. Now I'm less familiar with PHP but I haven't yet seen anything that does quite the same thing with PHP (or mod_php). It's entirely possible that I'm... | [
{
"answer_id": 395700,
"author": "Eineki",
"author_id": 29125,
"author_profile": "https://Stackoverflow.com/users/29125",
"pm_score": 4,
"selected": false,
"text": "<FilesMatch \"^servlet$\"> \n ForceType application/x-httpd-php\n</FilesMatch> \n"
},
{
"answer_id": 402589,
"... | 2008/12/28 | [
"https://Stackoverflow.com/questions/395650",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18393/"
] |
395,652 | <p>One of the things I like about Java servlets is the use of unobtrusive filters and interceptors. Basically you could use these things to enforce security, put extra information on the <code>HttpRequest</code>, do monitoring or whatever.</p>
<p>Is there some equivalent in PHP?</p>
<p>From what I've seen so far it ... | [
{
"answer_id": 395722,
"author": "Eineki",
"author_id": 29125,
"author_profile": "https://Stackoverflow.com/users/29125",
"pm_score": 2,
"selected": false,
"text": "auto_prepend_file string \n"
}
] | 2008/12/28 | [
"https://Stackoverflow.com/questions/395652",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18393/"
] |
395,663 | <p>I have a WPF App that implements a ListView. I would like to show an image (a small icon) in one of the columns depending on the type of the data that row represents. Sort of like the display you see in Windows Explorer. </p>
<p>I am using DataTriggers elsewhere in my XAML, it seems like a similar method could be u... | [
{
"answer_id": 837119,
"author": "Josh G",
"author_id": 64329,
"author_profile": "https://Stackoverflow.com/users/64329",
"pm_score": 3,
"selected": true,
"text": "<DataTemplate x:Key=\"ImageColumn\">\n <Grid>\n <Image x:Name=\"img\" Source=\"MyImage.png\"/>\n <Rectangle... | 2008/12/28 | [
"https://Stackoverflow.com/questions/395663",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6054/"
] |
395,667 | <p>How can I create a method in the @implementation of a class without defining it in the @interface?</p>
<p>For example, I have a constructor that does some initialisation and then reads data from a file. I want to factor out the file-reading code into a separate method that I then call from within the constructor. ... | [
{
"answer_id": 395670,
"author": "Adam Rosenfield",
"author_id": 9530,
"author_profile": "https://Stackoverflow.com/users/9530",
"pm_score": 2,
"selected": false,
"text": "// In TDTaskList.m\n@interface TDTaskList(TDTaskListPrivate)\n-(id)initListOfName:(NSString*)aName;\n-(NSArray*)load... | 2008/12/28 | [
"https://Stackoverflow.com/questions/395667",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/41493/"
] |
395,675 | <p>How can I reference a Groovy domain class from Java class using Eclipse?</p>
<p>I've put my domain class in package:</p>
<pre><code>package com.me.myproject
public class Person {
String name
int age
}
</code></pre>
<p>Then in my Java class I attempt to reference <code>com.me.myproject.Person</code>. This ... | [
{
"answer_id": 1147672,
"author": "Tom Clift",
"author_id": 31440,
"author_profile": "https://Stackoverflow.com/users/31440",
"pm_score": 0,
"selected": false,
"text": "web-app/WEB-INF/groovy-classes"
}
] | 2008/12/28 | [
"https://Stackoverflow.com/questions/395675",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/24396/"
] |
395,682 | <p>I'm having a hell of a time understanding pointers in Objective C. They don't behave like I would assume based on various C tutorials.</p>
<p>Example:</p>
<pre><code>// Define Name and ID
NSString *processName = [[NSProcessInfo processInfo] processName];
NSNumber *processID = [NSNumber numberWithInt:[[NSProcessInf... | [
{
"answer_id": 395699,
"author": "Ashley Clark",
"author_id": 4556,
"author_profile": "https://Stackoverflow.com/users/4556",
"pm_score": 3,
"selected": false,
"text": "%@"
},
{
"answer_id": 395706,
"author": "dvenema",
"author_id": 6219,
"author_profile": "https://St... | 2008/12/28 | [
"https://Stackoverflow.com/questions/395682",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/29297/"
] |
395,685 | <p>I'd use a singleton like this:</p>
<pre><code>Singleton* single = Singleton::instance();
single->do_it();
</code></pre>
<p>I'd use an unnamed class like this:</p>
<pre><code>single.do_it();
</code></pre>
<p>I feel as if the Singleton pattern has no advantage over the unnamed class other than having readable e... | [
{
"answer_id": 395738,
"author": "Johannes Schaub - litb",
"author_id": 34509,
"author_profile": "https://Stackoverflow.com/users/34509",
"pm_score": 4,
"selected": true,
"text": "class { } single;\nint main() { }\n"
},
{
"answer_id": 396033,
"author": "Roddy",
"author_id... | 2008/12/28 | [
"https://Stackoverflow.com/questions/395685",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/456/"
] |
395,704 | <p>General tutorial or good resource on how to use threads in Python?</p>
<p>When to use threads, how they are effective, and some general background on threads [specific to Python]?</p>
| [
{
"answer_id": 396055,
"author": "James Brady",
"author_id": 29903,
"author_profile": "https://Stackoverflow.com/users/29903",
"pm_score": 3,
"selected": false,
"text": "multiprocessing"
}
] | 2008/12/28 | [
"https://Stackoverflow.com/questions/395704",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/51518/"
] |
395,735 | <p>I was wondering how to check whether a variable is a class (not an instance!) or not.</p>
<p>I've tried to use the function <code>isinstance(object, class_or_type_or_tuple)</code> to do this, but I don't know what type would a class will have.</p>
<p>For example, in the following code</p>
<pre><code>class Foo: pa... | [
{
"answer_id": 395741,
"author": "S.Lott",
"author_id": 10661,
"author_profile": "https://Stackoverflow.com/users/10661",
"pm_score": 6,
"selected": false,
"text": ">>> class X(object):\n... pass\n... \n>>> type(X)\n<type 'type'>\n>>> isinstance(X,type)\nTrue\n"
},
{
"answer_... | 2008/12/28 | [
"https://Stackoverflow.com/questions/395735",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/32267/"
] |
395,739 | <p>When I'm naming array-type variables, I often am confronted with a dilemma:
Do I name my array using plural or singular?</p>
<p>For example, let's say I have an array of names: In PHP I would say: <code>$names=array("Alice","Bobby","Charles");</code> </p>
<p>However, then lets say I want to reference a name in t... | [
{
"answer_id": 395742,
"author": "tvanfosson",
"author_id": 12950,
"author_profile": "https://Stackoverflow.com/users/12950",
"pm_score": 7,
"selected": true,
"text": "$name = $names[1];\n"
},
{
"answer_id": 395787,
"author": "James Van Boxtel",
"author_id": 43994,
"a... | 2008/12/28 | [
"https://Stackoverflow.com/questions/395739",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1615/"
] |
395,759 | <p>I'm trying to make an ajax call to grab session data to insert into my page after it's loaded like this</p>
<pre><code>jQuery(function(){ // Add Answer
jQuery(".add_answer").livequery('click',function(){
var count = $(this).attr("alt");
count++;
var count1 = count-1;
$.get('quiz/select', functio... | [
{
"answer_id": 396016,
"author": "Soviut",
"author_id": 46914,
"author_profile": "https://Stackoverflow.com/users/46914",
"pm_score": 3,
"selected": true,
"text": "jQuery(\".add_answer\").livequery('click',function()\n{\n var add_answer = $(this);\n\n $.get(...)\n {\n add... | 2008/12/28 | [
"https://Stackoverflow.com/questions/395759",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/48973/"
] |
395,779 | <p>I am building an MVC application in which I am reading a list of files from the file system and I want to pass the relative URL to that file to the view, preferably prefixed with "~/" so that whatever view is selected cab render the URL appropriately. </p>
<p>To do this, I need to enumerate the files in the file s... | [
{
"answer_id": 395798,
"author": "Christian C. Salvadó",
"author_id": 5445,
"author_profile": "https://Stackoverflow.com/users/5445",
"pm_score": 6,
"selected": true,
"text": "~"
},
{
"answer_id": 28565055,
"author": "vGHazard",
"author_id": 3145977,
"author_profile":... | 2008/12/28 | [
"https://Stackoverflow.com/questions/395779",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1875/"
] |
395,783 | <p>I have a Rails site, where the content is written in markdown. I wish to display a snippet of each, with a "Read more.." link.</p>
<p>How do I go about this? Simple truncating the raw text will not work, for example..</p>
<pre><code>>> "This is an [example](http://example.com)"[0..25]
=> "This is an [exam... | [
{
"answer_id": 395807,
"author": "csexton",
"author_id": 19839,
"author_profile": "https://Stackoverflow.com/users/19839",
"pm_score": 1,
"selected": false,
"text": "markdown_string = <<-eos\nThis article is an example of something or other.\n\nThis segment will be used as the snippet on... | 2008/12/28 | [
"https://Stackoverflow.com/questions/395783",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/745/"
] |
395,799 | <p>Should HtmlEncode() be abandoned and Replace() used instead of I want to parse links in posts/comments (with regular expressions)? HtmlEncode() replaces & with &amp; which I assume can cause problems with links, should I just use Replace() to replace < with &lt;?</p>
<p>For example if a user posts so... | [
{
"answer_id": 395864,
"author": "Shog9",
"author_id": 811,
"author_profile": "https://Stackoverflow.com/users/811",
"pm_score": 2,
"selected": false,
"text": "HtmlEncode()"
},
{
"answer_id": 395865,
"author": "Yuliy",
"author_id": 47527,
"author_profile": "https://St... | 2008/12/28 | [
"https://Stackoverflow.com/questions/395799",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/676066/"
] |
395,810 | <p>I'm making a search function for my website, which finds relevant results from a database. I'm looking for a way to count occurrences of a word, but I need to ensure that there are word boundaries on both sides of the word ( so I don't end up with "triple" when I want "rip").</p>
<p>Does anyone have any ideas?</p>... | [
{
"answer_id": 396266,
"author": "ʞɔıu",
"author_id": 41613,
"author_profile": "https://Stackoverflow.com/users/41613",
"pm_score": 0,
"selected": false,
"text": "select count(*) from yourtable where match(title, body) against ('some_word');\n"
},
{
"answer_id": 398480,
"auth... | 2008/12/28 | [
"https://Stackoverflow.com/questions/395810",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1615/"
] |
395,816 | <p>For my Java game server I send the Action ID of the packet which basically tells the server what the packet is for. I want to map each Action ID (an integer) to a function. Is there a way of doing this without using a switch?</p>
| [
{
"answer_id": 395822,
"author": "Adam Rosenfield",
"author_id": 9530,
"author_profile": "https://Stackoverflow.com/users/9530",
"pm_score": 2,
"selected": false,
"text": "public interface PacketProcessor\n{\n public void processPacket(Packet packet);\n}\n\n...\n\nPacketProcessor doTh... | 2008/12/28 | [
"https://Stackoverflow.com/questions/395816",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/49018/"
] |
395,832 | <p>I want to get the UCS-2 code points for a given UTF-8 string. For example the word "hello" should become something like "0068 0065 006C 006C 006F". Please note that the characters could be from any language including complex scripts like the east asian languages.</p>
<p>So, the problem comes down to "convert a give... | [
{
"answer_id": 395854,
"author": "Adam Rosenfield",
"author_id": 9530,
"author_profile": "https://Stackoverflow.com/users/9530",
"pm_score": 4,
"selected": false,
"text": "wchar_t utf8_char_to_ucs2(const unsigned char *utf8)\n{\n if(!(utf8[0] & 0x80)) // 0xxxxxxx\n return (wchar... | 2008/12/28 | [
"https://Stackoverflow.com/questions/395832",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/47468/"
] |
395,846 | <p>Is there any way to send ARP packet on Windows without the use of another library such as winpcap?</p>
<p>I have heard that Windows XP SP2 blocks raw ethernet sockets, but I have also heard that raw sockets are only blocked for administrators. Any clarification here?</p>
| [
{
"answer_id": 395921,
"author": "Mihai Limbășan",
"author_id": 14444,
"author_profile": "https://Stackoverflow.com/users/14444",
"pm_score": 2,
"selected": false,
"text": "arp -d tar.get.ip.address"
}
] | 2008/12/28 | [
"https://Stackoverflow.com/questions/395846",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
395,849 | <p>Take the following code for example;</p>
<pre><code> if (Convert.ToString(frm.WindowState) == "Minimized")
Layout.WindowState = "Maximized";
else
Layout.WindowState = Convert.ToString(frm.WindowState);
</code></pre>
<p>We are analysing the string definition of the window state, i.e. "Minimiz... | [
{
"answer_id": 395855,
"author": "Shog9",
"author_id": 811,
"author_profile": "https://Stackoverflow.com/users/811",
"pm_score": 4,
"selected": true,
"text": "WindowState"
}
] | 2008/12/28 | [
"https://Stackoverflow.com/questions/395849",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/48499/"
] |
395,857 | <p>I don't think this can be done "cleanly", but I'll ask anyway.</p>
<p>I have a system which needs to get a JSON resource via a REST GET call in order to initialize. At the moment the system waits until the onLoad event and fires an ajax request to retrieve the resource, which I don't think is the best way to do it,... | [
{
"answer_id": 395861,
"author": "Community",
"author_id": -1,
"author_profile": "https://Stackoverflow.com/users/-1",
"pm_score": 1,
"selected": false,
"text": "<script>"
},
{
"answer_id": 395924,
"author": "Community",
"author_id": -1,
"author_profile": "https://Sta... | 2008/12/28 | [
"https://Stackoverflow.com/questions/395857",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/37196/"
] |
395,867 | <p>How would I go about sending an email to a user, say, 48 hours after they sign up, in Ruby on Rails? Thanks!</p>
| [
{
"answer_id": 396264,
"author": "Pete",
"author_id": 13472,
"author_profile": "https://Stackoverflow.com/users/13472",
"pm_score": 2,
"selected": false,
"text": "MiddleMan(:email_worker).enq_send_email_task(:message => @message, \n :job_key => \"notify1\",\n :scheduled_at => Time.now ... | 2008/12/28 | [
"https://Stackoverflow.com/questions/395867",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
395,874 | <p>I've encountered the need to remove comments of the form:</p>
<pre><code><!-- Foo
Bar -->
</code></pre>
<p>I'd like to use a regular expression that matches anything (including line breaks) between the beginning and end 'delimiters.'</p>
<p>What would a good regex be for this task?</p>
| [
{
"answer_id": 395879,
"author": "Diadistis",
"author_id": 47401,
"author_profile": "https://Stackoverflow.com/users/47401",
"pm_score": 4,
"selected": true,
"text": "Regex xmlCommentsRegex = new Regex(\"<!--.*?-->\", RegexOptions.Singleline | RegexOptions.Compiled);\n"
},
{
"ans... | 2008/12/28 | [
"https://Stackoverflow.com/questions/395874",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/37971/"
] |
395,886 | <p>I'm still a newbie to Adobe Air/Flex, and still fairly new with SQL.</p>
<p>I've downloaded <a href="http://coenraets.org/blog/2008/11/using-the-sqlite-database-access-api-in-air%E2%80%A6-part-1/" rel="nofollow noreferrer">this</a> (<a href="http://coenraets.org/blog/2008/11/using-the-sqlite-database-access-api-in-... | [
{
"answer_id": 395879,
"author": "Diadistis",
"author_id": 47401,
"author_profile": "https://Stackoverflow.com/users/47401",
"pm_score": 4,
"selected": true,
"text": "Regex xmlCommentsRegex = new Regex(\"<!--.*?-->\", RegexOptions.Singleline | RegexOptions.Compiled);\n"
},
{
"ans... | 2008/12/28 | [
"https://Stackoverflow.com/questions/395886",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13713/"
] |
395,892 | <p>What is the best approach to implementing authorisation/authentication for a Windows Forms app talking to an IIS-hosted RESTful WCF Service?</p>
<p>The reason I ask is I am very confused, after sifting through different articles and posts expressing a different method and eventually hitting a ~650 page document on ... | [
{
"answer_id": 396815,
"author": "Nicholas Piasecki",
"author_id": 32187,
"author_profile": "https://Stackoverflow.com/users/32187",
"pm_score": 5,
"selected": true,
"text": "Login()"
},
{
"answer_id": 2555379,
"author": "Tawani",
"author_id": 61525,
"author_profile":... | 2008/12/28 | [
"https://Stackoverflow.com/questions/395892",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/41211/"
] |
395,922 | <p>Is there a way to read value for the WiX variable from a text file?</p>
<p>What I am trying to do is to include a version-specific information into instlal package.</p>
<p>This version information extracted into the text file on the pre-build step,
the question is how to propages this text file content into a buil... | [
{
"answer_id": 396292,
"author": "Stefan",
"author_id": 48003,
"author_profile": "https://Stackoverflow.com/users/48003",
"pm_score": 4,
"selected": true,
"text": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Include Id=\"VersionNumberInclude\">\n <?define MajorVersion=\"1\" ?>\n <... | 2008/12/28 | [
"https://Stackoverflow.com/questions/395922",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/48829/"
] |
395,928 | <p>I'm try to develop a regex that will be used in a C# program..</p>
<p>My initial regex was:</p>
<pre><code>(?<=\()\w+(?=\))
</code></pre>
<p>Which successfully matches "(foo)" - matching but excluding from output the open and close parens, to produce simply "foo".</p>
<p>However, if I modify the regex to:</p>... | [
{
"answer_id": 395934,
"author": "strager",
"author_id": 39992,
"author_profile": "https://Stackoverflow.com/users/39992",
"pm_score": 3,
"selected": false,
"text": "(?<=\\[\\()\\w+(?=\\)\\])\n"
},
{
"answer_id": 395994,
"author": "PhiLho",
"author_id": 15459,
"author... | 2008/12/28 | [
"https://Stackoverflow.com/questions/395928",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/49465/"
] |
395,960 | <p>For those of you who have had the opportunity of writing web applications in PHP and then as an application server (eg. Python-based solutions like CherryPy or Pylons), in what context are application servers a better alternative to PHP?</p>
<p>I tend to favor PHP simply because it's available on just about any web... | [
{
"answer_id": 397730,
"author": "Adam Byrtek",
"author_id": 36656,
"author_profile": "https://Stackoverflow.com/users/36656",
"pm_score": 3,
"selected": false,
"text": "mod_php"
}
] | 2008/12/28 | [
"https://Stackoverflow.com/questions/395960",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
395,968 | <p>What are the similarities and differences between GridView, DetailView, FormView? </p>
<p>What are use case scenarios for when you would use each of these controls and why?</p>
| [
{
"answer_id": 13764419,
"author": "rajeev",
"author_id": 1885638,
"author_profile": "https://Stackoverflow.com/users/1885638",
"pm_score": 0,
"selected": false,
"text": "edit"
}
] | 2008/12/28 | [
"https://Stackoverflow.com/questions/395968",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/22162/"
] |
395,973 | <p>Hey, I stumbled upon this site looking for solutions for event overlaps in mySQL tables. I was SO impressed with the solution (which is helping already) I thought I'd see if I could get some more help...</p>
<p>Okay, so Joe want's to swap shifts with someone at work. He has a court date. He goes to the shift swap f... | [
{
"answer_id": 395985,
"author": "Bill Karwin",
"author_id": 20860,
"author_profile": "https://Stackoverflow.com/users/20860",
"pm_score": 1,
"selected": false,
"text": "joe_shift{1,2,3}"
},
{
"answer_id": 396238,
"author": "Adam Bellaire",
"author_id": 21632,
"author... | 2008/12/28 | [
"https://Stackoverflow.com/questions/395973",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/49478/"
] |
395,981 | <p>I have a problem involving a collection of continuous probability distribution functions, most of which are determined empirically (e.g. departure times, transit times). What I need is some way of taking two of these PDFs and doing arithmetic on them. E.g. if I have two values x taken from PDF X, and y taken from ... | [
{
"answer_id": 395989,
"author": "dmckee --- ex-moderator kitten",
"author_id": 2509,
"author_profile": "https://Stackoverflow.com/users/2509",
"pm_score": 2,
"selected": false,
"text": "f = x + y"
},
{
"answer_id": 397211,
"author": "dreeves",
"author_id": 4234,
"aut... | 2008/12/28 | [
"https://Stackoverflow.com/questions/395981",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/49220/"
] |
395,982 | <p>I have read posts like these:</p>
<ol>
<li><a href="https://stackoverflow.com/questions/100003/what-is-a-metaclass-in-python">What is a metaclass in Python?</a> </li>
<li><a href="https://stackoverflow.com/questions/392160/what-are-your-concrete-use-cases-for-metaclasses-in-python">What are your (concrete) use-case... | [
{
"answer_id": 396109,
"author": "James Brady",
"author_id": 29903,
"author_profile": "https://Stackoverflow.com/users/29903",
"pm_score": 6,
"selected": true,
"text": "super"
},
{
"answer_id": 396192,
"author": "S.Lott",
"author_id": 10661,
"author_profile": "https:/... | 2008/12/28 | [
"https://Stackoverflow.com/questions/395982",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/33612/"
] |
395,995 | <p>From what I'm reading, <code>$</code> is described as "applies a function to its arguments." However, it doesn't seem to work quite like <code>(apply ...)</code> in Lisp, because it's a binary operator, so really the only thing it looks like it does is help to avoid parentheses sometimes, like <code>foo $ bar quux</... | [
{
"answer_id": 396061,
"author": "Apocalisp",
"author_id": 3434,
"author_profile": "https://Stackoverflow.com/users/3434",
"pm_score": 5,
"selected": true,
"text": "$"
},
{
"answer_id": 396131,
"author": "Community",
"author_id": -1,
"author_profile": "https://Stackov... | 2008/12/28 | [
"https://Stackoverflow.com/questions/395995",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/38803/"
] |
396,005 | <p>Given a set of words, we need to find the anagram words and display each category alone using the best algorithm.</p>
<p>input:</p>
<pre><code>man car kile arc none like
</code></pre>
<p>output:</p>
<pre><code>man
car arc
kile like
none
</code></pre>
<p>The best solution I am developing now is based on an hasht... | [
{
"answer_id": 396026,
"author": "Jon Skeet",
"author_id": 22656,
"author_profile": "https://Stackoverflow.com/users/22656",
"pm_score": 6,
"selected": true,
"text": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\n\nclass FindAnagrams\n{\n static void Main(strin... | 2008/12/28 | [
"https://Stackoverflow.com/questions/396005",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/42749/"
] |
396,053 | <p>I have been unable to trigger an <strong>onselect</strong> event handler attached to a <strong><div></strong> element. Is it possible to force a <strong><div></strong> to emit <strong>select</strong> events?</p>
| [
{
"answer_id": 396075,
"author": "Oli",
"author_id": 12870,
"author_profile": "https://Stackoverflow.com/users/12870",
"pm_score": 2,
"selected": false,
"text": "OnClick"
},
{
"answer_id": 9295851,
"author": "Fahim Parkar",
"author_id": 1066828,
"author_profile": "htt... | 2008/12/28 | [
"https://Stackoverflow.com/questions/396053",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/27122/"
] |
396,064 | <p>When using auto implemnted properies like</p>
<p>public string MyProperty { get; set; }</p>
<p>This is great until you come to naming conventions.</p>
<p>I use underscore for class level fields ie</p>
<p>string _MyProperty;</p>
<p>so with auto implemented means that it is not obvious what the variable is and it... | [
{
"answer_id": 396079,
"author": "karlis",
"author_id": 49034,
"author_profile": "https://Stackoverflow.com/users/49034",
"pm_score": 0,
"selected": false,
"text": " public string SomeString { private set; get; }\n\n private string some2string;\n\n public string Some3string { se... | 2008/12/28 | [
"https://Stackoverflow.com/questions/396064",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/40568/"
] |
396,069 | <p>I need some help with .NET (C#) and MS Outlook. I'm building a simple desktop application and want to send an e-mail using Outlook.</p>
<ol>
<li><p>If my desktop app generates a message, it should be able to send it as an email via outlook (we can assume outlook is running on the same PC) - a very simple operation.... | [
{
"answer_id": 396097,
"author": "gimel",
"author_id": 6491,
"author_profile": "https://Stackoverflow.com/users/6491",
"pm_score": 1,
"selected": false,
"text": "/// <summary>\n/// The MAPISendMail function sends a message.\n///\n/// This function differs from the MAPISendDocuments funct... | 2008/12/28 | [
"https://Stackoverflow.com/questions/396069",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
396,084 | <p>I'm a C++ newbie, but I wasn't able to find the answer to this (most likely trivial) question online. I am having some trouble compiling some code where two classes include each other. To begin, should my #include statements go inside or outside of my macros? In practice, this hasn't seemed to matter. However, i... | [
{
"answer_id": 396089,
"author": "Nathan Fellman",
"author_id": 1084,
"author_profile": "https://Stackoverflow.com/users/1084",
"pm_score": 0,
"selected": false,
"text": "A"
},
{
"answer_id": 396090,
"author": "Konrad Rudolph",
"author_id": 1968,
"author_profile": "ht... | 2008/12/28 | [
"https://Stackoverflow.com/questions/396084",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/48096/"
] |
396,099 | <p>I mean to open the built-in Windows GUI from command line- not to launch by Schtasks</p>
| [
{
"answer_id": 396119,
"author": "Mahendra",
"author_id": 36816,
"author_profile": "https://Stackoverflow.com/users/36816",
"pm_score": 3,
"selected": false,
"text": "C:\\Documents and Settings\\mahendra.patil>at/?\n"
},
{
"answer_id": 396135,
"author": "TheSoftwareJedi",
... | 2008/12/28 | [
"https://Stackoverflow.com/questions/396099",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
396,100 | <p>I'm implementing a sparse matrix with linked lists and it's not fun to manually check for leaks, any thoughts? </p>
| [
{
"answer_id": 396105,
"author": "Konrad Rudolph",
"author_id": 1968,
"author_profile": "https://Stackoverflow.com/users/1968",
"pm_score": 5,
"selected": true,
"text": "valgrind"
}
] | 2008/12/28 | [
"https://Stackoverflow.com/questions/396100",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/49500/"
] |
396,101 | <p>I'm trying to Remote Debugging a Windows Forms Application (C#), but i'm always getting this error: </p>
<blockquote>
<p><em>Unable to connect to the Microsoft Visual Studio Remote Debugging Monitor
named 'XXX. The Visual Studio Remote
Debugger on the target computer cannot
connect back to this computer.
... | [
{
"answer_id": 396129,
"author": "Michael Burr",
"author_id": 12711,
"author_profile": "https://Stackoverflow.com/users/12711",
"pm_score": 1,
"selected": false,
"text": "TESTCOMPUTER\\user1"
},
{
"answer_id": 404686,
"author": "Baget",
"author_id": 34369,
"author_pro... | 2008/12/28 | [
"https://Stackoverflow.com/questions/396101",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/34369/"
] |
396,117 | <p>I wonder, whether it is possible to create class-methods in VBA. By class-method I mean methods that can be called without having an object of the class. The 'static'-keyword does that trick in C++ and Java.</p>
<p>In the example below, I try to create a static factory method.</p>
<p>Example:</p>
<pre><code>'Clas... | [
{
"answer_id": 396358,
"author": "Mike Woodhouse",
"author_id": 1060,
"author_profile": "https://Stackoverflow.com/users/1060",
"pm_score": 2,
"selected": false,
"text": "With New NotReallyStaticClass\n .PerformNotReallyStatic Method, OnSome, Values\nEnd With\n"
},
{
"answer_i... | 2008/12/28 | [
"https://Stackoverflow.com/questions/396117",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/34039/"
] |
396,128 | <p>Is there a way that I can get the most used applications via VB.NET? I'm developing a sort of hobby project as a quick launcher kind of thing and thought this would sit perfectly on the main form.</p>
<p>If possible, would somebody be able to explain to me how add/remove applications manages to get the frequency of... | [
{
"answer_id": 419927,
"author": "Dirk Vollmar",
"author_id": 40347,
"author_profile": "https://Stackoverflow.com/users/40347",
"pm_score": 0,
"selected": false,
"text": "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Management\\ARPCache\n"
},
{
"answer_id... | 2008/12/28 | [
"https://Stackoverflow.com/questions/396128",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20900/"
] |
396,137 | <p>I have some questions about multi-threaded programming and multi-core usage.</p>
<p>In particular I'm wondering how the operating system and/or framework (this is .NET) deals with cores that are heavily used.</p>
<p>Here's my questions regarding threads:</p>
<ul>
<li>When a new thread is spawned, what is the algo... | [
{
"answer_id": 396161,
"author": "Marc Gravell",
"author_id": 23354,
"author_profile": "https://Stackoverflow.com/users/23354",
"pm_score": 3,
"selected": false,
"text": "Parallel.For"
}
] | 2008/12/28 | [
"https://Stackoverflow.com/questions/396137",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/267/"
] |
396,139 | <p>I'm in a ASP.NET project where I need to give several parameters to the administrator that is going to install the website, like:</p>
<pre><code>AllowUserToChangePanelLayout
AllowUserToDeleteCompany
</code></pre>
<p>etc...</p>
<p>My question is, will be a good thing to add this into the web.config file, using my ... | [
{
"answer_id": 396144,
"author": "configurator",
"author_id": 9536,
"author_profile": "https://Stackoverflow.com/users/9536",
"pm_score": 5,
"selected": true,
"text": "<appSettings>\n <add key=\"ConnString\" value=\"my conn string\" />\n <add key=\"MaxUsers\" value=\"50\" />\n</app... | 2008/12/28 | [
"https://Stackoverflow.com/questions/396139",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/28004/"
] |
396,142 | <p>I am using VSTS Unitesting platform. I am trying to test a method which got references to assemblies which in turn contain DllImport to C++ DLLs.</p>
<p>In order for it to work I need to copy C++ DLLs to reside on the same directory the EXE and DLLs are running.</p>
<p>Of course when I use the same code with Unit... | [
{
"answer_id": 396144,
"author": "configurator",
"author_id": 9536,
"author_profile": "https://Stackoverflow.com/users/9536",
"pm_score": 5,
"selected": true,
"text": "<appSettings>\n <add key=\"ConnString\" value=\"my conn string\" />\n <add key=\"MaxUsers\" value=\"50\" />\n</app... | 2008/12/28 | [
"https://Stackoverflow.com/questions/396142",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11659/"
] |
396,145 | <p>I want to center a <code>div</code> vertically with CSS. I don't want tables or JavaScript, but only pure CSS. I found some solutions, but all of them are missing Internet Explorer 6 support.</p>
<pre><code><body>
<div>Div to be aligned vertically</div>
</body>
</code></pre>
<p>How can I ... | [
{
"answer_id": 396255,
"author": "Community",
"author_id": -1,
"author_profile": "https://Stackoverflow.com/users/-1",
"pm_score": 7,
"selected": false,
"text": "#container {\n position: absolute;\n top: 50%;\n margin-top: -200px;\n /* Half of #content height */\n left: 0;\n width:... | 2008/12/28 | [
"https://Stackoverflow.com/questions/396145",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/49380/"
] |
396,156 | <p>I have a <code>JPanel</code> subclass on which I add buttons, labels, tables, etc. To show on screen it I use <code>JFrame</code>:</p>
<pre><code>MainPanel mainPanel = new MainPanel(); //JPanel subclass
JFrame mainFrame = new JFrame();
mainFrame.setTitle("main window title");
mainFrame.getContentPane().add(mainPan... | [
{
"answer_id": 396201,
"author": "Richard Walton",
"author_id": 15075,
"author_profile": "https://Stackoverflow.com/users/15075",
"pm_score": 2,
"selected": false,
"text": "mainFrame.setLayout(new BorderLayout());\n"
},
{
"answer_id": 396253,
"author": "Ole",
"author_id":... | 2008/12/28 | [
"https://Stackoverflow.com/questions/396156",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/174644/"
] |
396,166 | <p>I need to check to see if a variable contains anything OTHER than a-z A-Z 0-9 and the "." character (full stop). Any help would be appreciated.</p>
| [
{
"answer_id": 396172,
"author": "maxnk",
"author_id": 45862,
"author_profile": "https://Stackoverflow.com/users/45862",
"pm_score": 3,
"selected": false,
"text": "if (preg_match(\"/[^A-Za-z0-9.]/\", $myVar)) {\n // make something\n}\n"
},
{
"answer_id": 396190,
"author": "... | 2008/12/28 | [
"https://Stackoverflow.com/questions/396166",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/26823/"
] |
396,168 | <p>Let's say we have two classes, Foo and Foo Sub, each in a different file, foo.rb and foo_sub.rb respectively.</p>
<p>foo.rb:</p>
<pre><code>require "foo_sub"
class Foo
def foo
FooSub.SOME_CONSTANT
end
end
</code></pre>
<p>foo_sub.rb:</p>
<pre><code>require "foo"
class FooSub < Foo
SOME_CON... | [
{
"answer_id": 396184,
"author": "Jules",
"author_id": 40078,
"author_profile": "https://Stackoverflow.com/users/40078",
"pm_score": 5,
"selected": true,
"text": "require \"foo.rb\"\nrequire \"foo_sub.rb\"\n"
},
{
"answer_id": 1546863,
"author": "PETER BROWN",
"author_id"... | 2008/12/28 | [
"https://Stackoverflow.com/questions/396168",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/49381/"
] |
396,169 | <p>In my WinForms app, data can be printed on many locations. Everytime the user wants to print, I create a new PrintDocument instance, which is used for the current print job and then disposed. Everything is working, but the Print dialog is always set back to the default printer and its default parameters. If another ... | [
{
"answer_id": 396186,
"author": "lc.",
"author_id": 44853,
"author_profile": "https://Stackoverflow.com/users/44853",
"pm_score": 4,
"selected": true,
"text": "PrinterSettings"
}
] | 2008/12/28 | [
"https://Stackoverflow.com/questions/396169",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20353/"
] |
396,176 | <p>I use an external diff tool with Subversion (Beyond Compare rules!), and one of the great features is being able to use the diff program to make some minor edits to the file as I'm reviewing the changes I've made.</p>
<p>But <code>svn diff</code> works differently on different projects of mine. In all, the left-ha... | [
{
"answer_id": 62343836,
"author": "QtY",
"author_id": 13733780,
"author_profile": "https://Stackoverflow.com/users/13733780",
"pm_score": -1,
"selected": false,
"text": "$svn diff --diff-cmd=svn-diff-meld -r 12345 ./dirToCompare\n\n$ cat /usr/local/bin/svn-diff-meld\n#!/bin/sh\n# SVN D... | 2008/12/28 | [
"https://Stackoverflow.com/questions/396176",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14343/"
] |
396,181 | <p>I'm trying to list the files in a directory and do something to them in the Mac OS X prompt.</p>
<p>It should go like this: for f in $(ls -1); do echo $f; done</p>
<p>If I have files without spaces in their names (fileA.txt, fileB.txt), the echo works fine.
If the files include spaces in their names ("file A.txt",... | [
{
"answer_id": 396188,
"author": "derobert",
"author_id": 27727,
"author_profile": "https://Stackoverflow.com/users/27727",
"pm_score": 3,
"selected": false,
"text": "for f in *; do echo \"$f\"; done\n"
},
{
"answer_id": 396198,
"author": "Mihai Limbășan",
"author_id": 14... | 2008/12/28 | [
"https://Stackoverflow.com/questions/396181",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
396,183 | <p>I'm trying to use SDL in C++ with Visual Studio 2008 Express. The following program compiles but does not link:</p>
<pre><code>#include <SDL.h>
int main(int argc, char *argv[])
{
return 0;
}
</code></pre>
<p>The link error is:</p>
<pre><code>LINK : fatal error LNK1561: entry point must be defined
</cod... | [
{
"answer_id": 396308,
"author": "Judge Maygarden",
"author_id": 1491,
"author_profile": "https://Stackoverflow.com/users/1491",
"pm_score": 4,
"selected": true,
"text": "int main(int argc, char *argv[])\n"
},
{
"answer_id": 667115,
"author": "Degvik",
"author_id": 26276,... | 2008/12/28 | [
"https://Stackoverflow.com/questions/396183",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3102/"
] |
396,191 | <p>Is it cool?</p>
<p>IMO one-liners reduces the readability and makes debugging/understanding more difficult.</p>
| [
{
"answer_id": 396199,
"author": "Bob",
"author_id": 45,
"author_profile": "https://Stackoverflow.com/users/45",
"pm_score": 2,
"selected": false,
"text": "int value = bool ? 1 : 0;\n"
},
{
"answer_id": 396202,
"author": "Jon Skeet",
"author_id": 22656,
"author_profil... | 2008/12/28 | [
"https://Stackoverflow.com/questions/396191",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
396,222 | <ol>
<li>Is the .NET class System.Net.CookieContainer thread safe? --<strong>Update:</strong> Turnkey answered--</li>
<li>Is there any way to ensure thread safeness to variables which are modified during asynchronous requests (ie. HttpWebRequest.CookieContainer)?</li>
<li>Is there any attribute to highlight thread safe... | [
{
"answer_id": 396248,
"author": "Marc Gravell",
"author_id": 23354,
"author_profile": "https://Stackoverflow.com/users/23354",
"pm_score": 4,
"selected": true,
"text": "Monitor"
}
] | 2008/12/28 | [
"https://Stackoverflow.com/questions/396222",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/48465/"
] |
396,229 | <p>What is the recommended location to save user preference files? Is there a recommended method for dealing with user preferences?</p>
<p>Currently I use the path returned from <code>typeof(MyLibrary).Assembly.Location</code> as a default location to store files generated or required by the application.</p>
<p>EDIT:... | [
{
"answer_id": 396243,
"author": "Sailing Judo",
"author_id": 42620,
"author_profile": "https://Stackoverflow.com/users/42620",
"pm_score": 7,
"selected": true,
"text": "forms.Width = Application1.Properties.Settings.Default.Width;\n"
},
{
"answer_id": 396316,
"author": "Nir"... | 2008/12/28 | [
"https://Stackoverflow.com/questions/396229",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/47660/"
] |
396,245 | <p>How do I take a jar file that I have and add it to the dependency system in maven 2? I will be the maintainer of this dependency and my code needs this jar in the class path so that it will compile.</p>
| [
{
"answer_id": 396770,
"author": "Jack Leow",
"author_id": 31506,
"author_profile": "https://Stackoverflow.com/users/31506",
"pm_score": 8,
"selected": true,
"text": "mvn install:install-file -DgroupId=com.stackoverflow... -DartifactId=yourartifactid... -Dversion=1.0 -Dpackaging=jar -Dfi... | 2008/12/28 | [
"https://Stackoverflow.com/questions/396245",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17712/"
] |
396,260 | <p>Here's the scenario: I have a set of buttons that I want to bind to corresponding functions when clicked. The ids of these buttons are the same as the names of their corresponding functions. I could do this:</p>
<pre><code>$("#kick").click(kick);
$("#push").click(push);
$("#shove").click(shove);
</code></pre>
<p>B... | [
{
"answer_id": 396262,
"author": "Moran Helman",
"author_id": 1409636,
"author_profile": "https://Stackoverflow.com/users/1409636",
"pm_score": 0,
"selected": false,
"text": "$(\"#button_holder > span\").each(function () {\n var doThis = this.id;\n $(this).click(function(doThis){\n... | 2008/12/28 | [
"https://Stackoverflow.com/questions/396260",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11782/"
] |
396,272 | <p>I have a Windows Forms application. When the user imports a license for my application I'd like to "phone home" (hit an aspx page on the web) and register the license information.</p>
<p>The problem is that the user may not have an internet connection working at that moment. I'd like to test this first. What's the ... | [
{
"answer_id": 396323,
"author": "Leon Tayson",
"author_id": 18413,
"author_profile": "https://Stackoverflow.com/users/18413",
"pm_score": 3,
"selected": false,
"text": "// Create a new WebRequest Object to the mentioned URL.\nWebRequest myWebRequest=WebRequest.Create(\"http://www.contos... | 2008/12/28 | [
"https://Stackoverflow.com/questions/396272",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
396,280 | <p>Starting to build web applications for mobile devices (any phone). <br/>
What would be the best approach using ASP.NET 3.5/ASP.NET 4.0 and C#?
<br/></p>
<p>UPDATE (feb2010) <br/>
Any news using windows mobile 7?<br/></p>
| [
{
"answer_id": 396366,
"author": "splattne",
"author_id": 6461,
"author_profile": "https://Stackoverflow.com/users/6461",
"pm_score": 5,
"selected": true,
"text": "<?xml version=\"1.0\"?>\n<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\"\n \"http://www.wapforum.org/DTD/wml_1.1.xml... | 2008/12/28 | [
"https://Stackoverflow.com/questions/396280",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/49544/"
] |
396,281 | <p>I'm fairly new to C# programming.</p>
<p>I am making a program for fun that adds two numbers together, than displays the sum in a message box. I have two numericUpDowns and a button on my form. When the button is pushed I want it to display a message box with the answer. </p>
<p>The problem is, I am unsure how to ... | [
{
"answer_id": 396290,
"author": "lc.",
"author_id": 44853,
"author_profile": "https://Stackoverflow.com/users/44853",
"pm_score": 4,
"selected": true,
"text": "this.numericUpDown1.Value + this.numericUpDown2.Value"
},
{
"answer_id": 396291,
"author": "biozinc",
"author_i... | 2008/12/28 | [
"https://Stackoverflow.com/questions/396281",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/49549/"
] |
396,296 | <p>I need to find a path or paths down a complicated graph structure. The graph is built using something similar to this:</p>
<pre><code>class Node
{
public string Value { get; set;}
public List<Node> Nodes { get; set;}
public Node()
{
Nodes = new List<Node>();
}
}
</code></pr... | [
{
"answer_id": 396409,
"author": "Brann",
"author_id": 47341,
"author_profile": "https://Stackoverflow.com/users/47341",
"pm_score": 0,
"selected": false,
"text": " public void ExploreGraph(TreeNode tn, Dictionary<TreeNode, bool> visitednodes)\n {\n\n foreach (Treenode... | 2008/12/28 | [
"https://Stackoverflow.com/questions/396296",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/42620/"
] |
396,319 | <p>You have a forum (vbulletin) that has a bunch of images - how easy would it be to have a page that visits a thread, steps through each page and forwards to the user (via ajax or whatever) the images. i'm not asking about filtering (that's easy of course).</p>
<p>doable in a day? :)</p>
<p>I have a site that uses c... | [
{
"answer_id": 396343,
"author": "Ole",
"author_id": 49540,
"author_profile": "https://Stackoverflow.com/users/49540",
"pm_score": 0,
"selected": false,
"text": "<img .../>"
}
] | 2008/12/28 | [
"https://Stackoverflow.com/questions/396319",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
396,324 | <p>I am tying to make comments in a blog engine XSS-safe. Tried a lot of different approaches but find it very difficult.</p>
<p>When I am displaying the comments I am first using <a href="http://www.codeplex.com/AntiXSS" rel="nofollow noreferrer">Microsoft AntiXss 3.0</a> to html encode the whole thing. Then I am try... | [
{
"answer_id": 396400,
"author": "some",
"author_id": 36866,
"author_profile": "https://Stackoverflow.com/users/36866",
"pm_score": 2,
"selected": true,
"text": "private static Regex _whitelist = new Regex(@\"\n ^&\\#60;(&\\#47;)? (a|b(lockquote)?|code|em|h(1|2|3)|i|li|ol|p(re)?|s(ub|... | 2008/12/28 | [
"https://Stackoverflow.com/questions/396324",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/33349/"
] |
396,327 | <p>The following code prints 20, i.e. sizeof(z) is 20.</p>
<pre><code>#include <iostream.h>
class Base
{
public:
int a;
};
class X:virtual public Base
{
public:
int x;
};
class Y:virtual public Base
{
public:
int y;
};
class Z:public X,public Y
{
};
int m... | [
{
"answer_id": 396353,
"author": "markets",
"author_id": 4662,
"author_profile": "https://Stackoverflow.com/users/4662",
"pm_score": 5,
"selected": true,
"text": "Offset Size Type Scope Name\n 0 4 int Base a\n 4 4 int X x\n 8 4 int Base ... | 2008/12/28 | [
"https://Stackoverflow.com/questions/396327",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/49560/"
] |
396,337 | <p>Is there a framework that supports generating some standard unit tests from annotations? An example of what I have in mind would be:</p>
<pre><code>@HasPublicDefaultConstructor
public class Foo {
}
</code></pre>
<p>This would obviously be used to automatically generate a unit test that checks whether Foo has a de... | [
{
"answer_id": 398160,
"author": "S.Lott",
"author_id": 10661,
"author_profile": "https://Stackoverflow.com/users/10661",
"pm_score": 1,
"selected": false,
"text": "@StandardTestForClassHierarchy1\n@StandardTestForClassHierarchy2\n@StandardTestForClassHierarchy3\n@StandardTestForSomeOthe... | 2008/12/28 | [
"https://Stackoverflow.com/questions/396337",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/46450/"
] |
396,369 | <p>When an application crashes on Windows and a debugger such as Visual Studio is installed the following modal dialog appears:</p>
<blockquote>
<p>[Title: Microsoft Windows]</p>
<p>X has stopped working</p>
<p>A problem caused the program to stop
working correctly. Windows will close
the program and n... | [
{
"answer_id": 396510,
"author": "NicJ",
"author_id": 43815,
"author_profile": "https://Stackoverflow.com/users/43815",
"pm_score": 7,
"selected": true,
"text": "Windows Registry Editor Version 5.00\n\n[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\Windows Error Reporting]\n\"ForceQu... | 2008/12/28 | [
"https://Stackoverflow.com/questions/396369",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/322/"
] |
396,385 | <p>I have a reference-type variable that is <code>readonly</code>, because the reference never change, only its properties. When I tried to add the <code>volatile</code> modifier to it the compiled warned me that it wouldn't let both modifiers apply to the same variable. But I think I need it to be volatile because I d... | [
{
"answer_id": 396413,
"author": "P Daddy",
"author_id": 36388,
"author_profile": "https://Stackoverflow.com/users/36388",
"pm_score": 5,
"selected": true,
"text": "readonly"
}
] | 2008/12/28 | [
"https://Stackoverflow.com/questions/396385",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/48465/"
] |
396,391 | <p>It's quite some time that I'm trying to figure out this problem and from googling around many people have similar problems.</p>
<p>I'm trying to model a User in a Social Network, using Hibernate, and what is more basic to a social network than to map a friendship relation?
Every user in the system should have a lis... | [
{
"answer_id": 396401,
"author": "Ole",
"author_id": 49540,
"author_profile": "https://Stackoverflow.com/users/49540",
"pm_score": 1,
"selected": false,
"text": "ManyToMany"
},
{
"answer_id": 396410,
"author": "cdecker",
"author_id": 49561,
"author_profile": "https://... | 2008/12/28 | [
"https://Stackoverflow.com/questions/396391",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/49561/"
] |
396,394 | <p>When I reading source code of Beast, I found a lot of code like this:</p>
<pre><code><%= 'Password'[:password_title] %>
</code></pre>
<p>It seems like a call to [] method with Symbol as input parameter to a String to me, but I didn't find such type of parameter of String [] method in the ruby API. What is th... | [
{
"answer_id": 396419,
"author": "eric2323223",
"author_id": 44512,
"author_profile": "https://Stackoverflow.com/users/44512",
"pm_score": 1,
"selected": false,
"text": "str[fixnum] => fixnum or nil\nstr[fixnum, fixnum] => new_str or nil\nstr[range] => new_str or nil\nstr[regexp] => new_... | 2008/12/28 | [
"https://Stackoverflow.com/questions/396394",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/44512/"
] |
396,421 | <p>I'm checking if two strings <code>a</code> and <code>b</code> are permutations of each other, and I'm wondering what the ideal way to do this is in Python. From the Zen of Python, "There should be one -- and preferably only one -- obvious way to do it," but I see there are at least two ways:</p>
<pre><code>sorted(a... | [
{
"answer_id": 396436,
"author": "ʞɔıu",
"author_id": 41613,
"author_profile": "https://Stackoverflow.com/users/41613",
"pm_score": 3,
"selected": false,
"text": "all(a.count(char) == b.count(char) for char in a)\n"
},
{
"answer_id": 396438,
"author": "namin",
"author_id"... | 2008/12/28 | [
"https://Stackoverflow.com/questions/396421",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/49559/"
] |
396,425 | <p>I have a service that returns a collection of MyClass objects.
If all of the MyClass instances have null in MyClass2Reference then everything works fine.
Otherwise, I get a "Connection reset" error on the client side.
What am I doing wrong?</p>
<pre><code>[DataContract]
public MyClass
{
[DataMember]
int ID;
[DataMe... | [
{
"answer_id": 396436,
"author": "ʞɔıu",
"author_id": 41613,
"author_profile": "https://Stackoverflow.com/users/41613",
"pm_score": 3,
"selected": false,
"text": "all(a.count(char) == b.count(char) for char in a)\n"
},
{
"answer_id": 396438,
"author": "namin",
"author_id"... | 2008/12/28 | [
"https://Stackoverflow.com/questions/396425",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19956/"
] |
396,429 | <p>Here's one I have always wondered about...</p>
<p>Please excuse my naivety, but - How do you decide what version number to name your software?</p>
<p>I assume, when somebody creates a "final" version of an application/program it is version 1.0? - Then, what happens when you update it, how do you decide to call it ... | [
{
"answer_id": 396435,
"author": "cdecker",
"author_id": 49561,
"author_profile": "https://Stackoverflow.com/users/49561",
"pm_score": 3,
"selected": false,
"text": "* The A number denotes the kernel version. It is rarely changed, and\n"
},
{
"answer_id": 20304597,
"author": ... | 2008/12/28 | [
"https://Stackoverflow.com/questions/396429",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/37418/"
] |
396,439 | <p>What is the cleanest way to align properly radio buttons / checkboxes with text? The only reliable solution which I have been using so far is table based:</p>
<pre><code><table>
<tr>
<td><input type="radio" name="opt"></td>
<td>Option 1</td>
</tr>
<tr>
... | [
{
"answer_id": 396476,
"author": "Keith Donegan",
"author_id": 37418,
"author_profile": "https://Stackoverflow.com/users/37418",
"pm_score": 3,
"selected": false,
"text": " <p class=\"clearfix\">\n <input id=\"option1\" type=\"radio\" name=\"opt\" />\n <label for=\"option1\">... | 2008/12/28 | [
"https://Stackoverflow.com/questions/396439",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15716/"
] |
396,442 | <p>I am curious what strategies folks have found for unit testing a data access class that does not involve loading (and presumably unloading) a real database for each test method? Are you using mock objects to represent the database connection? If so, are you required to pass the mock object into every method-under-te... | [
{
"answer_id": 407786,
"author": "Limbic System",
"author_id": 1274957,
"author_profile": "https://Stackoverflow.com/users/1274957",
"pm_score": 0,
"selected": false,
"text": "setConnection()"
}
] | 2008/12/28 | [
"https://Stackoverflow.com/questions/396442",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/577/"
] |
396,449 | <p>I found the "always stop on error (dbstop if error)" to be very useful when I debug MATLAB code. <br>
However, closing matlab also resets it to "Never stop if error"</p>
<p>How can I make this setting persist?</p>
| [
{
"answer_id": 396483,
"author": "Dani",
"author_id": 28772,
"author_profile": "https://Stackoverflow.com/users/28772",
"pm_score": 5,
"selected": true,
"text": "edit startup.m\n"
}
] | 2008/12/28 | [
"https://Stackoverflow.com/questions/396449",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/28772/"
] |
396,455 | <p>I am currently analyzing a wikipedia dump file; I am extracting a bunch of data from it using python and persisting it into a PostgreSQL db. I am always trying to make things go faster for this file is huge (18GB). In order to interface with PostgreSQL, I am using psycopg2, but this module seems to mimic many other ... | [
{
"answer_id": 550849,
"author": "Community",
"author_id": -1,
"author_profile": "https://Stackoverflow.com/users/-1",
"pm_score": 3,
"selected": false,
"text": "insert into mytable\nselect * from (\n select distinct * \n from scratch\n) uniq\nwhere not exists (\n select 1 \n ... | 2008/12/28 | [
"https://Stackoverflow.com/questions/396455",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
396,463 | <p>I have a site with URLs like this:</p>
<pre><code>http://domain.co.uk/subdir/page.php
</code></pre>
<p>I have redesigned the site so URLs are now like this:</p>
<pre><code>http://domain.co.uk/page.php
</code></pre>
<p>How can I 301 redirect all the pages to their new locations using Apache's mod_rewrite?</p>
| [
{
"answer_id": 396477,
"author": "ceejayoz",
"author_id": 1902010,
"author_profile": "https://Stackoverflow.com/users/1902010",
"pm_score": 2,
"selected": false,
"text": "RewriteRule ^subdir/(.*)$ http://domain.co.uk/$1 [R=301,QSA,L]\n"
},
{
"answer_id": 396487,
"author": "Co... | 2008/12/28 | [
"https://Stackoverflow.com/questions/396463",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/16511/"
] |
396,480 | <p>I'm wondering if there is an existing class or library code in Cocoa Touch that shows the user a list of real-time suggestions while they are entering text input, with the suggestions based on similarities between what they have already entered and previous entries.</p>
<p>For instance, see how Safari on the iPod T... | [
{
"answer_id": 396477,
"author": "ceejayoz",
"author_id": 1902010,
"author_profile": "https://Stackoverflow.com/users/1902010",
"pm_score": 2,
"selected": false,
"text": "RewriteRule ^subdir/(.*)$ http://domain.co.uk/$1 [R=301,QSA,L]\n"
},
{
"answer_id": 396487,
"author": "Co... | 2008/12/28 | [
"https://Stackoverflow.com/questions/396480",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.