qid int64 4 19.1M | question stringlengths 18 48.3k | answers list | date stringlengths 10 10 | metadata list |
|---|---|---|---|---|
159,034 | <p>Are C++ enums signed or unsigned? And by extension is it safe to validate an input by checking that it is <= your max value, and leave out >= your min value (assuming you started at 0 and incremented by 1)?</p>
| [
{
"answer_id": 159068,
"author": "Cristián Romo",
"author_id": 1256,
"author_profile": "https://Stackoverflow.com/users/1256",
"pm_score": 3,
"selected": false,
"text": "enum Fruit\n{\n Apple = 0,\n Banana,\n Pineapple,\n Orange,\n Kumquat\n};\n\nenum Fruit fruitVariable =... | 2008/10/01 | [
"https://Stackoverflow.com/questions/159034",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17693/"
] |
159,038 | <p>Are disabling and enabling foreign key constraints supported in SQL Server? Or is my only option to <strong><code>drop</code></strong> and then <strong>re-<code>create</code></strong> the constraints?</p>
| [
{
"answer_id": 159064,
"author": "ScottStonehouse",
"author_id": 2342,
"author_profile": "https://Stackoverflow.com/users/2342",
"pm_score": 9,
"selected": false,
"text": " -- Disable all table constraints\n ALTER TABLE MyTable NOCHECK CONSTRAINT ALL\n\n -- Enable all table constra... | 2008/10/01 | [
"https://Stackoverflow.com/questions/159038",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4872/"
] |
159,076 | <p>I have a c# application that runs as a windows service controlling socket connections and other things.
Also, there is another windows forms application to control and configure this service (systray with start, stop, show form with configuration parameters).</p>
<p>I'm using .net remoting to do the IPC and that wa... | [
{
"answer_id": 221705,
"author": "CoolMagic",
"author_id": 22641,
"author_profile": "https://Stackoverflow.com/users/22641",
"pm_score": 0,
"selected": false,
"text": "ref class RunWindow{\npublic:\n static void MakeWindow(Object^ data)\n {\n Application::EnableVisualStyles(... | 2008/10/01 | [
"https://Stackoverflow.com/questions/159076",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/22693/"
] |
159,087 | <p>I inherited a database built with the idea that composite keys are much more ideal than using a unique object ID field and that when building a database, a single unique ID should <b><em>never</em></b> be used as a primary key. Because I was building a Rails front-end for this database, I ran into difficulties gett... | [
{
"answer_id": 160085,
"author": "JeremyDWill",
"author_id": 12603,
"author_profile": "https://Stackoverflow.com/users/12603",
"pm_score": 7,
"selected": true,
"text": "\"SELECT InvoiceNumber FROM Invoice WHERE CustomerCode = 'XYZ123'\" \"SELECT Invoice.InvoiceNumber FROM Invoice INNER J... | 2008/10/01 | [
"https://Stackoverflow.com/questions/159087",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/23909/"
] |
159,088 | <p>In WPF:</p>
<p>Can someone please explain the relationship between DependencyProperty and Databinding?</p>
<p>I have a property in my code behind I want to be the source of my databinding.
When does a DependencyProperty (or does it) come into play if I want to bind this object to textboxes on the XAML.</p>
| [
{
"answer_id": 159284,
"author": "Joel B Fant",
"author_id": 22211,
"author_profile": "https://Stackoverflow.com/users/22211",
"pm_score": 5,
"selected": true,
"text": "DependencyProperty DependencyProperty INotifyPropertyChanged PropertyName Changed"
},
{
"answer_id": 67103647,
... | 2008/10/01 | [
"https://Stackoverflow.com/questions/159088",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2744/"
] |
159,097 | <p>Is there any way to output the contents of an XDocument without the BOM? When reading the output with Flash, it causes errors.</p>
| [
{
"answer_id": 159203,
"author": "Chris Wenham",
"author_id": 5548,
"author_profile": "https://Stackoverflow.com/users/5548",
"pm_score": 4,
"selected": true,
"text": "XmlWriter writer = XmlWriter.Create(\"foo.xml\");\nwriter.Settings.Encoding = new System.Text.UTF8Encoding(false);\nmyXD... | 2008/10/01 | [
"https://Stackoverflow.com/questions/159097",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1786/"
] |
159,118 | <p>For example, this regex</p>
<pre><code>(.*)<FooBar>
</code></pre>
<p>will match:</p>
<pre><code>abcde<FooBar>
</code></pre>
<p>But how do I get it to match across multiple lines?</p>
<pre><code>abcde
fghij<FooBar>
</code></pre>
| [
{
"answer_id": 159139,
"author": "Paige Ruten",
"author_id": 813,
"author_profile": "https://Stackoverflow.com/users/813",
"pm_score": 9,
"selected": true,
"text": "/(.*)<FooBar>/s\n"
},
{
"answer_id": 159140,
"author": "levik",
"author_id": 4465,
"author_profile": "h... | 2008/10/01 | [
"https://Stackoverflow.com/questions/159118",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2108/"
] |
159,137 | <p>I need a cross platform method of determining the MAC address of a computer at run time. For windows the 'wmi' module can be used and the only method under Linux I could find was to run ifconfig and run a regex across its output. I don't like using a package that only works on one OS, and parsing the output of ano... | [
{
"answer_id": 159150,
"author": "camflan",
"author_id": 22445,
"author_profile": "https://Stackoverflow.com/users/22445",
"pm_score": 5,
"selected": false,
"text": "netifaces import netifaces\n\nnetifaces.interfaces()\n# ['lo', 'eth0', 'tun2']\n\nnetifaces.ifaddresses('eth0')[netifaces.... | 2008/10/01 | [
"https://Stackoverflow.com/questions/159137",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9940/"
] |
159,148 | <p>Groovy adds the <code>execute</code> method to <code>String</code> to make executing shells fairly easy;</p>
<pre><code>println "ls".execute().text
</code></pre>
<p>but if an error happens, then there is no resulting output. <strong>Is there an easy way to get both the standard error and standard out?</strong> (... | [
{
"answer_id": 159244,
"author": "Joshua",
"author_id": 6013,
"author_profile": "https://Stackoverflow.com/users/6013",
"pm_score": 6,
"selected": false,
"text": "\"ls\".execute() Process \"ls\".execute().text Process StringBuffer consumeProcessErrorStream(StringBuffer error) def proc = ... | 2008/10/01 | [
"https://Stackoverflow.com/questions/159148",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6580/"
] |
159,152 | <p>Is there a way with SVN to check out from a remote repository to another remote location rather than my local file system? Something like:</p>
<pre><code>svn co http://myrepository/svn/project ssh me@otherlocation.net:/var/www/project
</code></pre>
| [
{
"answer_id": 159467,
"author": "davr",
"author_id": 14569,
"author_profile": "https://Stackoverflow.com/users/14569",
"pm_score": 4,
"selected": true,
"text": "ssh me@other.net 'svn co http://repository/svn/project /var/www/project'\n"
}
] | 2008/10/01 | [
"https://Stackoverflow.com/questions/159152",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/577/"
] |
159,183 | <p>I want to resize the font of a SPAN element's style until it the SPAN's text is 7.5 inches wide when printed out on paper, but JavaScript only reports the SPAN's clientWidth property in pixels.</p>
<pre><code><span id="test">123456</span>
</code></pre>
<p>And then:</p>
<pre><code>#test {
font-size:1... | [
{
"answer_id": 159316,
"author": "neonski",
"author_id": 17112,
"author_profile": "https://Stackoverflow.com/users/17112",
"pm_score": 1,
"selected": false,
"text": "<link rel=\"stylesheet\" type=\"text/css\" href=\"print.css\" media=\"print\" />\n"
},
{
"answer_id": 159322,
... | 2008/10/01 | [
"https://Stackoverflow.com/questions/159183",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/16777/"
] |
159,190 | <p>In Eclipse, its easy to specify buttons for your toolbar using the ActionSets extension point. However, when I need to specify some items programmatically, I can't get the same look. I don't believe that the framework is using native buttons for these, but so far, I can't find the right recipe to match the Eclipse... | [
{
"answer_id": 439165,
"author": "hudsonb",
"author_id": 53923,
"author_profile": "https://Stackoverflow.com/users/53923",
"pm_score": 4,
"selected": true,
"text": "IToolBarManager toolBarManager = actionBars.getToolBarManager();\ntoolBarManager.add(new ControlContribution(\"Toggle Chart... | 2008/10/01 | [
"https://Stackoverflow.com/questions/159190",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/16476/"
] |
159,237 | <p>I'm working in .Net 3.5sp1 in C# for an ASP.Net solution and I'm wondering if there's any way to turn on the Class Name and Method Name drop-downs in the text editor that VB.Net has at the top. It's one of the few things from VB that I actually miss.</p>
<p>Edit: Also, is there any way to get the drop downs to be p... | [
{
"answer_id": 159246,
"author": "casademora",
"author_id": 5619,
"author_profile": "https://Stackoverflow.com/users/5619",
"pm_score": 3,
"selected": true,
"text": "Tools -> Options -> Text Editor -> C# -> General -> Navigation Bar\n"
}
] | 2008/10/01 | [
"https://Stackoverflow.com/questions/159237",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1414/"
] |
159,240 | <p>The more we use RAII in C++, the more we find ourselves with destructors that do non-trivial deallocation. Now, deallocation (finalization, however you want to call it) can fail, in which case exceptions are really the only way to let anybody upstairs know of our deallocation problem. But then again, throwing-destru... | [
{
"answer_id": 159259,
"author": "Martin York",
"author_id": 14065,
"author_profile": "https://Stackoverflow.com/users/14065",
"pm_score": 4,
"selected": false,
"text": "noexcept noexcept"
},
{
"answer_id": 159315,
"author": "puetzk",
"author_id": 14312,
"author_profi... | 2008/10/01 | [
"https://Stackoverflow.com/questions/159240",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11208/"
] |
159,252 | <p>When I have a regular textbox in a UpdatePanel (not an ASP.NET control) with some JavaScript events on it, after the UpdatePanel updates my events are gone. Is there a way to re-attach my events after the update? (Preferably without putting my events inline).</p>
| [
{
"answer_id": 159260,
"author": "Mark Cidade",
"author_id": 1659,
"author_profile": "https://Stackoverflow.com/users/1659",
"pm_score": 1,
"selected": false,
"text": "setInterval()"
}
] | 2008/10/01 | [
"https://Stackoverflow.com/questions/159252",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18926/"
] |
159,255 | <p>Bearing in mind that I'll be performing calculations on lat / long pairs, what datatype is best suited for use with a MySQL database?</p>
| [
{
"answer_id": 159275,
"author": "ConroyP",
"author_id": 2287,
"author_profile": "https://Stackoverflow.com/users/2287",
"pm_score": -1,
"selected": false,
"text": "FLOAT"
},
{
"answer_id": 25120203,
"author": "Simon",
"author_id": 1226018,
"author_profile": "https://... | 2008/10/01 | [
"https://Stackoverflow.com/questions/159255",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12037/"
] |
159,261 | <p>Does anyone have an example of script that can work reliably well across IE/Firefox to detect if the browser is capable of displaying embedded flash content. I say reliably because I know its not possible 100% of the time. </p>
| [
{
"answer_id": 4565606,
"author": "Andrew Ensley",
"author_id": 20801,
"author_profile": "https://Stackoverflow.com/users/20801",
"pm_score": 7,
"selected": false,
"text": "swfobject.js <script type=\"text/javascript\" src=\"swfobject.js\"></script>\n if(swfobject.hasFlashPlayerVersion(\... | 2008/10/01 | [
"https://Stackoverflow.com/questions/159261",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7280/"
] |
159,282 | <pre><code>grant {
permission java.security.AllPermission;
};
</code></pre>
<p>This works.</p>
<pre><code>grant file:///- {
permission java.security.AllPermission;
};
</code></pre>
<p>This does not work. Could someone please explain to me why?</p>
| [
{
"answer_id": 159785,
"author": "David G",
"author_id": 3150,
"author_profile": "https://Stackoverflow.com/users/3150",
"pm_score": 1,
"selected": false,
"text": "file:///tmp/-"
}
] | 2008/10/01 | [
"https://Stackoverflow.com/questions/159282",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
159,292 | <p>I am using Apache's Velocity templating engine, and I would like to create a custom Directive. That is, I want to be able to write "#doMyThing()" and have it invoke some java code I wrote in order to generate the text.</p>
<p>I know that I can register a custom directive by adding a line</p>
<pre><code>userdirecti... | [
{
"answer_id": 1012914,
"author": "gbegley",
"author_id": 76924,
"author_profile": "https://Stackoverflow.com/users/76924",
"pm_score": 2,
"selected": false,
"text": "import org.apache.velocity.runtime.directive.Directive;\nimport org.apache.velocity.runtime.RuntimeServices;\nimport org.... | 2008/10/01 | [
"https://Stackoverflow.com/questions/159292",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14570/"
] |
159,296 | <p>I've got a (poorly written) base class that I want to wrap in a proxy object. The base class resembles the following:</p>
<pre><code>public class BaseClass : SomeOtherBase
{
public BaseClass() {}
public BaseClass(int someValue) {}
//...more code, not important here
}
</code></pre>
<p>and, my proxy rese... | [
{
"answer_id": 159327,
"author": "albertein",
"author_id": 23020,
"author_profile": "https://Stackoverflow.com/users/23020",
"pm_score": 1,
"selected": false,
"text": "public BaseClassProxy (bool fakeOut) : base (10) {}\n"
},
{
"answer_id": 159342,
"author": "Jake Pearson",
... | 2008/10/01 | [
"https://Stackoverflow.com/questions/159296",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5619/"
] |
159,298 | <p>It looks like some work has been done to make <a href="http://sourceware.org/pthreads-win32/" rel="noreferrer">pthread-win32</a> work with x64, but there are no build instructions. I have tried simly building with the Visual Studio x64 Cross Tools Command Prompt, but when I try to link to the lib from an x64 applica... | [
{
"answer_id": 16399440,
"author": "rogerdpack",
"author_id": 32453,
"author_profile": "https://Stackoverflow.com/users/32453",
"pm_score": 2,
"selected": false,
"text": "$ make clean GC-static \n cp libpthreadGC2.a $mingw_w64_x86_64_prefix/lib/libpthread.a\ncp pthread.h sched.h semaphor... | 2008/10/01 | [
"https://Stackoverflow.com/questions/159298",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/21784/"
] |
159,313 | <p>What is the scope of Runtime Callable Wrapper (RCW), when referencing unmanaged COM objects? According to the docs:</p>
<blockquote>
<p>The runtime creates exactly one RCW
for each COM object, regardless of the
number of references that exist on
that object.</p>
</blockquote>
<p>If I had to "guess" - this ... | [
{
"answer_id": 163151,
"author": "Christoffer Lette",
"author_id": 11808,
"author_profile": "https://Stackoverflow.com/users/11808",
"pm_score": 1,
"selected": false,
"text": "ReleaseComObject ReleaseComObject"
}
] | 2008/10/01 | [
"https://Stackoverflow.com/questions/159313",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8220/"
] |
159,317 | <p>When should one do the following?</p>
<pre><code>class Foo : Control
{
protected override void OnClick(EventArgs e)
{
// new code here
}
}
</code></pre>
<p>As opposed to this?</p>
<pre><code>class Foo : Control
{
public Foo()
{
this.Click += new EventHandler(Clicked);
}
... | [
{
"answer_id": 160041,
"author": "Matt Hamilton",
"author_id": 615,
"author_profile": "https://Stackoverflow.com/users/615",
"pm_score": 2,
"selected": false,
"text": "public class MyDataTable : DataTable\n{\n public override void EndInit()\n {\n base.EndInit();\n thi... | 2008/10/01 | [
"https://Stackoverflow.com/questions/159317",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8505/"
] |
159,339 | <p>I'm not sure if the term's actually "Array Addition". </p>
<p>I'm trying to understand what does the following line do:</p>
<pre><code>int var[2 + 1] = {2, 1};
</code></pre>
<p>How is that different from <code>int var[3]</code>?</p>
<p>I've been using Java for several years, so I'd appreciate if explained using ... | [
{
"answer_id": 159352,
"author": "James Curran",
"author_id": 12725,
"author_profile": "https://Stackoverflow.com/users/12725",
"pm_score": 0,
"selected": false,
"text": "int var[3]"
},
{
"answer_id": 159355,
"author": "Dima",
"author_id": 13313,
"author_profile": "ht... | 2008/10/01 | [
"https://Stackoverflow.com/questions/159339",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/24280/"
] |
159,351 | <p>ActiveReports seems like a powerful flexible tool, but if you make a mistake anywhere, you get an exception "data member not found. please check your datasource and datamember properties". </p>
<p>There is no indication as to which datasource/datamember is at fault or what subreport the problem lies in, but Active ... | [
{
"answer_id": 6863977,
"author": "John Meyer",
"author_id": 868113,
"author_profile": "https://Stackoverflow.com/users/868113",
"pm_score": 2,
"selected": false,
"text": "Dim rpt as New ActiveReport With rpt .DataSource = _data .Run() End With .DataSource = _data.Tables(0)"
}
] | 2008/10/01 | [
"https://Stackoverflow.com/questions/159351",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
159,359 | <p>I know we cannot do this at class level but at method level we can always do this. </p>
<pre><code>var myList=new List<string> // or something else like this
</code></pre>
<p>This question came to my mind since wherever we declare variable like this. We always provide the type information at the RHS of the e... | [
{
"answer_id": 159559,
"author": "Joseph Daigle",
"author_id": 507,
"author_profile": "https://Stackoverflow.com/users/507",
"pm_score": 1,
"selected": false,
"text": "var var myList=new List<string>\n var"
},
{
"answer_id": 159574,
"author": "Mark Cidade",
"author_id": 1... | 2008/10/01 | [
"https://Stackoverflow.com/questions/159359",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/22858/"
] |
159,362 | <p>If I avoid referencing assemblies that don't exist in the silverlight 2.0 runtime, will the.Net 2.0 library dlls I create with VS2008 work with silverlight <strong>without recompilation</strong> or other alteration?</p>
| [
{
"answer_id": 170936,
"author": "Jimmy",
"author_id": 25071,
"author_profile": "https://Stackoverflow.com/users/25071",
"pm_score": 0,
"selected": false,
"text": "#if SILVERLIGHT\n/* some code */\n#else // WPF\n/* some other code */\n#endif\n"
}
] | 2008/10/01 | [
"https://Stackoverflow.com/questions/159362",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11356/"
] |
159,373 | <p>Using .Net 3.0 and VS2005. </p>
<p>The objects in question are consumed from a WCF service then serialized back into XML for a legacy API. So rather than serializing the TestObject, it was serializing .TestObject which was missing the [XmlRoot] attribute; however, all the [Xml*] attributes for the child elements we... | [
{
"answer_id": 177169,
"author": "hurst",
"author_id": 10991,
"author_profile": "https://Stackoverflow.com/users/10991",
"pm_score": -1,
"selected": true,
"text": "XmlAttributeOverrides private static XmlSerializer GetOverridedSerializer()\n {\n // set overrides for TestObj... | 2008/10/01 | [
"https://Stackoverflow.com/questions/159373",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/24279/"
] |
159,391 | <p>Did anyone of you ever find a way of getting the Microsoft Report Viewer Control (Web) to work from within an Ajax UpdatePanel?</p>
| [
{
"answer_id": 2673667,
"author": "user321101",
"author_id": 321101,
"author_profile": "https://Stackoverflow.com/users/321101",
"pm_score": 2,
"selected": false,
"text": " <assemblies> <add assembly=\"System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B7... | 2008/10/01 | [
"https://Stackoverflow.com/questions/159391",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/23369/"
] |
159,393 | <p>I want to create a script that parses or makes sense of apache's error log to see what the most recent error was. I was wondering if anyone out there has something that does this or has any ideas where to start?</p>
| [
{
"answer_id": 159452,
"author": "Powerlord",
"author_id": 15880,
"author_profile": "https://Stackoverflow.com/users/15880",
"pm_score": 5,
"selected": true,
"text": "$contents = @file('/path/to/error.log', FILE_SKIP_EMPTY_LINES);\nif (is_array($contents)) {\n echo end($contents);\n}\... | 2008/10/01 | [
"https://Stackoverflow.com/questions/159393",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5261/"
] |
159,423 | <p>I'm currently writing a simple .sh script to parse an Exim log file for strings matching " o' ". Currently, when viewing output.txt, all that is there is a 0 printed on every line(606 lines). I'm guessing my logic is wrong, as awk does not throw any errors.</p>
<p>Here is my code(updated for concatenation and count... | [
{
"answer_id": 159450,
"author": "tzot",
"author_id": 6899,
"author_profile": "https://Stackoverflow.com/users/6899",
"pm_score": 2,
"selected": false,
"text": "+ line += \" \" + $i\n line = line \" \" $i\n grep -F o\\' /var/log/exim/main.log | cut -d\\ -f20-33 >output.txt\n"
},
{
... | 2008/10/01 | [
"https://Stackoverflow.com/questions/159423",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2153/"
] |
159,442 | <p>This seems like a pretty softball question, but I always have a hard time looking up this function because there seem there are so many variations regarding the referencing of char and tchar.</p>
| [
{
"answer_id": 159536,
"author": "James Curran",
"author_id": 12725,
"author_profile": "https://Stackoverflow.com/users/12725",
"pm_score": 2,
"selected": false,
"text": "if (sizeof(TCHAR) != sizeof(wchar_t))\n{ .... }\n"
}
] | 2008/10/01 | [
"https://Stackoverflow.com/questions/159442",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/16260/"
] |
159,456 | <p>I have a database in the following format:</p>
<pre><code> ID TYPE SUBTYPE COUNT MONTH
1 A Z 1 7/1/2008
1 A Z 3 7/1/2008
2 B C 2 7/2/2008
1 A Z 3 7/2/2008
</code></pre>
<p>Can I use SQL to convert it i... | [
{
"answer_id": 159488,
"author": "Bob Probst",
"author_id": 12424,
"author_profile": "https://Stackoverflow.com/users/12424",
"pm_score": 3,
"selected": false,
"text": "select id,\nsum(case when type = 'A' and subtype = 'Z' then [count] else 0 end) as A_Z,\nsum(case when type = 'B' and s... | 2008/10/01 | [
"https://Stackoverflow.com/questions/159456",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/23133/"
] |
159,469 | <p>Hopefully, I can explain this issue properly. I have 3 classes that deals with my entities.</p>
<pre><code>@MappedSuperclass
public abstract class Swab implements ISwab {
...
private Collection<SwabAccounts> accounts;
...
}
@Entity
@Table(name="switches")
@DiscriminatorColumn(name="type")
@Discriminator... | [
{
"answer_id": 43619011,
"author": "Mario Barreto MX",
"author_id": 7921419,
"author_profile": "https://Stackoverflow.com/users/7921419",
"pm_score": 0,
"selected": false,
"text": "public void contextDestroyed(ServletContextEvent servletContextEvent) {\n try {\n logger.info(\"c... | 2008/10/01 | [
"https://Stackoverflow.com/questions/159469",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/22763/"
] |
159,470 | <p>I'm using an expander inside a <a href="http://kentb.blogspot.com/2007/04/resizer-wpf-control.html" rel="nofollow noreferrer">Resizer</a> (a ContentControl with a resize gripper), and it expands/collapses properly when the control initially comes up. Once I resize it, the Expander won't properly collapse, as docume... | [
{
"answer_id": 43619011,
"author": "Mario Barreto MX",
"author_id": 7921419,
"author_profile": "https://Stackoverflow.com/users/7921419",
"pm_score": 0,
"selected": false,
"text": "public void contextDestroyed(ServletContextEvent servletContextEvent) {\n try {\n logger.info(\"c... | 2008/10/01 | [
"https://Stackoverflow.com/questions/159470",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9970/"
] |
159,476 | <p>Let's say I've got a website that works better if a client has installed and logged into a desktop application. I'd like to be able to do 2 things:</p>
<ul>
<li>Alter the website if they haven't installed the app (to make it easy for them to find a link to the installer)</li>
<li>If they've installed the app on a ... | [
{
"answer_id": 159518,
"author": "vaske",
"author_id": 16039,
"author_profile": "https://Stackoverflow.com/users/16039",
"pm_score": 0,
"selected": false,
"text": ".swf AC_RunActiveContent.js if (AC_FL_RunContent == 0) {\n alert(\"This page requires AC_RunActiveContent.js.\");\n} else... | 2008/10/01 | [
"https://Stackoverflow.com/questions/159476",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/23524/"
] |
159,487 | <p>Well, this is my first post here and really enjoying the site.</p>
<p>I have a very basic (ugly as sin) site I have started and for some reason, I can not get the CSS Sticky footer to work for FireFox. IE works but FF shows it halfway up the page.</p>
<p>The URL is <a href="http://dev.aipoker.co.uk" rel="nofollow... | [
{
"answer_id": 159558,
"author": "zigdon",
"author_id": 4913,
"author_profile": "https://Stackoverflow.com/users/4913",
"pm_score": 2,
"selected": false,
"text": "footer { \n display: block; \n position: absolute; \n width: 100%; \n bottom: 0px; \n}\n"
},
{
"answer_id": 15966... | 2008/10/01 | [
"https://Stackoverflow.com/questions/159487",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6486/"
] |
159,506 | <p>Can I programatically set the position of a WPF ListBox's scrollbar? By default, I want it to go in the center.</p>
| [
{
"answer_id": 159565,
"author": "Bob King",
"author_id": 6897,
"author_profile": "https://Stackoverflow.com/users/6897",
"pm_score": 2,
"selected": false,
"text": "Dim cnt as Integer = myListBox.Items.Count\nDim midPoint as Integer = cnt\\2\nmyListBox.ScrollIntoView(myListBox.Items(midP... | 2008/10/01 | [
"https://Stackoverflow.com/questions/159506",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3047/"
] |
159,521 | <p>I mean 100+ MB big; such text files can push the envelope of editors.</p>
<p>I need to look through a large XML file, but cannot if the editor is buggy.</p>
<p>Any suggestions?</p>
| [
{
"answer_id": 159537,
"author": "Nick Ryberg",
"author_id": 21275,
"author_profile": "https://Stackoverflow.com/users/21275",
"pm_score": 12,
"selected": true,
"text": "tail tail MORE more"
},
{
"answer_id": 1343576,
"author": "Roboprog",
"author_id": 63369,
"author_... | 2008/10/01 | [
"https://Stackoverflow.com/questions/159521",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17865/"
] |
159,523 | <p>When I call <code>Response.Redirect(someUrl)</code> I get the following HttpException:</p>
<blockquote>
<p>Cannot redirect after HTTP headers have been sent.</p>
</blockquote>
<p>Why do I get this? And how can I fix this issue?</p>
| [
{
"answer_id": 159529,
"author": "Mark Cidade",
"author_id": 1659,
"author_profile": "https://Stackoverflow.com/users/1659",
"pm_score": 3,
"selected": false,
"text": "HTTP/1.x 3xx Redirect Reason Response.Write() Response.Headers.Clear()"
},
{
"answer_id": 159538,
"author": ... | 2008/10/01 | [
"https://Stackoverflow.com/questions/159523",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/23886/"
] |
159,541 | <p>I'm running a Django site using the fastcgi interface to nginx. However, some pages are being served truncated (i.e. the page source just stops, sometimes in the middle of a tag). How do I fix this (let me know what extra information is needed, and I'll post it)</p>
<p>Details:</p>
<p>I'm using flup, and spawning ... | [
{
"answer_id": 4515898,
"author": "dwc",
"author_id": 57301,
"author_profile": "https://Stackoverflow.com/users/57301",
"pm_score": 3,
"selected": false,
"text": ".../nginx/tmp/..."
},
{
"answer_id": 6033063,
"author": "rewritten",
"author_id": 384417,
"author_profile... | 2008/10/01 | [
"https://Stackoverflow.com/questions/159541",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2933/"
] |
159,549 | <p>I want to log to the console when I'm using un-minimized JavaScript files.</p>
<p>Comments are taken out already when I minimize JavaScript. I'm wondering if there's a way I can write a command that isn't commented out but will still be taken out when I minimize the JavaScript file. </p>
| [
{
"answer_id": 161133,
"author": "Gene",
"author_id": 22673,
"author_profile": "https://Stackoverflow.com/users/22673",
"pm_score": 2,
"selected": true,
"text": "function doLogging(object){} function doLogging(object){/*your logging code*/};"
}
] | 2008/10/01 | [
"https://Stackoverflow.com/questions/159549",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9106/"
] |
159,554 | <p>I'm looking for a built-in function/extended function in T-SQL for string manipulation similar to the <code>String.Format</code> method in .NET.</p>
| [
{
"answer_id": 836894,
"author": "jj.",
"author_id": 103131,
"author_profile": "https://Stackoverflow.com/users/103131",
"pm_score": 2,
"selected": false,
"text": "FORMATMESSAGE() printf() sys.messages RAISERROR()"
},
{
"answer_id": 1153194,
"author": "Josh",
"author_id":... | 2008/10/01 | [
"https://Stackoverflow.com/questions/159554",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
159,567 | <p>How do I parse the first, middle, and last name out of a fullname field with SQL? </p>
<p>I need to try to match up on names that are not a direct match on full name. I'd like to be able to take the full name field and break it up into first, middle and last name. </p>
<p>The data does not include any prefixes or... | [
{
"answer_id": 159628,
"author": "neonski",
"author_id": 17112,
"author_profile": "https://Stackoverflow.com/users/17112",
"pm_score": 3,
"selected": false,
"text": "SUBSTRING ( expression , start , length )\n CHARINDEX (substr, expression)\n SELECT \nSUBSTRING(fullname, 1, CHARINDEX(' '... | 2008/10/01 | [
"https://Stackoverflow.com/questions/159567",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/73794/"
] |
159,590 | <p>I've used recursion quite a lot on my many years of programming to solve simple problems, but I'm fully aware that sometimes you need iteration due to memory/speed problems.</p>
<p>So, sometime in the very far past I went to try and find if there existed any "pattern" or text-book way of transforming a common recur... | [
{
"answer_id": 159649,
"author": "Andrew Stein",
"author_id": 13029,
"author_profile": "https://Stackoverflow.com/users/13029",
"pm_score": 2,
"selected": false,
"text": "void foo(Node* node)\n{\n if(node == NULL)\n return;\n // Do something with node...\n foo(node->left);... | 2008/10/01 | [
"https://Stackoverflow.com/questions/159590",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8167/"
] |
159,594 | <p>I've organized my code hierarchically and I find myself crawling up the tree using code like the following.</p>
<pre><code>File clientFolder = task.getActionPlan().getClientFile().getClient().getDocumentsFolder();
</code></pre>
<p>I'm not drilling down into the <code>task</code> object; I'm drilling up to its pare... | [
{
"answer_id": 159622,
"author": "Chris Cudmore",
"author_id": 18907,
"author_profile": "https://Stackoverflow.com/users/18907",
"pm_score": 0,
"selected": false,
"text": "ActionPlan AP = task.getActionPlan();\nClientFile CF = AP.getClientFile();\nClient C = CF.getClient();\nDocFolder DF... | 2008/10/01 | [
"https://Stackoverflow.com/questions/159594",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2443/"
] |
159,599 | <p>I have a .net project that has a web reference to a service. I would like to update that web reference as part of every build. Is that possible?</p>
| [
{
"answer_id": 159751,
"author": "Vivek",
"author_id": 7418,
"author_profile": "https://Stackoverflow.com/users/7418",
"pm_score": 5,
"selected": true,
"text": " <Target Name=\"UpdateWebReference\">\n <Message Text=\"Updating Web Reference...\"/>\n <Exec Command=\"wsdl.exe /o &quo... | 2008/10/01 | [
"https://Stackoverflow.com/questions/159599",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15903/"
] |
159,615 | <p>When running command-line queries in MySQL you can optionally use '<strong>\G</strong>' as a statement terminator, and instead of the result set columns being listed horizontally across the screen, it will list each column vertically, which the corresponding data to the right. Is there a way to the same or a similar... | [
{
"answer_id": 27618935,
"author": "Bimal Jha",
"author_id": 4177130,
"author_profile": "https://Stackoverflow.com/users/4177130",
"pm_score": -1,
"selected": false,
"text": "db2 => connect to coldb\n\n Database Connection Information\n\n Database server = DB2/LINUXX8664 10.5.5\... | 2008/10/01 | [
"https://Stackoverflow.com/questions/159615",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8636/"
] |
159,627 | <p>We just did a move from storing all files locally to a network drive. Problem is that is where my VS projects are also stored now. (No versioning system yet, working on that.) I know I heard of problems with doing this in the past, but never heard of a work-around. Is there a work around?</p>
<p>So my VS is install... | [
{
"answer_id": 10217072,
"author": "fschaper",
"author_id": 1021169,
"author_profile": "https://Stackoverflow.com/users/1021169",
"pm_score": 4,
"selected": false,
"text": "<loadFromRemoteSources enabled=\"true\"/>\n"
},
{
"answer_id": 49927622,
"author": "josh",
"author_... | 2008/10/01 | [
"https://Stackoverflow.com/questions/159627",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2535/"
] |
159,704 | <p>What options are there for serialization when returning instances of custom classes from a WebService?</p>
<p>We have some classes with a number of child collection class properties as well as other properties that may or may not be set depending on usage. These objects are returned from an ASP.NET .asmx WebServic... | [
{
"answer_id": 159811,
"author": "Mark Cidade",
"author_id": 1659,
"author_profile": "https://Stackoverflow.com/users/1659",
"pm_score": 0,
"selected": false,
"text": "System.Runtime.Serialization.Json. DataContractJsonSerializer System.ServiceModel.Web.dll"
},
{
"answer_id": 159... | 2008/10/01 | [
"https://Stackoverflow.com/questions/159704",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4299/"
] |
159,705 | <p>I am checking whether the new name already exists or not.</p>
<p>Code 1</p>
<pre><code>if(cmbxExistingGroups.Properties.Items.Cast<string>().ToList().Exists(txt => txt==txtNewGroup.Text.Trim())) {
MessageBox.Show("already exists.", "Add new group");
}
</code></pre>
<p>Otherwise I could have... | [
{
"answer_id": 159776,
"author": "Steven A. Lowe",
"author_id": 9345,
"author_profile": "https://Stackoverflow.com/users/9345",
"pm_score": 2,
"selected": false,
"text": "cmbxExistingGroups.Properties.Items.Contains(text) \n"
},
{
"answer_id": 159790,
"author": "FlySwat",
... | 2008/10/01 | [
"https://Stackoverflow.com/questions/159705",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/22858/"
] |
159,720 | <p>Coming from a C# background the naming convention for variables and method names are usually either camelCase or PascalCase:</p>
<pre class="lang-cs prettyprint-override"><code>// C# example
string thisIsMyVariable = "a"
public void ThisIsMyMethod()
</code></pre>
<p>In Python, I have seen the above but I have also... | [
{
"answer_id": 159798,
"author": "André",
"author_id": 9683,
"author_profile": "https://Stackoverflow.com/users/9683",
"pm_score": 5,
"selected": false,
"text": "SomeClass.doSomething() SomeClass.do_something()"
},
{
"answer_id": 160830,
"author": "unmounted",
"author_id"... | 2008/10/01 | [
"https://Stackoverflow.com/questions/159720",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4872/"
] |
159,721 | <p>I would like to handle an OracleException thrown when my network/database connection is interrupted, where can I find out what error codes I might can receive?</p>
<p>I guess since we are talking about a connection interruption these would be technically TNS errors such as ORA-12560 "TNS:protocol adapter error." Bu... | [
{
"answer_id": 159770,
"author": "dacracot",
"author_id": 13930,
"author_profile": "https://Stackoverflow.com/users/13930",
"pm_score": 1,
"selected": false,
"text": "ORA-12154 TNS:could not resolve service name\"\nORA-12203 TNS:unable to connect to destination\"\nORA-12500 TNS:listener ... | 2008/10/01 | [
"https://Stackoverflow.com/questions/159721",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5056/"
] |
159,769 | <p>I have a complex query with group by and order by clause and I need a sorted row number (1...2...(n-1)...n) returned with every row. Using a ROWNUM (value is assigned to a row after it passes the predicate phase of the query but before the query does any sorting or aggregation) gives me a non-sorted list (4...567...... | [
{
"answer_id": 159779,
"author": "Justin Cave",
"author_id": 10397,
"author_profile": "https://Stackoverflow.com/users/10397",
"pm_score": 5,
"selected": true,
"text": "SELECT rownum, a.* \n FROM (<<your complex query including GROUP BY and ORDER BY>>) a\n"
},
{
"answer_id": 159... | 2008/10/01 | [
"https://Stackoverflow.com/questions/159769",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4235/"
] |
159,797 | <p>Wikipedia says Ruby is a functional language, but I'm not convinced. Why or why not?</p>
| [
{
"answer_id": 35512080,
"author": "Elias Perez",
"author_id": 5712328,
"author_profile": "https://Stackoverflow.com/users/5712328",
"pm_score": 4,
"selected": false,
"text": "mode"
}
] | 2008/10/01 | [
"https://Stackoverflow.com/questions/159797",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/781/"
] |
159,821 | <p>In an app I'm working on, I have a plain style UITableView that can contain a section containing zero rows. I want to be able to scroll to this section using scrollToRowAtIndexPath:atScrollPosition:animated: but I get an error when I try to scroll to this section due to the lack of child rows.</p>
<p>Apple's calend... | [
{
"answer_id": 351109,
"author": "Mike Akers",
"author_id": 17188,
"author_profile": "https://Stackoverflow.com/users/17188",
"pm_score": 8,
"selected": true,
"text": "NSIndexPath [NSIndexPath indexPathForRow:NSNotFound inSection:section]\n CGRect sectionRect = [tableView rectForSection:... | 2008/10/01 | [
"https://Stackoverflow.com/questions/159821",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17188/"
] |
159,842 | <p>Often times when mixing jQuery with asp.net I need to use asp .net angle bracket percent, <% %>, syntax within a jQuery selector.</p>
<p>If I would like to separate the JavaScript from markup into different files is there still a way to evaluate my JavaScript file so the angle bracket percents are interpolated ... | [
{
"answer_id": 159865,
"author": "bdukes",
"author_id": 2688,
"author_profile": "https://Stackoverflow.com/users/2688",
"pm_score": 2,
"selected": false,
"text": "jQuery('#<%=MainPanel.ClientId%>').hide('slow');\n function hidePanel(panelId) {\n jQuery('#' + panelId).hide('slow');... | 2008/10/01 | [
"https://Stackoverflow.com/questions/159842",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4521/"
] |
159,853 | <p>I have some local changes to an open source project which uses Subversion as its source control. (I do not have commit access on the original project repository.)</p>
<p>My change adds a file, but this file is not included in the output of "svn diff". (It may be worth noting that the new file is a binary, not pla... | [
{
"answer_id": 1051396,
"author": "Balázs Pozsár",
"author_id": 119797,
"author_profile": "https://Stackoverflow.com/users/119797",
"pm_score": 4,
"selected": false,
"text": "svn diff --force --diff-cmd /usr/bin/diff -x -au\n"
},
{
"answer_id": 2255846,
"author": "Jason Favor... | 2008/10/01 | [
"https://Stackoverflow.com/questions/159853",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/17732/"
] |
159,856 | <p>I am running NUnit with the project named AssemblyTest.nunit. The test calls another assembly which uses the log4net assembly. This is using nunit version 2.4.3 with the .net 2.0 framework.</p>
<p>In TestFixtureSetup I am calling log4net.Config.XmlConfigurator.Configure( ) and am getting the following error:</p>
<... | [
{
"answer_id": 9032281,
"author": "Christoph Brückmann",
"author_id": 909980,
"author_profile": "https://Stackoverflow.com/users/909980",
"pm_score": 4,
"selected": false,
"text": "<configuration>\n <configSections>\n <section name=\"log4net\" type=\"log4net.Config.Log4NetConfigurati... | 2008/10/01 | [
"https://Stackoverflow.com/questions/159856",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/24174/"
] |
159,862 | <p>Short of cutting and pasting, is there a way to sort the methods in my classes in Visual Studio 2008? I like orderly code.</p>
| [
{
"answer_id": 2539697,
"author": "Handcraftsman",
"author_id": 102536,
"author_profile": "https://Stackoverflow.com/users/102536",
"pm_score": 2,
"selected": false,
"text": "<!--Fixture Setup/Teardown-->\n<Entry>\n <Match>\n <And>\n <Kind Is=\"method\"/>\n <Or>\n <H... | 2008/10/01 | [
"https://Stackoverflow.com/questions/159862",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/16415/"
] |
159,864 | <p>I'm working on a control to tie together the view from one ListView to another so that when the master ListView is scrolled, the child ListView view is updated to match. </p>
<p>So far I've been able to get the child ListViews to update their view when the master scrollbar buttons are clicked. The problem is that... | [
{
"answer_id": 167089,
"author": "Rob Allen",
"author_id": 149,
"author_profile": "https://Stackoverflow.com/users/149",
"pm_score": 1,
"selected": false,
"text": "masterList.Scroll += new ScrollEventHandler(this.masterList_scroll);\n private void masterList_scroll(Object sender, System.... | 2008/10/01 | [
"https://Stackoverflow.com/questions/159864",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1314/"
] |
159,886 | <p>I've seen this is various codebases, and wanted to know if this generally frowned upon or not.</p>
<p>For example:</p>
<pre><code>public class MyClass
{
public int Id;
public MyClass()
{
Id = new Database().GetIdFor(typeof(MyClass));
}
}
</code></pre>
| [
{
"answer_id": 159921,
"author": "Mark Cidade",
"author_id": 1659,
"author_profile": "https://Stackoverflow.com/users/1659",
"pm_score": 3,
"selected": false,
"text": "public class MyClass : IDisposable\n{\n private Database db;\n private int? _id;\n\n public MyClass()\n {\n ... | 2008/10/01 | [
"https://Stackoverflow.com/questions/159886",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5619/"
] |
159,888 | <p>You're stepping through C/C++ code and have just called a Win32 API that has failed (typically by returning some unhelpful generic error code, like 0). Your code doesn't make a subsequent GetLastError() call whose return value you could inspect for further error information.</p>
<p>How can you get the error value ... | [
{
"answer_id": 159898,
"author": "QBziZ",
"author_id": 11572,
"author_profile": "https://Stackoverflow.com/users/11572",
"pm_score": 3,
"selected": false,
"text": "ERR,hr"
},
{
"answer_id": 160024,
"author": "Michael Burr",
"author_id": 12711,
"author_profile": "https... | 2008/10/01 | [
"https://Stackoverflow.com/questions/159888",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4994/"
] |
159,889 | <p>I'm developing an iPhone app that uses the built-in SQLite database. I'm trying to view and open the database via the <code>sqlite3</code> command line tool so I can execute arbitrary SQL against it.</p>
<p>When I run my app in the simulator, the <code>.sqlite</code> file it creates is located at <code>~/Library/Ap... | [
{
"answer_id": 14472700,
"author": "abbood",
"author_id": 766570,
"author_profile": "https://Stackoverflow.com/users/766570",
"pm_score": 1,
"selected": false,
"text": "which sqlite3 NSArray *paths = NSSearchPathForDirectoriesInDomains (NSDocumentDirectory, NSUserDomainMask, YES); \nNSSt... | 2008/10/01 | [
"https://Stackoverflow.com/questions/159889",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/49611/"
] |
159,910 | <p>Is there a way my program can determine when it's running on a Remote Desktop (Terminal Services)?</p>
<p>I'd like to enable an "inactivity timeout" on the program when it's running on a Remote Desktop session. Since users are notorious for leaving Remote Desktop sessions open, I want my program to terminate after... | [
{
"answer_id": 241176,
"author": "Ian Boyd",
"author_id": 12597,
"author_profile": "https://Stackoverflow.com/users/12597",
"pm_score": 4,
"selected": false,
"text": "/// <summary>\n/// Indicates if we're running in a remote desktop session.\n/// If we are, then you MUST disable animatio... | 2008/10/01 | [
"https://Stackoverflow.com/questions/159910",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8752/"
] |
159,914 | <p>Does anybody know a way with JavaScript or CSS to basically grey out a certain part of a form/div in HTML?</p>
<p>I have a '<em>User Profile</em>' form where I want to disable part of it for a '<em>Non-Premium</em>' member, but want the user to see what is behind the form and place a '<em>Call to Action</em>' on to... | [
{
"answer_id": 159962,
"author": "dacracot",
"author_id": 13930,
"author_profile": "https://Stackoverflow.com/users/13930",
"pm_score": 6,
"selected": false,
"text": "<div id=\"darkLayer\" class=\"darkClass\" style=\"display:none\"></div>\n .darkClass\n{\n background-color: white;\n ... | 2008/10/01 | [
"https://Stackoverflow.com/questions/159914",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8534/"
] |
159,924 | <p>I'm slowly moving all of my <code>LAMP websites</code> from <code>mysql_</code> functions to <code>PDO</code> functions and I've hit my first brick wall. I don't know how to loop through results with a parameter. I am fine with the following:</p>
<pre><code>foreach ($database->query("SELECT * FROM widgets") as... | [
{
"answer_id": 159967,
"author": "Darryl Hein",
"author_id": 5441,
"author_profile": "https://Stackoverflow.com/users/5441",
"pm_score": 3,
"selected": false,
"text": "$sql = \"SELECT * FROM widgets WHERE something='something else'\";\nforeach ($database->query($sql) as $row) {\n echo ... | 2008/10/01 | [
"https://Stackoverflow.com/questions/159924",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/428190/"
] |
159,926 | <p>My company unwittingly switched from cvs to subversion and now we're all wishing we had cvs back.
I know there's tools to migrate history and changes from cvs to svn and there's no equivalent to do the reverse.
Any suggestions or ideas on how to do this?</p>
| [
{
"answer_id": 2641628,
"author": "dbr",
"author_id": 745,
"author_profile": "https://Stackoverflow.com/users/745",
"pm_score": 1,
"selected": false,
"text": "git svn clone http://thesvnserver ourrepo\n git cvsexportcommit 4a20cbafdf25a141b31a8333284a332d1a4d6072\n git cvsserver"
}
] | 2008/10/01 | [
"https://Stackoverflow.com/questions/159926",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12386/"
] |
159,928 | <p>I want to change/animate the Foreground property of a custom button control template depending on the control's state.</p>
<p>Pre-RC0, I set the Foreground of the ContentPresenter, gave it an x:Name, and referenced it in the VisualStateManager transitions.</p>
<p>Now, ContentPresenter no longer has a Foreground, sin... | [
{
"answer_id": 1232348,
"author": "Community",
"author_id": -1,
"author_profile": "https://Stackoverflow.com/users/-1",
"pm_score": 1,
"selected": false,
"text": "<ControlTemplate TargetType=\"{x:Type ButtonBase}\">\n <ContentControl Content=\"{TemplateBinding Content}\" Foreground=\"... | 2008/10/01 | [
"https://Stackoverflow.com/questions/159928",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/23222/"
] |
159,934 | <p>How would one structure a table for an entity that can have a one to many relationship to itself? Specifically, I'm working on an app to track animal breeding. Each animal has an ID; it's also got a sire ID and a dame ID. So it's possible to have a one to many from the sire or dame to its offspring. I would be i... | [
{
"answer_id": 159997,
"author": "Thilo",
"author_id": 14955,
"author_profile": "https://Stackoverflow.com/users/14955",
"pm_score": 2,
"selected": false,
"text": "ID INT NOT NULL PRIMARY KEY\nSIRE_ID INT REFERENCES TABLENAME (ID)\nDAME_ID INT REFERENCES TABLENAME (ID)\n"
},
{
"a... | 2008/10/01 | [
"https://Stackoverflow.com/questions/159934",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2820/"
] |
159,950 | <p>How do I change the system-wide short date format in Ubuntu? For example, Thunderbird is showing dates in the DD/MM/YY format, and I would like to change it to MM/DD/YY or YYYY-MM-DD.</p>
<p>The best information I can find so far is in this thread:</p>
<p><a href="http://ubuntuforums.org/showthread.php?t=193916" ... | [
{
"answer_id": 160036,
"author": "agnul",
"author_id": 6069,
"author_profile": "https://Stackoverflow.com/users/6069",
"pm_score": 1,
"selected": false,
"text": "LC_TIME en_DK"
},
{
"answer_id": 46157865,
"author": "Nishi",
"author_id": 211369,
"author_profile": "http... | 2008/10/01 | [
"https://Stackoverflow.com/questions/159950",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/24311/"
] |
159,978 | <p>What are differences between declaring a method in a base type "<code>virtual</code>" and then overriding it in a child type using the "<code>override</code>" keyword as opposed to simply using the "<code>new</code>" keyword when declaring the matching method in the child type? </p>
| [
{
"answer_id": 159993,
"author": "albertein",
"author_id": 23020,
"author_profile": "https://Stackoverflow.com/users/23020",
"pm_score": 9,
"selected": true,
"text": "public class Foo\n{\n public bool DoSomething() { return false; }\n}\n\npublic class Bar : Foo\n{\n public new bo... | 2008/10/01 | [
"https://Stackoverflow.com/questions/159978",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9898/"
] |
159,983 | <p>In C++, on Linux, how can I write a function to return a temporary filename that I can then open for writing?</p>
<p>The filename should be as unique as possible, so that another process using the same function won't get the same name.</p>
| [
{
"answer_id": 160008,
"author": "twk",
"author_id": 23524,
"author_profile": "https://Stackoverflow.com/users/23524",
"pm_score": 3,
"selected": false,
"text": " #include <stdio.h>\n\n FILE *tmpfile(void);\n"
}
] | 2008/10/01 | [
"https://Stackoverflow.com/questions/159983",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/16976/"
] |
159,990 | <p>I've done some Python but have just now starting to use Ruby<br>
I could use a good explanation of the difference between "self" in these two languages. </p>
<p><strong>Obvious on first glance:</strong><br>
Self is not a keyword in Python, but there is a "self-like" value no matter what you call it.<br>
Python met... | [
{
"answer_id": 160017,
"author": "interstar",
"author_id": 8482,
"author_profile": "https://Stackoverflow.com/users/8482",
"pm_score": 3,
"selected": false,
"text": "class X :\n def __init__(a,val) :\n a.x = val\n def p(b) :\n print b.x\n\nx = X(6)\nx.p()\n"
},
{
... | 2008/10/01 | [
"https://Stackoverflow.com/questions/159990",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2242/"
] |
160,009 | <p>I went to all the documentation, also I went to the IRC channel (BTW a great community) and they told me that is not possible to create a model and limit choices in a field where the 'current user' is in a ForeignKey.
I will try to explain this with an example:</p>
<pre><code>class Project(models.Model):
name = m... | [
{
"answer_id": 160421,
"author": "ilvar",
"author_id": 1215136,
"author_profile": "https://Stackoverflow.com/users/1215136",
"pm_score": 2,
"selected": false,
"text": "choices raw_id_admin django-granular-permissions django.contrib.admin"
},
{
"answer_id": 161615,
"author": "... | 2008/10/01 | [
"https://Stackoverflow.com/questions/160009",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/16342/"
] |
160,016 | <p>Following the development of Ruby very closely I learned that detailed character encoding is implemented in Ruby 1.9. My question for now is: How may Ruby be used at the moment to talk to a database that stores all data in UTF8?</p>
<p>Background: I am involved in a new project where Ruby/RoR is at least an option.... | [
{
"answer_id": 160372,
"author": "A. Morrow",
"author_id": 10140,
"author_profile": "https://Stackoverflow.com/users/10140",
"pm_score": 0,
"selected": false,
"text": "file.txt:\n¡Hola! ¿Como estás? Leí el artículo. ¡Fue muy excellente!\n in irb:\nstr = File.read(\"file.txt\")\n => \"\... | 2008/10/01 | [
"https://Stackoverflow.com/questions/160016",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13209/"
] |
160,022 | <p>Is there anyway to determine if a ResourceManager contains a named resource? Currently I am catching the MissingManifestResourceException but I hate having to use Exceptions for non-exceptional situations. There must be some way to enumerate the name value pairs of a ResourceManager through reflection, or something... | [
{
"answer_id": 162013,
"author": "Jonathan C Dickinson",
"author_id": 24064,
"author_profile": "https://Stackoverflow.com/users/24064",
"pm_score": 6,
"selected": true,
"text": " // At startup.\n ResourceManager mgr = Resources.ResourceManager;\n List<string> keys = new List<str... | 2008/10/01 | [
"https://Stackoverflow.com/questions/160022",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3798/"
] |
160,030 | <p>Is there a macro that does it? Which DTE objects to use?</p>
| [
{
"answer_id": 160839,
"author": "Andrei Belogortseff",
"author_id": 17037,
"author_profile": "https://Stackoverflow.com/users/17037",
"pm_score": -1,
"selected": false,
"text": "#define WANT_BREAK_IN_EVERY_FUNCTION\n\n#ifdef WANT_BREAK_IN_EVERY_FUNCTION\n#define DEBUG_BREAK DebugBreak()... | 2008/10/01 | [
"https://Stackoverflow.com/questions/160030",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20310/"
] |
160,045 | <p>Is there a way to place a watch on variable and only have Visual Studio break when that value changes?</p>
<p>It would make it so much easier to find tricky state issues.</p>
<p>Can this be done?</p>
<p>Breakpoint conditions still need a breakpoint set, and I'd rather set a watch and let Visual Studio set the bre... | [
{
"answer_id": 160074,
"author": "AShelly",
"author_id": 10396,
"author_profile": "https://Stackoverflow.com/users/10396",
"pm_score": 8,
"selected": true,
"text": "&myVariable\n"
},
{
"answer_id": 160107,
"author": "Michael Petrotta",
"author_id": 23897,
"author_prof... | 2008/10/01 | [
"https://Stackoverflow.com/questions/160045",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1965/"
] |
160,051 | <p>I'm working on a database that needs to represent computers and their users. Each computer can have multiple users and each user can be associated with multiple computers, so it's a classic many-to-many relationship. However, there also needs to be a concept of a "primary" user. I have to be able to join against t... | [
{
"answer_id": 160073,
"author": "Swati",
"author_id": 12682,
"author_profile": "https://Stackoverflow.com/users/12682",
"pm_score": 0,
"selected": false,
"text": "computer_id computer_id user_id"
},
{
"answer_id": 160108,
"author": "Simurr",
"author_id": 3478,
"autho... | 2008/10/01 | [
"https://Stackoverflow.com/questions/160051",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9617/"
] |
160,082 | <p>There are a ton of drivers & famous applications that are not available in 64-bit. Adobe for instance does not provider a 64-bit Flash player plugin for Internet Explorer. And because of that, even though I am running 64-bit Vista, I have to run 32-bit IE. Microsoft Office, Visual Studio also don't ship in 64-bi... | [
{
"answer_id": 160139,
"author": "jvasak",
"author_id": 5840,
"author_profile": "https://Stackoverflow.com/users/5840",
"pm_score": 4,
"selected": false,
"text": "long"
},
{
"answer_id": 160192,
"author": "Michael Burr",
"author_id": 12711,
"author_profile": "https://... | 2008/10/01 | [
"https://Stackoverflow.com/questions/160082",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15071/"
] |
160,097 | <p>Pardon my ASP ignorance, but what's the difference?</p>
| [
{
"answer_id": 160117,
"author": "Swati",
"author_id": 12682,
"author_profile": "https://Stackoverflow.com/users/12682",
"pm_score": 5,
"selected": true,
"text": "<%# %> <%= %> <%@ %> <%: %> %= %="
},
{
"answer_id": 160205,
"author": "wangzq",
"author_id": 10564,
"aut... | 2008/10/01 | [
"https://Stackoverflow.com/questions/160097",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/781/"
] |
160,104 | <p>I've been using this long command:</p>
<pre><code>svn st | awk '/\?/ {print $2}' | xargs svn add
</code></pre>
<p>Similarly, to svn rm files I accidentally deleted with normal rm with :</p>
<pre><code>svn st | awk '/\!/ {print $2}' | xargs svn rm --force
</code></pre>
<p>I guess I can write a bash function to do... | [
{
"answer_id": 160177,
"author": "Brandon DuRette",
"author_id": 17834,
"author_profile": "https://Stackoverflow.com/users/17834",
"pm_score": 3,
"selected": false,
"text": "svnapply.sh #!/bin/bash\n#\n# Applies arbitrary commands to any svn status. e.g.\n#\n# Delete all non-svn files (e... | 2008/10/01 | [
"https://Stackoverflow.com/questions/160104",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13200/"
] |
160,105 | <p>How do you change controls' Z-order in MFC <strong>at design time</strong> - i.e. I can't use SetWindowPos or do this at runtime - I want to see the changed z-order in the designer (even if I have to resort to direct-editing the .rc code).</p>
<p>I have an MFC dialog to which I am adding controls. If there is over... | [
{
"answer_id": 160119,
"author": "Adam Pierce",
"author_id": 5324,
"author_profile": "https://Stackoverflow.com/users/5324",
"pm_score": 3,
"selected": false,
"text": "GetDlgItem(IDC_MYCONTROL)->SetWindowPos(HWND_TOP,\n 0, 0, 0, 0,\n ... | 2008/10/01 | [
"https://Stackoverflow.com/questions/160105",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8787/"
] |
160,106 | <p>What is the correct way to implement the "find as you type" behavior on a TComboBox descendant component whose style is csOwnerDrawFixed?</p>
| [
{
"answer_id": 161065,
"author": "John Thomas",
"author_id": 22599,
"author_profile": "https://Stackoverflow.com/users/22599",
"pm_score": 1,
"selected": false,
"text": "with timIncSearch do\n begin\n Enabled:=False;\n Enabled:=True;\n end;"
}
] | 2008/10/01 | [
"https://Stackoverflow.com/questions/160106",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/16120/"
] |
160,118 | <p>I have a class with both a static and a non-static interface in C#. Is it possible to have a static and a non-static method in a class with the same name and signature?</p>
<p>I get a compiler error when I try to do this, but for some reason I thought there was a way to do this. Am I wrong or is there no way to hav... | [
{
"answer_id": 160133,
"author": "Matt Hamilton",
"author_id": 615,
"author_profile": "https://Stackoverflow.com/users/615",
"pm_score": 4,
"selected": false,
"text": "class Foo\n{\n static void Bar()\n {\n }\n\n void Fizz()\n {\n Bar();\n }\n}\n"
},
{
"a... | 2008/10/01 | [
"https://Stackoverflow.com/questions/160118",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/392/"
] |
160,141 | <p>C# novice here, when the int 'max' below is 0 I get a divide by zero error, I can see why this happens but how should I handle this when max is 0? position is also an int.</p>
<pre><code> private void SetProgressBar(string text, int position, int max)
{
try
{
int percent = (100 * ... | [
{
"answer_id": 160146,
"author": "Simon",
"author_id": 24039,
"author_profile": "https://Stackoverflow.com/users/24039",
"pm_score": 4,
"selected": false,
"text": "int percent = 0\nif (max != 0) percent = (100*position) / max\n"
},
{
"answer_id": 160148,
"author": "palehorse"... | 2008/10/01 | [
"https://Stackoverflow.com/questions/160141",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
160,144 | <p>How can I find the XY coordinates of an HTML element (DIV) from JavaScript if they were not explicitly set?</p>
| [
{
"answer_id": 160189,
"author": "Diodeus - James MacFarlane",
"author_id": 12579,
"author_profile": "https://Stackoverflow.com/users/12579",
"pm_score": 3,
"selected": false,
"text": "myPos = findPos(document.getElementById('something'))\nx = myPos[0]\ny = myPos[1]\n\nfunction findPos(o... | 2008/10/01 | [
"https://Stackoverflow.com/questions/160144",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
160,147 | <p>Here's a curious one. I have a class A. It has an item of class B, which I want to initialize in the constructor of A using an initializer list, like so:</p>
<pre><code>class A {
public:
A(const B& b): mB(b) { };
private:
B mB;
};
</code></pre>
<p>Is there a way to catch exceptions that might ... | [
{
"answer_id": 160164,
"author": "Adam Wright",
"author_id": 1200,
"author_profile": "https://Stackoverflow.com/users/1200",
"pm_score": 8,
"selected": true,
"text": "C::C()\ntry : init1(), ..., initn()\n{\n // Constructor\n}\ncatch(...)\n{\n // Handle exception\n}\n"
},
{
"ans... | 2008/10/01 | [
"https://Stackoverflow.com/questions/160147",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12193/"
] |
160,175 | <p>If you have a hash (or reference to a hash) in perl with many dimensions and you want to iterate across all values, what's the best way to do it. In other words, if we have
$f->{$x}{$y}, I want something like</p>
<pre><code>foreach ($x, $y) (deep_keys %{$f})
{
}
</code></pre>
<p>instead of </p>
<pre><code>foreac... | [
{
"answer_id": 160210,
"author": "Axeman",
"author_id": 11289,
"author_profile": "https://Stackoverflow.com/users/11289",
"pm_score": 1,
"selected": false,
"text": "\"$level1_key.$level2_key.$level3_key\" @$key_stack $key_stack->[-1] join( '.', @$key\\_stack ) use constant EMPTY_ARRAY =>... | 2008/10/01 | [
"https://Stackoverflow.com/questions/160175",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14167/"
] |
160,204 | <p>I'm a Linux guy and I'm used to copying directory trees with <code>cp -a</code>. OS X doesn't have <code>-a</code> option on <code>cp</code>... but it does have the <code>ditto</code> command. I'm reading the man on <code>ditto</code> now, but is there anything I should specifically be looking out for?</p>
| [
{
"answer_id": 160242,
"author": "wprl",
"author_id": 17847,
"author_profile": "https://Stackoverflow.com/users/17847",
"pm_score": 0,
"selected": false,
"text": "cp -pR cp -dRL src target\n"
},
{
"answer_id": 160260,
"author": "joelhardi",
"author_id": 11438,
"author... | 2008/10/01 | [
"https://Stackoverflow.com/questions/160204",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2601671/"
] |
160,214 | <p>I am trying to get the value of some ListViewSubItems, but I have no idea what values it uses for its keys. I have some simple code:</p>
<pre><code> protected override void OnItemDrag(ItemDragEventArgs e)
{
base.OnItemDrag(e);
ListViewItem item = e.Item as ListViewItem;
s... | [
{
"answer_id": 160235,
"author": "dguaraglia",
"author_id": 2384,
"author_profile": "https://Stackoverflow.com/users/2384",
"pm_score": 0,
"selected": false,
"text": "protected override void OnItemDrag(ItemDragEventArgs e)\n{\n base.OnItemDrag(e); \n ListViewItem item = ... | 2008/10/01 | [
"https://Stackoverflow.com/questions/160214",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1053/"
] |
160,216 | <p>I'd like something like this:</p>
<pre><code>each[i_, {1,2,3},
Print[i]
]
</code></pre>
<p>Or, more generally, to destructure arbitrary stuff in the list you're looping over, like:</p>
<pre><code>each[{i_, j_}, {{1,10}, {2,20}, {3,30}},
Print[i*j]
]
</code></pre>
<p>Usually you want to use <code>Map</code> o... | [
{
"answer_id": 160219,
"author": "dreeves",
"author_id": 4234,
"author_profile": "https://Stackoverflow.com/users/4234",
"pm_score": 3,
"selected": false,
"text": "Scan pattern body list SetAttributes[ForEach, HoldAll]; (* ForEach[pattern, list, body] *)\nForEach[pat_, lst_... | 2008/10/01 | [
"https://Stackoverflow.com/questions/160216",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4234/"
] |
160,218 | <p>I'm personally an advocate of the <a href="https://en.wikipedia.org/wiki/%3F:" rel="nofollow noreferrer">ternary operator</a>: <code>() ? : </code></p>
<p>I do realize that it has its place, but I have come across many programmers that are completely against ever using it, and some that use it too often.</p>
<p>What... | [
{
"answer_id": 160231,
"author": "Erik Forbes",
"author_id": 16942,
"author_profile": "https://Stackoverflow.com/users/16942",
"pm_score": 3,
"selected": false,
"text": "var e = new XElement(\"Something\",\n param == null ? new XElement(\"Value\", \"Default\")\n : new... | 2008/10/01 | [
"https://Stackoverflow.com/questions/160218",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/21804/"
] |
160,222 | <p>I have a simple web form that has a several fields and a gridview on it. I also have a save and cancel button. </p>
<p>I would like a way to undo what was done to the data on the form when the user presses cancel. This is simple enough with the fields however since changes to the gridview happen in real time agains... | [
{
"answer_id": 160285,
"author": "Keith Williams",
"author_id": 20376,
"author_profile": "https://Stackoverflow.com/users/20376",
"pm_score": 0,
"selected": false,
"text": "(MyObject)Session[\"MyObject\"] MyObject obj = (MyObject)Session[\"MyObject\"]; MyObject.Save()"
}
] | 2008/10/01 | [
"https://Stackoverflow.com/questions/160222",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/22264/"
] |
160,233 | <p>I tried this in mysql:</p>
<pre><code>mysql> alter table region drop column country_id;
</code></pre>
<p>And got this:</p>
<pre><code>ERROR 1025 (HY000): Error on rename of './product/#sql-14ae_81' to
'./product/region' (errno: 150)
</code></pre>
<p>Any ideas? Foreign key stuff?</p>
| [
{
"answer_id": 179501,
"author": "Harrison Fisk",
"author_id": 16111,
"author_profile": "https://Stackoverflow.com/users/16111",
"pm_score": 7,
"selected": false,
"text": "shell$ perror 150\nMySQL error code 150: Foreign key constraint is incorrectly formed\n SHOW ENGINE INNODB STATUS"
... | 2008/10/01 | [
"https://Stackoverflow.com/questions/160233",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2601671/"
] |
160,245 | <p>I'm trying:</p>
<pre><code>import commands
print commands.getoutput("ps -u 0")
</code></pre>
<p>But it doesn't work on os x.
os instead of commands gives the same output:
USER PID %CPU %MEM VSZ RSS TT STAT STARTED TIME COMMAND</p>
<p>nothing more</p>
| [
{
"answer_id": 160271,
"author": "jmissao",
"author_id": 20883,
"author_profile": "https://Stackoverflow.com/users/20883",
"pm_score": 0,
"selected": false,
"text": "import os\nprint os.system(\"ps -u 0\")\n"
},
{
"answer_id": 160284,
"author": "Thomas Wouters",
"author_i... | 2008/10/01 | [
"https://Stackoverflow.com/questions/160245",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7883/"
] |
160,250 | <p>Just that, if you embed an icon:</p>
<pre><code>[Embed(source='icons/checkmark.png')]
private static var CheckMark:Class;
</code></pre>
<p>You end up with a dynamic class. You can pretty easily assign the icon to a button at runtime by calling the setStyle method:</p>
<pre><code>var btn:Button = new Button();
btn... | [
{
"answer_id": 163586,
"author": "Aaron",
"author_id": 23965,
"author_profile": "https://Stackoverflow.com/users/23965",
"pm_score": 0,
"selected": false,
"text": "button.setStyle(\"customIconAlpha\", .4);\n var alpha:Number = getStyle(\"customIconAlpha\") as Number;\n"
}
] | 2008/10/01 | [
"https://Stackoverflow.com/questions/160250",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/16258/"
] |
160,290 | <p>After I call <code>getpwuid(uid)</code>, I have a reference to a pointer. Should I free that pointer when I don't use it anymore? Reading the man pages, it says that it makes reference to some static area, that may be overwritten by subsequent calls to the same functions, so I'm not sure if I should touch that memor... | [
{
"answer_id": 162233,
"author": "Steve Baker",
"author_id": 13566,
"author_profile": "https://Stackoverflow.com/users/13566",
"pm_score": 3,
"selected": false,
"text": "*_r getpwuid_r()"
}
] | 2008/10/01 | [
"https://Stackoverflow.com/questions/160290",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11384/"
] |
160,292 | <p>I'm writing a library which is to be dynamically loaded in C++. </p>
<p>I'd like to read argc and argv (for debugging reasons) from within my code, however I do not have access to the main function. Is there any way to retrieve the command line (both Windows and Linux solution would be nice).</p>
<p>Thanks,
Dan</p... | [
{
"answer_id": 160632,
"author": "Shadow2531",
"author_id": 1697,
"author_profile": "https://Stackoverflow.com/users/1697",
"pm_score": 1,
"selected": false,
"text": "\n#include <windows.h>\n#include <string>\n#include <vector>\n#include <cwchar>\n#include <cstdio>\n#include <clocale>\nu... | 2008/10/01 | [
"https://Stackoverflow.com/questions/160292",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4697/"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.