text
stringlengths
8
267k
meta
dict
Q: Which browsers support page break manipulation using CSS and the page-break-inside element? I'm trying to use the page-break-inside CSS directive, the class of which is to be attached to a div tag or a table tag (I think this may only work on block elements, in which case it would have to be the table). I've tried a...
{ "language": "en", "url": "https://stackoverflow.com/questions/117772", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: Decipher database schema I've recently inherited the job of maintaining a database that wasn't designed very well and the designers aren't available to ask any questions. And I have a couple more coming my way in the near future. It's been tough trying to figure out the relationships between the tables without any ...
{ "language": "en", "url": "https://stackoverflow.com/questions/117774", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Loading an existing database into WWW SQL Designer? I've used WWW SQL Designer several times to design databases for applications. I'm now in charge of working on an application with a lot of tables (100+ mysql tables) and I would love to be able to look at the relations between tables in a manner similar to what WW...
{ "language": "en", "url": "https://stackoverflow.com/questions/117776", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Best method for storing this pointer for use in WndProc I'm interested to know the best / common way of storing a this pointer for use in the WndProc. I know of several approaches, but each as I understand it have their own drawbacks. My questions are: What different ways are there of producing this kind of code: CW...
{ "language": "en", "url": "https://stackoverflow.com/questions/117792", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "36" }
Q: How to get Django AutoFields to start at a higher number For our Django App, we'd like to get an AutoField to start at a number other than 1. There doesn't seem to be an obvious way to do this. Any ideas? A: A quick peek at the source shows that there doesn't seem to be any option for this, probably because it do...
{ "language": "en", "url": "https://stackoverflow.com/questions/117800", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "27" }
Q: Upload files directly to Amazon S3 from ASP.NET application My ASP.NET MVC application will take a lot of bandwidth and storage space. How can I setup an ASP.NET upload page so the file the user uploaded will go straight to Amazon S3 without using my web server's storage and bandwidth? A: If you need to upload larg...
{ "language": "en", "url": "https://stackoverflow.com/questions/117810", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "28" }
Q: Alternate FizzBuzz Questions Anybody have any good FizzBuzz type questions that are not the FizzBuzz problem? I am interviewing someone and FB is relatively well known and not that hard to memorize, so my first stop in a search for ideas is my new addiction SO. A: Fibonacci, reverse a string, count number of bits s...
{ "language": "en", "url": "https://stackoverflow.com/questions/117812", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "96" }
Q: Converting string of 1s and 0s into binary value I'm trying to convert an incoming sting of 1s and 0s from stdin into their respective binary values (where a string such as "11110111" would be converted to 0xF7). This seems pretty trivial but I don't want to reinvent the wheel so I'm wondering if there's anything in...
{ "language": "en", "url": "https://stackoverflow.com/questions/117844", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "23" }
Q: How can I determine the current focused process name and version in C# For example if I'm working on Visual Studio 2008, I want the values devenv and 2008 or 9. The version number is very important... A: This is going to be PInvoke city... You'll need to PInvoke the following API's in User32.dll Win32::GetForegroun...
{ "language": "en", "url": "https://stackoverflow.com/questions/117851", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Upload files directly to Amazon S3 from ASP.NET application Possible Duplicate: Upload files directly to Amazon S3 from ASP.NET application My ASP.NET MVC application will take a lot of bandwidth and storage space. How can I setup an ASP.NET upload page so the file the user uploaded will go straight to Amazon S3 ...
{ "language": "en", "url": "https://stackoverflow.com/questions/117857", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Testing your code for speed? I'm a total newbie, but I was writing a little program that worked on strings in C# and I noticed that if I did a few things differently, the code executed significantly faster. So it had me wondering, how do you go about clocking your code's execution speed? Are there any (free)utilitie...
{ "language": "en", "url": "https://stackoverflow.com/questions/117864", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: How do I unload a externally loaded SWF file from a SWFLoader component in Adobe Flex? I have an application that loads external SWF files and plays them inside a Adobe Flex / Air application via the SWFLoader Flex component. I have been trying to find a way to unload them from a button click event. I have Google'd ...
{ "language": "en", "url": "https://stackoverflow.com/questions/117900", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How should your company sponsor programming certification Say your company is willing to sponsor the fees for taking programming certification examination. What is the best aproach to implement this? I would say if the programmer passes the exam at the first try, it shoud be fully sponsored. If the programmer doesn...
{ "language": "en", "url": "https://stackoverflow.com/questions/117907", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How do I open Office 2007 files stored on a website? I have a website where people can upload documents, and view them later at their convenience. I store the binary info along with the mime type in my db, and later just stream the binary content straight to the browser. This works for for every file type except Off...
{ "language": "en", "url": "https://stackoverflow.com/questions/117920", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to version control the build tools and libraries? What are the recommendations for including your compiler, libraries, and other tools in your source control system itself? In the past, I've run into issues where, although we had all the source code, building an old version of the product was an exercise in scur...
{ "language": "en", "url": "https://stackoverflow.com/questions/117930", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: apache mod_rewrite one rule for any number of possibilities I'm building a fairly large website and my .htaccess is starting to feel a bit bloated, is there a way of replacing my current system of - one rule for each of the possibile number of vars that could be passed, to one catch all expression that can account f...
{ "language": "en", "url": "https://stackoverflow.com/questions/117931", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Best practice for translating exceptions in C++/CLI wrapper class I am writing a .NET wrapper class for an existing native class which throws exceptions. What are the best practices for translating between native C++ exceptions and Managed exceptions? Catch and re-throw on a one-to-one basis (e.g. std::invalid_argum...
{ "language": "en", "url": "https://stackoverflow.com/questions/117940", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: TinyOS CC2420ReceiveP I want to hold onto packets that fail the crc check. To do this I have commented out a section of the CC2420RecieveP readDone function that checks the msb bit of the LQI byte in the received buffer. I think this is working, However, once I receive the packet in my own receive function I send it...
{ "language": "en", "url": "https://stackoverflow.com/questions/117942", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What Could Affect Values Returned By Serialport.Read() I've written a simple app in C# 2.0 using the .Net Framework 2.0 Serialport class to communicate with a controller card via COM1. A problem occurred recently were the bytes returned by the Read method are incorrect. It returned the right amount of bytes, only t...
{ "language": "en", "url": "https://stackoverflow.com/questions/117945", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Transact-SQL - sub query or left-join? I have two tables containing Tasks and Notes, and want to retrieve a list of tasks with the number of associated notes for each one. These two queries do the job: select t.TaskId, (select count(n.TaskNoteId) from TaskNote n where n.TaskId = t.TaskId) 'Notes' from Task ...
{ "language": "en", "url": "https://stackoverflow.com/questions/117952", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: SOAP or REST based Geotargetting service? Is anyone aware of a (preferablly free) webservice that would accept a SOAP or REST request. This request would contain an IP address, and the service would return an approximation of that IP's location. EDIT: I need resolution down to the city of possible. A: MaxMind do a ...
{ "language": "en", "url": "https://stackoverflow.com/questions/117954", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to refactor in a branch without losing my mind? I refactor my and other people's code all the time. When I work in a branch and not in Trunk, this sometimes results in some extremely painful merges, especially if I don't merge back to Trunk regularly (the code at the branch slowly shifts away from the Trunc, and...
{ "language": "en", "url": "https://stackoverflow.com/questions/117960", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: What is a simple and efficient way to find rows with time-interval overlaps in SQL? I have two tables, both with start time and end time fields. I need to find, for each row in the first table, all of the rows in the second table where the time intervals intersect. For example: <-----row 1 interval-------...
{ "language": "en", "url": "https://stackoverflow.com/questions/117962", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "38" }
Q: Best practices for withstanding launch day traffic burst We are working on a website for a client that (for once) is expected to get a fair amount of traffic on day one. There are press releases, people are blogging about it, etc. I am a little concerned that we're going to fall flat on our face on day one. What are...
{ "language": "en", "url": "https://stackoverflow.com/questions/117966", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: What is the OleDb equivalent for INFORMATION_SCHEMA In SQL you can use SELECT * FROM INFORMATION_SCHEMA.TABLES etc to get information about the database structure. I need to know how to achieve the same thing for an Access database. A: The equivalent operation can be accomplished using OleDbConnection.GetOleDbSc...
{ "language": "en", "url": "https://stackoverflow.com/questions/117974", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Debug/Monitor middleware for python wsgi applications I'm searching a wsgi middleware which I can warp around a wsgi applications and which lets me monitor incoming and outgoing http requests and header fields. Something like firefox live headers, but for the server side. A: That shouldn't be too hard to write your...
{ "language": "en", "url": "https://stackoverflow.com/questions/117986", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Best text search engine for integrating with custom web app? We have a web app that allows users to upload documents, create their own documents, and so on. Uploaded files are stored on Amazon S3, created information is stored in a MySQL database. What I'm looking for is some sort of search engine, where I feed it a...
{ "language": "en", "url": "https://stackoverflow.com/questions/117987", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Does anyone work with Function Points? Some questions about Function Points: 1) Is it a reasonably precise way to do estimates? (I'm not unreasonable here, but just want to know compared to other estimation methods) 2) And is the effort required worth the benefit you get out of it? 3) Which type of Function Point...
{ "language": "en", "url": "https://stackoverflow.com/questions/118023", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: Web Site Compliance with the Americans with Disabilities Act (ADA) Are there any automatic, online or off, tools for testing xhtml/css for compliance with screen readers and other visual guidelines of the Americans with Disabilities Act (ADA)? A: No automated tool can tell you whether a website is accessible. Ther...
{ "language": "en", "url": "https://stackoverflow.com/questions/118038", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Question about object-orientation I had this questions since the time I learnt about object-oriented programming. Now, I have got a wonderful forum I thought of asking this. Lets say we are implementing an employee management application using EJB. Now, there are 2 ways of doing this. * *Normally, we create entit...
{ "language": "en", "url": "https://stackoverflow.com/questions/118040", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Can you host multiple tenants on a single ASP.NET application instance over SSL? I have an ASP.NET application that will host multiple tenants (Software-as-a-Service style). Each tenant will have their own domain name (www.mydomain.com, www.yourdomain.com) and their own SSL certificate. Is there a way to host the ap...
{ "language": "en", "url": "https://stackoverflow.com/questions/118042", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Can you use Silverlight with AJAX without any UI element? I know you can just use CSS to hide the DIV or Silverlight Plugin, but is there a way to instantiate a Silverlight Component/App using JavaScript that doesn't show any UI element at all? There is alot of great functionality in Silverlight, like MultiThreading...
{ "language": "en", "url": "https://stackoverflow.com/questions/118043", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: C# grid binding not update I have a grid that is binded to a collection. For some reason that I do not know, now when I do some action in the grid, the grid doesn't update. Situation : When I click a button in the grid, it increase a value that is in the same line. When I click, I can debug and see the value increme...
{ "language": "en", "url": "https://stackoverflow.com/questions/118051", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Does anyone have an example of a User Interface for creating a SQL Where clause? I'm having trouble trying to map nested conditions onto an intuitive interface. eg. How would you represent ((Condition1 AND Condition2) OR (Condition1 AND Condition5)) AND Condition4 A: Here's a screenshot of prototype I did for a li...
{ "language": "en", "url": "https://stackoverflow.com/questions/118054", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How do you design a website to make the best use of ads? Is anyone aware of general UI design guidelines for increasing ad revenue from web ads? Obviously many SO users use adblock, and probably find this type of question reprehensible, but I believe that it is possible to integrate advertising (and other revenue st...
{ "language": "en", "url": "https://stackoverflow.com/questions/118062", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Managing user stories for a large project We are just starting on a pretty big project with lots of sub projects. we don't currently use any kind of named process but I am hoping to get some kind of agile/scrumlike process in by the back door. The area I will be focusing on most is having a good backlog for the whol...
{ "language": "en", "url": "https://stackoverflow.com/questions/118064", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: Why doesn't GCC optimize structs? Systems demand that certain primitives be aligned to certain points within the memory (ints to bytes that are multiples of 4, shorts to bytes that are multiples of 2, etc.). Of course, these can be optimized to waste the least space in padding. My question is why doesn't GCC do thi...
{ "language": "en", "url": "https://stackoverflow.com/questions/118068", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "51" }
Q: How can I add custom markup to TWiki? At a previous place where I worked a colleague figured out how to configure MediaWiki so that, for example, a string like #12345 in the wiki markup could be expanded into a hypertext link to ticket 12345 in the ticket system. I would like to do something similar in TWiki. I hav...
{ "language": "en", "url": "https://stackoverflow.com/questions/118073", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What name do you give the MSBuild project build file? I am trying to learn how to use MSBuild so we can use it to build our project. There's what seems to be a very big hole in the documentation, and I find the hole everywhere I look, the hole being how do you name or otherwise designate the MSBuild project file? ...
{ "language": "en", "url": "https://stackoverflow.com/questions/118091", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Replace one URL with another In PHP, replace one URL with another within a string e.g. New post on the site <a href="http://stackoverflow.com/xyz1">http://stackoverflow.com/xyz1</a></p> becomes: New post on the site <a href="http://yahoo.com/abc1">http://yahoo.com/abc1</a></p> Must work for repeating strings as a...
{ "language": "en", "url": "https://stackoverflow.com/questions/118092", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How can i parse a comma delimited string into a list (caveat)? I need to be able to take a string like: '''foo, bar, "one, two", three four''' into: ['foo', 'bar', 'one, two', 'three four'] I have an feeling (with hints from #python) that the solution is going to involve the shlex module. A: You may also want to ...
{ "language": "en", "url": "https://stackoverflow.com/questions/118096", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "24" }
Q: What tool do you use to do burndown charts? do you use a tool? or just manually make them? A: We tend to just use a simple shared excel sheet with a graph on one tab and a pivot table on another. A: I have not used myself, but http://apps.vanpuffelen.net/charts/burndown.jsp presents an api that is even simpler th...
{ "language": "en", "url": "https://stackoverflow.com/questions/118100", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: How do I totally disable caching in nHibernate? How do I totally disable caching in nHibernate? A: Note IStatelessSession is I think new in Nhibernate 2.0 second level cache configuration details : Chapter 25. NHibernate.Caches A: Use the IStatelessSession to bypass the first level cache: http://darioquintana.com....
{ "language": "en", "url": "https://stackoverflow.com/questions/118108", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: Tips for avoiding big ball of mud with ASP.NET WebForms Although ASP.NET MVC seems to have all the hype these days, WebForms are still quite pervasive. How do you keep your project sane? Let's collect some tips here. A: I generally try to stay clear of it... but when i do use WebForms, i follow these precepts: ...
{ "language": "en", "url": "https://stackoverflow.com/questions/118126", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: C# - Why won't a fullscreen winform app ALWAYS cover the taskbar? I'm using Windows Vista and C#.net 3.5, but I had my friend run the program on XP and has the same problem. So I have a C# program that I have running in the background with an icon in the SystemTray. I have a low level keyboard hook so when I press ...
{ "language": "en", "url": "https://stackoverflow.com/questions/118130", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "23" }
Q: How do I develop and create a self-contained PyGTK application bundle for MacOS, with native-looking widgets? I have read that it is possible to build GTK+ on MacOS X. I know that it's possible to create a bundle of a GTK+ application on MacOS. I also know that it's possible to create widgets that look sort of nat...
{ "language": "en", "url": "https://stackoverflow.com/questions/118138", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: What exactly is Parrot? I understand that Parrot is a virtual machine, but I feel like I'm not completely grasping the idea behind it. As I understand, it's a virtual machine that's being made to handle multiple languages. Is this correct? What are the advantages of using a virtual machine instead of just an inte...
{ "language": "en", "url": "https://stackoverflow.com/questions/118141", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "26" }
Q: Python Regex vs PHP Regex Not a competition, it is instead me trying to find why a certain regex works in one but not the other. (25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?) That's my Regex and I'm tryi...
{ "language": "en", "url": "https://stackoverflow.com/questions/118143", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: What's the most efficient way to select the last n rows in a table without changing the table's structure? What's the most efficient way to select the last n number of rows in a table using mySQL? The table contains millions of rows, and at any given time I don't know how large the table is (it is constantly growing...
{ "language": "en", "url": "https://stackoverflow.com/questions/118144", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: Best way to rotate content within a DIV using JavaScript? For example, see the MySQL website. It's only going to be used to rotate through about 3-5 "ads" to noteworthy areas of the site. I'd like to have some kind of link control to backtrack to the other content (again, like the MySQL site). Google gives me a bunc...
{ "language": "en", "url": "https://stackoverflow.com/questions/118151", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How can I detect and invoke a user's local installation of the AIR runtime on a particular AIR application? I am writing a program that has an AIR front-end, but a back-end written in another language (Python, in this case). Since AIR can't invoke other executables, the relationship has to be the other way around, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/118157", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Tips on helping to move to MS SQL from MySQL I have been interested in database developing for some time now and decided that MS SQL has a lot to offer in terms of T-SQL and generally much more functionality (not saying that Oracle or Postgres don't have that). I would like to know: * *What are the big paradigm...
{ "language": "en", "url": "https://stackoverflow.com/questions/118185", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I ignore ampersands in a SQL script running from SQL Plus? I have a SQL script that creates a package with a comment containing an ampersand (&). When I run the script from SQL Plus, I am prompted to enter a substitute value for the string starting with &. How do I disable this feature so that SQL Plus ignore...
{ "language": "en", "url": "https://stackoverflow.com/questions/118190", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "118" }
Q: Getting Socket closed error when a remoting exception is thrown on the server I have an app that is built using .Net remoting. When authenticating, If there is an error, I threw an exception on the server. The exception is serializable. But when the exception is thrown on the server, Sometimes I see an error on the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/118192", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: C++ Thread, shared data I have an application where 2 threads are running... Is there any certanty that when I change a global variable from one thread, the other will notice this change? I don't have any syncronization or Mutual exclusion system in place... but should this code work all the time (imagine a global ...
{ "language": "en", "url": "https://stackoverflow.com/questions/118199", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "30" }
Q: How to "Open in New Window" using WebBrowser control? When you use the WebBrowser control in .NET you can "embed" an instance of IE in your application, essentially making your own IE-based Web Browser. Does anyone know how to make any new windows created (like when the user selects "Open in New Window" from the con...
{ "language": "en", "url": "https://stackoverflow.com/questions/118203", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How can I publish a subversion repository to a local IIS? At work, we have a windows server 2003 with IIS and Subversion installed. We use it to publish and test locally our ASP.NET websites. Every programmer has Tortoise installed on his PC and can update/commit content to the server. Hosting the repositories is w...
{ "language": "en", "url": "https://stackoverflow.com/questions/118205", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: What's the best dispatcher/callback library in Python? I need to allow other Python applications to register callback functions for events in my application. These need to have priorities associated with them (so a callback with a priority of 10 runs before a callback with a priority of 1) and callback functions ne...
{ "language": "en", "url": "https://stackoverflow.com/questions/118221", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do I use SCM with a PHP app such as Wordpress? I run my blog using Wordpress and all too recently became a big believer in SCM. I really want to put my site into subversion (that's what I'm using right now, maybe git will come later) but I can't think of the correct way to do it yet. Basically, my repository i...
{ "language": "en", "url": "https://stackoverflow.com/questions/118235", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Calculate text width with JavaScript I'd like to use JavaScript to calculate the width of a string. Is this possible without having to use a monospace typeface? If it's not built-in, my only idea is to create a table of widths for each character, but this is pretty unreasonable especially supporting Unicode and diff...
{ "language": "en", "url": "https://stackoverflow.com/questions/118241", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "579" }
Q: Open multiple Eclipse workspaces on the Mac How can I open multiple Eclipse workspaces at the same time on the Mac? On other platforms, I can just launch extra Eclipse instances, but the Mac will not let me open the same application twice. Is there a better way than keeping two copies of Eclipse? A: 2018 Update sin...
{ "language": "en", "url": "https://stackoverflow.com/questions/118243", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "202" }
Q: What's the best way to implement ACLs to a Rails application? I just wanted to compare different solutions used when implementing ACLs in Rails. A: I use the authorization plugin (Created by Bill Katz): Roles can be authorized for the entire application, a model class, or a specific object. The plugin provides a w...
{ "language": "en", "url": "https://stackoverflow.com/questions/118247", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Good .NET ORM Framework that supports OleDb and Stored Procedures? A typical stored procedure in our system accepts around 20 or so parameters. There's no chance of refactoring these stored procedures either. I've basically resorted to writing my own code generator that wraps these SP's into (database provider agn...
{ "language": "en", "url": "https://stackoverflow.com/questions/118248", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to start IDLE (Python editor) without using the shortcut on Windows Vista? I'm trying to teach Komodo to fire up IDLE when I hit the right keystrokes. I can use the exact path of the shortcut in start menu in the Windows Explorer location bar to launch IDLE so I was hoping Komodo would be able to use it as well...
{ "language": "en", "url": "https://stackoverflow.com/questions/118260", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "50" }
Q: Long-running code within asp.net process E.g. we this code in the asp.net form codebihind: private void btnSendEmails_OnClick() { Send100000EmailsAndWaitForReplies(); } This code execution will be killed by the timeout reason. For resolving the problem I'd like to see something like this: private void btnSendEm...
{ "language": "en", "url": "https://stackoverflow.com/questions/118261", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Best way to manipulate pages while embedding Webkit? I'm using Webkit-sharp to embed Webkit into an application and I need to hook certain links to perform actions in my app rather than their normal action. I've considered using Javascript to iterate over the anchor tags and replace the ones that match with the prop...
{ "language": "en", "url": "https://stackoverflow.com/questions/118270", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do you resolve a circular dependency with an inner class? (Java question) If I reference a field in an inner class, does this cause a circular dependency between the enclosing class and the inner class? How can I avoid this? Here is an example: public class Outer { private Other o; private Inner i; ...
{ "language": "en", "url": "https://stackoverflow.com/questions/118272", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Trying to resize a jQuery dialog in IE6? I thought I had seen a bug report about this on the jQuery site, but now I cannot find it. I'm trying to resize a dialog in IE6. But when the element is resized, the content and title bar don't resize down. They will resize up if the dialog is made larger, however. The result...
{ "language": "en", "url": "https://stackoverflow.com/questions/118280", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How do I parse a string with GetOpt::Long::GetOptions? I have a string with possible command line arguments (using an Read-Eval-Print-Loop program) and I want it to be parsed similar to the command line arguments when passed to Getopt::Long. To elaborate: I have a string $str = '--infile /tmp/infile_location --outfi...
{ "language": "en", "url": "https://stackoverflow.com/questions/118289", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Alternative to String.Replace So I was writing some code today that basically looks like this: string returnString = s.Replace("!", " ") .Replace("@", " ") .Replace("#", " ") .Replace("$", " ") .Replace("%", " ") .Replace("^", " ") .Replace("*",...
{ "language": "en", "url": "https://stackoverflow.com/questions/118292", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: Convert a UTF-8 string to/from 7-bit XML in PHP How can UTF-8 strings (i.e. 8-bit string) be converted to/from XML-compatible 7-bit strings (i.e. printable ASCII with numeric entities)? i.e. an encode() function such that: encode("“£”") -> "&#8220;&#163;&#8221;" decode() would also be useful: decode("&#8220;&#163;&...
{ "language": "en", "url": "https://stackoverflow.com/questions/118305", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: A way to determine a process's "real" memory usage, i.e. private dirty RSS? Tools like 'ps' and 'top' report various kinds of memory usages, such as the VM size and the Resident Set Size. However, none of those are the "real" memory usage: * *Program code is shared between multiple instances of the same program. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/118307", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "60" }
Q: ASP.NET TextBox control with label text in the background I'm creating a login page. I want to create ASP.NET TextBox controls that have "Username" and "Password" as their Text, but as soon as they receive focus, these words should disappear and whatever the user types should appear, just like normal textbox. If the...
{ "language": "en", "url": "https://stackoverflow.com/questions/118320", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How to debug a LINQ Statement I have a Linq to objects statement var confirm = from l in lines.Lines where (l.LineNumber == startline.LineNumber) || (l.LineNumber == endline.LineNumber) select l; The confirm object is returning an 'Object Null or Not A Reference' at at System.Linq.Enumerable.WhereListIterator`...
{ "language": "en", "url": "https://stackoverflow.com/questions/118341", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "42" }
Q: How to search cvs comment history I am aware of this command: cvs log -N -w<userid> -d"1 day ago" Unfortunately this generates a formatted report with lots of newlines in it, such that the file-path, the file-version, and the comment-text are all on separate lines. Therefore it is difficult to scan it for all occurr...
{ "language": "en", "url": "https://stackoverflow.com/questions/118342", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: How do I automatically update a ModifiedAt field with ADO.NET Entity Framework? Ruby on Rails has magic timestamping fields that are automatically updated when a record is created or updated. I'm trying to find similar functionality in Entity Framework. I've considered database triggers and a SavingChanges event han...
{ "language": "en", "url": "https://stackoverflow.com/questions/118343", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How can I extend msbuild to run a custom preprocessor on .cs files? I have a custom program which preprocesses a C# file and generates a new C# file as output. I would like to invoke this from msbuild on each of the C# files in the project, then compile the output files instead of the original C# files. How would I ...
{ "language": "en", "url": "https://stackoverflow.com/questions/118356", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: User Interface for creating Oracle SQL Loader control file Is there a good user interface for authoring Oracle SQL Loader control files? PL/SQL Developer includes a "Text Importer" feature (that reminds one of the Excel import wizard) to import text files into tables, but uses a proprietary format instead of the SQL...
{ "language": "en", "url": "https://stackoverflow.com/questions/118367", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How do you use the ellipsis slicing syntax in Python? This came up in Hidden features of Python, but I can't see good documentation or examples that explain how the feature works. A: This is another use for Ellipsis, which has nothing to do with slices: I often use it in intra-thread communication with queues, as ...
{ "language": "en", "url": "https://stackoverflow.com/questions/118370", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "201" }
Q: How do you ensure multiple threads can safely access a class field? When a class field is accessed via a getter method by multiple threads, how do you maintain thread safety? Is the synchronized keyword sufficient? Is this safe: public class SomeClass { private int val; public synchronized int getVal() { ...
{ "language": "en", "url": "https://stackoverflow.com/questions/118371", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: What techniques do you use when writing your own cryptography methods? For years, maybe 10, I've been fascinated with cryptography. I read a book about XOR bit-based encryption, and have been hooked ever since thing. I guess it's more fair to say that I'm fascinated by those who can break various encryption methods,...
{ "language": "en", "url": "https://stackoverflow.com/questions/118374", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: Why is my Drupal site logging out users when a Javascript function is called? I have Drupal 5 site where a button is clicked and it calls a JavaScript function. The function basically builds a string, and then redirects to another page on our site. After clicking the button, sometimes the user gets logged out and se...
{ "language": "en", "url": "https://stackoverflow.com/questions/118391", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to prevent multiple classes for the same business object? A lot of the time I will have a Business object that has a property for a user index or a set of indexes for some data. When I display this object in a form or some other view I need the users full name or some of the other properties of the data. Usually...
{ "language": "en", "url": "https://stackoverflow.com/questions/118401", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I get apache to forward web service requests to tomcat? I know websphere does it, so there must be something that lets apache figure out what needs to go to the app server and what it can handle itself. A: You have two options. You can use mod_jk or mod_proxy_ajp to forward your requests. I generally use mod...
{ "language": "en", "url": "https://stackoverflow.com/questions/118404", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Datetime timezone adjustments My database is located in e.g. california. My user table has all the user's timezone e.g. -0700 UTC How can I adjust the time from my database server whenever I display a date to the user who lives in e.g. new york? UTC/GMT -4 hours A: You should store your data in UTC format and sho...
{ "language": "en", "url": "https://stackoverflow.com/questions/118415", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Set up Apache for local development/testing? I've been impressed by the screencasts for Rails that demonstrate the built-in web server, and database to allow development and testing to occur on the local machine. How can I get an instance of Apache to execute a project directory as its DocumentRoot, and maybe serve ...
{ "language": "en", "url": "https://stackoverflow.com/questions/118423", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: Selecting values grouped to a specific identifer I have an application that tracks high scores in a game. I have a user_scores table that maps a user_id to a score. I need to return the 5 highest scores, but only 1 high score for any specific user. So if user X has the 5 highest scores on a purely numerical basis, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/118443", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How can I join a list into a string (caveat)? Along the lines of my previous question, how can i join a list of strings into a string such that values get quoted cleanly. Something like: ['a', 'one "two" three', 'foo, bar', """both"'"""] into: a, 'one "two" three', "foo, bar", "both\"'" I suspect that the csv modu...
{ "language": "en", "url": "https://stackoverflow.com/questions/118458", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: What is the performance difference of pki to symmetric encryption? We are looking to do some heavy security requirements on our project, and we need to do a lot of encryption that is highly performant. I think that I know that PKI is much slower and more complex than symmetric encryption, but I can't find the number...
{ "language": "en", "url": "https://stackoverflow.com/questions/118463", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: Tool to monitor network connectivity in Windows What tool would you recommend to monitor the connectivity status of a machine, this is if a given machine it is able to connect to some web servers over time. It should be able to log the status. There is a long list of freeware at http://ping-monitors.qarchive.org/ A...
{ "language": "en", "url": "https://stackoverflow.com/questions/118466", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I create a non-standard type with SOAPpy? I am calling a WSDL web service from Python using SOAPpy. The call I need to make is to the method Auth_login. This has 2 arguments - the first, a string being the API key; the second, a custom type containing username and password. The custom type is called Auth_cred...
{ "language": "en", "url": "https://stackoverflow.com/questions/118467", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Action Naming Convention Has anybody established a good naming convention for action in MVC? I was specifically looking at ASP.net MVC but it is a general question. For instance I have an action which displays the login screen (Login) and one which process the login request from that page (LoginTest). I'm not kee...
{ "language": "en", "url": "https://stackoverflow.com/questions/118474", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "29" }
Q: MySQL Query: Select most-recent items with a twist Sorry the title isn't more help. I have a database of media-file URLs that came from two sources: (1) RSS feeds and (2) manual entries. I want to find the ten most-recently added URLs, but a maximum of one from any feed. To simplify, table 'urls' has columns 'url,...
{ "language": "en", "url": "https://stackoverflow.com/questions/118487", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: RTF control for .Net 1.1 Windows Can anyone recommend a cheap and good RTF control for .Net 1.1 Windows development. It needs to be able to do print/preview and some basic text formatting, fonts etc but nothing too advanced. Cheers Andreas A: If you're interested in rolling out your own, the framework provides a RT...
{ "language": "en", "url": "https://stackoverflow.com/questions/118490", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: LINQ + type tables best practices Whats the best design pattern to use for LINQ and type tables that exist in SQL. I have tables in SQL that constrain values to type values, and I want to be able to use this in my C# code as strongly typed values. My current approach for a 'PackageStatus' type is as follows: SQL Tab...
{ "language": "en", "url": "https://stackoverflow.com/questions/118497", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: What would a Database Diagram (ER Diagram/Table Layout) look like for measuring distribution of something? If I was, for example, going to count "activities" across many computers and show a rollup of that activity, what would the database look like to store the data? Simply this? Seems too simple. I'm overthinking...
{ "language": "en", "url": "https://stackoverflow.com/questions/118501", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Stored Procedures, MySQL and PHP The question is a fairly open one. I've been using Stored Procs with MS SQLServer for some time with classic ASP and ASP.net and love them, lots. I have a small hobby project I'm working on and for various reasons have gone the LAMP route. Any hints/tricks/traps or good starting poin...
{ "language": "en", "url": "https://stackoverflow.com/questions/118506", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Project retirement or archiving What is the best way to retire a currently active project? I've been working on this one for a while now and I think its time to let go. Without going into too much detail, there are other projects and technologies that are way ahead now and I don't see much value in investing in it a...
{ "language": "en", "url": "https://stackoverflow.com/questions/118512", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do I read an Excel file into Python using xlrd? Can it read newer Office formats? My issue is below but would be interested comments from anyone with experience with xlrd. I just found xlrd and it looks like the perfect solution but I'm having a little problem getting started. I am attempting to extract data pro...
{ "language": "en", "url": "https://stackoverflow.com/questions/118516", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: How do you deal with concurrency in NHibernate? How do you support optimistic / pessimistic concurrency using NHibernate? A: NHibernate supports 2 types of optimistic concurrency. You can either have it check dirty fields by using "optimistic-lock=dirty" attribute on the "class" element in your mapping files or y...
{ "language": "en", "url": "https://stackoverflow.com/questions/118526", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }