qid int64 4 22.2M | question stringlengths 18 48.3k | answers list | date stringlengths 10 10 | metadata list |
|---|---|---|---|---|
69,440 | <p>I'm wondering if there's any way to write CSS specifically for Safari using only CSS. I know there has to be something out there, but I haven't found it yet.</p>
| [
{
"answer_id": 70827,
"author": "Rich Adams",
"author_id": 10018,
"author_profile": "https://Stackoverflow.com/users/10018",
"pm_score": 3,
"selected": false,
"text": ".blah { color: #fff; }\n.blah { color: #000;# }\n"
},
{
"answer_id": 71750,
"author": "Bryan M.",
"autho... | 2008/09/16 | [
"https://Stackoverflow.com/questions/69440",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8970/"
] |
69,445 | <p>I'm using the After Effects CS3 Javascript API to dynamically create and change text layers in a composition.</p>
<p>Or at least I'm trying to because I can't seem to find the right property to change to alter the actual text of the TextLayer object.</p>
| [
{
"answer_id": 73071,
"author": "Gareth Simpson",
"author_id": 147,
"author_profile": "https://Stackoverflow.com/users/147",
"pm_score": 3,
"selected": true,
"text": "var theComposition = app.project.item(1);\nvar theTextLayer = theComposition.layers[1];\ntheTextLayer.property(\"Source T... | 2008/09/16 | [
"https://Stackoverflow.com/questions/69445",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/147/"
] |
69,448 | <p>I am using VS2008 and Resharper. Resharper creates a directory _Resharper.ProjectName. These files provide no value for source control that I am aware of and cause issues when committing changes. How can I get SVN to ignore them? I am using TortoiseSVN as my interface for SVN.</p>
<p>EDIT: You guys are fast.</p>
| [
{
"answer_id": 69461,
"author": "Daniel Spiewak",
"author_id": 9815,
"author_profile": "https://Stackoverflow.com/users/9815",
"pm_score": 4,
"selected": false,
"text": "_Resharper.*"
},
{
"answer_id": 69472,
"author": "user11087",
"author_id": 11087,
"author_profile"... | 2008/09/16 | [
"https://Stackoverflow.com/questions/69448",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1865/"
] |
69,480 | <p>I have a script that renders graphs in gnuplot. The graphs all end up with an ugly white background. How do I change this? (Ideally, with a command that goes into a gnuplot script, as opposed to a command-line option or something in a settings file)</p>
| [
{
"answer_id": 69512,
"author": "raldi",
"author_id": 7598,
"author_profile": "https://Stackoverflow.com/users/7598",
"pm_score": 4,
"selected": true,
"text": "set terminal png x222222 xffffff\n"
},
{
"answer_id": 7334137,
"author": "hsxz",
"author_id": 932735,
"autho... | 2008/09/16 | [
"https://Stackoverflow.com/questions/69480",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7598/"
] |
69,497 | <p>I'm sick and tired of manually tracking my branches and merges across my repository! It's too error prone. In a world where everyone seems to get the idea of reducing duplication and automating everything, subversion branching/merging feels like it's left over from the 80's. What is a good alternative to subversion that has excellent branching and merging support without adding the complexity of a distributed SCM paradigm? Ideally it would be free, but if I have to shell out some cash I might be inclined if it's good enough.</p>
| [
{
"answer_id": 60791348,
"author": "bahrep",
"author_id": 761095,
"author_profile": "https://Stackoverflow.com/users/761095",
"pm_score": 0,
"selected": false,
"text": "svn:mergeinfo"
}
] | 2008/09/16 | [
"https://Stackoverflow.com/questions/69497",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10945/"
] |
69,539 | <p>I am curious if anyone have used UnderC, Cint, Cling, Ch, or any other C++ interpreter and could share their experience.</p>
| [
{
"answer_id": 9446693,
"author": "Shep",
"author_id": 915501,
"author_profile": "https://Stackoverflow.com/users/915501",
"pm_score": 5,
"selected": false,
"text": "if (energy > 30) { \n float correction = 2.4;\n}\nelse {\n float correction = 6.3;\n}\n\nsomevalue += correction; \n... | 2008/09/16 | [
"https://Stackoverflow.com/questions/69539",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9706/"
] |
69,546 | <p>I have a multi-frame layout. One of the frames contains a form, which I am submitting through XMLHttpRequest. Now when I use document.write() to rewrite the frame with the form, and the new page I am adding contains any javascript then the javascript is not exectuted in IE6?</p>
<p>For example:</p>
<pre><code>document.write("<html><head><script>alert(1);</script></head><body>test</body></html>");
</code></pre>
<p>In the above case the page content is replaced with test but the alert() isn't executed. This works fine in Firefox.</p>
<p>What is a workaround to the above problem? </p>
| [
{
"answer_id": 69655,
"author": "dimarzionist",
"author_id": 10778,
"author_profile": "https://Stackoverflow.com/users/10778",
"pm_score": 1,
"selected": false,
"text": "<script>"
},
{
"answer_id": 159840,
"author": "Ates Goral",
"author_id": 23501,
"author_profile": ... | 2008/09/16 | [
"https://Stackoverflow.com/questions/69546",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
69,561 | <p>gnuplot is giving the error: "sh: kpsexpand: not found." </p>
<p>I feel like the guy in Office Space when he saw "PC LOAD LETTER". What the heck is kpsexpand?</p>
<p>I searched Google, and there were a lot of pages that make reference to kpsexpand, and say not to worry about it, but I can't find anything, anywhere that actually explains <em>what it is.</em></p>
<p>Even the man page stinks:</p>
<pre><code>$ man kpsexpand
kpsetool - script to make teTeX-style kpsetool, kpsexpand, and kpsepath available
</code></pre>
<p>Edit: Again, I'm not asking what to do -- I know what to do, thanks to Google. What I'm wondering is what the darn thing <em>is.</em></p>
| [
{
"answer_id": 2538565,
"author": "Born2Smile",
"author_id": 250287,
"author_profile": "https://Stackoverflow.com/users/250287",
"pm_score": 2,
"selected": false,
"text": "$ kpsexpand $VAR1"
}
] | 2008/09/16 | [
"https://Stackoverflow.com/questions/69561",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7598/"
] |
69,591 | <p>I want to create a regexp in Emacs that matches exactly 3 digits. For example, I want to match the following:</p>
<pre><code>123
345
789
</code></pre>
<p>But not</p>
<pre><code>1234
12
12 23
</code></pre>
<p>If I use <code>[0-9]+</code> I match any single string of digits. I thought <code>[0-9]{3}</code> would work, but when tested in re-builder it doesn't match anything.</p>
| [
{
"answer_id": 69593,
"author": "mike511",
"author_id": 9593,
"author_profile": "https://Stackoverflow.com/users/9593",
"pm_score": -1,
"selected": false,
"text": "[0-9][0-9][0-9]\n"
},
{
"answer_id": 69615,
"author": "Joe Hildebrand",
"author_id": 8388,
"author_profi... | 2008/09/16 | [
"https://Stackoverflow.com/questions/69591",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6180/"
] |
69,627 | <p>I am looking for a simple unpatented one-way encryption algorithm, preferably in c.
I would like to use it to validate passwords.</p>
| [
{
"answer_id": 69639,
"author": "Jeremy",
"author_id": 1114,
"author_profile": "https://Stackoverflow.com/users/1114",
"pm_score": 5,
"selected": true,
"text": ":-)"
}
] | 2008/09/16 | [
"https://Stackoverflow.com/questions/69627",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3740/"
] |
69,637 | <p>I am serializing a <code>JPEG</code> Image in <code>c#.net</code>. I am simply converting it into a byte steam and sending it through web service. </p>
<p>I observed that serialized byte stream is 30 times more than that of the size of actual image. Can any one <strong>suggest me a better approach</strong> to serialize and stay relative to the size of the actual image? </p>
| [
{
"answer_id": 69709,
"author": "Ash",
"author_id": 11194,
"author_profile": "https://Stackoverflow.com/users/11194",
"pm_score": -1,
"selected": false,
"text": "byte[] arr = File.ReadAllBytes(filename);\nstring str = Convert.ToBase64String(arr);\n"
}
] | 2008/09/16 | [
"https://Stackoverflow.com/questions/69637",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
69,645 | <p>I want to take a screenshot via a python script and unobtrusively save it.</p>
<p>I'm only interested in the Linux solution, and should support any X based environment.</p>
| [
{
"answer_id": 70237,
"author": "Slava V",
"author_id": 37141,
"author_profile": "https://Stackoverflow.com/users/37141",
"pm_score": 3,
"selected": false,
"text": "import ImageGrab\nimg = ImageGrab.grab()\nimg.save('test.jpg','JPEG')\n"
},
{
"answer_id": 769221,
"author": "J... | 2008/09/16 | [
"https://Stackoverflow.com/questions/69645",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1724701/"
] |
69,676 | <p>How do I get Asterisk to forward incoming calls based on matching the incoming call number with a number to forward to? Both numbers are stored in a MySQL database.</p>
| [
{
"answer_id": 75492,
"author": "Jeremy Wadhams",
"author_id": 8995,
"author_profile": "https://Stackoverflow.com/users/8995",
"pm_score": 2,
"selected": false,
"text": "/usr/bin/php"
},
{
"answer_id": 1869230,
"author": "Aaron",
"author_id": 11176,
"author_profile": ... | 2008/09/16 | [
"https://Stackoverflow.com/questions/69676",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11176/"
] |
69,692 | <p>What is the best way to setup one Linux box to listen on its serial port for incoming connections? I've done a lot of googling but I can't find the right combination of commands to actually get them to talk!</p>
<p>My main objective is to provide a serial interface to running instances of kvm/qemu VMs. They currently only have a VNC interface (they are on headless servers, no X). I can get the VM to create a serial device by starting it with the -serial file: flag, but how to talk to it, is a whole other problem. Both boxes are running Ubuntu 8.04.</p>
| [
{
"answer_id": 74208,
"author": "catfood",
"author_id": 12802,
"author_profile": "https://Stackoverflow.com/users/12802",
"pm_score": 0,
"selected": false,
"text": "chown *youruser* /dev/tty1\n"
}
] | 2008/09/16 | [
"https://Stackoverflow.com/questions/69692",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11105/"
] |
69,695 | <p>I am trying to use a stringstream object in VC++ (VStudio 2003) butI am getting an error when I use the overloaded << operator to try and set some manipulators. </p>
<p>I am trying the following: </p>
<pre><code>int SomeInt = 1;
stringstream StrStream;
StrStream << std::setw(2) << SomeInt;
</code></pre>
<p>This will not compile (error C2593: 'operator <<' is ambiguous).<br>
Does VStudio 2003 support using manipulators in this way?<br>
I know that I can just set the width directly on the stringstream object e.g. StrStream.width(2);<br>
I was wondering why the more usual method doesn't work?</p>
| [
{
"answer_id": 69721,
"author": "Jesse Beder",
"author_id": 112,
"author_profile": "https://Stackoverflow.com/users/112",
"pm_score": 2,
"selected": true,
"text": "#include <iostream>\n#include <sstream>\n#include <iomanip>\n\nint main()\n{\n int SomeInt = 1;\n std::stringstream StrS... | 2008/09/16 | [
"https://Stackoverflow.com/questions/69695",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1682/"
] |
69,702 | <pre><code>public static void main(String[] args) {
List<? extends Object> mylist = new ArrayList<Object>();
mylist.add("Java"); // compile error
}
</code></pre>
<p>The above code does not allow you to add elements to the list and wild cards can only be used as a signature in methods, again not for adding but only for accessing.
In this case what purpose does the above fulfil ??</p>
| [
{
"answer_id": 69815,
"author": "Henning",
"author_id": 7034,
"author_profile": "https://Stackoverflow.com/users/7034",
"pm_score": 1,
"selected": false,
"text": "Stack<E>"
},
{
"answer_id": 69825,
"author": "Stu Thompson",
"author_id": 2961,
"author_profile": "https:... | 2008/09/16 | [
"https://Stackoverflow.com/questions/69702",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11193/"
] |
69,711 | <p>I would like to know how to infer coercions (a.k.a. implicit conversions) during type inference. I am using the type inference scheme described in <a href="http://people.cs.uu.nl/bastiaan/phdthesis/index.html" rel="noreferrer">Top Quality Type Error Messages</a> by Bastiaan Heeren, but I'd assume that the general idea is probably the same in all Hindley-Milner-esque approaches.</p>
<p>It seems like coercion could be treated as a form of overloading, but the overloading approach described in this paper doesn't consider (at least not in a way I could follow) overloading based on requirements that the context places on return type, which is a must for coercions. I'm also concerned that such an approach might make it difficult to give priority to the identity coercion, and also to respect the transitive closure of coercibility. I can see sugaring each coercible expression, say <em>e</em>, to coerce(<em>e</em>), but sugaring it to coerce(coerce(coerce(... coerce(<em>e</em>) ...))) for some depth equal to the maximum nesting of coercions seems silly, and also limits the coercibility relation to something with a finite transitive closure whose depth is independent of the context, which seems (needlessly?) restrictive.</p>
| [
{
"answer_id": 2048127,
"author": "mayfly",
"author_id": 223690,
"author_profile": "https://Stackoverflow.com/users/223690",
"pm_score": 1,
"selected": false,
"text": "foo x"
}
] | 2008/09/16 | [
"https://Stackoverflow.com/questions/69711",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11173/"
] |
69,722 | <p>I have a dl containing some input boxes that I "clone" with a bit of JavaScript like: </p>
<pre><code>var newBox = document.createElement('dl');
var sourceBox = document.getElementById(oldkey);
newBox.innerHTML = sourceBox.innerHTML;
newBox.id = newkey;
document.getElementById('boxes').appendChild(columnBox);
</code></pre>
<p>In IE, the form in sourceBox is duplicated in newBox, complete with user-supplied values. In Firefox, last value entered in the orginal sourceBox is not present in newBox. How do I make this "stick?"</p>
| [
{
"answer_id": 69795,
"author": "rpetrich",
"author_id": 4007,
"author_profile": "https://Stackoverflow.com/users/4007",
"pm_score": 1,
"selected": false,
"text": "cloneNode"
},
{
"answer_id": 80723,
"author": "Ross Morrissey",
"author_id": 6997,
"author_profile": "ht... | 2008/09/16 | [
"https://Stackoverflow.com/questions/69722",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6997/"
] |
69,738 | <p>I am working with an open-source UNIX tool that is implemented in C++, and I need to change some code to get it to do what I want. I would like to make the smallest possible change in hopes of getting my patch accepted upstream. Solutions that are implementable in standard C++ and do not create more external dependencies are preferred.</p>
<p>Here is my problem. I have a C++ class -- let's call it "A" -- that currently uses fprintf() to print its heavily formatted data structures to a file pointer. In its print function, it also recursively calls the identically defined print functions of several member classes ("B" is an example). There is another class C that has a member std::string "foo" that needs to be set to the print() results of an instance of A. Think of it as a to_str() member function for A.</p>
<p>In pseudocode:</p>
<pre><code>class A {
public:
...
void print(FILE* f);
B b;
...
};
...
void A::print(FILE *f)
{
std::string s = "stuff";
fprintf(f, "some %s", s);
b.print(f);
}
class C {
...
std::string foo;
bool set_foo(std::str);
...
}
...
A a = new A();
C c = new C();
...
// wish i knew how to write A's to_str()
c.set_foo(a.to_str());
</code></pre>
<p>I should mention that C is fairly stable, but A and B (and the rest of A's dependents) are in a state of flux, so the less code changes necessary the better. The current print(FILE* F) interface also needs to be preserved. I have considered several approaches to implementing A::to_str(), each with advantages and disadvantages:</p>
<ol>
<li><p>Change the calls to fprintf() to sprintf()</p>
<ul>
<li>I wouldn't have to rewrite any format strings</li>
<li>print() could be reimplemented as: fprint(f, this.to_str());</li>
<li>But I would need to manually allocate char[]s, merge a lot of c strings , and finally convert the character array to a std::string</li>
</ul></li>
<li><p>Try to catch the results of a.print() in a string stream</p>
<ul>
<li>I would have to convert all of the format strings to << output format. There are hundreds of fprintf()s to convert :-{</li>
<li>print() would have to be rewritten because there is no standard way that I know of to create an output stream from a UNIX file handle (though <a href="http://synflood.at/blog/index.php?/archives/456-One-word-of-warning-about-stdio_filebuf.html" rel="nofollow noreferrer">this guy says it may be possible</a>).</li>
</ul></li>
<li><p>Use Boost's string <a href="http://www.boost.org/doc/libs/1_36_0/libs/format/doc/format.html" rel="nofollow noreferrer">format library</a></p>
<ul>
<li>More external dependencies. Yuck.</li>
<li>Format's syntax is different enough from printf() to be annoying: </li>
</ul>
<p>printf(format_str, args) -> cout << boost::format(format_str) % arg1 % arg2 % etc</p></li>
<li><p>Use Qt's <a href="https://doc.qt.io/qt-5/qstring.html#asprintf%3E" rel="nofollow noreferrer">QString::asprintf()</a></p>
<ul>
<li>A different external dependency.</li>
</ul></li>
</ol>
<p>So, have I exhausted all possible options? If so, which do you think is my best bet? If not, what have I overlooked?</p>
<p>Thanks.</p>
| [
{
"answer_id": 69765,
"author": "bernhardrusch",
"author_id": 3056,
"author_profile": "https://Stackoverflow.com/users/3056",
"pm_score": 5,
"selected": true,
"text": "sprintf(buffer, \"This is a string with some %s and %d numbers\", \"strings\", 42);\n"
},
{
"answer_id": 69911,
... | 2008/09/16 | [
"https://Stackoverflow.com/questions/69738",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8146/"
] |
69,743 | <p>I am trying to populate a string with a double value using a <code>sprintf</code> like this:</p>
<pre><code>sprintf(S, "%f", val);
</code></pre>
<p>But the precision is being cut off to six decimal places. I need about 10 decimal places for the precision.</p>
<p>How can that be achieved?</p>
| [
{
"answer_id": 69747,
"author": "Yann Ramin",
"author_id": 9167,
"author_profile": "https://Stackoverflow.com/users/9167",
"pm_score": 3,
"selected": false,
"text": "sprintf(S, \"%.10f\", val);\n"
},
{
"answer_id": 75791,
"author": "EvilTeach",
"author_id": 7734,
"aut... | 2008/09/16 | [
"https://Stackoverflow.com/questions/69743",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11212/"
] |
69,748 | <p>Another easy one hopefully.</p>
<p>Let's say I have a collection like this:</p>
<pre><code>List<DateTime> allDates;
</code></pre>
<p>I want to turn that into </p>
<pre><code>List<List<DateTime>> dividedDates;
</code></pre>
<p>where each List in 'dividedDates' contains all of the dates in 'allDates' that belong to a distinct year.</p>
<p>Is there a bit of LINQ trickery that my tired mind can't pick out right now?</p>
<p><strong>Solution</strong></p>
<p>The Accepted Answer is correct.</p>
<p>Thanks, I don't think I was aware of the 'into' bit of GroupBy and I was trying to use the .GroupBy() sort of methods rather than the SQL like syntax. And thanks for confirming the ToList() amendment and including it in the Accepted Answer :-)</p>
| [
{
"answer_id": 69769,
"author": "Mark Cidade",
"author_id": 1659,
"author_profile": "https://Stackoverflow.com/users/1659",
"pm_score": 4,
"selected": true,
"text": "var q = from date in allDates \n group date by date.Year into datesByYear\n select datesByYear.ToList();\... | 2008/09/16 | [
"https://Stackoverflow.com/questions/69748",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/364/"
] |
69,761 | <p>I'd like to to associate a file extension to the current executable in C#.
This way when the user clicks on the file afterwards in explorer, it'll run my executable with the given file as the first argument.
Ideally it'd also set the icon for the given file extensions to the icon for my executable.
Thanks all.</p>
| [
{
"answer_id": 899360,
"author": "Paul J",
"author_id": 111237,
"author_profile": "https://Stackoverflow.com/users/111237",
"pm_score": 3,
"selected": false,
"text": "Other Project Types"
},
{
"answer_id": 28585998,
"author": "Strong84",
"author_id": 1422691,
"author_... | 2008/09/16 | [
"https://Stackoverflow.com/questions/69761",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
69,764 | <p>There are many options for editing and writing Stored Procedures in Oracle; what is the best tool for you and why? (one tool per answer.)</p>
| [
{
"answer_id": 69876,
"author": "Andrew",
"author_id": 5662,
"author_profile": "https://Stackoverflow.com/users/5662",
"pm_score": 4,
"selected": false,
"text": "TABLE."
}
] | 2008/09/16 | [
"https://Stackoverflow.com/questions/69764",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4491/"
] |
69,766 | <p>I'm working on VS 2005 and something has gone wrong on my machine. Suddenly, out of the blue, I can no longer build deployment files.
The build message is:</p>
<pre><code>ERROR: An error occurred generating a bootstrapper: Invalid syntax.
ERROR: General failure building bootstrapper
ERROR: Unrecoverable build error
</code></pre>
<p>A quick Google search brings up the last 2 lines, but nobody in cyberspace has ever reported the first message before. (Hooray! I'm first at SOMETHING on the 'net!)</p>
<p>Other machines in my office are able to do the build.
My machine has been able to do the build before. I have no idea what changed that upset the delicate balance of things on my box.
I have also tried all the traditional rituals i.e. closing Visual Studio, blowing away all the bin and obj folders, rebooting, etc. to no avail.</p>
<p>For simplicity's sake, I created a little "Hello World" app with a deployment file.
Herewith the build output:</p>
<pre><code>------ Build started: Project: HelloWorld, Configuration: Debug Any CPU ------
HelloWorld -> C:\Vault\Multi Client\Tests\HelloWorld\HelloWorld\bin\Debug\HelloWorld.exe
------ Starting pre-build validation for project 'HelloWorldSetup' ------
------ Pre-build validation for project 'HelloWorldSetup' completed ------
------ Build started: Project: HelloWorldSetup, Configuration: Debug ------
Building file 'C:\Vault\Multi Client\Tests\HelloWorld\HelloWorldSetup\Debug\HelloWorldSetup.msi'...
ERROR: An error occurred generating a bootstrapper: Invalid syntax.
ERROR: General failure building bootstrapper
ERROR: Unrecoverable build error
========== Build: 1 succeeded or up-to-date, 1 failed, 0 skipped ==========
</code></pre>
<p>I am using:</p>
<ul>
<li>MS Visual Studio 2005 Version 8.0.50727.762 (SP .050727-7600) </li>
<li>.NET Framework Version 2.0.50727 </li>
<li>OS: Windows XP Pro</li>
</ul>
<p>Again, I have no idea what changed. All I know is that one day everything was working fine; the next day I suddenly can't do any deployment builds at all (though all other projects still compile fine).</p>
<p>I posted <a href="http://social.msdn.microsoft.com/forums/en-US/vssetup/thread/240c82e9-1696-4618-846c-aaae21427a52/" rel="nofollow noreferrer">this on MSDN</a> about a month ago, and they don't seem to know what's going on, either.</p>
<p>Anyone have any idea what this is about?</p>
<hr>
<p>@Brad Wilson: Thanks, but if you read my original post, you'll see that I already did start an entire solution from scratch, and that didn't help.</p>
<hr>
<p>@deemer: I went through all the pain of uninstalling and reinstalling, even though I didn't have your recommended reading while waiting... and - Misery! - still the same error reappears. It seems that my computer has somehow been branded as unsuitable for doing deployment builds ever again.</p>
<p>Does anyone have any idea where this "secret switch" might be?</p>
| [
{
"answer_id": 8539010,
"author": "Adam Caviness",
"author_id": 9130,
"author_profile": "https://Stackoverflow.com/users/9130",
"pm_score": 1,
"selected": false,
"text": "An error occurred generating a bootstrapper: Unable to finish updating resource for [YourAssemblyPath] with error 800... | 2008/09/16 | [
"https://Stackoverflow.com/questions/69766",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7850/"
] |
69,768 | <p>Mac OS X ships with apache pre-installed, but the files are in non-standard locations. This question is a place to collect information about where configuration files live, and how to tweak the apache installation to do things like serve php pages.</p>
| [
{
"answer_id": 69784,
"author": "ctcherry",
"author_id": 10322,
"author_profile": "https://Stackoverflow.com/users/10322",
"pm_score": 5,
"selected": true,
"text": "#LoadModule php5_module libexec/apache2/libphp5.so\n"
},
{
"answer_id": 69798,
"author": "Larry OBrien",
... | 2008/09/16 | [
"https://Stackoverflow.com/questions/69768",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3575/"
] |
69,788 | <p>I recently installed Windows 2008 Server to replace a crashed hard drive on a web server with a variety of web pages including several classic ASP applications. One of these makes extensive use of file uploads using a com tool that has worked for several years.</p>
<p>More information: </p>
<p>My users did not provide good information in that very small zips (65K) work once I tested it myself, but larger ones do not. I did not test for the cut-off, but 365K fails. And it is not only zip files after all. A 700K doc file failed also. ErrorCode 800a0035.</p>
| [
{
"answer_id": 76885,
"author": "Kal",
"author_id": 11227,
"author_profile": "https://Stackoverflow.com/users/11227",
"pm_score": 1,
"selected": false,
"text": " <sectionGroup name=\"system.webServer\">\n <section name=\"asp\" overrideModeDefault=\"Deny\" />\n"
}
] | 2008/09/16 | [
"https://Stackoverflow.com/questions/69788",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11227/"
] |
69,828 | <p>Our security manager dynamically inserts a bit of javascript at the top of every html page when a page is requested by the client. It is inserted above the DOCTYPE statement. I think this might be the cause of the layout problems I am having.</p>
<p>Ideas anyone?</p>
| [
{
"answer_id": 72063,
"author": "pdc",
"author_id": 8925,
"author_profile": "https://Stackoverflow.com/users/8925",
"pm_score": 2,
"selected": false,
"text": "DOCTYPE"
},
{
"answer_id": 28060787,
"author": "Joe Hansen",
"author_id": 756329,
"author_profile": "https://... | 2008/09/16 | [
"https://Stackoverflow.com/questions/69828",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11249/"
] |
69,835 | <p>I have to admit that I always forgot the syntactical intracacies of the naming patterns for Nant (eg. those used in filesets). The double asterisk/single asterisk stuff seems to be very forgettable in my mind.</p>
<p>Can someone provide a definitive guide to the naming patterns?</p>
| [
{
"answer_id": 86915,
"author": "benzado",
"author_id": 10947,
"author_profile": "https://Stackoverflow.com/users/10947",
"pm_score": 9,
"selected": true,
"text": "*.c"
},
{
"answer_id": 8821223,
"author": "Aditya Kumar Shrivastava",
"author_id": 948547,
"author_profi... | 2008/09/16 | [
"https://Stackoverflow.com/questions/69835",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4884/"
] |
69,843 | <p>Does anybody have useful example of <code>this</code> assignment inside a C# method? I have been asked for it once during job interview, and I am still interested in answer myself. </p>
| [
{
"answer_id": 69880,
"author": "Kimoz",
"author_id": 7753,
"author_profile": "https://Stackoverflow.com/users/7753",
"pm_score": 0,
"selected": false,
"text": "private readonly IProvider provider;\npublic MyClass(IProvider provider)\n{\n this.provider = provider;\n}\n"
},
{
"an... | 2008/09/16 | [
"https://Stackoverflow.com/questions/69843",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11256/"
] |
69,849 | <p>When is it a good idea to use factory methods within an object instead of a Factory class?</p>
| [
{
"answer_id": 399988,
"author": "Rasmus Faber",
"author_id": 5542,
"author_profile": "https://Stackoverflow.com/users/5542",
"pm_score": 7,
"selected": false,
"text": "class Foo{\n public Foo(bool withBar);\n}\n"
},
{
"answer_id": 2430719,
"author": "kyoryu",
"author_id... | 2008/09/16 | [
"https://Stackoverflow.com/questions/69849",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
69,859 | <p>Besides the LD_PRELOAD trick , and Linux Kernel Modules that replace a certain syscall with one provided by you , is there any possibility to intercept a syscall ( open for example ) , so that it first goes through your function , before it reaches the actual open ?</p>
| [
{
"answer_id": 69884,
"author": "DJ Capelis",
"author_id": 10943,
"author_profile": "https://Stackoverflow.com/users/10943",
"pm_score": 4,
"selected": false,
"text": "/*\n * File: soft_atimes.c\n * Author: D.J. Capelis\n *\n * Compile:\n * gcc -fPIC -c -o soft_atimes.o soft_atimes.c\n *... | 2008/09/16 | [
"https://Stackoverflow.com/questions/69859",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11234/"
] |
69,871 | <p>What are the essential vim commands? What does a new-user need to know to keep themselves from getting into trouble? One command per comment, please.</p>
| [
{
"answer_id": 69896,
"author": "perimosocordiae",
"author_id": 10601,
"author_profile": "https://Stackoverflow.com/users/10601",
"pm_score": 1,
"selected": false,
"text": "a - switch to insert mode (after the cursor)\nesc - return to command mode\n:wq - save and quit\n:q - quit (no s... | 2008/09/16 | [
"https://Stackoverflow.com/questions/69871",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3575/"
] |
69,913 | <p>What is the reason browsers do not correctly recognize:</p>
<pre><code><script src="foobar.js" /> <!-- self-closing script element -->
</code></pre>
<p>Only this is recognized:</p>
<pre><code><script src="foobar.js"></script>
</code></pre>
<p>Does this break the concept of XHTML support?</p>
<p>Note: This statement is correct at least for all IE (6-8 beta 2).</p>
| [
{
"answer_id": 69984,
"author": "squadette",
"author_id": 7754,
"author_profile": "https://Stackoverflow.com/users/7754",
"pm_score": 10,
"selected": true,
"text": "EMPTY"
},
{
"answer_id": 69996,
"author": "rpetrich",
"author_id": 4007,
"author_profile": "https://Sta... | 2008/09/16 | [
"https://Stackoverflow.com/questions/69913",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10778/"
] |
69,923 | <p>We're having problem with a huge number of legacy stored procedures at work. Do you guys recommend any tool the can help better understand those procedures? Some kind of reverse engineering that indentifies inter-procedure dependencies and/or procedure vs. tables dependencies. Can be a free or commercial tool.</p>
<p>Thanks!</p>
| [
{
"answer_id": 93967,
"author": "ConcernedOfTunbridgeWells",
"author_id": 15401,
"author_profile": "https://Stackoverflow.com/users/15401",
"pm_score": 3,
"selected": false,
"text": "sys.sql_dependencies"
},
{
"answer_id": 94484,
"author": "jkinter",
"author_id": 10405,
... | 2008/09/16 | [
"https://Stackoverflow.com/questions/69923",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4213/"
] |
69,927 | <p>I have some domain logic implemented in a number of POJOs. I want to write a Swing user interface to allow the user to initiate and see the results of various domain actions.</p>
<p>What's the best pattern/framework/library for communications between the UI and the domain? This boils down into:</p>
<ul>
<li>the UI being able to convert a user gesture into a domain action</li>
<li>the domain being able to send state/result information back to the UI for display purposes</li>
</ul>
<p>I'm aware of MVC as a broad concept and have fiddled with the Observer pattern (whose Java implementation has some drawbacks if I understand correctly), but I'm wondering if there's an accepted best practise for this problem?</p>
| [
{
"answer_id": 73436,
"author": "Aidos",
"author_id": 12040,
"author_profile": "https://Stackoverflow.com/users/12040",
"pm_score": 1,
"selected": false,
"text": "pages"
}
] | 2008/09/16 | [
"https://Stackoverflow.com/questions/69927",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10433/"
] |
69,928 | <p>The company has the traditional complex organizational structure, defining the amount of levels using the letter 'n' rather than an actual number. I will try and express the structure I'm trying to achieve in mono-spaced font: </p>
<pre><code> Alice
,--------|-------,------,------,
Bob Fred Jack Kim Lucy
| |
Charlie Greg
Darren Henry
Eric
</code></pre>
<p>As you can see it's not symmetrical, as Jack, Kim and Lucy report to Alice but have no reports of their own. </p>
<p>Using a <code>TreeView</code> with an <code>ItemsPanel</code> containing a <code>StackPanel</code> and <code>Orientation="Horizontal"</code> is <a href="http://www.codeproject.com/KB/WPF/CustomTreeViewLayout.aspx" rel="nofollow noreferrer">easy enough</a>, but this can result in a very large <code>TreeView</code> once some people have 20 others reporting to them! You can <a href="http://www.codeproject.com/KB/WPF/AdvancedCustomTreeViewLyt.aspx" rel="nofollow noreferrer">also use</a> <code>Triggers</code> to peek into whether a <code>TreeViewItem</code> has children with <code>Property="TreeViewItem.HasItems"</code>, but this is not in the same context as the before-mentioned <code>ItemsPanel</code>. <em>Eg: I can tell that Fred has reports, but not whether they have reports of their own.</em> </p>
<p>So, can you conditionally format <code>TreeViewItems</code> to be Vertical if they have no children of their own?</p>
| [
{
"answer_id": 113120,
"author": "Mark Glorie",
"author_id": 952,
"author_profile": "https://Stackoverflow.com/users/952",
"pm_score": 1,
"selected": true,
"text": "<ValueConversion(GetType(ItemsPresenter), GetType(Orientation))> _\nPublic Class ItemsPanelOrientationConverter\nImplements... | 2008/09/16 | [
"https://Stackoverflow.com/questions/69928",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/952/"
] |
69,934 | <p>I've been unsuccessful in getting Emacs to switch from 8 space tabs to 4 space tabs when pressing the <kbd>TAB</kbd> in buffers with the major mode <code>text-mode</code>. I've added the following to my <code>.emacs</code>:</p>
<pre><code>(setq-default indent-tabs-mode nil)
(setq-default tab-width 4)
;;; And I have tried
(setq indent-tabs-mode nil)
(setq tab-width 4)
</code></pre>
<p>No matter how I change my <code>.emacs</code> file (or my buffer's local variables) the <kbd>TAB</kbd> button always does the same thing.</p>
<ol>
<li>If there is no text above, indent <strong>8</strong> spaces</li>
<li>If there is text on the previous line, indent to the beginning of the second word</li>
</ol>
<p>As much as I love Emacs this is getting annoying. Is there a way to make Emacs to at least indent 4 space when there's not text in the previous line?</p>
| [
{
"answer_id": 69992,
"author": "Community",
"author_id": -1,
"author_profile": "https://Stackoverflow.com/users/-1",
"pm_score": 0,
"selected": false,
"text": "(setq tab-width 4)\n"
},
{
"answer_id": 70027,
"author": "Bert F",
"author_id": 11296,
"author_profile": ... | 2008/09/16 | [
"https://Stackoverflow.com/questions/69934",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/680/"
] |
69,959 | <p>After successfully building dblink on solaris 10 using Sun C 5.9
SunOS_sparc 2007/05/03 and gmake.</p>
<p>I ran gmake installcheck and got the following output:</p>
<pre><code>========== running regression test queries ==========
test dblink ... FAILED
======================
1 of 1 tests failed.
</code></pre>
<p>The differences that caused some tests to fail can be viewed in the
file "./regression.diffs". A copy of the test summary that you see
above is saved in the file "./regression.out".</p>
<p>First error in regression.diffs file:</p>
<blockquote>
<p>psql:dblink.sql:11: ERROR: could not load library "/apps/postgresql/
lib/dblink.so": ld.so.1: postgre
s: fatal: relocation error: file /apps/postgresql/lib/dblink.so:
symbol PG_GETARG_TEXT_PP: referenced symbol not found</p>
</blockquote>
<p>I am running postgreSQL version 8.2.4 with the latest dblink source.</p>
<p>Has anyone got any idea what I need to do to solve this problem.
Thanks. </p>
| [
{
"answer_id": 73275,
"author": "Grant Johnson",
"author_id": 12518,
"author_profile": "https://Stackoverflow.com/users/12518",
"pm_score": 0,
"selected": false,
"text": "find / -type f|grep dblink.so\n"
}
] | 2008/09/16 | [
"https://Stackoverflow.com/questions/69959",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5385/"
] |
69,982 | <p>I had an idea for a client-side language other than JavaScript, and I'd like to look into developing a Firefox plugin that would treat includes of this new language in a page, like <script type="newscript" src="path/script.ns" />, just as if it were a natively supported language. The plugin would do all of the language parsing and ideally be able to perform every operation on the browser and the html and css within the web page just as JavaScript can.</p>
<p>I've done a bunch of Googling and have found some articles on writing basic Firefox plugins, but nothing as complicated as this.</p>
<p>Is this even possible?</p>
| [
{
"answer_id": 70239,
"author": "Nathan de Vries",
"author_id": 11109,
"author_profile": "https://Stackoverflow.com/users/11109",
"pm_score": 2,
"selected": false,
"text": "<object />"
},
{
"answer_id": 70289,
"author": "Daniel Spiewak",
"author_id": 9815,
"author_pro... | 2008/09/16 | [
"https://Stackoverflow.com/questions/69982",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1943957/"
] |
69,998 | <p>How do I prevent vim from replacing spaces with tabs when autoindent is on?</p>
<p>An example: if I have two tabs and 7 spaces in the beginning of the line, and <code>tabstop=3</code>, and I press Enter, the next line has four tabs and 1 space in the beginning, but I don't want that...</p>
| [
{
"answer_id": 70034,
"author": "svrist",
"author_id": 86,
"author_profile": "https://Stackoverflow.com/users/86",
"pm_score": 1,
"selected": false,
"text": "set softtabstop=2\n"
},
{
"answer_id": 70049,
"author": "user11211",
"author_id": 11211,
"author_profile": "ht... | 2008/09/16 | [
"https://Stackoverflow.com/questions/69998",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
70,004 | <p>As a lot of people pointed out in <a href="https://stackoverflow.com/questions/4724/learning-lisp-why">this question</a>, Lisp is mostly used as a learning experience. Nevertheless, it would be great if I could somehow use my Lisp algorithms and combine them with my C# programs.
In college my profs never could tell me how to use my Lisp routines in a program (no, not writing a GUI in Lisp, thank you).
So how can I?</p>
| [
{
"answer_id": 49617190,
"author": "KFL",
"author_id": 695964,
"author_profile": "https://Stackoverflow.com/users/695964",
"pm_score": 2,
"selected": false,
"text": ".ss"
}
] | 2008/09/16 | [
"https://Stackoverflow.com/questions/70004",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11333/"
] |
70,013 | <p>Is there any way to know if I'm compiling under a specific Microsoft Visual Studio version?</p>
| [
{
"answer_id": 70041,
"author": "Jeff Hubbard",
"author_id": 8844,
"author_profile": "https://Stackoverflow.com/users/8844",
"pm_score": 3,
"selected": false,
"text": "_MSC_VER"
},
{
"answer_id": 70630,
"author": "jilles de wit",
"author_id": 7531,
"author_profile": "... | 2008/09/16 | [
"https://Stackoverflow.com/questions/70013",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11234/"
] |
70,074 | <p>I'm new to Ruby, so I'm having some trouble understanding this weird exception problem I'm having. I'm using the ruby-aaws gem to access Amazon ECS: <a href="http://www.caliban.org/ruby/ruby-aws/" rel="nofollow noreferrer">http://www.caliban.org/ruby/ruby-aws/</a>. This defines a class Amazon::AWS:Error:</p>
<pre><code>module Amazon
module AWS
# All dynamically generated exceptions occur within this namespace.
#
module Error
# An exception generator class.
#
class AWSError
attr_reader :exception
def initialize(xml)
err_class = xml.elements['Code'].text.sub( /^AWS.*\./, '' )
err_msg = xml.elements['Message'].text
unless Amazon::AWS::Error.const_defined?( err_class )
Amazon::AWS::Error.const_set( err_class,
Class.new( StandardError ) )
end
ex_class = Amazon::AWS::Error.const_get( err_class )
@exception = ex_class.new( err_msg )
end
end
end
end
end
</code></pre>
<p>This means that if you get an errorcode like <code>AWS.InvalidParameterValue</code>, this will produce (in its exception variable) a new class <code>Amazon::AWS::Error::InvalidParameterValue</code> which is a subclass of <code>StandardError</code>.</p>
<p>Now here's where it gets weird. I have some code that looks like this:</p>
<pre><code>begin
do_aws_stuff
rescue Amazon::AWS::Error => error
puts "Got an AWS error"
end
</code></pre>
<p>Now, if <code>do_aws_stuff</code> throws a <code>NameError</code>, my rescue block gets triggered. It seems that Amazon::AWS::Error isn't the superclass of the generated error - I guess since it's a module everything is a subclass of it? Certainly if I do:</p>
<pre><code>irb(main):007:0> NameError.new.kind_of?(Amazon::AWS::Error)
=> true
</code></pre>
<p>It says <code>true</code>, which I find confusing, especially given this:</p>
<pre><code>irb(main):009:0> NameError.new.kind_of?(Amazon::AWS)
=> false
</code></pre>
<p>What's going on, and how am I supposed to separate out AWS errors from other type of errors? Should I do something like:</p>
<pre><code>begin
do_aws_stuff
rescue => error
if error.class.to_s =~ /^Amazon::AWS::Error/
puts "Got an AWS error"
else
raise error
end
end
</code></pre>
<p>That seems exceptionally janky. The errors thrown aren't class AWSError either - they're raised like this:</p>
<pre><code>error = Amazon::AWS::Error::AWSError.new( xml )
raise error.exception
</code></pre>
<p>So the exceptions I'm looking to <code>rescue</code> from are the generated exception types that only inherit from StandardError.</p>
<p>To clarify, I have two questions:</p>
<ol>
<li><p>Why is NameError, a Ruby built in exception, a <code>kind_of?(Amazon::AWS::Error)</code>, which is a module?<br>
<strong>Answer:</strong> I had said <code>include Amazon::AWS::Error</code> at the top of my file, thinking it was kind of like a Java import or C++ include. What this actually did was add everything defined in <code>Amazon::AWS::Error</code> (present and future) to the implicit Kernel class, which is an ancestor of every class. This means <strong>anything</strong> would pass <code>kind_of?(Amazon::AWS::Error)</code>.</p></li>
<li><p>How can I best distinguish the dynamically-created exceptions in <code>Amazon::AWS::Error</code> from random other exceptions from elsewhere?</p></li>
</ol>
| [
{
"answer_id": 70127,
"author": "Mike Stone",
"author_id": 122,
"author_profile": "https://Stackoverflow.com/users/122",
"pm_score": 1,
"selected": false,
"text": "Class.new( StandardError )\n"
},
{
"answer_id": 70231,
"author": "Jean",
"author_id": 7898,
"author_prof... | 2008/09/16 | [
"https://Stackoverflow.com/questions/70074",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11284/"
] |
70,090 | <p>How can I visually customize autocomplete fields in Wicket (change colors, fonts, etc.)?</p>
| [
{
"answer_id": 77292,
"author": "Loren_",
"author_id": 13703,
"author_profile": "https://Stackoverflow.com/users/13703",
"pm_score": 4,
"selected": true,
"text": "div.wicket-aa {\n background-color:white;\n border:1px solid #CCCCCC;\n color:black;\n}\ndiv.wicket-aa ul {\n list... | 2008/09/16 | [
"https://Stackoverflow.com/questions/70090",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11384/"
] |
70,096 | <p>I've been looking for a way to convert an mp3 to aac programmatically or via the command line with no luck. Ideally, I'd have a snippet of code that I could call from my rails app that converts an mp3 to an aac. I installed ffmpeg and libfaac and was able to create an aac file with the following command:</p>
<p><code>ffmpeg -i test.mp3 -acodec libfaac -ab 163840 dest.aac</code></p>
<p>When i change the output file's name to dest.m4a, it doesn't play in iTunes. </p>
<p>Thanks! </p>
| [
{
"answer_id": 70138,
"author": "rpetrich",
"author_id": 4007,
"author_profile": "https://Stackoverflow.com/users/4007",
"pm_score": 4,
"selected": true,
"text": "ffmpeg -i source.mp3 -acodec libfaac -ab 128k dest.aac\n"
},
{
"answer_id": 72678,
"author": "dmckee --- ex-moder... | 2008/09/16 | [
"https://Stackoverflow.com/questions/70096",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
70,109 | <p>I'm writing an ASP.Net webform with some DropDownList controls on it. Then user changes selected item in one of dropdowns, ASP.Net doesn't seem to handle SelectedIndexChanged event until form is submitted with a 'Submit' button click.
How do I make my dropdowns handle SelectedIndexChanged instantly?</p>
<p>P.S. It's a classic question I have answered too many times, but it seems no one asked it before on stackoverflow.</p>
| [
{
"answer_id": 70155,
"author": "Chris Roberts",
"author_id": 475,
"author_profile": "https://Stackoverflow.com/users/475",
"pm_score": 4,
"selected": false,
"text": "AutoPostBack"
}
] | 2008/09/16 | [
"https://Stackoverflow.com/questions/70109",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9024/"
] |
70,143 | <p>I have a xslt stylesheet with multiple <code>xsl:import</code>s and I want to merge them all into the one xslt file.</p>
<p>It is a limitation of the system we are using where it passes around the xsl stylesheet as a string object stored in memory. This is transmitted to remote machine where it performs the transformation. Since it is not being loaded from disk the href links are broken, so we need to remove the <code>xsl:import</code>s from the stylesheet.</p>
<p>Are there any tools out there which can do this?</p>
| [
{
"answer_id": 70591,
"author": "Christian Berg",
"author_id": 5035,
"author_profile": "https://Stackoverflow.com/users/5035",
"pm_score": 5,
"selected": true,
"text": "<?xml version=\"1.0\" ?>\n<xsl:stylesheet xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\" \n version=... | 2008/09/16 | [
"https://Stackoverflow.com/questions/70143",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/716/"
] |
70,150 | <p>I am looking for attributes I can use to ensure the best runtime performance for my .Net application by giving hints to the loader, JIT compiler or ngen.</p>
<p>For example we have <a href="http://msdn.microsoft.com/en-us/library/k2wxda47.aspx" rel="noreferrer">DebuggableAttribute</a> which should be set to not debug and not disable optimization for optimal performance.</p>
<pre><code>[Debuggable(false, false)]
</code></pre>
<p>Are there any others I should know about?</p>
| [
{
"answer_id": 70168,
"author": "Lars Truijens",
"author_id": 1242,
"author_profile": "https://Stackoverflow.com/users/1242",
"pm_score": 1,
"selected": false,
"text": "[NeutralResourcesLanguageAttribute(\"nl\", UltimateResourceFallbackLocation.MainAssembly)]\n"
},
{
"answer_id":... | 2008/09/16 | [
"https://Stackoverflow.com/questions/70150",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1242/"
] |
70,161 | <p>As we all know numbers can be written either in numerics, or called by their names. While there are a lot of examples to be found that convert 123 into one hundred twenty three, I could not find good examples of how to convert it the other way around.</p>
<p>Some of the caveats:</p>
<ol>
<li>cardinal/nominal or ordinal: "one" and "first"</li>
<li>common spelling mistakes: "forty"/"fourty"</li>
<li>hundreds/thousands: 2100 -> "twenty one hundred" and also "two thousand and one hundred"</li>
<li>separators: "eleven hundred fifty two", but also "elevenhundred fiftytwo" or "eleven-hundred fifty-two" and whatnot</li>
<li>colloquialisms: "thirty-something"</li>
<li>fractions: 'one third', 'two fifths'</li>
<li>common names: 'a dozen', 'half'</li>
</ol>
<p>And there are probably more caveats possible that are not yet listed.
Suppose the algorithm needs to be very robust, and even understand spelling mistakes.</p>
<p>What fields/papers/studies/algorithms should I read to learn how to write all this?
Where is the information?</p>
<blockquote>
<p>PS: My final parser should actually understand 3 different languages, English, Russian and Hebrew. And maybe at a later stage more languages will be added. Hebrew also has male/female numbers, like "one man" and "one woman" have a different "one" — "ehad" and "ahat". Russian also has some of its own complexities.</p>
</blockquote>
<p>Google does a great job at this. For example:</p>
<p><a href="http://www.google.com/search?q=two+thousand+and+one+hundred+plus+five+dozen+and+four+fifths+in+decimal" rel="noreferrer">http://www.google.com/search?q=two+thousand+and+one+hundred+plus+five+dozen+and+four+fifths+in+decimal</a></p>
<p>(the reverse is also possible <a href="http://www.google.com/search?q=999999999999+in+english" rel="noreferrer">http://www.google.com/search?q=999999999999+in+english</a>)</p>
| [
{
"answer_id": 653098,
"author": "MarkusQ",
"author_id": 62970,
"author_profile": "https://Stackoverflow.com/users/62970",
"pm_score": 7,
"selected": true,
"text": "\"one\" -> 1, \"two\" -> 2, ... \"twenty\" -> 20,\n\"dozen\" -> 12, \"score\" -> 20, ...\n\"hundred\" -> 100, \"thousand\" ... | 2008/09/16 | [
"https://Stackoverflow.com/questions/70161",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11414/"
] |
70,170 | <p>I have an Java desktop application which connects directly with the DB (an Oracle). The application has multiple user accounts. What is the correct method to send the user's password (not DB password) over the network? I don't want to send it in plain text.</p>
| [
{
"answer_id": 70469,
"author": "Rejeev Divakaran",
"author_id": 10980,
"author_profile": "https://Stackoverflow.com/users/10980",
"pm_score": 2,
"selected": false,
"text": "LISTENER = (ADDRESS_LIST= (ADDRESS=(PROTOCOL=tcps)(HOST=servername)(PORT=2484)))\n\nWALLET_LOCATION=(SOURCE=(METHO... | 2008/09/16 | [
"https://Stackoverflow.com/questions/70170",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/518/"
] |
70,197 | <p>How do I declare "as any" in VB.NET, or what is the equivalent?</p>
| [
{
"answer_id": 70227,
"author": "Grokys",
"author_id": 6448,
"author_profile": "https://Stackoverflow.com/users/6448",
"pm_score": 2,
"selected": false,
"text": "Dim var as Object"
}
] | 2008/09/16 | [
"https://Stackoverflow.com/questions/70197",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11420/"
] |
70,216 | <p>In Java, you often see a META-INF folder containing some meta files. What is the purpose of this folder and what can I put there?</p>
| [
{
"answer_id": 70221,
"author": "aku",
"author_id": 1196,
"author_profile": "https://Stackoverflow.com/users/1196",
"pm_score": 8,
"selected": false,
"text": "MANIFEST.MF"
},
{
"answer_id": 70253,
"author": "Daniel Spiewak",
"author_id": 9815,
"author_profile": "https... | 2008/09/16 | [
"https://Stackoverflow.com/questions/70216",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11429/"
] |
70,232 | <p>I was wondering if there are any code or class libraries out there on how to implement multithreading or "green threading" in ActionScript.</p>
<p>As you've might seen, Scott Peterson is developing some kind of toolset, but I haven't found any more info on this other than his performance on the Adobe MAX Chicago event.</p>
<p>Regards Niclas</p>
| [
{
"answer_id": 70335,
"author": "anirudhsasikumar",
"author_id": 11433,
"author_profile": "https://Stackoverflow.com/users/11433",
"pm_score": 1,
"selected": false,
"text": "start = getTimer();\n//thread is a ui component added to system manager that is redrawn each frame\nvar fr:Number ... | 2008/09/16 | [
"https://Stackoverflow.com/questions/70232",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
70,258 | <p>I am trying to build gdb for armv6 architecture. I will be compiling this package on a Fedora Linux-Intel x86 box. I read the process of installing the gdb, like</p>
<ol>
<li><p>Download the source pachage</p></li>
<li><p>run <code>configure -host</code></p></li>
<li><p><code>make</code></p></li>
</ol>
<p>But I got lost in the process because I was not able to make out what will be the host, target, needed for the <code>configure</code> script. </p>
<p>I need to basically be able to debug programs running on armv6 architecture board which runs linux kernel 2.6.21.5-cfs-v19. The gdb executable which I intend to obtain after compilation of the source also needs to be able to run on above mentioned configuration.</p>
<p>Now to get a working gdb executable for this configuration what steps should I follow? </p>
| [
{
"answer_id": 9198236,
"author": "nodakai",
"author_id": 1190965,
"author_profile": "https://Stackoverflow.com/users/1190965",
"pm_score": 1,
"selected": false,
"text": "arm-linux"
}
] | 2008/09/16 | [
"https://Stackoverflow.com/questions/70258",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2759376/"
] |
70,272 | <p>I have an application with one form in it, and on the Load method I need to hide the form. </p>
<p>The form will display itself when it has a need to (think along the lines of a outlook 2003 style popup), but I can' figure out how to hide the form on load without something messy.</p>
<p>Any suggestions?</p>
| [
{
"answer_id": 70282,
"author": "aku",
"author_id": 1196,
"author_profile": "https://Stackoverflow.com/users/1196",
"pm_score": -1,
"selected": false,
"text": "public Form1()\n{\n InitializeComponent();\n Hide(); // Also Visible = false can be used\n}\n\nprivate void Form1_Load(obj... | 2008/09/16 | [
"https://Stackoverflow.com/questions/70272",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1500/"
] |
70,303 | <p>I have a structure in C#:</p>
<pre><code>public struct UserInfo
{
public string str1
{
get;
set;
}
public string str2
{
get;
set;
}
}
</code></pre>
<p>The only rule is that <code>UserInfo(str1="AA", str2="BB").Equals(UserInfo(str1="BB", str2="AA"))</code></p>
<p>How to override the GetHashCode function for this structure? </p>
| [
{
"answer_id": 70323,
"author": "VolkerK",
"author_id": 4833,
"author_profile": "https://Stackoverflow.com/users/4833",
"pm_score": 0,
"selected": false,
"text": "\nreturn str1.GetHashCode() ^ str1.GetHashCode()\n"
},
{
"answer_id": 70336,
"author": "Artem Tikhomirov",
"a... | 2008/09/16 | [
"https://Stackoverflow.com/questions/70303",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3834/"
] |
70,313 | <p>Working on implementing TFS throughout our organization. It is easy to integrate with <code>.NET</code> projects and any platform that uses Eclipse or a derivative of Eclipse for editing.<br>
What's the best way to use TFS version control with Xcode (now that I find out we need to write some iPhone apps)?</p>
| [
{
"answer_id": 19292666,
"author": "Indra",
"author_id": 1699323,
"author_profile": "https://Stackoverflow.com/users/1699323",
"pm_score": 1,
"selected": false,
"text": "/users/{myuseraccount}/git-tf"
}
] | 2008/09/16 | [
"https://Stackoverflow.com/questions/70313",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
70,318 | <p>Experienced with Rails / ActiveRecord 2.1.1</p>
<ul>
<li>You create a first version with (for example) ruby script\generate scaffold product title:string description:text image_url:string</li>
<li>This create (for example) a migration file called 20080910122415_create_products.rb</li>
<li>You apply the migration with rake db:migrate</li>
<li>Now, you add a field to the product table with ruby script\generate migration add_price_to_product price:decimal</li>
<li>This create a migration file called 20080910125745_add_price_to_product.rb</li>
<li>If you try to run rake db:migrate, it will actually revert the first migration, not apply the next one! So your product table will get destroyed!</li>
<li>But if you ran rake alone, it would have told you that one migration was pending</li>
</ul>
<p>Pls note that applying rake db:migrate (once the table has been destroyed) will apply all migrations in order.</p>
<p>The only workaround I found is to specify the version of the new migration as in: </p>
<pre><code>rake db:migrate version=20080910125745
</code></pre>
<p>So I'm wondering: is this an expected new behavior?</p>
| [
{
"answer_id": 70771,
"author": "Jean",
"author_id": 7898,
"author_profile": "https://Stackoverflow.com/users/7898",
"pm_score": 2,
"selected": true,
"text": "rake db:migrate:up \n"
}
] | 2008/09/16 | [
"https://Stackoverflow.com/questions/70318",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11477/"
] |
70,324 | <p>What is the main difference between an inner class and a static nested class in Java? Does design / implementation play a role in choosing one of these?</p>
| [
{
"answer_id": 70339,
"author": "Mike Stone",
"author_id": 122,
"author_profile": "https://Stackoverflow.com/users/122",
"pm_score": 3,
"selected": false,
"text": "public class A {\n public class B {\n }\n}\n"
},
{
"answer_id": 70349,
"author": "Daniel Spiewak",
"au... | 2008/09/16 | [
"https://Stackoverflow.com/questions/70324",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11193/"
] |
70,347 | <p>Are System.IO.Compression.GZipStream or System.IO.Compression.Deflate compatible with zlib compression?</p>
| [
{
"answer_id": 72820,
"author": "Isak Savo",
"author_id": 8521,
"author_profile": "https://Stackoverflow.com/users/8521",
"pm_score": 3,
"selected": false,
"text": "FileStream fs = new FileStream(filename, FileMode.Create, FileAccess.Write);\nusing (GZipStream gzStream = new GZipStream(f... | 2008/09/16 | [
"https://Stackoverflow.com/questions/70347",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3279/"
] |
70,366 | <p>When trying to commit to a cvs branch after adding a new file I get this error</p>
<pre><code>Assertion failed: key != NULL, file hash.c, line 317
</code></pre>
<p>Any idea how to fix it so I can check my code in?<br>
Both server and client are Linux and there are pre-commits involved.</p>
| [
{
"answer_id": 70576,
"author": "Bert F",
"author_id": 11296,
"author_profile": "https://Stackoverflow.com/users/11296",
"pm_score": 1,
"selected": false,
"text": "cvs: hash.c:312: findnode: Assertion `key != ((void *)0)' failed.\ncvs [server aborted]: received abort signal\n"
}
] | 2008/09/16 | [
"https://Stackoverflow.com/questions/70366",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7873/"
] |
70,377 | <p>Is there any way to prevent Visual Studio from creating a VSMacros80 folder in my default project directory?</p>
| [
{
"answer_id": 70505,
"author": "xsl",
"author_id": 11387,
"author_profile": "https://Stackoverflow.com/users/11387",
"pm_score": 0,
"selected": false,
"text": "Tools->Options->Addin/Macro Security"
},
{
"answer_id": 71150,
"author": "xsl",
"author_id": 11387,
"author... | 2008/09/16 | [
"https://Stackoverflow.com/questions/70377",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11387/"
] |
70,386 | <p>There are three places where menus show up in the new MFC functionality (Feature Pack):</p>
<ul>
<li>In menu bars (CMFCMenuBar)</li>
<li>In popup menus (CMFCPopupMenu)</li>
<li>In the 'dropdown menu' version of CMFCButton</li>
</ul>
<p>I want to put icons (high-color and with transparancy) in the menus in all of them. I have found CFrameWndEx::OnDrawMenuImage() which I can use to custom draw the icons in front of the menu bar items. It's not very convenient, having to implement icon drawing in 2008, but it works. For the others I haven't found a solution yet. Is there an automagic way to set icons for menus?</p>
| [
{
"answer_id": 1213583,
"author": "foraidt",
"author_id": 27596,
"author_profile": "https://Stackoverflow.com/users/27596",
"pm_score": 3,
"selected": true,
"text": "MainFrm.h:\nclass CMainFrame\n{\n //... \n CMFCToolBar m_wndToolBar;\n CMFCToolBar m_wndInvisibleToolBar;\n ... | 2008/09/16 | [
"https://Stackoverflow.com/questions/70386",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11449/"
] |
70,389 | <p>I have apache 2.2 and tomcat 5.5 running on a Windows XP machine.</p>
<p>Which tomcat/apache connector is the easiest to set up and is well documented? </p>
| [
{
"answer_id": 70432,
"author": "Chris Broadfoot",
"author_id": 3947,
"author_profile": "https://Stackoverflow.com/users/3947",
"pm_score": 0,
"selected": false,
"text": "mod_jk"
},
{
"answer_id": 70553,
"author": "Brian Matthews",
"author_id": 1969,
"author_profile":... | 2008/09/16 | [
"https://Stackoverflow.com/questions/70389",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8633/"
] |
70,397 | <p>So I'm working on a Rails app to get the feeling for the whole thing. I've got a <code>Product</code> model that's a standard ActiveRecord model. However, I also want to get some additional product info from Amazon ECS. So my complete model gets some of its info from the database and some from the web service. My question is, should I:</p>
<ol>
<li><p>Make two models a Product and a ProductAWS, and then tie them together at the controller level.</p></li>
<li><p>Have the Product ActiveRecord model contain a ProductAWS object that does all the AWS stuff?</p></li>
<li><p>Just add all the AWS functionality to my Product model.</p></li>
<li><p>???</p></li>
</ol>
| [
{
"answer_id": 70457,
"author": "Community",
"author_id": -1,
"author_profile": "https://Stackoverflow.com/users/-1",
"pm_score": 0,
"selected": false,
"text": "composed_of"
},
{
"answer_id": 76143,
"author": "Pete",
"author_id": 13472,
"author_profile": "https://Stac... | 2008/09/16 | [
"https://Stackoverflow.com/questions/70397",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11284/"
] |
70,402 | <p>I was asked this question during an interview. They're both O(nlogn) and yet most people use Quicksort instead of Mergesort. Why is that?</p>
| [
{
"answer_id": 70631,
"author": "Konrad Rudolph",
"author_id": 1968,
"author_profile": "https://Stackoverflow.com/users/1968",
"pm_score": 9,
"selected": true,
"text": "std::sort"
},
{
"answer_id": 15790254,
"author": "appbootup",
"author_id": 1155801,
"author_profile... | 2008/09/16 | [
"https://Stackoverflow.com/questions/70402",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1688440/"
] |
70,405 | <p>I'm doing simple string input parsing and I am in need of a string tokenizer. I am new to C# but have programmed Java, and it seems natural that C# should have a string tokenizer. Does it? Where is it? How do I use it?</p>
| [
{
"answer_id": 70436,
"author": "Davy Landman",
"author_id": 11098,
"author_profile": "https://Stackoverflow.com/users/11098",
"pm_score": 8,
"selected": true,
"text": "class ExampleClass\n{\n public ExampleClass()\n {\n string exampleString = \"there is a cat\";\n //... | 2008/09/16 | [
"https://Stackoverflow.com/questions/70405",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/432/"
] |
70,417 | <p>I have the following code:</p>
<pre><code>Dim obj As New Access.Application
obj.OpenCurrentDatabase (CurrentProject.Path & "\Working.mdb")
obj.Run "Routine"
obj.CloseCurrentDatabase
Set obj = Nothing
</code></pre>
<p>The problem I'm experimenting is a pop-up that tells me Access can't set the focus on the other database. As you can see from the code, I want to run a Subroutine in another mdb. Any other way to achieve this will be appreciated.</p>
<p>I'm working with MS Access 2003.</p>
<p>This is an intermittent error. As this is production code that will be run only once a month, it's extremely difficult to reproduce, and I can't give you the exact text and number at this time. It is the second month this happened.</p>
<p>I suspect this may occur when someone is working with this or the other database.</p>
<p>The dataflow is to update all 'projects' once a month in one database and then make this information available in the other database.</p>
<p>Maybe, it's because of the first line in the 'Routines' code:
If vbNo = MsgBox("Do you want to update?", vbYesNo, "Update") Then
Exit Function
End If</p>
<p>I'll make another subroutine without the MsgBox.</p>
<p>I've been able to reproduce this behaviour. It happens when the focus has to shift to the called database, but the user sets the focus ([ALT]+[TAB]) on the first database. The 'solution' was to educate the user.</p>
<hr>
<p>This is an intermittent error. As this is production code that will be run only once a month, it's extremely difficult to reproduce, and I can't give you the exact text and number at this time. It is the second month this happened.</p>
<p>I suspect this may occur when someone is working with this or the other database.</p>
<p>The dataflow is to update all 'projects' once a month in one database and then make this information available in the other database.</p>
<p>Maybe, it's because of the first line in the 'Routines' code:
If vbNo = MsgBox("Do you want to update?", vbYesNo, "Update") Then
Exit Function
End If</p>
<p>I'll make another subroutine without the MsgBox.</p>
<hr>
<p>I've tried this in our development database and it works. This doesn't mean anything as the other code also workes fine in development.</p>
| [
{
"answer_id": 70436,
"author": "Davy Landman",
"author_id": 11098,
"author_profile": "https://Stackoverflow.com/users/11098",
"pm_score": 8,
"selected": true,
"text": "class ExampleClass\n{\n public ExampleClass()\n {\n string exampleString = \"there is a cat\";\n //... | 2008/09/16 | [
"https://Stackoverflow.com/questions/70417",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11498/"
] |
70,450 | <p>I'm already using <a href="http://www.matasano.com/log/958/enough-with-the-rainbow-tables-what-you-need-to-know-about-secure-password-schemes/" rel="nofollow noreferrer">salted hashing</a> to store passwords in my database, which means that I should be immune to <a href="https://en.wikipedia.org/wiki/Rainbow_table" rel="nofollow noreferrer">rainbow table</a> attacks.</p>
<p>I had a thought, though: what if someone does get hold of my database? It contains the users' email addresses. I can't really hash these, because I'll be using them to send notification emails, etc..</p>
<p>Should I encrypt them?</p>
| [
{
"answer_id": 769493,
"author": "Arjan",
"author_id": 84237,
"author_profile": "https://Stackoverflow.com/users/84237",
"pm_score": 2,
"selected": false,
"text": "SELECT * FROM"
}
] | 2008/09/16 | [
"https://Stackoverflow.com/questions/70450",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8446/"
] |
70,453 | <p>For writing scripts for process automisation in Linux platform, which scripting language will be better? Shell script, Perl or Python or is there anything else? I am new to all of them. So, am just thinking to which one to go for?</p>
| [
{
"answer_id": 70659,
"author": "stephanea",
"author_id": 8776,
"author_profile": "https://Stackoverflow.com/users/8776",
"pm_score": -1,
"selected": false,
"text": "promp> bash file\n"
},
{
"answer_id": 70789,
"author": "Eric Wilhelm",
"author_id": 11580,
"author_pro... | 2008/09/16 | [
"https://Stackoverflow.com/questions/70453",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11372/"
] |
70,455 | <p>I want to port data from one server's database to another server's database.
The databases are both on a different mssql 2005 server.
Replication is probably not an option since the destination database is generated from scratch on a [time interval] basis.</p>
<p>Preferebly I would do something like</p>
<pre><code>insert *
from db1/table1
into db2/table2
where rule1 = true
</code></pre>
<p>It's obvious that connection credentials would go in somehwere in this script.</p>
| [
{
"answer_id": 70525,
"author": "Matthew Pelser",
"author_id": 6331,
"author_profile": "https://Stackoverflow.com/users/6331",
"pm_score": 6,
"selected": true,
"text": "Select * From ServerName.DbName.SchemaName.TableName\n"
},
{
"answer_id": 70817,
"author": "kristof",
"... | 2008/09/16 | [
"https://Stackoverflow.com/questions/70455",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11333/"
] |
70,471 | <p>So, I have willfully kept myself a Java n00b until recently, and my first real exposure brought about a minor shock: Java does not have C# style properties!</p>
<p>Ok, I can live with that. However, I can also swear that I have seen property getter/setter code in Java in one codebase, but I cannot remember where. How was that achieved? Is there a language extension for that? Is it related to NetBeans or something?</p>
| [
{
"answer_id": 70519,
"author": "Mark Embling",
"author_id": 6844,
"author_profile": "https://Stackoverflow.com/users/6844",
"pm_score": 2,
"selected": false,
"text": "public string getMyString() {\n // return it here\n}\n\npublic void setMyString(string myString) {\n // set it her... | 2008/09/16 | [
"https://Stackoverflow.com/questions/70471",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/227/"
] |
70,501 | <p>I have a method in .NET (C#) which returns <code>string[][]</code>. When using RegAsm or TlbExp (from the .NET 2.0 SDK) to create a COM type library for the containing assembly, I get the following warning:</p>
<blockquote>
<p>WARNING: There is no marshaling support for nested arrays.</p>
</blockquote>
<p>This warning results in the method in question not being exported into the generated type library. I've been told there's ways around this using Variant as the COM return type, and then casting/etc on the COM client side. For this particular assembly, the target client audience is VB6. <b>But how do you actually do this on the .NET side?</b></p>
<p><i>Note</i>: I have an existing legacy DLL (with its exported type library) where the return type is Variant, but this DLL (and the .tlb) is generated using pre-.NET legacy tools, so I can't use them. </p>
<p>Would it help at all if the assembly was written in VB.NET instead?</p>
| [
{
"answer_id": 74711,
"author": "Euro Micelli",
"author_id": 2230,
"author_profile": "https://Stackoverflow.com/users/2230",
"pm_score": 3,
"selected": true,
"text": "string [,] myReturnValue = new string[rowCount,colCount];\n"
}
] | 2008/09/16 | [
"https://Stackoverflow.com/questions/70501",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7724/"
] |
70,513 | <p>This question is overflow from the following question:</p>
<p><a href="https://stackoverflow.com/questions/70096/how-do-i-programmatically-convert-mp3-to-an-itunes-playable-aacm4a-file">How do I programmatically convert mp3 to an itunes-playable aac/m4a file?</a></p>
<p>Anyway, I learned how to create an aac file and then i found out that an aac is not just an m4a file with a different file extension. In fact, I need to somehow wrap the aac into an m4a container. Ideally I'd be able to simply make a call to the command line.</p>
| [
{
"answer_id": 6302358,
"author": "djeikyb",
"author_id": 659715,
"author_profile": "https://Stackoverflow.com/users/659715",
"pm_score": 5,
"selected": false,
"text": "ffmpeg"
},
{
"answer_id": 22367988,
"author": "Alastair",
"author_id": 1105203,
"author_profile": "... | 2008/09/16 | [
"https://Stackoverflow.com/questions/70513",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
70,516 | <p>I have the ISO week and year but how do I correctly convert that into two dates representing the start and end of that week?</p>
| [
{
"answer_id": 6302358,
"author": "djeikyb",
"author_id": 659715,
"author_profile": "https://Stackoverflow.com/users/659715",
"pm_score": 5,
"selected": false,
"text": "ffmpeg"
},
{
"answer_id": 22367988,
"author": "Alastair",
"author_id": 1105203,
"author_profile": "... | 2008/09/16 | [
"https://Stackoverflow.com/questions/70516",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/966/"
] |
70,524 | <p>I'm looking at Rails development as a backend to a Flex application and am trying to figure out the communication layer between the Rails app and the Flash Player. All of the things I am finding suggest using SOAP web services to communicate.</p>
<p>However, Flash supports AMF which is nice and fast (and native). Is there any way of communicating over AMF from a Rails app, whilst supporting all the "nice" things about AMF (automatic type conversion, data push etc).</p>
| [
{
"answer_id": 1709178,
"author": "Kevin Marvin",
"author_id": 207932,
"author_profile": "https://Stackoverflow.com/users/207932",
"pm_score": 0,
"selected": false,
"text": "def people\n render :xml => Person.all.to_xml\nend\n"
}
] | 2008/09/16 | [
"https://Stackoverflow.com/questions/70524",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4787/"
] |
70,528 | <p>Python gives us the ability to create 'private' methods and variables within a class by prepending double underscores to the name, like this: <code>__myPrivateMethod()</code>. How, then, can one explain this</p>
<pre><code>>>>> class MyClass:
... def myPublicMethod(self):
... print 'public method'
... def __myPrivateMethod(self):
... print 'this is private!!'
...
>>> obj = MyClass()
>>> obj.myPublicMethod()
public method
>>> obj.__myPrivateMethod()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: MyClass instance has no attribute '__myPrivateMethod'
>>> dir(obj)
['_MyClass__myPrivateMethod', '__doc__', '__module__', 'myPublicMethod']
>>> obj._MyClass__myPrivateMethod()
this is private!!
</code></pre>
<p>What's the deal?!</p>
<p>I'll explain this a little for those who didn't quite get that.</p>
<pre><code>>>> class MyClass:
... def myPublicMethod(self):
... print 'public method'
... def __myPrivateMethod(self):
... print 'this is private!!'
...
>>> obj = MyClass()
</code></pre>
<p>I create a class with a public method and a private method and instantiate it.</p>
<p>Next, I call its public method.</p>
<pre><code>>>> obj.myPublicMethod()
public method
</code></pre>
<p>Next, I try and call its private method.</p>
<pre><code>>>> obj.__myPrivateMethod()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: MyClass instance has no attribute '__myPrivateMethod'
</code></pre>
<p>Everything looks good here; we're unable to call it. It is, in fact, 'private'. Well, actually it isn't. Running <code>dir()</code> on the object reveals a new magical method that Python creates magically for all of your 'private' methods.</p>
<pre><code>>>> dir(obj)
['_MyClass__myPrivateMethod', '__doc__', '__module__', 'myPublicMethod']
</code></pre>
<p>This new method's name is always an underscore, followed by the class name, followed by the method name.</p>
<pre><code>>>> obj._MyClass__myPrivateMethod()
this is private!!
</code></pre>
<p>So much for encapsulation, eh?</p>
<p>In any case, I'd always heard Python doesn't support encapsulation, so why even try? What gives?</p>
| [
{
"answer_id": 70900,
"author": "Alya",
"author_id": 9464,
"author_profile": "https://Stackoverflow.com/users/9464",
"pm_score": 10,
"selected": true,
"text": ">>> class Foo(object):\n... def __init__(self):\n... self.__baz = 42\n... def foo(self):\n... print self... | 2008/09/16 | [
"https://Stackoverflow.com/questions/70528",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1943957/"
] |
70,529 | <p>In order to know how many times a pattern exists in current buffer, I do:</p>
<pre><code>:%s/pattern-here/pattern-here/g
</code></pre>
<p>It gives the number of occurrences of the pattern, but is obviously cumbersome and also has the side-effect of setting the 'changed' status.</p>
<p>Is there a more elegant way to count?</p>
| [
{
"answer_id": 70657,
"author": "Bruno De Fraine",
"author_id": 6918,
"author_profile": "https://Stackoverflow.com/users/6918",
"pm_score": 8,
"selected": true,
"text": ":%s/pattern-here//gn\n"
},
{
"answer_id": 70690,
"author": "Ilya",
"author_id": 6807,
"author_prof... | 2008/09/16 | [
"https://Stackoverflow.com/questions/70529",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6984/"
] |
70,537 | <p>I have heard there is a way to cheat single inheritance and implement multiple inheritance in Java. Does anyone know how to implement this(with out using interface)?</p>
<p>Just out of curiosity ;-)</p>
| [
{
"answer_id": 70564,
"author": "Hank Gay",
"author_id": 4203,
"author_profile": "https://Stackoverflow.com/users/4203",
"pm_score": 1,
"selected": false,
"text": "interface"
},
{
"answer_id": 46753756,
"author": "Abdur Rehman Khalid",
"author_id": 8066227,
"author_pr... | 2008/09/16 | [
"https://Stackoverflow.com/questions/70537",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11193/"
] |
70,560 | <p>When entering a question, stackoverflow presents you with a list of questions that it thinks likely to cover the same topic. I have seen similar features on other sites or in other programs, too (Help file systems, for example), but I've never programmed something like this myself. Now I'm curious to know what sort of algorithm one would use for that.</p>
<p>The first approach that comes to my mind is splitting the phrase into words and look for phrases containing these words. Before you do that, you probably want to throw away insignificant words (like 'the', 'a', 'does' etc), and then you will want to rank the results.</p>
<p>Hey, wait - let's do that for web pages, and then we can have a ... watchamacallit ... - a "search engine", and then we can sell ads, and then ...</p>
<p>No, seriously, what are the common ways to solve this problem?</p>
| [
{
"answer_id": 70656,
"author": "Antti Rasinen",
"author_id": 8570,
"author_profile": "https://Stackoverflow.com/users/8570",
"pm_score": 5,
"selected": true,
"text": "[2 0 0 ... 70k zeroes ... 0].\n"
},
{
"answer_id": 73842199,
"author": "Subhradeep Biswas",
"author_id":... | 2008/09/16 | [
"https://Stackoverflow.com/questions/70560",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2077/"
] |
70,575 | <p>Is there any need of Virtual Constructors? If so can any one post a scenario?</p>
| [
{
"answer_id": 70634,
"author": "Mark Ingram",
"author_id": 986,
"author_profile": "https://Stackoverflow.com/users/986",
"pm_score": 3,
"selected": false,
"text": "class A\n{\n ~A();\n}\n\nclass B : public A\n{\n ~B();\n}\n\nA* pB = new B();\ndelete pB; // NOTE: WILL NOT CALL B's dest... | 2008/09/16 | [
"https://Stackoverflow.com/questions/70575",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11554/"
] |
70,579 | <p>When creating the <code>id</code> attributes for HTML elements, what rules are there for the value?</p>
| [
{
"answer_id": 70599,
"author": "Mr Shark",
"author_id": 6093,
"author_profile": "https://Stackoverflow.com/users/6093",
"pm_score": 6,
"selected": false,
"text": "[A-Za-z][-A-Za-z0-9_:.]*\n"
},
{
"answer_id": 70894,
"author": "pdc",
"author_id": 8925,
"author_profile... | 2008/09/16 | [
"https://Stackoverflow.com/questions/70579",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6093/"
] |
70,600 | <p>I'm trying to find a way of finding out who is downloading what image from an image gallery. Users can download using a button beside the thumbnail or right click and use the "save link as" Is it possible to relate a user session or ID to a "save link as" action from all browsers using either PHP or JavaScript.</p>
| [
{
"answer_id": 70664,
"author": "Community",
"author_id": -1,
"author_profile": "https://Stackoverflow.com/users/-1",
"pm_score": 1,
"selected": false,
"text": "$file = $_GET['file'];\nupdateFileCount($file);\nheader('Content-Type: image/jpeg');\nsendFile($file);\n"
}
] | 2008/09/16 | [
"https://Stackoverflow.com/questions/70600",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
70,602 | <p>I have successfully connected to an Oracle database (10g) from C# (Visual Studio 2008) by downloading and installing the client administration tools and Visual Studio 2008 on my laptop.</p>
<p>The installation footprint for Oracle Client tools was over 200Mb, and quite long winded.</p>
<p>Does anyone know what the minimum workable footprint is? I am hoping that it's a single DLL and a register command, but I have the feeling I need to install an oracle home, and set various environment variables.</p>
<p>I am using Oracle.DataAccess in my code.</p>
| [
{
"answer_id": 70901,
"author": "Mac",
"author_id": 8696,
"author_profile": "https://Stackoverflow.com/users/8696",
"pm_score": 7,
"selected": true,
"text": "sales-server:1521/sales.us.acme.com"
},
{
"answer_id": 6608906,
"author": "kol",
"author_id": 600135,
"author_... | 2008/09/16 | [
"https://Stackoverflow.com/questions/70602",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6910/"
] |
70,614 | <p>I've just introduced a friend to <strong>GNU Screen</strong> and they're having a hard time getting used to it. That makes me think about the essential things he needs to know about the excellent <strong>Screen</strong> utility, the same things that you'd think worthwhile to teach someone, a beginner, from the ground up. What are some analogies and handy tips for remembering binds, etc.?</p>
<p>It would be awesome.</p>
| [
{
"answer_id": 70683,
"author": "agnul",
"author_id": 6069,
"author_profile": "https://Stackoverflow.com/users/6069",
"pm_score": 5,
"selected": false,
"text": "^A"
},
{
"answer_id": 70765,
"author": "Greg Hewgill",
"author_id": 893,
"author_profile": "https://Stackov... | 2008/09/16 | [
"https://Stackoverflow.com/questions/70614",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6414/"
] |
70,625 | <p>How would you refactor these two classes to abstract out the similarities? An abstract class? Simple inheritance? What would the refactored class(es) look like?</p>
<pre><code>public class LanguageCode
{
/// <summary>
/// Get the lowercase two-character ISO 639-1 language code.
/// </summary>
public readonly string Value;
public LanguageCode(string language)
{
this.Value = new CultureInfo(language).TwoLetterISOLanguageName;
}
public static LanguageCode TryParse(string language)
{
if (language == null)
{
return null;
}
if (language.Length > 2)
{
language = language.Substring(0, 2);
}
try
{
return new LanguageCode(language);
}
catch (ArgumentException)
{
return null;
}
}
}
public class RegionCode
{
/// <summary>
/// Get the uppercase two-character ISO 3166 region/country code.
/// </summary>
public readonly string Value;
public RegionCode(string region)
{
this.Value = new RegionInfo(region).TwoLetterISORegionName;
}
public static RegionCode TryParse(string region)
{
if (region == null)
{
return null;
}
if (region.Length > 2)
{
region = region.Substring(0, 2);
}
try
{
return new RegionCode(region);
}
catch (ArgumentException)
{
return null;
}
}
}
</code></pre>
| [
{
"answer_id": 70667,
"author": "Ben",
"author_id": 5005,
"author_profile": "https://Stackoverflow.com/users/5005",
"pm_score": 0,
"selected": false,
"text": "Locale"
},
{
"answer_id": 70673,
"author": "Vinko Vrsalovic",
"author_id": 5190,
"author_profile": "https://S... | 2008/09/16 | [
"https://Stackoverflow.com/questions/70625",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11574/"
] |
70,653 | <p>I'm looking for a python library that will help me to create an authentication method for a desktop app I'm writing.
I have found several method in web framework such as django or turbogears.</p>
<p>I just want a kind of username-password association stored into a local file.
I can write it by myself, but I'm really it already exists and will be a better solution (I'm not very fluent with encryption).</p>
| [
{
"answer_id": 70832,
"author": "Tony Meyer",
"author_id": 4966,
"author_profile": "https://Stackoverflow.com/users/4966",
"pm_score": 0,
"selected": false,
"text": "import pickle\nimport hashlib\n\n# Load from disk\npwd_file = \"mypasswords\"\nif os.path.exists(pwd_file):\n pwds = pi... | 2008/09/16 | [
"https://Stackoverflow.com/questions/70653",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11563/"
] |
70,668 | <p>What is the best way to backup VMWare Servers (1.0.x)?
The virtual machines in question are our development environment, and run isololated from the main network (so you can't just copy data from virtual to real servers).</p>
<p>The image files are normally in use and locked when the server is running, so it is difficult to back these up with the machines running.</p>
<p>Currently: I manually pause the servers when I leave and have a scheduled task that runs at midnight to robocopy the images to a remote NAS. </p>
<p>Is there a better way to do this, ideally without having to remember to pause the virtual machines?</p>
| [
{
"answer_id": 70740,
"author": "John Stauffer",
"author_id": 5874,
"author_profile": "https://Stackoverflow.com/users/5874",
"pm_score": 4,
"selected": true,
"text": "Usage: /usr/bin/vmware-cmd <options> <vm-cfg-path> <vm-action> <arguments>\n /usr/bin/vmware-cmd -s <options> <ser... | 2008/09/16 | [
"https://Stackoverflow.com/questions/70668",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11538/"
] |
70,681 | <p>Is there a way to make psycopg and postgres deal with errors without having to reestablish the connection, like MySQLdb? The commented version of the below works with MySQLdb, the comments make it work with Psycopg2:</p>
<pre><code>results = {'felicitas': 3, 'volumes': 8, 'acillevs': 1, 'mosaics': 13, 'perat\xe9': 1, 'representative': 6....}
for item in sorted(results):
try:
cur.execute("""insert into resultstab values ('%s', %d)""" % (item, results[item]))
print item, results[item]
# conn.commit()
except:
# conn=psycopg2.connect(user='bvm', database='wdb', password='redacted')
# cur=conn.cursor()
print 'choked on', item
continue
</code></pre>
<p>This must slow things down, could anyone give a suggestion for passing over formatting errors? Obviously the above chokes on apostrophes, but is there a way to make it pass over that without getting something like the following, or committing, reconnecting, etc?:</p>
<pre><code>agreement 19
agreements 1
agrees 1
agrippa 9
choked on agrippa's
choked on agrippina
</code></pre>
| [
{
"answer_id": 70740,
"author": "John Stauffer",
"author_id": 5874,
"author_profile": "https://Stackoverflow.com/users/5874",
"pm_score": 4,
"selected": true,
"text": "Usage: /usr/bin/vmware-cmd <options> <vm-cfg-path> <vm-action> <arguments>\n /usr/bin/vmware-cmd -s <options> <ser... | 2008/09/16 | [
"https://Stackoverflow.com/questions/70681",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11596/"
] |
70,682 | <p>I am looking for details of the VTable structure, order and contents, and the location of the vtable pointers within objects. </p>
<p>Ideally, this will cover single inheritance, multiple inheritance, and virtual inheritance.</p>
<p>References to external documentation would also be appreciated</p>
<p>Documentation of GCC 4.0x class layout is <a href="http://www.cse.wustl.edu/~mdeters/seminar/fall2005/mi.html#virtual" rel="noreferrer">here</a> and the Itanium, and more broadly GNU, ABI layout documents are <a href="http://www.codesourcery.com/public/cxx-abi/abi.html#general" rel="noreferrer">here</a>. </p>
| [
{
"answer_id": 28155780,
"author": "LThode",
"author_id": 3657206,
"author_profile": "https://Stackoverflow.com/users/3657206",
"pm_score": 4,
"selected": false,
"text": "-fdump-class-hierarchy"
}
] | 2008/09/16 | [
"https://Stackoverflow.com/questions/70682",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8516/"
] |
70,689 | <p>What is an efficient way to implement a singleton design pattern in Java?</p>
| [
{
"answer_id": 70824,
"author": "Jonathan",
"author_id": 1772,
"author_profile": "https://Stackoverflow.com/users/1772",
"pm_score": 7,
"selected": false,
"text": "public class A { \n\n private static final A INSTANCE = new A();\n\n private A() {}\n\n public static A getInsta... | 2008/09/16 | [
"https://Stackoverflow.com/questions/70689",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11581/"
] |
70,694 | <p>I am trying to create a Task Scheduler task to start my SQL Server 2005 instance every morning, because something stops it every night. This is a temporary solution until I can diagnose the stoppage.</p>
<p>I created a task to run under my admin user, and to start the program, <em>cmd</em> with the arguments <em>/c net start mssqlserver</em>. When I manually run the command, in a console under my admin user, it runs, but when I try to manually execute the task, it logs the following message, and the service remains stopped:</p>
<p><em>action "C:\Windows\system32\cmd.EXE" with return code 2</em>.</p>
<p>Any suggestions?</p>
| [
{
"answer_id": 70824,
"author": "Jonathan",
"author_id": 1772,
"author_profile": "https://Stackoverflow.com/users/1772",
"pm_score": 7,
"selected": false,
"text": "public class A { \n\n private static final A INSTANCE = new A();\n\n private A() {}\n\n public static A getInsta... | 2008/09/16 | [
"https://Stackoverflow.com/questions/70694",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8741/"
] |
70,705 | <p>In my day job I, and others on my team write a lot of hardware models in Verilog-AMS, a language supported primarily by commercial vendors and a few opensource simulator projects.
One thing that would make supporting each others code more helpful would be a LINTER that would check our code for common problems and assist with enforcing a shared code formatting style.
I of course want to be able to add my own rules and, after I prove their utility to myself, promote them to the rest of the team..
I don't mind doing the work that has to be done, but of course also want to leverage the work of other existing projects. </p>
<p>Does having the allowed language syntax in a yacc or bison format give me a leg up?
or should I just suck each language statement into a perl string, and use pattern matching to find the things I don't like? </p>
<p>(most syntax and compilation errors are easily caught by the commercial tools.. but we have some of our own extentions.) </p>
| [
{
"answer_id": 70723,
"author": "Hank Gay",
"author_id": 4203,
"author_profile": "https://Stackoverflow.com/users/4203",
"pm_score": 0,
"selected": false,
"text": "yacc"
}
] | 2008/09/16 | [
"https://Stackoverflow.com/questions/70705",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6314/"
] |
70,721 | <p>Last Friday where I work, an oracle client was upgarded and our IIS server from version 9 to version 10. Now that its on version 10, we are seeing a lot of connections being open up to the database. It is opening up so many connections that we cannot log onto the database using tools like PlSQL developer or Toad. We never had an issue like this when the oracle client was at version 9. Because of the number of clients that exists on this particular box, i dont think it will be possible to revert back to the Oracle 9 client.
Is anyone aware of this problem or know of any possible work arounds?</p>
<p>Any help is greatly appreciated</p>
| [
{
"answer_id": 70723,
"author": "Hank Gay",
"author_id": 4203,
"author_profile": "https://Stackoverflow.com/users/4203",
"pm_score": 0,
"selected": false,
"text": "yacc"
}
] | 2008/09/16 | [
"https://Stackoverflow.com/questions/70721",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11612/"
] |
70,724 | <p>In my job we have to deploy an application on various environments. It's a standard WAR file which needs a bit of configuration, deployed on Tomcat 6.</p>
<p>Is there any way of creating a 'deployment package' with Tomcat so that you just extract it and it sets up Tomcat as well as your application? I'm not sure that creating a .zip file with the Tomcat folder would work! It certainly wouldn't install the service.</p>
<p>Suggestions welcome!</p>
<p>I should note that - at the moment - all apps are deployed on Windows servers.</p>
<p>Thanks,
Phill</p>
| [
{
"answer_id": 70723,
"author": "Hank Gay",
"author_id": 4203,
"author_profile": "https://Stackoverflow.com/users/4203",
"pm_score": 0,
"selected": false,
"text": "yacc"
}
] | 2008/09/16 | [
"https://Stackoverflow.com/questions/70724",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] |
70,732 | <p>Lasty, I tried to implements an hybrid structure in Java, something that looks like:</p>
<pre><code>public class MapOfSet<K, V extends HasKey<K>> implements Set<V>, Map<K, Set<V>>
</code></pre>
<p>Where HasKey is the following interface:</p>
<pre><code>public interface HasKey<K> {
public K getKey();
}
</code></pre>
<p>Unfortunately, there are some conflicts between methos signature of the Set interface and the Map interface in Java. I've finally chosen to implements only the Set interface and to add the Map method without implementing this interface.</p>
<p>Do you see a nicer solution?</p>
<p>In response to the first comments, here is my goal:</p>
<blockquote>
<p>Have a set structure and be able to efficiently access to a subset of values of this set, corresponding to a given key value.
At the beginning I instantiated a map and a set, but I tried to joined the two structures to optimize performances.</p>
</blockquote>
| [
{
"answer_id": 70772,
"author": "Hank Gay",
"author_id": 4203,
"author_profile": "https://Stackoverflow.com/users/4203",
"pm_score": 2,
"selected": false,
"text": "Map"
},
{
"answer_id": 70962,
"author": "jrudolph",
"author_id": 7647,
"author_profile": "https://Stacko... | 2008/09/16 | [
"https://Stackoverflow.com/questions/70732",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1730/"
] |
70,742 | <p>I administrate several Oracle Apps environment, and currently check profile options in lots of environments by loading up forms in each environment, and manually checking each variable, which requires a lot of time.</p>
<p>Is there a snippet of code which will list profile options and at what level and who they are applied to?</p>
| [
{
"answer_id": 71141,
"author": "Sten Vesterli",
"author_id": 9363,
"author_profile": "https://Stackoverflow.com/users/9363",
"pm_score": 2,
"selected": true,
"text": "APPLSYS.FND_PROFILE_OPTIONS"
},
{
"answer_id": 71387,
"author": "Jonathan",
"author_id": 6910,
"auth... | 2008/09/16 | [
"https://Stackoverflow.com/questions/70742",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6910/"
] |
70,756 | <p>This confusion arises as most people are trained to evaluate arithmetic expressions as per <a href="http://en.wikipedia.org/wiki/PEMDAS#Mnemonics" rel="nofollow noreferrer">PEDMAS or BODMAS rule</a> whereas arithmetic expressions in programming languages like C# do not work in the same way.</p>
<p>What are your takes on it?</p>
| [
{
"answer_id": 70861,
"author": "jrudolph",
"author_id": 7647,
"author_profile": "https://Stackoverflow.com/users/7647",
"pm_score": 2,
"selected": false,
"text": "!person.isMarried && person.age == 25 + 2 * 5\n"
}
] | 2008/09/16 | [
"https://Stackoverflow.com/questions/70756",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4021/"
] |
70,758 | <p>I know you can put <% if %> statements in the ItemTemplate to hide controls but the column is still there.
You cannot put <% %> statements into the LayoutTemplate which is where the column headings are declared, hence the problem.
Does anyone know of a better way?</p>
| [
{
"answer_id": 71015,
"author": "Jason",
"author_id": 7391,
"author_profile": "https://Stackoverflow.com/users/7391",
"pm_score": 0,
"selected": false,
"text": "style='display: <%#Eval(\"DisplayStyle\") %>;'\n"
},
{
"answer_id": 71261,
"author": "Dean Poulin",
"author_id"... | 2008/09/16 | [
"https://Stackoverflow.com/questions/70758",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10186/"
] |
70,773 | <p>What are the pros / cons of using <code>pthread_cond_wait</code> or using a semaphore ?
I am waiting for a state change like this :</p>
<pre><code>pthread_mutex_lock(&cam->video_lock);
while(cam->status == WAIT_DISPLAY) {
pthread_cond_wait(&cam->video_cond, &cam->video_lock);
}
pthread_mutex_unlock(&cam->video_lock);
</code></pre>
<p>Using a properly initialised semaphore, I think I could do it like this :</p>
<pre><code>while(cam->status == WAIT_DISPLAY) {
sem_wait(&some_semaphore);
}
</code></pre>
<p>What are the pros and cons of each method ?</p>
| [
{
"answer_id": 71301,
"author": "freespace",
"author_id": 8297,
"author_profile": "https://Stackoverflow.com/users/8297",
"pm_score": 4,
"selected": false,
"text": "m"
},
{
"answer_id": 434872,
"author": "Blaisorblade",
"author_id": 53974,
"author_profile": "https://S... | 2008/09/16 | [
"https://Stackoverflow.com/questions/70773",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11589/"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.