qid int64 4 19.1M | question stringlengths 18 48.3k | answers list | date stringlengths 10 10 | metadata list |
|---|---|---|---|---|
258,590 | <p>I have an SVN repository structure like below. We are using multiple levels under branches for various release maintenance branches, plus a directory for feature branches.</p>
<p>git-svn init seems to work with a single --branches argument, i.e. it seems to expect all of the branches to be in a single location.</p>... | [
{
"answer_id": 258604,
"author": "Hank Gay",
"author_id": 4203,
"author_profile": "https://Stackoverflow.com/users/4203",
"pm_score": 0,
"selected": false,
"text": "git"
},
{
"answer_id": 258659,
"author": "Ken Gentle",
"author_id": 8709,
"author_profile": "https://St... | 2008/11/03 | [
"https://Stackoverflow.com/questions/258590",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15203/"
] |
258,625 | <p>I've come across a couple of popular PHP-related answers recently that suggested using the superglobal <code>$_REQUEST</code>, which I think of as code smell, because it reminds me of <code>register_globals</code>.</p>
<p>Can you provide a good explanation/evidence of why <code>$_REQUEST</code> is bad practice? I'l... | [
{
"answer_id": 259336,
"author": "troelskn",
"author_id": 18180,
"author_profile": "https://Stackoverflow.com/users/18180",
"pm_score": 3,
"selected": false,
"text": "$_REQUEST $_GET $_POST"
}
] | 2008/11/03 | [
"https://Stackoverflow.com/questions/258625",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11438/"
] |
258,655 | <p>Anyone know how to detect if a television is currently connected to a PC in c#?</p>
<p>Cheers</p>
| [
{
"answer_id": 258697,
"author": "Kristian",
"author_id": 23246,
"author_profile": "https://Stackoverflow.com/users/23246",
"pm_score": 3,
"selected": false,
"text": "using System;\nusing System.Drawing;\nusing System.Collections;\nusing System.ComponentModel;\nusing System.Windows.Forms... | 2008/11/03 | [
"https://Stackoverflow.com/questions/258655",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/33647/"
] |
258,661 | <p>I have a GridView defined like this:</p>
<pre><code><asp:GridView ID="myGridView" ruant="server">
<asp:BoundField DataField="myField" />
<asp:CommandField ShowDeleteButton="true" ShowEditButton="true" />
</asp:GridView>
</code></pre>
<p>After I put a row into edit mode with the Edit... | [
{
"answer_id": 258669,
"author": "Tomalak",
"author_id": 18771,
"author_profile": "https://Stackoverflow.com/users/18771",
"pm_score": 3,
"selected": true,
"text": "string js = \"if (event.keyCode == 13) this.form.submit();\"\nmyGridView.Attributes.Add(\"onkeydown\", js);\n GridView_RowU... | 2008/11/03 | [
"https://Stackoverflow.com/questions/258661",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/23935/"
] |
258,662 | <p>My WinForms app uses a number of <a href="http://msdn.microsoft.com/en-us/library/system.componentmodel.backgroundworker.aspx" rel="noreferrer">BackgroundWorker</a> objects to retrieve information from a database. I'm using BackgroundWorker because it allows the UI to remain unblocked during long-running database qu... | [
{
"answer_id": 258664,
"author": "Ed Guiness",
"author_id": 4200,
"author_profile": "https://Stackoverflow.com/users/4200",
"pm_score": 7,
"selected": true,
"text": "BackgroundWorker RunWorkerCompleted System.ComponentModel.RunWorkerCompletedEventArgs"
},
{
"answer_id": 2636352,
... | 2008/11/03 | [
"https://Stackoverflow.com/questions/258662",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4200/"
] |
258,667 | <p>I'm wondering whether something like this is possible (and relatively easy to do), and if so, how I could do it?</p>
<p>I would like to do band filtering on a wave file I'm reproducing. Something similar to the "Equalizer" you see in most Winamp-like applications.<br>
My idea is, however, not to equalize the sound,... | [
{
"answer_id": 258696,
"author": "MusiGenesis",
"author_id": 14606,
"author_profile": "https://Stackoverflow.com/users/14606",
"pm_score": 2,
"selected": false,
"text": "for (int i = 0; i < samples.Length - delay; i++)\n{\n samples[i + delay] += samples[i] * decay;\n}\n"
}
] | 2008/11/03 | [
"https://Stackoverflow.com/questions/258667",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3314/"
] |
258,668 | <p>In GWT, what is the best way to convert a JavaScriptObject overlay type into a JSON string?</p>
<p>I currently have</p>
<pre><code>public final String toJSON() {
return new JSONObject(this).toString();
}
</code></pre>
<p>Which seems to work fine. I would like to know if there are any better approaches.<... | [
{
"answer_id": 332195,
"author": "Mark Renouf",
"author_id": 758,
"author_profile": "https://Stackoverflow.com/users/758",
"pm_score": 3,
"selected": true,
"text": "public native String toJSON() /*-{\n return this.toString();\n}-*/;\n"
},
{
"answer_id": 7109319,
"author": "N... | 2008/11/03 | [
"https://Stackoverflow.com/questions/258668",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/32320/"
] |
258,680 | <p>Is there a possible htaccess directive that can transparently forward request from index.php to index_internal.php if the request is coming from an internal ip range?</p>
| [
{
"answer_id": 258704,
"author": "Greg",
"author_id": 24181,
"author_profile": "https://Stackoverflow.com/users/24181",
"pm_score": 1,
"selected": false,
"text": "RewriteCond %{REMOTE_ADDR} ^192\\.168\\.\nRewriteRule index.php index_internal.php\n RewriteRule index.php index_internal.php... | 2008/11/03 | [
"https://Stackoverflow.com/questions/258680",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20300/"
] |
258,691 | <p>I am using an XmlDocument to parse and manipulate an XHTML string, converting some nodes to non-HTML nodes.</p>
<p>What is the best way to get a list of all nodes with a given class name? Can it be done with XPath?</p>
| [
{
"answer_id": 258698,
"author": "Marc Gravell",
"author_id": 23354,
"author_profile": "https://Stackoverflow.com/users/23354",
"pm_score": 3,
"selected": true,
"text": "Split() var qry = from XmlElement el in d.SelectNodes(\"//*[@class!='']\")\n let classes = el... | 2008/11/03 | [
"https://Stackoverflow.com/questions/258691",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18107/"
] |
258,694 | <p>For a one-shot operation, i need to parse the contents of an XML string and change the numbers of the "ID" field. However, i can not risk changing anything else of the string, eg. whitespace, line feeds, etc. MUST remain as they are! </p>
<p>Since i have made the experience that XmlReader tends to mess whitespace u... | [
{
"answer_id": 258723,
"author": "Tomalak",
"author_id": 18771,
"author_profile": "https://Stackoverflow.com/users/18771",
"pm_score": 3,
"selected": true,
"text": "ID=\"(\\d+)\"\n Regex r = new Regex(\"ID=\\\"(\\\\d+)\\\"\");\nstring outputXml = r.Replace(inputXml, new MatchEvaluator(Re... | 2008/11/03 | [
"https://Stackoverflow.com/questions/258694",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15328/"
] |
258,701 | <p>Is there an easy way to test whether your named pipe is working correctly? I want to make sure that the data I'm sending from my app is actually being sent. Is there a quick and easy way to get a list of all the named pipes?</p>
| [
{
"answer_id": 4209848,
"author": "Omar Elsherif",
"author_id": 511410,
"author_profile": "https://Stackoverflow.com/users/511410",
"pm_score": 4,
"selected": false,
"text": "String[] listOfPipes = System.IO.Directory.GetFiles(@\"\\\\.\\pipe\\\");\n"
},
{
"answer_id": 4252118,
... | 2008/11/03 | [
"https://Stackoverflow.com/questions/258701",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8123/"
] |
258,725 | <p>When working with my .Net 2.0 code base ReSharper continually recommends applying the latest c# 3.0 language features, most notably; convert simple properties into auto-implement properties or declaring local variables as var. Amongst others.</p>
<p>When a new language feature arrives do you go back and religiousl... | [
{
"answer_id": 258739,
"author": "Marc Gravell",
"author_id": 23354,
"author_profile": "https://Stackoverflow.com/users/23354",
"pm_score": 4,
"selected": true,
"text": " static void Main() {\n using (TextReader reader = File.OpenText(\"foo.bar\")) { // [HERE]\n Writ... | 2008/11/03 | [
"https://Stackoverflow.com/questions/258725",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/26409/"
] |
258,726 | <p>I am using a bat file on a Windows 2000 SP4 server to copy database files while the database is shut down. Once the bat file hits the xcopy command, it does the copy, but never returns to the bat file to continue with the other commands (start up the database, etc). I should mention that the xcopy takes several ho... | [
{
"answer_id": 258761,
"author": "JosephStyons",
"author_id": 672,
"author_profile": "https://Stackoverflow.com/users/672",
"pm_score": 2,
"selected": false,
"text": "-Y to suppress prompts about overwriting files\n\n-C continue even if errors occur\n"
}
] | 2008/11/03 | [
"https://Stackoverflow.com/questions/258726",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
258,727 | <p>I'd like to display a stack trace in an error dialog in Delphi 2007 (Win32).</p>
<p>Ideally, I'd like something like this:</p>
<pre><code>try
//do something
except on e : exception do
begin
//rollback a transaction or whatever i need to do here
MessageDlg('An error has occurred!' + #13#10 +
... | [
{
"answer_id": 2288441,
"author": "Martin Binder",
"author_id": 125092,
"author_profile": "https://Stackoverflow.com/users/125092",
"pm_score": 3,
"selected": false,
"text": "try\n raise Exception.Create('Something bad happened...');\nexcept\n on e: Exception do begin\n Call... | 2008/11/03 | [
"https://Stackoverflow.com/questions/258727",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/672/"
] |
258,728 | <p>When I try to create a new task in the task scheduler via the Java ProcessBuilder class I get an access denied error an Windows Vista. On XP it works just fine.</p>
<p>When I use the "Run as adminstrator" option it runs on Vista as well..</p>
<p>However this is a additional step requeried an the users might not kn... | [
{
"answer_id": 2318883,
"author": "freecouch",
"author_id": 279535,
"author_profile": "https://Stackoverflow.com/users/279535",
"pm_score": 5,
"selected": false,
"text": "<target name=\"wrapMyApp\" depends=\"myapp.jar\">\n <launch4j configFile=\"myappConfig.xml\" />\n</target>\n <... | 2008/11/03 | [
"https://Stackoverflow.com/questions/258728",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20999/"
] |
258,729 | <p>I have a simple linux script:</p>
<pre><code>#!/bin/sh
for i in `ls $1`
do
echo $i
done
</code></pre>
<p>In my temp folder are 4 file: a.a, a.aa, a.ab and a.ac</p>
<p>When i call ./script temp/*.?? i get:</p>
<pre><code>temp/a.aa
</code></pre>
<p>When i call ./script "temp/*.??" i get:</p>
<pre><code>te... | [
{
"answer_id": 258778,
"author": "CesarB",
"author_id": 28258,
"author_profile": "https://Stackoverflow.com/users/28258",
"pm_score": 1,
"selected": false,
"text": "./script temp/a.aa temp/a.ab temp/a.ac\n $1 temp/a.aa temp/*.??"
},
{
"answer_id": 258783,
"author": "Robert Ga... | 2008/11/03 | [
"https://Stackoverflow.com/questions/258729",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12860/"
] |
258,735 | <p>I am using this command:</p>
<p>cut -d: -f2
<p>To sort and reedit text, Is there a more efficient way to do this without using sed or awk?</p>
<p>I would also like to know how I would append a period to the end of each field</p>
<p>At the moment the output is like $x['s'] and I would like it to be $x['s'] .</p>... | [
{
"answer_id": 258787,
"author": "dmckee --- ex-moderator kitten",
"author_id": 2509,
"author_profile": "https://Stackoverflow.com/users/2509",
"pm_score": 2,
"selected": true,
"text": "cut perl sed awk"
}
] | 2008/11/03 | [
"https://Stackoverflow.com/questions/258735",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1246613/"
] |
258,738 | <p>I have a Java maven project which includes XSLT transformations. I load the stylesheet as follows:</p>
<pre><code>TransformerFactory tFactory = TransformerFactory.newInstance();
DocumentBuilderFactory dFactory = DocumentBuilderFactory
.newInstance();
dFactory.setNamespaceAware(true);
DocumentBuil... | [
{
"answer_id": 258951,
"author": "will",
"author_id": 8633,
"author_profile": "https://Stackoverflow.com/users/8633",
"pm_score": 5,
"selected": true,
"text": "class MyURIResolver implements URIResolver {\n@Override\npublic Source resolve(String href, String base) throws TransformerExcep... | 2008/11/03 | [
"https://Stackoverflow.com/questions/258738",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8633/"
] |
258,742 | <p>This is hopefully a simple question: I have an OpenGL texture and would like to be able to change its opacity, how do I do that? The texture already has an alpha channel and blending works fine, but I want to be able to decrease the opacity of the whole texture, to fade it into the background. I have fiddled with <c... | [
{
"answer_id": 258848,
"author": "Dan",
"author_id": 11606,
"author_profile": "https://Stackoverflow.com/users/11606",
"pm_score": 4,
"selected": false,
"text": "// R, G, B, A\nglColor4f(1.0, 1.0, 1.0, 0.5);\n"
},
{
"answer_id": 258941,
"author": "mstrobl",
... | 2008/11/03 | [
"https://Stackoverflow.com/questions/258742",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17279/"
] |
258,746 | <p>I am working with a huge list of URL's. Just a quick question I have trying to slice a part of the URL out, see below:</p>
<pre><code>http://www.domainname.com/page?CONTENT_ITEM_ID=1234&param2&param3
</code></pre>
<p>How could I slice out:</p>
<pre><code>http://www.domainname.com/page?CONTENT_ITEM_ID=1234... | [
{
"answer_id": 258797,
"author": "RailsSon",
"author_id": 30786,
"author_profile": "https://Stackoverflow.com/users/30786",
"pm_score": 1,
"selected": false,
"text": "url = \"http://www.domainname.com/page?CONTENT_ITEM_ID=1234¶m2¶m3\"\nurl = url[: url.find(\"&\")]\nprint url\n'ht... | 2008/11/03 | [
"https://Stackoverflow.com/questions/258746",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/30786/"
] |
258,757 | <p>How do I escape a string in SQL Server's stored procedure so that it is safe to use in <code>LIKE</code> expression.</p>
<p>Suppose I have an <code>NVARCHAR</code> variable like so:</p>
<pre><code>declare @myString NVARCHAR(100);
</code></pre>
<p>And I want to use it in a <code>LIKE</code> expression:</p>
<pre><... | [
{
"answer_id": 258808,
"author": "Vincent Ramdhanie",
"author_id": 27439,
"author_profile": "https://Stackoverflow.com/users/27439",
"pm_score": 2,
"selected": false,
"text": "select * from table where myfield like '%10%%'.\n select * from table where myfield like '%10!%%' ESCAPE '!'\n"
... | 2008/11/03 | [
"https://Stackoverflow.com/questions/258757",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
258,762 | <p>Is there a way in .NET 2.0 (C#) to serialize object like you do using XmlSerializer in a simple / customizable human readable format thats for instance looks like <a href="http://community.moertel.com/pxsl/" rel="noreferrer">PXLS</a> or JSON?
Also I know that XML is human readable, I'm looking for something with les... | [
{
"answer_id": 258876,
"author": "ullmark",
"author_id": 23044,
"author_profile": "https://Stackoverflow.com/users/23044",
"pm_score": 4,
"selected": true,
"text": "public static string ToJson(IEnumerable collection)\n {\n DataContractJsonSerializer ser = new DataContra... | 2008/11/03 | [
"https://Stackoverflow.com/questions/258762",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/25782/"
] |
258,767 | <p>I am using <strong>0.97-pre-SVN-unknown</strong> release of Django.</p>
<p>I have a model for which I have not given any primary_key. Django, consequently, automatically provides an AutoField that is called "id". Everything's fine with that. But now, I have to change the "verbose_name" of that Au... | [
{
"answer_id": 259027,
"author": "Justin Voss",
"author_id": 5616,
"author_profile": "https://Stackoverflow.com/users/5616",
"pm_score": 2,
"selected": false,
"text": "manage.py db_column 'id' dumpdata loaddata"
},
{
"answer_id": 259077,
"author": "Alex Koshelev",
"author... | 2008/11/03 | [
"https://Stackoverflow.com/questions/258767",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/23191/"
] |
258,775 | <p>With SQLAlchemy, is there a way to know beforehand whether a relation would be lazy-loaded?<br>
For example, given a lazy parent->children relation and an instance X of "parent", I'd like to know if "X.children" is already loaded, without triggering the query.</p>
| [
{
"answer_id": 261191,
"author": "Haes",
"author_id": 4993,
"author_profile": "https://Stackoverflow.com/users/4993",
"pm_score": 4,
"selected": true,
"text": "__dict__"
},
{
"answer_id": 14335831,
"author": "foz",
"author_id": 1671320,
"author_profile": "https://Stac... | 2008/11/03 | [
"https://Stackoverflow.com/questions/258775",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3497/"
] |
258,793 | <p>I need to be able to compare some month names I have in an array.</p>
<p>It would be nice if there were some direct way like:</p>
<pre><code>Month.toInt("January") > Month.toInt("May")
</code></pre>
<p>My Google searching seems to suggest the only way is to write your own method, but this seems like a common e... | [
{
"answer_id": 258828,
"author": "James Curran",
"author_id": 12725,
"author_profile": "https://Stackoverflow.com/users/12725",
"pm_score": 9,
"selected": true,
"text": "DateTime.ParseExact(monthName, \"MMMM\", CultureInfo.CurrentCulture ).Month Dictionary<string, int>"
},
{
"ans... | 2008/11/03 | [
"https://Stackoverflow.com/questions/258793",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/21367/"
] |
258,807 | <p>I've got 2 remote databases as part of a query </p>
<pre><code>select p.ID,p.ProjectCode_VC,p.Name_VC,v.*
FROM [serverB].Projects.dbo.Projects_T p
LEFT JOIN [serverA].SOCON.dbo.vw_PROJECT v on
p.ProjectCode_VC = v.PROJ_CODE
</code></pre>
<p>The problem is that serverA uses collation <code>Latin1_General_BIN</code>... | [
{
"answer_id": 258855,
"author": "Biri",
"author_id": 968,
"author_profile": "https://Stackoverflow.com/users/968",
"pm_score": 4,
"selected": true,
"text": "select \n p.ID,\n p.ProjectCode_VC,\n p.Name_VC,\n v.* \nFROM\n [serverB].Projects.dbo.Projects_T p \n LEFT JOIN [serverA].S... | 2008/11/03 | [
"https://Stackoverflow.com/questions/258807",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2995/"
] |
258,812 | <p>I've created a Silverlight project that produces [something].xap file to package a few silverlight UserControls. I would like to manipulate that .xap file through the use of javascript in the browser to show and hide user controls based upon java script events.</p>
<p>Is it possible to do this?</p>
<p>If so any s... | [
{
"answer_id": 259144,
"author": "Kevin",
"author_id": 2723,
"author_profile": "https://Stackoverflow.com/users/2723",
"pm_score": 1,
"selected": false,
"text": " private Page _page = null;\n private void Application_Startup(object sender, StartupEventArgs e)\n {\n _page ... | 2008/11/03 | [
"https://Stackoverflow.com/questions/258812",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2723/"
] |
258,824 | <p>I have a window which overrides a <code>RadioButton</code>'s <code>ControlTemplate</code> to show a custom control inside of it. Inside the custom control, I have a button's visibility tied to <code>IsMouseOver</code>, which works correctly in showing the button only when the mouse is hovering over the control. Howe... | [
{
"answer_id": 258935,
"author": "DavidN",
"author_id": 33662,
"author_profile": "https://Stackoverflow.com/users/33662",
"pm_score": 2,
"selected": true,
"text": "<ControlTemplate TargetType=\"{x:Type RadioButton}\">\n <WPFTest:TestUC x:Name=\"UC\" />\n <ControlTemplate.Triggers>\... | 2008/11/03 | [
"https://Stackoverflow.com/questions/258824",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/33662/"
] |
258,857 | <p>In C#, how do I set the Identity of a Thread?</p>
<p>For example, if I have Thread MyThread, which is already started, can I change MyThread's Identity?</p>
<p>Or is this not possible?</p>
| [
{
"answer_id": 258884,
"author": "dove",
"author_id": 30913,
"author_profile": "https://Stackoverflow.com/users/30913",
"pm_score": 2,
"selected": false,
"text": "using (new Impersonation())\n{\n // your elevated code\n}\n [PermissionSet(SecurityAction.Demand, Name = \"FullTrust\")]\n... | 2008/11/03 | [
"https://Stackoverflow.com/questions/258857",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7140/"
] |
258,858 | <p>I'm dynamically generating an asp form, and I would like to add the <strong>label</strong> and <strong>input</strong> elements inside a list.</p>
<p>For example, I would like to end up with something like:</p>
<pre><code><ul>
<li><label for="input"/><input id=input"/></li>
</ul>... | [
{
"answer_id": 259043,
"author": "Michael DeLorenzo",
"author_id": 1383003,
"author_profile": "https://Stackoverflow.com/users/1383003",
"pm_score": 0,
"selected": false,
"text": "<asp:Repeater ID=\"rpt\" runat=\"server\">\n <HeaderTemplate>\n <ul>\n </HeaderTemplate>\n <... | 2008/11/03 | [
"https://Stackoverflow.com/questions/258858",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/920/"
] |
258,864 | <p>When an <code>Expression<T></code> is compiled, is the resultant code implicitly cached by the framework? I'm thinking along the lines of the static <code>Regex</code> methods where the framework implicitly compiles and caches the last few regexes.</p>
<p>If compiled <code>Expression<T></code> objects a... | [
{
"answer_id": 258907,
"author": "Marc Gravell",
"author_id": 23354,
"author_profile": "https://Stackoverflow.com/users/23354",
"pm_score": 5,
"selected": true,
"text": "Delegate Func<...> Action<...> public MyResultType DoSomething(int arg1, int arg2)\n{\n var result = invokeHandler(... | 2008/11/03 | [
"https://Stackoverflow.com/questions/258864",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/30321/"
] |
258,871 | <p>I want to find in a vector of Object pointers for a matching object. Here's a sample code to illustrate my problem:</p>
<pre><code>class A {
public:
A(string a):_a(a) {}
bool operator==(const A& p) {
return p._a == _a;
}
private:
string _a;
};
vector<A*> va;
va.push_back(new A... | [
{
"answer_id": 258913,
"author": "James Hopkin",
"author_id": 11828,
"author_profile": "https://Stackoverflow.com/users/11828",
"pm_score": 5,
"selected": true,
"text": "template <typename T>\nstruct pointer_values_equal\n{\n const T* to_find;\n\n bool operator()(const T* other) co... | 2008/11/03 | [
"https://Stackoverflow.com/questions/258871",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/28161/"
] |
258,875 | <p>I was looking into using some .NET code from within a Delphi program, I will need to make my program extensible using .net assemblies and predefined functions (I already support regular DLLs).</p>
<p>After a lot of searching online, I found <a href="http://www.managed-vcl.com/" rel="noreferrer">Managed-VCL</a>, bu... | [
{
"answer_id": 301263,
"author": "Stefan Schultze",
"author_id": 6358,
"author_profile": "https://Stackoverflow.com/users/6358",
"pm_score": 4,
"selected": true,
"text": " TJclClrHost = class(TJclClrBase, ICorRuntimeHost)\n private\n FDefaultInterface: ICorRuntimeHost;\n FAppDoma... | 2008/11/03 | [
"https://Stackoverflow.com/questions/258875",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/25544/"
] |
258,877 | <p>I am trying to render a user control into a string. The application is set up to enable user to use tokens and user controls are rendered where the tokens are found.</p>
<pre><code>StringBuilder sb = new StringBuilder();
StringWriter sw = new StringWriter(sb);
HtmlTextWriter writer = new HtmlTextWriter(sw);
Contr... | [
{
"answer_id": 259791,
"author": "Hauge",
"author_id": 17368,
"author_profile": "https://Stackoverflow.com/users/17368",
"pm_score": 5,
"selected": true,
"text": "public class ViewManager\n{\n public static string RenderView(string path, object data)\n {\n Page pageHolder = ... | 2008/11/03 | [
"https://Stackoverflow.com/questions/258877",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12252/"
] |
258,883 | <p>I've got an unusual situation: I'm using a Linux system in an embedded situation (Intel box, currently using a 2.6.20 kernel.) which has to communicate with an embedded system that has a partially broken TCP implementation. As near as I can tell right now they expect each message from us to come in a separate Ethern... | [
{
"answer_id": 259527,
"author": "Steve Baker",
"author_id": 13566,
"author_profile": "https://Stackoverflow.com/users/13566",
"pm_score": -1,
"selected": false,
"text": "echo 1 > /proc/sys/net/ipv4/tcp_low_latency\n"
}
] | 2008/11/03 | [
"https://Stackoverflow.com/questions/258883",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5801/"
] |
258,908 | <p>I'm trying to find a way to determine how many parameters a constructor has.</p>
<p>Now I've built one constructor with no parameters and 1 constructor with 4 parameters.</p>
<p>Is there, in C#, a way to find out how many parameters a used or given constructor has?</p>
<p>Thing is, I'm using a third constructor t... | [
{
"answer_id": 258921,
"author": "Kibbee",
"author_id": 1862,
"author_profile": "https://Stackoverflow.com/users/1862",
"pm_score": 3,
"selected": true,
"text": " System.Type.GetType(\"MYClassName\").GetConstructors()\n"
}
] | 2008/11/03 | [
"https://Stackoverflow.com/questions/258908",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11795/"
] |
258,917 | <p>I have a problem applying the <code>DebuggerDisplay</code> attribute on a generic class:</p>
<pre><code>[DebuggerDisplay("--foo--")]
class Foo
{
}
[DebuggerDisplay("Bar: {t}")]
class Bar<T>
{
public T t;
}
</code></pre>
<p>When inspecting an object of type <code>Bar<Foo></code> I would expect it t... | [
{
"answer_id": 32602031,
"author": "Ofir",
"author_id": 595859,
"author_profile": "https://Stackoverflow.com/users/595859",
"pm_score": 3,
"selected": false,
"text": "[DebuggerDisplay(\"Bar<{typeof(T).Name,nq}>\")]//nq - no quotes"
}
] | 2008/11/03 | [
"https://Stackoverflow.com/questions/258917",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/31890/"
] |
258,954 | <p>Java is nearing version 7. It occurs to me that there must be plenty of textbooks and training manuals kicking around that teach methods based on older versions of Java, where the methods taught, would have far better solutions now.</p>
<p>What are some boilerplate code situations, especially ones that you see peop... | [
{
"answer_id": 258956,
"author": "Elie",
"author_id": 23249,
"author_profile": "https://Stackoverflow.com/users/23249",
"pm_score": 5,
"selected": false,
"text": "List l = someList;\nIterator i = l.getIterator();\nwhile (i.hasNext()) {\n MyObject o = (MyObject)i.next();\n}\n List<MyOb... | 2008/11/03 | [
"https://Stackoverflow.com/questions/258954",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4857/"
] |
258,960 | <p>Is there a way for me to serialize an object in .NET without the XML Namespaces automatically serializing also? It seems that by default .NET believes the XSI and XSD namespaces should be included, but I don't want them there.</p>
| [
{
"answer_id": 258974,
"author": "Wes P",
"author_id": 13611,
"author_profile": "https://Stackoverflow.com/users/13611",
"pm_score": 8,
"selected": true,
"text": "obj Dim xs As New XmlSerializer(GetType(cEmploymentDetail))\nDim ns As New XmlSerializerNamespaces()\nns.Add(\"\", \"\")\n\nD... | 2008/11/03 | [
"https://Stackoverflow.com/questions/258960",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13611/"
] |
258,968 | <p>Just wondering what the difference between MFC control messages prefixed with the following is:</p>
<pre><code>LVN (e.g. LVN_ITEMCHANGED)
HDN (e.g. HDN_TRACK)
NM (e.g. NM_HOVER)
</code></pre>
<p>Also, I am using a ListControl and trapping when the user clicks on an item using the NM_CLICK message. I also want to t... | [
{
"answer_id": 259057,
"author": "peterchen",
"author_id": 31317,
"author_profile": "https://Stackoverflow.com/users/31317",
"pm_score": 3,
"selected": true,
"text": "NMLISTVIEW & nm = *(NMLISTVIEW *) pnmh;\nif ( (nm.uNewState ^ nm.uOldState) & LVIS_SELECTED) \n{ \n // nm.iItem wa... | 2008/11/03 | [
"https://Stackoverflow.com/questions/258968",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18664/"
] |
258,988 | <p>I'm <a href="http://channel9.msdn.com/shows/Going+Deep/Inside-C-40-dynamic-type-optional-parameters-more-COM-friendly/" rel="noreferrer">listening to a talk</a> about <strong>C#4</strong>'s <code>dynamic</code> keyword and I'm wondering... Will this feature be orthogonal to other .NET features, for example will it s... | [
{
"answer_id": 1822926,
"author": "Ian Warburton",
"author_id": 221683,
"author_profile": "https://Stackoverflow.com/users/221683",
"pm_score": 2,
"selected": false,
"text": "public static class StrExtension\n{\n public static string twice(this string str) { return str + str; }\n}\n\n.... | 2008/11/03 | [
"https://Stackoverflow.com/questions/258988",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3848/"
] |
259,000 | <p>I have a system which is using phone numbers as unique identifiers. For this reason, I want to format all phone numbers as they come in using a normalized format. Because I have no control over my source data, I need to parse out these numbers myself and format them before adding them to my DB.</p>
<p>I'm about to ... | [
{
"answer_id": 259016,
"author": "Joel Coehoorn",
"author_id": 3043,
"author_profile": "https://Stackoverflow.com/users/3043",
"pm_score": 1,
"selected": false,
"text": "[^\\d]"
},
{
"answer_id": 9137831,
"author": "friism",
"author_id": 2942,
"author_profile": "https... | 2008/11/03 | [
"https://Stackoverflow.com/questions/259000",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/392/"
] |
259,014 | <p>I'm reading up on event-driven design. I am having trouble getting my head around some of it in practice. I'm considering using this for a windows service that monitors, parses, and handles information coming from a 3rd party TCP stream. Is the following a decent approach, or am I missing something? </p>
<p>My p... | [
{
"answer_id": 259016,
"author": "Joel Coehoorn",
"author_id": 3043,
"author_profile": "https://Stackoverflow.com/users/3043",
"pm_score": 1,
"selected": false,
"text": "[^\\d]"
},
{
"answer_id": 9137831,
"author": "friism",
"author_id": 2942,
"author_profile": "https... | 2008/11/03 | [
"https://Stackoverflow.com/questions/259014",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
259,015 | <p>Can every possible value of a <code>float</code> variable can be represented exactly in a <code>double</code> variable?</p>
<p>In other words, for all possible values <code>X</code> will the following be successful:</p>
<pre><code>float f1 = X;
double d = f1;
float f2 = (float)d;
if(f1 == f2)
System.out.println... | [
{
"answer_id": 259113,
"author": "dmckee --- ex-moderator kitten",
"author_id": 2509,
"author_profile": "https://Stackoverflow.com/users/2509",
"pm_score": 0,
"selected": false,
"text": "NaN"
},
{
"answer_id": 259130,
"author": "Ryan",
"author_id": 29762,
"author_prof... | 2008/11/03 | [
"https://Stackoverflow.com/questions/259015",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18511/"
] |
259,018 | <p>This is what I have written:</p>
<pre><code>if ((lstProperty[i].PropertyIdentifier as string).CompareTo("Name") == 0)
</code></pre>
<p>Resharper put me an error (I am new with ReSharper... I am trying it) and it suggests me :</p>
<pre><code> if (((string) lstProperty[i].PropertyIdentifier).CompareTo("Name") == 0... | [
{
"answer_id": 259062,
"author": "jonnii",
"author_id": 4590,
"author_profile": "https://Stackoverflow.com/users/4590",
"pm_score": 4,
"selected": true,
"text": "string propertyIdentifier = lstProperty[u].PropertyIdentifier as string;\nif(propertyIdentifier != null && propertyIdentifier.... | 2008/11/03 | [
"https://Stackoverflow.com/questions/259018",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13913/"
] |
259,026 | <p>Why was C# designed this way?</p>
<p>As I understand it, an interface only describes behaviour, and serves the purpose of describing a contractual obligation for classes implementing the interface that certain behaviour is implemented.</p>
<p>If classes wish to implement that behavour in a shared method, why shoul... | [
{
"answer_id": 259042,
"author": "James Curran",
"author_id": 12725,
"author_profile": "https://Stackoverflow.com/users/12725",
"pm_score": 4,
"selected": false,
"text": "IMyInterface val = GetObjectImplementingIMyInterface();\nval.SomeThingDefinedinInterface();\n"
},
{
"answer_i... | 2008/11/03 | [
"https://Stackoverflow.com/questions/259026",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11514/"
] |
259,031 | <p>Consider that I have a transaction:</p>
<pre><code>BEGIN TRANSACTION
DECLARE MONEY @amount
SELECT Amount AS @amount
FROM Deposits
WHERE UserId = 123
UPDATE Deposits
SET Amount = @amount + 100.0
WHERE UserId = 123
COMMIT
</code></pre>
<p>And it gets executed on 2 threads, in the order:</p>
<ol>
<li>thread ... | [
{
"answer_id": 259399,
"author": "Michael Haren",
"author_id": 29,
"author_profile": "https://Stackoverflow.com/users/29",
"pm_score": 1,
"selected": false,
"text": "BEGIN TRANSACTION\nDECLARE MONEY @amount\nSELECT Amount AS @amount\n FROM Deposits\n WHERE UserId = 123\nUPDATE Deposits... | 2008/11/03 | [
"https://Stackoverflow.com/questions/259031",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6176/"
] |
259,039 | <p>I've written a paged search stored procedure using SQL Server 2005. It takes a number of parameters and the search criteria is moderately complex.</p>
<p>Due to the front-end architecture I need to be able to return the number of results that would come back <strong>without</strong> actually returning the results. ... | [
{
"answer_id": 1709064,
"author": "cloggins",
"author_id": 179026,
"author_profile": "https://Stackoverflow.com/users/179026",
"pm_score": 1,
"selected": false,
"text": "procedure get_sample_results (\n startrow in number default 1,\n numberofrows in number default 10,\n wherecl... | 2008/11/03 | [
"https://Stackoverflow.com/questions/259039",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5696608/"
] |
259,063 | <h3>Problem</h3>
<p>I've got a collection of <code>IThing</code>s and I'd like to create a <code>HierarchicalDataTemplate</code> for a <code>TreeView</code>. The straightforward <code>DataType={x:Type local:IThing}</code> of course doesn't work, probably because the WPF creators didn't want to handle the possible ambi... | [
{
"answer_id": 2565665,
"author": "jing boxian",
"author_id": 307538,
"author_profile": "https://Stackoverflow.com/users/307538",
"pm_score": 2,
"selected": false,
"text": "<TreeView ItemDataTemplate={StaticResource templateKey}/>"
},
{
"answer_id": 9804166,
"author": "Danie... | 2008/11/03 | [
"https://Stackoverflow.com/questions/259063",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4918/"
] |
259,085 | <p>I thought this was asked before, but 15 minutes of searching on Google and the site search didn't turn anything up...so:</p>
<p>Where can I obtain free (as in beer and/or as in speech) dictionary files? I'm mainly interested in English, but if you know of any dictionary files, please point them out.</p>
<p>Note: T... | [
{
"answer_id": 259199,
"author": "warren",
"author_id": 4418,
"author_profile": "https://Stackoverflow.com/users/4418",
"pm_score": 2,
"selected": false,
"text": "/usr/share/dict/words"
}
] | 2008/11/03 | [
"https://Stackoverflow.com/questions/259085",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/572/"
] |
259,091 | <h1>The Problem</h1>
<p>I use a tool at work that lets me do queries and get back HTML tables of info. I do not have any kind of back-end access to it.</p>
<p>A lot of this info would be much more useful if I could put it into a spreadsheet for sorting, averaging, etc. <strong>How can I screen-scrape this data to a CSV... | [
{
"answer_id": 279743,
"author": "Thorvaldur",
"author_id": 35781,
"author_profile": "https://Stackoverflow.com/users/35781",
"pm_score": 4,
"selected": false,
"text": "from BeautifulSoup import BeautifulSoup\nimport urllib,string,csv,sys,os\nfrom string import replace\n\ndate_s = '&date... | 2008/11/03 | [
"https://Stackoverflow.com/questions/259091",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4376/"
] |
259,095 | <p>I am trying to print something at the bottom of a report. I am using a section <code>Pagefooter</code>.<br>
I thought that if you used <code>Pagefooter</code> that it would print at the bottom on the report.</p>
| [
{
"answer_id": 279743,
"author": "Thorvaldur",
"author_id": 35781,
"author_profile": "https://Stackoverflow.com/users/35781",
"pm_score": 4,
"selected": false,
"text": "from BeautifulSoup import BeautifulSoup\nimport urllib,string,csv,sys,os\nfrom string import replace\n\ndate_s = '&date... | 2008/11/03 | [
"https://Stackoverflow.com/questions/259095",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
259,111 | <p>I'm running in a strange issue.
My controller calls a drb object</p>
<pre><code>@request_handler = DRbObject.new(nil, url)
availability_result = @request_handler.fetch_availability(request, @reservation_search, params[:selected_room_rates])
</code></pre>
<p>and this Drb object is making some searches.</p>
<p>but... | [
{
"answer_id": 367394,
"author": "Ripta Pasay",
"author_id": 46227,
"author_profile": "https://Stackoverflow.com/users/46227",
"pm_score": 4,
"selected": true,
"text": "GC.disable"
},
{
"answer_id": 54403314,
"author": "philant",
"author_id": 18804,
"author_profile": ... | 2008/11/03 | [
"https://Stackoverflow.com/questions/259111",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/22083/"
] |
259,123 | <p>My app has a DataGridView object and a List of type MousePos. MousePos is a custom class that holds mouse X,Y coordinates (of type "Point") and a running count of this position. I have a thread (System.Timers.Timer) that raises an event once every second, checks the mouse position, adds and/or updates the count of t... | [
{
"answer_id": 259477,
"author": "Pretzel",
"author_id": 21244,
"author_profile": "https://Stackoverflow.com/users/21244",
"pm_score": 4,
"selected": true,
"text": " dataGridView1.Invalidate();\n dataGridView1.Invalidate(true);\n dataGridView1.Update(); // <== force... | 2008/11/03 | [
"https://Stackoverflow.com/questions/259123",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/21244/"
] |
259,126 | <p>Is there any way to change the entire width of the horizontal scroll bar on a scrolling div (including the nudge arrows and the handle).</p>
<p>EDIT: I only need an IE7 solution - it's for a scrolling DIV on a touch screen terminal</p>
<p>Thanks</p>
<p>Matt</p>
| [
{
"answer_id": 259270,
"author": "scunliffe",
"author_id": 6144,
"author_profile": "https://Stackoverflow.com/users/6144",
"pm_score": 3,
"selected": true,
"text": "<div style=\"zoom:5;font-size:20%;overflow-x:auto;\">\n Hello World! Hello World! Hello World! Hello Wor... | 2008/11/03 | [
"https://Stackoverflow.com/questions/259126",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5185/"
] |
259,139 | <p>Use case:</p>
<ol>
<li>A does something on his box and gots stuck. He asks B (remote) for support.</li>
<li>B logs into the session of A, sees all windows, A was seeing and is able to manipulate the GUI.</li>
</ol>
<p>If A uses Windows it is very convenient to log into a running session e.g. via VNC. But if A uses... | [
{
"answer_id": 259270,
"author": "scunliffe",
"author_id": 6144,
"author_profile": "https://Stackoverflow.com/users/6144",
"pm_score": 3,
"selected": true,
"text": "<div style=\"zoom:5;font-size:20%;overflow-x:auto;\">\n Hello World! Hello World! Hello World! Hello Wor... | 2008/11/03 | [
"https://Stackoverflow.com/questions/259139",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11344/"
] |
259,140 | <p>How do I search the whole classpath for an annotated class?</p>
<p>I'm doing a library and I want to allow the users to annotate their classes, so when the Web application starts I need to scan the whole classpath for certain annotation.</p>
<p>I'm thinking about something like the new functionality for Java EE 5 We... | [
{
"answer_id": 1415338,
"author": "Arthur Ronald",
"author_id": 127359,
"author_profile": "https://Stackoverflow.com/users/127359",
"pm_score": 9,
"selected": true,
"text": "ClassPathScanningCandidateComponentProvider scanner =\nnew ClassPathScanningCandidateComponentProvider(<DO_YOU_WAN... | 2008/11/03 | [
"https://Stackoverflow.com/questions/259140",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2937/"
] |
259,147 | <p>I'm using <a href="http://urlrewriter.net/" rel="nofollow noreferrer">http://urlrewriter.net/</a> to rewrite urls at my website. For example, I'm rewriting:</p>
<blockquote>
<p><a href="http://www.example.com/schedule.aspx?state=ca" rel="nofollow noreferrer">http://www.example.com/schedule.aspx?state=ca</a></p>
<... | [
{
"answer_id": 259175,
"author": "jonnii",
"author_id": 4590,
"author_profile": "https://Stackoverflow.com/users/4590",
"pm_score": 2,
"selected": false,
"text": "<add header=\"X-WasRewritten\" value=\"true\" />\n"
},
{
"answer_id": 259177,
"author": "TheSmurf",
"author_i... | 2008/11/03 | [
"https://Stackoverflow.com/questions/259147",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/28260/"
] |
259,150 | <p>I have an incoming soap message wich form is TStream (Delphi7), server that send this soap is in development mode and adds a html header to the message for debugging purposes. Now i need to cut out the html header part from it before i can pass it to soap converter. It starts from the beginning with 'pre' tag and en... | [
{
"answer_id": 259700,
"author": "skamradt",
"author_id": 9217,
"author_profile": "https://Stackoverflow.com/users/9217",
"pm_score": 2,
"selected": true,
"text": "function DepreStream(Stm : tStream):tStream;\nvar\n sTemp : String;\n oStrStm : tStringStream;\n i : integer;\nbegin\n o... | 2008/11/03 | [
"https://Stackoverflow.com/questions/259150",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/26207/"
] |
259,166 | <p>I'm looking for a good open source Windows FTP client library with a public domain or BSD-type license. Something that I have access to the source code and I can use it from C++ for Windows applications in a commercial app.</p>
<p>We have used Wininet for years and it's buggy and horrible. The last straw is the I... | [
{
"answer_id": 259220,
"author": "Adam Liss",
"author_id": 29157,
"author_profile": "https://Stackoverflow.com/users/29157",
"pm_score": 1,
"selected": false,
"text": "wget"
}
] | 2008/11/03 | [
"https://Stackoverflow.com/questions/259166",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/24267/"
] |
259,173 | <p>I have a web login page with the standard username password and login button controls. I would like to write a wrapper page that will render and auto fill the username and login form text boxes with a constant and force the onclick event for login button. Any suggestions how to accomplish this?</p>
| [
{
"answer_id": 1068842,
"author": "warren",
"author_id": 4418,
"author_profile": "https://Stackoverflow.com/users/4418",
"pm_score": 0,
"selected": false,
"text": "input demo/demo input"
}
] | 2008/11/03 | [
"https://Stackoverflow.com/questions/259173",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
259,183 | <p>We have an app in AppStore <a href="http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=292436957" rel="nofollow noreferrer">Bust~A~Spook</a> we had an issue with. When you tap the screen we use CALayer to find the position of all the views during their animation and if you hit one we start a die sequ... | [
{
"answer_id": 852599,
"author": "Rob Napier",
"author_id": 97337,
"author_profile": "https://Stackoverflow.com/users/97337",
"pm_score": 1,
"selected": false,
"text": "layer touchesBegan:withEvent: UITouchPhaseBegan hitTest: layer"
},
{
"answer_id": 918646,
"author": "Andrew... | 2008/11/03 | [
"https://Stackoverflow.com/questions/259183",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
259,212 | <p>I am trying to find an algorithm to count from 0 to 2<sup>n</sup>-1 but their bit pattern reversed. I care about only n LSB of a word. As you may have guessed I failed.</p>
<p>For n=3: </p>
<pre><code>000 -> 0
100 -> 4
010 -> 2
110 -> 6
001 -> 1
101 -> 5
011 -> 3
111 -> 7
</code></pre>
<p>... | [
{
"answer_id": 259246,
"author": "Bill K",
"author_id": 12943,
"author_profile": "https://Stackoverflow.com/users/12943",
"pm_score": 2,
"selected": false,
"text": "int incrementBizarre(int initial, int nBits)\n // in the 3 bit example, this should create 100\n mask=2^(nBits-1)\n ... | 2008/11/03 | [
"https://Stackoverflow.com/questions/259212",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7988/"
] |
259,219 | <p>On Linq to SQL's DataContext I am able to call SubmitChanges() to submit all changes.</p>
<p>What I want is to somehow reject all changes in the datacontext and rollback all changes (preferable without going to the database).</p>
<p>Is this possible?</p>
| [
{
"answer_id": 259300,
"author": "David Basarab",
"author_id": 2469,
"author_profile": "https://Stackoverflow.com/users/2469",
"pm_score": 2,
"selected": false,
"text": "dataContext.Refresh(RefreshMode.OverwriteCurrentValues, someObject);\n"
},
{
"answer_id": 1239649,
"author... | 2008/11/03 | [
"https://Stackoverflow.com/questions/259219",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8547/"
] |
259,234 | <p>How do I run a function on a loop so all the results go straight into a list and is there a way to run a function which acts on all the values in a list?</p>
| [
{
"answer_id": 259259,
"author": "Vinko Vrsalovic",
"author_id": 5190,
"author_profile": "https://Stackoverflow.com/users/5190",
"pm_score": 0,
"selected": false,
"text": ">>> def square(x):\n... return x*x\n...\n>>> a = [1,2,3,4,5,6,7,8,9]\n\n>>> map(square,a)\n[1, 4, 9, 16, 25, 36, 49... | 2008/11/03 | [
"https://Stackoverflow.com/questions/259234",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/33061/"
] |
259,240 | <p>I'm just getting back into C++ after a couple of years of doing a lot of C#, and recently Objective C.</p>
<p>One thing I've done before is to roll my own iterator adapter for std::map that will deref to just the value part, rather than the key-value pair. This is quite a common and natural thing to do. C# provides... | [
{
"answer_id": 259377,
"author": "David Nehme",
"author_id": 14167,
"author_profile": "https://Stackoverflow.com/users/14167",
"pm_score": 5,
"selected": true,
"text": "template<typename T1, typename T2> T2& take_second(const std::pair<T1, T2> &a_pair) \n{\n return a_pair.second;\n}\n\n... | 2008/11/03 | [
"https://Stackoverflow.com/questions/259240",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/32136/"
] |
259,248 | <p>I would like to include a different file depending on the version of GCC. More precisely I want to write:</p>
<pre><code>#if GCC_VERSION >= 4.2
# include <unordered_map>
# define EXT std
#elif GCC_VERSION >= 4
# include <tr1/unordered_map>
# define EXT std
#else
# include <ext/hash_map>... | [
{
"answer_id": 259277,
"author": "luke",
"author_id": 16434,
"author_profile": "https://Stackoverflow.com/users/16434",
"pm_score": 6,
"selected": false,
"text": "__GNUC__ // major\n__GNUC_MINOR__ // minor\n__GNUC_PATCHLEVEL__ // patch\n"
},
{
"answer_id": 2... | 2008/11/03 | [
"https://Stackoverflow.com/questions/259248",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7136/"
] |
259,253 | <p>What are the API calls to copy a file that is currently locked. I'm hoping to be able to use .Net, but Win32 calls would be fine as well. </p>
<p>Please feel free to chime in about the same functionality on Unix, or any other OS.</p>
| [
{
"answer_id": 259262,
"author": "CesarB",
"author_id": 28258,
"author_profile": "https://Stackoverflow.com/users/28258",
"pm_score": 3,
"selected": false,
"text": "MoveFileEx MOVEFILE_DELAY_UNTIL_REBOOT"
}
] | 2008/11/03 | [
"https://Stackoverflow.com/questions/259253",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/415/"
] |
259,269 | <p>I have a loop that reads each line in a file using <code>getline()</code>:</p>
<pre><code>istream is;
string line;
while (!getline(is, line).eof())
{
// ...
}
</code></pre>
<p>I noticed that calling <code>getline()</code> like this also seems to work:</p>
<pre><code>while (getline(is, line))
</code></pre>
<p... | [
{
"answer_id": 259286,
"author": "Charles Anderson",
"author_id": 11677,
"author_profile": "https://Stackoverflow.com/users/11677",
"pm_score": 6,
"selected": true,
"text": "istream getline() void*() eof()"
},
{
"answer_id": 259430,
"author": "Luc Hermitte",
"author_id": ... | 2008/11/03 | [
"https://Stackoverflow.com/questions/259269",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4086/"
] |
259,290 | <p><a href="http://biochrom.fivesite.co.uk/catalogue4.asp" rel="nofollow noreferrer">http://biochrom.fivesite.co.uk/catalogue4.asp</a></p>
<p>On the page above there is an image floated to the left. To the right of it is a list, titled "features". The list items have a background image, however, it isn't appearing. Li... | [
{
"answer_id": 259305,
"author": "Aron Rotteveel",
"author_id": 11568,
"author_profile": "https://Stackoverflow.com/users/11568",
"pm_score": 3,
"selected": true,
"text": "margin-left:200px;\n clear:both\n"
},
{
"answer_id": 1907977,
"author": "Helping Others",
"author_id... | 2008/11/03 | [
"https://Stackoverflow.com/questions/259290",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10023/"
] |
259,293 | <p>WPF's view model oriented way of doing things makes it very tempting to just use business objects in the UI. Have you seen any issues with this? Why or why wouldn't you do this?</p>
| [
{
"answer_id": 259405,
"author": "Ryan Lundy",
"author_id": 5486,
"author_profile": "https://Stackoverflow.com/users/5486",
"pm_score": 2,
"selected": false,
"text": "ToString DataTemplate IValueConverter"
},
{
"answer_id": 259555,
"author": "Bogdan Maxim",
"author_id": 2... | 2008/11/03 | [
"https://Stackoverflow.com/questions/259293",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9401/"
] |
259,297 | <p>I have an array of values that is passed to my function from a different part of the program that I need to store for later processing. Since I don't know how many times my function will be called before it is time to process the data, I need a dynamic storage structure, so I chose a <code>std::vector</code>. I do... | [
{
"answer_id": 259312,
"author": "bsruth",
"author_id": 23504,
"author_profile": "https://Stackoverflow.com/users/23504",
"pm_score": 4,
"selected": false,
"text": "int foo(int* data, int size)\n{\n static std::vector<int> my_data; //normally a class variable\n std::copy(data, data +... | 2008/11/03 | [
"https://Stackoverflow.com/questions/259297",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/23504/"
] |
259,309 | <p>Is there a way using JSF to group two or more columns under a single parent column in JSF? I have a dataTableEx with hx:columnEx columns inside of it. What I want is something like this:</p>
<pre><code> [MAIN HEADER FOR COL1+2 ][Header for Col 3+4]
[ COL1 Header][COL2 Header][COL3 ][COL 4 ]
Data ... | [
{
"answer_id": 265964,
"author": "McDowell",
"author_id": 304,
"author_profile": "https://Stackoverflow.com/users/304",
"pm_score": 2,
"selected": true,
"text": "<style type=\"text/css\">\n.colstyle {\n width: 25%\n}\n</style>\n</head>\n<body>\n\n<f:view>\n <h:dataTable border=\"1\... | 2008/11/03 | [
"https://Stackoverflow.com/questions/259309",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/32812/"
] |
259,311 | <p>I am working in Visual Studio 2008 on an ASP.NET application, which has been deployed to a test server. I would like to make a build without debug information to place in production, but the configuration manager only shows "Debug" in the configuration dropdown for my project.</p>
<p>My other Visual Studio project... | [
{
"answer_id": 260921,
"author": "sliderhouserules",
"author_id": 31385,
"author_profile": "https://Stackoverflow.com/users/31385",
"pm_score": 0,
"selected": false,
"text": "GlobalSection(SolutionConfigurationPlatforms) = preSolution\n Debug|Any CPU = Debug|Any CPU\n Release|Any C... | 2008/11/03 | [
"https://Stackoverflow.com/questions/259311",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/21253/"
] |
259,320 | <p>I'm still learning Grails and seem to have hit a stumbling block.</p>
<p><strong>Here are the 2 domain classes:</strong></p>
<pre><code>class Photo {
byte[] file
static belongsTo = Profile
}
class Profile {
String fullName
Set photos
static hasMany = [photos:Photo]
}
</code></pre>
<p... | [
{
"answer_id": 259361,
"author": "Hates_",
"author_id": 3410,
"author_profile": "https://Stackoverflow.com/users/3410",
"pm_score": 3,
"selected": true,
"text": "profileInstance.photos.toArray()[0].id\n profileInstance.photos.iterator().next()\n"
},
{
"answer_id": 260022,
"au... | 2008/11/03 | [
"https://Stackoverflow.com/questions/259320",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/27163/"
] |
259,330 | <p>I've been adding css support for <strong>handheld</strong> to my website but haven't been able to find a good tool for testing. </p>
<p>I tried using the webdeveloper plugin for Firefox but it doesn't work for me. Maybe that is because all my css is in the html and not a seperate css file.</p>
<p>Are there any oth... | [
{
"answer_id": 996820,
"author": "ilya n.",
"author_id": 115200,
"author_profile": "https://Stackoverflow.com/users/115200",
"pm_score": 3,
"selected": false,
"text": " @media handheld, screen and (max-width: 500px) { /* your css */ }\n"
},
{
"answer_id": 6344160,
"author"... | 2008/11/03 | [
"https://Stackoverflow.com/questions/259330",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13676/"
] |
259,343 | <p>Is there any way to reboot the JVM? As in don't actually exit, but close and reload all classes, and run main from the top?</p>
| [
{
"answer_id": 259464,
"author": "Andru Luvisi",
"author_id": 5922,
"author_profile": "https://Stackoverflow.com/users/5922",
"pm_score": 5,
"selected": true,
"text": "#!/bin/sh\nwhile true\ndo\n java MainClass\ndone\n #!/bin/sh\nSTATUS=0\nwhile [ $STATUS -eq 0 ]\ndo\n java MainCla... | 2008/11/03 | [
"https://Stackoverflow.com/questions/259343",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/420/"
] |
259,354 | <p>Is there a substitute in emacs for the vi "gf" command?
meaning try to open the file which is under the cursor right now
if a real file name is in fact there.</p>
<p>Thanks</p>
| [
{
"answer_id": 259376,
"author": "cjm",
"author_id": 8355,
"author_profile": "https://Stackoverflow.com/users/8355",
"pm_score": 7,
"selected": true,
"text": "find-file-at-point ffap M-x ffap\n .emacs (ffap-bindings)\n find-file C-x C-f ffap ffap.el"
},
{
"answer_id": 261257,
... | 2008/11/03 | [
"https://Stackoverflow.com/questions/259354",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/33707/"
] |
259,355 | <blockquote>
<p>It turns out this whole misunderstanding of the open() versus fopen() stems from a buggy I2C driver in the Linux 2.6.14 kernel on an ARM. Backporting a working bit bashed driver solved the root cause of the problem I was trying to address here.</p>
</blockquote>
<p>I'm trying to figure out an issue ... | [
{
"answer_id": 259370,
"author": "Alnitak",
"author_id": 6782,
"author_profile": "https://Stackoverflow.com/users/6782",
"pm_score": 6,
"selected": true,
"text": "fileno() stdio <stdio.h> write() stdio open() read() write() int fd = open(\"/dev/i2c\", O_RDWR);\nioctl(fd, IOCTL_COMMAND, a... | 2008/11/03 | [
"https://Stackoverflow.com/questions/259355",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/32836/"
] |
259,364 | <p>I'm using Emacs with <a href="http://mfgames.com/linux/csharp-mode" rel="nofollow noreferrer">C# Mode</a> and when I turn on the speedbar, no files show up by default. I can choose "show all files" on the speedbar mode, but then every .cs file shows up with a '[?]' next to the name. How do I properly configure s... | [
{
"answer_id": 425847,
"author": "user9252",
"author_id": 9252,
"author_profile": "https://Stackoverflow.com/users/9252",
"pm_score": 3,
"selected": true,
"text": " (speedbar-add-supported-extension \".cs\")\n (add-to-list 'speedbar-fetch-etags-parse-list\n '(\"\\\\.cs\" .... | 2008/11/03 | [
"https://Stackoverflow.com/questions/259364",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6180/"
] |
259,369 | <p>I want to be able to rewrite a URL from:</p>
<pre><code>// examples
http://example.com/location/New York, NY -->
http://example.com/location/index.html?location=New York, NY
http://example.com/location/90210 -->
http://example.com/location/index.html?location=90210
http://example.com/location/Texas -->... | [
{
"answer_id": 259406,
"author": "Piskvor left the building",
"author_id": 19746,
"author_profile": "https://Stackoverflow.com/users/19746",
"pm_score": 2,
"selected": false,
"text": "RewriteEngine on\nRewriteCond %{REQUEST_URI} !location/index.html [NC]\nRewriteRule ^location/(.*)$ /loc... | 2008/11/03 | [
"https://Stackoverflow.com/questions/259369",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/33554/"
] |
259,382 | <p>I'm a bit confused about how MVC works and I can't find anything but basic examples.</p>
<p>I want to make a kind of widget-based design; you can choose various widgets to go on your page. Each widget should be responsible for itself - it should have a controller and a view. But what about the main page? Sudden... | [
{
"answer_id": 267748,
"author": "Jamey McElveen",
"author_id": 30099,
"author_profile": "https://Stackoverflow.com/users/30099",
"pm_score": 0,
"selected": false,
"text": "<script type=\"text/javascript\">\n function OnFailure(error) {\n alert(\"We have encounterd an error \" ... | 2008/11/03 | [
"https://Stackoverflow.com/questions/259382",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/24181/"
] |
259,385 | <p>What end-user clients (not libraries) expose <a href="http://en.wikipedia.org/wiki/Extensible_Messaging_and_Presence_Protocol" rel="noreferrer">XMPP</a> <a href="http://en.wikipedia.org/wiki/Publish/subscribe#See_also" rel="noreferrer">XEP-0060</a> to users right now?</p>
| [
{
"answer_id": 267748,
"author": "Jamey McElveen",
"author_id": 30099,
"author_profile": "https://Stackoverflow.com/users/30099",
"pm_score": 0,
"selected": false,
"text": "<script type=\"text/javascript\">\n function OnFailure(error) {\n alert(\"We have encounterd an error \" ... | 2008/11/03 | [
"https://Stackoverflow.com/questions/259385",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/32577/"
] |
259,386 | <p>How can I change the <strong>background color</strong> of a <strong>Tab Control</strong>. I changed the forms color, but the tabs stay the same.</p>
<p>Thanks.</p>
| [
{
"answer_id": 259644,
"author": "Fionnuala",
"author_id": 2548,
"author_profile": "https://Stackoverflow.com/users/2548",
"pm_score": 1,
"selected": false,
"text": " Me.NameOfTabControlPage.SetFocus\n Me.NameOfSubformControl.SourceObject = \"NameOfSuitableForm\"\n"
},
{
"answer... | 2008/11/03 | [
"https://Stackoverflow.com/questions/259386",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15884/"
] |
259,389 | <p>On a Linux box, the common interface names look like eth0, eth1, etc. I know how to find at least one IP address using <code>gethostbyname</code> or similar functions, but I don't know any way to specify which named interface I want the IP address of. I could use ifconfig and parse the output, but shelling out for t... | [
{
"answer_id": 259422,
"author": "Paweł Hajdan",
"author_id": 9403,
"author_profile": "https://Stackoverflow.com/users/9403",
"pm_score": 2,
"selected": false,
"text": "ifconfig eth0 | grep 'inet addr' | sed -e 's/:/ /' | awk '{print $3}'\n ifconfig | egrep '^[^ ]' | awk '{print $1}'\n f... | 2008/11/03 | [
"https://Stackoverflow.com/questions/259389",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/26286/"
] |
259,390 | <p>One of the many quirks of Reporting Services we've run across is the complete and utter lack of a CheckBox control or even something remotely similar.</p>
<p>We have a form that should appear automatically filled out based on information pulled from a database. We have several bit datatype fields. Printing out "T... | [
{
"answer_id": 12873012,
"author": "Valentino Vranken",
"author_id": 316194,
"author_profile": "https://Stackoverflow.com/users/316194",
"pm_score": 4,
"selected": false,
"text": "=Switch(\n IsNothing(Fields!YourBoolean.Value), 50,\n Fields!YourBoolean.Value = False, 0,\n Fields... | 2008/11/03 | [
"https://Stackoverflow.com/questions/259390",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7290/"
] |
259,398 | <p>Sometimes while developing in Visual Studio IDE, when you use "Find in Files" dialog to find something, the search fails and you will see the following message in the "Find Results" window. </p>
<blockquote>
<p>No files were found to look in. Find stopped progress</p>
</blockquote>
<p>Once this message shows up... | [
{
"answer_id": 2958188,
"author": "Sandor Drieënhuizen",
"author_id": 198990,
"author_profile": "https://Stackoverflow.com/users/198990",
"pm_score": 4,
"selected": false,
"text": "MyComputer\\HKEY_CURRENT_USER\\Software\\Microsoft\\VisualStudio\\[VS VERSION NUMBER]\\Find\n"
}
] | 2008/11/03 | [
"https://Stackoverflow.com/questions/259398",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/16470/"
] |
259,409 | <p>I have a requirement to develop a .NET-based application whose data requirements are likely to exceed the 4 gig limit of SQL 2005 Express Edition.</p>
<p>There may be other customers of the same application (in the future) with a requirement to use a specific DB platform (such as Oracle or SQL Server) due to in-hous... | [
{
"answer_id": 259517,
"author": "aaimnr",
"author_id": 26444,
"author_profile": "https://Stackoverflow.com/users/26444",
"pm_score": 2,
"selected": false,
"text": "[Generator( Class = \"native\")]\n//...\npublic virtual int CustomerId {get; set; }\n"
}
] | 2008/11/03 | [
"https://Stackoverflow.com/questions/259409",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
259,415 | <p>When I changed the rankdir of my graph from LR to TD, my record nodes also changed their layout direction so they no longer look like a 'record'. I tried applying a separate rankdir to the nodes, but this had no effect.</p>
<p>How does one keep the record nodes with the correct layout?</p>
<pre><code>digraph sampl... | [
{
"answer_id": 259535,
"author": "ADEpt",
"author_id": 10105,
"author_profile": "https://Stackoverflow.com/users/10105",
"pm_score": 5,
"selected": true,
"text": "digraph sample { graph [rankdir=TD]; node [shape=record];\n\nA [label=\"{ShouldBeTop | ShouldBeBottom}\"]; \nB [label=\"{Top ... | 2008/11/03 | [
"https://Stackoverflow.com/questions/259415",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/32973/"
] |
259,416 | <p>Does Ruby have a stepwise debugger, similar to Perl's "perl -d"?</p>
| [
{
"answer_id": 259437,
"author": "jcoby",
"author_id": 2884,
"author_profile": "https://Stackoverflow.com/users/2884",
"pm_score": 3,
"selected": false,
"text": "-x --trace set linetrace"
},
{
"answer_id": 1344838,
"author": "Kevin",
"author_id": 114614,
"author_profi... | 2008/11/03 | [
"https://Stackoverflow.com/questions/259416",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8913/"
] |
259,428 | <p>I have a source XML file that is used to create C# files that are then compiled as part of a project.<br>
Currently I have a BeforeBuild target that runs my XML to C# converter.<br>
The problem is that by the time the BeforeBuild step is run the old files appear to have been stored by the build system so the new fil... | [
{
"answer_id": 259459,
"author": "Quibblesome",
"author_id": 1143,
"author_profile": "https://Stackoverflow.com/users/1143",
"pm_score": 0,
"selected": false,
"text": "del \"$(ProjectDir)MyCsFile.cs\"\ncopy /b /y \"$(ProjectDir)\\MyXmlFile.xml\" \"$(TargetDir)\"\n\"$(ProjectDir)tt.bat\" ... | 2008/11/03 | [
"https://Stackoverflow.com/questions/259428",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3786/"
] |
259,435 | <p>I'm trying to create a jqgrid, but the table is empty. The table renders, but the data doesn't show.</p>
<p>The data I'm getting back from the php call is:</p>
<pre><code>{
"page":"1",
"total":1,
"records":"10",
"rows":[
{"id":"2:1","cell":["1","image","Chief Scout","Highest Award test","0"]},
{"id":"2:2","cell":... | [
{
"answer_id": 711585,
"author": "darren",
"author_id": 51688,
"author_profile": "https://Stackoverflow.com/users/51688",
"pm_score": 0,
"selected": false,
"text": "{\n\"page\":\"1\",\n\"total\":1,\n\"records\":\"10\",\n\"rows\":[\n{\"id\":1 ,\"cell\":[\"1\",\"image\",\"Chief Scout\",\"H... | 2008/11/03 | [
"https://Stackoverflow.com/questions/259435",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/16345/"
] |
259,451 | <p>I want to record sound (voice) using PortAudio (PyAudio) and output the corresponding sound wave on the screen. Hopeless as I am, I am unable to extract the frequency information from the audio stream so that I can draw it in Hz/time form.</p>
<hr>
<p>Here's an example code snippet that records and plays recorded ... | [
{
"answer_id": 259521,
"author": "Markus Jarderot",
"author_id": 22364,
"author_profile": "https://Stackoverflow.com/users/22364",
"pm_score": 3,
"selected": true,
"text": "scipy numpy"
}
] | 2008/11/03 | [
"https://Stackoverflow.com/questions/259451",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
259,455 | <p>In the following code, both the INPUT and TEXTAREA elements render wider than they should. How can I limit them to 100% of the usable area within the div?</p>
<pre><code><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="h... | [
{
"answer_id": 259479,
"author": "Jaime Garcia",
"author_id": 32812,
"author_profile": "https://Stackoverflow.com/users/32812",
"pm_score": 0,
"selected": false,
"text": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n"
},
{
"answe... | 2008/11/03 | [
"https://Stackoverflow.com/questions/259455",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/337/"
] |
259,456 | <p>I am working on implementing Zend Framework within an existing project that has a public marketing area, a private members area, an administration site, and a marketing campaign management site. Currently these are poorly organized with the controller scripts for the marketing area and the members area all being und... | [
{
"answer_id": 259489,
"author": "Bill Karwin",
"author_id": 20860,
"author_profile": "https://Stackoverflow.com/users/20860",
"pm_score": 4,
"selected": true,
"text": "INCLUDE_PATH docroot/\n index.php\napplication/\n library/ <-- common classes go here\n default/\n c... | 2008/11/03 | [
"https://Stackoverflow.com/questions/259456",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20178/"
] |
259,457 | <p>If I've got an array of values that are basically zerofilled string representations of various numbers and another array of integers, will <code>array_intersect()</code> still match elements of different types?</p>
<p>For example, would this work:</p>
<pre><code>$arrayOne = array('0003', '0004', '0005');
$arrayTwo... | [
{
"answer_id": 259467,
"author": "Zak",
"author_id": 2112692,
"author_profile": "https://Stackoverflow.com/users/2112692",
"pm_score": 3,
"selected": true,
"text": "<?php\n$arrayOne = array('0003', '0004', '0005');\n$arrayTwo = array(4, 5, 6);\n\n$intersect = array_intersect($arrayOne, $... | 2008/11/03 | [
"https://Stackoverflow.com/questions/259457",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5291/"
] |
259,480 | <p>I'm just interested in people's opinions. When using nullable types in C# what is the best practice way to test for null:</p>
<pre><code>bool isNull = (i == null);
</code></pre>
<p>or</p>
<pre><code>bool isNull = !i.HasValue;
</code></pre>
<p>Also when assigning to a non-null type is this:</p>
<pre><code>long? ... | [
{
"answer_id": 259500,
"author": "Seiti",
"author_id": 27959,
"author_profile": "https://Stackoverflow.com/users/27959",
"pm_score": 4,
"selected": false,
"text": "long? i = 1;\n...some code...\nlong j = i ?? 0;\n"
},
{
"answer_id": 259604,
"author": "mackenir",
"author_i... | 2008/11/03 | [
"https://Stackoverflow.com/questions/259480",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20553/"
] |
259,484 | <p>I'd like to externalize all of the strings used in the project into one file and be able to use it inside aspx, C# code behind and on the client side in JavaScript.<br>
The reason I want to do it is because many strings are shared, i.e. the same in two places. </p>
<p>Is it possible? Is there a better way?</p>
| [
{
"answer_id": 259568,
"author": "Corey Trager",
"author_id": 9328,
"author_profile": "https://Stackoverflow.com/users/9328",
"pm_score": 1,
"selected": false,
"text": "alert($MY_TEXT$)\n alert(\"The string associated with $MY_TEXT$\")\n"
}
] | 2008/11/03 | [
"https://Stackoverflow.com/questions/259484",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/28098/"
] |
259,486 | <p>SQL Server 2005.</p>
<p>I'm adding Foreign Key constraints to the database of an application that allegedly didn't need them. Naturally, the data has become unreliable and there are orphaned entries in the foreign key field.</p>
<p>Setup:<br/>
Two tables, TableUser and TableOrder.
TableUser has Primary Key 'UserI... | [
{
"answer_id": 259498,
"author": "Greg Hewgill",
"author_id": 893,
"author_profile": "https://Stackoverflow.com/users/893",
"pm_score": 5,
"selected": true,
"text": "select * from TableOrder where UserID not in (select UserID from TableUser);\n"
},
{
"answer_id": 259586,
"aut... | 2008/11/03 | [
"https://Stackoverflow.com/questions/259486",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/26508/"
] |
259,524 | <p>I have started using Linq to SQL in a (bit DDD like) system which looks (overly simplified) like this:</p>
<pre><code>public class SomeEntity // Imagine this is a fully mapped linq2sql class.
{
public Guid SomeEntityId { get; set; }
public AnotherEntity Relation { get; set; }
}
public class AnotherEntity /... | [
{
"answer_id": 259570,
"author": "Amy B",
"author_id": 8155,
"author_profile": "https://Stackoverflow.com/users/8155",
"pm_score": 0,
"selected": false,
"text": "DataLoadOptions loadOptions = new DataLoadOptions();\nloadOptions.LoadWith<Entity>(e => e.Relation);\nSomeEntity someEntity = ... | 2008/11/03 | [
"https://Stackoverflow.com/questions/259524",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11963/"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.