qid
int64
4
19.1M
question
stringlengths
18
48.3k
answers
list
date
stringlengths
10
10
metadata
list
314,466
<p>Is there an easy way to generate an array containing the letters of the alphabet in C#? It's not too hard to do it by hand, but I was wondering if there was a built in way to do this. </p>
[ { "answer_id": 314475, "author": "Bob", "author_id": 45, "author_profile": "https://Stackoverflow.com/users/45", "pm_score": 9, "selected": true, "text": " char[] alpha = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\".ToCharArray();\n" }, { "answer_id": 314499, "author": "xan", "author_...
2008/11/24
[ "https://Stackoverflow.com/questions/314466", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13028/" ]
314,467
<p>I'm looking for articles, forum or blog posts dealing with SharePoint and thread safety? I'm quite sure there are some special aspects regarding thread safety that have to be considered when working with the SharePoint object model.</p> <p>Actually I didn't find many information about this, yet.</p> <p>So I'm look...
[ { "answer_id": 314534, "author": "x0n", "author_id": 6920, "author_profile": "https://Stackoverflow.com/users/6920", "pm_score": 3, "selected": false, "text": "var list = web.List[\"MyList\"]\nlist.Items[0][\"Field1\"] = \"foo\"\nlist.Items[0][\"Field2\"] = \"bar\"\nlist.Items[0].Update(...
2008/11/24
[ "https://Stackoverflow.com/questions/314467", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19601/" ]
314,468
<p>For some reason the system admin changed my user name from XxXx to XxXx1 in the source control system. Then the problems started. I had to delete all local files and re-download them from source control just to open the project.</p> <p>And after I had rebooted the computer, I can't do much to my files. Whenever I t...
[ { "answer_id": 319821, "author": "JB Brown", "author_id": 21360, "author_profile": "https://Stackoverflow.com/users/21360", "pm_score": 2, "selected": false, "text": "tf undo \"$/MyProject/VersionX/Utils/file.cs\" /WORKSPACE:MaorDev;Domain\\User /server:MyServerName /recursive\n" } ]
2008/11/24
[ "https://Stackoverflow.com/questions/314468", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3397/" ]
314,481
<p>I am fetching data in from an SQL table using a DataSet in VB.Net. When there is data in table, it displays the data properly in the grid, but when there is no data in the table, it only shows the UltraGrid's basic view.</p> <p>How can I display the column names of the table as headings of the UltraGrid even when ...
[ { "answer_id": 319821, "author": "JB Brown", "author_id": 21360, "author_profile": "https://Stackoverflow.com/users/21360", "pm_score": 2, "selected": false, "text": "tf undo \"$/MyProject/VersionX/Utils/file.cs\" /WORKSPACE:MaorDev;Domain\\User /server:MyServerName /recursive\n" } ]
2008/11/24
[ "https://Stackoverflow.com/questions/314481", "https://Stackoverflow.com", "https://Stackoverflow.com/users/40293/" ]
314,492
<p>I've got an array of <code>char*</code> in a file. The company I work for stores data in flat files.. Sometimes the data is sorted, but sometimes it's not. I'd like to sort the data in the files.</p> <p>Now I could write the code to do this, from scratch. Is there an easier way? </p> <p>Of course an in-place so...
[ { "answer_id": 314527, "author": "Leon Timmermans", "author_id": 4727, "author_profile": "https://Stackoverflow.com/users/4727", "pm_score": 5, "selected": true, "text": "template<size_t length> int less(const char* left, const char* right) {\n return memcmp(left, right, length) < 0;\...
2008/11/24
[ "https://Stackoverflow.com/questions/314492", "https://Stackoverflow.com", "https://Stackoverflow.com/users/31325/" ]
314,493
<p>I have an xml web service which I use at work to make a request to. This request, an xml document, includes information such as recipients, subject, body, etc (as a newsletter would contain).</p> <p>I have an ASP.NET form to enter the above information to, to form the Xml document, and I can type foreign characters...
[ { "answer_id": 314527, "author": "Leon Timmermans", "author_id": 4727, "author_profile": "https://Stackoverflow.com/users/4727", "pm_score": 5, "selected": true, "text": "template<size_t length> int less(const char* left, const char* right) {\n return memcmp(left, right, length) < 0;\...
2008/11/24
[ "https://Stackoverflow.com/questions/314493", "https://Stackoverflow.com", "https://Stackoverflow.com/users/32484/" ]
314,503
<p>I have a combobox at the top of a form that loads editable data into fields below. If the user has made changes, but not saved, and tries to select a different option from the combobox, I want to warn them and give them a chance to cancel or save.</p> <p>I am in need of a "BeforeValueChange" event with a cancelabl...
[ { "answer_id": 314536, "author": "Vincent Van Den Berghe", "author_id": 39259, "author_profile": "https://Stackoverflow.com/users/39259", "pm_score": 2, "selected": false, "text": "Enter BeforeValueChange ValueChanged ValueChanged return BeforeValuechange" }, { "answer_id": 31453...
2008/11/24
[ "https://Stackoverflow.com/questions/314503", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
314,505
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="https://stackoverflow.com/questions/1759352/how-do-i-mark-a-method-as-obsolete-deprecated-c-sharp">How do I mark a method as Obsolete/Deprecated? - C#</a> </p> </blockquote> <p>How do you mark a class as deprecated? I do not want to use a class a...
[ { "answer_id": 314507, "author": "Patrick Desjardins", "author_id": 13913, "author_profile": "https://Stackoverflow.com/users/13913", "pm_score": 10, "selected": true, "text": "[Obsolete] [Obsolete(\"Not used any more\", true)]\npublic class MyDeprecatedClass\n{\n //...\n}\n" }, {...
2008/11/24
[ "https://Stackoverflow.com/questions/314505", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14441/" ]
314,515
<p>What options are there for installing Django such that multiple users (each with an "Account") can each have their own database?</p> <p>The semantics are fairly intuitive. There may be more than one User for an Account. An Account has a unique database (and a database corresponds to an account). Picture WordpressMU...
[ { "answer_id": 314869, "author": "Gabriel Ross", "author_id": 10751, "author_profile": "https://Stackoverflow.com/users/10751", "pm_score": 3, "selected": true, "text": "<VirtualHost 1.2.3.4>\n DocumentRoot /www/site1\n ServerName site1.com\n <Location />\n ...
2008/11/24
[ "https://Stackoverflow.com/questions/314515", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19212/" ]
314,531
<p>When obtaining the DPI for the screen under Windows (by using ::GetDeviceCaps) will the horizontal value always be the same as the vertical? For example:</p> <pre><code>HDC dc = ::GetDC(NULL); const int xDPI = ::GetDeviceCaps(dc, LOGPIXELSX); const int yDPI - ::GetDeviceCaps(dc, LOGPIXELSY); assert(xDPI == yDPI); ...
[ { "answer_id": 314732, "author": "John Dibling", "author_id": 241536, "author_profile": "https://Stackoverflow.com/users/241536", "pm_score": 1, "selected": false, "text": " int nHorz = dc.GetDeviceCaps(LOGPIXELSX);\n int nVert = dc.GetDeviceCaps(LOGPIXELSY);\n\n // almost always t...
2008/11/24
[ "https://Stackoverflow.com/questions/314531", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9236/" ]
314,540
<p>I'm code reviewing a change one of my co-workers just did, and he added a bunch of calls to <code>Date.toMonth()</code>, <code>Date.toYear()</code> and other deprecated <code>Date</code> methods. All these methods were deprecated in JDK 1.1, but he insists that it's ok to use them because they haven't gone away yet...
[ { "answer_id": 314577, "author": "VonC", "author_id": 6309, "author_profile": "https://Stackoverflow.com/users/6309", "pm_score": 6, "selected": true, "text": "forRemoval=true forRemoval=true" }, { "answer_id": 315617, "author": "user38748", "author_id": 38748, "autho...
2008/11/24
[ "https://Stackoverflow.com/questions/314540", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3333/" ]
314,549
<p>In C#</p> <p>I have a processing time number data column in the database which is in in this format "###" or "##" ( eg: "813" or "67")</p> <p>When I bind it to the grid view I wanted to display it in this format "0.###" (eg: "0.813" or "0.067")</p> <p>I tried using {0:0.000} and other formatings. But none seem to...
[ { "answer_id": 314697, "author": "Mark Brackett", "author_id": 2199, "author_profile": "https://Stackoverflow.com/users/2199", "pm_score": 2, "selected": false, "text": "{0:0.000} {0:0\\\\.000}" }, { "answer_id": 314726, "author": "Greg", "author_id": 12601, "author_p...
2008/11/24
[ "https://Stackoverflow.com/questions/314549", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
314,553
<p>I heard a lot about makefiles and how they simplify the compilation process. I'm using VS2008. Can somebody please suggest some online references or books where I can find out more about how to deal with them?</p>
[ { "answer_id": 315863, "author": "Jon Trauntvein", "author_id": 19674, "author_profile": "https://Stackoverflow.com/users/19674", "pm_score": 3, "selected": false, "text": "debug: coratools_debug\n devenv coralib.vcproj /build debug\n\ncoratools_debug: nothing\n cd ../coratools\n ...
2008/11/24
[ "https://Stackoverflow.com/questions/314553", "https://Stackoverflow.com", "https://Stackoverflow.com/users/28298/" ]
314,555
<p>In Linqtosql how do I show items from multiple rows in a single field.</p> <p>eg I have a 3 table setup for tagging(entity, tag, entitytag) all linked via foreign keys.</p> <p>For each entity I would like to return the name in one field and then all relevant tags in 2nd field.</p> <p>eg Item1, tag1; tag2; tag3 ...
[ { "answer_id": 314795, "author": "Geoff Appleford", "author_id": 7793, "author_profile": "https://Stackoverflow.com/users/7793", "pm_score": 2, "selected": true, "text": "Dim dc As New DataContext\n\nDim query = From i In dc.Items _\n Let tags = (From t In dc.ItemTags _\n ...
2008/11/24
[ "https://Stackoverflow.com/questions/314555", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7793/" ]
314,558
<p>I'm trying to use route constraints in an Asp.Net MVC Application. </p> <pre><code>routes.MapRoute( "theRoute", "MyAction/{page}", new { controller = "TheController", action = "MyAction", page = 1 }, new { page = @"[0-9]" }); </code></pre> <p>When I enter an url like ~/MyAction/aString, an YSOD is ...
[ { "answer_id": 330049, "author": "Matthew", "author_id": 20162, "author_profile": "https://Stackoverflow.com/users/20162", "pm_score": 3, "selected": true, "text": "routes.MapRoute(\n \"Default\", // Route name\n \"{controller}/{action}/...
2008/11/24
[ "https://Stackoverflow.com/questions/314558", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13376/" ]
314,572
<p>The following code</p> <pre><code>public class GenericsTest2 { public static void main(String[] args) throws Exception { Integer i = readObject(args[0]); System.out.println(i); } public static &lt;T&gt; T readObject(String file) throws Exception { return readObject(new ObjectIn...
[ { "answer_id": 314743, "author": "C. K. Young", "author_id": 13, "author_profile": "https://Stackoverflow.com/users/13", "pm_score": 4, "selected": false, "text": "readObject T public static <T> T readObject(String file) throws Exception {\n return GenericsTest2.<T>readObject(new Obje...
2008/11/24
[ "https://Stackoverflow.com/questions/314572", "https://Stackoverflow.com", "https://Stackoverflow.com/users/969/" ]
314,578
<p>Can somebody please give me an example of a unidirectional @OneToOne primary-key mapping in Hibernate ? I've tried numerous combinations, and so far the best thing I've gotten is this :</p> <pre><code>@Entity @Table(name = "paper_cheque_stop_metadata") @org.hibernate.annotations.Entity(mutable = false) public class...
[ { "answer_id": 314660, "author": "activout.se", "author_id": 20444, "author_profile": "https://Stackoverflow.com/users/20444", "pm_score": 3, "selected": false, "text": "@Entity\n@Table(name = \"message\")\npublic class Message implements java.io.Serializable\n{\n @OneToOne(cascade = ...
2008/11/24
[ "https://Stackoverflow.com/questions/314578", "https://Stackoverflow.com", "https://Stackoverflow.com/users/32232/" ]
314,580
<p><b>Executive Summary:</b> When assertion errors are thrown in the threads, the unit test doesn't die. This makes sense, since one thread shouldn't be allowed to crash another thread. The question is how do I either 1) make the whole test fail when the first of the helper threads crashes or 2) loop through and determ...
[ { "answer_id": 20326363, "author": "Lital Kolog", "author_id": 3056745, "author_profile": "https://Stackoverflow.com/users/3056745", "pm_score": 0, "selected": false, "text": " @Test\n public void testAwait_InnerThreadExternalizeException() {\n\n final int CONTEXT = 1;\n ...
2008/11/24
[ "https://Stackoverflow.com/questions/314580", "https://Stackoverflow.com", "https://Stackoverflow.com/users/39489/" ]
314,583
<p>I'm new to Python and am running to a problem I can't google my way out of. I've built a GUI using wxPython and ObjectiveListView. In its very center, the GUI has a list control displaying data in X rows (the data is loaded by the user) and in five columns.</p> <p>When the user selects multiple entries from the lis...
[ { "answer_id": 314633, "author": "Matthew Trevor", "author_id": 11265, "author_profile": "https://Stackoverflow.com/users/11265", "pm_score": 3, "selected": false, "text": ">>> mysets = (set(x.items()) for x in MyList)\n>>> reduce(lambda a,b: a.intersection(b), mysets)\nset([('sum', '-21...
2008/11/24
[ "https://Stackoverflow.com/questions/314583", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
314,584
<p>I am thinking it is a best practice to declare them as static, as it makes them invisible outside of the module.</p> <p>What are your thoughts on this?</p>
[ { "answer_id": 314630, "author": "KeithB", "author_id": 2298, "author_profile": "https://Stackoverflow.com/users/2298", "pm_score": 5, "selected": false, "text": "namespace {\nvoid myLocalFunction() {\n// stuff\n}\n}\n" }, { "answer_id": 314637, "author": "Piotr Lesnicki", ...
2008/11/24
[ "https://Stackoverflow.com/questions/314584", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7734/" ]
314,591
<p>I have an Air application with a main window. I would like to have a new window fly out from the side of the main window when the user clicks on a button in the main window. The window that appears needs to display information based on value passed from the main form. How can I achieve this with Flex Builder 3?</p> ...
[ { "answer_id": 314630, "author": "KeithB", "author_id": 2298, "author_profile": "https://Stackoverflow.com/users/2298", "pm_score": 5, "selected": false, "text": "namespace {\nvoid myLocalFunction() {\n// stuff\n}\n}\n" }, { "answer_id": 314637, "author": "Piotr Lesnicki", ...
2008/11/24
[ "https://Stackoverflow.com/questions/314591", "https://Stackoverflow.com", "https://Stackoverflow.com/users/636/" ]
314,593
<p>I have written a program in C to parse large XML files and then create files with insert statements. Some other process would ingest the files into a MySQL database. This data will serve as a indexing service so that users can find documents easily.</p> <p>I have chosen InnoDB for the ability of row-level locking...
[ { "answer_id": 314629, "author": "Kent Fredric", "author_id": 15614, "author_profile": "https://Stackoverflow.com/users/15614", "pm_score": 1, "selected": false, "text": "INSERT INTO TableName(Col1,Col2) VALUES (1,1),(1,2),(1,3) \n" } ]
2008/11/24
[ "https://Stackoverflow.com/questions/314593", "https://Stackoverflow.com", "https://Stackoverflow.com/users/28714/" ]
314,594
<p>I have a web service that acts as an interface between a farm of websites and some analytics software. Part of the analytics tracking requires harvesting the page title. Rather than passing it from the webpage to the web service, I would like to use <code>HTTPWebRequest</code> to call the page. </p> <p>I have code ...
[ { "answer_id": 314691, "author": "Andy Brudtkuhl", "author_id": 12442, "author_profile": "https://Stackoverflow.com/users/12442", "pm_score": -1, "selected": false, "text": "HttpWebRequest req = (HttpWebRequest)WebRequest.Create(URL);\nHttpWebResponse resp = (HttpWebResponse)req.GetRes...
2008/11/24
[ "https://Stackoverflow.com/questions/314594", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12442/" ]
314,600
<p>I have a bunch of generic interfaces and classes</p> <pre><code>public interface IElement { // omited } class Element implements IElement { // omited } public interface IElementList&lt;E extends IElement&gt; extends Iterable { public Iterator&lt;E&gt; iterator(); } class ElementList implements IElementList&l...
[ { "answer_id": 314635, "author": "Michael Myers", "author_id": 13531, "author_profile": "https://Stackoverflow.com/users/13531", "pm_score": 4, "selected": true, "text": "IElementList Iterable<E> Iterator iterator() Iterator<E> iterator() Object" } ]
2008/11/24
[ "https://Stackoverflow.com/questions/314600", "https://Stackoverflow.com", "https://Stackoverflow.com/users/24028/" ]
314,607
<p>I have a class which looks something like this:</p> <pre><code>public class Test { private static final Object someObject = new Object(); public void doSomething() { synchronized (someObject) { System.out.println(someObject.toString()); } } } </code></pre> <p>Can I consider the object to be sync...
[ { "answer_id": 315483, "author": "Alex Miller", "author_id": 7671, "author_profile": "https://Stackoverflow.com/users/7671", "pm_score": 1, "selected": false, "text": "public class Test {\n public void doSomething() {\n synchronized (Test.class) {\n // something\n }\n }\n}\n...
2008/11/24
[ "https://Stackoverflow.com/questions/314607", "https://Stackoverflow.com", "https://Stackoverflow.com/users/24545/" ]
314,616
<p>Do all php include files have to be in an include directory, or is that just an organizational convenience? Can I include files from any directory using the path to that directory? Do html files that contain php includes have to have a php extension? If so, I guess that would mean all of my html docs would be php if...
[ { "answer_id": 318769, "author": "Hugh Bothwell", "author_id": 33258, "author_profile": "https://Stackoverflow.com/users/33258", "pm_score": 0, "selected": false, "text": "Extension Call method PHP runs\n .html browser no\n .html Apache #include no\n .html...
2008/11/24
[ "https://Stackoverflow.com/questions/314616", "https://Stackoverflow.com", "https://Stackoverflow.com/users/40091/" ]
314,636
<p>If you know the Index, Value or Text. also if you don't have an ID for a direct reference.</p> <p><a href="https://stackoverflow.com/questions/149573/check-if-option-is-selected-with-jquery-if-not-select-a-default#149820">This</a>, <a href="https://stackoverflow.com/questions/196684/jquery-get-select-option-text#19...
[ { "answer_id": 314644, "author": "Jay Corbett", "author_id": 2755, "author_profile": "https://Stackoverflow.com/users/2755", "pm_score": 3, "selected": false, "text": "<html>\n<head>\n<script language=\"Javascript\" src=\"javascript/jquery-1.2.6.min.js\"></script>\n<script type=\"text/Ja...
2008/11/24
[ "https://Stackoverflow.com/questions/314636", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2755/" ]
314,639
<p>I'm trying to get a regex that will match:</p> <pre><code>somefile_1.txt somefile_2.txt somefile_{anything}.txt </code></pre> <p>but not match:</p> <pre><code>somefile_16.txt </code></pre> <p>I tried</p> <pre><code>somefile_[^(16)].txt </code></pre> <p>with no luck (it includes even the "16" record)</p>
[ { "answer_id": 314650, "author": "phihag", "author_id": 35070, "author_profile": "https://Stackoverflow.com/users/35070", "pm_score": 5, "selected": true, "text": "somefile(?!16\\.txt$).*?\\.txt\n somefile([^1].|1[^6]|.|.{3,})\\.txt\n somefile([^1].|1[^6]|.|....*)\\.txt\n [^(16)]" }, ...
2008/11/24
[ "https://Stackoverflow.com/questions/314639", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18941/" ]
314,647
<p>I have this rewrite rule</p> <pre><code>RewriteEngine On RewriteBase /location/ RewriteRule ^(.+)/?$ index.php?franchise=$1 </code></pre> <p>Which is suppose to change this URL</p> <pre><code>http://example.com/location/kings-lynn </code></pre> <p>Into this one</p> <pre><code>http://example.com/location/index.p...
[ { "answer_id": 314653, "author": "Kent Fredric", "author_id": 15614, "author_profile": "https://Stackoverflow.com/users/15614", "pm_score": 4, "selected": true, "text": "'location/index.php' ^(.+)/?$ RewriteEngine on\nRewriteBase /location/\nRewriteCond %{REQUEST_FILENAME} !-f # ignore...
2008/11/24
[ "https://Stackoverflow.com/questions/314647", "https://Stackoverflow.com", "https://Stackoverflow.com/users/319/" ]
314,664
<p>I have a class which constructor takes a <a href="http://commons.apache.org/lang/api-2.3/org/apache/commons/lang/enums/Enum.html" rel="nofollow noreferrer">Jakarta enums</a>. I'm trying to find how I can easily inject it via an <a href="http://www.springframework.org/" rel="nofollow noreferrer">Spring</a> XML aplica...
[ { "answer_id": 314720, "author": "Guillaume", "author_id": 23704, "author_profile": "https://Stackoverflow.com/users/23704", "pm_score": 1, "selected": false, "text": "<bean id=\"myService\" class=\"MyService\">\n <constructor-arg index=\"0\">\n <bean class=\"MyEnum\" factory-m...
2008/11/24
[ "https://Stackoverflow.com/questions/314664", "https://Stackoverflow.com", "https://Stackoverflow.com/users/23704/" ]
314,675
<p>Is it possible to redirect all of the output of a Bourne shell script to somewhere, but with shell commands inside the script itself?</p> <p>Redirecting the output of a single command is easy, but I want something more like this:</p> <pre><code>#!/bin/sh if [ ! -t 0 ]; then # redirect all of my output to a file ...
[ { "answer_id": 314678, "author": "Joshua", "author_id": 14768, "author_profile": "https://Stackoverflow.com/users/14768", "pm_score": 8, "selected": false, "text": "exec > file\n exec > file \nexec 2>&1\n exec >> file\n...
2008/11/24
[ "https://Stackoverflow.com/questions/314675", "https://Stackoverflow.com", "https://Stackoverflow.com/users/40307/" ]
314,682
<p>Given a collection of user specified tags how do I determine which ones <strong>are not</strong> in the tags table with 1 SQL Statement?</p> <p>Assuming a table schema <code>tags (id, tag)</code> and I'm using mysql, if there's an optimization I'm unaware of.</p> <p>thanks</p>
[ { "answer_id": 314693, "author": "Unsliced", "author_id": 2902, "author_profile": "https://Stackoverflow.com/users/2902", "pm_score": 1, "selected": false, "text": "select * from canonical_list_of_tags where tag not in (select tag from used_tags) \n canonical_list_of_tags" }, { "...
2008/11/24
[ "https://Stackoverflow.com/questions/314682", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2443/" ]
314,683
<p>How do I make an instance of gwtext.client.widgets.Window appear at specific DIV in my html ? I tried window.anchorTo(DOM.getElementById("Some_Div"),"left", new int[]{0,0}), thinking the window will anchor itself to div id="Some_Div" in my html. it didnt. </p>
[ { "answer_id": 320763, "author": "bikesandcode", "author_id": 40112, "author_profile": "https://Stackoverflow.com/users/40112", "pm_score": 1, "selected": false, "text": "RootPanel.get(\"Some_Div_Id\").add( someWidget )\n" }, { "answer_id": 348819, "author": "Saravanan M", ...
2008/11/24
[ "https://Stackoverflow.com/questions/314683", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
314,684
<p>How would you handle cross database queries in different environments. For example, db1-development and db2-development, db1-production and db2-production. </p> <p>If I want to do a cross-database query in development from db2 to db1 I could use the fully qualified name, [db1-development].[schema].[table]. But ho...
[ { "answer_id": 314757, "author": "user39603", "author_id": 39603, "author_profile": "https://Stackoverflow.com/users/39603", "pm_score": 0, "selected": false, "text": "declare @environment varchar(10)\nset @environment = 'db-dev' -- input parameter, comes from app layer\n\ndeclare @sql v...
2008/11/24
[ "https://Stackoverflow.com/questions/314684", "https://Stackoverflow.com", "https://Stackoverflow.com/users/24279/" ]
314,700
<p>I need help finding resources that would help me or at least point me in the right direction in building a Flash media server/PHP application. I basically want to improve my current application by instead of progressive download using flash media server so that the videos will not only stream well but they can't be ...
[ { "answer_id": 318739, "author": "Willem", "author_id": 15447, "author_profile": "https://Stackoverflow.com/users/15447", "pm_score": 1, "selected": false, "text": "<OBJECT>" } ]
2008/11/24
[ "https://Stackoverflow.com/questions/314700", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
314,713
<p>I have an application for which log4j logging is configured in a log4j.properties file. Currently, this application runs on UNIX and creates a log file in /tmp. This application needs to run on Windows, and on that platform I would like for it to select the correct temporary directory, which I believe is C:\temp.<...
[ { "answer_id": 314730, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 6, "selected": true, "text": "${java.io.tmpdir}" }, { "answer_id": 1870702, "author": "Matthew McCullough", "author_id": 56039, "author_p...
2008/11/24
[ "https://Stackoverflow.com/questions/314713", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18103/" ]
314,736
<p>I have an ASP.NET GridView which has columns that look like this:</p> <pre><code>| Foo | Bar | Total1 | Total2 | Total3 | </code></pre> <p>Is it possible to create a header on two rows that looks like this?</p> <pre><code>| | Totals | | Foo | Bar | 1 | 2 | 3 | </code></pre> <p>The data in each r...
[ { "answer_id": 2113663, "author": "Brian Webster", "author_id": 127880, "author_profile": "https://Stackoverflow.com/users/127880", "pm_score": 2, "selected": false, "text": " If grid.HeaderRow Is Nothing Then\n" }, { "answer_id": 4206372, "author": "MaC", "author_id": 51...
2008/11/24
[ "https://Stackoverflow.com/questions/314736", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3161/" ]
314,737
<p>I have some strings that I am pulling out of a database and I would like to use Template Toolkit on them, but I can't seem to figure out how to use strings as TT input. Any tips?</p> <p>Thanks!</p> <p>-fREW</p>
[ { "answer_id": 314902, "author": "oeuftete", "author_id": 7674, "author_profile": "https://Stackoverflow.com/users/7674", "pm_score": 5, "selected": true, "text": " # text reference\n $tt->process(\\$text)\n || die $tt->error(), \"\\n\"\n" }, { "answer_id": ...
2008/11/24
[ "https://Stackoverflow.com/questions/314737", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12448/" ]
314,739
<p>I'm running Xorg and my (Qt) program daemonises itself. Now I log out and restart the X server. When I log in again my process is still running fine, but I can't see it.</p> <p>Is there a way of attatching the new incarnation of the X server to the old process? If I don't restart the whole server, but log out and i...
[ { "answer_id": 8634958, "author": "totaam", "author_id": 428751, "author_profile": "https://Stackoverflow.com/users/428751", "pm_score": 0, "selected": false, "text": "xpra start :10 --start-child=/bin/YOURAPP xpra attach :10 xpra attach ssh://THESERVERHOSTNAMEORIP/10" }, { "answ...
2008/11/24
[ "https://Stackoverflow.com/questions/314739", "https://Stackoverflow.com", "https://Stackoverflow.com/users/40317/" ]
314,765
<p>I am trying to implement performance testing on ActiveMQ, so have setup a basic producer and consumer to send and receive messages across a queue. I have created a producer with no problems, getting it to write a specific number of messages to the queue:</p> <pre><code> for(int i = 0; i &lt; numberOfMessages; i++){...
[ { "answer_id": 314857, "author": "Richard", "author_id": 16759, "author_profile": "https://Stackoverflow.com/users/16759", "pm_score": 3, "selected": true, "text": "<systemUsage>\n <systemUsage>\n <memoryUsage>\n <memoryUsage limit=\"20 mb\"/>...
2008/11/24
[ "https://Stackoverflow.com/questions/314765", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16759/" ]
314,774
<p>So, I'd like to be able to set the max log file size to 64M, but after doing so with <code>innodb_log_file_size=64M</code> MySQL starts OK, but nothing seems to work properly. </p> <p><strong>EDIT:</strong> and by properly I mean not at all. Setting other InnoDB variables aren't causing any problems.</p> <p>How sh...
[ { "answer_id": 315360, "author": "Kornel", "author_id": 27009, "author_profile": "https://Stackoverflow.com/users/27009", "pm_score": 3, "selected": true, "text": "ib_logfile* /var/lib/mysql/ show table status hostname.err" }, { "answer_id": 17496681, "author": "Jonathan", ...
2008/11/24
[ "https://Stackoverflow.com/questions/314774", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21716/" ]
314,779
<p>while writing a custom attribute in C# i was wondering if there are any guidelines or best practices regarding exceptions in attributes. Should the attribute check the given parameters for validity? Or is this the task of the user of the property?</p> <p>In a simple test I did the exception was not thrown until i u...
[ { "answer_id": 315276, "author": "Marc Gravell", "author_id": 23354, "author_profile": "https://Stackoverflow.com/users/23354", "pm_score": 2, "selected": false, "text": "[PrincipalPermission]" } ]
2008/11/24
[ "https://Stackoverflow.com/questions/314779", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21566/" ]
314,781
<p>I am working on a windows form application. How do i use the find method of a datatable to find a row if the datatable has a compound key?</p> <p>Table Structure Col A, Col B, Col C</p> <p>Col A and Col B make up the compound key. I want to find the row where the value in Col A is 6 and Col B is 5</p>
[ { "answer_id": 314805, "author": "Charles Bretana", "author_id": 32632, "author_profile": "https://Stackoverflow.com/users/32632", "pm_score": 4, "selected": false, "text": "dt.PrimaryKey = new DataColumn[] {dt.Columns[\"ColA\"], dt.Columns[\"ColB\"]};\n object[] keyVals = new object[] {...
2008/11/24
[ "https://Stackoverflow.com/questions/314781", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14780/" ]
314,783
<p>I have two SQL scripts which get called within a loop that accept a number parameter. Here is what I'm currently using:</p> <pre><code>for /l %%i in (1, 1, 51) do ( sqlplus u/p@name @script.sql a%%i.html %%i sqlplus u/p@name @script.sql b%%i.html %%i ) </code></pre> <p>Everything works fine, but it seems l...
[ { "answer_id": 314813, "author": "Brian Schmitt", "author_id": 30492, "author_profile": "https://Stackoverflow.com/users/30492", "pm_score": 3, "selected": true, "text": "@@script1.sql\n@@script2.sql\n" } ]
2008/11/24
[ "https://Stackoverflow.com/questions/314783", "https://Stackoverflow.com", "https://Stackoverflow.com/users/25371/" ]
314,786
<p>I have library code that overrides Ar's find method. I also include the module for all Association classes so both MyModel.find and @parent.my_models.find work and apply the correct scope.</p> <p>I based my code off of will_paginate's:</p> <pre><code>a = ActiveRecord::Associations returning([ a::AssociationCollect...
[ { "answer_id": 315092, "author": "gtd", "author_id": 8376, "author_profile": "https://Stackoverflow.com/users/8376", "pm_score": 3, "selected": false, "text": "def self.find(*args)\n super\nend\n" }, { "answer_id": 316407, "author": "Pedro", "author_id": 16882, "auth...
2008/11/24
[ "https://Stackoverflow.com/questions/314786", "https://Stackoverflow.com", "https://Stackoverflow.com/users/21702/" ]
314,792
<p>Can I export multiple calendar events into a single iCalendar file? </p>
[ { "answer_id": 314812, "author": "Paul Fisher", "author_id": 39808, "author_profile": "https://Stackoverflow.com/users/39808", "pm_score": 2, "selected": true, "text": "BEGIN:VCALENDAR\nBEGIN:VEVENT\nDESCRIPTION:\nDTEND:20071202T220000Z\nDTSTAMP:20081124T220920Z\nDTSTART:20071202T200000Z...
2008/11/24
[ "https://Stackoverflow.com/questions/314792", "https://Stackoverflow.com", "https://Stackoverflow.com/users/37759/" ]
314,800
<p>If you have a situation where you need to know where a boolean value wasn't set (for example if that unset value should inherit from a parent value) the Java boolean primitive (and the equivalent in other languages) is clearly not adequate.</p> <p>What's the best practice to achieve this? Define a new simple class...
[ { "answer_id": 314809, "author": "Johannes Schaub - litb", "author_id": 34509, "author_profile": "https://Stackoverflow.com/users/34509", "pm_score": 7, "selected": true, "text": "Boolean a = true;\nBoolean b = false;\nBoolean c = null;\n public enum ThreeState {\n TRUE,\n FALSE,\n...
2008/11/24
[ "https://Stackoverflow.com/questions/314800", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5303/" ]
314,804
<p>I have an application in which HttpRuntime.AppDomainAppPath returns the correct path with the wrong casing.</p> <p>I am then trying to use this in a String.Replace and it does not find the path in the filename due to casing.</p> <p>I am aware that I can use Regex.Replace but would prefer not to.</p> <p>I have thi...
[ { "answer_id": 314859, "author": "Brian Schmitt", "author_id": 30492, "author_profile": "https://Stackoverflow.com/users/30492", "pm_score": 0, "selected": false, "text": "Dim path As String = HttpRuntime.AppDomainAppPath.ToUpper\nDim newpath As String = Replace(path, \"fnd\", \"rplc\")\...
2008/11/24
[ "https://Stackoverflow.com/questions/314804", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3821/" ]
314,824
<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="https://stackoverflow.com/questions/2647/split-string-in-sql">Split string in SQL</a> </p> </blockquote> <p>I have seen <a href="https://stackoverflow.com/questions/tagged/concatenation+sql">a couple of questions related to string concatenation</...
[ { "answer_id": 314833, "author": "user39603", "author_id": 39603, "author_profile": "https://Stackoverflow.com/users/39603", "pm_score": 4, "selected": false, "text": "create function [dbo].[Split]\n(\n @string nvarchar(4000),\n @delimiter nvarchar(10)\n)\nreturns @table table\n(\n...
2008/11/24
[ "https://Stackoverflow.com/questions/314824", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3241/" ]
314,843
<p>Is it possible to have a post-mortem ( or post-exception ) debugging session in Java ? What would the workarounds be ( if there isn't a solution for this already ) ?</p>
[ { "answer_id": 314898, "author": "Mario Ortegón", "author_id": 2309, "author_profile": "https://Stackoverflow.com/users/2309", "pm_score": 3, "selected": true, "text": "-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=XXXX\n" } ]
2008/11/24
[ "https://Stackoverflow.com/questions/314843", "https://Stackoverflow.com", "https://Stackoverflow.com/users/31610/" ]
314,844
<p>Here's a simple (hopefully) L10N question:</p> <p>Do all locales want this format: </p> <p><em>Sunday, Nov 23, 2008</em></p> <p>with the weekday before the date, or do some locales want it after the date like this?</p> <p><em>Nov 23, 2008, Sunday</em></p>
[ { "answer_id": 314873, "author": "PhiLho", "author_id": 15459, "author_profile": "https://Stackoverflow.com/users/15459", "pm_score": 2, "selected": false, "text": "\"ahh'\\u6642'mm'\\u5206'ss'\\u79D2' z\", \n\"ahh'\\u6642'mm'\\u5206'ss'\\u79D2'\", \n\"a hh:mm:ss\", \n\"a h:mm\", \n\"yyy...
2008/11/24
[ "https://Stackoverflow.com/questions/314844", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17188/" ]
314,853
<p>Wanting to deploy my project on different servers I would prefer to be able to specify a connect string using a relative path. I can't seem to get that to work and want to know if there is some trick to it...?</p>
[ { "answer_id": 314951, "author": "AJ.", "author_id": 7211, "author_profile": "https://Stackoverflow.com/users/7211", "pm_score": 3, "selected": false, "text": "database string relativePath = @\"database\\myfile.s3db\";\n string currentPath;\n string absolutePath;\n string co...
2008/11/24
[ "https://Stackoverflow.com/questions/314853", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4491/" ]
314,858
<p>I have a string</p> <pre><code>var s:String = "This is a line \n This is another line."; this.txtHolder.text = s; //.text has \n, not a new line </code></pre> <p>and i want to put it into a text area, but the new line character is ignored. How can i ensure that the text breaks where i want it to when its assigned?...
[ { "answer_id": 314964, "author": "Hates_", "author_id": 3410, "author_profile": "https://Stackoverflow.com/users/3410", "pm_score": 2, "selected": false, "text": "\"This is a line {\\n} This is another line.\"\n \"This is a line <br> This is another line.\" \n" }, { "answer_id": ...
2008/11/24
[ "https://Stackoverflow.com/questions/314858", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1748529/" ]
314,864
<p>Learning a little about T-SQL, and thought an interesting exercise would be to generate a Mandelbrot set with it.</p> <p>Turns out someone already has (and recently, it appears). I'll let someone else post it as an answer, but I'm curious what optimizations can be made.</p> <p>Alternately, what would you do to ma...
[ { "answer_id": 314875, "author": "Elie", "author_id": 23249, "author_profile": "https://Stackoverflow.com/users/23249", "pm_score": 4, "selected": false, "text": "-- AUTHOR: GRAEME JOB\n-- CREATED: 12-OCT-2008\n-- BECAUSE: SINGLE SQL COMMAND < 50 LINES. JUST BECAUSE.\nWITH \n XGEN(X...
2008/11/24
[ "https://Stackoverflow.com/questions/314864", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2915/" ]
314,872
<p>There doesn't seem to be much info on this topic so I'm going to outline my specific problem then maybe we can shape the question and the answer into something a bit more universal.</p> <p>I have this rewrite rule</p> <pre><code>RewriteEngine On RewriteBase /bookkeepers/ RewriteCond %{REQUEST_FILENAME} !-f Rewrite...
[ { "answer_id": 314877, "author": "Paul Tomblin", "author_id": 3333, "author_profile": "https://Stackoverflow.com/users/3333", "pm_score": 3, "selected": false, "text": "RewriteRule ^(.+[^/])/?$ index.php?franchise=$1\n" }, { "answer_id": 314895, "author": "Greg", "author_...
2008/11/24
[ "https://Stackoverflow.com/questions/314872", "https://Stackoverflow.com", "https://Stackoverflow.com/users/319/" ]
314,926
<p>I have populated a Datatable, from 2 different servers. I am able to make adjustments where my length>0, what I want to do is remove the rows that does not hit. Here is a summary of what I have</p> <pre><code>DataRow[] dr = payments.dtPayments.Select(myselect); if (dr.Length &gt; 0) { for (int a = 0; a &lt; d...
[ { "answer_id": 314991, "author": "Yona", "author_id": 40007, "author_profile": "https://Stackoverflow.com/users/40007", "pm_score": 4, "selected": false, "text": "DataRow[] dr = payments.dtPayments.Select(myselect);\nList<DataRow> rowsToRemove = new List<DataRow>();\n\nfor (int a = 0; a ...
2008/11/24
[ "https://Stackoverflow.com/questions/314926", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
314,933
<p>How do I do the above? I've started using MVC and I'm having issues passing data around.</p> <p>My specific problem is to do with a list of objects I have in my Model which I need to access in a View and iterate through.</p> <p>Thanks in advance.</p>
[ { "answer_id": 314992, "author": "Dave Weaver", "author_id": 11991, "author_profile": "https://Stackoverflow.com/users/11991", "pm_score": 2, "selected": false, "text": "Function List() As ViewResult\n ' pass other information in the viewdata dictionary\n ViewData(\"Title\") = \"Al...
2008/11/24
[ "https://Stackoverflow.com/questions/314933", "https://Stackoverflow.com", "https://Stackoverflow.com/users/29445/" ]
314,945
<p>I'm new using makefiles and I have some makefiles. One of them has these statements I tried to understand but I can't.</p> <h3>What is this makefile doing?</h3> <pre><code># debugging support ifeq ($(DEBUG), true) CFLAGS+=-DDEBUG -g endif ifeq ($(DEBUG), gdb) CFLAGS+=-g endif ifeq ($(PROFILING), true) CFLAGS+=-p...
[ { "answer_id": 314959, "author": "Alan", "author_id": 37843, "author_profile": "https://Stackoverflow.com/users/37843", "pm_score": 3, "selected": false, "text": "ifeq ($(DEBUG), true)\n\nCFLAGS+=-DDEBUG -g\n\nendif\n" }, { "answer_id": 315376, "author": "Dave Costa", "au...
2008/11/24
[ "https://Stackoverflow.com/questions/314945", "https://Stackoverflow.com", "https://Stackoverflow.com/users/40341/" ]
314,958
<p>I'm looking for an image editor that I can embed easily into an ASP.NET website. I need to be able to draw rectangles, lines and add some text. Additionally, images must not be uploaded to third-party servers.</p> <p>I've checked sites of the main ISVs that develop .NET controls but none of them provides a standalo...
[ { "answer_id": 1842096, "author": "444", "author_id": 224168, "author_profile": "https://Stackoverflow.com/users/224168", "pm_score": 0, "selected": false, "text": "if (sense == 1) //Rotate 90 to right\n {\n img.RotateFlip(RotateFlipType.Rotate270FlipXY);\n }\n" } ]
2008/11/24
[ "https://Stackoverflow.com/questions/314958", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3323/" ]
314,966
<p>This question is a follow-up to a question I asked the other day <a href="https://stackoverflow.com/questions/302022/sql-need-to-find-duplicate-records-but-exclude-reversed-transactions">("Need to find duplicate records but exclude reversed transactions")</a>.</p> <p>I have a Crystal Report which displays customers...
[ { "answer_id": 315871, "author": "DJ.", "author_id": 10492, "author_profile": "https://Stackoverflow.com/users/10492", "pm_score": 2, "selected": false, "text": "( {Reversal} = \"Y\" ) OR \n( {Date} = Next({Date}) AND {QTY} = Next({QTY}}) * -1 AND \n {Value} = Next({Value}) * -1 AND Nex...
2008/11/24
[ "https://Stackoverflow.com/questions/314966", "https://Stackoverflow.com", "https://Stackoverflow.com/users/38949/" ]
314,983
<p>I know it makes little difference to a project but, assuming you use #defined header guards for your C++ code, what format do you use? e.g. assuming a header called <code>foo.hpp</code>:</p> <pre><code>#ifndef __FOO_HPP__ ... #ifndef INCLUDED_FOO_HPP ... #ifndef SOME_OTHER_FORMAT </code></pre> <p>I'm sold on th...
[ { "answer_id": 314989, "author": "Zebra North", "author_id": 17440, "author_profile": "https://Stackoverflow.com/users/17440", "pm_score": 4, "selected": false, "text": "INCLUDED_FOO_HPP" }, { "answer_id": 314996, "author": "James Curran", "author_id": 12725, "author_...
2008/11/24
[ "https://Stackoverflow.com/questions/314983", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9236/" ]
314,994
<p>I'm reading through K&amp;R and came to the small section on register variables, and was wondering if people here have some good examples of this put into practice.</p> <p>From section 4.7 in K&amp;R:</p> <blockquote> <p>The register declaration looks like<br> register int x;<br> register char c;<...
[ { "answer_id": 17119028, "author": "Rafael", "author_id": 2487874, "author_profile": "https://Stackoverflow.com/users/2487874", "pm_score": 2, "selected": false, "text": "inline void max_heapify(int *H, int i){\n char OK = FALSE;\n register int l, r, max, hI;\n while(!OK){\n ...
2008/11/24
[ "https://Stackoverflow.com/questions/314994", "https://Stackoverflow.com", "https://Stackoverflow.com/users/25664/" ]
314,998
<p>I have a column with a "DEFAULT" constraint. I'd like to create a script that drops that column.</p> <p>The problem is that it returns this error:</p> <pre><code>Msg 5074, Level 16, State 1, Line 1 The object 'DF__PeriodSce__IsClo__4BCC3ABA' is dependent on column 'IsClosed'. Msg 4922, Level 16, State 9, Line 1...
[ { "answer_id": 315049, "author": "Steve Sheldon", "author_id": 30513, "author_profile": "https://Stackoverflow.com/users/30513", "pm_score": 2, "selected": false, "text": "select CONSTRAINT_NAME from INFORMATION_SCHEMA.CONSTRAINT_COLUMN_USAGE WHERE TABLE_NAME = '<tablename>' AND COLUMN_N...
2008/11/24
[ "https://Stackoverflow.com/questions/314998", "https://Stackoverflow.com", "https://Stackoverflow.com/users/28544/" ]
315,009
<p>Question for anyone who's used Mechanical Turk: Is it possible to take an HTML template created on Mechanical Turk's website, and then create more HITs based on that template from the command line tools or API? </p> <hr> <p>According to the API docs, it's not possible to create new HTML and add it...from the API. ...
[ { "answer_id": 16437637, "author": "Thomas", "author_id": 2338862, "author_profile": "https://Stackoverflow.com/users/2338862", "pm_score": 2, "selected": true, "text": "HITLayout" } ]
2008/11/24
[ "https://Stackoverflow.com/questions/315009", "https://Stackoverflow.com", "https://Stackoverflow.com/users/40352/" ]
315,011
<p>Is there a command, or a set of tables I can look at to determine which tables, stored procedures and views in SQL Server server 2005 have a certain user defined data type?</p>
[ { "answer_id": 315055, "author": "ConcernedOfTunbridgeWells", "author_id": 15401, "author_profile": "https://Stackoverflow.com/users/15401", "pm_score": 2, "selected": true, "text": "select s.name\n ,o.name\n ,c.name\n ,t.name\n from sys.schemas s\n join sys.objects o\n ...
2008/11/24
[ "https://Stackoverflow.com/questions/315011", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1942/" ]
315,017
<p>I will explain problem with an example:</p> <p>There is two table in my database, named entry, tags</p> <p>There is a column named ID_ENTRY in both table. When I add a record to table, entry, I have to take the ID_ENTRY of last added record and add it to table, tags. How can I do it?</p>
[ { "answer_id": 315079, "author": "Joel Coehoorn", "author_id": 3043, "author_profile": "https://Stackoverflow.com/users/3043", "pm_score": 2, "selected": false, "text": "\"DECLARE @ID int;INSERT INTO [Entry] (...) VALUES ...; SELECT @ID = scope_identity();INSERT INTO [TAGS] (ID_ENTRY) VA...
2008/11/24
[ "https://Stackoverflow.com/questions/315017", "https://Stackoverflow.com", "https://Stackoverflow.com/users/439507/" ]
315,051
<p>I have a dll that was written in c++, I need to use this dll in my c# code. After searching I found that using P/Invoke would give me access to the function I need, but these functions are defined with in a class and use non-static private member variables. So I need to be able to create an instance of this class to...
[ { "answer_id": 315064, "author": "JaredPar", "author_id": 23283, "author_profile": "https://Stackoverflow.com/users/23283", "pm_score": 8, "selected": true, "text": "class Foo {\npublic:\n int Bar();\n};\nextern \"C\" Foo* Foo_Create() { return new Foo(); }\nextern \"C\" int Foo_Bar(Foo...
2008/11/24
[ "https://Stackoverflow.com/questions/315051", "https://Stackoverflow.com", "https://Stackoverflow.com/users/55638/" ]
315,053
<p>The [x] button in the top bar of a window that normally closes the window in standard Windows, appears to do a minimise instead on Windows Compact.</p> <p>How do it make it close instead? I need to also be able to raise an event when this happens as I want to preform some logic on window close.</p>
[ { "answer_id": 316242, "author": "Shane Powell", "author_id": 23235, "author_profile": "https://Stackoverflow.com/users/23235", "pm_score": 0, "selected": false, "text": "SHDB_HIDE SHDB_SHOW SHDB_SHOWCANCEL SHDB_SHOWCANCEL" } ]
2008/11/24
[ "https://Stackoverflow.com/questions/315053", "https://Stackoverflow.com", "https://Stackoverflow.com/users/230/" ]
315,073
<p>I'm building a JSF+Facelets web app, one piece of which is a method that scans a directory every so often and indexes any changes. This method is part of a bean which is in application scope. I have built a subclass of TimerTask to call the method every X milliseconds. My problem is getting the bean initialized. ...
[ { "answer_id": 322621, "author": "McDowell", "author_id": 304, "author_profile": "https://Stackoverflow.com/users/304", "pm_score": 5, "selected": true, "text": "<listener>\n <listener-class>appobj.MyApplicationContextListener</listener-class>\n</listener>\n public class MyApplication...
2008/11/24
[ "https://Stackoverflow.com/questions/315073", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1322/" ]
315,074
<p>I'm designing a system which is receiving data from a number of partners in the form of CSV files. The files may differ in the number and ordering of columns. For the most part, I will want to choose a subset of the columns, maybe reorder them, and hand them off to a parser. I would obviously prefer to be able to tr...
[ { "answer_id": 1533079, "author": "Robert Rossney", "author_id": 19403, "author_profile": "https://Stackoverflow.com/users/19403", "pm_score": 0, "selected": false, "text": "XmlReader" }, { "answer_id": 3366658, "author": "Jeremiah Jahn", "author_id": 350068, "author_...
2008/11/24
[ "https://Stackoverflow.com/questions/315074", "https://Stackoverflow.com", "https://Stackoverflow.com/users/40348/" ]
315,078
<p>What is the most recommended/best way to stop multiple instances of a setTimeout function from being created (in javascript)?</p> <p>An example (psuedo code):</p> <pre><code>function mouseClick() { moveDiv("div_0001", mouseX, mouseY); } function moveDiv(objID, destX, destY) { //some code that moves the div ...
[ { "answer_id": 315107, "author": "Daniel Schaffer", "author_id": 2596, "author_profile": "https://Stackoverflow.com/users/2596", "pm_score": 2, "selected": false, "text": "var timeout1 = window.setTimeout('doSomething();', 1000);\nvar timeout2 = window.setTimeout('doSomething();', 1000);...
2008/11/24
[ "https://Stackoverflow.com/questions/315078", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2490/" ]
315,084
<p>I am the .Net specialist in a consultancy with many difference flavors of developers using many different languages and frameworks. Because everyone is pretty much trying to push their own agendas with our different clients in terms of what technology to propose, I'm constantly finding myself in the classic argument...
[ { "answer_id": 315107, "author": "Daniel Schaffer", "author_id": 2596, "author_profile": "https://Stackoverflow.com/users/2596", "pm_score": 2, "selected": false, "text": "var timeout1 = window.setTimeout('doSomething();', 1000);\nvar timeout2 = window.setTimeout('doSomething();', 1000);...
2008/11/24
[ "https://Stackoverflow.com/questions/315084", "https://Stackoverflow.com", "https://Stackoverflow.com/users/39086/" ]
315,091
<p>Suppose you have a GridView with a few columns like:</p> <p>| Foo | Bar | Total |</p> <p>and you use a style sheet to make the alternating rows different colors, say light blue and white.</p> <p>Is there a good way to make a particular column alternate in a different color? For example, I might want the Total co...
[ { "answer_id": 315123, "author": "Ben Scheirman", "author_id": 3381, "author_profile": "https://Stackoverflow.com/users/3381", "pm_score": 2, "selected": false, "text": "$(\"table#myTable col:odd\").css(\"background-color:#ffe\");\n :odd" }, { "answer_id": 315193, "author": "...
2008/11/24
[ "https://Stackoverflow.com/questions/315091", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3161/" ]
315,093
<p>I have a directory to which a process uploads some <code>.pdf</code> files. This process is out of my control.</p> <p>I need to make those files available through the website using Tomcat.</p> <p>I have a directory <code>/var/lib/tomcat5/webapps/test1</code> available to the web and I can see the files in it with ...
[ { "answer_id": 315145, "author": "Loki", "author_id": 39057, "author_profile": "https://Stackoverflow.com/users/39057", "pm_score": 4, "selected": false, "text": "META-INF <?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<Context path=\"/myapp\" allowLinking=\"true\">\n\n</Context>\n" }, ...
2008/11/24
[ "https://Stackoverflow.com/questions/315093", "https://Stackoverflow.com", "https://Stackoverflow.com/users/28351/" ]
315,115
<p>I'm pretty sure that I'm not understanding something about JPA (I'm using OpenJPA) and it's causing this problem. I want to make a copy of a Job entity.</p> <pre><code>@Entity @Table(name="Job") public class Job implements Serializable { @Id @GeneratedValue(strategy=GenerationType.IDENTITY) private int...
[ { "answer_id": 315888, "author": "yclian", "author_id": 36397, "author_profile": "https://Stackoverflow.com/users/36397", "pm_score": -1, "selected": false, "text": "DetachedStateManager.getMetaData()" } ]
2008/11/24
[ "https://Stackoverflow.com/questions/315115", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1294/" ]
315,132
<p>I need to share SSO information between two different domains with a cookie, can this be done in PHP and how?</p>
[ { "answer_id": 315168, "author": "Community", "author_id": -1, "author_profile": "https://Stackoverflow.com/users/-1", "pm_score": 1, "selected": false, "text": ".yourdomain.com" }, { "answer_id": 315269, "author": "KDrewiske", "author_id": 32134, "author_profile": "h...
2008/11/24
[ "https://Stackoverflow.com/questions/315132", "https://Stackoverflow.com", "https://Stackoverflow.com/users/37019/" ]
315,139
<p>I want to start using Nunit (finally), I am using Visual Studio 2008.</p> <p>Is it as simple as importing Nunit into my test project?</p> <p>I remember seeing a GUI for NUnit, does that do the exact same thing that a separate test project would do, except show you the pass/fail visually?</p>
[ { "answer_id": 315246, "author": "Noaki", "author_id": 40284, "author_profile": "https://Stackoverflow.com/users/40284", "pm_score": 5, "selected": true, "text": "Title: &NUnit\nCommand: <path to nunit>\nArguments $(ProjectFileName) /run\nInitial directory: $(ProjectDir)\n" } ]
2008/11/24
[ "https://Stackoverflow.com/questions/315139", "https://Stackoverflow.com", "https://Stackoverflow.com/users/39677/" ]
315,142
<p>I'm wondering if I'm missing something about Java Beans. I like my objects to do as much initialization in the constructor as possible and have a minimum number of mutators. Beans seem to go directly against this and generally feel clunky. What capabilities am I missing out on by not building my objects as Beans?</p...
[ { "answer_id": 315179, "author": "Dónal", "author_id": 2648, "author_profile": "https://Stackoverflow.com/users/2648", "pm_score": 3, "selected": false, "text": "Collection<Person> myCollection = // initialise and populate the collection\nComparator nameCompare = new BeanComparator(\"nam...
2008/11/24
[ "https://Stackoverflow.com/questions/315142", "https://Stackoverflow.com", "https://Stackoverflow.com/users/40310/" ]
315,146
<p>Is there anything to use, to determine if a type is actually a anonymous type? For example an interface, etc?</p> <p>The goal is to create something like the following...</p> <pre><code>//defined like... public static T Get&lt;T&gt;(this IAnonymous obj, string prop) { return (T)obj.GetType().GetProperty(prop)....
[ { "answer_id": 315152, "author": "Marc Gravell", "author_id": 23354, "author_profile": "https://Stackoverflow.com/users/23354", "pm_score": 2, "selected": false, "text": "[CompilerGenerated] static void Main()\n {\n var foo = new { name = \"John\", age = 25 };\n var ...
2008/11/24
[ "https://Stackoverflow.com/questions/315146", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17091/" ]
315,164
<p>I'm trying to use the FolderBrowserDialog from my WPF application - nothing fancy. I don't much care that it has the Windows Forms look to it.</p> <p>However, when I call ShowDialog, I want to pass the owner window which is an IWin32Window. How do I get this from my WPF control?</p> <p>Actually, does it matter? If...
[ { "answer_id": 315172, "author": "Jobi Joy", "author_id": 8091, "author_profile": "https://Stackoverflow.com/users/8091", "pm_score": 4, "selected": false, "text": " public class OldWindow : System.Windows.Forms.IWin32Window\n{\n IntPtr _handle;\n\n public OldWindow(IntPtr handle)\...
2008/11/24
[ "https://Stackoverflow.com/questions/315164", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14537/" ]
315,165
<p>Is it possible? By debug I mean setting breakpoints, inspect values and advance step by step.</p>
[ { "answer_id": 315318, "author": "Ned Batchelder", "author_id": 14343, "author_profile": "https://Stackoverflow.com/users/14343", "pm_score": 3, "selected": false, "text": "import pdb; pdb.set_trace() \n" }, { "answer_id": 53567278, "author": "Craig", "author_id": 1856922...
2008/11/24
[ "https://Stackoverflow.com/questions/315165", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4264/" ]
315,177
<p>I'm relatively new to Javascript and was wondering if there's a quick way to shuffle content that is contained in multiple <code>&lt;div&gt;</code> tags. For example</p> <pre><code>&lt;div id='d1'&gt; &lt;span&gt;alpha&lt;/span&gt; &lt;img src='alpha.jpg'&gt; &lt;/div&gt; &lt;div id='d2'&gt; &lt;span&gt;beta...
[ { "answer_id": 315275, "author": "Rob Allen", "author_id": 149, "author_profile": "https://Stackoverflow.com/users/149", "pm_score": -1, "selected": false, "text": "<script type=\"text/javascript\">\n function ajaxManager(){\n var args = ajaxManager.arguments;\n\n if (do...
2008/11/24
[ "https://Stackoverflow.com/questions/315177", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5073/" ]
315,178
<p>Greetings!</p> <p>I'm still learning about the GridView control and I have one bound to an ObjectDataSource. My Web form looks like this:</p> <pre><code>&lt;asp:GridView ID="ourGrid" runat="server" DataSourceID="ourDataSource" onrowdatabound="ourGrid_RowDataBound" HeaderStyle-CssClass="header_style"...
[ { "answer_id": 315264, "author": "Gavin Miller", "author_id": 33226, "author_profile": "https://Stackoverflow.com/users/33226", "pm_score": -1, "selected": false, "text": "if (e.Row.Type == DataControlRowType.Footer)\n{\n// Do Work\n}\n <Columns>\n <asp:BoundField DataField=\"PrimaryKey...
2008/11/24
[ "https://Stackoverflow.com/questions/315178", "https://Stackoverflow.com", "https://Stackoverflow.com/users/27870/" ]
315,183
<p>We are developing large ASP.NET applications with lot of dynmically created pages containing ASCX controls. We use a lot of jQuery everywhere.</p> <p>I have been reading that it would make sense to move the inline JavaScript code to the bottom of the page as it could delay the loading of the page when it's included...
[ { "answer_id": 315869, "author": "Már Örlygsson", "author_id": 16271, "author_profile": "https://Stackoverflow.com/users/16271", "pm_score": 4, "selected": false, "text": "<script>" } ]
2008/11/24
[ "https://Stackoverflow.com/questions/315183", "https://Stackoverflow.com", "https://Stackoverflow.com/users/36546/" ]
315,185
<p>I have a large db with many tables and sprocs, and I want to find and see, for example, if there is a table with a name that has "setting" as part of it. I'm not very familiar with SqlServer's System Databases like master, msdb etc., I know there is a way to query one of those dbs to get what I need back, does some...
[ { "answer_id": 315190, "author": "Steven A. Lowe", "author_id": 9345, "author_profile": "https://Stackoverflow.com/users/9345", "pm_score": 1, "selected": false, "text": "SELECT * \nFROM sys.objects\n" }, { "answer_id": 315195, "author": "ahockley", "author_id": 8209, ...
2008/11/24
[ "https://Stackoverflow.com/questions/315185", "https://Stackoverflow.com", "https://Stackoverflow.com/users/32240/" ]
315,196
<p>I have a SQL challenge that is wracking my brain. I am trying to reconcile two reports for licenses of an application. </p> <p>The first report is an access database table. It has been created and maintained by hand by my predecessors. Whenever they installed or uninstalled the application they would manually up...
[ { "answer_id": 315203, "author": "Noah Goodrich", "author_id": 20178, "author_profile": "https://Stackoverflow.com/users/20178", "pm_score": 0, "selected": false, "text": "SELECT displayName, 'report_1' as type\nFROM report_1 r1 \nLEFT OUTER JOIN report_2 r2 ON r1.SAMAccountName = r2.SAM...
2008/11/24
[ "https://Stackoverflow.com/questions/315196", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8007/" ]
315,209
<p>I've got Postscript code/data (?) in memory (in a Java Tomcat webapp) that I'd like to send directly to a networked PS printer. Is there an easy way (i.e. just popping open a port and sending the text) to print this, bypassing all of the O/S-specific drivers and stuff (and hopefully not even requiring extra jars)? ...
[ { "answer_id": 315238, "author": "VonC", "author_id": 6309, "author_profile": "https://Stackoverflow.com/users/6309", "pm_score": 0, "selected": false, "text": "import com.adobe.livecycle.output.client.*;\nimport java.util.*; \nimport java.io.File; \nimport java.io.FileInputStream;...
2008/11/24
[ "https://Stackoverflow.com/questions/315209", "https://Stackoverflow.com", "https://Stackoverflow.com/users/40373/" ]
315,210
<p>I've got a Visual Studio 2008 solution with a WCF service, and a client.</p> <p>When I run my client, and call a method from my service I get a message saying "Unable to automatically debug 'Home.Service'. The remote procedure could not be debugged. This usually indicates that debugging has not been enabled on the ...
[ { "answer_id": 315216, "author": "Ta01", "author_id": 7280, "author_profile": "https://Stackoverflow.com/users/7280", "pm_score": 0, "selected": false, "text": " <serviceBehaviors>\n\n <serviceDebug includeExceptionDetailInFaults=\"true\"/>\n </behavior>\n </service...
2008/11/24
[ "https://Stackoverflow.com/questions/315210", "https://Stackoverflow.com", "https://Stackoverflow.com/users/33431/" ]
315,218
<p>My C++ framework has Buttons. A Button derives from Control. So a function accepting a Control can take a Button as its argument. So far so good.</p> <p>I also have List<code>&lt;</code>T>. However, List<code>&lt;</code>Button> doesn't derive from List<code>&lt;</code>Control>, which means a function accepting a li...
[ { "answer_id": 315232, "author": "Zebra North", "author_id": 17440, "author_profile": "https://Stackoverflow.com/users/17440", "pm_score": 3, "selected": false, "text": "list<Control*>" }, { "answer_id": 315248, "author": "Johannes Schaub - litb", "author_id": 34509, ...
2008/11/24
[ "https://Stackoverflow.com/questions/315218", "https://Stackoverflow.com", "https://Stackoverflow.com/users/39301/" ]
315,227
<p>So my goal is to be able to add a user from one Active Directory Domain to another group in a separate Active Directory Domain.</p> <p>I'd like to do this in C#. I know there is a System.DirectoryServices namespace with classes to communicate with AD, but I can't find any information on adding users across domains...
[ { "answer_id": 392491, "author": "barneytron", "author_id": 48988, "author_profile": "https://Stackoverflow.com/users/48988", "pm_score": 1, "selected": false, "text": "DirectoryEntry group = new DirectoryEntry(@\"LDAP://CN=foo,DC=domainA\");\nstring memberADsPath = @\"LDAP://CN=bar,DC=d...
2008/11/24
[ "https://Stackoverflow.com/questions/315227", "https://Stackoverflow.com", "https://Stackoverflow.com/users/26861/" ]
315,231
<p>How can I use reflection to create a generic List with a custom class (List&lt;CustomClass&gt;)? I need to be able to add values and use <code>propertyInfo.SetValue(..., ..., ...)</code> to store it. Would I be better off storing these List&lt;>'s as some other data structure?</p> <p>Edit:</p> <p>I should have s...
[ { "answer_id": 315265, "author": "Marc Gravell", "author_id": 23354, "author_profile": "https://Stackoverflow.com/users/23354", "pm_score": 5, "selected": true, "text": "class Foo\n{\n public string Bar { get; set; }\n}\nclass Program\n{\n static void Main()\n {\n Type ty...
2008/11/24
[ "https://Stackoverflow.com/questions/315231", "https://Stackoverflow.com", "https://Stackoverflow.com/users/37344/" ]
315,237
<p>I filled up a combobox with the values from an Enum.</p> <p>Now a combobox is text right? So I'm using a getter and a setter. I'm having problems reading the text.</p> <p>Here's the code:</p> <pre><code>public BookType type { get { return (BookType)Enum.Parse(typeof(BookType), this.typeComboBox.T...
[ { "answer_id": 315292, "author": "Howler", "author_id": 2871, "author_profile": "https://Stackoverflow.com/users/2871", "pm_score": 1, "selected": false, "text": "this.typeComboBox.SelectedItem.ToString()\n" }, { "answer_id": 315293, "author": "Dylan Beattie", "author_id"...
2008/11/24
[ "https://Stackoverflow.com/questions/315237", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11795/" ]
315,242
<p>I thought I'd get myself a Subversion setup at home for my hobby projects, and I'm trying to do it right, first time (my work's source control control policies or lack of them are, well, not perfect).</p> <p>The thing I'm struggling with is this: I'd like to version entire Eclipse projects. This will be good from...
[ { "answer_id": 315367, "author": "rmeador", "author_id": 10861, "author_profile": "https://Stackoverflow.com/users/10861", "pm_score": 1, "selected": false, "text": "svn add svn status" }, { "answer_id": 315375, "author": "Carl Serrander", "author_id": 40272, "author_...
2008/11/24
[ "https://Stackoverflow.com/questions/315242", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
315,243
<p>In our Flex AIR app, we have the problem that our main app window is fairly narrow. This means Alert dialog boxes are chopped on both side, while the right click menu is cropped. How can we get these windows to not get cropped by our main window?</p>
[ { "answer_id": 356667, "author": "Eric Belair", "author_id": 31298, "author_profile": "https://Stackoverflow.com/users/31298", "pm_score": 1, "selected": false, "text": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<mx:WindowedApplication xmlns:mx=\"http://www.adobe.com/2006/mxml\" \n ...
2008/11/24
[ "https://Stackoverflow.com/questions/315243", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7099/" ]
315,261
<p>I'm using the <code>QMdiArea</code> in Qt 4.4.</p> <p>If a new project is created, I add a number of sub windows to a <code>QMdiArea</code>. I'd like to disallow the user to close a sub window during runtime. The sub windows should only be closed if the whole application is closed or if a new project is created.</p...
[ { "answer_id": 4498486, "author": "sorush-r", "author_id": 275221, "author_profile": "https://Stackoverflow.com/users/275221", "pm_score": 3, "selected": true, "text": "subWindow QMdiSubWindow closeEvent(QCloseEvent *closeEvent) void ChildWindow::closeEvent(QCloseEvent *closeEvent)\n{\n ...
2008/11/24
[ "https://Stackoverflow.com/questions/315261", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5334/" ]
315,285
<p>I'm using two commercial libraries that are produced by the same vendor, called VendorLibA and VendorLibB. The libraries are distributed as many DLLs that depend on the compiler version (e.g. VC7, VC8). Both libraries depend on a another library, produced by this vendor, called VendorLibUtils and contained in one DL...
[ { "answer_id": 315374, "author": "Andreas Magnusson", "author_id": 5811, "author_profile": "https://Stackoverflow.com/users/5811", "pm_score": 2, "selected": false, "text": "LoadLibrary() GetProcAddress() HMODULE v1 = LoadLibrary(_T(\"libv1_0.dll\"));\nlibv1_0::fun_in_lib = reinterpret_c...
2008/11/24
[ "https://Stackoverflow.com/questions/315285", "https://Stackoverflow.com", "https://Stackoverflow.com/users/33982/" ]
315,301
<p>At the moment I'm creating a <code>DateTime</code> for each month and formatting it to only include the month.<br> Is there another or any better way to do this?</p>
[ { "answer_id": 315319, "author": "Rohan West", "author_id": 38686, "author_profile": "https://Stackoverflow.com/users/38686", "pm_score": 4, "selected": false, "text": "System.Globalization.CultureInfo.CurrentCulture.DateTimeFormat.MonthNames\n" }, { "answer_id": 315321, "aut...
2008/11/24
[ "https://Stackoverflow.com/questions/315301", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8741/" ]
315,306
<p>I can't, for the life of me, remember what exactly our teacher said that day and I'm hoping you would probably know.</p> <p>The module is "Data Structures and Algorithms" and he told us something along the lines of:</p> <blockquote> <p>The <code>if</code> statement is the most expensive [something]. [something...
[ { "answer_id": 315327, "author": "Joel Coehoorn", "author_id": 3043, "author_profile": "https://Stackoverflow.com/users/3043", "pm_score": 5, "selected": false, "text": "if if" }, { "answer_id": 315337, "author": "Michael Burr", "author_id": 12711, "author_profile": "...
2008/11/24
[ "https://Stackoverflow.com/questions/315306", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2644/" ]
315,331
<p>I have a database that i'm dealing with which is updated every few hours remotely (not on any specific time span) and i have no control over the administration of it. I have web clients connecting to it to view information contained within it. These clients (coded using PHP and Javascript) might be checking the data...
[ { "answer_id": 321729, "author": "Dieseltime", "author_id": 41108, "author_profile": "https://Stackoverflow.com/users/41108", "pm_score": 2, "selected": false, "text": "$query = \"SELECT * FROM really_big_table\";\n$cache_query = md5($query);\nif(!$result = $cache->load($cache_query))\n{...
2008/11/24
[ "https://Stackoverflow.com/questions/315331", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13227/" ]
315,336
<p>sorry about the title :)</p> <p>Here is my basic problem, I trying to implement an SEO type query for a location.</p> <p>Here are my examples</p> <ul> <li>/Leeds</li> <li>/Leeds_England</li> <li>/Hampshire_England</li> <li>/England_Leeds</li> <li>/Europe_England</li> </ul> <p>I am trying to get the location, now...
[ { "answer_id": 332881, "author": "Frank Krueger", "author_id": 338, "author_profile": "https://Stackoverflow.com/users/338", "pm_score": 0, "selected": false, "text": "class LocationResolver {\n private IEnumerable<Location> locations;\n private Map<String, Location> memory = new M...
2008/11/24
[ "https://Stackoverflow.com/questions/315336", "https://Stackoverflow.com", "https://Stackoverflow.com/users/25531/" ]