instruction_seed
stringlengths
1
35.8k
_source
stringclasses
1 value
How do you unit test a large MFC UI application? We have a few large MFC applications that have been in development for many years, we use some standard automated QA tools to run basic scripts to check fundamentals, file open etc. These are run by the QA group post the daily build. But we would like to introduce proced...
stackexchange/codereview
We are working on an S60 version and this platform has a nice Python API.. However, there is nothing official about Python on Android, but since Jython exists, is there a way to let the snake and the robot work together??
stackexchange/codereview
How do you perform the equivalent of Oracle's DESCRIBE TABLE in PostgreSQL with psql command?
stackexchange/codereview
I'm on the lookout for tools to migrate from ClearCase to SVN. Ideally would like to get all history information, or as much as can be acquired. Incremental merges would be very beneficial but isn't required.
stackexchange/codereview
I just saw a really cool WPF twitter client that I think is developed by the Herding Code podcast guys HerdingCode called Witty. (or at least, I see a lot of those guys using this client). This project is currently posted up on Google Code. Many of the projects on Google Code use Subversion as the version control sys...
stackexchange/codereview
I've just inherited a java application that needs to be installed as a service on XP and vista. It's been about 8 years since I've used windows in any form and I've never had to create a service, let alone from something like a java app (I've got a jar for the app and a single dependency jar - log4j). What is the magi...
stackexchange/codereview
I'm not overly familiar with Tomcat, but my team has inherited a complex project that revolves around a Java Servlet being hosted in Tomcat across many servers. Custom configuration management software is used to write out the server.xml, and various resources (connection pools, beans, server variables, etc) written in...
stackexchange/codereview
For those of you familiar with Gallio, what Advantages and Disadvantages have you experienced using this tool, a so-called Test Automation Platform?
stackexchange/codereview
Is it possible for SelectNodes() called on an XmlDocument to return null? My predicament is that I am trying to reach 100% unit test code coverage; ReSharper tells me that I need to guard against a null return from the SelectNodes() method, but I can see no way that an XmlDocument can return null (and therefore, no way...
stackexchange/codereview
AKA - What's this obsession with pointers? Having only really used modern, object oriented languages like ActionScript, Java and C#, I don't really understand the importance of pointers and what you use them for. What am I missing out on here?
stackexchange/codereview
I'm trying to make a data bound column invisible after data binding, because it won't exist before data binding. However, the DataGrid.Columns collection indicates a count of 0, making it seem as if the automatically generated columns don't belong to the collection. How can I make a column that is automatically genera...
stackexchange/codereview
I have an algorithm that generates strings based on a list of input words. How do I separate only the strings that sounds like English words? ie. discard RDLO while keeping LORD. EDIT: To clarify, they do not need to be actual words in the dictionary. They just need to sound like English. For example KEAL would be acce...
stackexchange/codereview
I am looking for a simple unpatented one-way encryption algorithm, preferably in c. I would like to use it to validate passwords.
stackexchange/codereview
I am serializing a JPEG Image in c#.net. I am simply converting it into a byte steam and sending it through web service. I observed that serialized byte stream is 30 times more than that of the size of actual image. Can any one suggest me a better approach to serialize and stay relative to the size of the actual image...
stackexchange/codereview
I'd like to have some rails apps over different servers sharing the same session. I can do it within the same server but don't know if it is possible to share over different servers. Anyone already did or knows how to do it? Thanks
stackexchange/codereview
I'm looking for a way to find the name of the Windows default printer using unmanaged C++ (found plenty of .NET examples, but no success unmanaged). Thanks.
stackexchange/codereview
When a process in jBPM forks into concurrent paths, each of these paths gets their own copy of the process variables, so that they run isolated from each other. But what happens when the paths join again ? Obviously there could be conflicting updates. Does the context revert back to the state before the fork? Can I cho...
stackexchange/codereview
I want to take a screenshot via a python script and unobtrusively save it. I'm only interested in the Linux solution, and should support any X based environment.
stackexchange/codereview
I'm running VisualSVN as my SVN server and using TortoiseSVN as the client. I've just renamed the server from mach1 to mach2 and now can't use SVN because it's looking for the repositories at http://mach1:81/ instead of the new name http://mach2:81/ Any idea how to fix this?
stackexchange/codereview
I want to create a box like this with title: Can any one please let me know if there is a default CSS tag to do this? Or do I need to create my custom style?
stackexchange/codereview
While working on a tool that allows to exchange images of several third-party applications and thus creating individual "skins" for those applications, I have stumbled across a jpg-format about which I cannot seem to find any decent informations. When looking at it in a hex-editor, it starts with the tag "CF10". Search...
stackexchange/codereview
I want to try to convert a string to a Guid, but I don't want to rely on catching exceptions ( for performance reasons - exceptions are expensive for usability reasons - the debugger pops up for design reasons - the expected is not exceptional In other words the code: public static Boolean TryStrToGuid(String s, out...
stackexchange/codereview
How do I programmatically set the record pointer in a C# DataGridView? I've tried "DataGridView.Rows[DesiredRowIndex].Selected=true;", and that does not work. All it does is highlight that row within the grid; it doesn not move the record pointer to that row.
stackexchange/codereview
With web services it is considered a good practice to batch several service calls into one message to reduce a number of remote calls. Is there any way to do this with RESTful services?
stackexchange/codereview
Is there a place to find all possible uses of the syscmd method in MS Access? I know Microsoft has a developer reference, but I have found there are many other uses for this method that are not listed here.
stackexchange/codereview
Starting from ASP.NET MVC Preview 3, HTML.Button ( and other related HTML controls) are no longer supported. The question is, what is the equivalent for them? I've an app that was built using Preview 2, now I have to make it compatible with the latest CTP releases.
stackexchange/codereview
I'm trying to create a standard way of rolling out web applications for our company. Currently we do it with zip files, vbscript/javascript, and manual some steps. For thick client installs we generate MSI installers using Wise/Wix. We don't create installers currently for websites as in general they are just xcopy...
stackexchange/codereview
How do I tokenize the string: "2+24*48/32" Into a list: ['2', '+', '24', '*', '48', '/', '32']
stackexchange/codereview
Given an arbitrary string, what is an efficient method of finding duplicate phrases? We can say that phrases must be longer than a certain length to be included. Ideally, you would end up with the number of occurrences for each phrase.
stackexchange/codereview
For a registration form I have something simple like: <tr:panelLabelAndMessage label="Zip/City" showRequired="true"> <tr:inputText id="zip" value="#{data['registration'].zipCode}" contentStyle="width:36px" simp...
stackexchange/codereview
I need to update a combobox with a new value so it changes the reflected text in it. The cleanest way to do this is after the comboboxhas been initialised and with a message. So I am trying to craft a postmessage to the hwnd that contains the combobox. So if I want to send a message to it, changing the currently select...
stackexchange/codereview
I have a Property Grid in C#, loading up a 'PropertyAdapter' object (a basic wrapper around one of my objects displaying relevant properties with the appropriate tags) I have a TypeConverter on one of the properties (DataType, that returns an enumeration of possible values) as I want to limit the values available to th...
stackexchange/codereview
I'm trying to find/make an algorithm to compute the intersection (a new filled object) of two arbitrary filled 2D objects. The objects are defined using either lines or cubic beziers and may have holes or self-intersect. I'm aware of several existing algorithms doing the same with polygons, listed here. However, I'd li...
stackexchange/codereview
What is the JavaScript to scroll to the top when a button/link/etc. is clicked?
stackexchange/codereview
We have a medium sized .js file that we include in our web framework that I am porting over to SharePoint. However, I'm not sure how to go about this or what the best practice is. This is for a framework solution that will be used by other client projects, so it's best for it to be self contained and deploy-able, rathe...
stackexchange/codereview
I'm looking to learn about embedded programming (in C mainly, but I hope to brush up on my ASM as well) and I was wondering what the best platform would be. I have some experience in using Atmel AVR's and programming them with the stk500 and found that to be relatively easy. I especially like AVR Studio and the debugge...
stackexchange/codereview
Is there anything out there that for .NET that can generate UML diagrams from code. Preferably an addin for Visual Studio. Starting work on a mature project that has little architectural documentation can be painful at first. Eventually you get the ins and outs of the code but helping to see how the code all fits toget...
stackexchange/codereview
I have a datagridview with a DataGridViewComboboxColumn column with 3 values: "Small", "Medium", "Large" I get back the users default which in this case is "Medium" I want to show a dropdown cell in the datagridview but default the value to "Medium". i would do this in a regular combobox by doing selected index or ju...
stackexchange/codereview
I installed Visual Studio 2005 ( with SP1 ) and made the default settings as what is required for C++ . Now i open a solution and run the exe . Under " Tools " menu item i go and Select " Attach the process " and i attach it to the exe i just ran . I put breakpoints several places in the code ( this breakpoints looks...
stackexchange/codereview
I've been looking at ways people test their apps in order decide where to do caching or apply some extra engineering effort, and so far httperf and a simple sesslog have been quite helpful. What tools and tricks did you apply on your projects?
stackexchange/codereview
I used jQuery to set hover callbacks for elements on my page. I'm now writing a module which needs to temporarily set new hover behaviour for some elements. The new module has no access to the original code for the hover functions. I want to store the old hover functions before I set new ones so I can restore them when...
stackexchange/codereview
Does anybody know of a way to list up the "loaded plugins" in Vim? I know I should be keeping track of this kind of stuff myself but it would always be nice to be able to check the current status.
stackexchange/codereview
I copied some Delphi code from one project to another, and found that it doesn't compile in the new project, though it did in the old one. The code looks something like this: procedure TForm1.CalculateGP(..) const Price : money = 0; begin ... Price := 1.0; ... end; So in the new project, Delphi complains t...
stackexchange/codereview
I'm building an application in C# using WPF. How can I bind to some keys? Also, how can I bind to the Windows key?
stackexchange/codereview
I have 2 detail sections on my report (details a and details b). Fields in both sections can grow up to 10 lines. How do I force the Crystal Report to print both sections on one page? Currently the report on bottom page print section "details a", but section "details b" prints on next page. How do I prevent this behav...
stackexchange/codereview
Is there a function in python to split a word into a list of single letters? e.g: s = "Word to Split" to get wordlist = ['W', 'o', 'r', 'd', ' ', 't', 'o', ' ', 'S', 'p', 'l', 'i', 't']
stackexchange/codereview
I have the following query: select column_name, count(column_name) from table group by column_name having count(column_name) > 1; What would be the difference if I replaced all calls to count(column_name) to count(*)? This question was inspired by How do I find duplicate values in a table in Oracle?. To clarify the a...
stackexchange/codereview
How do you stop the "Default SMTP Virtual Server" from sending bounce messages for email addresses that you don't have? i.e. I'm using IIS' SMTP server to handle my email and if an email is sent unknown at mydomain.com a bounce email with 'address not known' (or something like that) is sent back to the sender. I want i...
stackexchange/codereview
I've tried the tools listed here, some with more success than others, but none gave me valid postgres syntax I could use (tinyint errors etc.)
stackexchange/codereview
Is it possible for ASP.NET to mix up which user is associated with which session variable on the server? Are session variables immutably tied to the original user that created them across time, space & dimension?
stackexchange/codereview
Plone has a beautiful search box with a "Google suggest" like functionality for its site. It even indexes uploaded documents like PDFs. Does anyone know of a module that can provide this kind of functionality in a Django site?
stackexchange/codereview
I can create the following and reference it using area[0].states[0] area[0].cities[0] var area = [ { "State" : "Texas", "Cities" : ['Austin','Dallas','San Antonio'] }, { "State" :"Arkansas", "Cities" : ['Little Rock','Texarkana','Hot Springs'] ...
stackexchange/codereview
I am trying to run a SQL Server Reporting Services where the data for the report is on a SQL Server database that's on a different server. Integrated Authentication is turned on for both the Report Server and the report. I have confirmed that Kerberos delegation is working fine by using Internet Explorer to run the r...
stackexchange/codereview
Is it possible to get notifications using SQL Server Reporting Services? Say for example I have a report that I want by mail if has for example suddenly shows more than 10 rows or if a specific value drop below 100 000. Do I need to tie Notification Services into it and how do I do that? Please provide as much technica...
stackexchange/codereview
I have a Yahoo map with lots of markers (~500). The map performs well enough until I close the page, at which point it pauses (in Firefox) and brings up a "Stop running this script?" dialog (in IE7). If given long enough the script does complete its work. Is there anything I can do to reduce this delay? This stripped d...
stackexchange/codereview
I have not seen much support for Grails to develop facebook apps.I was just wondering if people around are developing facebook apps on grails
stackexchange/codereview
I think the best part of flash is the possibility to create not squared user interfaces, so I like the idea to create desktop apps using flash. I know AIR is for that but it doesn't allow real access to OperatingSystem apis and dlls and the commercial options are kind of difficult to customize.
stackexchange/codereview
I want to install PowerShell to 600 Window XP computers, and use it as the main processing shell. For example, for replacing batch scripts, VB scripts, and some other little programs. The installation process is not a problem. Some issues I think I'm going to come across are: Changing permissions to allow PowerShell t...
stackexchange/codereview
Can anyone recommend a good (preferably open source) tool for creating WSDL files for some soap web services? I've tried playing around with some of the eclipse plug ins available and was less than impressed with what I found.
stackexchange/codereview
Is there an easy way to capitalize the first letter of a string and lower the rest of it? Is there a built in method or do I need to make my own?
stackexchange/codereview
When you use Visual Studio's code analysic (FxCop), and want to suppress a message there are 3 options. Suppress a violation in code. Suppress a violation in a GlobalSupression.cs file. Disable the violation check in the project file (via Project -> Properties -> Code Analysic). The later is very hard to review when ...
stackexchange/codereview
How are callbacks written in PHP?
stackexchange/codereview
I am working on the issue of testing my GUI and I am not entirely sure of the best approach here. My GUI is built using a traditional MVC framework so I am easily able to test the logic parts of the GUI without bringing up the GUI itself. However, when it comes to testing the functionality of the GUI, I am not really s...
stackexchange/codereview
Database? Page variables? Enum? I'm looking for opinions here.
stackexchange/codereview
I need to produce a calculation trace file containing tabular data showing intermediate results. I am currently using a combination of the standard ascii pipe symbols (|) and dashes (-) to draw the table lines: E.g. Numerator | Denominator | Result ----------|-------------|------- 6 | 2 | 3 ...
stackexchange/codereview
Trying to avoid the .net WebBrowser control (I don't need to navigate to a url, print rendered html or any of the other inbuilt goodies). Wrapping the IE dll seems a bit heavyweight. I simply require something that can display basic html marked up text - an html equivalent of RichTextBox in effect. Anyone have any ex...
stackexchange/codereview
I want to quickly test an ocx. How do I drop that ocx in a console application. I have found some tutorials in CodeProject and but are incomplete.
stackexchange/codereview
What's the best way to serialize a HashTable (or a data best navigated through a string indexer) with SOAP/XML? Let's say I have a Foo that has an property Bar[] Bars. A Bar object has a key and a value. By default, this serializes to the following XML: <Foo> <Bars> <Bar key="key0" value="value0"/> ... </Ba...
stackexchange/codereview
I'm a bit confused here. Microsoft as far as I can tell claims that parametrization is the best way to protect your database from SQL injection attacks. But I find two conflicting sources of information here: This page says to use the ADO command object. But this page says that the command object isn't safe for scri...
stackexchange/codereview
Are there any tools to facilitate a migration from Sourcegear's Vault to Subversion? I'd really prefer an existing tool or project (I'll buy!). Requirements: One-time migration only Full history with comments Optional: Some support for labels/branches/tags Relatively speedy. It can take hours but not days. Cost if a...
stackexchange/codereview
How do you usually go about separating your codebase and associated unit tests? I know people who create a separate project for unit tests, which I personally find confusing and difficult to maintain. On the other hand, if you mix up code and its tests in a single project, you end up with binaries related to your unit ...
stackexchange/codereview
I'd like to add a method AddDefaultNamespace() to the String class in Java so that I can type "myString".AddDefaultNamespace() instead of DEFAULTNAMESPACE + "myString", to obtain something like "MyDefaultNameSpace.myString". I don't want to add another derived class either (PrefixedString for example). Maybe the approa...
stackexchange/codereview
I couldn't find a decent ThreadPool implementation for Ruby, so I wrote mine (based partly on code from here: http://web.archive.org/web/20081204101031/http://snippets.dzone.com:80/posts/show/3276 , but changed to wait/signal and other implementation for ThreadPool shutdown. However after some time of running (having 1...
stackexchange/codereview
In Java, you often see a META-INF folder containing some meta files. What is the purpose of this folder and what can I put there?
stackexchange/codereview
I want to draw user interfaces for web and desktop applications. I need something less print-oriented than omnigraffle. think pixels! Also, need good building blocks (aka stencils). Form elements, tableviews, etc.
stackexchange/codereview
Before I jump headlong into C#... I've always felt that C, or maybe C++, was best for developing drivers on Windows. I'm not keen on the idea of developing a driver on a .NET machine. But .NET seems to be the way MS is heading for applications development, and so I'm now wondering: Are people are using C# to develop ...
stackexchange/codereview
I need an algorithm that can determine whether two images are 'similar' and recognizes similar patterns of color, brightness, shape etc.. I might need some pointers as to what parameters the human brain uses to 'categorize' images. .. I have looked at hausdorff based matching but that seems mainly for matching transfo...
stackexchange/codereview
We're using WatiN for testing our UI, but one page (which is unfortunately not under our teams control) takes forever to finish loading. Is there a way to get WatiN to click a link on the page before the page finishes rendering completely?
stackexchange/codereview
I am wondering if anyone has any experience using a JQuery plugin that converts a html <select> <option> Blah </option> </select> combo box into something (probably a div) where selecting an item acts the same as clicking a link. I guess you could probably use javascript to handle a selection event (my javascript...
stackexchange/codereview
The problem I'm trying to solve is "What's at this position?" It's fairly trivial to get the x/y position (offset) of a DIV, but what about the reverse? How do I get the id of a DIV (or any element) given an x/y position?
stackexchange/codereview
Why prefer composition instead of inheritance? What trade-offs are there for each approach? And the converse question: when should I choose inheritance instead of composition?
stackexchange/codereview
I would like to create an application wide keyboard shortcut for a Java Swing application. Looping over all components and adding the shortcut on each, has focus related side effects, and seems like a brute force solution. Anyone has a cleaner solution?
stackexchange/codereview
So I'm taking the Discrete Math course from MIT's OpenCourseWare and I'm wondering... I see the connection between relations and graphs but not enough to "own" it. I've implemented a simple state machine in SQL as well so I grok graphs pretty well, just not the more rigorous study of how relations and sets compeltely a...
stackexchange/codereview
Jeff covered this a while back on his blog in terms of 32 bit Vista. Does the same 32 bit 4 GB memory cap that applies in 32 bit Vista apply to 32 bit Ubuntu? Are there any 32 bit operating systems that have creatively solved this problem?
stackexchange/codereview
This question talks about different payment processors and what they cost, but I'm looking for the answer to what do I need to do if I want to accept credit card payments? Assume I need to store credit card numbers for customers, so that the obvious solution of relying on the credit card processor to do the heavy lifti...
stackexchange/codereview
I have two spreadsheets... when one gets modified in a certain way I want to have a macro run that modifies the second in an appropriate manner. I've already isolated the event I need to act on (the modification of any cell in a particular column), I just can't seem to find any concrete information on accessing and mo...
stackexchange/codereview
We are now using NHibernate to connect to different database base on where our software is installed. So I am porting many SQL Procedures to Oracle. SQL Server has a nice function called DateDiff which takes a date part, startdate and enddate. Date parts examples are day, week, month, year, etc. . . What is the Oracl...
stackexchange/codereview
Does anyone have any experience with how well web services build with Microsoft's WCF will scale to a large number of users? The level I'm thinking of is in the region of 1000+ client users connecting to a collection of WCF services providing the business logic for our application, and these talking to a database - sim...
stackexchange/codereview
I need to sort a Map<Key, Value> on the values. Since the values are not unique, I find myself converting the keySet into an array, and sorting that array through array sort with a custom comparator that sorts on the value associated with the key. Is there an easier way?
stackexchange/codereview
I know there's JScript.NET, but it isn't the same as the JavaScript we know from the web. Does anyone know if there are any JavaScript based platforms/compilers for desktop development? Most specifically Windows desktop development.
stackexchange/codereview
I have a simple WPF (XAML) file that has some animated shapes and text. The animation has no interactive behavior. I want to record this animation as a video file that I later intend to use as the "intro" screen to a screencast. What I think I need: C# code that takes an input XAML file and spits out a high quality WMV...
stackexchange/codereview
I've worked with T-SQL for years but I've just moved to an organisation that is going to require writing some Oracle stuff, probably just simple CRUD operations at least until I find my feet. I'm not going to be migrating databases from one to the other simply interacting with existing Oracle databases from an Applicat...
stackexchange/codereview
What are the key strengths of ASP.NET Webforms (2.0-3.5)? I'm not looking for comparisons to other frameworks, I'm just am looking for feedback on ASP.NET as it stands today.
stackexchange/codereview
I populated a datagridview from a datatable. How do I read from the datagridview when the application is running?
stackexchange/codereview
I have a FullTrust assembly, Assembly A, which calls a 3rd party component, Assembly B. Is there any way I can, via A.dll.config or in A's code, prevent any CAS demands from propagating up the stack to Assembly B, which does not have FullTrust? I do not want to alter the machine's security policy, if possible.
stackexchange/codereview
I need to create a repeatable process for deploying SQL Server Reporting Services reports. I am not in favor of using Visual Studio and or Business Development Studio to do this. The rs.exe method of scripting deployments also seems rather clunky. Does anyone have a very elegant way that they have been able to deplo...
stackexchange/codereview
I want to use CSS sprites on a web site instead of separate image files, for a large collection of small icons that are all the same size. How can I concatenate (tile) them into one big image using ImageMagick?
stackexchange/codereview
I want to load one or more DLLs dynamically so that they run with a different security or basepath than my main application. How do I load these DLLs into a separate AppDomain and instantiate objects from them?
stackexchange/codereview
I'm primarily a designer, with a fairly high level of understanding of CSS and HTML. I have an idea for a very simple iPhone app, largely involving a timer, an animated graphic, and some sound. If I get more advanced there could be some simple customization settings I have no understanding of Objective C, or C of any ...
stackexchange/codereview
In which parts of a project writing unit tests is nearly or really impossible? Data access? ftp? If there is an answer to this question then %100 coverage is a myth, isn't it?
stackexchange/codereview