instruction_seed
stringlengths
1
35.8k
_source
stringclasses
1 value
I get the following error when running my Visual Studio 2008 ASP.NET project (start without Debugging) on my XP Professional box: System.Web.HttpException: The current identity (machinename\ASPNET) does not have write access to 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files'. How can I resolve ...
stackexchange/codereview
Anti aliasing cannot be turned off in WPF. But I want to remove the blurred look of WPF fonts when they are small. One possibility would be to use a .net 2.0 component. This looks like it would lose the transparency capability and Blend support. Never tried it though. Anyone has a solution for this? Any drawbacks from...
stackexchange/codereview
I've created a map system for a game that runs on the principle of drawing the picture of the map from tiles. There are many reasons for this which I won't go into here but if you really want to know then I'm sure you can find out how to contact me ;) I have made the latest version live so you can see exactly where the...
stackexchange/codereview
I'm learning objective-C and Cocoa. In the Apple tutorial I'm working through there's a side note that says: IBOutlet is a null-defined macro, which the C preprocessor removes at compile time. I'm curious - what's a null-defined macro?
stackexchange/codereview
First off if you're unaware, samba or smb == Windows file sharing, \\computer\share etc. I have a bunch of different files on a bunch of different computers. It's mostly media and there is quite a bit of it. I'm looking into various ways of consolidating this into something more manageable. Currently there are a few op...
stackexchange/codereview
I have a string coming from a table like "can no pay{1},as your payment{2}due on {3}". I want to replace {1} with some value , {2} with some value and {3} with some value . Is it Possible to replace all 3 in one replace function ? or is there any way I can directly write query and get replaced value ? I want to repla...
stackexchange/codereview
My company is currently using Sage MAS as their ERP system. While integrating our shopping cart is not going to be impossible, it uses COM and has it's own challenges. I was wondering if there was a more developer friendly ERP out there. I have looked into Microsoft Dynamics but getting information on ERP systems that ...
stackexchange/codereview
My employer just asked me to run a timed batch process in a Java EE WebSphere application they have running. It's supposed to run a certain class at 11:30 pm everyday. I'm not very familiar with Java EE nor WebSphere server (or tomcat, in the development environment), and I've been digging around but all I've found is ...
stackexchange/codereview
All of my Visio experience is with LAN/WAN documentation. I recently had a desire to visualize the relationship between objects in the Nagios configuration and I realized I didn't know how to do it properly and moved on to something more important. I was reading the responses to this thread and realized this is somet...
stackexchange/codereview
I'm using TinyMCE in an ASP.Net project, and I need a spell check. The only TinyMCE plugins I've found use PHP on the server side, and I guess I could just break down and install PHP on my server and do that, but quite frankly, what a pain. I don't want to do that. As it turns out, Firefox's built-in spell check will w...
stackexchange/codereview
When compiling from source, I never know which configure flags to use to optimize the compilation for my environment. Assume the following hardware/OS: Single Core, 2 GHz Intel 512MB Ram Debian 4 I usually just go with ./configure --prefix=/usr/local Should I be doing anything else?
stackexchange/codereview
I want to find a way to develop database projects quickly in Visual Studio. Any ideas?
stackexchange/codereview
I am looking for open source or free data collaboration software. Specifically this is for a non-profit organization that wants to teach remote students how a foreign language. The idea is that an instructor would teach a class and there would be up to 10 students in the class at a time. The instructor would be able ...
stackexchange/codereview
What is a magic number? Why do many programmers advise that they be avoided?
stackexchange/codereview
I'm trying to install 'quadrupel', a library that relies on ffmpeg on Solaris x86. I managed to build ffmpeg and its libraries live in /opt/gnu/lib and the includes are in /opt/gnu/include but when I try to build quadrupel, it can't find the ffmpeg headers. What flags/configuration is required to include those two dire...
stackexchange/codereview
I simply wondered whether people thought it was worth learning to use the MSBuild syntax in order to customise the build process for a .net project, or whether it is really not worth it given the ease with which one can build a project using visual studio. I am thinking in terms of nightly builds, etc., but then could...
stackexchange/codereview
Below is an example class hierarchy and code. What I'm looking for is a way to determine if 'ChildClass1' or 'ChildClass2' had the static method whoAmI() called on it without re-implementing it in each child class. <?php abstract class ParentClass { public static function whoAmI () { // NOT correct, alwa...
stackexchange/codereview
I have a datagrid, populated as shown below. When the user clicks on a column header, I would like to sort the rows using a lexicographic sort in which the selected column is used first, then the remaining columns are used in left-to-right order to break any ties. How can I code this? (I have one answer, which I'll p...
stackexchange/codereview
I've used the PHP MVC framework Symfony to build an on-demand web app. It has an annoying bug - the session expires after about 15-30 minutes of inactivity. There is a config directive to prevent session expiration but it does not work. Even workarounds such as this one did not help me. I intend not to migrate to Symfo...
stackexchange/codereview
I have a coworker who writes unit tests for objects which fill their fields with random data. His reason is that it gives a wider range of testing, since it will test a lot of different values, whereas a normal test only uses a single static value. I've given him a number of different reasons against this, the main one...
stackexchange/codereview
We need to capture live video and display easily on Linux. We need a cheap card or USB device with a simple API. Anyone want to share some experience?
stackexchange/codereview
I woud like to create a cross-platform drawing program. The one requirement for writing my app is that I have pixel level precision over the canvas. For instance, I want to write my own line drawing algorithm rather than rely on someone elses. I do not want any form of anti-aliasing (again, pixel level control is requi...
stackexchange/codereview
Possible Duplicate: Algorithm to find which numbers from a list of size n sum to another number What is a good algorithm for deciding whether a passed in amount can be built additively from a set of numbers? In my case, I am determining whether a certain currency amount (such as $40) can be met by adding up some com...
stackexchange/codereview
For a given table 'foo', I need a query to generate a set of tables that have foreign keys that point to foo. I'm using Oracle 10G.
stackexchange/codereview
What would be the best way to implement a simple crash / error reporting mechanism? Details: my app is cross-platform (mac/windows/linux) and written in Python, so I just need something that will send me a small amount of text, e.g. just a timestamp and a traceback (which I already generate and show in my error dialog...
stackexchange/codereview
I've inherited a large VB6 app at my current workplace. I'm kinda learning VB6 on the job and there are a number of problems I'm having. The major issue at the moment is I can't figure out how to check if a key exists in a Collection object. Can anyone help?
stackexchange/codereview
I'm writing a program that sends an email out at a client's specific local time. I have a .NET method that takes a timezone & time and destination timezone and returns the time in that timezone. So my method is to select every distinct timezone in the database, check if it is the correct time using the method, then sel...
stackexchange/codereview
How would I get the here and and here to be on the right, on the same lines as the lorem ipsums? See the following: Lorem Ipsum etc........here blah....................... blah blah.................. blah....................... lorem ipsums.......and here
stackexchange/codereview
I understand what System.WeakReference does, but what I can't seem to grasp is a practical example of what it might be useful for. The class itself seems to me to be, well, a hack. It seems to me that there are other, better means of solving a problem where a WeakReference is used in examples I've seen. What's the ca...
stackexchange/codereview
Is there a reasonable way to extract plain text from a Word file that doesn't depend on COM automation? (This is a a feature for a web app deployed on a non-Windows platform - that's non-negotiable in this case.) Antiword seems like it might be a reasonable option, but it seems like it might be abandoned. A Python sol...
stackexchange/codereview
We have a client that has Oracle Standard, and a project that would be ten times easier addressed using OLAP. However, Oracle only supports OLAP in the Enterprise version. Migration to enterprise is not possible I'm thinking of doing some manual simulation of OLAP, creating relational tables to simulate the technology....
stackexchange/codereview
I've got a new varchar(10) field in a database with 1000+ records. I'd like to update the table so I can have random data in the field. I'm looking for a SQL solution. I know I can use a cursor, but that seems inelegant. MS-SQL 2000,BTW
stackexchange/codereview
We have several jobs that run concurrently that have to use the same config info for log4j. They are all dumping the logs into one file using the same appender. Is there a way to have each job dynamically name its log file so they stay seperate? Thanks Tom
stackexchange/codereview
I'm on a little quest of merging the structure of two MySql databases. Is there a tool for this with the might of Red-Gate's SQL Compare? Are there any free alternatives?
stackexchange/codereview
A requirement for an ASP.Net 2.0 project I'm working on limits a certain field to a max of 10 words (not characters). I'm currently using a CustomValidator control with the following ServerValidate method: Protected Sub TenWordsTextBoxValidator_ServerValidate(ByVal source As Object, ByVal args As System.Web.UI.WebContr...
stackexchange/codereview
Google maps in some region can serve traffic information showing the blocked roads and so on. I was wondering if there is any code example demonstrating how can I serve traffice information for my own region.
stackexchange/codereview
My development shop has put together a fairly useful Python-based test suite, and we'd like to test some Linux-based C++ code with it. We've gotten the test project they ship with Boost to compile (type 'bjam' in the directory and it works), but we're having issues with our actual project. Building the boost libraries ...
stackexchange/codereview
I have a List<int> and a List<customObject>. The customObject class has an ID property. How can I get a List<customObject> containing only the objects where the ID property is in the List<int> using LINQ? Edit: I accepted Konrads answer because it is easier/more intuitive to read.
stackexchange/codereview
Are you working on a (probably commercial) product which uses RDF/OWL/SPARQL technologies? If so, can you please describe your product?
stackexchange/codereview
How can I go about generating a Friendly URL in C#? Currently I simple replace spaces with an underscore, but how would I go about generating URL's like Stack Overflow? For example how can I convert: How do I generate a Friendly URL in C#? Into how-do-i-generate-a-friendly-url-in-C
stackexchange/codereview
Is there anything which can help with msmq monitoring? I'd like to get some event/monit when a message appears in queue and the same on leave.
stackexchange/codereview
Is there any way to force a listview control to treat all clicks as though they were done through the Control key? I need to replicate the functionality of using the control key (selecting an item sets and unsets its selection status) in order to allow the user to easily select multiple items at the same time. Thank yo...
stackexchange/codereview
I'd like to be able to view the event log for a series of asp.net websites running on IIS. Can I do this externally, for example, through a web interface?
stackexchange/codereview
I have read that the iPhone SDK (part of Xcode 3) is restricted to Mac's with the intel chipset. Does this restriction apply to only the simulator part of the SDK or the complete shebang? I have a Powerbook G4 running Leopard and would very much like to do dev on it rather than fork out for a new machine. It is also wo...
stackexchange/codereview
Can you please point to alternative data storage tools and give good reasons to use them instead of good-old relational databases? In my opinion, most applications rarely use the full power of SQL--it would be interesting to see how to build an SQL-free application.
stackexchange/codereview
I want to show a chromeless modal window with a close button in the upper right corner. Is this possible?
stackexchange/codereview
So I know that unit testing is a must. I get the idea that TDD is the way to go when adding new modules. Even if, in practice, I don't actually do it. A bit like commenting code, really. The real thing is, I'm struggling to get my head around how to unit-test the UI and more generally objects that generate events: use...
stackexchange/codereview
How do I enumerate the properties of a JavaScript object? I actually want to list all the defined variables and their values, but I've learned that defining a variable actually creates a property of the window object.
stackexchange/codereview
I have an array of mouse points, a stroke width, and a softness. I can draw soft circles and soft lines. Which algorithm should I use for drawing my array of points? I want crossed lines to look nice as well as end points.
stackexchange/codereview
If one were to use TiddlyWiki as a personal database for notes and code snippets, how would you go about keeping it in sync between multiple machines. Would a svn/cvs etc work. How would you handle merges?
stackexchange/codereview
I wrote myself a little downloading application so that I could easily grab a set of files from my server and put them all onto a new pc with a clean install of Windows, without actually going on the net. Unfortunately I'm having problems creating the folder I want to put them in and am unsure how to go about it. I w...
stackexchange/codereview
I need to write a Delphi application that pulls entries up from various tables in a database, and different entries will be in different currencies. Thus, I need to show a different number of decimal places and a different currency character for every Currency data type ($, Pounds, Euros, etc) depending on the currenc...
stackexchange/codereview
I know what yield does, and I've seen a few examples, but I can't think of real life applications, have you used it to solve some specific problem? (Ideally some problem that cannot be solved some other way)
stackexchange/codereview
I've got a Palm OS/Garnet 68K application that uses a third-party static library built with CodeWarrior. Can I rebuilt the application using PRC-Tools, the port of GCC for the Palm OS platform and still link with the third-party library?
stackexchange/codereview
How do i measure how long a client has to wait for a request. On the server side it is easy, through a filter for example. But if we want to take into accout the total time including latency and data transfer, it gets diffcult. is it possible to access the underlying socket to see when the request is finished? or is i...
stackexchange/codereview
foreach ($_GET as $field => $label) { $datarray[]=$_GET[$field]; echo "$_GET[$field]"; echo "<br>"; } print_r($datarray); This is the output I am getting. I see the data is there in datarray but when I echo $_GET[$field] I only get "Array" But print_r($datarray) prints all the data. Any idea how I pull thos...
stackexchange/codereview
I'm trying to the the flv Flash player from here in a windows forms application. I currently have it playing 1 .flv file with no problems but I really need to be able to play multiple files. Has anyone had experienace of using the playlists that this control offers or is there a better way to do this?
stackexchange/codereview
Using C# 2.0 what is the best way to implement dynamic form controls? I need to provide a set of controls per data object, so should i just do it manually and lay them out while increment the top value or is there a better way?
stackexchange/codereview
If you are using HAML and SASS in your Rails application, then any templates you define in public/stylesheet/*.sass will be compiled into *.css stylesheets. From your code, you use stylesheet_link_tag to pull in the asset by name without having to worry about the extension. Many people dislike storing generated code o...
stackexchange/codereview
We are trying to create a web-service that we plan to pass a variable amount of variables to it. Can this be done? Basically instead of pass all possible parameters we wish to pass only the set values and use the defaults set in the web-service. Here is an example of the XML we are looking to send, we would sent an unk...
stackexchange/codereview
Test the following code: #include <stdio.h> #include <stdlib.h> main() { const char *yytext="0"; const float f=(float)atof(yytext); size_t t = *((size_t*)&f); printf("t should be 0 but is %d\n", t); } Compile it with: gcc -O3 test.c The GOOD output should be: "t should be 0 but is 0" But with my gcc ...
stackexchange/codereview
Sometimes my Oracle database on Windows gets hosed. How do I do a manual uninstall of Oracle?
stackexchange/codereview
Has anyone found a way to get around this? Or a better technique to conglomerate logging from multiple web servers reliably? Any ideas on good log4net log file analysis tools too (plain text not XML) - apart from good 'ol grep of course :)
stackexchange/codereview
I saved my VB-Express code as .dll and registered it with regasm and made a .tlb file. But when I try to run a function from it in an Excel-modul I get: Run-time error ‘453’: Can’t find DLL entry point RegisterServiceProcess in kernel32 What step did I miss?
stackexchange/codereview
I just finished a small project where changes were required to a pre-compiled, but no longer supported, ASP.NET web site. The code was ugly, but it was ugly before it was even compiled, and I'm quite impressed that everything still seems to work fine. It took some editing, e.g. to remove control declarations, as they ...
stackexchange/codereview
There are plenty of ways to provide a dynamic style/theme for a web site, but I am looking for some help on some best practices or techniques that have worked well for others. I am creating a web site that needs to provide the ability for customers to create or specify their own colors, style, theme, or layout. I'm no...
stackexchange/codereview
example: a_list = [1, 2, 3] a_list.len() # doesn't work len(a_list) # works Python being (very) object oriented, I don't understand why the 'len' function isn't inherited by the object. Plus I keep trying the wrong solution since it appears as the logical one to me
stackexchange/codereview
I have a repeater that is bound to some data. I bind to the ItemDataBound event, and I am attempting to programmatically create a UserControl: In a nutshell: void rptrTaskList_ItemDataBound(object sender, RepeaterItemEventArgs e) { CCTask task = (CCTask)e.Item.DataItem; if (task is ExecTask) { Exec...
stackexchange/codereview
How do I make open “read only” the only option within a SharePoint document library? When using either Word 2003 or 2007 and saving the document as a template or modifying the file properties as “read only” doesn’t prevent modification of the file in a SharePoint document library. Modifying the document library permis...
stackexchange/codereview
It's common to want browsers to cache resources - JavaScript, CSS, images, etc. until there is a new version available, and then ensure that the browser fetches and caches the new version instead. One solution is to embed a version number in the resource's filename, but will placing the resources to be managed in this ...
stackexchange/codereview
What steps do I need to take to change an IP address for Oracle 10g? I cannot connect to the database after going from a dhcp address to a static IP and a reboot.
stackexchange/codereview
I have to use a third-party component without source code. I have the release DLL and release PDB file. Let's call it 'CorporateComponent.dll'. My own code creates objects from this DLL and calls methods on these objects. CorpObject o = new CorpObject(); Int32 result = o.DoSomethingLousy(); While debugging, the method...
stackexchange/codereview
I was wondering if anyone knew of any limitations to using Windows XP as a File and SQL server. I am asking because one of the applications we sell, requires the customer to setup a server for filesharing and as a SQL Server. We already allow them to use SQL Express, but we wanted to see if we can suggest Windows XP as...
stackexchange/codereview
Here's the situation: I need to bind a WPF FixedPage against a DataRow. Bindings don't work against DataRows; they work against DataRowViews. I need to do this in the most generic way possible, as I know nothing about and have no control over what is in the DataRow. What I need is to be able to get a DataRowView f...
stackexchange/codereview
So I've got a hobby site I'm working on. I've got items that are tagged and I want to associate those items with photos from Flickr. Even with restrictive searches, I might get results numbering in the thousands. Requirements: I want to display between 10-20 pictures but I want to randomize the photos each time. ...
stackexchange/codereview
I would like to know which dependency described in my pom.xml brings a transitive dependency in my target directory. To be more precise, I have the library "poi-2.5.1-final-20040804.jar" in my WEB-INF/lib directory and I would like to know which dependency in my pom.xml brings that.
stackexchange/codereview
I'm wondering the best way to start a pthread that is a member of a C++ class? My own approach follows as an answer...
stackexchange/codereview
I've found it very difficult to find any existing documentation on this. What I'm trying to find out is why Imake would interpret a word such as unix, linux or i386 to a number 1 in the produced Make-file? I'm sure it is a function of indicating whether or not your on that system or not. I've not been able to find t...
stackexchange/codereview
How do I ignore files in Subversion? Also, how do I find files which are not under version control?
stackexchange/codereview
Do you guys know how I can use the Curl command line to POST SOAP to test a web service? I have a file (soap.xml) which has all the soap message attached to it I just don't seem to be able to properly post it. Thanks!
stackexchange/codereview
I like ReSharper, but it is a total memory hog. It can quickly swell up and consume a half-gig of RAM without too much effort and bog down the IDE. Does anybody know of any way to configure it to be not as slow?
stackexchange/codereview
I'm looking for libraries to: read and write meta data (for example ID3v2 tags in mp3 and all) convert compressed to to raw audio data and if possible raw audio data to mp3, ogg, aac, ... digitally process the audio data (energy, timbre, Mel Frequency Cepstral Coefficients - MFCC, FFT, LPC, Autocorrelation, Wavelet, ....
stackexchange/codereview
So I like the OpenID idea. I support it on my site, and use it wherever it's possible (like here!). But I am not clear about one thing. A site that supports OpenID basically accepts any OpenID provider out there, right? How does that work with sites that want to reduce bot-signups? What's to stop a malicious Open...
stackexchange/codereview
I have 1 red polygon say and 50 randomly placed blue polygons - they are situated in geographical 2D space. What is the quickest/speediest algorithim to find the the shortest distance between a red polygon and its nearest blue polygon? Bear in mind that it is not a simple case of taking the points that make up the ver...
stackexchange/codereview
How would you implement a system with the following objectives: Manage authentication, authorization for hundreds of thousands of existing users currently tightly integrated with a 3rd party vendor's application (We want to bust these users out into something we manage and make our apps work against it, plus our 3rd p...
stackexchange/codereview
I have a WinForms application with a DataGridView control and a column of DataGridViewButtonCell cells within that. When I click on one of these buttons, it starts a background task, and I'd like to disable the buttons until that task completes. I can disable the DataGridView control, but it gives no visual indication ...
stackexchange/codereview
My web application has a login page that submits authentication credentials via an AJAX call. If the user enters the correct username and password, everything is fine, but if not, the following happens: The web server determines that although the request included a well-formed Authorization header, the credentials in ...
stackexchange/codereview
In C++ when a virtual function is called from within a constructor it doesn't behave like a virtual function. I think everyone who encountered this behavior for the first time was surprised but on second thought it made sense: As long as the derived constructor has not been executed the object is not yet a derived inst...
stackexchange/codereview
I'm coding a framework along with a project which uses this framework. The project is a Bazaar repository, with the framework in a subfolder below the project. I want to give the framework a Bazaar repository of its own. How do I do it?
stackexchange/codereview
I want to delegate a time-consuming process to a separate thread in my C++ program. Using the boost libraries, I have written code something like this: thrd = new boost::thread(boost::bind(&myclass::mymethod, this, &finished_flag); Where finished_flag is a bool member of my class. When the thread is finished it sets t...
stackexchange/codereview
I have a simple setter method for a property and null is not appropriate for this particular property. I have always been torn in this situation: should I throw an IllegalArgumentException, or a NullPointerException? From the javadocs, both seem appropriate. Is there some kind of an understood standard? Or is this jus...
stackexchange/codereview
Given the constraint of only using T-Sql in Sql Server 2005, is there a better way to remove the decimal point from a money datatype than a conversion to a varchar (here implicitly) and then a replace of the decimal point? Here is what I have currently. SELECT REPLACE(1.23, '.', ''), REPLACE(19.99, '.', '') Which retu...
stackexchange/codereview
What I have is a collection of classes that all implement the same interface but can be pretty wildly different under the hood. I want to have a config file control which of the classes go into the collection upon starting the program, taking something that looks like : <class1 prop1="foo" prop2="bar"/> and turning th...
stackexchange/codereview
I am new to the .Net Compact Framework and have been unable to find an answer via Google. Gasp! Yes, it's true, but that is part of why StackOverflow is here, right? I have a form that is longer than the screen, so a vertical scroll-bar appears as expected. However, this appears to force a horizontal scroll-bar to appe...
stackexchange/codereview
I have seen lots of questions recently about WPF... What is it? What does it stand for? How can I begin programming WPF?
stackexchange/codereview
What is the difference between a Group and a Match in .NET's RegEx?
stackexchange/codereview
I'm trying to grasp the concept of continuations and I found several small teaching examples like this one from the Wikipedia article: (define the-continuation #f) (define (test) (let ((i 0)) ; call/cc calls its first function argument, passing ; a continuation variable representing this point in ; the ...
stackexchange/codereview
I have the following situation: I built an Access form with a subform (which records are linked to the records of main form via certain key). When I try to delete any record in the subform, I get the following message: “Access has suspended the action because you and another user tried to change the data” (approximate ...
stackexchange/codereview
In the past, I used Microsoft Web Application Stress Tool and Pylot to stress test web applications. I'd written a simple home page, login script, and site walkthrough (in an ecommerce site adding a few items to a cart and checkout). Just hitting the homepage hard with a handful of developers would almost always locate...
stackexchange/codereview
I am trying to have Apache follow a symlink to a raid array server that will contain some large data files. I have tried modifying httpd.conf to have an entry like this <Directory "/Users/imagine/Sites"> Options FollowSymLinks AllowOverride all Order allow,deny Allow from all </Directory> to have Apache follo...
stackexchange/codereview