text
stringlengths
8
267k
meta
dict
Q: How can I run a Windows GUI application on as a service? I have an existing GUI application that should have been implemented as a service. Basically, I need to be able to remotely log onto and off of the Windows 2003 server and still keep this program running. Is this even possible? EDIT: Further refinement here......
{ "language": "en", "url": "https://stackoverflow.com/questions/53232", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "38" }
Q: Should we stop using Zend WinEnabler? (This question is over 6 years old and probably no longer has any relevance.) Our system uses Zend WinEnabler. * *Do you use it? *Is it obsolete? *Should we stop using it? *Is it known to cause handle/memory leaks? Here is an (old) introduction to it: PHP Creators Un...
{ "language": "en", "url": "https://stackoverflow.com/questions/53253", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Getting closest element by id I have two elements: <input a> <input b onclick="..."> When b is clicked, I want to access a and manipulate some of its data. A does not have a globally unique name, so document.getElementsByName is out. Looking into the event object, I thought event.target.parentNode would have some f...
{ "language": "en", "url": "https://stackoverflow.com/questions/53256", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Retaining HTTP POST data when a request is interrupted by a login page Say a user is browsing a website, and then performs some action which changes the database (let's say they add a comment). When the request to actually add the comment comes in, however, we find we need to force them to login before they can cont...
{ "language": "en", "url": "https://stackoverflow.com/questions/53260", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How could I get my SVN-only host to pull from a git repository? I'd really like to get our host to pull from our Git repository instead of uploading files manually, but it doesn't have Git installed. So is there a way to trick Subversion (which they do have) into checking out a Git repository? I think I already know...
{ "language": "en", "url": "https://stackoverflow.com/questions/53290", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Ruby Package Include Problems I'm trying to use the Optiflag package in my Ruby code and whenever I try to do the necessary require optiflag.rb, my program fails with the standard no such file to load -- optiflag message. I added the directory with that library to my $PATH variable, but it's still not working. Any i...
{ "language": "en", "url": "https://stackoverflow.com/questions/53292", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Java Web Services API, however I can't run a JVM on my server I'm trying to use some data from a PlanPlusOnline account. They only provide a java web services API. The server for the site where the data will be used does not allow me to install Tomcat (edit: or a JVM for that matter). I'm not going to lie, I am a...
{ "language": "en", "url": "https://stackoverflow.com/questions/53295", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Can you bind a DataTrigger to an Attached Property? In WPF, is it possible for a DataTrigger to bind to an attached property? I essentially want to use a converter on an attached property to provide a style when a particular validation rule has been broken. I am using markup like the following: <DataTrigger Binding=...
{ "language": "en", "url": "https://stackoverflow.com/questions/53301", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "20" }
Q: Best way to draw text with OpenGL and Cocoa? Does anyone know an easy way to draw arbitrary text in a Cocoa NSOpenGLView? I have a couple of constraints. * *The text on screen may change from frame to frame (for example, a framerate display in the corner) *I would like to be able to select any font installed on ...
{ "language": "en", "url": "https://stackoverflow.com/questions/53309", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Hibernate crops clob values oddly I have a one to many relationship between two tables. The many table contains a clob column. The clob column looks like this in hibernate: @CollectionOfElements(fetch = EAGER) @JoinTable(name = NOTE_JOIN_TABLE, joinColumns = @JoinColumn(name = "note")) @Column(name = "substitution")...
{ "language": "en", "url": "https://stackoverflow.com/questions/53316", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What are the disadvantages of Typed DataSets I come from a world that favors building your own rather than rely on libraries and frameworks built by others. After escaping this world I have found the joy, and ease, of using such tools as Typed DataSets within Visual Studio. So besides the loss of flexibility what el...
{ "language": "en", "url": "https://stackoverflow.com/questions/53338", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: Crystal Report icons/toolbar not working when deployed on web server I have built a web page which contains a Crystal Report built using the Crystal libraries included in Visual Studio 2008. It 'works on my machine' but when deployed to the web server the icons (Export, Print etc) on the Crystal Report toolbar do ...
{ "language": "en", "url": "https://stackoverflow.com/questions/53347", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Best way to hide DB connection code in PHP5 for apps that only require one connection? Below I present three options for simplifying my database access when only a single connection is involved (this is often the case for the web apps I work on). The general idea is to make the DB connection transparent, such that i...
{ "language": "en", "url": "https://stackoverflow.com/questions/53353", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do you create a shortcut to a directory so that it opens in explorer Better yet, how can I make My Computer always open in Explorer as well? I usually make a shortcut to my programming directories on my quick launch bar, but I'd love for them to open in Explorer. A: explorer -d c:\path A: I use explorer /e,c:\...
{ "language": "en", "url": "https://stackoverflow.com/questions/53355", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Printing in Adobe AIR - Standalone PDF Generation Is it possible to generate PDF Documents in an Adobe AIR application without resorting to a round trip web service for generating the PDF? I've looked at the initial Flex Reports on GoogleCode but it requires a round trip for generating the actual PDF. Given that AIR...
{ "language": "en", "url": "https://stackoverflow.com/questions/53364", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Getting hibernate to log clob parameters (see here for the problem I'm trying to solve) How do you get hibernate to log clob values it's going to insert. It is logging other value types, such as Integer etc. I have the following in my log4j config: log4j.logger.net.sf.hibernate.SQL=DEBUG log4j.logger.org.hibernate.S...
{ "language": "en", "url": "https://stackoverflow.com/questions/53365", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Where are people getting that rotating loading image? I keep running across this loading image http://georgia.ubuntuforums.com/images/misc/lightbox_progress.gif which seems to have entered into existence in the last 18 months. All of a sudden it is in every application and is on every web site. Not wanting to be l...
{ "language": "en", "url": "https://stackoverflow.com/questions/53370", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: using DBMS_APPLICATION_INFO with Jboss Does anyone have examples of how to use DBMS_APPLICATION_INFO package with JBOSS? We have a various applications which run within JBOSS and share db pools. I would like, at the start of each session these applications to identify themselves to the database using DBMS_APPLICATI...
{ "language": "en", "url": "https://stackoverflow.com/questions/53379", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Some Tomcat webapps not opening I downloaded a couple of webapps and placed them in my /webapps folder. Some of them I could open by going to http://localhost:8080/app1 and it would open. However, some others I would do the exact same thing and go to http://localhost:8080/app2 and it will display "HTTP Status 404 - ...
{ "language": "en", "url": "https://stackoverflow.com/questions/53387", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Centralizing/controlling arbitrary builds of .NET projects and solutions Over the years I have created and tweaked a set of NAnt scripts to perform complete project builds. The main script takes a single application end point (a web application project for example) and does a complete, from source control, build of...
{ "language": "en", "url": "https://stackoverflow.com/questions/53391", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Suggestions wanted with Lists or Enumerators of T when inheriting from generic classes I know the answer is not going to be simple, and I already use a couple of (I think ugly) cludges. I am simply looking for some elegant answers. Abstract class: public interface IOtherObjects; public abstract class MyObjects<T> w...
{ "language": "en", "url": "https://stackoverflow.com/questions/53395", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Managed OleDB provider written in C# An OleDB provider is a binary implementing COM interfaces provided by Microsoft. From that it seems to be possible to create a provider using C#. Is that correct? Is there a sample demonstrating that? If not, would you discourage me from doing that? I see that there are multiple ...
{ "language": "en", "url": "https://stackoverflow.com/questions/53404", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: wav <> mp3 for flash(as3) I'm wondering about MP3 decoding/encoding, and I was hoping to pull this off in Flash using AS3 I'm sure it'll be a right pain... I have no idea where to start, can anyone offer any pointers? reference material? ----much later--- Thank you all very much for your input... It seems I have a l...
{ "language": "en", "url": "https://stackoverflow.com/questions/53411", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: NHibernate or LINQ to SQL If starting a new project what would you use for your ORM NHibernate or LINQ and why. What are the pros and cons of each. edit: LINQ to SQL not just LINQ (thanks @Jon Limjap) A: Start with NHibernate is a bad idea. It shows a good performance only with ably settings. Try to use EFv4 for l...
{ "language": "en", "url": "https://stackoverflow.com/questions/53417", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Memory leak detectors for C? What memory leak detectors have people had a good experience with? Here is a summary of the answers so far: Valgrind - Instrumentation framework for building dynamic analysis tools. Electric Fence - A tool that works with GDB Splint - Annotation-Assisted Lightweight Static Checking Glow ...
{ "language": "en", "url": "https://stackoverflow.com/questions/53426", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "35" }
Q: What are some good Python ORM solutions? I'm evaluating and looking at using CherryPy for a project that's basically a JavaScript front-end from the client-side (browser) that talks to a Python web service on the back-end. So, I really need something fast and lightweight on the back-end that I can implement using Py...
{ "language": "en", "url": "https://stackoverflow.com/questions/53428", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "244" }
Q: Getting IIS Worker Process Crash dumps I'm doing something bad in my ASP.NET app. It could be the any number of CTP libraries I'm using or I'm just not disposing something properly. But when I redeploy my ASP.NET to my Vista IIS7 install or my server's IIS6 install I crash an IIS worker process. I've narrowed the pr...
{ "language": "en", "url": "https://stackoverflow.com/questions/53435", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Is it possible to unit test a class that makes P/Invoke calls? I want to wrap a piece of code that uses the Windows Impersonation API into a neat little helper class, and as usual, I'm looking for a way to go test-first. However, while WindowsIdentity is a managed class, the LogonUser call that is required to actual...
{ "language": "en", "url": "https://stackoverflow.com/questions/53439", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: When building a Handler, should it be .ashx or .axd? Say I'm building an ASP.Net class that inherits from IHttpHandler, should I wire this up to a URL ending in .ashx, or should I use the .axd extension? Does it matter as long as there's no naming conflict? A: Ahh.. ScottGu says it doesn't matter, but .ashx is sli...
{ "language": "en", "url": "https://stackoverflow.com/questions/53450", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to stop IIS asking authentication for default website on localhost I have IIS 5.1 installed on Windows XP Pro SP2. Besides I have installed VS 2008 Express with .NET 3.5. So obviously IIS is configured for ASP.NET automatically for .NET 3.5 The problem is whenever I access http://localhost IE & Firefox both pres...
{ "language": "en", "url": "https://stackoverflow.com/questions/53464", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: What is the best way to convert a Ruby string range to a Range object I have some Ruby code which takes dates on the command line in the format: -d 20080101,20080201..20080229,20080301 I want to run for all dates between 20080201 and 20080229 inclusive and the other dates present in the list. I can get the string 2...
{ "language": "en", "url": "https://stackoverflow.com/questions/53472", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "24" }
Q: Javascript - Applying class to an HTML tag given an attribute/value I am trying to apply styles to HTML tags dynamically by reading in the value of certain HTML attributes and applying a class name based on their values. For instance, if I have: <p height="30"> I want to apply a class="h30" to that paragraph so tha...
{ "language": "en", "url": "https://stackoverflow.com/questions/53473", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: ASP.NET MVC vs. Web client software factory (WCSF) I have recently been doing a bit of investigation into the different types of Model View architectures, and need to decide which one to pursue for future in-house development. As I'm currently working in a Microsoft shop that has ASP.NET skills, it seems my options ...
{ "language": "en", "url": "https://stackoverflow.com/questions/53479", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: Fuzzy text (sentences/titles) matching in C# Hey, I'm using Levenshteins algorithm to get distance between source and target string. also I have method which returns value from 0 to 1: /// <summary> /// Gets the similarity between two strings. /// All relation scores are in the [0, 1] range, /// which means that if...
{ "language": "en", "url": "https://stackoverflow.com/questions/53480", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "22" }
Q: How do I change the password of the root user in MySQL? I have long since forgotten the password for the root user on one of my boxes. Is there a way I can change it without having to log in to the instance, or will I have to reinstall? A: A quick Google resulted in this answer. In the root shell type: mysqladmin -...
{ "language": "en", "url": "https://stackoverflow.com/questions/53482", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How do I enable external access to MySQL Server? How do I enable external access to MySQL Server? I can connect locally but I cannot connect from another box on the network. I just tried grant all privileges on *.* to root@'%' identified by '*****' with grant option; And restarted MySQL Server with no success. A: ...
{ "language": "en", "url": "https://stackoverflow.com/questions/53491", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Regular expression that matches valid IPv6 addresses I'm having trouble writing a regular expression that matches valid IPv6 addresses, including those in their compressed form (with :: or leading zeros omitted from each byte pair). Can someone suggest a regular expression that would fulfill the requirement? I'm c...
{ "language": "en", "url": "https://stackoverflow.com/questions/53497", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "111" }
Q: Is it possible to determine which process starts my .Net application? I am developing console application in .Net and I want to change a behavior a little based on information that application was started from cmd.exe or from explorer.exe. Is it possible? A: Process this_process = Process.GetCurrentProcess(); int p...
{ "language": "en", "url": "https://stackoverflow.com/questions/53501", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Plain text passwords in Ruby on Rails using Restful_Authentication If I use restful_authentication in my ruby on rails app are passwords transfered between the broswer and the server in paintext? And if so how worried should I be about it? A: Well, you need to be worried if you are not hosting it over HTTPS... beca...
{ "language": "en", "url": "https://stackoverflow.com/questions/53511", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I check if a list is empty? For example, if passed the following: a = [] How do I check to see if a is empty? A: Simply use is_empty() or make function like:- def is_empty(any_structure): if any_structure: print('Structure is not empty.') return True else: print('Structure i...
{ "language": "en", "url": "https://stackoverflow.com/questions/53513", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3229" }
Q: How can you unit test a database in SQL Server? What are some of the ways? What frameworks can you use? A: Well, I presume you mean unit testing your code that hits the database, in which case, there is NDbUnit, which appears to be a DbUnit clone for .NET. I've never used it, but I have used DbUnit, and it is quit...
{ "language": "en", "url": "https://stackoverflow.com/questions/53527", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Unit-testing servlets I have a bunch of servlets running under the Tomcat servlet container. I would like to separate test code from production code, so I considered using a test framework. JUnit is nicely integrated into Eclipse, but I failed to make it run servlets using a running Tomcat server. Could you please r...
{ "language": "en", "url": "https://stackoverflow.com/questions/53532", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: SQL Server Freetext match - how do I sort by relevance Is it possible to order results in SQL Server 2005 by the relevance of a freetext match? In MySQL you can use the (roughly equivalent) MATCH function in the ORDER BY section, but I haven't found any equivalence in SQL Server. From the MySQL docs: For each row i...
{ "language": "en", "url": "https://stackoverflow.com/questions/53538", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: What are some strategies to write python code that works in CPython, Jython and IronPython Having tries to target two of these environments at the same time I can safely say the if you have to use a database etc. you end up having to write unique code for that environment. Have you got a great way to handle this sit...
{ "language": "en", "url": "https://stackoverflow.com/questions/53543", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "16" }
Q: Get the App.Config of another Exe I have an exe with an App.Config file. Now I want to create a wrapper dll around the exe in order to consume some of the functionalities. The question is how can I access the app.config property in the exe from the wrapper dll? Maybe I should be a little bit more in my questions, I ...
{ "language": "en", "url": "https://stackoverflow.com/questions/53545", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "23" }
Q: How would you go about for switching a site from Prototype to jQuery I have written a site in Prototype but want to switch to jQuery. Any ideas on how best make the switch? A: Personally, I like to take things in steps, so I would start by using both, like this: jQuery.noConflict(); // Put all your code in your do...
{ "language": "en", "url": "https://stackoverflow.com/questions/53555", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Enabling Hibernate second-level cache with JPA on JBoss 4.2 What are the steps required to enable Hibernate's second-level cache, when using the Java Persistence API (annotated entities)? How do I check that it's working? I'm using JBoss 4.2.2.GA. From the Hibernate documentation, it seems that I need to enable the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/53562", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: How to get the changes on a branch in Git What is the best way to get a log of commits on a branch since the time it was branched from the current branch? My solution so far is: git log $(git merge-base HEAD branch)..branch The documentation for git-diff indicates that git diff A...B is equivalent to git diff $(git...
{ "language": "en", "url": "https://stackoverflow.com/questions/53569", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "285" }
Q: NMBLookup OS X returning inconsistant results We're trying to get SMB volume listings in our OS X application, and have been using NMBLookup, as suggested by Apple, to get listings. However, more often than not, we're not able to get a full listing of available SMB volumes using the tool. We've got a good benchmark ...
{ "language": "en", "url": "https://stackoverflow.com/questions/53583", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do I compose existing Linq Expressions I want to compose the results of two Linq Expressions. They exist in the form Expression<Func<T, bool>> So the two that I want to compose are essentially delegates on a parameter (of type T) that both return a boolean. The result I would like composed would be the logical ...
{ "language": "en", "url": "https://stackoverflow.com/questions/53597", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: regex for parsing resource (.rc) files Ulimately I just wanted to extract strings from the .rc file so I could translate them, but anything that goes with .rc files works for me. A: I'd consider usage of gettext and .PO files, if your program fits GNU license 1) I'd suggest extracting from .rc files using state mac...
{ "language": "en", "url": "https://stackoverflow.com/questions/53599", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How can I export Shared Outlook Calendars? I am looking for a solution to export Shared Outlook Calendars (yes, I'm using exchange server and yes I can copy calendar to my local folders, which would allow me to export. However, what if there are more than 50 calendars, which I need to export? Is there a way of autom...
{ "language": "en", "url": "https://stackoverflow.com/questions/53602", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What does 'foo' really mean? I hope this qualifies as a programming question, as in any programming tutorial, you eventually come across 'foo' in the code examples. (yeah, right?) what does 'foo' really mean? If it is meant to mean nothing, when did it begin to be used so? A: I think it's meant to mean nothing. The...
{ "language": "en", "url": "https://stackoverflow.com/questions/53609", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "235" }
Q: How to properly link your a custom css file in sharepoint I've created a custom list, and made some changes to the way the CQWP renders it on a page by modifying ItemStyle.xsl. However, I'd like to use some custom css classes and therefore I'd like to link to my own custom .css file from the head tag of the pages co...
{ "language": "en", "url": "https://stackoverflow.com/questions/53610", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to control IIS 5.1 from command line? I found some informations about controlling IIS 5.1 from command line via adsutil.vbs (http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/d3df4bc9-0954-459a-b5e6-7a8bc462960c.mspx?mfr=true). The utility is available at c:\InetPub\AdminScripts. The uti...
{ "language": "en", "url": "https://stackoverflow.com/questions/53618", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Why is the 'Resource Pool' not supported on the current platform? What could be the possible causes for the following exception? System.PlatformNotSupportedException: 'ResourcePool' is not supported on the current platform. at System.EnterpriseServices.Platform.Assert(Boolean fSuccess, String function) at Syst...
{ "language": "en", "url": "https://stackoverflow.com/questions/53621", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to get whois information of a domain name in my program? I want to get whois information of a domain name from my c#/java programs. Is there a simple way to do this? A: I think, the easiest way is a socket connection to a whois server on port 43. Send the domainname followed by a newline and read the response....
{ "language": "en", "url": "https://stackoverflow.com/questions/53623", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How to deal with poorly informed customer choices Here's a scenario I'm sure you're all familiar with. * *You have a fairly "hands off" customer, who really doesn't want to get too involved in the decision making despite your best efforts. *An experienced development team spend hours discussing the pros and co...
{ "language": "en", "url": "https://stackoverflow.com/questions/53627", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: History of changes to a particular line of code in Subversion Is it possible to see the history of changes to a particular line of code in a Subversion repository? I'd like, for instance, to be able to see when a particular statement was added or when that statement was changed, even if its line number is not the sa...
{ "language": "en", "url": "https://stackoverflow.com/questions/53629", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "80" }
Q: How would you go about using the ASP.NET AJAX Control Toolkit in a project that doesn't use ASP.NET on the back end Your backend could be PHP or Python but you want to use the controls from the ASP.NET toolkit is there a successful way to do this? A: I don't think that it is possible. The ASP.NET AJAX Toolkit is ba...
{ "language": "en", "url": "https://stackoverflow.com/questions/53639", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Creating an object without knowing the class name at design time Using reflection, I need to investigate a user DLL and create an object of a class in it. What is the simple way of doing it? A: System.Reflection.Assembly is the class you will want to use. It contains many method for iterating over the types contain...
{ "language": "en", "url": "https://stackoverflow.com/questions/53649", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: DataTable to readable text string This might be a bit on the silly side of things but I need to send the contents of a DataTable (unknown columns, unknown contents) via a text e-mail. Basic idea is to loop over rows and columns and output all cell contents into a StringBuilder using .ToString(). Formatting is a big...
{ "language": "en", "url": "https://stackoverflow.com/questions/53652", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to effectively work with multiple files in Vim I've started using Vim to develop Perl scripts and am starting to find it very powerful. One thing I like is to be able to open multiple files at once with: vi main.pl maintenance.pl and then hop between them with: :n :prev and see which file are open with: :args...
{ "language": "en", "url": "https://stackoverflow.com/questions/53664", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1206" }
Q: Rhino Mocks - How can I test that at least one of a group of methods is called? Say I have an interface IFoo which I am mocking. There are 3 methods on this interface. I need to test that the system under test calls at least one of the three methods. I don't care how many times, or with what arguments it does call, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/53666", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to efficiently SQL select newest entries from a MySQL database? Possible Duplicate: SQL Query to get latest price I have a database containing stock price history. I want to select most recent prices for every stock that is listed. I know PostreSQL has a DISTINCT ON statement that would suit ideally here. Tab...
{ "language": "en", "url": "https://stackoverflow.com/questions/53670", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How to resolve ORA-011033: ORACLE initialization or shutdown in progress When trying to connect to an ORACLE user via TOAD (Quest Software) or any other means (Oracle Enterprise Manager) I get this error: ORA-011033: ORACLE initialization or shutdown in progress A: This error can also occur in the normal situatio...
{ "language": "en", "url": "https://stackoverflow.com/questions/53676", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "52" }
Q: Amazon SimpleDB Has anyone considered using something along the lines of the Amazon SimpleDB data store as their backend database? SQL Server hosting (at least in the UK) is expensive so could something like this along with cloud file storage (S3) be used for building apps that could grow with your application. Grea...
{ "language": "en", "url": "https://stackoverflow.com/questions/53693", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: Creating MP4/M4A files with Chapter marks I am trying to join together several audio files into one mp4/m4a file containing chapter metadata. I am currently using QTKit to do this but unfortunately when QTKit exports to m4a format the metadata is all stripped out (this has been confirmed as a bug by Apple) see sampl...
{ "language": "en", "url": "https://stackoverflow.com/questions/53705", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Does Delphi call inherited on overridden procedures if there is no explicit call Does Delphi call inherited on overridden procedures if there is no explicit call in the code ie (inherited;), I have the following structure (from super to sub class) TForm >> TBaseForm >> TAnyOtherForm All the forms in the project will...
{ "language": "en", "url": "https://stackoverflow.com/questions/53715", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Hiding data points in Excel line charts It is obviously possible to hide individual data points in an Excel line chart. * *Select a data point. *Right click -> Format Data Point... *Select Patterns *Tab Set Line to None How do you accomplish the same thing in VBA? Intuition tells me there should be a prope...
{ "language": "en", "url": "https://stackoverflow.com/questions/53719", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Will HTML Encoding prevent all kinds of XSS attacks? I am not concerned about other kinds of attacks. Just want to know whether HTML Encode can prevent all kinds of XSS attacks. Is there some way to do an XSS attack even if HTML Encode is used? A: No. Putting aside the subject of allowing some tags (not really the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/53728", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "69" }
Q: Best use of indices on temporary tables in T-SQL If you're creating a temporary table within a stored procedure and want to add an index or two on it, to improve the performance of any additional statements made against it, what is the best approach? Sybase says this: "the table must contain data when the index is c...
{ "language": "en", "url": "https://stackoverflow.com/questions/53734", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: How to escape a # in velocity I would like to know how can i escape a # in velocity. Backslash seems to escape it but it prints itself as well This: \#\# prints: \#\# I would like: ## A: this: #[[ ## ]]# will yield: ## anything within #[[ ... ]]# is unparsed. A: Maybe, the following site helps? htt...
{ "language": "en", "url": "https://stackoverflow.com/questions/53744", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "58" }
Q: Which compiles to faster code: "n * 3" or "n+(n*2)"? Which compiles to faster code: "ans = n * 3" or "ans = n+(n*2)"? Assuming that n is either an int or a long, and it is is running on a modern Win32 Intel box. Would this be different if there was some dereferencing involved, that is, which of these would be faster...
{ "language": "en", "url": "https://stackoverflow.com/questions/53757", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Best Way of Automating Daily Build OK, so we all know the daily build is the heart beat of a project, but whats the single best way of automating it? We have perl scripts wrapping our pipeline which includes ClearCase, VS2005 (C++), Intel FORTRAN, Inno setup. We use cron jobs on UNIX to schedule the build, and host...
{ "language": "en", "url": "https://stackoverflow.com/questions/53766", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How do i generate a histogram for a given probability distribution (for functional testing a server)? I am trying to automate functional testing of a server using a realistic frequency distribution of requests. (sort of load testing, sort of simulation) I've chosen the Weibull distribution as it "sort of" matches th...
{ "language": "en", "url": "https://stackoverflow.com/questions/53786", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Is WindowsFormsHost fit for purpose (.net WPF hosting WinForms)? A GUI driven application needs to host some prebuilt WinForms based components. These components provide high performance interactive views using a mixture of GDI+ and DirectX. The views handle control input and display custom graphical renderings. The...
{ "language": "en", "url": "https://stackoverflow.com/questions/53796", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: What is the best tool to benchmark my JavaScript? I'm currently working on a JavaScript tool that, during the course of its execution, will ultimately traverse each node in the DOM. Because this has potential to be a very expensive task, I'd like to benchmark the performance of this script. What's the best, free too...
{ "language": "en", "url": "https://stackoverflow.com/questions/53802", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Can I turn off automatic merging in Subversion? We're looking at moving from a check-out/edit/check-in style of version control system to Subversion, and during the evaluation we discovered that when you perform an Update action in TortoiseSVN (and presumably in any Subversion client?), if changes in the repository ...
{ "language": "en", "url": "https://stackoverflow.com/questions/53803", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: Reintroducing functions in Delphi What was the motivation for having the reintroduce keyword in Delphi? If you have a child class that contains a function with the same name as a virtual function in the parent class and it is not declared with the override modifier then it is a compile error. Adding the reintroduce ...
{ "language": "en", "url": "https://stackoverflow.com/questions/53806", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "35" }
Q: Can you do "builds" with PHP scripts or an interpreted language? Correct me if I'm wrong, but a "build" is a "compile", and not every language compiles. Continuous Integration involves building components to see if they continue to work beyond unit tests, which I might be oversimplifying. But if your project involve...
{ "language": "en", "url": "https://stackoverflow.com/questions/53807", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Good 15 minute Java question to ask recent college graduate When interviewing college coops/interns or recent graduates it helps to have a Java programming question that they can do on a white board in 15 minutes. Does anyone have examples of good questions like this? A C++ question I was once asked in an intervie...
{ "language": "en", "url": "https://stackoverflow.com/questions/53808", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How do you normally set up your compiler's optimization settings? Do you normally set your compiler to optimize for maximum speed or smallest code size? or do you manually configure individual optimization settings? Why? I notice most of the time people tend to just leave compiler optimization settings to their defa...
{ "language": "en", "url": "https://stackoverflow.com/questions/53811", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Why does windows XP minimize my swing full screen window on my second screen? In the application I'm developping (in Java/swing), I have to show a full screen window on the second screen of the user. I did this using a code similar to the one you'll find below... Be, as soon as I click in a window opened by windows ...
{ "language": "en", "url": "https://stackoverflow.com/questions/53820", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How to specify accepted certificates for Client Authentication in .NET SslStream I am attempting to use the .Net System.Security.SslStream class to process the server side of a SSL/TLS stream with client authentication. To perform the handshake, I am using this code: SslStream sslStream = new SslStream(innerStream, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/53824", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Checking available stack size in C I'm using MinGW with GCC 3.4.5 (mingw-special vista r3). My C application uses a lot of stack so I was wondering is there any way I can tell programatically how much stack is remaining so I can cleanly handle the situation if I find that I'm about to run out. If not what other ways...
{ "language": "en", "url": "https://stackoverflow.com/questions/53827", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "44" }
Q: How to support multiple languages on a microcontroller? I'm currently working on upgrading a product for the Chinese market. The target is a ARMTDMI7 with a QVGA display. Most resources I've located on the net are targeted at desktop or web programming rather than embedded devices. * *Can anyone suggest some tool...
{ "language": "en", "url": "https://stackoverflow.com/questions/53829", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Can XpsDocuments be serialized to XML for storage in a database? And, if not, is the only other alternative a blob? A: XPS documents are zip files that contain XML. You could extract the contents of the zip file and store that in the database, but then you would need to unzip and re-zip every time data came in or o...
{ "language": "en", "url": "https://stackoverflow.com/questions/53841", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How can I evaluate a C# expression dynamically? I would like to do the equivalent of: object result = Eval("1 + 3"); string now = Eval("System.DateTime.Now().ToString()") as string Following Biri s link, I got this snippet (modified to remove obsolete method ICodeCompiler.CreateCompiler(): private object Eval(st...
{ "language": "en", "url": "https://stackoverflow.com/questions/53844", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "62" }
Q: Java Compiler Options to produce .exe files What compiler (I'm using gcj 4.x) options should I use to generate an "exe" file for my java application to run in windows? A: To compile the Java program MyJavaProg.java, type: gcj -c -g -O MyJavaProg.java To link it, use the command: gcj --main=MyJavaProg -o MyJavaProg...
{ "language": "en", "url": "https://stackoverflow.com/questions/53845", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: How do I tokenize a string in C++? Java has a convenient split method: String str = "The quick brown fox"; String[] results = str.split(" "); Is there an easy way to do this in C++? A: Adam Pierce's answer provides an hand-spun tokenizer taking in a const char*. It's a bit more problematic to do with iterators bec...
{ "language": "en", "url": "https://stackoverflow.com/questions/53849", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "468" }
Q: How to create Virtual COM ports I am trying to implement a software Null Modem. Any suggestion how to create virtual COM Ports? Looking for tips, strategy, known techniques, etc.. A: I have used the open-source com0com on windows for this before, and it worked well. The related com2tcp project was more challenging...
{ "language": "en", "url": "https://stackoverflow.com/questions/53857", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Can a Linq query retrieve BLOBs from a Sql Database? Can a Linq query retrieve BLOBs from a Sql Database? And how do they come out? A: LINQ-To-SQL classes create properties of type System.Data.Linq.Binary for all binary and varbinary fields in SQL-Server. The Binary type has a .ToArray() method that returns a byte[...
{ "language": "en", "url": "https://stackoverflow.com/questions/53873", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: In vim, how do I go back to where I was before a search? Programming in vim I often go search for something, yank it, then go back to where I was, insert it, modify it. The problem is that after I search and find, I need to MANUALLY find my way back to where I was. Is there an automatic way to go back to where I was...
{ "language": "en", "url": "https://stackoverflow.com/questions/53911", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "282" }
Q: How can I lay images out in a grid? I'm trying to produce sheets of photographs with captions arranged in a grid using XSLT and XSL-FO. The photo URLs and captions are produced using a FOR XML query against an SQL Server database, and the number of photos returned varies from sheet to sheet. I want to lay the photos...
{ "language": "en", "url": "https://stackoverflow.com/questions/53913", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: SharePoint: Using RichHTML field type in a custom content type I'd like to use the field type RichHTML in a custom content type that I'm making. However, I think that the RichHTML type comes with MOSS Publishing so I'm unsure how to add it to my content type. Right now I've tried with this: <Field ID="{7F55A8F0-4555...
{ "language": "en", "url": "https://stackoverflow.com/questions/53935", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Why can't Visual Studio run on more than one core? CPU at 25% I'm running Visual Studio 2008 with the stuff-of-nightmares awful MS test framework. Trouble is that it's sending my CPU to 100% (well 25% on a quad-core). My question is why can't Visual Studio run on more than one core? Surely M$ must have a sufficien...
{ "language": "en", "url": "https://stackoverflow.com/questions/53939", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Is there a tool that can convert common image formats (.bmp, jpg,..) to .emf files? I'm using the GoDiagrams suite which seems to recommend .emf files for node images since they scale better on resizing. Bitmaps get all blurry. Google doesn't show up any good tools that seem to do this... So to reiterate I'm looking...
{ "language": "en", "url": "https://stackoverflow.com/questions/53941", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Dynamically inserting javascript into HTML that uses document.write I am currently loading a lightbox style popup that loads it's HTML from an XHR call. This content is then displayed in a 'modal' popup using element.innerHTML = content This works like a charm. In another section of this website I use a Flickr 'badg...
{ "language": "en", "url": "https://stackoverflow.com/questions/53945", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "18" }
Q: HTML to Image .tiff File Is there a way to convert a HTML string into a Image .tiff file? I am using C# .NET 3.5. The requirement is to give the user an option to fact a confirmation. The confirmation is created with XML and a XSLT. Typically it is e-mailed. Is there a way I can take the HTML string generated by t...
{ "language": "en", "url": "https://stackoverflow.com/questions/53956", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }