text
string
meta
dict
Q: Groovlet in Grails apps How do I drop a Groovlet into a Grails app? Say, for example, in web-app/groovlet.groovy import java.util.Date if (session == null) { session = request.getSession(true); } if (session.counter == null) { session.counter = 1 } println """ <html> <head> <title>Groovy Servlet...
{ "language": "en", "url": "https://stackoverflow.com/questions/241960", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to change culture to a DateTimepicker or calendar control in .Net How to set internationalization to a DateTimepicker or Calendar WinForm control in .Net when the desire culture is different to the one installed in the PC? A: Based on previous solution, I think the better is: dateTimePicker.Format = DateTimePic...
{ "language": "en", "url": "https://stackoverflow.com/questions/241964", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: Linq/lambda question about .Select (newby learning 3.0) I am playing with the new stuff of C#3.0 and I have this code (mostly taken from MSDN) but I can only get true,false,true... and not the real value : int[] numbers = { 5, 4, 1, 3, 9, 8, 6, 7, 2, 0 }; var oddNumbers = numbers.Select(n => n % 2 =...
{ "language": "en", "url": "https://stackoverflow.com/questions/241967", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: "HTTP status 401: Access Denied" error for web service even when the virtual directory allows Anonymous access i have a web service hosted on another server with the Anonymous Access CheckBox in IIS is already checked. when my local web application is trying to access the web service, i still get the "The request fa...
{ "language": "en", "url": "https://stackoverflow.com/questions/241971", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Can I Register more than one shutdown function in PHP? using register_shutdown_function I can register code to execute at the end of a PHP script execution "no matter what". Can I have more than one function registered? This question arises since I may not know if someone has already registered one when I'm about to...
{ "language": "en", "url": "https://stackoverflow.com/questions/241976", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to fix apache2 timestamps, incorrect values When I restart my apache2 and reload a page, the log file shows boogie.tontut.fi - - [28/Oct/2008:03:27:49 +0200] "GET /test HTTP/1.1" 404 457 "-" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3" ...as supposed to, as it's 0...
{ "language": "en", "url": "https://stackoverflow.com/questions/241989", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Saving Word 2007 to MOSS gives never ending "Getting list of available content types..." dialog We have a weird intermittent problem with saving from Word 2007 to our SharePoint 2007 (MOSS) document libraries that gives a dialog box that never goes away - it is titled "Content Types" and the message "Getting list of...
{ "language": "en", "url": "https://stackoverflow.com/questions/241991", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Which is more efficient way to assign values to variables in .NET? This is something that I have always wondered about, but never bothered to profile. Is it more efficient to assign a value to a temp variable, than to keep using that value. An Example may be clearer: string s = reader.GetItem[0].ToString(); someClas...
{ "language": "en", "url": "https://stackoverflow.com/questions/241994", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Is there any way to get a REPL in pydev? I would like to be able to drop to the python REPL from the debugger -- if this is not possible is there an easier way to evaluate python expressions in the context of the current breakpoint other than manually adding them all as watch expressions? A: There is a dedicated P...
{ "language": "en", "url": "https://stackoverflow.com/questions/241995", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: How do I form a good predicate delegate to Find() something in my List? After looking on MSDN, it's still unclear to me how I should form a proper predicate to use the Find() method in List using a member variable of T (where T is a class) For example: public class Car { public string Make; public string Mode...
{ "language": "en", "url": "https://stackoverflow.com/questions/242012", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "25" }
Q: Mapping Oracle bool fields with nHibernate I have an Oracle database and the boolean fields are CHAR(1) with Y/N stored. How can I map this to a bool type using nHibernate? A: Set type="YesNo" in the nhibernate property definition for the field. For more info, see table 5.3 in this doc which maps .NET types, to DB ...
{ "language": "en", "url": "https://stackoverflow.com/questions/242016", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: nHibernate mapping to custom types I have a Oracle database and one of the fields is a date range field. It is basically just stored in the database as a VARCHAR(40) in the format YYYY/MM/DD-YYYY/MM/DD. I want to map it in nHibernate to a custom class I have created like this public class DateTimeRange { public ...
{ "language": "en", "url": "https://stackoverflow.com/questions/242022", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: How can an Eclipse plugin access the project directory? Is there a way to get the directory of a project in Eclipse? We are writing a plugin that will allow the user to select files, and then run some processes on those files. I would ideally like to be able to get all the files with a certain extension, but that ...
{ "language": "en", "url": "https://stackoverflow.com/questions/242032", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: OpenGl with Python I am currently in a course that is using OpenGL and I have been using C for all the programs so far. I have Python installed on Fedora as well as OpenGL, however the minute I call an OpenGL command in my Python code, I get a segmentation fault. I have no idea why this is. Just to avoid the "just u...
{ "language": "en", "url": "https://stackoverflow.com/questions/242059", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: Python + Leopard + Fink + Mac Ports + Python.org + Idiot = broken Python - fresh start? I have been enjoying learning the basics of python, but before I started reading things I tried to install various python versions and modules clumsily. Now that I have some ideas of what I want to do and how to do it I'm finding...
{ "language": "en", "url": "https://stackoverflow.com/questions/242065", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How can I validate large numbers of files with search and replace? I am currently validating a client's HTML Source and I am getting a lot of validation errors for images and input files which do not have the Omittag. I would do it manually but this client literally has thousands of files, with a lot of instances wh...
{ "language": "en", "url": "https://stackoverflow.com/questions/242066", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Modify XML document inside the browser Is it possible to modify/write data to an XML file without any server-side proxy(e.g. a php or asp script)? Can this be done via javascript? XSLT? A: You can load and modify xml in browser, but writing the file back is a different thing. I don't know of any feasible way of w...
{ "language": "en", "url": "https://stackoverflow.com/questions/242069", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: MySQL -- mark all but 1 matching row This is similar to this question, but it seems like some of the answers there aren't quite compatible with MySQL (or I'm not doing it right), and I'm having a heck of a time figuring out the changes I need. Apparently my SQL is rustier than I thought it was. I'm also looking to c...
{ "language": "en", "url": "https://stackoverflow.com/questions/242073", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Why don't Searchgasm page links work? I'm using the Searchgasm plugin for my searching and pagination. Everything seems to work great but the page links don't seem to work at all. Has anyone had this problem with Searchgasm before? Controller Code: class ArtistsController < ApplicationController # GET /artists ...
{ "language": "en", "url": "https://stackoverflow.com/questions/242076", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Is there an expandable list of object references in Java? In Java, we can always use an array to store object reference. Then we have an ArrayList or HashTable which is automatically expandable to store objects. But does anyone know a native way to have an auto-expandable array of object references? Edit: What I mea...
{ "language": "en", "url": "https://stackoverflow.com/questions/242079", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Get MultiView like behavior with ASP.NET MVC I am trying to build a generic form submission system using ASP.NET MVC. I'd like to make it as easy as possible to create forms with a form view and a "success" view. Using the WebForms method, this was easy and could be accomplished with templates or multiviews. With MV...
{ "language": "en", "url": "https://stackoverflow.com/questions/242080", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Why does Ruby seem to have fewer projects than other programming languages? I've found Ruby to be very attractive; I like the fact that everything is an object and its syntax is very appealing. I was hoping that it would gain a lot of popularity this year, but I don't see lot of activity in Ruby. For instance if w...
{ "language": "en", "url": "https://stackoverflow.com/questions/242094", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Factory based on Typeof or is a What's a more elegant way of having the code below where i want to return a derived class based on the type of another class. if (option_ is Rectangle) { modelInputs = new Foo(); } else if (option_ is Circle) ...
{ "language": "en", "url": "https://stackoverflow.com/questions/242097", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Is it safe to read regular expressions from a file? Assuming a Perl script that allows users to specify several text filter expressions in a config file, is there a safe way to let them enter regular expressions as well, without the possibility of unintended side effects or code execution? Without actually parsing t...
{ "language": "en", "url": "https://stackoverflow.com/questions/242118", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Does WCF support any kind of resume functionality? I am using WCF to upload data to a server. If the communication fails, is there any way to resume the upload? A: Chunking channel fits your scenario especially when sending large messages. http://msdn.microsoft.com/en-us/library/aa717050.aspx A: Yes, the wsHttpBin...
{ "language": "en", "url": "https://stackoverflow.com/questions/242143", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How do I tell my application to close? I have just discovered the nifty unhandled exception handler for cocoa-touch. Now that I can gracefully notify the user about any unhandled exceptions that might crash my application, I'd like to shut down my application after notifying the user that a crash has occured. Does a...
{ "language": "en", "url": "https://stackoverflow.com/questions/242147", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How is Silverlight going to change the internet in the next few years? How is Silverlight going to change the internet in the next 10 years? Is this going to be a scene changer or just another blip? A: People often underestimate Microsoft. I don't know if it's going to change the Internet, but Silverlight will prob...
{ "language": "en", "url": "https://stackoverflow.com/questions/242153", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How is profiling different from logging? How is profiling different from logging? Is it just that profiling is used for performance measurements to see how long each function takes? Or am I off? Typically, how are profiling libraries used? What types of stats are obtained by profiling? A: Profiling is about determ...
{ "language": "en", "url": "https://stackoverflow.com/questions/242160", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Is this C++ implementation for an Atomic float safe? Edit: The code here still has some bugs in it, and it could do better in the performance department, but instead of trying to fix this, for the record I took the problem over to the Intel discussion groups and got lots of great feedback, and if all goes well a po...
{ "language": "en", "url": "https://stackoverflow.com/questions/242172", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: What is aspect-oriented programming? I understand object oriented programming, and have been writing OO programs for a long time. People seem to talk about aspect-oriented programming, but I've never really learned what it is or how to use it. What is the basic paradigm? This question is related, but doesn't quite...
{ "language": "en", "url": "https://stackoverflow.com/questions/242177", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "266" }
Q: Inserting checkbox values into database I have a form with several checkboxes which values are pulled from a database. I managed to display them in the form, assign an appropriate value to each, but cannot insert their values into other database. Here's the code: <form id="form1" name="form1" method="post" action=""...
{ "language": "en", "url": "https://stackoverflow.com/questions/242181", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How can I pop-up a print dialog box using Javascript? I have a page with a "Print" link that takes the user to a printer-friendly page. The client wants a print dialog box to appear automatically when the user arrives at the print-friendly page. How can I do this with javascript? A: I do this to make sure they re...
{ "language": "en", "url": "https://stackoverflow.com/questions/242182", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "192" }
Q: Drag drop block edit in place html I required to write a small web application that allow customer to select predefined layout template in html and be able to modify it. The application need to allow customer to add block text to pre defined area and images. The block texts need to be able to reorder based on custom...
{ "language": "en", "url": "https://stackoverflow.com/questions/242187", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What is the use of Cursor Auto Fetch in SQL Server? What is the use of Cursor Auto Fetch in SQL Server? thanks A: It's not something you run across often. I believe it's an ADO option that tells SQL Server to start getting results as soon as you open a cursor. The docs aren't much help, though!
{ "language": "en", "url": "https://stackoverflow.com/questions/242223", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What are the benefits of Java? I always hear that programmers try to pick the right tool for the job. I've never programmed in Java, so I was wondering What are its benefits? Why is it so popular? What should I use it for? I just program recreationally. Is there anything about it that makes it particularly fun??...
{ "language": "en", "url": "https://stackoverflow.com/questions/242225", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: is using class names like 'right' considered bad practice? If I have class names such as "left", "right", "clear" and xhtml like <a href="index.php" class="right continueLink">Continue</a> With CSS like .right { float: right; } I know it's not a semantic name, but it does make things much easier sometimes. Anyway,...
{ "language": "en", "url": "https://stackoverflow.com/questions/242255", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Performing an update with LINQ I am digging into LINQ--trying to understand basic models (it seems pretty cool to me). The code below is the code to perform before committing an update. Linq01.Account acc = context.Accounts.Single( pc => pc.AccountID == AccountID ); acc.Name = textboxAccountNameRead.Text.Tr...
{ "language": "en", "url": "https://stackoverflow.com/questions/242264", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to embed an unobtrusive flash? I have an embedded flash that is transparent so it looks like part of the background. I achieved that by setting wmode to transparent. My problem is that the area underneath the flash becomes inaccessible, even though the flash is transparent. Therefore I cannot click on any links ...
{ "language": "en", "url": "https://stackoverflow.com/questions/242276", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Any page navigation helpers for ASP.NET MVC? Are there any html helpers for page navigation. eg. if i have 1000 records to display, i want to display the Previous 1 2 3 4 ... etc Next link stuff under the filtered collection. Anyone know of anything out there? A: If you are creating a table of data from JSON data,...
{ "language": "en", "url": "https://stackoverflow.com/questions/242282", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: What's the best thing you've done with vim that helped your programming? While surfing, I came to know that somebody has done Tower of Hanoi using vim. WOW!!! Can you people share what all cool things you have been doing in vim. Edit: Not sure about the Tower of Hanoi solution using vim being all that useful. But I ...
{ "language": "en", "url": "https://stackoverflow.com/questions/242284", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: What do you wish you knew before you spent hours trying to fix a bug in IE6 Mine would have to be the float and margin bugs... If you float an element, and then specify a margin for it, it will double the margin. The solution to this is to add display: inline to the element. This will stop the double margin, and all...
{ "language": "en", "url": "https://stackoverflow.com/questions/242286", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: How does one add a svn repository build number to Python code? EDIT: This question duplicates How to access the current Subversion build number? (Thanks for the heads up, Charles!) Hi there, This question is similar to Getting the subversion repository number into code The differences being: * *I would like to ...
{ "language": "en", "url": "https://stackoverflow.com/questions/242295", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Where should I download CorFlags.exe from? I'm running Windows Server 2008 64-bit "workstation" and would like to get corflags.exe. Which SDK do I need to download? I know about .NET Framework 2.0 Software Development Kit (SDK) (x64) and Windows SDK for Windows Server 2008 and .NET Framework 3.5 but I was hoping to...
{ "language": "en", "url": "https://stackoverflow.com/questions/242304", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "22" }
Q: root element missing error This is the XML I am creating in JavaScript: <root> <GradeValueSet> <GradeValueSetMaster SetId="0" SetName="wrwr" SetComments="werwrwr" mode="add"/> <DetailInfo> <ChildInfo Name="This sfsf" Weightage="24"/> <ChildInfo Name="45654" Weightage="67"/> </DetailInfo> </GradeValueSet> </ro...
{ "language": "en", "url": "https://stackoverflow.com/questions/242307", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Getting the value of a specific element from a different row in gnuplot Using gnuplot 4.2, is it possible to obtain the value of a specific column/row and use that value somehow? For example, let's say my datafile contains the following #1 2 7 13 5 11 23 17 53 12 For a simple plot where column 1 is the x axis an...
{ "language": "en", "url": "https://stackoverflow.com/questions/242314", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How to keep a Php stream_socket alive? I have a Php application using stream_socket_client(), to get data through tcp from a back-end server, but would like to keep the connections alive or even better in a pool or something to avoid the connect/disconnect over head. But I'm not a Php guru, so I have no idea how to ...
{ "language": "en", "url": "https://stackoverflow.com/questions/242316", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How do I speed up visual studio with a large number of projects? Visual Studio 2005 is very slow with a solution with 21 projects. Any ideas how to speed it up? A: There are a whole bunch of suggestions in this question: Very slow compile times on Visual Studio. A combination of a few of these will definitely hel...
{ "language": "en", "url": "https://stackoverflow.com/questions/242318", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: Multi Column Listbox Is there a way to bind a Generic List to a multicolumn listbox, yes listbox...I know but this is what I am stuck with and can't add a grid or listview. Thanks A: You could bind a list to a listbox like this: List<int> list = new List<int> { 1, 2, 4, 8, 16 }; listBox1.DataSource = list; As for ...
{ "language": "en", "url": "https://stackoverflow.com/questions/242320", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: In a Dynamic Data custom page how do I retrieve the just updated object? I am using ASP.NET Dynamic Data and have a custom page. In this page I have a handle on the DetailsView inserted event where I would like to do something based on the value of the recently updated object. However, I can't put the event handlin...
{ "language": "en", "url": "https://stackoverflow.com/questions/242329", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: License Permitting Customer Modification I've written some software for a customer, and I'd like to release it to them under a license that permits them to make modifications for their own in-house use, but still prohibits them from selling or otherwise redistributing the software after I've given it to them. Can so...
{ "language": "en", "url": "https://stackoverflow.com/questions/242333", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Team City versus CruiseControl.net- which one is better? Are there real tangible differences or is it just a matter of taste? A: There's a comparison of TeamCity to CruiseControl and CruiseControl.NET on the TeamCity website at http://www.jetbrains.com/teamcity/documentation/featureMatrix.html. It's obviously goin...
{ "language": "en", "url": "https://stackoverflow.com/questions/242339", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: C# code to convert XHTML doc to plain text I'm writing a utility to export evernote notes into Outlook on a schedule. The Outlook API's need plain text, and Evernote outputs a XHTML doc version of the plain text note. What I need is to strip out all the Tags and unescape the source XHTML doc embedded in the Evernote...
{ "language": "en", "url": "https://stackoverflow.com/questions/242341", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Forward URL and still return 200 not 302 in ASPX I want this page to return 200 whilst still sending the redirect... <script> sub page_load 'Get the parameters dim content As String content = request.querystring("text") response.redirect ("http://100.200.100.10/test1/Default.as...
{ "language": "en", "url": "https://stackoverflow.com/questions/242344", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to automatically extend the tab control as items are added to it without creating a scroll bar? I am using a WPF user control (tab control) to add tab items dynamically in the simplified code below: .... foreach (string id in ids) { TabControl.Items.Add(CreateTabItem(id)); } private TabItem CreateTabItem(st...
{ "language": "en", "url": "https://stackoverflow.com/questions/242356", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How can I create a drop shadow like floating effect around a canvas component in flex? I want create a drop shadow around the canvas component in flex. Technically speaking it will not be a shadow, as I want it to wrap around the component giving the component a floating look. I may be able to do it with glow, but c...
{ "language": "en", "url": "https://stackoverflow.com/questions/242363", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How could I store Image retrieved from web, into application bundle? I am developing iPhone application and In that application I've one TableViewController, and that TableViewController made up of Custom table cell. into those cell I am loading image from URL, but the scrolling is not that smooth, (because each cel...
{ "language": "en", "url": "https://stackoverflow.com/questions/242367", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: SVN commit error after deleting files locally I have a project that I am building with Netbeans 6.1 and I am using SVN. I deleted some files on the local machine then attempted to commit my changes to th SVN repository. The commit fails with the error message Entry for 'C:\path\to\project\myfile' has no URL Where ...
{ "language": "en", "url": "https://stackoverflow.com/questions/242376", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "58" }
Q: Is it possible to partially autowire a spring bean? I want to autowire a bean partially - that is, I want some args to be autowired but other to be explicitly set. For example: public MyClient(Service svc, boolean b) In the case of this constructor, I would like to specify in my xml the value for b, but have svc aut...
{ "language": "en", "url": "https://stackoverflow.com/questions/242383", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Does COM interop respect .NET AppDomain boundaries for assembly loading? Here's the core problem: I have a .NET application that is using COM interop in a separate AppDomain. The COM stuff seems to be loading assemblies back into the default domain, rather than the AppDomain from which the COM stuff is being called....
{ "language": "en", "url": "https://stackoverflow.com/questions/242391", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Get the type of the generic parameter I have the following classes public interface InterfaceBase { } public class ImplementA:InterfaceBase { } public class ImplementB:InterfaceBase { } public void TestImplementType<T>(T obj) where T: InterfaceBase { } How to infer what the T is whether ImplementA or ImplementB?...
{ "language": "en", "url": "https://stackoverflow.com/questions/242393", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: I need a standard package to move key,value pairs over a net connection: any tips? As I hate reinventing the wheel, I wonder if there are any commonly used packaged out there for doing hte simple job of communicating (key,value) pairs of data betweeen two network endpoints (probably TCP/IP is the most likely carrier...
{ "language": "en", "url": "https://stackoverflow.com/questions/242399", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Sort Four Points in Clockwise Order Four 2D points in an array. I need to sort them in clockwise order. I think it can be done with just one swap operation but I have not been able to put this down formally. Edit: The four points are a convex polygon in my case. Edit: The four points are the vertices of a convex pol...
{ "language": "en", "url": "https://stackoverflow.com/questions/242404", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "29" }
Q: Send emails via gmail from different accounts So I have action_mailer_optional_tls (http://svn.douglasfshearer.com/rails/plugins/action_mailer_optional_tls) and this in my enviroment.rb ActionMailer::Base.server_settings = { :tls => true, :address => "smtp.gmail.com", :port => "587", :domain => "www.somedoma...
{ "language": "en", "url": "https://stackoverflow.com/questions/242406", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Problem playing FLV on Apache Tomcat 5.5 I have a problem of playing FLV file which id embed in my swf when i place it on server, swf plays correctly but not FLV any solution will be highly appreciated. thanks for all replys, its works in All browesers other than IE 6 now , i will paste the code here for the flv ...
{ "language": "en", "url": "https://stackoverflow.com/questions/242415", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Looping through 2 lists at once I have two lists that are of the same length, is it possible to loop through these two lists at once? I am looking for the correct syntax to do the below foreach itemA, itemB in ListA, ListB { Console.WriteLine(itemA.ToString()+","+itemB.ToString()); } do you think this is possible...
{ "language": "en", "url": "https://stackoverflow.com/questions/242417", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "24" }
Q: Why can't I read from .BAK files on my Desktop using SQL Express in Windows Authentication Mode I am trying to execute this SQL query prior to restoring a .BAK file in SQL Express. Initially, I had the file on the Desktop of my user account. I am logged in as Administrator. When I try to access the .BAK file on the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/242421", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to "rotate" a layer/view (e.g. just like you would in enigmo) I know how to move a layer based on touch. But I would also like to be able to rotate the image. Is there any sample code that shows how to do this? Or can anyone give me some advice? Thanks! A: The simplest way to do this is using the layer's trans...
{ "language": "en", "url": "https://stackoverflow.com/questions/242424", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Are Active Directory forest trusts transitive? I'm working on trouble shooting an application under development that uses information from Active Directory in a multi-forest environment and I have the current problem down to figuring out if forest trusts are transitive, and if so under what conditions. The setup: Us...
{ "language": "en", "url": "https://stackoverflow.com/questions/242426", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Is it better to reuse a StringBuilder in a loop? I've a performance related question regarding use of StringBuilder. In a very long loop I'm manipulating a StringBuilder and passing it to another method like this: for (loop condition) { StringBuilder sb = new StringBuilder(); sb.append("some string"); . ...
{ "language": "en", "url": "https://stackoverflow.com/questions/242438", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "109" }
Q: Slim application server for demonstrating a web app? I have a little pet web app project I'd like to show someone who doesn't have an application server themselves (and who has no clue about application servers). What is the easiest and quickest way for them to get my WAR file running with zero configuration, prefer...
{ "language": "en", "url": "https://stackoverflow.com/questions/242444", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Decimal comaprison in Java script I am trying to compare two decimal values in Java script. I have two objects as one assogned value "3" and the other as "3.00". When i say if (obj1 == obj2) it does not pass the condition as it is does the string comparision. I would instead want it to do a decimal comparision whe...
{ "language": "en", "url": "https://stackoverflow.com/questions/242453", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: I need help creating a modding system in a Facebook Application I'm trying to create a basic system that will allow only specific users to see and use modding links like "Delete" and "Edit". I can't seem to find anything about role management in Facebook applications, and using my own external SQL table or XML file ...
{ "language": "en", "url": "https://stackoverflow.com/questions/242463", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Where does ConfigurationManager ConnectionStrings get its value? In my ASP.NET application I have a web.config file. In the web.config file I have a connection string... <connectionStrings> <add name="HRDb" connectionString="xxxxx" providerName="System.Data.SqlClient" /> </connectionStrings> Yet, when I retriev...
{ "language": "en", "url": "https://stackoverflow.com/questions/242468", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Opening a file relative to server folder When I try opening a file it tries to use "C:\Program Files\Common Files\Microsoft Shared\DevServer\9.0" as the base directory. How can I get the working directory of the web application? A: string path = Server.MapPath("~");
{ "language": "en", "url": "https://stackoverflow.com/questions/242478", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Starting python debugger automatically on error This is a question I have wondered about for quite some time, yet I have never found a suitable solution. If I run a script and I come across, let's say an IndexError, python prints the line, location and quick description of the error and exits. Is it possible to auto...
{ "language": "en", "url": "https://stackoverflow.com/questions/242485", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "279" }
Q: Access:How can I generate a report of a recordset? How can I generate a report in access with the data from a recordset (instead of a query or table). I have updates to the recordset that also must be shown in the report. A: From Access Web you can use the "name" property of a recordset. You resulting code would lo...
{ "language": "en", "url": "https://stackoverflow.com/questions/242504", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Extremely Weird Bug with a property in C# I have a certain application which feeds information into an object, after comparing the new information to the old information. It goes something like set { oldval=_value; _value=value; if (some comparison logic) raiseEvent(); } This all happens on a ba...
{ "language": "en", "url": "https://stackoverflow.com/questions/242517", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Your experiences with Visual Studio 2010 CTP? I just saw the anouncement for the Visual Studio CTP today, and am currently waiting for all those files to download... Have you already tried the CTP, or maybe a previous version? What are your thoughts? There is another question What features would you most like to see...
{ "language": "en", "url": "https://stackoverflow.com/questions/242529", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: C# naming convention for constants? private const int THE_ANSWER = 42; or private const int theAnswer = 42; Personally I think with modern IDEs we should go with camelCase as ALL_CAPS looks strange. What do you think? A: The ALL_CAPS is taken from the C and C++ way of working I believe. This article here explains...
{ "language": "en", "url": "https://stackoverflow.com/questions/242534", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "526" }
Q: Unix shell script find out which directory the script file resides? Basically I need to run the script with paths related to the shell script file location, how can I change the current directory to the same directory as where the script file resides? A: INTRODUCTION This answer corrects the very broken but shockin...
{ "language": "en", "url": "https://stackoverflow.com/questions/242538", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "660" }
Q: Can I use two Kerberos Keytabs from a single host? My application enables defining several LDAP servers to work with. One might want to define Kerberos access to more than one LDAP server. Can it be done? Can a single host juggle between Active Directory servers with Kerberos as the connection method? A: Yes. You j...
{ "language": "en", "url": "https://stackoverflow.com/questions/242546", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What does "beta" mean for an evolving web application? I used to understand "beta" as "feature-complete". Web applications rarely are ever feature-complete and rather evolve slowly with time. So does "beta" have any specific meaning with them or is it just a gimmick? A: It's a pre-emptive disclaimer. "Go ahead, use...
{ "language": "en", "url": "https://stackoverflow.com/questions/242547", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Pass values between Views I have MainViewController calling WebViewController (From UICatalog sample application) In WebViewController I make some function setValue(){...} to set some value passed as parameter to the variable (NSString *value) from WebViewController.h but when I try from MainViewController something...
{ "language": "en", "url": "https://stackoverflow.com/questions/242565", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Is it possible to switch application configuration file at runtime for .NET application? By default, .NET application's configuration file is named after "exe file name".config. I'm wondering whether it is possible to have one application's configuration specified dynamically. For example, the built application is "...
{ "language": "en", "url": "https://stackoverflow.com/questions/242568", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Copying content from a hidden or clipped window in XP? I need to copy the content of a window (BitBlt) which is hidden, to another window. The problem is that once I hide the source window, the device context I got isn't painted anymore. A: What you need is the PrintWindow function that's available in Win32 API sin...
{ "language": "en", "url": "https://stackoverflow.com/questions/242570", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: .NET Interop: Using an assembly in the current directory I'm trying to use a .NET assembly from VB6 via interop without placing it in the GAC and without using the /codebase argument for regasm.exe. From what I understand, when I run regasm.exe on a .NET class library, it creates a registry entry for each class in t...
{ "language": "en", "url": "https://stackoverflow.com/questions/242572", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: c# - Is data "lost" when using binary data in a string? I've tried reading a JPG file using the StreamReader class' ReadToEnd() method which returns a string. For some reason though, when I write this string out to a file, it doesn't open. Is something lost when reading data into a string? A: String is designed for...
{ "language": "en", "url": "https://stackoverflow.com/questions/242577", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Limit for URL length for "rundll32 url.dll,FileProtocolHandler"? I have a long URL with tons of parameters that I want to open in the default browser from Java on a Windows system using Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler "+url) For short URLs like "http://www.google.com" this works fine...
{ "language": "en", "url": "https://stackoverflow.com/questions/242579", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Algorithm: Voyage planning I need to plan a voyage connecting n locations in the sea with a specified origin and specified destination with following constraints. The voyage has to touch all locations. If there is a reservation from A to B then a has to be touched before B The time spend at each location varies (de...
{ "language": "en", "url": "https://stackoverflow.com/questions/242580", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Exception handling architecture Does anybody have best practices for exception handling ? When searching the web I find a lot of best practices on a code level (don't catch general exceptions, don't rethrow new exceptions etc.) What I am looking for is best practises on a higher level, stuff like : * *within an a...
{ "language": "en", "url": "https://stackoverflow.com/questions/242587", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: How do Draw Rubber band rectangle in DirectX? How can I draw a 2D rubber band rectangle in DirectX? Preferable using C#. A: The classic way to do rubberbanding is to: * *Draw the regular scene, i.e. the "background" *Switch to "XOR mode", where your pen will XOR the pixels already in the framebuffer. It is impo...
{ "language": "en", "url": "https://stackoverflow.com/questions/242588", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Display Ajax Loader while page rendering This is probably a simple question but how can I best use an AJAX loader in ASP.NET to provide a loading dialog whilst the page is being built? I currently have an UpdatePanel with an associated UpdateProgressPanel which contains the loading message and gif in a ProgressTempl...
{ "language": "en", "url": "https://stackoverflow.com/questions/242600", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do I make a POST request with open-uri? Is it possible to make a POST request from Ruby with open-uri? A: Unfortunately open-uri only supports the GET verb. You can either drop down a level and use net/http, or use rest-open-uri, which was designed to support POST and other verbs. You can do gem install rest-op...
{ "language": "en", "url": "https://stackoverflow.com/questions/242602", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "31" }
Q: Disable browsers vertical and horizontal scrollbars Is it possible to disable the browsers vertical and horizontal scrollbars using jQuery or javascript? A: In case you also need support for Internet Explorer 6, just overflow the html $("html").css("overflow", "hidden"); and $("html").css("overflow", "auto"); A:...
{ "language": "en", "url": "https://stackoverflow.com/questions/242608", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "118" }
Q: Capture Window (Alt-Print Screen) of Context Menu As everyone knows, sometimes developers have to document stuff. Or capture some stuff for filing bug reports. My question is in MS Windows. I'm trying to capture the context menu (the popup menu that appears after right-clicking an item) of several areas of an appli...
{ "language": "en", "url": "https://stackoverflow.com/questions/242609", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "37" }
Q: How can I change the size of scroll box(thumb) of a CScrollBar? I can't find any method to change it. Any help will be appreciated! A: The size of the scroll box is controlled by the range and page size of the scroll bar. You can use the CScrollBar::SetScrollInfo function to control these settings, specifically the...
{ "language": "en", "url": "https://stackoverflow.com/questions/242610", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: an ASP.NET performance bottleneck mystery A classic ASP.NET app - AppSrv + MS SQL DB. Both servers are heavy-lifters 8 cores, 20 GB of RAM. When load testing, the throughput goes somewhere to 400 VirtualUsers (according to LoadRunner) with CPU being approximately 30% utilized an DB server primarily idling - response...
{ "language": "en", "url": "https://stackoverflow.com/questions/242614", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How to increase stack size for a ruby app. Recursive app getting: Stack level too deep (SystemStackError) Posting a stack overflow question on stackoverflow.com, how amusing :-) I'm running some recursive Ruby code and I get the: "Stack level too deep (SystemStackError)" (I'm quite sure the code works, that I'm not ...
{ "language": "en", "url": "https://stackoverflow.com/questions/242617", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "39" }
Q: How do I make a complex query with Perl's Net::LDAP? I'm having trouble running a complex query against our company LDAP server. I'm using the following Perl script: use Data::Dumper; use Net::LDAP; die "Can't connect to LDAP-Server: $@\n" unless $ldap = Net::LDAP->new( 'xLDAPx' ); foreach my $filter ( 'ou=P...
{ "language": "en", "url": "https://stackoverflow.com/questions/242621", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Scheduled data backup from client to server Can anyone point out what technologies would be best suited for an application that backs up data from clients to a server? The client should choose folders to backup and schedule backups to a server I would also be interested in how would you start developing/designing,...
{ "language": "en", "url": "https://stackoverflow.com/questions/242622", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }