text
stringlengths
8
267k
meta
dict
Q: Using PostSharp to intercept calls to Silverlight objects? I'm working with PostSharp to intercept method calls to objects I don't own, but my aspect code doesn't appear to be getting called. The documentation seems pretty lax in the Silverlight area, so I'd appreciate any help you guys can offer :) I have an attrib...
{ "language": "en", "url": "https://stackoverflow.com/questions/97733", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: OSCache vs. EHCache Never used a cache like this before. The problem is that I want to load 500,000 + records out of a database and do some selecting/filtering wicked fast. I'm thinking about using a cache, and preliminarily found EHCache and OSCache, any opinions? A: I've used JCS (http://jakarta.apache.org/jcs/) ...
{ "language": "en", "url": "https://stackoverflow.com/questions/97741", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "20" }
Q: Algorithm for hit test in non-overlapping rectangles I have a collection of non-overlapping rectangles that cover an enclosing rectangle. What is the best way to find the containing rectangle for a mouse click? The obvious answer is to have an array of rectangles and to search them in sequence, making the search O(n...
{ "language": "en", "url": "https://stackoverflow.com/questions/97762", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Forced Alpha-Numeric User IDs I am a programmer at a financial institute. I have recently been told to enforce that all new user id's to have at least one alpha and one numeric. I immediately thought that this was a horrible idea and I would rather not implement it, as I believe this is an anti-feature and of poor...
{ "language": "en", "url": "https://stackoverflow.com/questions/97765", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: What is the best tool to convert common video formats to FLV on a Linux CLI Part of a new product I have been assigned to work on involves server-side conversion of the 'common' video formats to something that Flash can play. As far as I know, my only option is to convert to FLV. I have been giving ffmpeg a go aroun...
{ "language": "en", "url": "https://stackoverflow.com/questions/97781", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: How can I fix this delphi 7 compile error - "Duplicate resource(s)" I'm trying to compile a Delphi 7 project that I've inherited, and I'm getting this error: [Error] WARNING. Duplicate resource(s): [Error] Type 2 (BITMAP), ID EDIT: [Error] File C:[path shortened]\common\CRGrid.res resource kept; file c:\...
{ "language": "en", "url": "https://stackoverflow.com/questions/97800", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Do you disable SELinux? I want to know if people here typically disable SELinux on installations where it is on by default? If so can you explain why, what kind of system it was, etc? I'd like to get as many opinions on this as possible. A: I worked for a company last year where we were setting it enforcing with th...
{ "language": "en", "url": "https://stackoverflow.com/questions/97816", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: WAS hosting vs. Windows Service hosting I'm working on a project using Windows 2008, .NET 3.5 and WCF for some internal services and the question of how to host the services has arisen. Since we're using Windows 2008 I was thinking it'd be good to take advantage of Windows Process Activation Service (WAS) although t...
{ "language": "en", "url": "https://stackoverflow.com/questions/97830", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Windows Server 2003 NLB drainstop notification on stop How would I drainstop one of the nodes in a MS NLB via command line and then get notified of its completion? If there's no way to callback, is there an easy way to poll? A: http://technet.microsoft.com/en-us/library/cc772833.aspx has it all. Run the drainstop ...
{ "language": "en", "url": "https://stackoverflow.com/questions/97833", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to send mail from ASP.NET with IIS6 SMTP in a dedicated server? I'm trying to configure a dedicated server that runs ASP.NET to send mail through the local IIS SMTP server but mail is getting stuck in the Queue folder and doesn't get delivered. I'm using this code in an .aspx page to test: <%@ Page Language="C#"...
{ "language": "en", "url": "https://stackoverflow.com/questions/97840", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Version control on a 2GB USB drive For my school work, I do a lot of switching computers (from labs to my laptop to the library). I'd kind of like to put this code under some kind of version control. Of course the problem is that I can't always install additional software on the computers I use. Is there any kind...
{ "language": "en", "url": "https://stackoverflow.com/questions/97850", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "43" }
Q: What's the best way to synchronize times to millisecond accuracy AND precision between machines? From what I understand, the crystals on PC's are notorious for clock skew. If clocks are always skewing, what is the best way to synchronize clocks between machines with millisecond accuracy and precision? From what I've...
{ "language": "en", "url": "https://stackoverflow.com/questions/97853", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "36" }
Q: Is there an XML XQuery interface to existing XML files? My company is in education industry and we use XML to store course content. We also store some course related information (mostly metainfo) in relational database. Right now we are in the process of switching from our proprietary XML Schema to DocBook 5. Along ...
{ "language": "en", "url": "https://stackoverflow.com/questions/97856", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Properly scoped transactions in Stored Procs Suppose I have a stored procedure that manages its own transaction CREATE PROCEDURE theProc AS BEGIN BEGIN TRANSACTION -- do some stuff IF @ThereIsAProblem ROLLBACK TRANSACTION ELSE COMMIT TRANSACTION END If I call this proc from an existing transaction,...
{ "language": "en", "url": "https://stackoverflow.com/questions/97857", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Get position data from mobile browser I am developing a web app that will be hit frequently by mobile browsers. I am wondering if there is a way to get enough information from the browser request to lookup position data (triangulation or GPS) Not from the request directly, of course. A colleague suggested there some...
{ "language": "en", "url": "https://stackoverflow.com/questions/97865", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: "rm -rf" equivalent for Windows? I need a way to recursively delete a folder and its children. Is there a prebuilt tool for this, or do I need to write one? DEL /S doesn't delete directories. DELTREE was removed from Windows 2000+ A: RMDIR or RD if you are using the classic Command Prompt (cmd.exe): rd /s /q "path"...
{ "language": "en", "url": "https://stackoverflow.com/questions/97875", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "670" }
Q: ASP.Net application cannot Login to SQL Server Database when deployed to Web Server I am having a problem with deploying a ASP.NET V2 web application to our deployment environment and am having trouble with the sql server setup . When I run the website I get a Login failed for user 'MOETP\MOERSVPWLG$'. error when it...
{ "language": "en", "url": "https://stackoverflow.com/questions/97899", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Quick and Dirty Usability testing tips? What are your best usability testing tips? I need quick & cheap. A: While aimed at web design, Steve Krug's excellent "Don't Make Me Think: A Common Sense Approach To Web Usability" features (in the second edition, at least), a great chapter entitled "Usability Testing On 1...
{ "language": "en", "url": "https://stackoverflow.com/questions/97913", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Asterisk AGI framework for IVR; Adhearsion alternative? I am trying to get started writing scalable, telecom-grade applications with Asterisk and Ruby. I had originally intended to use the Adhearsion framework for this, but it does not have the required maturity and its documentation is severely lacking. AsteriskR...
{ "language": "en", "url": "https://stackoverflow.com/questions/97920", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Codegear RAD Studio help system is corrupted I've been using Codegear RAD Studio for a over a year now but since the "May08 Help Update" the help system no longer works. If I open the help the contents pane is entirely blank. If I hit F1 I get the following error: "Unable to interpret the specified HxC file." I'...
{ "language": "en", "url": "https://stackoverflow.com/questions/97927", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Grub and getting into Real Mode (low-level assembly language programming) I've been working on a toy OS and have been using grub as my boot loader. Recently when trying to use VGA I found that I couldn't use hardware interrupts. This I found was because I had been slung into protected mode by grub. Does anybody kn...
{ "language": "en", "url": "https://stackoverflow.com/questions/97946", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: What is std::pair? What is std::pair for, why would I use it, and what benefits does boost::compressed_pair bring? A: compressed_pair uses some template trickery to save space. In C++, an object (small o) can not have the same address as a different object. So even if you have struct A { }; A's size will not be 0...
{ "language": "en", "url": "https://stackoverflow.com/questions/97948", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "45" }
Q: Debounce clicks when submitting a web form A poorly-written back-end system we interface with is having trouble with handling the load we're producing. While they fix their load problems, we're trying to reduce any additional load we're generating, one of which is that the back-end system continues to try and servic...
{ "language": "en", "url": "https://stackoverflow.com/questions/97962", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Getting Started with an IDE? Having programmed through emacs and vi for years and years at this point, I have heard that using an IDE is a very good way of becoming more efficient. To that end, I have decided to try using Eclipse for a lot of coding and seeing how I get on. Are there any suggestions for easing the t...
{ "language": "en", "url": "https://stackoverflow.com/questions/97971", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Setting the focus in a datagridview in windows form I have a datagridview that accepts a list(of myObject) as a datasource. I want to add a new row to the datagrid to add to the database. I get this done by getting the list... adding a blank myObject to the list and then reseting the datasource. I now want to set th...
{ "language": "en", "url": "https://stackoverflow.com/questions/97976", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How can I get a history of the number of pages in Google's index for a particular site? A Google search for "site:example.com" will tell you the number of pages of example.com that are currently in Google's index. Is it possible to find out how this number has changed over time? A: HubSpot does this for you. It co...
{ "language": "en", "url": "https://stackoverflow.com/questions/97982", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to put up an off-the-shelf https to http gateway? I have an HTTP server which is in our internal network and accessible only from inside it. I would like to put another server that would listen to an HTTPS port accessible from outside, and forward the requests to that HTTP server (and send back the responses via...
{ "language": "en", "url": "https://stackoverflow.com/questions/97983", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to secure database passwords in PHP? When a PHP application makes a database connection it of course generally needs to pass a login and password. If I'm using a single, minimum-permission login for my application, then the PHP needs to know that login and password somewhere. What is the best way to secure that ...
{ "language": "en", "url": "https://stackoverflow.com/questions/97984", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "436" }
Q: Advantage of switch over if-else statement What's the best practice for using a switch statement vs using an if statement for 30 unsigned enumerations where about 10 have an expected action (that presently is the same action). Performance and space need to be considered but are not critical. I've abstracted the sni...
{ "language": "en", "url": "https://stackoverflow.com/questions/97987", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "184" }
Q: How can I get that huge security icon on my secure site? If I go to www.paypal.com, Firefox displays a huge icon in the location bar. Is it possible to get my web site to do this without paying $2700 to Verisign? Where is the best place to buy SSL certificates and not break the bank? A: You're talking about EV (ext...
{ "language": "en", "url": "https://stackoverflow.com/questions/98026", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Wrap a delegate in an IEqualityComparer Several Linq.Enumerable functions take an IEqualityComparer<T>. Is there a convenient wrapper class that adapts a delegate(T,T)=>bool to implement IEqualityComparer<T>? It's easy enough to write one (if your ignore problems with defining a correct hashcode), but I'd like to kn...
{ "language": "en", "url": "https://stackoverflow.com/questions/98033", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "130" }
Q: What is the simplest way to interact between a SAP OMS and Websphere Commerce? Would it be using a Websphere Adaptor for SAP or webmethods or something else?? Does something else need to be considered while opting for one of these??? The final system needs to be synchronous between SAP and the WCS front end.No ques....
{ "language": "en", "url": "https://stackoverflow.com/questions/98044", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Which EJB 3 persisent provider should I use? I are using EJB 3 on a fairly large J2EE project, by default with Netbeans sets the persistent provider for the entity beans to TopLink. There is the option to change the provider to one of the following or even add a new persistence library: * *Hibernate *KODO *Open...
{ "language": "en", "url": "https://stackoverflow.com/questions/98045", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: What is your favorite Python mocking library? What is your single favorite mocking library for Python? A: Mox, from Google A: Mocker from Gustavo Niemeyer. It's not perfect, but it is very powerful and flexible. A: I've only used one, but I've had good results with Michael Foord's Mock: http://www.voidspace.org.u...
{ "language": "en", "url": "https://stackoverflow.com/questions/98053", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "94" }
Q: Why is this X.509 certificate considered invalid? I have a given certificate installed on my server. That certificate has valid dates, and seems perfectly valid in the Windows certificates MMC snap-in. However, when I try to read the certificate, in order to use it in an HttpRequest, I can't find it. Here is the cod...
{ "language": "en", "url": "https://stackoverflow.com/questions/98074", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Can eclipse extract a second class in class file to its own file I often refactor code first by creating an inner class inside the class I'm working on--When I'm done, I move the entire thing into a new class file. This makes refactoring code into the new class extremely easy because A) I'm only dealing with a sing...
{ "language": "en", "url": "https://stackoverflow.com/questions/98079", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "37" }
Q: How do I parse a PHP serialized datastructure in Java? I have a system that combines the best and worst of Java and PHP. I am trying to migrate a component that was once written in PHP into a Java One. Does anyone have some tips for how I can parse a PHP serialized datastructure in Java? By serialized I mean output ...
{ "language": "en", "url": "https://stackoverflow.com/questions/98090", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: SQL Server: Is SELECTing a literal value faster than SELECTing a field? I've seen some people use EXISTS (SELECT 1 FROM ...) rather than EXISTS (SELECT id FROM ...) as an optimization--rather than looking up and returning a value, SQL Server can simply return the literal it was given. Is SELECT(1) always faster? Wo...
{ "language": "en", "url": "https://stackoverflow.com/questions/98096", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: VS2005: Limit the Heap size Is the a VS2005 C++ compiler flag like the Xmx???M java flag so I can limit the heap size of my application running on Windows. I need to limit the heap size so I can fill the memory to find out the current free memory. (The code also runs on an embedded system where this is the best met...
{ "language": "en", "url": "https://stackoverflow.com/questions/98098", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: SQL Server Reporting Services shows DTD prohibited in XML document error I am getting the following error when running a reporting services report. Process name: w3wp.exe Account name: NT AUTHORITY\NETWORK SERVICE Exception information: Exception type: XmlException Exception message: For security reasons ...
{ "language": "en", "url": "https://stackoverflow.com/questions/98122", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Why does Javascript getYear() return a three digit number? Why does this javascript return 108 instead of 2008? it gets the day and month correct but not the year? myDate = new Date(); year = myDate.getYear(); year = 108? A: It must return the number of years since the year 1900. A: use date.getFullYear(). This i...
{ "language": "en", "url": "https://stackoverflow.com/questions/98124", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "102" }
Q: Accessing Domain Cookies within an iFrame on Internet Explorer My domain (let's call it www.example.com) creates a cookie. On another site (let's say, www.myspace.com), my domain is loaded within an iFrame. On every browser (Firefox, Opera, Camino, Safari, etc...) except for Internet Explorer, I can access my own co...
{ "language": "en", "url": "https://stackoverflow.com/questions/98127", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "25" }
Q: How can I make Windows software run as a different user within a script? I'm using a build script that calls Wise to create some install files. The problem is that the Wise license only allows it to be run under one particular user account, which is not the same account that my build script will run under. I know Wi...
{ "language": "en", "url": "https://stackoverflow.com/questions/98134", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How do I use Django templates without the rest of Django? I want to use the Django template engine in my (Python) code, but I'm not building a Django-based web site. How do I use it without having a settings.py file (and others) and having to set the DJANGO_SETTINGS_MODULE environment variable? If I run the followi...
{ "language": "en", "url": "https://stackoverflow.com/questions/98135", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "108" }
Q: What's the best hashing algorithm to use on a stl string when using hash_map? I've found the standard hashing function on VS2005 is painfully slow when trying to achieve high performance look ups. What are some good examples of fast and efficient hashing algorithms that should void most collisions? A: That always d...
{ "language": "en", "url": "https://stackoverflow.com/questions/98153", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "49" }
Q: How to get runonce to run, without having to have an administrator login Is there any way to force an update of software using RunOnce, without having an administrator log in, if there is a service running as Administrator running in the background? EDIT: The main thing I want to be able to do is Run when the RunOnc...
{ "language": "en", "url": "https://stackoverflow.com/questions/98163", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: NDepend CQL Count Query I want to query a table of public methods of a specific class and a count of each methods usage in NDepend CQL. Currently query looks like this: SELECT METHODS FROM TYPES "AE.DataAccess.DBHelper" WHERE IsPublic Is it possible to aggregate queries in CQL? A: It looks like the following que...
{ "language": "en", "url": "https://stackoverflow.com/questions/98186", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Firing UI control events from a Unit Test As a beginner to TDD I am trying to write a test that assumes a property has had its value changed on a PropertyGrid (C#, WinForms, .NET 3.5). Changing a property on an object in a property grid does not fire the event (fair enough, as it's a UI raised event, so I can see wh...
{ "language": "en", "url": "https://stackoverflow.com/questions/98196", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: What cross-browser JavaScript libraries exist? I'm gearing up to do some Ajax style client-side JavaScript code in the near future, and I've heard rave reviews of jQuery when it comes to this realm. What I'm wondering is: * *What are all the cross-browser JavaScript libraries out there? What is the experience usi...
{ "language": "en", "url": "https://stackoverflow.com/questions/98205", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: How do you go about validating check boxes in ASP.NET MVC? I am wondering what methods people are using for validating check boxes in ASP.NET MVC (both client and server side). I am using JQuery currently for client side validation but I am curious what methods people are using, ideally with the least amount of fuss...
{ "language": "en", "url": "https://stackoverflow.com/questions/98212", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to know about memory consumption in mysql? how can one know that each process or a thread is consuming how much memory in MYSQL? A: on linux you can also use top|grep mysql to get a running report of the stats of the mysql process, 1 row per top refresh period. A: Assuming you just want just the memory usage o...
{ "language": "en", "url": "https://stackoverflow.com/questions/98223", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: How to list directory content of remote FTP, recursively After downloading files from a remote UNIX FTP server, you want to verify that you have downloaded all the files correctly. Minimal you will get information similar to "dir /s" command in Windows command prompt. The FTP client runs on Windows. A: Do this : ls...
{ "language": "en", "url": "https://stackoverflow.com/questions/98224", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "24" }
Q: Vim macros don't work when using viper + vimpulse in Emacs Any other tweaks for making emacs as vim-like as possible would be appreciated as well. Addendum: The main reason I don't just use vim is that I love how emacs lets you open a file in two different frames [ADDED: sorry, this was confusing: I mean separate wi...
{ "language": "en", "url": "https://stackoverflow.com/questions/98225", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: MIPS Assembly Pointer-to-a Pointer? I think I know how to handle this case, but I just want to make sure I have it right. Say you have the following C code: int myInt = 3; int* myPointer = &myInt; int** mySecondPointer = &myPointer; P contains an address that points to a place in memory which has another address. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/98236", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Post increment operator behavior Possible Duplicate: Pre & post increment operator behavior in C, C++, Java, & C# Here is a test case: void foo(int i, int j) { printf("%d %d", i, j); } ... test = 0; foo(test++, test); I would expect to get a "0 1" output, but I get "0 0" What gives?? A: It's "unspecified beh...
{ "language": "en", "url": "https://stackoverflow.com/questions/98242", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: What's the difference between a "script" and an "application"? I'm referring to distinctions such as in this answer: ...bash isn't for writing applications it's for, well, scripting. So sure, your application might have some housekeeping scripts but don't go writing critical-business-logic.sh because another langua...
{ "language": "en", "url": "https://stackoverflow.com/questions/98268", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "36" }
Q: Is it possible to integrate SSRS reports with webforms Is it possible to integrate SSRS reports to the webforms..an example will be enough to keep me moving. A: Absolutely it is. What you are looking for is the ReportViewer control, located in the Microsoft.Reporting.WebForms assembly. It will allow you to place a...
{ "language": "en", "url": "https://stackoverflow.com/questions/98274", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: MySQL triggers + replication with multiple databases I am running a couple of databases on MySQL 5.0.45 and am trying to get my legacy database to sync with a revised schema, so I can run both side by side. I am doing this by adding triggers to the new database but I am running into problems with replication. My se...
{ "language": "en", "url": "https://stackoverflow.com/questions/98275", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Focus-follows-mouse (plus auto-raise) on Mac OS X (I don't want to hear about how crazy I am to want that! :) Focus-follows-mouse is also known as point-to-focus, pointer focus, and (in some implementations) sloppy focus. [Add other terms that will make this more searchable!] X-mouse A: You can do it for Terminal....
{ "language": "en", "url": "https://stackoverflow.com/questions/98310", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "224" }
Q: Does having many unused beans in a Spring Bean Context waste significant resources? My model layer is being used by a handful of different projects and I'd like to use a single XML Spring Configuration file for the model regardless of which project is using it. My question is: Since not all beans are used in all pro...
{ "language": "en", "url": "https://stackoverflow.com/questions/98320", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: What are the common undefined/unspecified behavior for C that you run into? An example of unspecified behavior in the C language is the order of evaluation of arguments to a function. It might be left to right or right to left, you just don't know. This would affect how foo(c++, c) or foo(++c, c) gets evaluated. Wh...
{ "language": "en", "url": "https://stackoverflow.com/questions/98340", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "75" }
Q: Fastest Gaussian blur implementation How do you implement the fastest possible Gaussian blur algorithm? I am going to implement it in Java, so GPU solutions are ruled out. My application, planetGenesis, is cross platform, so I don't want JNI. A: You probably want the box blur, which is much faster. See this link fo...
{ "language": "en", "url": "https://stackoverflow.com/questions/98359", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "43" }
Q: emulate unix 'cut' using standard windows command line/batch commands Is there a way to emulate the unix cut command on windows XP, without resorting to cygwin or other non-standard windows capabilities? Example: Use tasklist /v, find the specific task by the window title, then extract the PID from that list to pass...
{ "language": "en", "url": "https://stackoverflow.com/questions/98363", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Java .properties file equivalent for Ruby? I need to store some simple properties in a file and access them from Ruby. I absolutely love the .properties file format that is the standard for such things in Java (using the java.util.Properties class)... it is simple, easy to use and easy to read. So, is there a Ruby c...
{ "language": "en", "url": "https://stackoverflow.com/questions/98376", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "28" }
Q: Does such a procedure exist in a Scheme standard and if yes, how is it called? I looked for the name of a procedure, which applies a tree structure of procedures to a tree structure of data, yielding a tree structure of results - all three trees having the same structure. Such a procedure might have the signature:...
{ "language": "en", "url": "https://stackoverflow.com/questions/98394", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How do I examine the configuration of a remote git repository? I've got a git-svn clone of an svn repo, and I want to encourage my colleagues to look at git as an option. The problem is that cloning the repo out of svn takes 3 days, but cloning from my git instance takes 10 minutes. I've got a script that will allow...
{ "language": "en", "url": "https://stackoverflow.com/questions/98400", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How to Refactor to Generics from Class that Inherits from CollectionBase? I am working on an application that is about 250,000 lines of code. I'm currently the only developer working on this application that was originally built in .NET 1.1. Pervasive throughout is a class that inherits from CollectionBase. All d...
{ "language": "en", "url": "https://stackoverflow.com/questions/98426", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to convert an address to a latitude/longitude? How would I go about converting an address or city to a latitude/longitude? Are there commercial outfits I can "rent" this service from? This would be used in a commercial desktop application on a Windows PC with fulltime internet access. A: Try this: http://maps.g...
{ "language": "en", "url": "https://stackoverflow.com/questions/98449", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "75" }
Q: OpenGL: texture and plain color respond differently to ambient light? This is a rather old problem I've had with an OpenGL application. I have a rather complex model, some polygons in it are untextured and colored using a plain color with glColor() and others are textured. Some of the texture is the same color as th...
{ "language": "en", "url": "https://stackoverflow.com/questions/98451", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: What is the optimal VSTF source structure? Are there any best practices? There are a number of other questions related to this topic: * *Whats a good standard code layout for a php application (deleted) *How to structure a java application, in other words: where do I put my classes? *Recommended Source Control ...
{ "language": "en", "url": "https://stackoverflow.com/questions/98454", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Why is there no main() function in vxWorks? When using vxWorks as a development platform, we can't write our application with the standard main() function. Why can't we have a main function? A: Before the 6.0 version VxWorks only supported kernel execution environment for tasks and did not support processes, which...
{ "language": "en", "url": "https://stackoverflow.com/questions/98465", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Problems with sound on a 6265i Nokia using J2ME and Netbeans 6.1 Currently, I have some basic code to play a simple tone whenever a button is pressed in the command item menu. Using: Manager.playTone(note, duration, volume); I also have a blackberry that I'm testing this same midlet on and the sound works fine. So,...
{ "language": "en", "url": "https://stackoverflow.com/questions/98476", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Max value of int in ChucK What is the maximum value of an int in ChucK? Is there a symbolic constant for it? A: New in the latest version! <<<Math.INT_MAX>>>; For reference though, it uses the "long" keyword in C++ to represent integers. So on 32-bit computers the max should be 0x7FFFFFFF, or 2147483647. On 64-bi...
{ "language": "en", "url": "https://stackoverflow.com/questions/98479", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to insert characters to a file using C# I have a huge file, where I have to insert certain characters at a specific location. What is the easiest way to do that in C# without rewriting the whole file again. A: You will probably need to rewrite the file from the point you insert the changes to the end. You might...
{ "language": "en", "url": "https://stackoverflow.com/questions/98484", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: What is the proper way to do a Subversion merge in Eclipse? I'm pretty used to how to do CVS merges in Eclipse, and I'm otherwise happy with the way that both Subclipse and Subversive work with the SVN repository, but I'm not quite sure how to do merges properly. When I do a merge, it seems to want to stick the mer...
{ "language": "en", "url": "https://stackoverflow.com/questions/98489", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: Generating unique account numbers - recursive call Hi i need to generate 9 digit unique account numbers. Here is my pseudocode: function generateAccNo() generate an account number between 100,000,000 and 999,999,999 if the account number already exists in the DB call generateAccNo() /* recursiv...
{ "language": "en", "url": "https://stackoverflow.com/questions/98497", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How do I obtain equipment serial numbers programmatically? I need to run an equipment audit and to do that I need to obtain the Windows PC, monitor etc. serial numbers. So I faced with going to each PC and manually writing down the numbers. Is there a way I can get this programmatically so each user can run a small ...
{ "language": "en", "url": "https://stackoverflow.com/questions/98516", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to parse hex values into a uint? uint color; bool parsedhex = uint.TryParse(TextBox1.Text, out color); //where Text is of the form 0xFF0000 if(parsedhex) //... doesn't work. What am i doing wrong? A: Here is a try-parse style function: private static bool TryParseHex(string hex, out UInt32 result) ...
{ "language": "en", "url": "https://stackoverflow.com/questions/98559", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "85" }
Q: Where can I find the world's fastest atof implementation? I'm looking for an extremely fast atof() implementation on IA32 optimized for US-en locale, ASCII, and non-scientific notation. The windows multithreaded CRT falls down miserably here as it checks for locale changes on every call to isdigit(). Our current b...
{ "language": "en", "url": "https://stackoverflow.com/questions/98586", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: Best AutoHotKey macros? I use AutoHotKey for Windows macros. Most commonly I use it to define hotkeys that start/focus particular apps, and one to send an instant email message into my ToDo list. I also have an emergency one that kills all of my big memory-hogging apps (Outlook, Firefox, etc). So, does anyone have...
{ "language": "en", "url": "https://stackoverflow.com/questions/98597", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "23" }
Q: Favorite Visual Studio keyboard shortcuts What is your favorite Visual Studio keyboard shortcut? I'm always up for leaving my hands on the keyboard and away from the mouse! One per answer please. A: Expand Smart Tag (Resolve Menu): Ctrl + . (period) Expands the tag that shows when you do things like rename an id...
{ "language": "en", "url": "https://stackoverflow.com/questions/98606", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "336" }
Q: How can I get Eclipse to show .* files? By default, Eclipse won't show my .htaccess file that I maintain in my project. It just shows an empty folder in the Package Viewer tree. How can I get it to show up? No obvious preferences. A: In the package explorer, in the upper right corner of the view, there is a litt...
{ "language": "en", "url": "https://stackoverflow.com/questions/98610", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "542" }
Q: Combo Box Item comparison and compiler warnings In VisualStudio (Pro 2008), I have just noticed some inconsistent behaviour and wondered if there was any logical reasoning behind it In a WinForms project, if I use the line if(myComboBox.Items[i] == myObject) I get a compiler warning that I might get 'Possible unint...
{ "language": "en", "url": "https://stackoverflow.com/questions/98622", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Is there any way to change the .NET JIT compiler to favor performance over compile time? I was wondering if there's any way to change the behavior of the .NET JIT compiler, by specifying a preference for more in-depth optimizations. Failing that, it would be nice if it could do some kind of profile-guided optimizat...
{ "language": "en", "url": "https://stackoverflow.com/questions/98624", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: 2d game physics? Can anyone point me to a library for 2D game physics, etc for programming gravity, jumping actions, etc for a 2d platform/sidescrolling game ? Or could you suggest some algorithms for side scroller like mario, sonic etc? A: If all you need is gravity, you can program that yourself in 5 minutes. Fre...
{ "language": "en", "url": "https://stackoverflow.com/questions/98628", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Benefits of learning scheme? I've just started one of my courses, as classes just began 2 weeks ago, and we are learning Scheme right now in one for I assume some reason later on, but so far from what he is teaching is basically how to write in scheme. As I sit here trying to stay awake I'm just trying to grasp why...
{ "language": "en", "url": "https://stackoverflow.com/questions/98641", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "24" }
Q: Best way to detect collision between sprites? Whats the best way to detect collisions in a 2d game sprites? I am currently working in allegro and G++ A: Any decent 2D graphics library will either provide its own collision detection functions for everything from aligned sprites to polygons to pixels, or have one or ...
{ "language": "en", "url": "https://stackoverflow.com/questions/98642", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: What is the strict aliasing rule? When asking about common undefined behavior in C, people sometimes refer to the strict aliasing rule. What are they talking about? A: A typical situation where you encounter strict aliasing problems is when overlaying a struct (like a device/network msg) onto a buffer of the word s...
{ "language": "en", "url": "https://stackoverflow.com/questions/98650", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "953" }
Q: From small to large projects I've been quite used to working on small projects which I coded with 1,000 lines or less (pong, tetris, simple 3d games, etc). However as my abilities in programming are increasing, my organization isn't. I seem to be making everything dependent on one one another, so it's very hard fo...
{ "language": "en", "url": "https://stackoverflow.com/questions/98653", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Scriptaculous not working with the latest Prototype This is a really weird problem that I have been having. When I download Scriptaculous from the official web site, script.aculo.us, bundled in the ZIP is prototype.js version 1.6.0.1. This works perfectly fine, I can follow along the wiki examples and begin learning...
{ "language": "en", "url": "https://stackoverflow.com/questions/98669", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What is the best solution for database connection pooling in python? I have developed some custom DAO-like classes to meet some very specialized requirements for my project that is a server-side process that does not run inside any kind of framework. The solution works great except that every time a new request is...
{ "language": "en", "url": "https://stackoverflow.com/questions/98687", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "39" }
Q: I need a binary comparison tool for Win/Linux First of all, I don't need a textual comparison so Beyond Compare doesn't do what I need. I'm looking for a util that can report on the differences between two files, at the byte level. Bare minimum is the need to see the percentage change in the file, or a report on af...
{ "language": "en", "url": "https://stackoverflow.com/questions/98693", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Design Principles What principles do you generally follow when doing class design? A: Don't forget the Law of Demeter. A: The S.O.L.I.D. principles. Or at least I try not to steer away too much from them. A: The most fundamental design pattern should be KISS (keep it simple stupid) Which means that sometimes not...
{ "language": "en", "url": "https://stackoverflow.com/questions/98695", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: What are the semantics of a const member function? I understand that the function is not allowed to change the state of the object, but I thought I read somewhere that the compiler was allowed to assume that if the function was called with the same arguments, it would return the same value and thus could reuse a cac...
{ "language": "en", "url": "https://stackoverflow.com/questions/98705", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: Suggestions on how to add the functionality to import Finale music files on an application? I'm working on a music writing application and would like to add the functionality to import Finale music files. Right now, the only thing I know is that they are enigma binary files. Does anyone have any suggestions on wh...
{ "language": "en", "url": "https://stackoverflow.com/questions/98711", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: FinalBuilder Enumeration of files and folders What's the best way to enumerate a set of files and folders using FinalBuilder? The context of my question is, I want to compare a source folder with a destination folder, and replace any matching files in the destination folder that are older than the source folder. Any...
{ "language": "en", "url": "https://stackoverflow.com/questions/98722", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Should entities have behavior or not? Should entities have behavior? or not? Why or why not? If not, does that violate Encapsulation? A: If your entities do not have behavior, then you are not writing object-oriented code. If everything is done with getters and setters and no other behavior, you're writing procedur...
{ "language": "en", "url": "https://stackoverflow.com/questions/98739", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Should I impose a maximum length on passwords? I can understand that imposing a minimum length on passwords makes a lot of sense (to save users from themselves), but my bank has a requirement that passwords are between 6 and 8 characters long, and I started wondering... * *Wouldn't this just make it easier for br...
{ "language": "en", "url": "https://stackoverflow.com/questions/98768", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "192" }
Q: How to Naturally/Numerically Sort a DataView? I am wondering how to naturally sort a DataView... I really need help on this. I found articles out there that can do lists with IComparable, but I need to sort the numbers in my dataview. They are currently alpha sorted because they are numbers with 'commas' in them. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/98770", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Preallocating file space in C#? I am creating a downloading application and I wish to preallocate room on the harddrive for the files before they are actually downloaded as they could potentially be rather large, and noone likes to see "This drive is full, please delete some files and try again." So, in that light, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/98774", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "21" }