text
stringlengths
8
267k
meta
dict
Q: How can I get an Input Stream from HSSFWorkbook Object I want my web application users to download some data as an Excel file. I have the next function to send an Input Stream in the response object. public static void sendFile(InputStream is, HttpServletResponse response) throws IOException { BufferedInp...
{ "language": "en", "url": "https://stackoverflow.com/questions/378883", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: How do I calculate a String's width in Ruby? String.length will only tell me how many characters are in the String. (In fact, before Ruby 1.9, it will only tell me how many bytes, which is even less useful.) I'd really like to be able to find out how many 'en' wide a String is. For example: 'foo'.width # => 3 'mo...
{ "language": "en", "url": "https://stackoverflow.com/questions/378887", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Operation could destabilize the runtime? I'm having a little bit of trouble understanding what the problem is here. I have a bit of code that pulls records from a database using LINQ and puts them into an object which is cast into an interface. It looks a bit like this: public IEnumerable<ISomeObject> query() { ...
{ "language": "en", "url": "https://stackoverflow.com/questions/378895", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "41" }
Q: How to invoke groovy with 'java' from command line I have to ship some groovy code to some users that have only java installed (no grooy, no $groovy_home, etc). I'm trying to invoke groovy from the commandline but I'm having no luck. Here's my bat file: java -classpath .;lib;bin;bin-groovy introspector.AclCollector ...
{ "language": "en", "url": "https://stackoverflow.com/questions/378905", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: How do I save a NamedTemporaryFile into a model FileField in Django? I created a NamedTemporaryFile, added some content in it and now I want to save it into a model FileField. The problem is that I get a SuspiciousOperation because the tmp directory is not within the FileSystemStorage directory. What's the proper w...
{ "language": "en", "url": "https://stackoverflow.com/questions/378909", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: What is the best (idiomatic) way to check the type of a Python variable? I need to know if a variable in Python is a string or a dict. Is there anything wrong with the following code? if type(x) == type(str()): do_something_with_a_string(x) elif type(x) == type(dict()): do_somethting_with_a_dict(x) else: ...
{ "language": "en", "url": "https://stackoverflow.com/questions/378927", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "347" }
Q: Trying to figure out how to set off an event when the enter key is pressed in a TextBox The code I'm playing with is: open System open System.Windows.Forms open System.Drawing let tehform = new Form(Text = "STOP!", Width = 200, Height = 200) let awe = new TextBox(Left = 1, Top = 30, Width = 100) let stuff _ _ = Mes...
{ "language": "en", "url": "https://stackoverflow.com/questions/378930", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What does it mean by logical grouping of modules in assembly? What does it mean by logical grouping of modules in assembly? Can anyone please explain how .NET's CLR works with assembly ? A: You can organise modules using Namespaces. With Namespaces you can make one for each logical grouping of modules within your ...
{ "language": "en", "url": "https://stackoverflow.com/questions/378935", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Will Server.Transfer work across AppDomains/Web Applications? If you have two applications residing on the same server, can you use Server.Transfer to load a page in a different AppDomain/Application? My guess is no, because Server.Transfer() copies HttpContext.Items, among other things. To copy this data between Ap...
{ "language": "en", "url": "https://stackoverflow.com/questions/378940", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What does (interactive) mean in an Emacs Lisp function? Emacs Lisp function often start like this: (lambda () (interactive) ... What does "(interactive)" do? A: (interactive) is for functions meant to interact with the user, be it through M-x or through keybindings. M-x describe-function RET interactive RET for de...
{ "language": "en", "url": "https://stackoverflow.com/questions/378942", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "32" }
Q: How to get rid of GVim folding comments in your code? There is someone in my team that swears by using some kind of GVim feature to do manually code folding. As I'm using another editor and do not really need the folding feature, I think it only pollutes the source code with tags like: /* {{{1 */ Convincing the per...
{ "language": "en", "url": "https://stackoverflow.com/questions/378958", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How can I perform static code analysis in PHP? Is there a static analysis tool for PHP source files? The binary itself can check for syntax errors, but I'm looking for something that does more, like: * *unused variable assignments *arrays that are assigned into without being initialized first *and possibly code ...
{ "language": "en", "url": "https://stackoverflow.com/questions/378959", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "483" }
Q: Turn these haskell Int lists into a different one I have the following Int lists: t1 = [1000, 1001, 1002, 1003, 1004] t2 = [2000, 2001, 2002] t3 = [3000, 3001, 3002, 3003] The lists size are variable, they are not just 3 like in this example. They can have 1 element or many more. Then I have this: tAll = [t1, t2, t...
{ "language": "en", "url": "https://stackoverflow.com/questions/378969", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How do I make an Emacs keybinding to set a variable? I've got a variable in Emacs called my-var that I'd like to set whenever I press C-v. How do I do that? I tried this: (defun set-my-var (value) "set my var" (interactive) (defvar my-var value "a variable of mine") ) (global-set-key "\C-v" 'set-my-var) ...
{ "language": "en", "url": "https://stackoverflow.com/questions/378972", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Is it possible to use a converter within a style? Is it possible to use a converter within a style? For instance I am trying to create a styled TextBlock whose text resizes based on the ActualHeight property of the TextBlock. The resizing would be done via a converter. A: Yes, this is possible. For example: <Style ...
{ "language": "en", "url": "https://stackoverflow.com/questions/378979", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: Is there an #IF DEBUG for Asp.net markup? Can I do something like this in the markup of an asp.net page, based off the "Define DEBUG constant" setting? #IF (DEBUG) THEN <asp:TextBox ID="TextBox1" runat="server">You're in debug mode</asp:TextBox> #END IF A: <form runat="server"> <% #if DEBUG %> <asp:TextBox ID=...
{ "language": "en", "url": "https://stackoverflow.com/questions/378982", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "34" }
Q: IP address parsing in .NET I'm using IPAddress.TryParse() to parse IP addresses. However, it's a little too permissive (parsing "1" returns 0.0.0.1). I'd like to limit the input to dotted octet notation. What's the best way to do this? (Note: I'm using .NET 2.0) Edit Let me clarify: I'm writing an app that will sca...
{ "language": "en", "url": "https://stackoverflow.com/questions/378983", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Can't set Visible attribute in ASP.NET Panels I am having trouble with visible attribute of an ASP.NET Panel control. I have a page that calls a database table and returns the results in a datagrid. Requirements If some of the returned values are null I need to hide the image that's next to it. I am using a Panel to...
{ "language": "en", "url": "https://stackoverflow.com/questions/378985", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: ActiveMQ throws OOME when creating a large number of topics I'm using ActiveMQ 5.2 and my application requires a large number of topics, somewhere in the neighbourhood of 500,000. When I run my application, after creating only about 1000 topics, ActiveMQ throws an OutOfMemoryException. Is it unreasonable to expect ...
{ "language": "en", "url": "https://stackoverflow.com/questions/378995", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Known issue?: SQL Server 2005 stored procedure fails to complete with a parameter Your basic SP with a default parameter: ALTER PROCEDURE [usp_debug_fails] @DATA_DT_ID AS int = 20081130 WITH RECOMPILE AS BEGIN /* Usage: EXEC [usp_debug_fails] WITH RECOMPILE */ -- Stuff here that depen...
{ "language": "en", "url": "https://stackoverflow.com/questions/379007", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: UDP broadcast packets across subnets Is it possible to send a UDP broadcast packet to a different subnet through a router? I'm writing an app to discover certain devices on the network, and the PC might be on a different subnet than the devices it's looking for. A: Short answer: No. Long answer: Maybe. DHCP works t...
{ "language": "en", "url": "https://stackoverflow.com/questions/379015", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "23" }
Q: Does the JSF convertNumber with currency format round or truncate additional decimal places? Here is an example: <h:outputText value="#{myBean.myMoney}"> <f:convertNumber type="currency" currencySymbol="$" /> </h:outputText> Given that I have $1.006, will this output $1.00 or $1.01? Doesn't say here:...
{ "language": "en", "url": "https://stackoverflow.com/questions/379027", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: What is the best practice for using public fields? When I write a class I always expose private fields through a public property like this: private int _MyField; public int MyField { get{return _MyField; } When is it ok to just expose a public field like this: public int MyField; I am creating a structure called R...
{ "language": "en", "url": "https://stackoverflow.com/questions/379041", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "24" }
Q: What books have helped you get a grasp of n-Tier development What books have helped you get a grasp of n-Tier development (Presentation Layer, UI Business Objects, Data Business Objects, and Data sets)? I'd prefer books, but blogs and other sites are welcome suggestions too. I've inherited a n-Tier designed appli...
{ "language": "en", "url": "https://stackoverflow.com/questions/379042", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Diamond inheritance (C++) I know that having diamond inheritance is considered bad practice. However, I have 2 cases in which I feel that diamond inheritance could fit very nicely. I want to ask, would you recommend me to use diamond inheritance in these cases, or is there another design that could be better. Case 1...
{ "language": "en", "url": "https://stackoverflow.com/questions/379053", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "20" }
Q: Best way to understand complex SQL statements? Does anyone have a method to understand complex SQL statements? When reading structural / OO code there are usually layers of abstraction that help you break it down into manageable chunks. Often in SQL, though, it seems that you have to keep track of what's going on ...
{ "language": "en", "url": "https://stackoverflow.com/questions/379062", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "56" }
Q: How to I get verbose (or debug) output with SOAP::Lite? I've got a working SOAP::Lite client. It works against an established server, but so far my development server is sending back nothing except a 404. (Which is odd, because I'm not even seeing a connection on the server end.) The closest parallel that I'm used t...
{ "language": "en", "url": "https://stackoverflow.com/questions/379068", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Track all remote git branches as local branches Tracking a single remote branch as a local branch is straightforward enough. $ git checkout --track -b ${branch_name} origin/${branch_name} Pushing all local branches up to the remote, creating new remote branches as needed is also easy. $ git push --all origin I wa...
{ "language": "en", "url": "https://stackoverflow.com/questions/379081", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "210" }
Q: Automated testing .NET (Gallio?) I am working on a software development project that uses code written primarily in C and C#. Currently, the responsibility of testing falls mostly on developers as they change the code. I am interested in implementing an automated testing framework to help us improve the quality o...
{ "language": "en", "url": "https://stackoverflow.com/questions/379091", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: C#: Specifying behavior for the "default" keyword when using generics Is it possible to specify my own default object instead of it being null? I would like to define my own default properties on certain objects. For example, if I have an object foo with properties bar and baz, instead of default returing null, I'd...
{ "language": "en", "url": "https://stackoverflow.com/questions/379105", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: how can I make a column unsortable when using the dojo toolkit's grid? I've got a grid (dojox.grid v1.2) that I don't want to be sortable. How can I disable that? A: Found it: http://dojotoolkit.org/forum/dojox-dojox/dojox-grid-support/disable-sorting-specific-column-0 To save linking: In your onload, or postrender...
{ "language": "en", "url": "https://stackoverflow.com/questions/379115", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do you program differently in dynamic languages? How would someone who really knows how to take advantage of dynamic programming languages approach programming differently than someone working in a static language? I'm familiar with the whole debate over static versus dynamic typing, but that's not what I'm ge...
{ "language": "en", "url": "https://stackoverflow.com/questions/379128", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "30" }
Q: Line information/number from Textbox in Silverlight Area : Textbox in Silverlight Question: I need to know what "line number" that is currently edited. I've tried: As a workaround I've tried splitting with textBox.Split("\r") and counting matches on Regex with similar performance. Performance during the first 2000 l...
{ "language": "en", "url": "https://stackoverflow.com/questions/379131", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Key-Value Coding I had a straight forward approach of turning Key/Value pairs of an XML excerpt into an NSDictionary when I started a simple iPhone application. The problem is, I need to turn those NSDictionary's instances that once populated my UITableView's into custom classes because they require behavior and add...
{ "language": "en", "url": "https://stackoverflow.com/questions/379133", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Can I extend lisp with c++? Can I call a function from lisp from a library written in c or c++? How can I extend lisp? This is useful when you want to do some system calls or stuff like that. A: It is unusual to call non-lisp code from lisp, and rarely necessary. CLX (the X11 client implementation for CL) doesn't l...
{ "language": "en", "url": "https://stackoverflow.com/questions/379136", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Creating Web Services in VS 2005 Why is that Web Service files (.asmx) have their code-behind placed in app_code folder by default unlike the regular .aspx files? A: When you work with Web site projects, this is the style Visual Studio uses. It's not the case with Web application projects. A: Generally asmx files ...
{ "language": "en", "url": "https://stackoverflow.com/questions/379138", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Using ActiveRecord/NHibernate, can I Delete and Refresh without a Flush? I have the following Unit Test method: void TestOrderItemDelete() { using (new SessionScope()) { var order = Order.FindById(1234); var originalItemCount = order.OrderItems.Count; Assert.IsTrue(originalCount > 0);...
{ "language": "en", "url": "https://stackoverflow.com/questions/379140", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Specifying rails version to use when creating a new application I have two versions of rails (2.1.0 and 2.2.2) installed in my computer. When I create a new application, is it possible to specify that I want to use the older (2.1.0) version? A: There are two ways to achieve this: one as suggested in accepted answe...
{ "language": "en", "url": "https://stackoverflow.com/questions/379141", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "244" }
Q: Where can I find/learn industry standard SQL Conventions? I work at a company that has some very non-standardized SQL conventions (They were written by Delphi Developers years ago). Where is the best place that I can find SQL industry standard convention definitions that are most commonly used? A: * *there aren't ...
{ "language": "en", "url": "https://stackoverflow.com/questions/379145", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: WCF REST Starter Kit - A property with the name 'UriTemplateMatchResults' already exists I just started with the WCF REST Starter Kit. I created a simple service that return an array of an object. Using the browser, everything works fine but when I use a WCF client, I get an ArgumentException. I'm not using IIS and ...
{ "language": "en", "url": "https://stackoverflow.com/questions/379162", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: ORA-12638: Credential retrieval failed I have a legacy VB6 application which I've inherited. The issue I'm facing is that I'm getting the infamous ORA-12638: Credential retrieval failed error message whenever it tries to connect to one of our Oracle databases. I can connect fine from SQLPlus and Toad, however. I've...
{ "language": "en", "url": "https://stackoverflow.com/questions/379164", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "36" }
Q: To GOTO or not to GOTO? Currently I am working on a project where goto statements are heavely used. The main purpose of goto statements is to have one cleanup section in a routine rather than multiple return statements. Like below: BOOL foo() { BOOL bRetVal = FALSE; int *p = NULL; p = new int; if (p == ...
{ "language": "en", "url": "https://stackoverflow.com/questions/379172", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "65" }
Q: C# Dictionary Memory Management I have a Dictionary<string,int> that has the potential to contain upwards of 10+ million unique keys. I am trying to reduce the amount of memory that this takes, while still maintaining the functionality of the dictionary. I had the idea of storing a hash of the string as a long inste...
{ "language": "en", "url": "https://stackoverflow.com/questions/379175", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Format Double as Fraction Is there a library that will convert a Double to a String with the whole number, followed by a fraction? For example 1.125 = 1 1/8 I am only looking for fractions to a 64th of an inch. A: One problem you might run into is that not all fractional values can be represented by doubles. Eve...
{ "language": "en", "url": "https://stackoverflow.com/questions/379176", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: NHibernate SchemaExport with generated properties I'm wondering if there is a way to get SchemaExport to generate and identity column for a generated property. <id name="Id" column="Id" type="Guid"> <generator class="guid.comb" /> </id> <property name="OrderNumber" column="OrderNumber" type="Int32" generated="ins...
{ "language": "en", "url": "https://stackoverflow.com/questions/379184", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Convert GB2312 to UTF-8 I have a text file that contains localized language strings that is currently encoded in GB2312 (simplified Chinese), but all of my other language files are in UTF-8. I am finding it very difficult to work with this file, as none of my text editors will work properly with it and keep corrupti...
{ "language": "en", "url": "https://stackoverflow.com/questions/379191", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Why is a DataViewManager not sorting? First off, a quick rundown of what the code is doing. I have two tables: Companies and Clients. There is a one to many relationship between Companies and Clients (one company can have many clients). In some processing logic, I have both tables loaded into a DataSet - each are Da...
{ "language": "en", "url": "https://stackoverflow.com/questions/379201", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Get CVS to chgrp on checkin I am working with a cvs repository at a clients site, and I do a checkin via ssh (CVS_RSH=ssh). My default group is "foo", and I am also a member of "bar". The repository should be accessible by members of group "bar". However, whenever I do a checkin, it changes the group of the file I ...
{ "language": "en", "url": "https://stackoverflow.com/questions/379202", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to bring files in a filesystem in/out MySQL DB? The application that I am working on generates files dynamically with use. This makes backup and syncronization between staging,development and production a real big challenge. One way that we might get smooth solution (if feasable) is to have a script that at th...
{ "language": "en", "url": "https://stackoverflow.com/questions/379210", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How is GUI and Game Program Flow compared to Web programs I've been developing Web applications for a while now and have dipped my toe into GUI and Game application development. In the web application (php for me), a request is made to the file, that file includes all the necessary files to process the info into mem...
{ "language": "en", "url": "https://stackoverflow.com/questions/379231", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: String "Sort Template" in C# I'm trying to come up with a clean way of sorting a set of strings based on a "sorting template". I apologize if my wording is confusing, but I can't think of a better way to describe it (maybe someone can come up with a better way to describe it after reading what I'm trying to do?). Co...
{ "language": "en", "url": "https://stackoverflow.com/questions/379234", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Database design: Best table structure for capturing the User/Friend relationship? I'm trying to design a data model that denotes one user being the friend of another user. This is what i've come up with so far, but it seems clunky, is there a better solution? User ===== Id Name etc... UserFriend =========== UserId...
{ "language": "en", "url": "https://stackoverflow.com/questions/379236", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "41" }
Q: C++ and SOAP -> how to start well My project is about to introduce SOAP. It's going to be used for C++ <-> Java and C++ <-> Flex communication. I'm responsible for refactoring our apps to take advantage of Java business rules engine and new Flex gui. What resources are must read for C++ SOAP? I've read W3 materials....
{ "language": "en", "url": "https://stackoverflow.com/questions/379238", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How to use jquery form plugin with asp.net? in asp.net 2.0 (not mvc), the form's action is to itself. how can I use the forms plugin to send information to server? I need to send data from the form (let's say name, email, comment) and to display the result on the client side. Any ideas? Thanks, Dave A: ms ajax? if ...
{ "language": "en", "url": "https://stackoverflow.com/questions/379239", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Is there a Windows command shell that will display Unicode characters? Assuming I have fonts installed which have the appropriate glyphs in them, is there a command shell for Windows XP that will display Unicode characters? At a minimum, two things that should display Unicode correctly: * *Directory listings. I d...
{ "language": "en", "url": "https://stackoverflow.com/questions/379240", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "52" }
Q: Java I/O using inpout32.dll I am trying to control some LEDs wired to the parallel port on Windows XP. The easiest solution would be Inpout32.dll from Logix4u.net. I have found many source code samples in various languages (C++, Visual Basic, C#) but nothing using Java. Do you know any tutorials about calling DLL fu...
{ "language": "en", "url": "https://stackoverflow.com/questions/379256", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What does your checklist for SharePoint database creation best practise look like? I have noted that the default SharePoint databases are created with a "Full" in Recovery Model, 1 Mb autogrowth on Data and a 10% growth on the log file. I know that these settings should be adjusted to the specific customer, but I ha...
{ "language": "en", "url": "https://stackoverflow.com/questions/379261", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Windows service, can't access app.config from within my Installer's constructor I want to store the username/password information of my windows service 'logon as' user in the app.config. So in my Installer, I am trying to grab the username/password from app.config and set the property but I am getting an error when ...
{ "language": "en", "url": "https://stackoverflow.com/questions/379276", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Why the use of both a base class and an interface in polymorphism? In the C# example of polymorphism, there is a Cat class which inherits a class called AnimalBase and an interface called IAnimal. The link in question is: http://en.wikipedia.org/wiki/Polymorphism_in_object-oriented_programming My question is, why is...
{ "language": "en", "url": "https://stackoverflow.com/questions/379282", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What does the []-esque decorator syntax in Python mean? Here's a snippet of code from within TurboGears 1.0.6: [dispatch.generic(MultiorderGenericFunction)] def run_with_transaction(func, *args, **kw): pass I can't figure out how putting a list before a function definition can possibly affect it. In dispatch.ge...
{ "language": "en", "url": "https://stackoverflow.com/questions/379291", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Is Boost guilty of being un-Boost-like? I was just reading the intro to the Boost::Spirit LL Parser framework. The preface suggests that the author and creator likes to use such parsing technology to read in program options. Doesn't Boost have its own library for program options? I am wondering, does the Boost commi...
{ "language": "en", "url": "https://stackoverflow.com/questions/379306", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Can I disable identifier checking in SQL Server 2005? I have an assortment of database objects (tables, functions, views, stored procedures) each scripted into its own file (constraints are in the same file as the table they alter) that I'd like to be able execute in an arbitrary order. Is this possible in SQL Serv...
{ "language": "en", "url": "https://stackoverflow.com/questions/379316", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Permission to delete from a directory I am writing code that checks for the permission to write to and delete from certain directories. The first is fairly easy. To whit: FileIOPermission writePermit = new FileIOPermission(FileIOPermissionAccess.Write, _ArchiveHome); writePermit.Demand(); But, how do I do the same ...
{ "language": "en", "url": "https://stackoverflow.com/questions/379319", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Can JPG's be imported into MapPoint? Can anyone tell me if it is possible to import .jpg files into MS Mappoint Europe 2006 ? If it is possible can this be done by an OCX control ? I would like to import some aerial photography of an area into MapPoint to enhance the coverage of a small area, Thanks for your time Ia...
{ "language": "en", "url": "https://stackoverflow.com/questions/379323", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: C# Named parameters to a string that replace to the parameter values I want in a good performance way (I hope) replace a named parameter in my string to a named parameter from code, example, my string: "Hi {name}, do you like milk?" How could I replace the {name} by code, Regular expressions? To expensive? Which wa...
{ "language": "en", "url": "https://stackoverflow.com/questions/379328", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Any experiences with Websphere Integration Developer (WID)? My company (a large organization) is developing a "road-map" for evolving their rather old, tangled confederation of systems to an SOA model. A few people are pushing hard for using Websphere Integration Developer and Websphere Process Server as the defact...
{ "language": "en", "url": "https://stackoverflow.com/questions/379332", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How to integrate the StringTemplate engine into the CherryPy web server I love the StringTemplate engine, and I love the CherryPy web server, and I know that they can be integrated. Who has done it? How? EDIT: The TurboGears framework takes the CherryPy web server and bundles other related components such as a tem...
{ "language": "en", "url": "https://stackoverflow.com/questions/379338", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to get &nbsp to behave properly using HTML Purifier? I am using HTML Purifier in my PHP project and am having trouble getting it to work properly with user input. I am having users enter in HTML using a WYSIWYG editor (TinyMCE), but whenever a user enters in the HTML entity &nbsp; (non-breaking space) it gets sa...
{ "language": "en", "url": "https://stackoverflow.com/questions/379339", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: PHP to clean-up pasted Microsoft input I have a site where users can post stuff (as in forums, comments, etc) using a customised implementation of TinyMCE. A lot of them like to copy & paste from Word, which means their input often comes with a plethora of associated MS inline formatting. I can't just get rid of <sp...
{ "language": "en", "url": "https://stackoverflow.com/questions/379342", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Are implicit operators and TypeConverters equivalent? It seems to me its very easy to implement an implicit operator versus a TypeConverter, so I'm assuming they aren't equivalent because of the prevalence of TypeConverters in the framework (see anything that extends FrameworkElement). But why? Wouldn't it have bee...
{ "language": "en", "url": "https://stackoverflow.com/questions/379343", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: What are these tags @ivar @param and @type in python docstring? The ampoule project uses some tags in docstring, like the javadoc ones. For example from pool.py line 86: def start(self, ampChild=None): """ Starts the ProcessPool with a given child protocol. @param ampChild: a L{ampoule.child.AMPChild} ...
{ "language": "en", "url": "https://stackoverflow.com/questions/379346", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: How to run the CherryPy web server in the Google App Engine The CherryPy web server can supposedly be deployed in the Google App Engine. Who has done it, and what was the experience like? What special effort was required (configuration, etc.)? Would you recommend it to others? A: The article is a good example but i...
{ "language": "en", "url": "https://stackoverflow.com/questions/379352", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: What is a lightweight cross platform WAV playing library? I'm looking for a lightweight way to make my program (written in C) be able to play audio files on either windows or linux. I am currently using windows native calls, which is essentially just a single call that is passed a filename. I would like something ...
{ "language": "en", "url": "https://stackoverflow.com/questions/379353", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: Java GUI repainting error? This one's a tough one - I have a JFrame that generates JTextFields. When I go from generating 2 JTextFields to 12 JTextfields (for example), I see some error where there is an extra differently-sized JTextField at the end. It seems to be a repaint error. Main.java code: import java.awt.*...
{ "language": "en", "url": "https://stackoverflow.com/questions/379354", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Error Creating Control - Custom Control I have a custom control and it works fine...except that the control cannot be rendered on Design Time. ( I am using VS 2008) I am thinking many people who develop custom controls encounter this problem...The error I get is "Error Creating Control - CustomControlName" Object r...
{ "language": "en", "url": "https://stackoverflow.com/questions/379355", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: VS 2008 JavaScript Intellisense Woes I have a JavaScript class that I have made and put it into its own .js file. When I reference the the file from a web page and create an instance of that class there is no intellisense telling me the methods\variables available, it just show constructor as the only method. But wh...
{ "language": "en", "url": "https://stackoverflow.com/questions/379357", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What makes a good spec? One of the items in the Joel Test is that a project/company should have a specification. I'm wondering what makes a spec good. Some companies will write volumes of useless specification that no one ever reads, others will not write anything down because "no one will read any of it anyway". So...
{ "language": "en", "url": "https://stackoverflow.com/questions/379371", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "38" }
Q: What would you use to build a web app? At my current job I've been working on making web apps with Java, Tapestry, Hibernate, MSSQL, and Tomcat. I've got an idea for a little web game I'd like to write. I'd like to know what the SO community would use for something like this. Should I stick to what I know? I was thi...
{ "language": "en", "url": "https://stackoverflow.com/questions/379375", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Broadcast ARP response - will dropping it cause problems? Are there common machines or OSs that will have problems connecting on a network where unicast ARP requests or broadcast ARP responses are not supported? I am providing a public Wi-Fi service, and considering blocking these types of ARP packet. Will this caus...
{ "language": "en", "url": "https://stackoverflow.com/questions/379377", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Avoiding Inheritance Madness So, I have an API that I need to implement in to an existing framework. This API manages interactions with an external server. I've been charged with coming up with a way to create an easily repeatable "pattern," so that if people are working on new projects in the given framework they...
{ "language": "en", "url": "https://stackoverflow.com/questions/379380", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How do you make a copy of an Object I have a collection of an object called Bookmarks which is made up of a collection of Bookmarks. This collection of bookmarks are bound to a treeview control. I can get the bookmarks back out that I need, but I need a copy of the bookmarks so I can work with it and not change ...
{ "language": "en", "url": "https://stackoverflow.com/questions/379382", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Finding gaps in sequence of numbers I have a std::vector containing a handful of numbers, which are not in any particular order, and may or may not have gaps between the numbers - for example, I may have { 1,2,3, 6 } or { 2,8,4,6 } or { 1, 9, 5, 2 }, etc. I'd like a simple way to look at this vector and say 'give me...
{ "language": "en", "url": "https://stackoverflow.com/questions/379383", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: IDE that provide autocompletion and error detection for Linux bash or shell scripting? Our dev team is looking for an IDE like vi or nano or even textpad for windows that has the capability to autocomplete and error correction for bash or shell script for linux. Basically something similar to .NET autocompletion wh...
{ "language": "en", "url": "https://stackoverflow.com/questions/379385", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Automatic login between separate php web apps. Security issue? We have a tech support website/database at work that we use to record our interactions with customers. Our tech support people are not capable of creating their own accounts. We also use Mantis on the same server as a way to keep track of bugs. Inside t...
{ "language": "en", "url": "https://stackoverflow.com/questions/379387", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Pattern for UI: Same object, displayed differently I have an application for entering in serial numbers to a database. A serial number has a set number of attributes that defines it and the the user must/may provide them to generate. public class Serial { public string Number {get; set;} public string Part ...
{ "language": "en", "url": "https://stackoverflow.com/questions/379412", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Changing font for member variables in Visual Studio I don't think this is possible, but I'll ask anyway... Is there some way to set the color and font to be used for class member variables in the editor? I just returned to C++ and Visual Studio after being in the Java world for the past 4 years and I'm really missin...
{ "language": "en", "url": "https://stackoverflow.com/questions/379428", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: How to post the selections of an HTML List Box with multiple selected values I have a listbox on an HTML form with a Submit button. The listbox has multiple selection enabled. I am able to select multiple values in the listbox, but I don't know how to figure out what values were selected when the form is submitted...
{ "language": "en", "url": "https://stackoverflow.com/questions/379432", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Getting Data From a Composite Control - Visitor Pattern? I've got some rather complex forms, that need to be configured by web designers. I've been building some composite controls that appear to be doing the job. The top level control is simply a container, and the sections of the form are contained within. SubCon...
{ "language": "en", "url": "https://stackoverflow.com/questions/379441", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How much slower is a wxWidget written in Python versus C++? I'm looking into writing a wxWidget that displays a graphical node network, and therefore does a lot of drawing operations. I know that using Python to do it is going to be slower, but I'd rather get it working and port it later when its functional. Ideal...
{ "language": "en", "url": "https://stackoverflow.com/questions/379442", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: SEL_E_SECPKG_NOT_FOUND error from AcquireCredentialsHandle() I get the above error when trying to run the code from Microsoft's Secure SOAP sample http://msdn.microsoft.com/en-us/library/s2ya483s.aspx The call, from M'soft's code, seems to be correct: Status = g_Sample_SecurityInit._SecurityFunc.AcquireCredentialsHa...
{ "language": "en", "url": "https://stackoverflow.com/questions/379445", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Useful Add-Ins or Plug-Ins for native Visual Studio developer There are plenty of different Add-Ins for Visual Studio see Visual Studio Gallery . Please share your experiences and favorites. As motivation, here are some of my favorites: * *Versioning Controlled Build [F/O] - very handy extension for automatic bui...
{ "language": "en", "url": "https://stackoverflow.com/questions/379453", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "76" }
Q: How do I replace the values of a hash in an external file? For my program, I'm attempting to replace the value of a specific hash in an external file with a newly created value. The external file has the value tab-delimited from the key, and I had read the hash in from the external file. I've been looking around onl...
{ "language": "en", "url": "https://stackoverflow.com/questions/379465", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Whats the best way to determine the hardware requirements for an application What methods do you use to determine what kind of hardware you need for a server? I often find it very hard to predict what kind of hardware you will need for a web based application with a database. Do you have any good methods or recommen...
{ "language": "en", "url": "https://stackoverflow.com/questions/379478", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "20" }
Q: Is there a refactoring tool for Eclipse better than the built in one? I know there is re-sharper for Visual Studio, but is there a really good refactoring tool for Eclipse that is better than the small amount of built in refactors? Preferably something free. (Update) Looking to do things like take all string literal...
{ "language": "en", "url": "https://stackoverflow.com/questions/379487", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Forms authentication + ASP.NET MVC absolute ReturnURL I have a central authentication application on server a. Server b has one or more applications on the same domain that need to authenticate from server a. It's easy enough to set it up so that the server b apps redirect out to server a. What's not so easy is gett...
{ "language": "en", "url": "https://stackoverflow.com/questions/379506", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Using WebRequest to save URL as Image thumbnail in VB.NET I'm trying to write a simple routine where I pass it a URL and it goes and renders the content of the webresponse as a jpg. I found a solution somehwere in C# and ported it to vb.net, however when I run it, it throws an argumentexception "parameter is not va...
{ "language": "en", "url": "https://stackoverflow.com/questions/379512", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: WCF username without certificate I'm working on a project where I need the following. * *WCF service on the server side (.NET 3.5) *WPF client for the client side (.NET 3.0) I have an existing application that I have to use the authentication and authorization from (on the server side). I also need to store so...
{ "language": "en", "url": "https://stackoverflow.com/questions/379526", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: In Ruby, how does one get their IP octet without going through DNS? I can, on some of my systems, get my IP address (192.68.m.n format) by doing this: addr = IPSocket::getAddress(Socket.gethostname()) ...the trouble is that this only works if the name the local machine uses for itself is the name the DNS server ass...
{ "language": "en", "url": "https://stackoverflow.com/questions/379530", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Is there a way to programatically enable a widget from a plugin in WordPress? I've got a plugin I wrote for wordpress and I need to have the Pages widget enabled for everything to work properly. It would be nice if I could enable it myself in the plugin rather than requesting the user to do this. Do you know of a w...
{ "language": "en", "url": "https://stackoverflow.com/questions/379533", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Is there a tool that will find html tags with class attributes that don't have a corresponding class in CSS? I have found http://www.sitepoint.com/dustmeselectors/ which does about the opposite of what I want, identifying selectors in CSS that aren't used in HTML. I want a tool that will find elements that have a cl...
{ "language": "en", "url": "https://stackoverflow.com/questions/379536", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }