text
string
meta
dict
Q: Visual Studio 2008 -- Can I change which "add reference" tab is selected by default? Every time you start Visual Studio, the first time you click "Add Reference" to add a DLL reference to a project, by default, the .NET tab on that dialog box is selected. As most people reading this have probably noticed, it can ta...
{ "language": "en", "url": "https://stackoverflow.com/questions/199397", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: C++: What's the simplest way to read and write BMP files using C++ on Windows? I would like to load a BMP file, do some operations on it in memory, and output a new BMP file using C++ on Windows (Win32 native). I am aware of ImageMagick and it's C++ binding Magick++, but I think it's an overkill for this project sin...
{ "language": "en", "url": "https://stackoverflow.com/questions/199403", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Eclipse POJO generator plugin Does anyone know of a good Eclipse POJO generator? The generate getter\setters and constructor from fields functions are all really nice, but it would be useful to have that tied into a new class\POJO dialog. A: This is not an Eclipse plug-in, but here's one way to generate Java beans....
{ "language": "en", "url": "https://stackoverflow.com/questions/199405", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Using C++ library in C code I have a C++ library that provides various classes for managing data. I have the source code for the library. I want to extend the C++ API to support C function calls so that the library can be used with C code and C++ code at the same time. I'm using GNU tool chain (gcc, glibc, etc), so...
{ "language": "en", "url": "https://stackoverflow.com/questions/199418", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "116" }
Q: Open command prompt using Eclipse I am new to Java and am trying to run a program using Eclipse. But I have no idea how to get the command prompt running in with Eclipse... I did some online research and couldn't get anything consolidated! Update: I'm not using an applet. It's a normal Java program trying to read a ...
{ "language": "en", "url": "https://stackoverflow.com/questions/199426", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Hibernate Delete Cascade I Have one entity [Project] that contains a collection of other entities [Questions]. I have mapped the relation with a cascade attribute of "all-delete-orphan". In my DB the relation is mapped with a project_id (FK) field on the questions table. this field cannot be null since I don't want ...
{ "language": "en", "url": "https://stackoverflow.com/questions/199428", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: Visual Studio 2008 crashes horribly This has happened to me 3 times now, and I am wondering if anyone is having the same problem. I am running Visual Studio 2008 SP1, and hitting SQL Server 2005 developer edition. For testing, I use the Server Explorer to browse a database I have already created. For testing I wil...
{ "language": "en", "url": "https://stackoverflow.com/questions/199439", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Cross platform Encryption / Decryption applications for secure file transport I have a client who is in need of a file based encryption / decryption application to be used between Linux / Windows 2003 Server. The goal is to have a single file compressed nightly on a linux platform and secured using a script, transm...
{ "language": "en", "url": "https://stackoverflow.com/questions/199459", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Silverlight 2.0 ready for line of business apps Now that Silverlight 2.0 has been officially released I was wondering if anyone was using it for any line of business apps, for example POS, Vertical Market apps etc. If so how were your experiences compared to an old WinForms app or Web app? A: I think Silverlight is...
{ "language": "en", "url": "https://stackoverflow.com/questions/199461", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: C# Image.Clone Out of Memory Exception Why am I getting an out of memory exception? So this dies in C# on the first time through: splitBitmaps.Add(neededImage.Clone(rectDimensions, neededImage.PixelFormat)); Where splitBitmaps is a List<BitMap> BUT this works in VB for at least 4 iterations: arlSplitBitmaps.Add(Ima...
{ "language": "en", "url": "https://stackoverflow.com/questions/199468", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "56" }
Q: Capitalize every file in a directory, in bash, using 'svn mv' I need to change the capitalization of a set of files in a subversion working copy, like so: svn mv test.txt Test.txt svn mv test2.txt Test2.txt svn mv testn.txt Testn.txt ... svn commit -m "caps" How can I automate this process? Standard linux install ...
{ "language": "en", "url": "https://stackoverflow.com/questions/199469", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: What's the main difference between int.Parse() and Convert.ToInt32 * *What is the main difference between int.Parse() and Convert.ToInt32()? *Which one is to be preferred A: No difference as such. Convert.ToInt32() calls int.Parse() internally Except for one thing Convert.ToInt32() returns 0 when argument is nu...
{ "language": "en", "url": "https://stackoverflow.com/questions/199470", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "575" }
Q: SQL Server command LIKE [0-9] won't match any digit between 0 and 9 This is the constraint I have on the Customers table. ALTER TABLE Customers ADD CONSTRAINT CN_CustomerPhone CHECK (Phone LIKE '([0-9][0-9][0-9]) [0-9][0-9][0-9]-[0-9][0-9][0-9][0-9]') Why does this fail? INSERT INTO Customers (CustomerName,...
{ "language": "en", "url": "https://stackoverflow.com/questions/199483", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Why would the rollback method not be available for a DBI handle? For some reason I am having troubles with a DBI handle. Basically what happened was that I made a special connect function in a perl module and switched from doing: do 'foo.pl' to use Foo; and then I do $dbh = Foo->connect; And now for some reason ...
{ "language": "en", "url": "https://stackoverflow.com/questions/199488", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: exporting mysql data to ODF with php I would like to know if someone triend exporting data from MySQL to an ODF format ? Any information / documentation would be very much appreciated. I am going to try to export a MySQL result set to ODF spreadsheet if possible. A: You could try looking at this: http://www.phpclas...
{ "language": "en", "url": "https://stackoverflow.com/questions/199489", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Foreign Key naming scheme I'm just getting started working with foreign keys for the first time and I'm wondering if there's a standard naming scheme to use for them? Given these tables: task (id, userid, title) note (id, taskid, userid, note); user (id, name) Where Tasks have Notes, Tasks are owned by Users, and U...
{ "language": "en", "url": "https://stackoverflow.com/questions/199498", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "185" }
Q: What descriptive variable name can I use here? I'm creating a custom Java Struts tag that is for building and formatting an html select box in a standardised way (part of our usability guidelines). Each select box has an additional/initial value which describes the requirement of the value returned by the select ele...
{ "language": "en", "url": "https://stackoverflow.com/questions/199499", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How do I show running processes in Oracle DB? Is it possible to show other processes in progress on an Oracle database? Something like Sybases sp_who A: I suspect you would just want to grab a few columns from V$SESSION and the SQL statement from V$SQL. Assuming you want to exclude the background processes that O...
{ "language": "en", "url": "https://stackoverflow.com/questions/199508", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "66" }
Q: How to programatically add mapped network passwords (WinXP)? In WinXP (SP2) you can store mapped network passwords... Start->Control Panel->User Accounts->Pick one then choose "Manage my network passwords" from Related Tasks. I normally have about 25-30 servers mapped this way to a few different accounts/domains. T...
{ "language": "en", "url": "https://stackoverflow.com/questions/199518", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: VB.NET - Iterating through controls in a container object I have a form with a "Clear" button. When the user clicks "Clear", I want to clear the value of all the visible elements on the form. In the case of date controls, I want to reset them to the current date. All of my controls are contained on a Panel. Right n...
{ "language": "en", "url": "https://stackoverflow.com/questions/199521", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "22" }
Q: Is the SOAP webservice API availiable in the SSRS 2008 express edition? In other words, if I set up SSRS Express edition will I be able to consume and make calls through the webservice? A: Update: Check this link on features supported. Reporting Services in SQL Server Express with Advanced Services. Your best best ...
{ "language": "en", "url": "https://stackoverflow.com/questions/199525", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Get the name of the currently executing method $0 is the variable for the top level Ruby program, but is there one for the current method? A: Even better than my first answer you can use __method__: class Foo def test_method __method__ end end This returns a symbol – for example, :test_method. To return th...
{ "language": "en", "url": "https://stackoverflow.com/questions/199527", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "222" }
Q: C# Console receive input with pipe I know how to program Console application with parameters, example : myProgram.exe param1 param2. My question is, how can I make my program works with |, example : echo "word" | myProgram.exe? A: You need to use Console.Read() and Console.ReadLine() as if you were reading user inp...
{ "language": "en", "url": "https://stackoverflow.com/questions/199528", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "48" }
Q: Oracle SQL technique to avoid filling trans log Newish to Oracle programming (from Sybase and MS SQL Server). What is the "Oracle way" to avoid filling the trans log with large updates? In my specific case, I'm doing an update of potentially a very large number of rows. Here's my approach: UPDATE my_table SET a_co...
{ "language": "en", "url": "https://stackoverflow.com/questions/199537", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How would you go about implementing the game reversi? (othello) I have been thinking about starting a side project at home to exercise my brain a bit. Reversi looks like a simply game, where mobility has a profound effect on game play. It is at least a step up from tic tac toe. This would be a single player agai...
{ "language": "en", "url": "https://stackoverflow.com/questions/199555", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How can I port a legacy Java/J2EE website to a modern scripting language (PHP,Python/Django, etc)? I want to move a legacy Java web application (J2EE) to a scripting language - any scripting language - in order to improve programming efficiency. What is the easiest way to do this? Are there any automated tools that ...
{ "language": "en", "url": "https://stackoverflow.com/questions/199556", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: A shell script for timing my program measures it at 0 seconds My professor wrote this shell script to time my program, and display the results. For some reason it just outputs 0s with my program. He provided the following files: timeit.csh sequence ecoli2500.txt ecoli3000.txt ecoli5000.txt ecoli7000.txt...
{ "language": "en", "url": "https://stackoverflow.com/questions/199564", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to make a Java Canvas look raised from its container I have a simple GUI component written in Java. The class draws an analog clock in a java.awt.canvas. This canvas is then contained in a JFrame - What I want to do is give the canvas a 3d "raised" effect - almost like adding a drop shadow to a photo. Is there ...
{ "language": "en", "url": "https://stackoverflow.com/questions/199575", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Can vmWare Server be installed in a X-less host? I am planning to move my vmWare's Virtual Machines from a Windows host to a Linux host (Ubuntu). It is possible to run vmWare Server in a Linux host that does not have the graphical environment (does not have X)? I just wonder how the graphical setup of Windows/Linux ...
{ "language": "en", "url": "https://stackoverflow.com/questions/199576", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Populate select drop down from a database table I have a table ("venues") that stores all the possible venues a volunteer can work, each volunteer is assigned to work one venue each. I want to create a select drop down from the venues table. Right now I can display the venue each volunteer is assigned, but I want it...
{ "language": "en", "url": "https://stackoverflow.com/questions/199597", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: 100% in-memory HSQL database I have a Java application set up as a service to do data-mining against ~3GB of data every few hours. I would like this to occur 100% in memory. Ideally I want the application to be isolated from everything; I want it to construct the database, do the mining I need, and tear down the d...
{ "language": "en", "url": "https://stackoverflow.com/questions/199598", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: How do you stringize/serialize Ruby code? I want to be able to write a lambda/Proc in my Ruby code, serialize it so that I can write it to disk, and then execute the lambda later. Sort of like... x = 40 f = lambda { |y| x + y } save_for_later(f) Later, in a separate run of the Ruby interpreter, I want to be able t...
{ "language": "en", "url": "https://stackoverflow.com/questions/199603", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: GTK+ or Qt under Windows I was wondering which one should I consider if I need the software to be used on both platforms, WIN and Linux and why? A: GTK+ you can use almost in all programming languages, in C++ (using gtkmm) in C (gtk+) in C# (with Gtk#) in Python (PyGtk). Behind GTK you have Mono Framework which is ...
{ "language": "en", "url": "https://stackoverflow.com/questions/199604", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "24" }
Q: Can I compile legacy MFC applications with Visual Studio 2008? I maintain several old MFC applications using Visual Studio 7 and I was considering upgrading to Visual Studio 2008. After reading this question, I realise that the Express edition will not be able to do this. Does anyone know if I will be able to compil...
{ "language": "en", "url": "https://stackoverflow.com/questions/199605", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How should C bitflag enumerations be translated into C++? C++ is mostly a superset of C, but not always. In particular, while enumeration values in both C and C++ implicitly convert into int, the reverse isn't true: only in C do ints convert back into enumeration values. Thus, bitflags defined via enumeration declar...
{ "language": "en", "url": "https://stackoverflow.com/questions/199606", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Core Animation rotating a layer around arbitrary point How can I rotate a layer using Core Animation around an arbitrary point? ( In my case a point that is not inside the layer I want to rotate ) I prefer doing this without changing the anchor point, because unless I get something wrong every time I change the anch...
{ "language": "en", "url": "https://stackoverflow.com/questions/199608", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: How do I create a variant array of BSTR in Euphoria using EuCOM? So far I've figured out how to pass Unicode strings, bSTRs, to and from a Euphoria DLL using a Typelib. What I can't figure out, thus far, is how to create and pass back an array of BSTRs. The code I have thus far (along with includes for EuCOM itself ...
{ "language": "en", "url": "https://stackoverflow.com/questions/199612", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: In SQL Server 2008 how can I secure data in a way that it cannot be decrypted unless connected to a network? We have recently implemented Transparent Data Encryption in SQL Server 2008 for local databases on our developers laptops to keep them protected in the case a laptop is stolen or lost. This works fine. Now w...
{ "language": "en", "url": "https://stackoverflow.com/questions/199613", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Are brittle unit tests always a bad thing? At times I find a very brittle test to be a good thing because when I change the intent of the code under test I want to make sure my unit test breaks so that I'm forced to refactor ... is this approach not recommended when building a large suite of regression tests? A: Th...
{ "language": "en", "url": "https://stackoverflow.com/questions/199615", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: scp transfer via java What is the best method of performing an scp transfer via the Java programming language? It seems I may be able to perform this via JSSE, JSch or the bouncy castle java libraries. None of these solutions seem to have an easy answer. A: I wrapped Jsch with some utility methods to make it a bit ...
{ "language": "en", "url": "https://stackoverflow.com/questions/199624", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "86" }
Q: Converting C source to C++ How would you go about converting a reasonably large (>300K), fairly mature C codebase to C++? The kind of C I have in mind is split into files roughly corresponding to modules (i.e. less granular than a typical OO class-based decomposition), using internal linkage in lieu private function...
{ "language": "en", "url": "https://stackoverflow.com/questions/199627", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "43" }
Q: IDL declaration (in C++) for a function that will take a C-style array from C# I am working with an existing code base made up of some COM interfaces written in C++ with a C# front end. There is some new functionality that needs to be added, so I'm having to modify the COM portions. In one particular case, I need to...
{ "language": "en", "url": "https://stackoverflow.com/questions/199629", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to choose colors in web development When I build a site I tend to do a bit of graphic design (developer style) in Paint.NET, but how do I know the colors will all display properly on all browsers on different machines? What color depth to you generally code for? 16bit 256 colors etc. A: I don't worry about whet...
{ "language": "en", "url": "https://stackoverflow.com/questions/199631", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How to show compulsory fields on a windows form How should I show users which fields are compulsory in a windows forms application. I have considered changing the label color or maybe the background color of the text box. I use an error provider to show a red exclamation mark next to the field, however this is only ...
{ "language": "en", "url": "https://stackoverflow.com/questions/199633", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Is there a Ruby .NET Compiler? Is there a .NET Framework compiler for the Ruby language? I've heard of the DLR (Dynamic Language Runtime), is this going to enable Ruby to be used with .NET development? A: IronRuby is a project supported by Microsoft, built on the Dynamic Language Runtime. A: Yep, the Ruby.NET proj...
{ "language": "en", "url": "https://stackoverflow.com/questions/199638", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: How to insert 'Empty' field in ComboBox bound to DataTable I have a combo box on a WinForms app in which an item may be selected, but it is not mandatory. I therefore need an 'Empty' first item to indicate that no value has been set. The combo box is bound to a DataTable being returned from a stored procedure (I off...
{ "language": "en", "url": "https://stackoverflow.com/questions/199642", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: JQuery "Any Row" Picker I'm looking for a generic "Row Picker" for JQuery. We've all seen the cool "Picker" tools like date pickers, color pickers, time pickers, etc, where you click in a text box and a little calendar or color palate or clock or something comes up. You select something (like a date) and the text b...
{ "language": "en", "url": "https://stackoverflow.com/questions/199651", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What Linux shell should I use? I've used bash, csh, and tcsh. But I asked this question, and Jonathan informed me that csh isn't to be trusted. So what Linux shell is good for development. and why? A: I usually stick to bash, because it's more friendly than straight-up sh, and it's the default on every distro I'v...
{ "language": "en", "url": "https://stackoverflow.com/questions/199661", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "59" }
Q: Ruby SOAP SSL Woes I have a SOAP client in Ruby that I'm trying to get working with a Ruby SOAP server, to no avail. The client works fine over SSL with a Python SOAP server, but not with the Ruby version. Here's what the server looks like: require 'soap/rpc/standaloneServer' require 'soap/rpc/driver' require 'rubyg...
{ "language": "en", "url": "https://stackoverflow.com/questions/199665", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Algorithm for Grouping I am trying to help someone write a program that I thought would be easy, but of course it never is :) I am trying to take a class roster (usually between 10-20 students) and effectivly uniquely pair off each classmate to another to make unique groups. Therefore in a class of 10 people, you ca...
{ "language": "en", "url": "https://stackoverflow.com/questions/199677", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How do I send mouse/keyboard input without triggering LLMHF_INJECTED flag? At the moment I use the SendInput() function but if you install a low level mouse hook the LLMHF_INJECTED is set indicating that the input was injected into the stream. Is there a way of sending mouse and keyboard input so that LLMHF_INJECTED...
{ "language": "en", "url": "https://stackoverflow.com/questions/199687", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: What is the best VISUAL RAD environment for building Web databases? I am referring to a truly visual environment, and not something that claims to be visual but requires mountains of hand-coded script, or a code generator that farts out a Web site and leaves you to start editing in Visual Studio. Are there any trul...
{ "language": "en", "url": "https://stackoverflow.com/questions/199691", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Inherit css properties I have only a basic knowledge of css, is it possible to inherit a property from one style into another style. So for instance I could inherit the font size specified in my default paragrah tag settings into my hyperlink tags. The reason I want to do this is to make it easier to maintain multip...
{ "language": "en", "url": "https://stackoverflow.com/questions/199692", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "7" }
Q: Microsoft Unit Testing failure, unable to load DLL to test I've got a .NET 3.5 class lib that I am trying to write some automated tests for but I'm getting the following error when running any tests in the solution: Test method Common.Tests.CommonTests.TestMethod1 threw exception: System.IO.FileNotFoundException: ...
{ "language": "en", "url": "https://stackoverflow.com/questions/199702", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Can you Instantiate an Object Instance from JSON in .NET? Since Object Initializers are very similar to JSON, and now there are Anonymous Types in .NET. It would be cool to be able to take a string, such as JSON, and create an Anonymous Object that represents the JSON string. Use Object Initializers to create an Ano...
{ "language": "en", "url": "https://stackoverflow.com/questions/199718", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: .NET's equivalent of Java's MemoryImageSource I found a wonderful open source Java program that I'm translating into C#. The built-in translator in Visual Studio got me started and I've now spent about a month translating the rest manually line by line. I've completed over 15,000 lines of translation and the only th...
{ "language": "en", "url": "https://stackoverflow.com/questions/199723", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Setting gc.refLogExpire How do I set gc.reflogExpire so that items will never expire? What other time interval formats does it accept? The man page says that you can set it to "90 days or 3 months," but doesn't specify what format it expects. A: I’m not sure where the format is documented, if at all, but git reflog...
{ "language": "en", "url": "https://stackoverflow.com/questions/199728", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Best practice: How to track outbound links? How do you track outbound links for your web site, since the request is logged on the destination server, not yours? A: You can add a quick JQuery script to the page that will track external links and can either redirect them to a file on your server that will track the ...
{ "language": "en", "url": "https://stackoverflow.com/questions/199731", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: Is there an idiom for letting an element scroll with the page only until it hits the top of the browser? Basically I am looking to accomplish something similar to the affect that yelp uses to have the map follow you down the page on their search results page but I'd rather have it be instantaneous rather than have i...
{ "language": "en", "url": "https://stackoverflow.com/questions/199733", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What should the HTTP response be when the resource is forbidden but there's an alternate resource? If I have a resource that a requesting client doesn't have access to but I want to notify them about an alternate resource for which they do have access, should I send them a 403 Forbidden with the alternate resource's...
{ "language": "en", "url": "https://stackoverflow.com/questions/199737", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Loading a video from the local file system I have a swf that is run from C:/ in the browser instead of a server (long story) and that swf loads a video that it located at ../../videos/video in relation to that swf. Problem is, When I run it in Flex, everything is cool. Running locally, it can't find the file (not a...
{ "language": "en", "url": "https://stackoverflow.com/questions/199746", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How to detect possible / potential stack overflow problems in a c / c++ program? Is there a standard way to see how much stack space your app has and what the highest watermark for stack usage is during a run? Also in the dreaded case of actual overflow what happens? Does it crash, trigger an exception or signal? I...
{ "language": "en", "url": "https://stackoverflow.com/questions/199747", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "43" }
Q: How can you use optional parameters in C#? Note: This question was asked at a time when C# did not yet support optional parameters (i.e. before C# 4). We're building a web API that's programmatically generated from a C# class. The class has method GetFooBar(int a, int b) and the API has a method GetFooBar taking que...
{ "language": "en", "url": "https://stackoverflow.com/questions/199761", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "577" }
Q: How do I get the terminal within GVim to react to mouse scrolls? I'm on a Hardy Heron Ubuntu build, BTW. A: Try: :set mouse=a ":help mouse" says Enable the use of the mouse. Only works for certain terminals (xterm, MS-DOS, Win32 |win32-mouse|, qnx pterm, and Linux console with gpm). For using the mouse in the GUI...
{ "language": "en", "url": "https://stackoverflow.com/questions/199769", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: What is the purpose of Installer class in Visual studio 2005 I have come to see an Installer class item in Visual studio. Why they have maintain an seperate item for Installer. Do they create any custom installers ? A: The Installer class can be used to configure items such as performance counters and message queue...
{ "language": "en", "url": "https://stackoverflow.com/questions/199773", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Postgres JDBC connection in Eclipse Help I'm trying to get a postgres jdbc connection working in eclipse. It would be nice to use the Data Source Explorer, but for now I'm just trying to get a basic connection. What I have done so far is download the postgres JDBC connector. I then tried two different things. First,...
{ "language": "en", "url": "https://stackoverflow.com/questions/199774", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Lost use of forward slash in windows command prompt I can no longer use / at the windows xp command prompt, and it seems to have started after a botched cygwin installation, e.g. cd /windows won't work, but used to. Can anyone think of how this might have happened? OOPS! It doesn't normally work in XP, though I had ...
{ "language": "en", "url": "https://stackoverflow.com/questions/199792", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do you make GridView load images with a DataSet in ASP.NET 2.0? I have a pictures table that has the following columns: PICTURE_ID int IDENTITY(1000,1) NOT NULL, CATEGORY_ID int NOT NULL, IMGDATA image NOT NULL, CAPTION1 text COLLATE SQL_Latin1_General_CP1_CI_AS NULL, MIME_TYPE nchar(20) NOT NULL DEFAULT ('image...
{ "language": "en", "url": "https://stackoverflow.com/questions/199808", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Can I parameterize a CruiseControl.NET project configuration such that the parameters are exposed by the web interface? I am currently trying to use NAnt and CruiseControl.NET to manage various aspects of my software development. Currently, NAnt handles just about everything, including replacing environment specific...
{ "language": "en", "url": "https://stackoverflow.com/questions/199819", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: how to SOAP with PHP to a SAP Erecruitment database Our team is working on SAP and getting a website frontend written with PHP and MySQL to connect with the recruitment database on SAP ... we've tried making SOAP clients and everything but it seems we're missing something.. what are the steps to ensure that they can...
{ "language": "en", "url": "https://stackoverflow.com/questions/199822", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Best practices for assembly naming and versioning? I am looking out for some good practices on naming assemblies and versioning them. How often do you increment the major or minor versions? In some cases, I have seen releases going straight from version 1.0 to 3.0. In other cases, it seems to be stuck at version 1.0...
{ "language": "en", "url": "https://stackoverflow.com/questions/199823", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "38" }
Q: ASP.NET : Hiding columns in gridview Is there a way I can control columns from code. I had a drop drop box with select : Daily and weekend and the gridview column with Monday, Tuesday, Wednesday, Thursday, Friday, Saturday,sunday. If the user selects Daily i want to show columns only from Monday to Friday. It is p...
{ "language": "en", "url": "https://stackoverflow.com/questions/199832", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: random access file in java I have the following fields: * *Inventory control (16 byte record) * *Product ID code (int – 4 bytes) *Quantity in stock (int – 4 bytes) *Price (double – 8 bytes) How do I create a fixed length random access file using the above lengths? I tried some examples online, but I eithe...
{ "language": "en", "url": "https://stackoverflow.com/questions/199847", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Silverlight ImageButton UserControl I am just starting out with Silverlight (2 RC0) and can’t seem to get the following to work. I want to create a simple image button user control. My xaml for the user control is as follows: <Button> <Button.Template> <ControlTemplate> <Imag...
{ "language": "en", "url": "https://stackoverflow.com/questions/199866", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: What is the best way to deal with environment specific configuration in java? I have an application running in tomcat that has a bunch of configuration files that are different for each environment it runs in (dev, testing, and production). But not every line in a config file will be different between environments s...
{ "language": "en", "url": "https://stackoverflow.com/questions/199869", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: JavaScript library to create div-style window within page Im trying to find out a good JavaScript library that can create a nice "inner-window" popup within a page on my site. I would like to not have to worry about screen positioning (i.e. dont have to calcuate if the size of the window will be off screen, etc...),...
{ "language": "en", "url": "https://stackoverflow.com/questions/199872", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Setting Background Color CMDIFrameWnd Is there a way to change the color of the background for a MDIParent windows in MFC (2005)? I have tried intercepting ON_WM_CTLCOLOR AND ON_WM_ERASEBKGND but neither work. OnEraseBkgnd does work, but then it gets overwritten by the standard WM_CTL color. Cheers A: Create a clas...
{ "language": "en", "url": "https://stackoverflow.com/questions/199876", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to ensure a DOM element triggers mouseover when it contains a Flash object I have a div that contains several child elements, one of which is a flash movie. When rolling over this div, I want it to change style to indicate it is rolled over. My problem is that the mouseover and mouseout events don't always trigg...
{ "language": "en", "url": "https://stackoverflow.com/questions/199879", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Escaping ' in Access SQL I'm trying to do a domain lookup in vba with something like this: DLookup("island", "villages", "village = '" & txtVillage & "'") This works fine until txtVillage is something like Dillon's Bay, when the apostrophe is taken to be a single quote, and I get a run-time error. I've written a tr...
{ "language": "en", "url": "https://stackoverflow.com/questions/199889", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "25" }
Q: I've never encountered a well written business layer. Any advice? I look around and see some great snippets of code for defining rules, validation, business objects (entities) and the like, but I have to admit to having never seen a great and well-written business layer in its entirety. I'm left knowing what I don't...
{ "language": "en", "url": "https://stackoverflow.com/questions/199890", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: How to tell NHibernate always to force quoted identifiers? As the title: How would I tell NHibernate, once and for all, that all table and column names are to be quoted in the SQL it generates? A: You can also try: SchemaMetadataUpdater.QuoteTableAndColumns(configuration); A: You need to add <property name="hbm2...
{ "language": "en", "url": "https://stackoverflow.com/questions/199896", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Turn on Description panel in the standard CollectionEditor I have a component which has a List<T> property. The class in the list has each of its properties decorated with a description attribute but the descriptions do not show up in the Collection Editor In the IDE designer is there a way to turn on the Descriptio...
{ "language": "en", "url": "https://stackoverflow.com/questions/199897", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: MySQL and comments Is it possible to add comments somehow, somewhere? I don't pretend to be any sort of expert when using MySQL and certainly don't spend all day in it. More often than I would like I forget how I intend to use a column (usally the bit ones) and would be very excited if I could add a comment to re...
{ "language": "en", "url": "https://stackoverflow.com/questions/199905", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "42" }
Q: What are the better ways to protect commercial .NET software from being casually copied? The main focus of the package is developer tools but there is also one component (a DLL) that some small number of developers would like to redistribute with their own application. This is managed code running under .NET 3.5. A...
{ "language": "en", "url": "https://stackoverflow.com/questions/199909", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Explaining pattern matching vs switch I have been trying to explain the difference between switch statements and pattern matching(F#) to a couple of people but I haven't really been able to explain it well..most of the time they just look at me and say "so why don't you just use if..then..else". How would you explai...
{ "language": "en", "url": "https://stackoverflow.com/questions/199918", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "72" }
Q: How to determine whether SqlConnection is enlisted into a System.Transactions' tx or not? When we using a transation from System.Transactions (creating TransationScope for an instance) by default all Sql-connections (System.Data.SqlClient.SqlConnection) (but is't also the true for Oracle.DataAccess.OracleConnection)...
{ "language": "en", "url": "https://stackoverflow.com/questions/199935", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Update row status using ajax I am currently trying to program my first ajax interface using Rails. The application currently shows a table populated with list items. The user has to approve or reject each of the list items. I currently have an edit link at the end of each row that shows a form in which I can approve...
{ "language": "en", "url": "https://stackoverflow.com/questions/199936", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do you join on the same table, twice, in mysql? I have 2 tables. One (domains) has domain ids, and domain names (dom_id, dom_url). the other contains actual data, 2 of which columns require a TO and FROM domain names. So I have 2 columns rev_dom_from and rev_dom_for, both of which store the domain name id, from ...
{ "language": "en", "url": "https://stackoverflow.com/questions/199953", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "114" }
Q: What is the equivalent of Thread.SetApartmentState in C++? In C# there is a method SetApartmentState in the class Thread. How do I do the same thing in C++? A: For unmanaged processes, you control the apartment model used for a thread by passing appropriate parameters to CoInitializeEx(). Larry Osterman wrote up a ...
{ "language": "en", "url": "https://stackoverflow.com/questions/199959", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Getting full path for Windows Service How can I find out the folder where the windows service .exe file is installed dynamically? Path.GetFullPath(relativePath); returns a path based on C:\WINDOWS\system32 directory. However, the XmlDocument.Load(string filename) method appears to be working against relative path i...
{ "language": "en", "url": "https://stackoverflow.com/questions/199961", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "59" }
Q: F# - Domain Specific Language Is the F# is the future of programming languages? Is it right time to learn F# ? Any other languages in the market which is equivalent to F#? A: F# is a general-purpose, object-oriented functional language and there isn't anything about it that's specifically designed for domain-specif...
{ "language": "en", "url": "https://stackoverflow.com/questions/199962", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How do you use gcc to generate assembly code in Intel syntax? The gcc -S option will generate assembly code in AT&T syntax, is there a way to generate files in Intel syntax? Or is there a way to convert between the two? A: I have this code in CPP file: #include <conio.h> #include <stdio.h> #include <windows.h> in...
{ "language": "en", "url": "https://stackoverflow.com/questions/199966", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "177" }
Q: COM: calling from other thread causes crashes, how to make it run on the same thread? I am doing a BHO (extension for IE) that receives events on other thread. When I access the DOM from that other thread, IE crashes. Is it possible to make the DOM accessed from the same thread as the main BHO thread so that it does...
{ "language": "en", "url": "https://stackoverflow.com/questions/199972", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Is unit testing appropriate for short programs I'm not a newbie since I've been programming on and off since 1983, but I only have real experience with scripting languages like Applescript, ARexx, HyperTalk and Bash. I write scripts to automate data entry, batch process images and convert file formats. I dabble at P...
{ "language": "en", "url": "https://stackoverflow.com/questions/199978", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: How to add different controls in Gridview? I know it's possible to change some columns in GridView controls to check boxes and when you are editing certain rows, the cells being hi-lited become text boxes, but supposed I want to add other controls in my gridView. For example: in the image below how would I change th...
{ "language": "en", "url": "https://stackoverflow.com/questions/199986", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How much compatibility do the DB engines have at the SQL level? Let's say I wanted to have an application that could easily switch the DB at the back-end. I'm mostly thinking of SQL Server as the primary back-end, but with the flexibility to go another DB engine. Firebird and PostGreSQL seem to have (from my brief ...
{ "language": "en", "url": "https://stackoverflow.com/questions/199987", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: With scons, how do you link to prebuilt libraries? I recently started using scons to build several small cross-platform projects. One of these projects needs to link against pre-built static libraries... how is this done? In make, I'd just append "link /LIBPATH:wherever libstxxl.lib" on windows, and "stxxl.a" on un...
{ "language": "en", "url": "https://stackoverflow.com/questions/199999", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Get last result in interactive Python shell In many symbolic math systems, such as Matlab or Mathematica, you can use a variable like Ans or % to retrieve the last computed value. Is there a similar facility in the Python shell? A: Underscore. >>> 5+5 10 >>> _ 10 >>> _ + 5 15 >>> _ 15 A: IPython allows you to go ...
{ "language": "en", "url": "https://stackoverflow.com/questions/200020", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "200" }
Q: Are C++ meta-templates required knowledge for programmers? In my experience Meta-templates are really fun (when your compilers are compliant), and can give good performance boosts, and luckily I'm surrounded by seasoned C++ programmers that also grok meta-templates, however occasionally a new developer arrives and c...
{ "language": "en", "url": "https://stackoverflow.com/questions/200032", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Removing entry of an application from add/remove programs in c# I have developed an installer class which removes certain folders from the base dir.However,I also want to remove the entry of another application from add/remove programs through the inst class.Could anyone suggest the solution. Regards, Harsh Suman A...
{ "language": "en", "url": "https://stackoverflow.com/questions/200037", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }