qid int64 4 19.1M | question stringlengths 18 48.3k | answers list | date stringlengths 10 10 | metadata list |
|---|---|---|---|---|
273,313 | <p>What is the best way to randomize the order of a generic list in C#? I've got a finite set of 75 numbers in a list I would like to assign a random order to, in order to draw them for a lottery type application.</p>
| [
{
"answer_id": 273352,
"author": "albertein",
"author_id": 23020,
"author_profile": "https://Stackoverflow.com/users/23020",
"pm_score": 2,
"selected": false,
"text": "var list = new List<T> ();\nfillList (list);\nvar randomizedList = new List<T> ();\nvar rnd = new Random ();\nwhile (lis... | 2008/11/07 | [
"https://Stackoverflow.com/questions/273313",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/35286/"
] |
273,314 | <p>For example, in <a href="http://homepages.cwi.nl/~paulv/papers/algorithmicstatistics.pdf" rel="noreferrer">http://homepages.cwi.nl/~paulv/papers/algorithmicstatistics.pdf</a> at the bottom of page 5 and top of page 6, he uses a plus/equal symbol and a similar plus/lessthan symbol. I can't figure out how to make tha... | [
{
"answer_id": 273402,
"author": "Noah",
"author_id": 28035,
"author_profile": "https://Stackoverflow.com/users/28035",
"pm_score": 6,
"selected": true,
"text": "$\\stackrel{top}{bottom}$ $X \\stackrel{+}{=} Y$\n $K(x,y|z) \\stackrel{+}{=} K(x|z) \\stackrel{+}{<} I(x:y|z)$\n"
}
] | 2008/11/07 | [
"https://Stackoverflow.com/questions/273314",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/35600/"
] |
273,353 | <p>Note: The examples below are C# but this problem should not be specific to any language in particular.</p>
<p>So I am building an object domain using a variant of the <a href="http://www.codeproject.com/KB/architecture/NHibernateBestPractices.aspx" rel="nofollow noreferrer">S# Architecture</a>. For those unfamilia... | [
{
"answer_id": 273395,
"author": "George Mauer",
"author_id": 5056,
"author_profile": "https://Stackoverflow.com/users/5056",
"pm_score": 0,
"selected": false,
"text": "public abstract class BaseDao() {\n private ICustomerDao _customerDao;\n protected ICustomerDao _CustomerDao {\n g... | 2008/11/07 | [
"https://Stackoverflow.com/questions/273353",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5056/"
] |
273,354 | <p>I am a big time user of using double quotes in PHP so that I can interpolate variables rather than concatenating strings. As a result, when I am generating HTML I often use single quotes for setting tag fields. For example:</p>
<pre><code>$html = "<input type='text' name='address' value='$address'>";
</code><... | [
{
"answer_id": 9718124,
"author": "inteblio",
"author_id": 371983,
"author_profile": "https://Stackoverflow.com/users/371983",
"pm_score": 3,
"selected": false,
"text": "<input value='it's gonna break'/>\n <input value=\"i say - \"this is gonna be trouble\" \"/>\n htmlspecialchars"
},
... | 2008/11/07 | [
"https://Stackoverflow.com/questions/273354",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
273,356 | <p>I have some pages on my site that are plain HTML pages, but I want to add some ASP .NET type functionality to these pages. My concern is that if I simple rename the .html page to .aspx that I will break links, and lose SEO, and so on.</p>
<p>I would think there is a "best practice" for how to handle this situation.... | [
{
"answer_id": 273411,
"author": "FlySwat",
"author_id": 1965,
"author_profile": "https://Stackoverflow.com/users/1965",
"pm_score": 4,
"selected": true,
"text": "<html>\n<head>\n<title>Moved to new URL: http://example.com/newurl</title>\n<meta http-equiv=\"refresh\" content=\"0; url=htt... | 2008/11/07 | [
"https://Stackoverflow.com/questions/273356",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/23294/"
] |
273,374 | <p>So, if i have:</p>
<pre><code>public class Sedan : Car
{
/// ...
}
public class Car : Vehicle, ITurn
{
[MyCustomAttribute(1)]
public int TurningRadius { get; set; }
}
public abstract class Vehicle : ITurn
{
[MyCustomAttribute(2)]
public int TurningRadius { get; set; }
}
public interface ITur... | [
{
"answer_id": 273414,
"author": "albertein",
"author_id": 23020,
"author_profile": "https://Stackoverflow.com/users/23020",
"pm_score": 2,
"selected": false,
"text": "object[] SomeMagic (PropertyInfo property)\n{\n return property.GetCustomAttributes(true);\n}\n public void Should_Us... | 2008/11/07 | [
"https://Stackoverflow.com/questions/273374",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1946/"
] |
273,410 | <p>How can I find out the number of dimensions in an array in Classic ASP ( VBScript ) .</p>
<p>I am being passed an Array with multiple dimensions but I only want to look at the last. Seems easy in other languages.</p>
| [
{
"answer_id": 273454,
"author": "Bullines",
"author_id": 27870,
"author_profile": "https://Stackoverflow.com/users/27870",
"pm_score": 4,
"selected": true,
"text": "Ubound(MySingleDimensionalArray, 2) ' Number of Array Elements\n\nUbound(MyMultiDimensionalArray, 1) ' Number of Columns\... | 2008/11/07 | [
"https://Stackoverflow.com/questions/273410",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3208/"
] |
273,433 | <p>I've been Googling around for .htaccess redirection information, but nothing I find is quite what I'm looking for.</p>
<p>Basically, I want a solution that will take a site example.com and allow you to enter URL's like:</p>
<pre><code> 123.example.com
ksdfkjds.example.com
dsf38jif348.example.com
</code></pre>
<... | [
{
"answer_id": 273456,
"author": "Greg",
"author_id": 24181,
"author_profile": "https://Stackoverflow.com/users/24181",
"pm_score": 2,
"selected": false,
"text": "# If we're not on http://example.com\nRewriteCond %{HTTP_HOST} .+\\.example.com\n\n# Add the host to the front of the URL and... | 2008/11/07 | [
"https://Stackoverflow.com/questions/273433",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
273,437 | <p>My current process for debugging stored procedures is very simple. I create a table called "debug" where I insert variable values from the stored procedure as it runs. This allows me to see the value of any variable at a given point in the script, but is there a better way to debug MySQL stored procedures?</p>
| [
{
"answer_id": 11137574,
"author": "Jeremy S.",
"author_id": 231982,
"author_profile": "https://Stackoverflow.com/users/231982",
"pm_score": 3,
"selected": false,
"text": "SELECT 'Message Text' AS `Title`; \n"
},
{
"answer_id": 15687954,
"author": "Brad Parks",
"author_id... | 2008/11/07 | [
"https://Stackoverflow.com/questions/273437",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/26180/"
] |
273,447 | <p>I am using the .NET 3.5 SP1 framework and I've implemented URL routing in my application. I was getting javascript errors: </p>
<p><code>
Error: ASP.NET Ajax client-side framework failed to load.<br>
Resource interpreted as script but transferred with MIME type text/html.<br>
ReferenceError: Can't find variable: S... | [
{
"answer_id": 276036,
"author": "Haacked",
"author_id": 598,
"author_profile": "https://Stackoverflow.com/users/598",
"pm_score": 6,
"selected": true,
"text": "routes.Add(new Route(\"{resource}.axd/{*pathInfo}\", new StopRoutingHandler()));\n"
},
{
"answer_id": 7889659,
"aut... | 2008/11/07 | [
"https://Stackoverflow.com/questions/273447",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/32854/"
] |
273,450 | <p>Has anybody implemented a feature where if the user has not touched the screen for a certain time period, you take a certain action? I'm trying to figure out the best way to do that.</p>
<p>There's this somewhat-related method in UIApplication:</p>
<pre><code>[UIApplication sharedApplication].idleTimerDisabled;
</... | [
{
"answer_id": 309535,
"author": "Mike McMaster",
"author_id": 544,
"author_profile": "https://Stackoverflow.com/users/544",
"pm_score": 8,
"selected": true,
"text": "- (void)sendEvent:(UIEvent *)event {\n [super sendEvent:event];\n\n // Only want to reset the timer on a Began touc... | 2008/11/07 | [
"https://Stackoverflow.com/questions/273450",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/544/"
] |
273,452 | <p>I can't seem to find a nice clean example of using AES 128 bit encryption.</p>
<p>Does anyone have some sample code?</p>
| [
{
"answer_id": 273499,
"author": "Dan Esparza",
"author_id": 19020,
"author_profile": "https://Stackoverflow.com/users/19020",
"pm_score": 7,
"selected": false,
"text": "using System;\nusing System.IO;\nusing System.Security.Cryptography;\n\nnamespace RijndaelManaged_Example\n{\n clas... | 2008/11/07 | [
"https://Stackoverflow.com/questions/273452",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
273,461 | <p>In Microsoft Access I have a table called Time Sheet and in this I have Time sheet no. , waiter no. , date and hours worked. I have 10 waiters. </p>
<p>I have another table called Service Charge Distribution. In this table I have Service Charge No. , waiter no. , week no. and distribution amount. </p>
<p>There is ... | [
{
"answer_id": 273611,
"author": "Fionnuala",
"author_id": 2548,
"author_profile": "https://Stackoverflow.com/users/2548",
"pm_score": 0,
"selected": false,
"text": "Answer=DSum(\"NameOfField\",\"NameOfTable\", _\n \"SomeDate Between #2008/1/20# And #2008/1/27#\")\n Answer=DSum(\"NameOf... | 2008/11/07 | [
"https://Stackoverflow.com/questions/273461",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
273,485 | <p>Seems likes it might be useful to have the assert display a message when an assertion fails.</p>
<p>Currently an <code>AssertionError</code> gets thrown, can you specify a custom message for it?</p>
<p>Can you show an example mechanism for doing this (other than creating your own exception type and throwing it)?</... | [
{
"answer_id": 273488,
"author": "Greg Hewgill",
"author_id": 893,
"author_profile": "https://Stackoverflow.com/users/893",
"pm_score": 8,
"selected": true,
"text": "assert x > 0 : \"x must be greater than zero, but x = \" + x;\n"
},
{
"answer_id": 273492,
"author": "Jason Co... | 2008/11/07 | [
"https://Stackoverflow.com/questions/273485",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2443/"
] |
273,489 | <p>I am looking at the pricing of various cloud computing platforms, particularly Amazon's EC2, and a lot of the quotes are based on a unit called an Instance-Hour. </p>
<p>I am trying to get a handle on the exact definition of an instance-hour to better compare the costs of continuing to host a web-application versus... | [
{
"answer_id": 23718002,
"author": "Mike S",
"author_id": 1941995,
"author_profile": "https://Stackoverflow.com/users/1941995",
"pm_score": 1,
"selected": false,
"text": "--alive"
}
] | 2008/11/07 | [
"https://Stackoverflow.com/questions/273489",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/30018/"
] |
273,508 | <p>How do I make an activeX control in a C# library project and then reference it in another ASP.NET wet site project?</p>
| [
{
"answer_id": 273521,
"author": "Marc Gravell",
"author_id": 23354,
"author_profile": "https://Stackoverflow.com/users/23354",
"pm_score": 2,
"selected": false,
"text": "<object...>...</object>"
}
] | 2008/11/07 | [
"https://Stackoverflow.com/questions/273508",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/22769/"
] |
273,516 | <p>Many of us need to deal with user input, search queries, and situations where the input text can potentially contain profanity or undesirable language. Oftentimes this needs to be filtered out.</p>
<p>Where can one find a good list of swear words in various languages and dialects? </p>
<p>Are there APIs available ... | [
{
"answer_id": 273520,
"author": "HanClinto",
"author_id": 26933,
"author_profile": "https://Stackoverflow.com/users/26933",
"pm_score": 9,
"selected": true,
"text": "$filterRegex = \"(boogers|snot|poop|shucks|argh)\"\n"
},
{
"answer_id": 273532,
"author": "Robert K",
"au... | 2008/11/07 | [
"https://Stackoverflow.com/questions/273516",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/27899/"
] |
273,530 | <p>Does anybody have a suggestion for a java library that performs automatic cropping and deskewing of images (like those retrieved from a flatbed scanner)?</p>
| [
{
"answer_id": 36248013,
"author": "delkant",
"author_id": 1250805,
"author_profile": "https://Stackoverflow.com/users/1250805",
"pm_score": 3,
"selected": false,
"text": "public void testDoOCR_SkewedImage() throws Exception {\n logger.info(\"doOCR on a skewed PNG image\");\n File ... | 2008/11/07 | [
"https://Stackoverflow.com/questions/273530",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/25939/"
] |
273,534 | <p>Hey all, I need some advice on this...</p>
<p>We have certain permissions setup in the database for certain levels of control a user can have over the application. Disabled, ReadOnly and Edit. </p>
<p>My question is: Are there more generic/better ways to handle permissions applied to a form element on the page tha... | [
{
"answer_id": 1743792,
"author": "Julian Bromwich",
"author_id": 212262,
"author_profile": "https://Stackoverflow.com/users/212262",
"pm_score": 1,
"selected": false,
"text": "/** NO permissions.\n * Presentation: \"hidden\"\n * Database: \"no access\"\n */\nNONE(0),\n\n/** VIEW... | 2008/11/07 | [
"https://Stackoverflow.com/questions/273534",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14045/"
] |
273,546 | <p>I'm trying to get a user control working asynchronously, yet no matter what I do it continues to work synchronously. I've stripped it down to its bare minimum as a test web application. This would be the user control:</p>
<pre><code><%@ Control Language="C#" %>
<script runat="server">
SqlConnection ... | [
{
"answer_id": 273717,
"author": "Charles",
"author_id": 24898,
"author_profile": "https://Stackoverflow.com/users/24898",
"pm_score": 4,
"selected": true,
"text": "Page.ExecuteRegisteredAsyncTasks Page.RegisterAsyncTask RegistereAsyncTask <%@ Control Language=\"C#\" %>\n<script runat=\"... | 2008/11/07 | [
"https://Stackoverflow.com/questions/273546",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/24898/"
] |
273,567 | <p>Every Christmas we draw names for gift exchanges in my family. This usually involves mulitple redraws until no one has pulled their spouse. So this year I coded up my own name drawing app that takes in a bunch of names, a bunch of disallowed pairings, and sends off an email to everyone with their chosen giftee.</p... | [
{
"answer_id": 303476,
"author": "wxs",
"author_id": 12981,
"author_profile": "https://Stackoverflow.com/users/12981",
"pm_score": 3,
"selected": false,
"text": "import random\nfrom collections import deque\ndef pairup(people):\n \"\"\" Given a list of people, assign each one a secret... | 2008/11/07 | [
"https://Stackoverflow.com/questions/273567",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8701/"
] |
273,578 | <p><a href="https://web.archive.org/web/20210126032647/http://geekswithblogs.net/michelotti/archive/2007/12/17/117791.aspx" rel="nofollow noreferrer">Link</a></p>
<p>I'm using ASP.NET with C# and trying to use linq to sql to update a data context as exhibited on the blog linked above. I created the timestamp field in ... | [
{
"answer_id": 273740,
"author": "tvanfosson",
"author_id": 12950,
"author_profile": "https://Stackoverflow.com/users/12950",
"pm_score": 2,
"selected": false,
"text": "AutoGenerated = true\nAuto-Sync = Always\nTime Stamp = True\nUpdate Check = Never\n rowversion NOT NULL UpdateCheck Nev... | 2008/11/07 | [
"https://Stackoverflow.com/questions/273578",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/35617/"
] |
273,606 | <p>I am designing a WCF service which a client will call to get a list of GUID's from a server.</p>
<p>How should I define my endpoint contract?</p>
<p>Should I just return an Array? </p>
<p>If so, will the array just be serialized by WCF?</p>
| [
{
"answer_id": 273616,
"author": "Adron",
"author_id": 29345,
"author_profile": "https://Stackoverflow.com/users/29345",
"pm_score": 2,
"selected": false,
"text": "[DataMember] List<Guid> SomeGuidsGoInHere {get;set;}\n [DataMember] List<String> SomeGuidsAsStringsGoInHere {get;set;}\n"
... | 2008/11/07 | [
"https://Stackoverflow.com/questions/273606",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
273,612 | <p>It's a really basic question but i can't think at the second. How do i set up a loop that asks each time the function inside runs whether to do it again. So it runs it then says something like;</p>
<p>"loop again? y/n"</p>
| [
{
"answer_id": 273618,
"author": "Martin Cote",
"author_id": 9936,
"author_profile": "https://Stackoverflow.com/users/9936",
"pm_score": 5,
"selected": true,
"text": "while True:\n func()\n answer = raw_input( \"Loop again? \" )\n if answer != 'y':\n break\n"
},
{
... | 2008/11/07 | [
"https://Stackoverflow.com/questions/273612",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/33061/"
] |
273,623 | <p>I have a list of numbers, say {2,4,5,6,7}
I have a table, foos, with foos.ID, including say, {1,2,3,4,8,9}</p>
<p>Id like to take my list of numbers, and find those without a counterpart in the ID field of my table.</p>
<p>One way to achieve this would be to create a table bars, loaded with {2,4,5,6,7} in the ID f... | [
{
"answer_id": 273649,
"author": "Alnitak",
"author_id": 6782,
"author_profile": "https://Stackoverflow.com/users/6782",
"pm_score": 4,
"selected": false,
"text": "SELECT bars.* FROM bars WHERE bars.ID NOT IN (SELECT ID FROM foos)\n SELECT * FROM foos WHERE foos.ID NOT IN (2, 4, 5, 6, 7)... | 2008/11/07 | [
"https://Stackoverflow.com/questions/273623",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/26001/"
] |
273,624 | <p>How do you create a 1 bit per pixel mask from an image using GDI in C#? The image I am trying to create the mask from is held in a System.Drawing.Graphics object.</p>
<p>I have seen examples that use Get/SetPixel in a loop, which are too slow. The method that interests me is one that uses only BitBlits, like <a hr... | [
{
"answer_id": 273686,
"author": "Hans Passant",
"author_id": 17034,
"author_profile": "https://Stackoverflow.com/users/17034",
"pm_score": 3,
"selected": false,
"text": "using System.Drawing;\nusing System.Drawing.Imaging;\nusing System.Runtime.InteropServices;\n public static Bitmap... | 2008/11/07 | [
"https://Stackoverflow.com/questions/273624",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/24201/"
] |
273,630 | <p>Actually my question is all in the title.<br>
Anyway:<br>
I have a class and I use explicit constructor:
<br>.h<br></p>
<pre><code>class MyClass
{
public:
explicit MyClass(const string& s): query(s) {}
private:
string query;
}
</code></pre>
<p>Is it obligatory or not to put <b>explicit</b> keyword i... | [
{
"answer_id": 273633,
"author": "Greg Hewgill",
"author_id": 893,
"author_profile": "https://Stackoverflow.com/users/893",
"pm_score": 6,
"selected": true,
"text": "explicit test.cpp:6: error: only declarations of constructors can be 'explicit'\n class foo {\npublic:\n explicit foo(i... | 2008/11/07 | [
"https://Stackoverflow.com/questions/273630",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/28298/"
] |
273,639 | <p>I have a windows form application that uses a Shared class to house all of the common objects for the application. The settings class has a collection of objects that do things periodically, and then there's something of interest, they need to alert the main form and have it update.</p>
<p>I'm currently doing this ... | [
{
"answer_id": 273653,
"author": "Hans Passant",
"author_id": 17034,
"author_profile": "https://Stackoverflow.com/users/17034",
"pm_score": 3,
"selected": true,
"text": " Dim main As Form1 = CType(Application.OpenForms(0), Form1)\n if (main.InvokeRequired)\n ' etc...\n"
},
{
... | 2008/11/07 | [
"https://Stackoverflow.com/questions/273639",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8114/"
] |
273,641 | <p>This question has been discussed in two blog posts (<a href="http://dow.ngra.de/2008/10/27/when-systemcurrenttimemillis-is-too-slow/" rel="nofollow noreferrer">http://dow.ngra.de/2008/10/27/when-systemcurrenttimemillis-is-too-slow/</a>, <a href="http://dow.ngra.de/2008/10/28/what-do-we-really-know-about-non-blocking... | [
{
"answer_id": 273690,
"author": "jiriki",
"author_id": 19907,
"author_profile": "https://Stackoverflow.com/users/19907",
"pm_score": 1,
"selected": false,
"text": "if (counter == HeartBeatThread.counter) \n return;\n"
}
] | 2008/11/07 | [
"https://Stackoverflow.com/questions/273641",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20022/"
] |
273,662 | <p>With multiple developers working on the same Tomcat application, I'd like to tell the application to install to a different path, based on the current user and revision control client/view.</p>
<p>So, if Bob is building, the app should be installed in Bob's test environment, maybe /bob1 or something like that. Bob... | [
{
"answer_id": 275622,
"author": "flicken",
"author_id": 12880,
"author_profile": "https://Stackoverflow.com/users/12880",
"pm_score": 2,
"selected": false,
"text": "ant -Dinstall.location=/bob1 install\n"
},
{
"answer_id": 275794,
"author": "SAL9000",
"author_id": 11609,... | 2008/11/07 | [
"https://Stackoverflow.com/questions/273662",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/22917/"
] |
273,664 | <p>I find AWK really useful. Here is a one liner I put together to manipulate data.</p>
<pre><code>ls | awk '{ print "awk " "'"'"'" " {print $1,$2,$3} " "'"'"'" " " $1 ".old_ext > " $1 ".new_ext" }' > file.csh
</code></pre>
<p>I used this AWK to make a script file that would rename some files and only pr... | [
{
"answer_id": 273737,
"author": "Niniki",
"author_id": 4155,
"author_profile": "https://Stackoverflow.com/users/4155",
"pm_score": 1,
"selected": false,
"text": "ls -1 *.mp3 | awk '{printf(\"mv %s newDir/%s\\n\",$1,$1)}' | /bin/sh\n ps -ef | grep -v username | awk '{printf(\"kill -9 %s\... | 2008/11/07 | [
"https://Stackoverflow.com/questions/273664",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/30181/"
] |
273,668 | <p>I'm working on a Java based project that has a client program which needs to connect to a MySQL database on a remote server. This was implemented is as follows:</p>
<p>Use JDBC to write the SQL queries to be executed which are then hosted as a servlet using Apache Tomcat and made accessible via XML-RPC. The client ... | [
{
"answer_id": 273737,
"author": "Niniki",
"author_id": 4155,
"author_profile": "https://Stackoverflow.com/users/4155",
"pm_score": 1,
"selected": false,
"text": "ls -1 *.mp3 | awk '{printf(\"mv %s newDir/%s\\n\",$1,$1)}' | /bin/sh\n ps -ef | grep -v username | awk '{printf(\"kill -9 %s\... | 2008/11/07 | [
"https://Stackoverflow.com/questions/273668",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
273,671 | <p>In an attempt to hide the Safari UI components for an web-app bookmarked as a Homescreen Icon. I am using this meta tag </p>
<pre><code><meta name="apple-mobile-web-app-capable" content="yes" />
</code></pre>
<p>as specified on <a href="https://developer.apple.com/library/content/documentation/AppleApplicati... | [
{
"answer_id": 2002558,
"author": "Benoit",
"author_id": 222769,
"author_profile": "https://Stackoverflow.com/users/222769",
"pm_score": 3,
"selected": false,
"text": "<meta name=\"apple-touch-fullscreen\" content=\"yes\" />\n"
},
{
"answer_id": 3049787,
"author": "mbxtr",
... | 2008/11/07 | [
"https://Stackoverflow.com/questions/273671",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
273,675 | <p>From an application I'm building I need to print existing PDFs (created by another app).
How can I do this in C# and provide a mechanism so the user can select a different printer or other properties. </p>
<p>I've looked at the PrintDialog but not sure what file it is attempting to print, if any, b/c the output is... | [
{
"answer_id": 273729,
"author": "Nicholas Piasecki",
"author_id": 32187,
"author_profile": "https://Stackoverflow.com/users/32187",
"pm_score": 5,
"selected": false,
"text": "PrinterSettings.InstalledPrinters private void PrintFormPdfData(byte[] formPdfData)\n {\n string t... | 2008/11/07 | [
"https://Stackoverflow.com/questions/273675",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
273,691 | <p>In the C / Unix environment I work in, I see some developers using <code>__progname</code> instead of <code>argv[0]</code> for usage messages. Is there some advantage to this? What's the difference between <code>__progname</code> and <code>argv[0]</code>. Is it portable?</p>
| [
{
"answer_id": 273701,
"author": "Evan Teran",
"author_id": 13430,
"author_profile": "https://Stackoverflow.com/users/13430",
"pm_score": 5,
"selected": true,
"text": "__progname argv[0] __progname argv[0]"
},
{
"answer_id": 273706,
"author": "Adam Liss",
"author_id": 291... | 2008/11/07 | [
"https://Stackoverflow.com/questions/273691",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10888/"
] |
273,695 | <p>I've been using a local git repository interacting with my group's CVS repository for several months, now. I've made an almost neurotic number of branches, most of which have thankfully merged back into my trunk. But naming is starting to become an issue. If I have a task easily named with a simple label, but I a... | [
{
"answer_id": 273760,
"author": "Aristotle Pagaltzis",
"author_id": 9410,
"author_profile": "https://Stackoverflow.com/users/9410",
"pm_score": 6,
"selected": false,
"text": "git branch"
},
{
"answer_id": 280157,
"author": "farktronix",
"author_id": 677,
"author_prof... | 2008/11/07 | [
"https://Stackoverflow.com/questions/273695",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18103/"
] |
273,711 | <p>I have an Eclipse RCP application that displays a lot (10k+) of small images next to each other, like a film strip. For each image, I am using a SWT <code>Image</code> object. This uses an excessive amount of memory and resources. I am looking for a more efficient way. I thought of taking all of these images and... | [
{
"answer_id": 290904,
"author": "Herman Lintvelt",
"author_id": 27602,
"author_profile": "https://Stackoverflow.com/users/27602",
"pm_score": 3,
"selected": true,
"text": " final List<Image> images;\n final Image bigImage = new Image(Display.getCurrent(), combinedWidth, he... | 2008/11/07 | [
"https://Stackoverflow.com/questions/273711",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/725/"
] |
273,720 | <p>Should Singleton objects that don't use instance/reference counters be considered memory leaks in C++?</p>
<p>Without a counter that calls for explicit deletion of the singleton instance when the count is zero, how does the object get deleted? Is it cleaned up by the OS when the application is terminated? What if... | [
{
"answer_id": 273749,
"author": "Nicola Bonelli",
"author_id": 19630,
"author_profile": "https://Stackoverflow.com/users/19630",
"pm_score": 2,
"selected": false,
"text": "signal(SIGTERM,exit);"
},
{
"answer_id": 273826,
"author": "Don Wakefield",
"author_id": 3778,
... | 2008/11/07 | [
"https://Stackoverflow.com/questions/273720",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/34731/"
] |
273,721 | <p>I wonder if there is an example which html files and java files are resides in different folders. </p>
| [
{
"answer_id": 273818,
"author": "Loren_",
"author_id": 13703,
"author_profile": "https://Stackoverflow.com/users/13703",
"pm_score": 3,
"selected": false,
"text": "IResourceSettings resourceSettings = getResourceSettings();\nresourceSettings.addResourceFolder(\"pages\"); //the full path... | 2008/11/07 | [
"https://Stackoverflow.com/questions/273721",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/34367/"
] |
273,732 | <p>I have an application where, in the course of using the application, a user might click from</p>
<pre><code>virginia.usa.com
</code></pre>
<p>to</p>
<pre><code>newyork.usa.com
</code></pre>
<p>Since I'd rather not create a new session each time a user crosses from one subdomain to another, what's a good way to s... | [
{
"answer_id": 273775,
"author": "Matthew Scharley",
"author_id": 15537,
"author_profile": "https://Stackoverflow.com/users/15537",
"pm_score": 2,
"selected": false,
"text": ".usa.com session.use_cookies = 1\nsession.use_only_cookies = 1\nsession.cookie_domain = .usa.com\n"
},
{
... | 2008/11/07 | [
"https://Stackoverflow.com/questions/273732",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/28118/"
] |
273,743 | <p>I have a web directory where I store some config files. I'd like to use wget to pull those files down and maintain their current structure. For instance, the remote directory looks like:</p>
<pre><code>http://mysite.com/configs/.vim/
</code></pre>
<p>.vim holds multiple files and directories. I want to replicate t... | [
{
"answer_id": 273755,
"author": "Conor McDermottroe",
"author_id": 63985,
"author_profile": "https://Stackoverflow.com/users/63985",
"pm_score": 3,
"selected": false,
"text": "wget -r http://mysite.com/configs/.vim/\n"
},
{
"answer_id": 273757,
"author": "kasperjj",
"aut... | 2008/11/07 | [
"https://Stackoverflow.com/questions/273743",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2476/"
] |
273,751 | <p>I have a SSIS package that eventually I would like to pass parameters too, these parameters will come from a .NET application (VB or C#) so I was curious if anyone knows of how to do this, or better yet a website with helpful hints on how to do it. </p>
<p>So basically I want to execute a SSIS package from .NET pas... | [
{
"answer_id": 1920083,
"author": "Craig Schwarze",
"author_id": 226235,
"author_profile": "https://Stackoverflow.com/users/226235",
"pm_score": 6,
"selected": false,
"text": "using Microsoft.SqlServer.Dts.Runtime;\n\nprivate void Execute_Package()\n { \n string pkgLo... | 2008/11/07 | [
"https://Stackoverflow.com/questions/273751",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
273,789 | <p>In javascript, is there an equivalent of String.indexOf() that takes a regular expression instead of a string for the first first parameter while still allowing a second parameter ?</p>
<p>I need to do something like </p>
<pre><code>str.indexOf(/[abc]/ , i);
</code></pre>
<p>and</p>
<pre><code>str.lastIndexOf(/[... | [
{
"answer_id": 273797,
"author": "Andru Luvisi",
"author_id": 5922,
"author_profile": "https://Stackoverflow.com/users/5922",
"pm_score": 3,
"selected": false,
"text": "str.substr(i).match(/[abc]/);\n"
},
{
"answer_id": 273810,
"author": "Glenn",
"author_id": 25191,
"... | 2008/11/07 | [
"https://Stackoverflow.com/questions/273789",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/238/"
] |
273,794 | <p>Similar to <a href="https://stackoverflow.com/questions/85978/query-a-tables-foreign-key-relationships">this question</a> but for MySQL....</p>
<p>How can I programmatically determine foreign key references in MySQL (assuming InnoDB)? I can almost get them with:</p>
<pre><code>SHOW TABLE STATUS WHERE Name = 'MyTa... | [
{
"answer_id": 273812,
"author": "Cade Roux",
"author_id": 18255,
"author_profile": "https://Stackoverflow.com/users/18255",
"pm_score": 2,
"selected": false,
"text": "INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS"
},
{
"answer_id": 273907,
"author": "Bill Karwin",
"author_i... | 2008/11/07 | [
"https://Stackoverflow.com/questions/273794",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/23934/"
] |
273,809 | <p>I have a bunch of controls on my window. One of them is a refresh button that performs a cumbersome task on a background thread.</p>
<p>When the user clicks the refresh button, I put the cursor in a wait (hourglass) status and disable the whole window -- <code>Me.IsEnabled = False</code>.</p>
<p>I'd like to suppo... | [
{
"answer_id": 273852,
"author": "Abe Heidebrecht",
"author_id": 9268,
"author_profile": "https://Stackoverflow.com/users/9268",
"pm_score": 6,
"selected": true,
"text": "<StackPanel Orientation=\"Horizontal\">\n <StackPanel x:Name=\"controlContainer\" Orientation=\"Horizontal\">\n ... | 2008/11/07 | [
"https://Stackoverflow.com/questions/273809",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/132931/"
] |
273,847 | <p>I'm developing multi-language support for our web app. We're using <a href="http://docs.djangoproject.com/en/dev/topics/i18n/" rel="noreferrer">Django's helpers</a> around the <a href="http://en.wikipedia.org/wiki/Gettext" rel="noreferrer">gettext</a> library. Everything has been surprisingly easy, except for the qu... | [
{
"answer_id": 273914,
"author": "hangy",
"author_id": 11963,
"author_profile": "https://Stackoverflow.com/users/11963",
"pm_score": 3,
"selected": false,
"text": "<strong /> Please <a href=\"%s\">log in</a> to continue.\n"
},
{
"answer_id": 274037,
"author": "Niniki",
"a... | 2008/11/07 | [
"https://Stackoverflow.com/questions/273847",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
273,848 | <p>I am developing a HTML form designer that needs to generate static HTML and show this to the user. I keep writing ugly code like this:</p>
<pre><code>public string GetCheckboxHtml()
{
return ("&lt;input type="checkbox" name="somename" /&gt;");
}
</code></pre>
<p>Isn't there a set of strongly typed clas... | [
{
"answer_id": 273866,
"author": "Jacob Carpenter",
"author_id": 26627,
"author_profile": "https://Stackoverflow.com/users/26627",
"pm_score": 2,
"selected": false,
"text": "var input = new XElement(\"input\",\n new XAttribute(\"type\", \"checkbox\"),\n new XAttribute(\"name\", \"s... | 2008/11/07 | [
"https://Stackoverflow.com/questions/273848",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
273,854 | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="https://stackoverflow.com/questions/26094/most-efficient-implementation-of-a-large-number-class">Most efficient implementation of a large number class</a> </p>
</blockquote>
<p>Suppose I needed to calculate 2^150000. Obviously that number is goin... | [
{
"answer_id": 273861,
"author": "John D. Cook",
"author_id": 25188,
"author_profile": "https://Stackoverflow.com/users/25188",
"pm_score": 1,
"selected": false,
"text": "bc"
},
{
"answer_id": 273893,
"author": "Bjarke Ebert",
"author_id": 31890,
"author_profile": "ht... | 2008/11/07 | [
"https://Stackoverflow.com/questions/273854",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3800/"
] |
273,869 | <p>The topic generically says it all. Basically in a situation like this:</p>
<pre><code>boost::scoped_array<int> p(new int[10]);
</code></pre>
<p>Is there any appreciable difference in performance between doing: <code>&p[0]</code> and <code>p.get()</code>?</p>
<p>I ask because I prefer the first one, it h... | [
{
"answer_id": 273900,
"author": "Martin York",
"author_id": 14065,
"author_profile": "https://Stackoverflow.com/users/14065",
"pm_score": 2,
"selected": false,
"text": "T * scoped_array::get() const // never throws\n{\n return ptr;\n}\n\nT & scoped_array::operator[](std::ptrdiff_t i)... | 2008/11/07 | [
"https://Stackoverflow.com/questions/273869",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13430/"
] |
273,898 | <p>I have two forms in microsoft access, one called Bill and the other one called Payment. They both have Total amount as a field in both of the forms. I am trying to reference the Bill total amount to the Payment total amount. </p>
<p>I have tried in the Payment total amount control source : =Forms!Bill![Total Amount... | [
{
"answer_id": 273950,
"author": "Fionnuala",
"author_id": 2548,
"author_profile": "https://Stackoverflow.com/users/2548",
"pm_score": 2,
"selected": false,
"text": "Me.Parent.[Total order]\nMe.[Subform Control name Here].form.[Total order]\n"
},
{
"answer_id": 274059,
"autho... | 2008/11/07 | [
"https://Stackoverflow.com/questions/273898",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
273,908 | <p>Problem: I have an integer; this integer needs to be converted to a stl::string type. </p>
<p>In the past, I've used <code>stringstream</code> to do a conversion, and that's just kind of cumbersome. I know the C way is to do a <code>sprintf</code>, but I'd much rather do a C++ method that is typesafe(er).</p>
<p>I... | [
{
"answer_id": 273961,
"author": "Mic",
"author_id": 35656,
"author_profile": "https://Stackoverflow.com/users/35656",
"pm_score": 5,
"selected": false,
"text": "#include <boost/lexical_cast.hpp>\nstd::string s = boost::lexical_cast<std::string>(i);\n try{\n std::string s = boost::lexic... | 2008/11/07 | [
"https://Stackoverflow.com/questions/273908",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/26227/"
] |
273,909 | <p>Is there a idiomatic way of removing elements from PATH-like shell variables?</p>
<p>That is I want to take</p>
<pre><code>PATH=/home/joe/bin:/usr/local/bin:/usr/bin:/bin:/path/to/app/bin:.
</code></pre>
<p>and <strong>remove</strong> or <strong>replace</strong> the <code>/path/to/app/bin</code> without clobberin... | [
{
"answer_id": 273998,
"author": "florin",
"author_id": 18308,
"author_profile": "https://Stackoverflow.com/users/18308",
"pm_score": 2,
"selected": false,
"text": "#!/bin/bash\nNEW_PATH=$(echo -n $PATH | tr \":\" \"\\n\" | sed \"/foo/d\" | tr \"\\n\" \":\")\nexport PATH=$NEW_PATH\n echo... | 2008/11/07 | [
"https://Stackoverflow.com/questions/273909",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2509/"
] |
273,929 | <p><strong>In Oracle I can declare a reference cursor...</strong></p>
<pre><code>TYPE t_spool IS REF CURSOR RETURN spool%ROWTYPE;
</code></pre>
<p><strong>...and use it to pass a cursor as the return value...</strong></p>
<pre><code>FUNCTION end_spool
RETURN t_spool
AS
v_spool t_spool;
BEGIN
... | [
{
"answer_id": 445434,
"author": "Yoni",
"author_id": 36071,
"author_profile": "https://Stackoverflow.com/users/36071",
"pm_score": 3,
"selected": false,
"text": "CREATE PROCEDURE `TEST`()\nMODIFIES SQL DATA\nBEGIN\n SELECT * FROM test_table;\nEND;\n String query = \"{CALL TEST()}\";\nC... | 2008/11/07 | [
"https://Stackoverflow.com/questions/273929",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13930/"
] |
273,937 | <p>I am trying to learn Python and WxPython. I have been a SAS programmer for years. This OOP stuff is slowly coming together but I am still fuzzy on a lot of the concepts. Below is a section of code. I am trying to use a button click to create an instance of another class. Specifically-I have my main panel in one... | [
{
"answer_id": 274004,
"author": "Andru Luvisi",
"author_id": 5922,
"author_profile": "https://Stackoverflow.com/users/5922",
"pm_score": 1,
"selected": false,
"text": "self.Bind(wx.EVT_MENU, self.subPanel(None, -1, 'TEST'),id=1)\n self.Bind(wx.EVT_MENU, subPanel(None, -1, 'TEST'),id=1)\... | 2008/11/07 | [
"https://Stackoverflow.com/questions/273937",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/30105/"
] |
273,941 | <p>I am trying to write a function that will pull the name of a property and the type using syntax like below:</p>
<pre><code>private class SomeClass
{
Public string Col1;
}
PropertyMapper<Somewhere> propertyMapper = new PropertyMapper<Somewhere>();
propertyMapper.MapProperty(x => x.Col1)
</code></... | [
{
"answer_id": 273971,
"author": "Jacob Carpenter",
"author_id": 26627,
"author_profile": "https://Stackoverflow.com/users/26627",
"pm_score": 7,
"selected": true,
"text": "public static MemberInfo GetMemberInfo<T, U>(Expression<Func<T, U>> expression)\n{\n var member = expression.Bod... | 2008/11/07 | [
"https://Stackoverflow.com/questions/273941",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1213936/"
] |
273,943 | <p>Presuming I have a class named <code>A</code>, and I want to use the decorator design pattern. Correct me if I'm wrong, but for that to work , we'll need to create a decorator class, say <code>ADecorator</code>, which will hold a reference to an <code>A</code> instance, and all the other decorators will extend this ... | [
{
"answer_id": 274234,
"author": "Vincent Ramdhanie",
"author_id": 27439,
"author_profile": "https://Stackoverflow.com/users/27439",
"pm_score": 6,
"selected": true,
"text": "public double cost(){\n return 3.45;\n}\n public double cost(){\n return 3.80;\n}\n public abstract class ... | 2008/11/07 | [
"https://Stackoverflow.com/questions/273943",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/31610/"
] |
273,946 | <p>Is there an obvious way to do this that I'm missing? I'm just trying to make thumbnails.</p>
| [
{
"answer_id": 273962,
"author": "gnud",
"author_id": 27204,
"author_profile": "https://Stackoverflow.com/users/27204",
"pm_score": 10,
"selected": true,
"text": "min(maxwidth/width, maxheight/height) oldsize*ratio Image.thumbnail import os, sys\nimport Image\n\nsize = 128, 128\n\nfor in... | 2008/11/07 | [
"https://Stackoverflow.com/questions/273946",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3912/"
] |
273,949 | <p>For some reason I'm not getting this. (Example model below) If I write: </p>
<pre><code>var property = typeof(sedan).GetProperty("TurningRadius");
Attribute.GetCustomAttributes(property,typeof(MyAttribute), false)
</code></pre>
<p>the call will return MyAttribute(2) despite indicating I don't want to search the in... | [
{
"answer_id": 274005,
"author": "Jon Skeet",
"author_id": 22656,
"author_profile": "https://Stackoverflow.com/users/22656",
"pm_score": 1,
"selected": false,
"text": "using System;\nusing System.Reflection;\n\npublic class MyAttribute : Attribute\n{\n public MyAttribute(int x) {}\n}\... | 2008/11/07 | [
"https://Stackoverflow.com/questions/273949",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1946/"
] |
273,964 | <p>I have a CSS rule like this:</p>
<pre><code>a:hover { background-color: #fff; }
</code></pre>
<p>But this results in a bad-looking gap at the bottom on image links, and what's even worse, if I have transparent images, the link's background color can be seen through the image.</p>
<p>I have stumbled upon this prob... | [
{
"answer_id": 273973,
"author": "FlySwat",
"author_id": 1965,
"author_profile": "https://Stackoverflow.com/users/1965",
"pm_score": 1,
"selected": false,
"text": "a:hover {background-color: #fff;}\nimg:hover { background-color: transparent;}\n"
},
{
"answer_id": 273993,
"aut... | 2008/11/07 | [
"https://Stackoverflow.com/questions/273964",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2119/"
] |
273,969 | <p>I'm having a little bit of trouble making a sticky form that will remember what is entered in it on form submission if the value has double quotes. The problem is that the HTML is supposed to read something like:</p>
<pre><code><input type="text" name="something" value="Whatever value you entered" />
</code><... | [
{
"answer_id": 273976,
"author": "Greg",
"author_id": 24181,
"author_profile": "https://Stackoverflow.com/users/24181",
"pm_score": 5,
"selected": true,
"text": "<input type=\"text\" value=\"<?php echo htmlentities($myValue); ?>\">"
},
{
"answer_id": 274002,
"author": "thesma... | 2008/11/07 | [
"https://Stackoverflow.com/questions/273969",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13281/"
] |
273,970 | <p>Right now we've got web pages that show UI elements, and web pages that just process form submissions, and then redirect back to the UI pages. They do this using PHP's header() function:</p>
<pre><code>header("Location: /other_page.php");
</code></pre>
<p>This causes a 302 Found response to be sent; according to ... | [
{
"answer_id": 273989,
"author": "Greg",
"author_id": 24181,
"author_profile": "https://Stackoverflow.com/users/24181",
"pm_score": 2,
"selected": false,
"text": "header('Location: /foo.php', true, 303);"
},
{
"answer_id": 274036,
"author": "troelskn",
"author_id": 18180,... | 2008/11/07 | [
"https://Stackoverflow.com/questions/273970",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20903/"
] |
273,978 | <p>What makes all the words of a programming language actually do anything? I mean, what's actually happening to make the computer know what all of those words mean? If I verbally tell my my computer to do something, it doesn't do it, because it doesn't understand. So how exactly can these human words written into a la... | [
{
"answer_id": 273984,
"author": "kasperjj",
"author_id": 34240,
"author_profile": "https://Stackoverflow.com/users/34240",
"pm_score": -1,
"selected": false,
"text": "print(\"Hello World\");\n"
},
{
"answer_id": 273988,
"author": "FlySwat",
"author_id": 1965,
"author... | 2008/11/07 | [
"https://Stackoverflow.com/questions/273978",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/35661/"
] |
273,995 | <p>How does one prevent an inclusion cycle in C? ie. You shouldn't have a.h #include "b.h", which #include's "c.h" which #include's "a.h". I'm looking for a way of preventing this from happening using some sort of C directive.</p>
<p>I had originally thought this would've prevented this from happening:</p>
<p>Content... | [
{
"answer_id": 274008,
"author": "florin",
"author_id": 18308,
"author_profile": "https://Stackoverflow.com/users/18308",
"pm_score": 4,
"selected": true,
"text": "gcc -E $(CFLAGS) -o foo.i foo.cpp\n"
}
] | 2008/11/07 | [
"https://Stackoverflow.com/questions/273995",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19026/"
] |
274,009 | <p>I have a "username" TEdit on a Delphi 2006 login form. When the application starts up the user is asked to enter the username. The TEdit gets focus and the caret is placed in its horizontal center for some reason. As soon as anything is typed the caret is left aligned again and everything looks normal. </p>
<p>It i... | [
{
"answer_id": 2103150,
"author": "DamienD",
"author_id": 254839,
"author_profile": "https://Stackoverflow.com/users/254839",
"pm_score": 2,
"selected": false,
"text": " ../..\n Focused := IsActiveControl;\n if Focused and (CurRow = Row) and (CurCol = Col) then\n beg... | 2008/11/07 | [
"https://Stackoverflow.com/questions/274009",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/35657/"
] |
274,011 | <p>I would like to know if there is software that, given a regex and of course some other constraints like length, produces random text that always matches the given regex.
Thanks</p>
| [
{
"answer_id": 274035,
"author": "HanClinto",
"author_id": 26933,
"author_profile": "https://Stackoverflow.com/users/26933",
"pm_score": 1,
"selected": false,
"text": "def generate_problem(level):\n keep_trying = True\n while(keep_trying):\n regex = gen_regex(level)\n # print 're... | 2008/11/07 | [
"https://Stackoverflow.com/questions/274011",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11906/"
] |
274,022 | <p>I very rarely meet any other programmers!</p>
<p>My thought when I first saw the token was "implies that" since that's what it would read it as in a mathematical proof but that clearly isn't its sense.</p>
<p>So how do I say or read "=>" as in:-</p>
<pre><code>IEnumerable<Person> Adults = people.Where(p =&g... | [
{
"answer_id": 274025,
"author": "Erik Forbes",
"author_id": 16942,
"author_profile": "https://Stackoverflow.com/users/16942",
"pm_score": 8,
"selected": true,
"text": "x => x * 2;\n"
},
{
"answer_id": 274247,
"author": "Mark Brackett",
"author_id": 2199,
"author_prof... | 2008/11/07 | [
"https://Stackoverflow.com/questions/274022",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/29411/"
] |
274,024 | <p>I'm increasingly becoming aware that there must be major differences in the ways that regular expressions will be interpreted by browsers.<br />
As an example, a co-worker had written this regular expression, to validate that a file being uploaded would have a PDF extension:</p>
<pre><code>^(([a-zA-Z]:)|(\\{2}\w+)\... | [
{
"answer_id": 274052,
"author": "Mauricio",
"author_id": 33913,
"author_profile": "https://Stackoverflow.com/users/33913",
"pm_score": 1,
"selected": false,
"text": "var regex = /^(([a-zA-Z]:)|(\\\\{2}\\w+)\\$?)(\\\\(\\w[\\w].*))(.pdf)$/;"
}
] | 2008/11/07 | [
"https://Stackoverflow.com/questions/274024",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12975/"
] |
274,039 | <p>I would like to do this:</p>
<pre><code>[RequiresAuthentication(CompanyType.Client)]
public class FooController
{
public ActionResult OnlyClientUsersCanDoThis()
public ActionResult OnlyClientUsersCanDoThisToo()
[RequiresAuthentication]
public ActionResult AnyTypeOfUserCanDoThis()
</code></... | [
{
"answer_id": 2060147,
"author": "Thomas",
"author_id": 250207,
"author_profile": "https://Stackoverflow.com/users/250207",
"pm_score": 0,
"selected": false,
"text": "public override void OnActionExecuting(ActionExecutingContext filterContext) {\n base.OnActionExecuting(filterContext... | 2008/11/07 | [
"https://Stackoverflow.com/questions/274039",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/29493/"
] |
274,051 | <p>Is keeping JMS connections / sessions / consumer always open a bad practice?</p>
<p>Code draft example:</p>
<pre><code>// app startup code
ConnectionFactory cf = (ConnectionFactory)jndiContext.lookup(CF_JNDI_NAME);
Connection connection = cf.createConnection(user,pass);
Session session = connection.createSession(... | [
{
"answer_id": 40217347,
"author": "eparvan",
"author_id": 5202500,
"author_profile": "https://Stackoverflow.com/users/5202500",
"pm_score": 2,
"selected": false,
"text": "try { \n this.connection.close();\n } catch (JMSException e) {\n //\n }\n"
}
] | 2008/11/07 | [
"https://Stackoverflow.com/questions/274051",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/35323/"
] |
274,056 | <p>I'm setting up a User Control driven by a XML configuration. It is easier to explain by example. Take a look at the following configuration snippet:</p>
<pre><code><node>
<text lbl="Text:"/>
<checkbox lbl="Check me:" checked="true"/>
</node>
</code></pre>
<p>What I'm trying to achieve t... | [
{
"answer_id": 274249,
"author": "Keltex",
"author_id": 28260,
"author_profile": "https://Stackoverflow.com/users/28260",
"pm_score": 1,
"selected": false,
"text": "<ItemTemplate>\n <%# GetContent(Page.GetDataItem()) %>\n</ItemTemplate>\n"
},
{
"answer_id": 276591,
"author... | 2008/11/08 | [
"https://Stackoverflow.com/questions/274056",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2892/"
] |
274,066 | <p>I have a large existing c++ codebase. Typically the users of the codebase edit the source with gvim, but we'd like to start using the nifty IDE features in Eclipse. The codebase has an extensive directory hierarchy, but the source files use include directives without paths due to some voodoo we use in our build pr... | [
{
"answer_id": 274194,
"author": "luke",
"author_id": 25920,
"author_profile": "https://Stackoverflow.com/users/25920",
"pm_score": 3,
"selected": false,
"text": "<option id=\"gnu.c.compiler.option.include.paths....>\n<listoptionValue builtIn=\"false\" value=\""${workspace_loc:/some... | 2008/11/08 | [
"https://Stackoverflow.com/questions/274066",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/152/"
] |
274,149 | <p>Is it possible in CSS using a property inside an @page to say that table headers (th) should be repeated on every page if the table spreads over multiple pages?</p>
| [
{
"answer_id": 274186,
"author": "nickf",
"author_id": 9021,
"author_profile": "https://Stackoverflow.com/users/9021",
"pm_score": 6,
"selected": false,
"text": "thead thead {display: table-header-group;}\ntfoot {display: table-footer-group;}\n"
},
{
"answer_id": 2633761,
"au... | 2008/11/08 | [
"https://Stackoverflow.com/questions/274149",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5295/"
] |
274,157 | <p>Wordpress provides a function called "the_permalink()" that returns, you guessed it!, the permalink to a given post while in a loop of posts.</p>
<p>I am trying to URL encode that permalink and when I execute this code:</p>
<pre><code><?php
print(the_permalink());
$permalink = the_permalink();
print($permalink)... | [
{
"answer_id": 274163,
"author": "Jonathan Lonowski",
"author_id": 15031,
"author_profile": "https://Stackoverflow.com/users/15031",
"pm_score": 4,
"selected": false,
"text": "the_permalink urlencode get_permalink <?php\nprint(the_permalink()); // prints (1... | 2008/11/08 | [
"https://Stackoverflow.com/questions/274157",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/33754/"
] |
274,158 | <p>I have a very painful library which, at the moment, is accepting a C# string as a way to get arrays of data; apparently, this makes marshalling for pinvokes easier. </p>
<p>So how do I make a ushort array into a string by bytes? I've tried:</p>
<pre><code>int i;
String theOutData = "";
ushort[] theImageData = in... | [
{
"answer_id": 274207,
"author": "Barry Kelly",
"author_id": 3712,
"author_profile": "https://Stackoverflow.com/users/3712",
"pm_score": 4,
"selected": true,
"text": "ushort[] data = new ushort[10];\nfor (int i = 0; i < data.Length; ++i)\n data[i] = (char) ('A' + i);\n\nstring asStrin... | 2008/11/08 | [
"https://Stackoverflow.com/questions/274158",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/21981/"
] |
274,162 | <p>Is there a specific reason why I should be using the <code>Html.CheckBox</code>, <code>Html.TextBox</code>, etc methods instead of just manually writing the HTML?</p>
<pre><code><%= Html.TextBox("uri") %>
</code></pre>
<p>renders the following HTML</p>
<pre><code><input type="text" value="" name="uri" id... | [
{
"answer_id": 274272,
"author": "user17060",
"author_id": 17060,
"author_profile": "https://Stackoverflow.com/users/17060",
"pm_score": 3,
"selected": false,
"text": "ViewData[\"FirstName\"] = \"Joe Bloggs\"; \n\n<%=Html.TextBox(\"FirstName\") %>\n <input type=\"text\" value=\"Joe Blogg... | 2008/11/08 | [
"https://Stackoverflow.com/questions/274162",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3957/"
] |
274,172 | <p>VB.Net2005</p>
<p>Simplified Code:</p>
<pre><code> MustInherit Class InnerBase(Of Inheritor)
End Class
MustInherit Class OuterBase(Of Inheritor)
Class Inner
Inherits InnerBase(Of Inner)
End Class
End Class
Class ChildClass
Inherits OuterBase(Of ChildClass)
End Class
Class ChildClassTwo
I... | [
{
"answer_id": 274272,
"author": "user17060",
"author_id": 17060,
"author_profile": "https://Stackoverflow.com/users/17060",
"pm_score": 3,
"selected": false,
"text": "ViewData[\"FirstName\"] = \"Joe Bloggs\"; \n\n<%=Html.TextBox(\"FirstName\") %>\n <input type=\"text\" value=\"Joe Blogg... | 2008/11/08 | [
"https://Stackoverflow.com/questions/274172",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
274,179 | <p>I have followed the instructions to setup rxtx on windows from <a href="http://www.jcontrol.org/download/readme_rxtx_en.html" rel="nofollow noreferrer">http://www.jcontrol.org/download/readme_rxtx_en.html</a>.</p>
<p>What I did exactly was copy rxtxSerial.dll to "C:\Program Files\Java\jdk1.6.0_07\jre\bin"
and copie... | [
{
"answer_id": 274257,
"author": "Ken Gentle",
"author_id": 8709,
"author_profile": "https://Stackoverflow.com/users/8709",
"pm_score": 1,
"selected": false,
"text": "rxtxSerial.dll C:\\Program Files\\Java\\jdk1.6.0_07\\jre\\lib\\bin\n ^^^\n"
},
{... | 2008/11/08 | [
"https://Stackoverflow.com/questions/274179",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/28462/"
] |
274,185 | <p>Let's say there's a.gz, and b.gz.</p>
<p>$ gzip_merge a.gz b.gz -output c.gz</p>
<p>I'd like to have this program. Of course,</p>
<p>$ cat a.gz b.gz > c.gz</p>
<p>doesn't work. Because the final DEFLATE block of a.gz has BFINAL, and the GZIP header of b.gz. (Refer to RFC1951, RFC1952) But if you unset BFINAL, th... | [
{
"answer_id": 274190,
"author": "Andru Luvisi",
"author_id": 5922,
"author_profile": "https://Stackoverflow.com/users/5922",
"pm_score": 6,
"selected": true,
"text": " Multiple compressed files can be concatenated. In this case, gunzip\n will extract all members at once. For exa... | 2008/11/08 | [
"https://Stackoverflow.com/questions/274185",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/24349/"
] |
274,196 | <p>I've got a large number of integer arrays. Each one has a few thousand integers in it, and each integer is generally the same as the one before it or is different by only a single bit or two. I'd like to shrink each array down as small as possible to reduce my disk IO. </p>
<p>Zlib shrinks it to about 25% of its... | [
{
"answer_id": 274278,
"author": "Jay Kominek",
"author_id": 32878,
"author_profile": "https://Stackoverflow.com/users/32878",
"pm_score": 4,
"selected": true,
"text": "1101\n1101\n1110\n1110\n0110\n 1101\n0000\n0010\n0000\n1000\n compressed[0] = uncompressed[0]\nloop\n compressed[i] = ... | 2008/11/08 | [
"https://Stackoverflow.com/questions/274196",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/23524/"
] |
274,213 | <p>All paint programs, independent of how simple or complex they are, come with a fill tool. This basically replaces the color of a closed region with another color. I know that there are different APIs to do this, but I am interested in the algorithm. What would be an efficient algorithm to implement this tool?</p>
<... | [
{
"answer_id": 274227,
"author": "Community",
"author_id": -1,
"author_profile": "https://Stackoverflow.com/users/-1",
"pm_score": 1,
"selected": false,
"text": "Vis[] Busy[] Busy while you have a point P in Busy:\n{\n for each neighbour N of the point P for which Vis[N] is still fals... | 2008/11/08 | [
"https://Stackoverflow.com/questions/274213",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/33885/"
] |
274,265 | <p>I can't for the life of me find a way to make this work.</p>
<p>If I have 3 divs (a left sidebar, a main body, and a footer), how can I have the sidebar and main body sit next to each other without setting their positions as "absolute" or floating them? Doing either of these options result in the footer div not bei... | [
{
"answer_id": 274269,
"author": "Vincent Ramdhanie",
"author_id": 27439,
"author_profile": "https://Stackoverflow.com/users/27439",
"pm_score": 5,
"selected": true,
"text": "#footer{\n clear: both;\n}\n"
}
] | 2008/11/08 | [
"https://Stackoverflow.com/questions/274265",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5291/"
] |
274,286 | <p>I have a new VPS server, and I'm trying to get it to connect to another server at the same ISP. When I connect via mysql's command line tool, the connection is very fast.</p>
<p>When I use PHP to connect to the remote DB, the connection time may take up to 5 seconds. Queries after this are executed quickly.</p>
... | [
{
"answer_id": 275204,
"author": "Jay",
"author_id": 31479,
"author_profile": "https://Stackoverflow.com/users/31479",
"pm_score": 2,
"selected": true,
"text": "gethostbyname('example.com')\n"
}
] | 2008/11/08 | [
"https://Stackoverflow.com/questions/274286",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/31479/"
] |
274,296 | <p>Does anyone know of an already implemented money type for the .NET framework that supports i18n (currencies, formatting, etc)? I have been looking for a well implemented type and can't seem to find one.</p>
| [
{
"answer_id": 274316,
"author": "Jason Jackson",
"author_id": 13103,
"author_profile": "https://Stackoverflow.com/users/13103",
"pm_score": 3,
"selected": false,
"text": "CultureInfo current = CultureInfo.CurrentCulture;\ndecimal myMoney = 99.99m;\n\n//formats as money in current cultu... | 2008/11/08 | [
"https://Stackoverflow.com/questions/274296",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2220/"
] |
274,307 | <p>Just as an example, if I have a <code>Book</code> model and a <code>BooksController</code>, autotest, part of the ZenTest suite will pick up the association between the two and load <code>test/unit/book_test.rb</code> and <code>test/functional/books_controller_test.rb</code> into the test suite. On the other hand, i... | [
{
"answer_id": 274316,
"author": "Jason Jackson",
"author_id": 13103,
"author_profile": "https://Stackoverflow.com/users/13103",
"pm_score": 3,
"selected": false,
"text": "CultureInfo current = CultureInfo.CurrentCulture;\ndecimal myMoney = 99.99m;\n\n//formats as money in current cultu... | 2008/11/08 | [
"https://Stackoverflow.com/questions/274307",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/31891/"
] |
274,308 | <p>Is which IPs are assigned to which ISPs public information? How do geo IP services obtain this information and maintain this information?</p>
<p>How can I personally figure out where a certain IP belongs without using one of these services?</p>
| [
{
"answer_id": 277537,
"author": "Alnitak",
"author_id": 6782,
"author_profile": "https://Stackoverflow.com/users/6782",
"pm_score": 7,
"selected": true,
"text": "whois whois"
}
] | 2008/11/08 | [
"https://Stackoverflow.com/questions/274308",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3153/"
] |
274,309 | <p>Is there any benefit on Windows to use the WSA winsock functions compared to the BSD-style ones?</p>
| [
{
"answer_id": 276688,
"author": "Alnitak",
"author_id": 6782,
"author_profile": "https://Stackoverflow.com/users/6782",
"pm_score": 3,
"selected": true,
"text": "read write"
}
] | 2008/11/08 | [
"https://Stackoverflow.com/questions/274309",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3153/"
] |
274,315 | <p>I'm writing a C# app using the WebBrowser control, and I want all content I display to come from embedded resources - not static local files, and not remote files.</p>
<p>Setting the initial text of the control to an embedded HTML file works great with this code inspired by <a href="http://blog.topholt.com/2008/03/... | [
{
"answer_id": 274530,
"author": "Marc Gravell",
"author_id": 23354,
"author_profile": "https://Stackoverflow.com/users/23354",
"pm_score": 1,
"selected": false,
"text": "WebBrowser HttpListener"
},
{
"answer_id": 1471460,
"author": "Community",
"author_id": -1,
"auth... | 2008/11/08 | [
"https://Stackoverflow.com/questions/274315",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/25362/"
] |
274,319 | <p>I know that I need to tell my UITextField to resign first responder when I want to dismis the keyboard, but I'm not sure how to know when the user has pressed the "Done" key on the keyboard. Is there a notification I can watch for?</p>
| [
{
"answer_id": 274325,
"author": "Jason Coco",
"author_id": 34218,
"author_profile": "https://Stackoverflow.com/users/34218",
"pm_score": 6,
"selected": false,
"text": "-(IBAction)userDoneEnteringText:(id)sender\n{\n UITextField theField = (UITextField*)sender;\n // do whatever you... | 2008/11/08 | [
"https://Stackoverflow.com/questions/274319",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/28422/"
] |
274,344 | <p>When you lock an object is that object locked throughout the whole application?</p>
<p>For Example, this snippet from C# 3.0 in a Nutshell Section 19.6.1 "Thread Safety and .NET Framework Types":</p>
<pre><code>static void AddItems( )
{
for (int i = 0; i < 100; i++)
lock (list)
list.Add ("I... | [
{
"answer_id": 274357,
"author": "yfeldblum",
"author_id": 12349,
"author_profile": "https://Stackoverflow.com/users/12349",
"pm_score": 3,
"selected": true,
"text": "class UsefulStuff {\n object _TheLock = new object { };\n public void UsefulThingNumberOne() {\n lock(_TheLo... | 2008/11/08 | [
"https://Stackoverflow.com/questions/274344",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19490/"
] |
274,348 | <p>In my small WPF project, I have a <code>TabControl</code> with three tabs. On each tab is a <code>ListBox</code>. This project keeps track of groceries we need to buy. (No, it's not homework, it's for my wife.) So I have a list of <code>ShoppingListItem</code>s, each of which has a <code>Name</code> and a <code>... | [
{
"answer_id": 274458,
"author": "Todd White",
"author_id": 30833,
"author_profile": "https://Stackoverflow.com/users/30833",
"pm_score": 2,
"selected": false,
"text": "<Window.Resources>\n <CollectionViewSource x:Key=\"NeededItems\" Source=\"{Binding Items}\" Filter=\"NeededCollectio... | 2008/11/08 | [
"https://Stackoverflow.com/questions/274348",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5486/"
] |
274,349 | <p>As title. </p>
<p>ruby test/functionals/whatevertest.rb doesn't work, that requires me to replace all <code>require 'test_helper'</code> to <code>require File.dirname(__FILE__) + '/../test_helper'</code>. For some reason most of those test templates have such issue, so I rather to see if there is a hack I could get... | [
{
"answer_id": 274507,
"author": "tvanfosson",
"author_id": 12950,
"author_profile": "https://Stackoverflow.com/users/12950",
"pm_score": 4,
"selected": true,
"text": "(cd test && ruby functionals/whatevertest.rb) fork"
},
{
"answer_id": 3577710,
"author": "Szymon Jeż",
"... | 2008/11/08 | [
"https://Stackoverflow.com/questions/274349",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/16371/"
] |
274,360 | <p>Given a class instance, is it possible to determine if it implements a particular interface? As far as I know, there isn't a built-in function to do this directly. What options do I have (if any)?</p>
| [
{
"answer_id": 274363,
"author": "Community",
"author_id": -1,
"author_profile": "https://Stackoverflow.com/users/-1",
"pm_score": 9,
"selected": true,
"text": "interface IInterface\n{\n}\n\nclass TheClass implements IInterface\n{\n}\n\n$cls = new TheClass();\nif ($cls instanceof IInterf... | 2008/11/08 | [
"https://Stackoverflow.com/questions/274360",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5291/"
] |
274,361 | <p>ok so my issue is i have the string '\222\222\223\225' which is stored as latin-1 in the db. What I get from django (by printing it) is the following string, 'ââââ¢' which I assume is the UTF conversion of it. Now I need to pass the string into a function that
does this operation: </p>
<pre><code>strdecryptedPas... | [
{
"answer_id": 274403,
"author": "Vinko Vrsalovic",
"author_id": 5190,
"author_profile": "https://Stackoverflow.com/users/5190",
"pm_score": 3,
"selected": true,
"text": ">>> a = '\\222\\222\\223\\225'\n>>> u = unicode(a,'latin-1')\n>>> u\nu'\\x92\\x92\\x93\\x95'\n>>> print u.encode('utf... | 2008/11/08 | [
"https://Stackoverflow.com/questions/274361",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/35697/"
] |
274,375 | <p>I want to setup a statistics monitoring platform to watch a specific service, but I'm not quiet sure how to go about it. Processing the intercepted data isn't my concern, just how to go about it. One idea was to setup a proxy between the client application and the service so that all TCP traffic went first to my p... | [
{
"answer_id": 274393,
"author": "Adam Liss",
"author_id": 29157,
"author_profile": "https://Stackoverflow.com/users/29157",
"pm_score": 1,
"selected": false,
"text": "iptables iptables -I INPUT -p tcp -d $HOST_IP --dport $HOST_PORT -j LOG $LOG_OPTIONS\n iptables ULOG"
},
{
"answ... | 2008/11/08 | [
"https://Stackoverflow.com/questions/274375",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9908/"
] |
274,384 | <p>Is anyone aware of any gems, tutorials, or solutions enabling a user to sign in to a website at one domain and automatically given access to other partner domains in the same session? </p>
<p>I have two rails apps running, let's call them App-A and App-B. App-A has a database associated with it, powering the regist... | [
{
"answer_id": 274640,
"author": "Ricardo Acras",
"author_id": 19224,
"author_profile": "https://Stackoverflow.com/users/19224",
"pm_score": 4,
"selected": true,
"text": "Rails::Initializer.run do |config|\n ... \n config.action_controller.session = {\n :session_key => '_portal_sess... | 2008/11/08 | [
"https://Stackoverflow.com/questions/274384",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
274,404 | <p>How can I know in a C#-Application, in which direction the screen of the mobile device is orientated? (i.e. horizontal or vertical).</p>
| [
{
"answer_id": 274456,
"author": "Jason Stangroome",
"author_id": 20819,
"author_profile": "https://Stackoverflow.com/users/20819",
"pm_score": 0,
"selected": false,
"text": "var rect = System.Windows.Forms.Screen.PrimaryScreen.Bounds;\n// or var rect = System.Windows.Forms.Screen.Primar... | 2008/11/08 | [
"https://Stackoverflow.com/questions/274404",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/26070/"
] |
274,408 | <p>I'm trying to create a database scripter tool for a local database I'm using.</p>
<p>I've been able to generate create scripts for the tables, primary keys, indexes, and foreign keys, but I can't find any way to generate create scripts for the table defaults.</p>
<p>For indexes, it's as easy as </p>
<pre><code>fo... | [
{
"answer_id": 274578,
"author": "Pavel Chuchuva",
"author_id": 14131,
"author_profile": "https://Stackoverflow.com/users/14131",
"pm_score": 3,
"selected": false,
"text": "Server server = new Server(@\".\\SQLEXPRESS\");\nDatabase db = server.Databases[\"AdventureWorks\"];\nList<Urn> lis... | 2008/11/08 | [
"https://Stackoverflow.com/questions/274408",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1108/"
] |
274,411 | <p>Jeff Atwood wrote about this <a href="https://blog.codinghorror.com/who-needs-stored-procedures-anyways/" rel="noreferrer">here</a>, and while I understand the theoretical performance boost a stored procedure could offer, it does seem like a tremendous pain.</p>
<p>What types of queries would you see the most perfo... | [
{
"answer_id": 275010,
"author": "HTTP 410",
"author_id": 13118,
"author_profile": "https://Stackoverflow.com/users/13118",
"pm_score": 4,
"selected": false,
"text": "-- First, clear the cache\nDBCC FREEPROCCACHE\n\n-- Look at what executable plans are in cache\nSELECT sc.*\nFROM master.... | 2008/11/08 | [
"https://Stackoverflow.com/questions/274411",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/25538/"
] |
274,439 | <p>How to, in C# round any value to 10 interval? For example, if I have 11, I want it to return 10, if I have 136, then I want it to return 140. </p>
<p>I can easily do it by hand</p>
<pre><code>return ((int)(number / 10)) * 10;
</code></pre>
<p>But I am looking for an builtin algorithm to do this job, something lik... | [
{
"answer_id": 274453,
"author": "Armstrongest",
"author_id": 26931,
"author_profile": "https://Stackoverflow.com/users/26931",
"pm_score": 5,
"selected": false,
"text": "int number = 236;\nnumber = (int)(Math.Ceiling(number / 10.0d) * 10);\n // number = 236 + 10 - 6\n public static int ... | 2008/11/08 | [
"https://Stackoverflow.com/questions/274439",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3834/"
] |
274,457 | <p>I created a project using the default tab-controller project. I am using interface builder to edit the .xib file and add images and buttons. I hook them up to the FirstViewController object in interface builder (that I created and set it's class to the same as the code file). I hooked everything up using <code>IBout... | [
{
"answer_id": 274453,
"author": "Armstrongest",
"author_id": 26931,
"author_profile": "https://Stackoverflow.com/users/26931",
"pm_score": 5,
"selected": false,
"text": "int number = 236;\nnumber = (int)(Math.Ceiling(number / 10.0d) * 10);\n // number = 236 + 10 - 6\n public static int ... | 2008/11/08 | [
"https://Stackoverflow.com/questions/274457",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/23695/"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.