text
stringlengths
8
267k
meta
dict
Q: What are some good java make utilities? I'm looking for a make utility for building large java programs. I'm aware of ANT already, but want to see what else is available. Ideally, it should be able to handle the .java->.class package directory weirdness that fouls up GNU Make. Win32, but cross platform is a plus. ED...
{ "language": "en", "url": "https://stackoverflow.com/questions/169293", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: How to run untrusted Ruby code inside a safe sandbox? I want to be able to run unstrusted ruby code. I want to be able to pass variables to said untrusted code that it may use. I also want said code to return a result to me. Here is a conceptual example of what I am thinking input = "sweet" output = nil Thread.start...
{ "language": "en", "url": "https://stackoverflow.com/questions/169303", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: Extending Java Web Applications with plugins I have this web application that has grown to an unmanageable mess. I want to split it into a common "framework" part (that still includes web stuff like pages and images) and several modules that add extra functionality and screens. I want this refactoring to also be us...
{ "language": "en", "url": "https://stackoverflow.com/questions/169329", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Simple way to programmatically get all stored procedures Is there a way to get stored procedures from a SQL Server 2005 Express database using C#? I would like to export all of this data in the same manner that you can script it our using SQL Server Management Studio, without having to install the GUI. I've seen som...
{ "language": "en", "url": "https://stackoverflow.com/questions/169330", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Is there a timer class in C# that isn't in the Windows.Forms namespace? I want to use a timer in my simple .NET application written in C#. The only one I can find is the Windows.Forms.Timer class. I don't want to reference this namespace just for my console application. Is there a C# timer (or timer like) class fo...
{ "language": "en", "url": "https://stackoverflow.com/questions/169332", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: Padding - Encryption algorithm I'm writing an implementation of the XXTEA encryption algorithm that works on "streams", ie, can be used like: crypt mykey < myfile > output. One of the requisites is that it doesn't have access to the file at all (it only reads an fixed size block until find an EOF). The algorithm nee...
{ "language": "en", "url": "https://stackoverflow.com/questions/169334", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Why isn't my custom WCF behavior extension element type being found? I have a solution that contains two projects. One project is an ASP.NET Web Application Project, and one is a class library. The web application has a project reference to the class library. Neither of these is strongly-named. In the class library,...
{ "language": "en", "url": "https://stackoverflow.com/questions/169342", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "49" }
Q: VC++ 2008, OpenProcess always returning error 5 (Access Denied) Would anyone know why MSVC++ 2008 always returns error 5 on GetLastError() when I try to call OpenProcess with PROCESS_ALL_ACCESS as my desired access? PROCESS_VM_READ works just fine. I'm an administrator on this computer and it is working fine in Dev ...
{ "language": "en", "url": "https://stackoverflow.com/questions/169355", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How can I compress a folder and email the compressed file in Python? I would like to compress a folder and all its sub-folders/files, and email the zip file as an attachment. What would be the best way to achieve this with Python? A: You can use the zipfile module to compress the file using the zip standard, the e...
{ "language": "en", "url": "https://stackoverflow.com/questions/169362", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Sending UDP data including hex using VB.NET As a hobby I'm interesting in programming an Ethernet-connected LED sign to scroll messages across a screen. But I'm having trouble making a UDP sender in VB.NET (I am using 2008 currently). Now the sign is nice enough to have a specifications sheet on programming for it. ...
{ "language": "en", "url": "https://stackoverflow.com/questions/169377", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Method can be made static, but should it? ReSharper likes to point out multiple functions per ASP.NET page that could be made static. Does it help me if I do make them static? Should I make them static and move them to a utility class? A: For complex logic within a class, I have found private static methods useful ...
{ "language": "en", "url": "https://stackoverflow.com/questions/169378", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "414" }
Q: What is the best way to install a C# windows service that doesn't require running installutil manually? I'd like to package a C# windows service project so it can be easily installed by anyone without having to use installutil command prompt utility? Is there an easy way to configure a Visual Studio setup project to...
{ "language": "en", "url": "https://stackoverflow.com/questions/169381", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Change SQL Server 2005 Server Collation I need to set up an instance of SQL Server 2005 with SQL_Latin1_General_CP850_Bin as the server collation (the vendor did not take into accounting looking at DB collation for a bunch of things so stored procedures and temp tables default to the server level and the default col...
{ "language": "en", "url": "https://stackoverflow.com/questions/169398", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: C++ template destructors for both primitive and complex data types In a related question I asked about creating a generic container. Using polymorphic templates seems like the right way to go. However, I can't for the life of me figure out how a destructor should be written. I want the owner of the memory allocated ...
{ "language": "en", "url": "https://stackoverflow.com/questions/169404", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Change new projects warning level in VS2008 (Express) I like having my warning level set at W4 but all new projects start at W3. Is there some way to change the default value for warning levels for new projects? A: I don't know how to do it at the IDE but you cand always edit the new project templates at: %PROGRAM...
{ "language": "en", "url": "https://stackoverflow.com/questions/169419", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Generic Java Framework to Manage Bidirectional Associations and Inverse Updates I've been looking for a generic way to deal with bidirectional associations and a way to handle the inverse updates in manual written Java code. For those who don't know what I'm talking about, here is an example. Below it are my current...
{ "language": "en", "url": "https://stackoverflow.com/questions/169420", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: PHP DateTime microseconds always returns 0 this code always returns 0 in PHP 5.2.5 for microseconds: <?php $dt = new DateTime(); echo $dt->format("Y-m-d\TH:i:s.u") . "\n"; ?> Output: [root@www1 ~]$ php date_test.php 2008-10-03T20:31:26.000000 [root@www1 ~]$ php date_test.php 2008-10-03T20:31:27.000000 [root@www1 ~]...
{ "language": "en", "url": "https://stackoverflow.com/questions/169428", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "75" }
Q: Eclipse's WTP translation output How can I view the intermediate translation done to JSP and JSPX pages by WTP? I'm getting weird syntax errors in my Problems tab of Eclipse in a project that has plenty of .jspx pages. They don't affect anything in the running application (Tomcat 6.0) and they appeared only over t...
{ "language": "en", "url": "https://stackoverflow.com/questions/169435", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Continuous Integration setup for ruby projects on linux server I would like to use open source tools if possible. here are 2 links I found but haven't tried them - * *http://pivots.pivotallabs.com/users/chad/blog/articles/471-continuous-integration-in-a-box-exploring-tsttcpw *http://laurentbois.com/category/con...
{ "language": "en", "url": "https://stackoverflow.com/questions/169442", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Aren't Information Expert & Tell Don't Ask at odds with Single Responsibility Principle? Information-Expert, Tell-Don't-Ask, and SRP are often mentioned together as best practices. But I think they are at odds. Here is what I'm talking about. Code that favors SRP but violates Tell-Don't-Ask & Info-Expert: Customer b...
{ "language": "en", "url": "https://stackoverflow.com/questions/169450", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "25" }
Q: Bad Gateway 502 error with Apache mod_proxy and Tomcat We're running a web app on Tomcat 6 and Apache mod_proxy 2.2.3. Seeing a lot of 502 errors like this: Bad Gateway! The proxy server received an invalid response from an upstream server. The proxy server could not handle the request GET /the/page.do. Reason: ...
{ "language": "en", "url": "https://stackoverflow.com/questions/169453", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "56" }
Q: Should I lock an ISAM table to insert a value into a unique key field? I have an ISAm table in mySql that was created similar to this: create table mytable ( id int not null auto_increment primary key, name varchar(64) not null ); create unique index nameIndex on mytable (name); I have multiple processes inserti...
{ "language": "en", "url": "https://stackoverflow.com/questions/169459", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Does the iPhone timeout if a function takes too long to execute? I have a function in which I get en external resource from the web using cocoa's Url object. And it works fine on the simulator, but occasionally fails on the device itself (it's a google query so the resource obviously does exist). Which leads me to ...
{ "language": "en", "url": "https://stackoverflow.com/questions/169470", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Using "~" in a path resolves as C:\ I'm trying to implement a server control that frobs a couple of files inside the web directory of an ASP.NET site. I'm using VS Web Dev Express 2008 as my IDE. When I call HttpContext.Current.Request.ApplicationPath to get a path to the web root so I can find those files, it retur...
{ "language": "en", "url": "https://stackoverflow.com/questions/169477", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: C# & Win32 notify when separate window is closing / closed Is there a way to attach an event to a foreign / separate window from an .NET process that when the foreign window is closed or is about to close my application can be notified? I found this http://msdn.microsoft.com/en-us/library/ms229658.aspx But that seem...
{ "language": "en", "url": "https://stackoverflow.com/questions/169483", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Best Dual HD Set up for Development I've got a machine I'm going to be using for development, and it has two 7200 RPM 160 GB SATA HDs in it. The information I've found on the net so far seems to be a bit conflicted about which things (OS, Swap files, Programs, Solution/Source code/Other data) I should be installing ...
{ "language": "en", "url": "https://stackoverflow.com/questions/169497", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to design a high performance grid with VS 2005(specifically C#) I need to build a high performance winforms data grid using Visual Studio 2005, and I'm at a loss with where to start. I've build plenty of data grid applications, but none of those were very good when the data was constantly refreshing. The grid is...
{ "language": "en", "url": "https://stackoverflow.com/questions/169501", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Obtain form input fields using jQuery? I have a form with many input fields. When I catch the submit form event with jQuery, is it possible to get all the input fields of that form in an associative array? A: http://api.jquery.com/serializearray/ $('#form').on('submit', function() { var data = $(this).serialize...
{ "language": "en", "url": "https://stackoverflow.com/questions/169506", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "447" }
Q: How do I iterate over a range of numbers defined by variables in Bash? How do I iterate over a range of numbers in Bash when the range is given by a variable? I know I can do this (called "sequence expression" in the Bash documentation): for i in {1..5}; do echo $i; done Which gives: 1 2 3 4 5 Yet, h...
{ "language": "en", "url": "https://stackoverflow.com/questions/169511", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2080" }
Q: What is the simplest way to set up a BIRT report viewer for a xulrunner application? I recently began using BIRT and have developed a report to use with my xulrunner application. What I haven't yet figured out is how I should deploy the viewer. It seems like BIRT mostly targets Java applications, so there are inst...
{ "language": "en", "url": "https://stackoverflow.com/questions/169512", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Warning when using mysql_fetch_assoc in PHP Possible Duplicate: Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result When I run my php page, I get this error and do not know what's wrong, can anyone help? If anyone needs more infomation, I'll post the whole code. Warning: mysql_fetch_assoc(...
{ "language": "en", "url": "https://stackoverflow.com/questions/169520", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to efficiently filter a large LIstViewItemCollection? So I have a ListView with an upper limit of about 1000 items. I need to be able to filter these items using a textbox's TextChanged event. I have some code that works well for a smaller number of items (~400), but when I need to re-display a full list of al...
{ "language": "en", "url": "https://stackoverflow.com/questions/169529", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Class property as a collection Greetings, I need to include a property in my class which is a collection of System.IO.FileInfo objects. I am not really sure how to do this and how I would add and removed objects from an instance of the the class (I would assume like any other collection). Please let me know if ...
{ "language": "en", "url": "https://stackoverflow.com/questions/169555", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Proper nullable type checking in C#? Ok, my actual problem was this: I was implementing an IList<T>. When I got to CopyTo(Array array, int index), this was my solution: void ICollection.CopyTo(Array array, int index) { // Bounds checking, etc here. if (!(array.GetValue(0) is T)) throw new ArgumentExc...
{ "language": "en", "url": "https://stackoverflow.com/questions/169562", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Open source Java library to produce webpage thumbnails server-side I am searching for an open source Java library to generate thumbnails for a given URL. I need to bundle this capability, rather than call out to external services, such as Amazon or websnapr. http://www.webrenderer.com/ was mentioned in this post: S...
{ "language": "en", "url": "https://stackoverflow.com/questions/169573", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: Keeping dot files synched across machines? Like most *nix people, I tend to play with my tools and get them configured just the way that I like them. This was all well and good until recently. As I do more and more work, I tend to log onto more and more machines, and have more and more stuff that's configured great ...
{ "language": "en", "url": "https://stackoverflow.com/questions/169574", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "23" }
Q: How can I detect a held down mouse button over a PictureBox? I need to fire an event when the mouse is above a PictureBox with the mouse button already clicked and held down. Problems: The MouseDown and MouseEnter event handlers do not work together very well. For instance once a mouse button is clicked and held do...
{ "language": "en", "url": "https://stackoverflow.com/questions/169590", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: What is an efficient method of paging through very large result sets in SQL Server 2005? EDIT: I'm still waiting for more answers. Thanks! In SQL 2000 days, I used to use temp table method where you create a temp table with new identity column and primary key then select where identity column between A and B. When S...
{ "language": "en", "url": "https://stackoverflow.com/questions/169596", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: strcat() new line, duplicate string I'm writing a function that gets the path environment variable of a system, splits up each path, then concats on some other extra characters onto the end of each path. Everything works fine until I use the strcat() function (see code below). char* prependPath( char* exeName ) { ...
{ "language": "en", "url": "https://stackoverflow.com/questions/169610", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Java EE -- is it just fluff or the real stuff? I'm familiar with the LAMP stack and over the years have successfully deployed a handful of web sties based on it. I've used everything from Apache + modPerl, to PHP, to Ruby and Rails. With good use of caching my Rails site can sustain a pretty good load, but I'm not t...
{ "language": "en", "url": "https://stackoverflow.com/questions/169620", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Is it possible to order by any column given a stored procedure parameter in SQL Server? I was looking into sorting tables by a column designated given some input, and from what I've found, there is no easy way to do this. The best I've found is a switch statement: SELECT Column1, Column2, Column3, Column4 FROM Tab...
{ "language": "en", "url": "https://stackoverflow.com/questions/169624", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Regex to check if valid URL that ends in .jpg, .png, or .gif I would like users to submit a URL that is valid but also is an image, ending with .jpg, .png, or .gif. A: (?:([^:/?#]+):)?(?://([^/?#]*))?([^?#]*\.(?:jpg|gif|png))(?:\?([^#]*))?(?:#(.*))? That's a (slightly modified) version of the official URI parsing r...
{ "language": "en", "url": "https://stackoverflow.com/questions/169625", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "41" }
Q: DateTime, DateTime? and LINQ When I retrieve a record using LINQ that has a DateTime field only the ToString() is available. Where are all the other DateTime methods? I have to Convert.ToDateTime the DateTime? that the Field returns? What is the difference between (DateTime) and (DateTime?) A: In SQL, DateTimes a...
{ "language": "en", "url": "https://stackoverflow.com/questions/169637", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Is there a way to implement algebraic types in Java? Is it possible, in Java, to enforce that a class have a specific set of subclasses and no others? For example: public abstract class A {} public final class B extends A {} public final class C extends A {} public final class D extends A {} Can I somehow enforce t...
{ "language": "en", "url": "https://stackoverflow.com/questions/169662", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Persisting Printer Settings What is the best way to persist/save printer settings in .Net? There used to be a bug in .Net 1.1 in the serialization of the PrinterSetting object and there were some workarounds but I'm wondering if there isn't a better or easier way of doing this in the more recent versions of the fram...
{ "language": "en", "url": "https://stackoverflow.com/questions/169695", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: What are your required software development operation manuals? After reading E-myth Revisited, I realize that I can do a better job at making my company less reliant upon me... I spend a tremendous amount of time answering silly questions (silly to me, but necessary for my developers to get the job done). I need to ...
{ "language": "en", "url": "https://stackoverflow.com/questions/169697", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What's the toughest bug you ever found and fixed? What made it hard to find? How did you track it down? Not close enough to close but see also https://stackoverflow.com/questions/175854/what-is-the-funniest-bug-youve-ever-experienced A: The two toughest bugs that come to mind were both in the same type of software...
{ "language": "en", "url": "https://stackoverflow.com/questions/169713", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "63" }
Q: Where can I find the Flex source code? I keep hearing that Flex is open source and I figured that a great way to learn about the inner workings would be to look at it. I can easily find the Flex SDK (http://opensource.adobe.com/wiki/display/flexsdk/Get+Source+Code), but I'm wanting to look at the class definitions f...
{ "language": "en", "url": "https://stackoverflow.com/questions/169721", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: What's the best word processing component for .NET I'm looking for a word processing component for .NET that would act like an embedded MS Word in my WinForm/WPF .NET app. The main goal being for users to be able to create rich formatted text. I don't really want to have to write a highly custom RichTextBox compon...
{ "language": "en", "url": "https://stackoverflow.com/questions/169728", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: How do I reference an object dynamically? In Javascript, I have an object: obj = { one: "foo", two: "bar" }; Now, I want do do this var a = 'two'; if(confirm('Do you want One')) { a = 'one'; } alert(obj.a); But of course it doesn't work. What would be the correct way of referencing this object dynamically? A:...
{ "language": "en", "url": "https://stackoverflow.com/questions/169731", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Best .NET comm component or protocol for very low bandwidth communication? What's the best .NET communication component or protocol for very low bandwidth and intermittently connected communication (i.e.: < 10 kilobits/sec)? A: Probably System.Net.Sockets.Socket. There is also a TcpClient and UdpClient in that name...
{ "language": "en", "url": "https://stackoverflow.com/questions/169759", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do you get non-technical folks to appreciate a non-UI problem? Suppose you're working on an enterprise project in which you have to get management signoff in order for you to develop a new feature set. Usually your management has no problem signing off on some bright shiny new UI feature. Unfortunately they have...
{ "language": "en", "url": "https://stackoverflow.com/questions/169765", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: Not getting the correct count in SQL I am totally new to SQL. I have a simple select query similar to this: SELECT COUNT(col1) FROM table1 There are some 120 records in the table and shown on the GUI. For some reason, this query always returns a number which is less than the actual count. Can somebody please help m...
{ "language": "en", "url": "https://stackoverflow.com/questions/169784", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How do I dynamically add Panels to other panels at runtime in Java? I'm trying to get into java again (it's been a few years). I never really did any GUI coding in java. I've been using Netbeans to get started with this. When using winforms in C# at work I use a usercontrols to build parts of my UI and add them to f...
{ "language": "en", "url": "https://stackoverflow.com/questions/169799", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: 2D animation in Python I'm writing a simulator in Python, and am curious about options and opinions regarding basic 2D animations. By animation, I'm referring to rendering on the fly, not displaying prerendered images. I'm currently using matplotlib (Wxagg backend), and it's possible that I'll be able to continue us...
{ "language": "en", "url": "https://stackoverflow.com/questions/169810", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Will there be a functional language which does for the Java community what F# does for the .NET community? Will there be a functional language which does for the Java community what F# does for the .NET community? What functional programming languages are available, or in development, for the JVM? A: Scala would be...
{ "language": "en", "url": "https://stackoverflow.com/questions/169812", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "22" }
Q: How to find the distance between the two most widely separated nodes I'm working through previous years ACM Programming Competition problems trying to get better at solving Graph problems. The one I'm working on now is I'm given an arbitrary number of undirected graph nodes, their neighbors and the distances for t...
{ "language": "en", "url": "https://stackoverflow.com/questions/169814", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Java - Common Gotchas In the same spirit of other platforms, it seemed logical to follow up with this question: What are common non-obvious mistakes in Java? Things that seem like they ought to work, but don't. I won't give guidelines as to how to structure answers, or what's "too easy" to be considered a gotcha, si...
{ "language": "en", "url": "https://stackoverflow.com/questions/169815", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "52" }
Q: Is it possible to query a tree structure table in MySQL in a single query, to any depth? I'm thinking the answer is no, but I'd love it it anybody had any insight into how to crawl a tree structure to any depth in SQL (MySQL), but with a single query More specifically, given a tree structured table (id, data, data, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/169817", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "58" }
Q: Object-relational mapping: What's the best way to implement getters? What should happen when I call $user->get_email_address()? Option 1: Pull the email address from the database on demand public function get_email_address() { if (!$this->email_address) { $this->read_from_database('email_address'); }...
{ "language": "en", "url": "https://stackoverflow.com/questions/169818", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: What are the real benefits of Visual Studio Team System Database Edition (GDR)? Interested if anyone has used VSTS Database Edition extensively and, if so, which features did you find the most useful over the standard Visual Studio database projects? What are the most compelling features as opposed to alternative sc...
{ "language": "en", "url": "https://stackoverflow.com/questions/169828", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: INotifyPropertyChanging and validations: when do I raise PropertyChanging? INotifyPropertyChanged is fairly self explanatory and I think I'm clear on when to raise that one (i.e. when I've finished updating the values). If I implement INotifyPropertyChanging I'm tending to raise the event as soon as I enter the sett...
{ "language": "en", "url": "https://stackoverflow.com/questions/169829", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: How do I write content to another browser window using Javascript? I've opened a new window with window.open() and I want to use the reference from the window.open() call to then write content to the new window. I've tried copying HTML from the old window to the new window by using myWindow.document.body.innerHTML ...
{ "language": "en", "url": "https://stackoverflow.com/questions/169833", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: How can I implement the pop out functionality of chat windows in GMail? I'm not looking for a full implementation, I'm more interested in how they do it. I know they use GWT, but I'd like a more low level answer. Naively, I would start by thinking when you click the popout link they simply open a new window and co...
{ "language": "en", "url": "https://stackoverflow.com/questions/169862", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Export pictures in Microsoft Word to TIFF How to export pictures in Microsoft Word to TIFF file using Visual Studio Tools for Office? I can obtain a reference to the pictures as InlineShape object collection, the hard part now is how to save them as TIFF images. A: OK guys, I got the problem solved. Here's the code...
{ "language": "en", "url": "https://stackoverflow.com/questions/169866", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Test cases, "when", "what", and "why"? Being new to test based development, this question has been bugging me. How much is too much? What should be tested, how should it be tested, and why should it be tested? The examples given are in C# with NUnit, but I assume the question itself is language agnostic. Here are tw...
{ "language": "en", "url": "https://stackoverflow.com/questions/169877", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Rspec - problems with switching from plugins to gems When dropping the use of rspec and rspec-rails plugins and switching to the gem versions instead, is there anything extra I have to change in spec_helper.rb or something to make the specs in my app see the change? I can no longer get my specs to run successfully ...
{ "language": "en", "url": "https://stackoverflow.com/questions/169888", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What's the best process / app for automated deployment of PHP apps? There's another post on SO relating to .NET -- not us. Pure PHP. Trying to find the best way/process to deploy stable version of our PHP app. I've seen an article on Capistrano, but am curious what else is out there. Aside from the obvious reaso...
{ "language": "en", "url": "https://stackoverflow.com/questions/169889", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: In Flot, is it possible to eliminate or hide grid ticks without eliminating the corresponding label? The Flot API documentation describes the library's extensive hooks for customizing the axes of a graph. You can set the number of ticks, their color, etc. separately for each axis. However, I can not figure out how t...
{ "language": "en", "url": "https://stackoverflow.com/questions/169894", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: How to package Twisted program with py2exe? I tried to package a Twisted program with py2exe, but once I run the exe file I built, I got a "No module named resource" error. And I found the py2exe said: The following modules appear to be missing ['FCNTL', 'OpenSSL', 'email.Generator', 'email.Iterators', 'email.Util...
{ "language": "en", "url": "https://stackoverflow.com/questions/169897", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Projective transformation Given two image buffers (assume it's an array of ints of size width * height, with each element a color value), how can I map an area defined by a quadrilateral from one image buffer into the other (always square) image buffer? I'm led to understand this is called "projective transformation...
{ "language": "en", "url": "https://stackoverflow.com/questions/169902", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Can I listen on a port (using HttpListener or other .NET code) on Vista without requiring administrator priveleges? I'm using HttpListener to allow a user to set up a proxy on a user-defined port. When I start the HttpListener, I get an exception if the application isn't running under administrator privileges in Vis...
{ "language": "en", "url": "https://stackoverflow.com/questions/169904", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "43" }
Q: Where is the history of the 'run' dialogue saved on Windows XP? I want to write a script which cleans the 'run' dialogue automatically every log off. Where is the history stored? A: From: How to Remove Individual Entries from Run Command History Where is the Run MRU (Most Recently Used) List? The RUNMRU list is ...
{ "language": "en", "url": "https://stackoverflow.com/questions/169905", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I base64 encode a string efficiently using Excel VBA? I need to encode a 100KB+ string as base64 in VBA. Are there any built-in functions or COM objects available which will do this as a pure VBA approach is either complex or doesn't scale well at these volumes (see links from dbb and marxidad)? A: As Mark C...
{ "language": "en", "url": "https://stackoverflow.com/questions/169907", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "35" }
Q: View MS Access Report in .net ReportViewer control Is it possible to view an MS Access report in the .Net ReportViewer control? A: I dont think so...you first need to migrate the reports to SSRS. http://www.microsoft.com/technet/prodtechnol/sql/2000/deploy/migratereports.mspx
{ "language": "en", "url": "https://stackoverflow.com/questions/169908", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to convert a string into double and vice versa? I want to convert a string into a double and after doing some math on it, convert it back to a string. How do I do this in Objective-C? Is there a way to round a double to the nearest integer too? A: Here's a working sample of NSNumberFormatter reading localized n...
{ "language": "en", "url": "https://stackoverflow.com/questions/169925", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "147" }
Q: Where can I find some good information about how the new canvas HTML element works? I keep reading about how great this new Canvas element for HTML5 is and I see amazing demos done with just javascript and no flash. Where can I find some good information on how to some of these things myself? A: The specification ...
{ "language": "en", "url": "https://stackoverflow.com/questions/169928", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: JUnit Eclipse plugin source-code? I'm looking into writing an Eclipse plugin for FlexUnit and was wondering where I could get the sources for the JUnit Eclipse plugin. I checked the JUnit sources at sourceforge but couldn't spot any code that looked like the plugin code. Any idea where this code is available? A: Yo...
{ "language": "en", "url": "https://stackoverflow.com/questions/169929", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: What is a reasonable size for an iPhone App? I'm wondering what's a reasonable size for iPhone Apps. Right now I'm working on an iPhone game, and of course it loads fast into my device since I'm connected directly to it through a USB cable, but I've no idea how long it would actually take to download from the App St...
{ "language": "en", "url": "https://stackoverflow.com/questions/169936", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: How do you handle cookies with webrequest/response as in a proxy? How do you handle cookies and with webrequest/response as in a proxy? I'm not sure how to do this...or if I even can. A: Can you clarify what you mean? What is the setup here? If you want to perform multiple related operations, then WebClient may be ...
{ "language": "en", "url": "https://stackoverflow.com/questions/169943", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Using the .NET Framework security system I was wondering - do any of you actually use the various classes in the System.Security.Permissions namespace? I mainly develop desktop/server-side components (i.e., no web) and the general assumption is that FullTrust is always available and no testing is performed on envir...
{ "language": "en", "url": "https://stackoverflow.com/questions/169951", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to prevent a script from running simultaneously? I want to prevent my script running more than once at a time. My current approach is * *create a semaphore file containing the pid of the running process *read the file, if my process-id is not in it exit (you never know...) *at the end of the processing, de...
{ "language": "en", "url": "https://stackoverflow.com/questions/169964", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "71" }
Q: When should I use a List vs a LinkedList When is it better to use a List vs a LinkedList? A: My previous answer was not enough accurate. As truly it was horrible :D But now I can post much more useful and correct answer. I did some additional tests. You can find it's source by the following link and reCheck it on ...
{ "language": "en", "url": "https://stackoverflow.com/questions/169973", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "456" }
Q: Mock testing and PHP's magic __get method I'm having problems when trying to mock objects with __get and __set methods (using simpletest). Writing mock responses for __get doesn't smell right - the tests seem too tightly tied to implementation. Any recommendations for testing, or should I just avoid the magic metho...
{ "language": "en", "url": "https://stackoverflow.com/questions/169981", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: What is your experience with auditing features (Oracle)? Did you ever use Oracle auditing features on a production db? How did that impact on performances, and are there differences you noticed between different versions of Oracle? A: Perfomance-wise, you'd need to auditing a hell of a lot of information for Oracle...
{ "language": "en", "url": "https://stackoverflow.com/questions/169989", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Can you load the FLVPlayback skin SWF in another directory? Per this Adobe KB tech note is there any way around having to place the FLVPlayback skin SWF in same directory as HTML file the container SWF is loaded from? It pains me to have to put a SWF in my site's root directory. I think loading the Flash video in a...
{ "language": "en", "url": "https://stackoverflow.com/questions/169996", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: FCKeditor vs TinyMCE and XHTML Compliance I'm after (short) opinions on FCKeditor vs TinyMCE and whether either or both are XHTML compliant. In the interest of keeping with the spirit of stackoverflow, if someone has already made your point, just upvote them. A: TinyMCE produces absolute garbage. FCK produces less ...
{ "language": "en", "url": "https://stackoverflow.com/questions/170001", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How to remove only the parent element and not its child elements in JavaScript? Let's say: <div> pre text <div class="remove-just-this"> <p>child foo</p> <p>child bar</p> nested text </div> post text </div> to this: <div> pre text <p>child foo</p> <p>child bar</p> nested text post text...
{ "language": "en", "url": "https://stackoverflow.com/questions/170004", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "98" }
Q: Please comment on this simple software protection schema I was asked implement a licensing schema for our product. They are very expensive products with few customers sparsely distributed around the world and basically every one of them has a design environment (a windows application installed on single windows mac...
{ "language": "en", "url": "https://stackoverflow.com/questions/170006", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Your Scrum definition of Done While Scrum is easy in theory and hard in practice, I wanted to hear your definition of Done; i.e. what are the gates (unit test, code coverage > 80%, code reviews, load tests, perf.test, functional tests, etc.) your product has to go through before you can label the product "Done" A: ...
{ "language": "en", "url": "https://stackoverflow.com/questions/170009", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "24" }
Q: In PHP will a session be created if a browser is not used I have an API that is dependent on certain state information between requests. As an easy first version of the code, I am simply using PHP session's to store the state information instead of something more advanced (APC, memcache, DB). Throughout my initial t...
{ "language": "en", "url": "https://stackoverflow.com/questions/170019", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: What factors that degrade the performance of a SQL Server 2000 Job? We are currently running a SQL Job that archives data daily at every 10PM. However, the end users complains that from 10PM to 12, the page shows a time out error. Here's the pseudocode of the job while @jobArchive = 1 and @countProcecessedItem < @ma...
{ "language": "en", "url": "https://stackoverflow.com/questions/170021", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How would you simplify Entering and Exiting a ReaderWriterLock? This seems very noisy to me. Five lines of overhead is just too much. m_Lock.EnterReadLock() Try Return m_List.Count Finally m_Lock.ExitReadLock() End Try So how would you simply this? A: All the solutions posted so far are at risk of deadlock...
{ "language": "en", "url": "https://stackoverflow.com/questions/170028", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Decent profiler for Windows? Does windows have any decent sampling (eg. non-instrumenting) profilers available? Preferably something akin to Shark on MacOS, although i am willing to accept that i am going to have to pay for such a profiler on windows. I've tried the profiler in VS Team Suite and was not overly impr...
{ "language": "en", "url": "https://stackoverflow.com/questions/170036", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "24" }
Q: ActiveX events between apartments Environment: VS2008 (ATL), Borland Developer Studio 2006. Hello all. I'm having some troubles with ActiveX control events. Here is a brief description of my app architecture: There is an inproc COM server which contains STA ActiveX control (aka control) and MTA COM object (aka ob...
{ "language": "en", "url": "https://stackoverflow.com/questions/170038", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How would you simply Monitor.TryEnter I'm trying to make things simpler. Here is my code: If Threading.Monitor.TryEnter(syncRoot) Then Try 'do something Finally Threading.Monitor.Exit(syncRoot) End Try Else 'do something else End If This is even wo...
{ "language": "en", "url": "https://stackoverflow.com/questions/170051", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Is there a way to group RadioButtons generated from the ItemTemplate of an ItemsControl <DataTemplate x:Key="Genre_DataTemplate"> <RadioButton GroupName="One" Content="{Binding... </DataTemplate> Above code is the ItemTemplate of my ItemsControl, I want all the Radiobuttons instantiated should behave as i...
{ "language": "en", "url": "https://stackoverflow.com/questions/170061", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: What utilities can provide database hits/duration per page? SQL Server profiler is great for profiling SQL Server performance for web apps. However, when I'm testing my webapp I'd like a summary of database hits/duration per page. Does anybody know of any utilities for giving you this kind of information? A: If you...
{ "language": "en", "url": "https://stackoverflow.com/questions/170064", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: What are the differences between using the New keyword and calling CreateObject in Excel VBA? What criteria should I use to decide whether I write VBA code like this: Set xmlDocument = New MSXML2.DOMDocument or like this: Set xmlDocument = CreateObject("MSXML2.DOMDocument") ? A: You should always use Set xmlDocum...
{ "language": "en", "url": "https://stackoverflow.com/questions/170070", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: SQL Server 2005 Setting a variable to the result of a select query How do I set a variable to the result of select query without using a stored procedure? I want to do something like: OOdate DATETIME SET OOdate = Select OO.Date FROM OLAP.OutageHours as OO WHERE OO.OutageID = 1 Then I want to use OOdate in this q...
{ "language": "en", "url": "https://stackoverflow.com/questions/170078", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "44" }