text
stringlengths
8
267k
meta
dict
Q: Sun Solaris IDE/Source Control Choices At my new job I'm getting acclimated with the IDE we have Visual SlickEdit 8.0 installed on our sun solaris workstation that we telnet into(lol yes ssh is turned off). Now it does the basics but is missing many things I considered must haves like code hiding and parenthesis mat...
{ "language": "en", "url": "https://stackoverflow.com/questions/150698", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Is there any Visual Library alternative to wxPython that supports CSS/Style Sheets? I've developed a program that extensively uses wxPython - the wxWindow port for python. Even though it is as mature library it is still very primitive and very programming oriented. Which is time consuming and not flexible at all. I...
{ "language": "en", "url": "https://stackoverflow.com/questions/150705", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: C++ having cin read a return character I was wondering how to use cin so that if the user does not enter in any value and just pushes ENTER that cin will recognize this as valid input. A: I find that for user input std::getline works very well. You can use it to read a line and just discard what it reads. The probl...
{ "language": "en", "url": "https://stackoverflow.com/questions/150726", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: What is the best way to write to a file in Ruby? I would like to write some data to a file in Ruby. What is the best way to do that? A: File.open("a_file", "w") do |f| f.write "some data" end You can also use f << "some data" or f.puts "some data" according to personal taste/necessity to have newlines. Change ...
{ "language": "en", "url": "https://stackoverflow.com/questions/150731", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: Getting the GUID of a VS 2008 tool window Does anybody have a short code sample that can be run in the VS macro editor on how to enumerate the tool windows in VS 2008 and show the GUID for each one? Or do you know another way to find this out? A: You can enumerate the child keys under HKEY_LOCAL_MACHINE\SOFTWARE\Mi...
{ "language": "en", "url": "https://stackoverflow.com/questions/150735", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do you install an ssh server on qnx? I'm working on a qnx device, and I want to be able to ssh into it. Does anyone have a primer on getting something like openSSH up and running? A: QNX have removed support for packages since version 6.4. This means that it is difficult to install SSH and SSL from the 3rd Par...
{ "language": "en", "url": "https://stackoverflow.com/questions/150737", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: How much Application session data can you actually hold? I currently have an application that gets hit with over 20,000 users daily and they mostly look at one data table. This data table is filled with about 20 rows but is pulled from a "datatable" in a db with 200,000-600,000 records of information in the table. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/150739", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How do you generate a good ID in ATOM documents? Apparently using the URL is no good - why is this the case, and how do you generate a good one? A: Mark Pilgrim's article How to make a good ID in Atom is good. Here's part of it: Why you shouldn’t use your permalink as an Atom ID It’s valid to use your permalink U...
{ "language": "en", "url": "https://stackoverflow.com/questions/150741", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "23" }
Q: What exceptions might a Python function raise? Is there any way in Python to determine what exceptions a (built-in) function might raise? For example, the documentation (http://docs.python.org/lib/built-in-funcs.html) for the built-in int(s) says nothing about the fact that it might raise a ValueError if s is not a ...
{ "language": "en", "url": "https://stackoverflow.com/questions/150743", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: HashSet vs. List performance It's clear that a search performance of the generic HashSet<T> class is higher than of the generic List<T> class. Just compare the hash-based key with the linear approach in the List<T> class. However calculating a hash key may itself take some CPU cycles, so for a small amount of items ...
{ "language": "en", "url": "https://stackoverflow.com/questions/150750", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "528" }
Q: How to avoid heap fragmentation? I'm currently working on a project for medical image processing, that needs a huge amount of memory. Is there anything I can do to avoid heap fragmentation and to speed up access of image data that has already been loaded into memory? The application has been written in C++ and runs ...
{ "language": "en", "url": "https://stackoverflow.com/questions/150753", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: How to remove duplicate rows from flat file using SSIS? Let me first say that being able to take 17 million records from a flat file, pushing to a DB on a remote box and having it take 7 minutes is amazing. SSIS truly is fantastic. But now that I have that data up there, how do I remove duplicates? Better yet, I wan...
{ "language": "en", "url": "https://stackoverflow.com/questions/150760", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How can I test if a list of files exist? I have a file that lists filenames, each on it's own line, and I want to test if each exists in a particular directory. For example, some sample lines of the file might be mshta.dll foobar.dll somethingelse.dll The directory I'm interested in is X:\Windows\System32\, so I wa...
{ "language": "en", "url": "https://stackoverflow.com/questions/150762", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Are regexes really maintainable? Any code I've seen that uses Regexes tends to use them as a black box: * *Put in string *Magic Regex *Get out string This doesn't seem a particularly good idea to use in production code, as even a small change can often result in a completely different regex. Apart from cases ...
{ "language": "en", "url": "https://stackoverflow.com/questions/150764", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: Porting Android's Java VM to the iPhone? Does anyone know of any existing projects that aim to port Android's Java VM over to the iPhone? From what I understand, this wouldn't be too out of reach and would certainly make for some exciting developments. Edit: I should point out that I am aware this will not happen us...
{ "language": "en", "url": "https://stackoverflow.com/questions/150781", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: Side effects of calling RegisterWindow multiple times with same window class? I'm working on a little test application at the minute and I have multiple window objects floating around and they each call RegisterWindowEx with the same WNDCLASSEX structure (mainly because they are all an instance of the same class). T...
{ "language": "en", "url": "https://stackoverflow.com/questions/150803", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Best way to track down a memory leak (C#) only visible on one customer's box What is the best way to track down a memory leak that is only found on one customer's test/release box, and no where else? A: dotTrace3.1 (This question is kinda funny, cause I am tracking a mem leak that isn't present on my machine ...) ...
{ "language": "en", "url": "https://stackoverflow.com/questions/150805", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: How to handle an ActiveX event in Javascript This is somewhat of a follow-up to an answer here. I have a custom ActiveX control that is raising an event ("ReceiveMessage" with a "msg" parameter) that needs to be handled by Javascript in the web browser. Historically we've been able to use the following IE-only synta...
{ "language": "en", "url": "https://stackoverflow.com/questions/150814", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "20" }
Q: Strategies for Data Loading and DB Initialization for Integration Tests I'm developing an integration testing framework for a data intensive J2EE enterprise application and I'm trying to decide upon a strategy for initializing and populating the database. We have a fairly complex model. The system will have to: * ...
{ "language": "en", "url": "https://stackoverflow.com/questions/150820", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Pentaho vs Microsoft BI Stack My company is heavily invested in the MS BI Stack (SQL Server Reporting Services, -Analysis Services and -Integration Services), but I want to have a look at what the seemingly most talked about open-source alternative Pentaho is like. I've installed a version, and I got it up and runni...
{ "language": "en", "url": "https://stackoverflow.com/questions/150825", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "37" }
Q: How can I create this action link? I'm having issues creating an ActionLink using Preview 5. All the docs I can find describe the older generic version. I'm constructing links on a list of jobs on the page /jobs. Each job has a guid, and I'd like to construct a link to /jobs/details/{guid} so I can show details ab...
{ "language": "en", "url": "https://stackoverflow.com/questions/150845", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to get JRE/JDK with matching source? I'd like to get at least one JRE/JDK level on my Windows machine where I have the JRE/JDK source that matches the exact level of the JRE/JDK. My purpose is to be able to go into the system classes while debugging. Any suggestions about how to do this? Thanks in advance. A: M...
{ "language": "en", "url": "https://stackoverflow.com/questions/150849", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: What IDEs and tools are available for C language development? Looking at learning some C since i saw in another SO question that is good to learn for the language and for the historical experience. Wondering about what IDE's professionals use and what other tools are useful while programming in C? A: I have always ...
{ "language": "en", "url": "https://stackoverflow.com/questions/150876", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: What can cause mutated Word document attachements? We are sending out Word documents via email (automated system, not by hand). The email is sent to the user, and CC'd to me. We are getting reports that some users are having the attachments come through corrupted, though when we open the copy that is CC'd to me, it ...
{ "language": "en", "url": "https://stackoverflow.com/questions/150881", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Socket programming: Do some ISP's impose rate-limiting on FTP uploads? I'm currently trying to debug a customer's issue with an FTP upload feature in one of our products. The feature allows customers to upload files (< 1MB) to a central FTP server for further processing. The FTP client code was written in-house in V...
{ "language": "en", "url": "https://stackoverflow.com/questions/150886", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Remove Duplicates with Caveats I have a table with rowID, longitude, latitude, businessName, url, caption. This might look like: rowID | long | lat | businessName | url | caption 1 20 -20 Pizza Hut yum.com null How do I delete all of the duplicates, but only keep the one that has a URL (first p...
{ "language": "en", "url": "https://stackoverflow.com/questions/150891", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Windows Forms UserControl overrides not being called I am creating a Windows Forms control derived from UserControl to be embedded in a WPF app. I have generally followed the procedures given in this link. public ref class CTiledImgViewControl : public UserControl { ... virtual void OnPaint( PaintEventArgs^ e ) ove...
{ "language": "en", "url": "https://stackoverflow.com/questions/150900", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: .Net Regex ValidationExpression ASCII Anyone know a good Regex expression to drop in the ValidationExpression to be sure that my users are only entering ASCII characters? <asp:RegularExpressionValidator id="myRegex" runat="server" ControlToValidate="txtName" ValidationExpression="???" ErrorMessage="Non-ASCII Chara...
{ "language": "en", "url": "https://stackoverflow.com/questions/150901", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Hibernate -- load an object based on a member object's field How can an object be loaded via Hibernate based on a field value of a member object? For example, suppose the following classes existed, with a one-to-one relationship between bar and foo: Foo { Long id; } Bar { Long id; Foo aMember; } How co...
{ "language": "en", "url": "https://stackoverflow.com/questions/150902", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do I password protect IIS in a method analogous to Apache's AuthType / AuthUserFile mechanism? I'm used to doing basic password protection for Apache w/ the following method in Apache config files: AuthType Basic AuthName "By Invitation Only" AuthUserFile /path/to/.htpasswd Require valid-user However, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/150923", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What's the best way for a .NET windows forms application to update itself? I use a home-grown system where the application updates itself from a web service. However, I seem to remember something in the original .NET sales pitch about auto-updating of components being a built-in feature of .NET. What are the best ...
{ "language": "en", "url": "https://stackoverflow.com/questions/150935", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Computer Science text book way to do text/xml/whatever parsing It's been ratling in my brain for a while. I've had some investigation on Compilers/Flex/Byson and stuff but I never found a good reference that talked in detail about the "parsing stack", or how to go about implementing one. Does anyone know of good ref...
{ "language": "en", "url": "https://stackoverflow.com/questions/150937", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How do you specify the port number in a oledb connection string to SQL server 2005? Just found this out, so i am answering my own question :) Use a comma where you would normally use a colon. This can be a problem for named instances, as you seem to need to specify the port even if it is the default port 1433. Examp...
{ "language": "en", "url": "https://stackoverflow.com/questions/150941", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Error "set_paths: undefined method uid for nil:NilClass (NoMethodError)" while installing RubyGems on Vista I get the following error when attempting to install RubyGems. I've tried Googling but have had no luck there. Has anybody encountered and resolved this issue before? C:\rubygems-1.3.0> ruby setup.rb . . inst...
{ "language": "en", "url": "https://stackoverflow.com/questions/150953", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Perform regex (replace) in an SQL query What is the best way to replace all '&lt' with &lt; in a given database column? Basically perform s/&lt[^;]/&lt;/gi Notes: * *must work in MS SQL Server 2000 *Must be repeatable (and not end up with &lt;;;;;;;;;;) A: How about: UPDATE tableName SET columName = RE...
{ "language": "en", "url": "https://stackoverflow.com/questions/150977", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: What's the best way for a .NET winforms application to update itself without using ClickOnce? For technical reasons, I can't use ClickOnce to auto-update my .NET application and its assemblies. What is the best way to handle auto-updating in .NET? A: I think the Updater Application Block was something of a precurs...
{ "language": "en", "url": "https://stackoverflow.com/questions/150994", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "23" }
Q: In my ActionScript3 class, can I have a property with a getter and setter? In my ActionScript3 class, can I have a property with a getter and setter? A: Yes you can create getter and setter functions inside an AS3 class. Example: private var _foo:String = ""; public function get foo():String{ return _foo; } ...
{ "language": "en", "url": "https://stackoverflow.com/questions/150998", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Finalizers and Dispose I've got a class named BackgroundWorker that has a thread constantly running. To turn this thread off, an instance variable named stop to needs to be true. To make sure the thread is freed when the class is done being used, I've added IDisposable and a finalizer that invokes Dispose(). Assumi...
{ "language": "en", "url": "https://stackoverflow.com/questions/151000", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How do I create an Excel (.XLS and .XLSX) file in C# without installing Microsoft Office? How can I create an Excel spreadsheet with C# without requiring Excel to be installed on the machine that's running the code? A: The commercial solution, SpreadsheetGear for .NET will do it. You can see live ASP.NET (C# and VB...
{ "language": "en", "url": "https://stackoverflow.com/questions/151005", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2124" }
Q: Is it OK to use static variables to cache information in ASP.net? At the moment I am working on a project admin application in C# 3.5 on ASP.net. In order to reduce hits to the database, I'm caching a lot of information using static variables. For example, a list of users is kept in memory in a static class. The cla...
{ "language": "en", "url": "https://stackoverflow.com/questions/151021", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "24" }
Q: How can I upgrade the *console* version of vim on OS X? I'm sure this is a newbie question, but every time I've compiled/dl'ed a new version of vim for os x, running vim on the command-line opens up the gvim app. I just want to upgrade the console version (so I can, for example, have python compiled in to use omnico...
{ "language": "en", "url": "https://stackoverflow.com/questions/151024", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: How do I unlock a SQLite database? When I enter this query: sqlite> DELETE FROM mails WHERE (id = 71); SQLite returns this error: SQL error: database is locked How do I unlock the database so this query will work? A: This error can be thrown if the file is in a remote folder, like a shared folder. I changed the da...
{ "language": "en", "url": "https://stackoverflow.com/questions/151026", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "321" }
Q: How can I call controller/view helper methods from the console in Ruby on Rails? When I load script/console, sometimes I want to play with the output of a controller or a view helper method. Are there ways to: * *simulate a request? *call methods from a controller instance on said request? *test helper methods,...
{ "language": "en", "url": "https://stackoverflow.com/questions/151030", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "469" }
Q: How do you solicit testers for an open source project? In order to improve my open source project, I need testers. I have created my project independently, so up to now I have been the sole coder and tester. I have tested the thing to death, but as we all know it is dangerous as a developer to test your own code. I...
{ "language": "en", "url": "https://stackoverflow.com/questions/151033", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Does the Eclipse editor have an equivalent of Emacs's "align-regex"? I've been using Eclipse pretty regularly for several years now, but I admit to not having explored all the esoterica it has to offer, particularly in the areas of what formatting features the editors offer. The main thing I miss from (X)emacs is th...
{ "language": "en", "url": "https://stackoverflow.com/questions/151034", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: How can I detect the last iteration in a loop over std::map? I'm trying to figure out the best way to determine whether I'm in the last iteration of a loop over a map in order to do something like the following: for (iter = someMap.begin(); iter != someMap.end(); ++iter) { bool last_iteration; // do somethin...
{ "language": "en", "url": "https://stackoverflow.com/questions/151046", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "29" }
Q: When should I use GC.SuppressFinalize()? In .NET, under which circumstances should I use GC.SuppressFinalize()? What advantage(s) does using this method give me? A: SupressFinalize tells the system that whatever work would have been done in the finalizer has already been done, so the finalizer doesn't need to be ca...
{ "language": "en", "url": "https://stackoverflow.com/questions/151051", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "369" }
Q: How do I implement Section-specific navigation in Ruby on Rails? I have a Ruby/Rails app that has two or three main "sections". When a user visits that section, I wish to display some sub-navigation. All three sections use the same layout, so I can't "hard code" the navigation into the layout. I can think of a few d...
{ "language": "en", "url": "https://stackoverflow.com/questions/151066", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: "name" web pdf for better default save filename in Acrobat? My app generates PDFs for user consumption. The "Content-Disposition" http header is set as mentioned here. This is set to "inline; filename=foo.pdf", which should be enough for Acrobat to give "foo.pdf" as the filename when saving the pdf. However, upon ...
{ "language": "en", "url": "https://stackoverflow.com/questions/151079", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "43" }
Q: How can I prevent link_to from escaping slashes in URL parameters in Rails? Having this route: map.foo 'foo/*path', :controller => 'foo', :action => 'index' I have the following results for the link_to call link_to "Foo", :controller => 'foo', :path => 'bar/baz' # <a href="/foo/bar%2Fbaz">Foo</a> Calling url_for o...
{ "language": "en", "url": "https://stackoverflow.com/questions/151083", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How do I find records that are not joined? I have two tables that are joined together. A has many B Normally you would do: select * from a,b where b.a_id = a.id To get all of the records from a that has a record in b. How do I get just the records in a that does not have anything in b? A: Another approach: sele...
{ "language": "en", "url": "https://stackoverflow.com/questions/151099", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "84" }
Q: How can I serve an image to the browser using Struts 2 + Hibernate 3? I am developing a web application using Struts 2.1.2 and Hibernate 3.2.6.GA. I have an entity, User, which I have mapped to a table USERS in the DB using Hibernate. I want to have an image associated with this entity, which I plan to store as a BL...
{ "language": "en", "url": "https://stackoverflow.com/questions/151100", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Which is correct? catch (_com_error e) or catch (_com_error& e)? Which one should I use? catch (_com_error e) or catch (_com_error& e) A: Also, note that, when using MFC, you may have to catch by pointer. Otherwise, @JaredPar's answer is the way you should normally go (and hopefully never have to deal with t...
{ "language": "en", "url": "https://stackoverflow.com/questions/151124", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: Annotated Spring-MVC controller not recognized when controller extends interface I'm using spring 2.5, and am using annotations to configure my controllers. My controller works fine if I do not implement any additional interfaces, but the spring container doesn't recognize the controller/request mapping when I add ...
{ "language": "en", "url": "https://stackoverflow.com/questions/151152", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Stopping MaskedEditExtender from validating input in asp.net I have an asp.net textbox and a MaskedEditExtender control attached to it. The textbox is used for date input. The MaskedEditExtender has MaskType="Date" Mask="99/99/9999". When the form is submitted with an invalid date, the browser shows a Javascript err...
{ "language": "en", "url": "https://stackoverflow.com/questions/151173", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Sidewinder x6 keyboard macro for Visual Studio? the new keyboard from Microsoft, Sidewinder x6 can record in game macro. I was woundering if it could be used in Visual Studio (record key in application too)? (This could be very useful to press 1 key instead of Ctrl+M,M to Toggle Outline.) A: YES IT CAN! Sure, why ...
{ "language": "en", "url": "https://stackoverflow.com/questions/151183", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: pl/sql dollar operator? I encountered the following ddl in a pl/sql script this morning: create index genuser.idx$$_0bdd0011 ... My initial thought was that the index name was generated by a tool...but I'm also not a pl/sql superstar so I could very well be incorrect. Does the double dollar sign have any special sig...
{ "language": "en", "url": "https://stackoverflow.com/questions/151190", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Possible to use SQL to sort by date but put null dates at the back of the results set? I have a bunch of tasks in a MySQL database, and one of the fields is "deadline date". Not every task has to have to a deadline date. I'd like to use SQL to sort the tasks by deadline date, but put the ones without a deadline date...
{ "language": "en", "url": "https://stackoverflow.com/questions/151195", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "57" }
Q: How to calculate number of days between two given dates If I have two dates (ex. '8/18/2008' and '9/26/2008'), what is the best way to get the number of days between these two dates? A: For calculating dates and times, there are several options but I will write the simple way: from datetime import timedelta, dateti...
{ "language": "en", "url": "https://stackoverflow.com/questions/151199", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "732" }
Q: How to configure Caucho Resin's Java classpath to the system's library directory I have a folder, '/var/unity/conf' with some properties files in it, and I'd like the Caucho's Resin JVM to have that directory on the classpath. What is the best way to modifiy resin.conf so that Resin knows to add this directory to th...
{ "language": "en", "url": "https://stackoverflow.com/questions/151204", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Are these interview questions too challenging for beginners? So I just interviewed two people today, and gave them "tests" to see what their skills were like. Both are entry level applicants, one of which is actually still in college. Neither applicant saw anything wrong with the following code. I do, obviously or ...
{ "language": "en", "url": "https://stackoverflow.com/questions/151210", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: VMware Server 2.0 - The VMware Infrastructure Web Service not responding After installing VMware Server I get the following error when I try to access the VMware web-based server manager: The VMware Infrastructure Web Service at "http://localhost:8222/sdk" is not responding A: Go into the services manager and...
{ "language": "en", "url": "https://stackoverflow.com/questions/151228", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How do I get the Local Network IP address of a computer programmatically? I need to get the actual local network IP address of the computer (e.g. 192.168.0.220) from my program using C# and .NET 3.5. I can't just use 127.0.0.1 in this case. How can I accomplish this? A: If you are looking for the sort of informatio...
{ "language": "en", "url": "https://stackoverflow.com/questions/151231", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "27" }
Q: Has anyone ever got a remote JMX JConsole to work? It seems that I've never got this to work in the past. Currently, I KNOW it doesn't work. But we start up our Java process: -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=6002 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management...
{ "language": "en", "url": "https://stackoverflow.com/questions/151238", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "125" }
Q: ASP.NET AJAX nested updatePanel modalPopup funkiness It seems that in some cases, if you end up with nested modalPopups wrapped with updatePanels (not ideal I know, and should probably be refactored, but that's what we're working with because of how some of the user controls we wanted to re-use were written), when y...
{ "language": "en", "url": "https://stackoverflow.com/questions/151241", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How do I embed a File Version in an MSI file with Visual Studio? I have a setup project for my C# program, and this setup project has a Version in its properties. I'd like for the MSI file that is generated to have this Version embedded in it, so I can mouse over it in explorer and see what version the file is. I'm ...
{ "language": "en", "url": "https://stackoverflow.com/questions/151250", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to force abort on "glibc detected *** free(): invalid pointer" In Linux environment, when getting "glibc detected *** free(): invalid pointer" errors, how do I identify which line of code is causing it? Is there a way to force an abort? I recall there being an ENV var to control this? How to set a breakpoint in ...
{ "language": "en", "url": "https://stackoverflow.com/questions/151268", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: Given an IMDB movie id, how do I programmatically get its poster image? movie id tt0438097 can be found at http://www.imdb.com/title/tt0438097/ What's the url for its poster image? A: As I'm sure you know, the actual url for that image is http://ia.media-imdb.com/images/M/MV5BMTI0MDcxMzE3OF5BMl5BanBnXkFtZTcwODc3OT...
{ "language": "en", "url": "https://stackoverflow.com/questions/151272", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "21" }
Q: What combination do you use for your polyglot solution? Those of us who use multiple languages to solve problems can combine them in a lot of ways. Personally I use PL/SQL, XSLT, JavaScript, and Java plus the pseudo languages HTML, XML, CSS, Ant, and Bash. What do you use? A: Paraphrasing one of my favorite quot...
{ "language": "en", "url": "https://stackoverflow.com/questions/151290", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: Can I use "System.Currency" in .NET? Is it possible to use system.currency. It says system.currency is inaccessible due to its protection level. what is the alternative of currency. A: Use Decimal. All of the functions that Currency provides are static methods on Decimal, FromOACurrency, and ToOACurrency. A: It m...
{ "language": "en", "url": "https://stackoverflow.com/questions/151291", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Is there a CLR that runs on the CLR? I was wondering if there was a .NET-compatible CLR that was implemented using the CLI (common language infrastructure), e.g., using .NET itself, or at least if there were any resources that would help with building one. Basically, something like a .NET program that loads assembli...
{ "language": "en", "url": "https://stackoverflow.com/questions/151298", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Embedding SVN Revision number at compile time in a Windows app I'd like my .exe to have access to a resource string with my svn version. I can type this in by hand, but I'd prefer an automated way to embed this at compile time. Is there any such capability in Visual Studio 2008? A: You can get SVN to embed it for...
{ "language": "en", "url": "https://stackoverflow.com/questions/151299", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: AddHandler/RemoveHandler Not Disposing Correctly Using the AddHandler method, if I never use RemoveHandler, will that lead to memory leaks in some conditions and situations? I'm not so sure about the truth of this. And are there other causes to memory leaks that are solely available in VB as opposed to C#? A: Well ...
{ "language": "en", "url": "https://stackoverflow.com/questions/151303", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: VB.Net - how to support implicit type conversion as well as custom equality Fixed: See notes at bottom I am implementing a generic class that supports two features, implicit type conversion and custom equality operators. Well, it supports IN-equality as well, if it does that. 1) if ( "value" = myInstance ) then ....
{ "language": "en", "url": "https://stackoverflow.com/questions/151318", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Sharing Files between VM and Host using Virtual PC 2007 I know that I can share files using Shared Folders in Virtual PC, but this method seems to have pretty poor performance. Is there another method to share files that provides better performance? (Besides using something other than Virtual PC) A: The best way to...
{ "language": "en", "url": "https://stackoverflow.com/questions/151327", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: .NET Winforms Deployment Is there anyway to combine all resources into a single exe file such as app.config and associated DLL's? Some applications seem to do this such as eMule. I don't want my app.config sitting there waiting to be edited. Thanks A: Certainly, in the Solution Explorer (assuming Visual Studio here...
{ "language": "en", "url": "https://stackoverflow.com/questions/151335", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to get a reference to the currently focused form field in JavaScript? I'm looking for a cross-browser method - I know IE has something (I've already forgotten what), and the way to do it in Mozilla may have to do with a focusNode thing I found, that seems related to getting text selections. Methods involving jQu...
{ "language": "en", "url": "https://stackoverflow.com/questions/151337", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Adding an instance variable to a class in Ruby How can I add an instance variable to a defined class at runtime, and later get and set its value from outside of the class? I'm looking for a metaprogramming solution that allows me to modify the class instance at runtime instead of modifying the source code that origi...
{ "language": "en", "url": "https://stackoverflow.com/questions/151338", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "39" }
Q: How to check if an object is an instance of a NodeList in IE? Why is NodeList undefined in IE6/7? <form action="/" method="post" id="testform"> <input type="checkbox" name="foobar[]" value="1" id="" /> <input type="checkbox" name="foobar[]" value="2" id="" /> <input type="checkbox" name="foobar[]" value=...
{ "language": "en", "url": "https://stackoverflow.com/questions/151348", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: IDE's for C# development on Linux? What are my options? I tried MonoDevelop over a year ago but it was extremely buggy. Is the latest version a stable development environment? A: Monodevelop There are 2 versions around: * *1.0: the currently stable version. It is indeed stable, but somewhat limited in its capa...
{ "language": "en", "url": "https://stackoverflow.com/questions/151350", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "70" }
Q: "Access is denied" error on accessing iframe document object For posting AJAX forms in a form with many parameters, I am using a solution of creating an iframe, posting the form to it by POST, and then accessing the iframe's content. specifically, I am accessing the content like this: $("some_iframe_id").get(0).con...
{ "language": "en", "url": "https://stackoverflow.com/questions/151362", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "26" }
Q: Tools for refactoring table-based HTML layouts to CSS? Given an HTML page that has a complex table-based layout and many tags that are duplicated and wasteful, e.g.: td align="left" class="tableformat" width="65%" style="border-bottom:1px solid #ff9600; border-right:1px solid #ff9600; background-color:#FDD69E" nowra...
{ "language": "en", "url": "https://stackoverflow.com/questions/151369", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How to stress-test video streaming server? Does anyone know any good tool that I can use to perform stress tests on a video streaming server? I need to test how well my server handles 5,000+ connections. A: One option is to use VLC. You can specify a url on the command line. (see here for details). You could then ...
{ "language": "en", "url": "https://stackoverflow.com/questions/151392", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "23" }
Q: What is a good free utility to create a self-extracting executable with an embedded file version? According to the answers to this question, I cannot embed a file version in my .msi file. The installer that I give the client needs to have a file version. So, what I want to do is create a self-extracting executable...
{ "language": "en", "url": "https://stackoverflow.com/questions/151403", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How to get an X11 Window from a Process ID? Under Linux, my C++ application is using fork() and execv() to launch multiple instances of OpenOffice so as to view some powerpoint slide shows. This part works. Next I want to be able to move the OpenOffice windows to specific locations on the display. I can do that with...
{ "language": "en", "url": "https://stackoverflow.com/questions/151407", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "61" }
Q: How to solve HTTP status 405 "Method Not Allowed" when calling Web Services I've got a siluation where i need to access a SOAP web service with WSE 2.0 security. I've got all the generated c# proxies (which are derived from Microsoft.Web.Services2.WebServicesClientProtocol), i'm applying the certificate but when i c...
{ "language": "en", "url": "https://stackoverflow.com/questions/151413", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: Explain the JVM Directory Layout on Mac OSX Leopard Here is the directory layout that was installed with Leopard. What is the "A" directory and why the "Current" directory in addition to the "CurrentJDK"? It seems like you can easily switch the current JDK by move the CurrentJDK link, but then the contents under Cu...
{ "language": "en", "url": "https://stackoverflow.com/questions/151414", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Calling a C++ function pointer on a specific object instance I have a function pointer defined by: typedef void (*EventFunction)(int nEvent); Is there a way to handle that function with a specific instance of a C++ object? class A { private: EventFunction handler; public: void SetEvent(EventFunction func) ...
{ "language": "en", "url": "https://stackoverflow.com/questions/151418", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: returning null values from a web service call I have a web service API. Some calls return objects containing text fields with information provided by the user. From both a design and a security standpoint, what are the downsides to returning null in those fields when no information has been provided? Is there a clea...
{ "language": "en", "url": "https://stackoverflow.com/questions/151434", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Web "frameworks" for Haxe to deploy in a PHP environment? Lately I've been taking a look at Haxe, to build an application to be deployed to Apache running PHP. Well, while it looks like it might suit my needs (deploying to PHP, but not using an awful language), I haven't found anything to make the actual application...
{ "language": "en", "url": "https://stackoverflow.com/questions/151438", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Response.Write vs <%= %> Bearing in mind this is for classic asp Which is better, all HTML contained within Response.Write Statements or inserting variables into HTML via <%= %>. Eg Response.Write "<table>" & vbCrlf Response.Write "<tr>" &vbCrLf Response.Write "<td class=""someClass"">" & someVariable & "</td>" & ...
{ "language": "en", "url": "https://stackoverflow.com/questions/151448", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "28" }
Q: What is the difference between String.Empty and "" (empty string)? In .NET, what is the difference between String.Empty and "", and are they interchangable, or is there some underlying reference or Localization issues around equality that String.Empty will ensure are not a problem? A: All instances of "" are the sa...
{ "language": "en", "url": "https://stackoverflow.com/questions/151472", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "339" }
Q: Expressing Excel formula in Java (decimal to time interpretation) I am converting an excel sheet formula to java but I can't understand how excel manages to take the following: 0.22 Applies a formula: =TEXT(R5/14, "h:mm") and somehow arrives at: 0.22 Again if I provide: 2.8 it arrives at 4.48 Can someone please expl...
{ "language": "en", "url": "https://stackoverflow.com/questions/151496", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Difference between a class and a module I came from Java, and now I am working more with Ruby. One language feature I am not familiar with is the module. I am wondering what exactly is a module and when do you use one, and why use a module over a class? A: I'm surprised anyone hasn't said this yet. Since the asker...
{ "language": "en", "url": "https://stackoverflow.com/questions/151505", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "458" }
Q: Should I provide a deep clone when implementing ICloneable? It is unclear to me from the MSDN documentation if I should provide a deep or a shallow clone when implementing ICloneable. What is the preferred option? A: Short answer: Yes. Long Answer: Don't use ICloneable. That is because .Clone isn't defined as bein...
{ "language": "en", "url": "https://stackoverflow.com/questions/151520", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Linq to XML for KML? I'm a LINQ to XML newbie, and a KML newbie as well; so bear with me. My goal is to extract individual Placemarks from a KML file. My KML begins thusly: <?xml version="1.0" encoding="utf-8"?> <Document xmlns="http://earth.google.com/kml/2.0"> <name>Concessions</name> <visibility>1</visibilit...
{ "language": "en", "url": "https://stackoverflow.com/questions/151521", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Textarea in IE7 disappears on mouse over I have this big data-entry sort of page, a table kind of layout using divs. Each row has subrows which can be toggled open/closed. The toggling is triggered using css visibility settings. Each "cell" of the table has a little image in its corner, you click on the image, and a...
{ "language": "en", "url": "https://stackoverflow.com/questions/151528", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How can I detect that the client is scrolled to the top or bottom of a webpage? I'm looking for a cross-browser method of detecting that a client web browser is scrolled all the way to the bottom (or top) of the screen. Really, the top is fairly easy, as scrY = window.pageYOffset || document.body.scrollTop || docume...
{ "language": "en", "url": "https://stackoverflow.com/questions/151544", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: How can I get the FQDN of the current host in Ruby? I need to get the fully expanded hostname of the host that my Ruby script is running on. In Perl I've used Sys::Hostname::Long with good results. Google seems to suggest I should use Socket.hostname in ruby, but that's returning just the nodename, not the full ho...
{ "language": "en", "url": "https://stackoverflow.com/questions/151545", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: How do I execute a page-defined JavaScript function from a Firefox extension? I'm creating a Firefox extension for demo purposes. I to call a specific JavaScript function in the document from the extension. I wrote this in my HTML document (not inside extension, but a page that is loaded by Firefox): document.funcTo...
{ "language": "en", "url": "https://stackoverflow.com/questions/151555", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }