text
stringlengths
8
267k
meta
dict
Q: Free or open source IBM 3151 or aixterm emulators? Does anyone know of any free or open source terminal emulators that will emulate an IBM 3151 terminal or an HFT terminal (aixterm)? We have some offshore contractors that need access to some of our systems that need a 3151 or hft emulation, but are having issues t...
{ "language": "en", "url": "https://stackoverflow.com/questions/89444", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: CScript/WScript Prevent an error from being blocking Currently, WScript pops up message box when there is a script error. These scripts are called by other processes, and are ran on a server, so there is nobody to dismiss the error box. What I'd like is for the error message to be dumped to STDOUT, and execution to...
{ "language": "en", "url": "https://stackoverflow.com/questions/89465", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How can I ban a whole company from my web site? For reasons I won't go into, I wish to ban an entire company from accessing my web site. Checking the remote hostname in php using gethostbyaddr() works, but this slows down the page load too much. Large organizations (eg. hp.com or microsoft.com) often have blocks of ...
{ "language": "en", "url": "https://stackoverflow.com/questions/89480", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Why isn't the git stash unique per branch? I suppose it allows for moving changes from one branch to the next but that's what cherry picking is for and if you're not making a commit of your changes, perhaps you shouldn't be moving them around? I have on occasion applied the wrong stash at the wrong branch, which lef...
{ "language": "en", "url": "https://stackoverflow.com/questions/89487", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "85" }
Q: Comparing std::tr1::function<> objects I've been trying to implement a C#-like event system in C++ with the tr1 function templates used to store a function that handles the event. I created a vector so that multiple listeners can be attached to this event, i.e.: vector< function<void (int)> > listenerList; I'd li...
{ "language": "en", "url": "https://stackoverflow.com/questions/89488", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Renaming controllers in Rails and cleaning out generated content I was following along with the railscast regarding the restful_authentication plugin. He recommended running the command: script/generate authenticated user session Which I did, and everything generated "fine", but then sessions wouldn't work. Checking...
{ "language": "en", "url": "https://stackoverflow.com/questions/89489", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Annuity or Angle Operation Symbol in LaTeX How do I set the symbol for the angle or annuity operation in LaTeX? Specifically, this is the actuarial a angle s = (1-vs)/i. A: I've looked at Life's Contingency's Package, various Actuarial Outpost forum threads, and the Comprehensive Symbol List for LaTeX, and combined...
{ "language": "en", "url": "https://stackoverflow.com/questions/89490", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: What's the best way to run Wordpress on the same domain as a Rails application? I've got a standard Rails app with Nginx and Mongrel running at http://mydomain. I need to run a Wordpress blog at http://mydomain.com/blog. My preference would be to host the blog in Apache running on either the same server or a separ...
{ "language": "en", "url": "https://stackoverflow.com/questions/89504", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: How to Implement a Redirect on All Requests (on certain conditions)? I want to set something up so that if an Account within my app is disabled, I want all requests to be redirected to a "disabled" message. I've set this up in my ApplicationController: class ApplicationController < ActionController::Base before_fi...
{ "language": "en", "url": "https://stackoverflow.com/questions/89543", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: App_Code folder issues So I'm having a really weird issue with my App_Code folder on a new website I'm designing. I have a basic class inside of a namespace in the App_Code folder. Everything works fine in the IDE when I setup the namespace and make an object from the class. It brings up the class summary on hov...
{ "language": "en", "url": "https://stackoverflow.com/questions/89570", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "30" }
Q: What happens to the time slice if you disable preemption in vxWorks? If you have round robin scheduling enabled in VxWorks, and you use taskLock() to disable preemption, what happens when your timeslice expires? A: When preemption is disabled via taskLock, the timeslice counter will not increment. Your timeslice wi...
{ "language": "en", "url": "https://stackoverflow.com/questions/89575", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do you specify a different port number in SQL Management Studio? I am trying to connect to a Microsoft SQL 2005 server which is not on port 1433. How do I indicate a different port number when connecting to the server using SQL Management Studio? A: 127.0.0.1,6283 Add a comma between the ip and port A: Anothe...
{ "language": "en", "url": "https://stackoverflow.com/questions/89576", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "470" }
Q: Can you reliably set or delete a cookie during the server side processing of an Ajax (XHR) call? I have done a bit of testing on this myself (During the server side processing of a DWR Framework Ajax request handler to be exact) and it seems you CAN successfully manipulate cookies, but this goes against much that I ...
{ "language": "en", "url": "https://stackoverflow.com/questions/89579", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: AssignProcessToJobObject fails with "Access Denied" error when running under the debugger You do AssignProcessToJobObject and it fails with "access denied" but only when you are running in the debugger. Why is this? A: This seems to bite me quite often, and while good, 1800INFORMATION's post doesn't seem to include...
{ "language": "en", "url": "https://stackoverflow.com/questions/89588", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "20" }
Q: How Does The Debugging Option -g Change the Binary Executable? When writing C/C++ code, in order to debug the binary executable the debug option must be enabled on the compiler/linker. In the case of GCC, the option is -g. When the debug option is enabled, how does the affect the binary executable? What additiona...
{ "language": "en", "url": "https://stackoverflow.com/questions/89603", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "82" }
Q: In sql server 2005, how do I change the "schema" of a table without losing any data? I have a table that got into the "db_owner" schema, and I need it in the "dbo" schema. Is there a script or command to run to switch it over? A: In SQL Server Management Studio: * *Right click the table and select modify (it's c...
{ "language": "en", "url": "https://stackoverflow.com/questions/89606", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "75" }
Q: What is a privileged instruction? I have added some code which compiles cleanly and have just received this Windows error: --------------------------- (MonTel Administrator) 2.12.7: MtAdmin.exe - Application Error --------------------------- The exception Privileged instruction. (0xc0000096) occurred in the appli...
{ "language": "en", "url": "https://stackoverflow.com/questions/89607", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "29" }
Q: In a bash script, how do I sanitize user input? I'm looking for the best way to take a simple input: echo -n "Enter a string here: " read -e STRING and clean it up by removing non-alphanumeric characters, lower(case), and replacing spaces with underscores. Does order matter? Is tr the best / only way to go about th...
{ "language": "en", "url": "https://stackoverflow.com/questions/89609", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "52" }
Q: Do anyone do test cases for pojos? Is that needed? A: I write explicit tests for everything except simple getters and setters. If the getter or setter only contains a return blah; or this.blah = blah; I don't think there is much value. The majority of times these are generated and I feel the time putting the tests...
{ "language": "en", "url": "https://stackoverflow.com/questions/89620", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How do you pass arguments to define_method? I would like to pass an argument(s) to a method being defined using define_method, how would I do that? A: With 2.2 you can now use keyword arguments: https://robots.thoughtbot.com/ruby-2-keyword-arguments define_method(:method) do |refresh: false| .......... end A: I...
{ "language": "en", "url": "https://stackoverflow.com/questions/89650", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "165" }
Q: Approve USB device after insertion On Windows, is there any way to programatically approve a USB device after insertion, if it is of a certain type (say Removable Drive) allow its use, otherwise not? Also not to allow running of drivers, only allow usage of the device in an approved way? I.E. We want to allow the i...
{ "language": "en", "url": "https://stackoverflow.com/questions/89663", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How do you remove the default title and body fields in a CCK generated Drupal content-type? When you create a new content type in Drupal using the Content Creation Kit, you automatically get Title and Body fields in the generated form. Is there a way to remove them? A: If you're not a developer (or you want to shor...
{ "language": "en", "url": "https://stackoverflow.com/questions/89672", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How do you connect to a MySQL database using Oracle SQL Developer? I have Oracle SQL Developer already installed and am able to connect to and query Oracle databases. Using Help -> Check for Updates I was able to install the Oracle MySQL Browser extension but there are no connection options for MySQL databases. A: ...
{ "language": "en", "url": "https://stackoverflow.com/questions/89696", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "63" }
Q: Concurrent Prime Generator I'm going through the problems on projecteuler.net to learn how to program in Erlang, and I am having the hardest time creating a prime generator that can create all of the primes below 2 million, in less than a minute. Using the sequential style, I have already written three types of gene...
{ "language": "en", "url": "https://stackoverflow.com/questions/89705", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How to retrieve a resource from within a tWebModule I am trying to extract a gif image embedded as a resource within my ISAPI dll using WebBroker technology. The resource has been added to the DLL using the following RC code: LOGO_GIF RCDATA logo.gif Using resource explorer I verified it is in the DLL properly. us...
{ "language": "en", "url": "https://stackoverflow.com/questions/89708", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Can I display the list of all the system objects (semaphores, queues...) in VxWorks? I would like to know what semaphores, messageQueues, etc... are active in my vxWorks 6.x system. I have access to this information via the debugger, but I would like access to it from the shell. Is there a way? A: VxWorks 6.x provi...
{ "language": "en", "url": "https://stackoverflow.com/questions/89740", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Can I see the currently checked out revision number in Tortoise SVN? I'd like to know what the currently checked out revision number is for a file or directory. Is there a way to do this in TortoiseSVN on Windows ? A: If you are using XP, change your Explorer windows to Details View. Navigate to an SVN-controlled f...
{ "language": "en", "url": "https://stackoverflow.com/questions/89741", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "79" }
Q: Unix Proc Directory I am trying to find the virtual file that contains the current users id. I was told that I could find it in the proc directory, but not quite sure which file. A: You actually want /proc/self/status, which will give you information about the currently executed process. Here is an example: $ cat /...
{ "language": "en", "url": "https://stackoverflow.com/questions/89745", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Hierarchy recordset in ms access How can I get hierarchy recordset in ms access through select statement? A: DAO doesn't support Hierarchical recordsets. You may be able to use ADO in access, but I'm not certain. A: ADO 2.0 support MSDataShape - an OLEDB provider. Check out data shaping at http://microsoft.apress...
{ "language": "en", "url": "https://stackoverflow.com/questions/89752", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Help on Porting a SIP library to PSP I'm currently trying to port a SIP stack library (pjSIP) to the PSP Console (using the PSPSDK toolchain), but I'm having too much trouble with the makefiles (making the proper changes and solving linking issues). Does anyone know a good text, book or something to get some insigh...
{ "language": "en", "url": "https://stackoverflow.com/questions/89767", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Nightly importable or attachable copies of production database We would like to be able to nightly make a copy/backup/snapshot of a production database so that we can import it in the dev environment. We don't want to log ship to the dev environment because it needs to be something we can reset whenever we like to ...
{ "language": "en", "url": "https://stackoverflow.com/questions/89777", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to stop the Visual Studio debugger starting my process in a job object? When I start my process from Visual Studio, it is always created inside a job object. I would like to know how to turn this behaviour off. Any ideas? I expect that it is created in a job object to be debugged. I want to place my program in a...
{ "language": "en", "url": "https://stackoverflow.com/questions/89791", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: Is the YUI Loader Utility reliable? I've been using the YUI Components and want to begin using the Loader Utility to specify my dependencies on my page. From your experience, is the YUI Loader Utility a reliable way to load Javascript dependencies in web pages? A: Yes, YUI Loader is reliable on all A-grade browsers...
{ "language": "en", "url": "https://stackoverflow.com/questions/89796", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How do you find the difference between 2 strings in PHP? I have 2 strings that I'd like to compare, and return the positions of the different characters in the second string. For example, if I have * *"The brown fox jumps over the lazy dog" *"The quick brown fox jumped over the lazy dog" I want it to highlight...
{ "language": "en", "url": "https://stackoverflow.com/questions/89799", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How to reference a custom field in SQL I am using mssql and am having trouble using a subquery. The real query is quite complicated, but it has the same structure as this: select customerName, customerId, ( select count(*) from Purchases where Purchases.customerId=customerData.customerId ) as...
{ "language": "en", "url": "https://stackoverflow.com/questions/89820", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: What are the best Java example sites? What are the best Java example sites? I'm looking for places that you go when you have a specific question and you want a little Java code snippet to solve it with. A: java2s is the best according to me. because - 1) Like mrlinx said "almost always has a sample on common stuff"...
{ "language": "en", "url": "https://stackoverflow.com/questions/89859", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How can I specify the maximum amount of heap an RTP can use in VxWorks? We are creating a Real-Time Process in VxWorks 6.x, and we would like to limit the amount of memory which can be allocated to the heap. How do we do this? A: When creating a RTP via rtpSpawn(), you can specify an environment variable which con...
{ "language": "en", "url": "https://stackoverflow.com/questions/89866", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Date Component Manipulation Is it possible to manipulate the components, such as year, month, day of a date in VBA? I would like a function that, given a day, a month, and a year, returns the corresponding date. A: DateSerial(YEAR, MONTH, DAY) would be what you are looking for. DateSerial(2008, 8, 19) returns 8/1...
{ "language": "en", "url": "https://stackoverflow.com/questions/89873", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How do you get a list of all the installed fonts? Specifically in .NET, but I'm leaving it open. A: http://msdn.microsoft.com/en-us/library/0yf5t4e8.aspx This should help. A: MSDN: Enumerating Installed Fonts A: I believe what you are looking for is InstalledFontCollection. (What were the chances that the ONE pie...
{ "language": "en", "url": "https://stackoverflow.com/questions/89886", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: What are the benefits of the Iterator interface in Java? I just learned about how the Java Collections Framework implements data structures in linked lists. From what I understand, Iterators are a way of traversing through the items in a data structure such as a list. Why is this interface used? Why are the methods ...
{ "language": "en", "url": "https://stackoverflow.com/questions/89891", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "36" }
Q: Best way to find out if an (upcast) instance doesn't implement a particular interface Maybe the need to do this is a 'design smell' but thinking about another question, I was wondering what the cleanest way to implement the inverse of this: foreach(ISomethingable somethingableClass in collectionOfRelatedObjects) { ...
{ "language": "en", "url": "https://stackoverflow.com/questions/89897", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How does has_one :through work? I have three models: class ReleaseItem < ActiveRecord::Base has_many :pack_release_items has_one :pack, :through => :pack_release_items end class Pack < ActiveRecord::Base has_many :pack_release_items has_many :release_items, :through=>:pack_release_items end class PackRelea...
{ "language": "en", "url": "https://stackoverflow.com/questions/89908", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How do I verify that a string only contains letters, numbers, underscores and dashes? I know how to do this if I iterate through all of the characters in the string but I am looking for a more elegant method. A: As an alternative to using regex you could do it in Sets: from sets import Set allowed_chars = Set('012...
{ "language": "en", "url": "https://stackoverflow.com/questions/89909", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "96" }
Q: What time should I build to production? My users use the site pretty equally 24/7. Is there a meme for build timing? International audience, single cluster of servers on eastern time, but gets hit well into the morning, by international clients. 1 db, several web servers, so if no db, simple, whenever. But when the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/89920", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Entity Framework - Can you map the result type of an imported stored procedure to a custom entity type? I already have an entity model in a separate dll that contains various objects that I need to use. I don't really want to create or duplicate entities using the EF designer. Instead I would like to configure it so...
{ "language": "en", "url": "https://stackoverflow.com/questions/89950", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Dependency Injection and Circular reference I am just starting out with DI & unit testing and have hit a snag which I am sure is a no brainer for those more experienced devs : I have a class called MessageManager which receives data and saves it to a db. Within the same assembly (project in Visual Studio) I have cre...
{ "language": "en", "url": "https://stackoverflow.com/questions/89959", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to Naturally Sort a DataView with something like IComparable My DataView is acting funny and it is sorting things alphabetically and I need it to sort things numerically. I have looked all across the web for this one and found many ideas on how to sort it with ICompare, but nothing really solid. So my questions...
{ "language": "en", "url": "https://stackoverflow.com/questions/89987", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Is there a curl/wget option that prevents saving files in case of http errors? I want to download a lot of urls in a script but I do not want to save the ones that lead to HTTP errors. As far as I can tell from the man pages, neither curl or wget provide such functionality. Does anyone know about another downloader ...
{ "language": "en", "url": "https://stackoverflow.com/questions/89989", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "28" }
Q: How to compile a DLL that does not require an external manifest file? I would like to compile a DLL under Visual Studio 2008 that depends on msvcr90.dll as a private assembly (basically I'll dump this DLL into the same directory as my application) without needing an external manifest file. I followed the steps outli...
{ "language": "en", "url": "https://stackoverflow.com/questions/89994", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What is a reasonable code coverage % for unit tests (and why)? If you were to mandate a minimum percentage code-coverage for unit tests, perhaps even as a requirement for committing to a repository, what would it be? Please explain how you arrived at your answer (since if all you did was pick a number, then I could ...
{ "language": "en", "url": "https://stackoverflow.com/questions/90002", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "701" }
Q: Using SQL Server 2005's XQuery select all nodes with a specific attribute value, or with that attribute missing Update: giving a much more thorough example. The first two solutions offered were right along the lines of what I was trying to say not to do. I can't know location, it needs to be able to look at the who...
{ "language": "en", "url": "https://stackoverflow.com/questions/90023", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How can I programmatically determine the capabilities of an optical drive in Win32 I'm trying to create a deployment tool that will install software based on the hardware found on a system. I'd like the tool to be able to determine if the optical drive is a writer (to determine if burning software sould be installed...
{ "language": "en", "url": "https://stackoverflow.com/questions/90029", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Need Lightweight .NET SMTP implementation (assembly or source) I am writing a small application that will receive messages to process over smtp port 25. I am looking for an .NET assembly that I can incorporate that will listen to port 25 and talk SMTP. I invision that when a message arrives some event is triggere...
{ "language": "en", "url": "https://stackoverflow.com/questions/90037", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to stretch an HTML table to 100% of the browser window height? I'm using a table to design the layout of my web page. I want the table to fill the page even if it doesn't contain much content. Here's the CSS I'm using: html, body { height: 100%; margin: 0; padding: 0; } #container { min-height:...
{ "language": "en", "url": "https://stackoverflow.com/questions/90049", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Issue with Regular expressions in python Ok, so i'm working on a regular expression to search out all the header information in a site. I've compiled the regular expression: regex = re.compile(r''' <h[0-9]>\s? (<a[ ]href="[A-Za-z0-9.]*">)?\s? [A-Za-z0-9.,:'"=/?;\s]*\s? [A-Za-z0-9.,:'"=/?;\s]? ''', r...
{ "language": "en", "url": "https://stackoverflow.com/questions/90052", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to make my .NET app support different languages The application I'm writing is almost complete and I'd like people who speak different languages to use it. I'm not sure where to start, what's the difference between globalisation and culture in regards to programming? How does one take uncommon phrases such as "t...
{ "language": "en", "url": "https://stackoverflow.com/questions/90061", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Google's hosted dojox.gfx I'm using the following html to load dojo from Google's hosting. <script src="http://www.google.com/jsapi"></script> <script type="text/javascript">google.load("dojo", "1.1.1");</script> <script type="text/javascript"> dojo.require("dojox.gfx"); ... This errors out on the requre line with ...
{ "language": "en", "url": "https://stackoverflow.com/questions/90067", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How to compare two word documents? Businesses Analyst from my team keeps sending us the updated Requirements documents often and I end up hunting the recent changes by comparing the old version. Is their a good way of comparing the Word documents? Note: We have the track changes option ON, but now the documents loo...
{ "language": "en", "url": "https://stackoverflow.com/questions/90075", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "26" }
Q: Has anyone migrated from Struts 1 to another web framework? On my current project, we've been using Struts 1 for the last few years, and ... ahem ... Struts is showing its age. We're slowly migrating our front-end code to an Ajax client that consumes XML from the servers. I'm wondering if any of you have migrated a ...
{ "language": "en", "url": "https://stackoverflow.com/questions/90078", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Enforce unique rows in MySQL I have a table in MySQL that has 3 fields and I want to enforce uniqueness among two of the fields. Here is the table DDL: CREATE TABLE `CLIENT_NAMES` ( `ID` int(11) NOT NULL auto_increment, `CLIENT_NAME` varchar(500) NOT NULL, `OWNER_ID` int(11) NOT NULL, PRIMARY KEY (`ID`), ) ENGINE=...
{ "language": "en", "url": "https://stackoverflow.com/questions/90092", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: In Classic asp, can I store a database connection in the Session object? Can I store a database connection in the Session object? A: It is generally not recommended to do so, a connection string in the Application variable, with a nice helper function/class is a much preferred method. Here is some reference. (Dead ...
{ "language": "en", "url": "https://stackoverflow.com/questions/90100", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: IIS URL Rewriting vs URL Routing I was planning to use url routing for a Web Forms application. But, after reading some posts, I am not sure if it is an easy approach. Is it better to use the URL Rewrite module for web forms? But, it is only for IIS7. Initially, there was some buzz that URL routing is totally decoup...
{ "language": "en", "url": "https://stackoverflow.com/questions/90112", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "50" }
Q: How do I use .Net Generics to inherit a template parameter? I want to be able to do this. MyInterface interface = new ServiceProxyHelper<ProxyType>(); Here's the object structure MyTypeThatImplementsMyInterface : MyInterface Will this work? public class ProxyType : MyInterface {} public class ServiceProxyHelper<P...
{ "language": "en", "url": "https://stackoverflow.com/questions/90117", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Symlink in windows XP The question is how to make the similar thing like symlink in windows like in *nix. It's really hard to write whole path to the file in console (even using [tab], it's not the way if you need to change language). Adding everything in PATH is tiring too. It'll be great to make a symlink running ...
{ "language": "en", "url": "https://stackoverflow.com/questions/90121", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: http PUT a file to S3 presigned URLs using ruby Anyone got a working example of using ruby to post to a presigned URL on s3 A: I have used aws-sdk and right_aws both. Here is the code to do this. require 'rubygems' require 'aws-sdk' require 'right_aws' require 'net/http' require 'uri' require 'rack' access_key_id...
{ "language": "en", "url": "https://stackoverflow.com/questions/90151", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Integrating with Google Docs Has anyone integrated an "Open in Google Docs" in their web app yet? Gmail has this for opening attachments. How about any other sightings of this in a non-google web app? A: Google Docs does have an API which allows you to search, upload, delete and retrieve documents from the Google D...
{ "language": "en", "url": "https://stackoverflow.com/questions/90160", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Is there a way to compile C++ code to Microsoft .Net CIL (bytecode)? I.e., a web browser client would be written in C++ !!! A: There are a two choices. Managed C++ (/clr:oldSyntax, no longer maintained) or C++/CLI (definitely maintained). You'll want to use /clr:safe for in-browser software, because you wnat the br...
{ "language": "en", "url": "https://stackoverflow.com/questions/90164", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do I create a sql dependency on a table in sql server 2000 and asp.net 2.0? I need to create sql dependency on a table in sql server 2000 in my asp.net 2.0 pages. What are the required actions and what is the best way? Thanks.. A: Microsoft has a great tutorial on this which basically explains that you need to ...
{ "language": "en", "url": "https://stackoverflow.com/questions/90172", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Java: How can I see what parts of my code are running the most? (profiling) I am writing a simple checkers game in Java. When I mouse over the board my processor ramps up to 50% (100% on a core). I would like to find out what part of my code(assuming its my fault) is executing during this. I have tried debugging, b...
{ "language": "en", "url": "https://stackoverflow.com/questions/90176", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Make a div fill the height of the remaining screen space I am working on a web application where I want the content to fill the height of the entire screen. The page has a header, which contains a logo, and account information. This could be an arbitrary height. I want the content div to fill the rest of the page to...
{ "language": "en", "url": "https://stackoverflow.com/questions/90178", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2633" }
Q: Width issue with Ext.Panel bbar in IE 6 I've just run into a display glitch in IE6 with the ExtJS framework. - Hopefully someone can point me in the right direction. In the following example, the bbar for the panel is displayed 2ems narrower than the panel it is attached to (it's left aligned) in IE6, where as in Fi...
{ "language": "en", "url": "https://stackoverflow.com/questions/90181", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Pseudorandom generator in Assembly Language I need a pseudorandom number generator algorithm for a assembler program assigned in a course, and I would prefer a simple algorithm. However, I cannot use an external library. What is a good, simple pseudorandom number generator algorithm for assembly? A: Easy one is to...
{ "language": "en", "url": "https://stackoverflow.com/questions/90184", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Can I merge two Microsoft Word documents reliably with Subversion? We have concurrent edits happening on Word documents and I want to make sure that Subversion can handle merging .doc files. Do you know if Subversion handles merges of Word documents well? A: I would add the svn:needs-lock property to Word documents...
{ "language": "en", "url": "https://stackoverflow.com/questions/90202", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "25" }
Q: What is the difference between gcc optimization levels? What is the difference between different optimization levels in GCC? Assuming I don't care to have any debug hooks, why wouldn't I just use the highest level of optimization available to me? does a higher level of optimization necessarily (i.e. provably) gene...
{ "language": "en", "url": "https://stackoverflow.com/questions/90203", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "24" }
Q: Why would a region of memory be marked non-cached? In an embedded application, we have a table describing the various address ranges that are valid on out target board. This table is used to setup the MMU. The RAM address range is marked as cacheable, but other regions are marked at not cacheable. Why is that? A: A...
{ "language": "en", "url": "https://stackoverflow.com/questions/90204", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: What is the best way to connect remotely to a Mac? I'm trying to remotely control a Macintosh computer. I know that in the Windows world, you can use Remote Desktop to connect from one Windows computer to another Windows computer. This works relatively well. I know that you can use a VNC server but this isn't alwa...
{ "language": "en", "url": "https://stackoverflow.com/questions/90217", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "20" }
Q: What's the syntax for mod in java As an example in pseudocode: if ((a mod 2) == 0) { isEven = true; } else { isEven = false; } A: Since everyone else already gave the answer, I'll add a bit of additional context. % the "modulus" operator is actually performing the remainder operation. The difference betwe...
{ "language": "en", "url": "https://stackoverflow.com/questions/90238", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "250" }
Q: How would I store a date that can be partial (i.e. just the year, maybe the month too) and output it later with the same specifity? I want to let users specify a date that may or may not include a day and month (but will have at least the year.) The problem is when it is stored as a datetime in the DB; the missing d...
{ "language": "en", "url": "https://stackoverflow.com/questions/90246", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How can I segment my Palm OS 68K application? If you have an 68K application written using CodeWarrior for Palm OS, how do you assign individual functions to different segments without manually moving files around in the segment tab in the IDE? A: The CW 68K linkers support this using .seg files added to your proje...
{ "language": "en", "url": "https://stackoverflow.com/questions/90288", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: What languages do date, time, and calendar operations really well? This is probably too much to ask, but is there any language that does a really terrific job of representing time and date operations? I'll grant straight away that it's really hard to write a truly great time library. That said, are there any wides...
{ "language": "en", "url": "https://stackoverflow.com/questions/90308", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Track installs of software Despite my lack of coding knowledge I managed to write a small little app in VB net that a lot of people are now using. Since I made it for free I have no way of knowing how popular it really is and was thinking I could make it ping some sort of online stat counter so I could figure out i...
{ "language": "en", "url": "https://stackoverflow.com/questions/90313", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: switch to parallel coding we all writing code for single processor. i wonder when we all are able to write code on multi processors? what do we need (software tools, logic, algorithms) for this switching? edit: in my view, as we do many task parallely, same way we need to convert those real life solutions(algorithms...
{ "language": "en", "url": "https://stackoverflow.com/questions/90325", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: What's the easiest way to merge (server-side) a collection of PDF documents into one big PDF document in JAVA I have 3 PDF documents that are generated on the fly by a legacy library that we use, and written to disk. What's the easiest way for my JAVA server code to grab these 3 documents and turn them into one long...
{ "language": "en", "url": "https://stackoverflow.com/questions/90350", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: SQL Server sys.databases log_reuse_wait question I was investigating the rapid growth of a SQL Server 2005 transaction log when I found that transaction logs will only truncate correctly - if the sys.databases "log_reuse_wait" column is set to 0 - meaning that nothing is keeping the transaction log from reusing exis...
{ "language": "en", "url": "https://stackoverflow.com/questions/90360", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Getting PHP to read .doc files on Linux I'm trying to read a .doc file into a database so that I can index it's contents. Is there an easy way for PHP on Linux to read .doc files? Failing that is it possible to convert .doc files to rtf, pdf or some other 'open' format that is easy to read? Note, I am not interested...
{ "language": "en", "url": "https://stackoverflow.com/questions/90363", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Is it possible to increase the 256 character limit in excel validation drop down boxes? I am creating the validation dynamically and have hit a 256 character limit. My validation looks something like this: Level 1, Level 2, Level 3, Level 4..... Is there any way to get around the character limit other then pointing...
{ "language": "en", "url": "https://stackoverflow.com/questions/90365", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How to do hierarchical build with rake? I recently started using Rake to build some of my (non-ruby) packages. Rake is nice, but what I found missing is a way to do hierarchical builds (aggregate Rakefiles in subdirectories). Since this is a common feature in most other build tools, I'm wondering if someone more fam...
{ "language": "en", "url": "https://stackoverflow.com/questions/90367", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How do I specify multiple data sets to an XY-scatter plot using the Google Chart API? Why doesn't this Google Chart API URL render both data sets on this XY scatter plot? http://chart.apis.google.com/chart?cht=lxy&chd=t:10,20,30,40,50,60,70,80,90,100,110,120,130,140,150,160,170,180,190,200|0.10,0.23,0.33,0.44,0.56...
{ "language": "en", "url": "https://stackoverflow.com/questions/90374", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to Create PCL file from MS word How to create new PCL file similar to existing MS doc. I have MS doc template and replacing it with actual data. I need to achieve same for PCL format (Create PCL file as template and replacing it with actual value from database and send it to fax). A: * *install a new printer ...
{ "language": "en", "url": "https://stackoverflow.com/questions/90401", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How can I make a systray (notification area) icon receive WM_MOUSEWHEEL messages? I want to extend an existing application I made to make it set mixer volume by wheel-scrolling over it's notification area icon. As far as I know, the notification area doesn't receive any WM_MOUSEWHEEL messages, but still I found an a...
{ "language": "en", "url": "https://stackoverflow.com/questions/90411", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: what is the best/easiest to use encryption library in python I want to encrypt few files using python what is the best way I can use gpg/pgp using any standard/famous python libraries? A: Try KeyCzar Very easy to implement. A: I use GPGme The main strength of GPGme is that it read and writes files at the OpenPGP...
{ "language": "en", "url": "https://stackoverflow.com/questions/90413", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "22" }
Q: Exit Shell Script Based on Process Exit Code I have a shell script that executes a number of commands. How do I make the shell script exit if any of the commands exit with a non-zero exit code? A: "set -e" is probably the easiest way to do this. Just put that before any commands in your program. A: After each comm...
{ "language": "en", "url": "https://stackoverflow.com/questions/90418", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "387" }
Q: What kind of issues are there in implementing realtime multiplayer games I have some experience making multiplayer turn-based games using sockets, but I've never attempted a realtime action game. What kind of extra issues would I have to deal with? Do I need to keep a history of player actions in case lagged players...
{ "language": "en", "url": "https://stackoverflow.com/questions/90423", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: Is there an ldap C/C++ library that provides fail over? I'm looking for an LDAP libracy in C or C++ that allows me to specify a list of LDAP hostnames instead of a single hostname. The library should then use the first one it can connect to in case one or more of the servers is/are down. I'm sure it'd be easy to wra...
{ "language": "en", "url": "https://stackoverflow.com/questions/90428", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How can I know why one of my vxWorks task is pended? In vxWorks, I can issue the "i" command in the shell, and I get the list of tasks in my system along with some information like the following example: NAME ENTRY TID PRI STATUS PC SP ERRNO DELAY ---------- ------------ ------...
{ "language": "en", "url": "https://stackoverflow.com/questions/90433", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Why would one use REST instead of SOAP based services? Attended an interesting demo on REST today, however, I couldn't think of a single reason (nor was one presented) why REST is in anyway better or simpler to use and implement than a SOAP based Services stack. What are some of the reasons Why anyone in the "real w...
{ "language": "en", "url": "https://stackoverflow.com/questions/90451", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "153" }
Q: CPU serial number How do I obtain the serial number of the CPU in a PC? A: Remember that most computers these days ship with CPU ID disabled in the BIOS. See CPUID on Wikipedia A: There is no CPU serial ID (PSN; CPUID edx bit 18 "psn" Processor Serial Number) after Pentium III in Intel CPUs; and there was never a...
{ "language": "en", "url": "https://stackoverflow.com/questions/90462", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: Loading .Net Fx query I have built a simple C#.Net app on a M/C with only .Net FX 1.1 present. Now when I execute this app on a M/C where there is : Case 1) Only .Net fx 2.0 is installed Case 2) Both .Net Fx 1.1 amd 2.0 are installed How is it determined to load the appropriate .Net framework in the above case...
{ "language": "en", "url": "https://stackoverflow.com/questions/90476", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: long to HWND (VS8 C++) How can I cast long to HWND (C++ visual studio 8)? Long lWindowHandler; HWND oHwnd = (HWND)lWindowHandler; But I got the following warning: warning C4312: 'type cast' : conversion from 'LONG' to 'HWND' of greater size Thanks. A: HWND is a handle to a window. This type is declared in WinDef...
{ "language": "en", "url": "https://stackoverflow.com/questions/90493", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Game Development Sound Frameworks I'm working with a team that's building an engine for a variety of 2D and eventually 3D mini-games. The problem we're facing is a solid, cross-platform, sound API. Obviously, DirectX is out of the question due to our needs for cross-platform capabilities. SDL is nice, and works grea...
{ "language": "en", "url": "https://stackoverflow.com/questions/90503", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }