instruction_seed
stringlengths
1
35.8k
_source
stringclasses
1 value
Is it possible to delete an GAE application after it has been created? I made a mistake while typing the name and now have a dummy application that I haven't been able to remove.
stackexchange/codereview
I'm thinking about making a networked game. I'm a little new to this, and have already run into a lot of issues trying to put together a good plan for dead reckoning and network latency, so I'd love to see some good literature on the topic. I'll describe the methods I've considered. Originally, I just sent the player...
stackexchange/codereview
I'm working on a database for a small web app at my school using SQL Server 2005. I see a couple of schools of thought on the issue of varchar vs nvarchar: Use varchar unless you deal with a lot of internationalized data, then use nvarchar. Just use nvarchar for everything. I'm beginning to see the merits of view 2. ...
stackexchange/codereview
I'm currently working on a project that requires encrypted data be passed between WCF hosts. As I understand it there are only 2 ways to ensure that data passed over WCF is secure. Using Certificates Using a Domain (or having the same username and password on every machine on the network) Using certificates can be e...
stackexchange/codereview
Our current application is a single OpenGL EXE containing multiple pages. The EXE is responsible for accessing data sent across the network via UDP. It accumulates the data and stores it in a host of singleton structures. The individual pages within the EXE access the singleton structures to process the data as they...
stackexchange/codereview
Has anyone managed to use ItemizedOverlays in Android Beta 0.9? I can't get it to work, but I'm not sure if I've done something wrong or if this functionality isn't yet available. I've been trying to use the ItemizedOverlay and OverlayItem classes. Their intended purpose is to simulate map markers (as seen in Google M...
stackexchange/codereview
I'm trying to rebuild an old metronome application that was originally written using MFC in C++ to be written in .NET using C#. One of the issues I'm running into is getting the timer to "tick" accurately enough. For example, assuming an easy BPM (beats per minute) of 120, the timer should tick every .5 seconds (or 50...
stackexchange/codereview
Has anybody used the MS Project Gantt chart control in C#? If yes, can you share some resources regarding this?
stackexchange/codereview
What is the best way to support multiple languages for the interface in an ASP.NET MVC application? I've seen people use resource files for other applications. Is this still the best way?
stackexchange/codereview
I'm trying to convince my providers to use ANT instead of Rational Application Development so anyone can recompile, recheck, redeploy the solution anyplace, anytime, anyhow. :P I started a build.xml for a project that generates a JAR file but stopped there and I need real examples to compare notes. My good friends! I d...
stackexchange/codereview
Inspired by Raymond Chen's post, say you have a 4x4 two dimensional array, write a function that rotates it 90 degrees. Raymond links to a solution in pseudo code, but I'd like to see some real world stuff. [1][2][3][4] [5][6][7][8] [9][0][1][2] [3][4][5][6] Becomes: [3][9][5][1] [4][0][6][2] [5][1][7][3] [6][2][8][4]...
stackexchange/codereview
Looking for an example that: Launches an EXE Waits for the EXE to finish. Properly closes all the handles when the executable finishes.
stackexchange/codereview
I want to be able to make an HTTP call updating some select boxes after a date is selected. I would like to be in control of updating the textbox so I know when there has been a "true" change (in the event the same date was selected). Ideally, I would call a function to pop-up the calendar and be able to evaluate the d...
stackexchange/codereview
Does .NET come with a class capable of representing extremely large integers, such as 100 factorial? If not, what are some good third party libraries to accomplish this?
stackexchange/codereview
I've read that Lambda Expressions are an incredibly powerful addition to C#, yet I find myself mystified by them. How can they improve my life or make my code better? Can anyone point to a good resource for learning such expressions? They seem cool as hell, but how do they relate to my day-to-day life as an asp.net dev...
stackexchange/codereview
I am looking for a CMS that would be incredibly user-friendly and would have the following features: really simple message board (no login required) family tree story telling area photo section news section Is there anything out there like this that is really easily configurable? I've already messed around with Mambo...
stackexchange/codereview
Right up front: I do not want to start a religious war. I've used vi for as long as I can remember, and the few times I've tried to pick up Emacs I've been so lost that I've quickly given up. Lots of people find Emacs very powerful, however. Its programmability is somewhat legendary. I'm primarily doing Solaris+Java de...
stackexchange/codereview
For the past 10 years or so there have been a smattering of articles and papers referencing Christopher Alexander's newer work "The Nature of Order" and how it can be applied to software. Unfortunately, the only works I can find are from James Coplien and Richard Gabriel; there is nothing beyond that, at least from my ...
stackexchange/codereview
I have a .NET 2.0 Windows Forms application. Where is the best place the store user settings (considering Windows guidelines)? Some people pointed to Application.LocalUserAppDataPath. However, that creates a folder structure like: C:\Documents and Settings\user_name\Local Settings\Application Data\company_name\produ...
stackexchange/codereview
I'm hoping there's a way to avoid custom configuration files if an application runs in a single AppDomain.
stackexchange/codereview
Where should I start learning about version control systems? I've used SVN, Team Foundation, and Sourcesafe in the past but I don't really feel like I grasp it completely, and my team doesn't seem to grasp it either. Which points are the most important to master? I realise this differs from VCS to VCS, but for the sake...
stackexchange/codereview
Does anyone have any good starting points for me when looking at making web pages/sites/applications specifically for viewing on the iPhone? I've looked at templates like the one Joe Hewitt has made, and also seen some templates I can purchase, which I haven't done yet. I figured someone else had already started on thi...
stackexchange/codereview
When writing a custom server, what are the best practices or techniques to determine maximum number of users that can connect to the server at any given time? I would assume that the capabilities of the computer hardware, network capacity, and server protocol would all be important factors. Also, do you think it is a...
stackexchange/codereview
The error I'm getting: in /Users/robert/Documents/funWithFrameworks/build/Debug-iphonesimulator/funWithFrameworks.framework/funWithFrameworks, can't link with a main executable Cliff notes: trying to include framework doesn't want to link More detail: I'm developing for a mobile device... hint, hint using Xcode and ...
stackexchange/codereview
I have the following code: $bind = new COM("LDAP://CN=GroupName,OU=Groups,OU=Division,DC=company,DC=local"); When I execute it from a command-prompt, it runs fine. When it runs under IIS/PHP/ISAPI, it barfs. Fatal error: Uncaught exception 'com_exception' with message 'Failed to create COM object `LDAP://CN=...[cut]....
stackexchange/codereview
To make it short: hibernate doesn't support projections and query by example? I found this post: The code is this: User usr = new User(); usr.setCity = 'TEST'; getCurrentSession().createCriteria(User.class) .setProjection( Projections.distinct( Projections.projectionList() .add( Projections.property("name"), "name") .a...
stackexchange/codereview
Sometimes, in PL SQL you want to add a parameter to a Package, Function or Procedure in order to prepare future functionality. For example: create or replace function doGetMyAccountMoney( Type_Of_Currency IN char := 'EUR') return number is Result number(12,2); begin Result := 10000; IF char <> 'EUR' THEN --...
stackexchange/codereview
I would like to be able to predict what will be in the resulting binary when I call Write in Ada to serialize a record. Do you know where I can look this up? I have some legacy Ada software that produces a binary file by Write-ing a record, and I need to debug a C++ program that is supposed to write a compatible binary...
stackexchange/codereview
My little site should be pooling list of items from a table using the active user's location as a filter. Think Craigslist, where you search for "dvd' but the results are not from all the DB, they are filtered by a location you select. My question has 2 levels: should I go a-la-craigslist, and ask users to use a city ...
stackexchange/codereview
What I mean by autolinking is the process by which wiki links inlined in page content are generated into either a hyperlink to the page (if it does exist) or a create link (if the page doesn't exist). With the parser I am using, this is a two step process - first, the page content is parsed and all of the links to wiki...
stackexchange/codereview
I'm writing a Spring web application that requires users to login. My company has an Active Directory server that I'd like to make use of for this purpose. However, I'm having trouble using Spring Security to connect to the server. I'm using Spring 2.5.5 and Spring Security 2.0.3, along with Java 1.6. If I change the...
stackexchange/codereview
If I have 2 query sources how do I find ones that are in one that are not in the other? example of join to find items in both: var results = from item1 in qs1.Items join item2 in qs2 on item1.field1 equals item2.field2 select item1; So what would the linq code be to return the items in qs1 that are not in qs2?
stackexchange/codereview
I'm designing an application which includes the need to log all incoming messages I receive from a Telnet connection. The text is largely plain though can include ANSI tags that provide text colour and formatting (16 colours, bold, underline, etc). I'm would like to format my logs to store the text with formatting, dat...
stackexchange/codereview
In C can I pass a multidimensional array to a function as a single argument when I don't know what the dimensions of the array are going to be? Besides, my multidimensional array may contain types other than strings.
stackexchange/codereview
I am trying to enable Full-text indexing in SQL Server 2005 Express. I am running this on my laptop with Vista Ultimate. I understand that the standard version of SQL Server Express does not have full-text indexing. I have already downloaded and installed "Microsoft SQL Server 2005 Express Edition with Advanced Service...
stackexchange/codereview
Currently I know of only two ways to cache data (I use PHP but I assume that the same will apply to most languages). Save the cache to a file Save the cache to a large DB field Are there any other (perhaps better) ways of caching or is it really just this simple?
stackexchange/codereview
I have a silverlight 2 beta 2 application that accesses a WCF web service. Because of this, it currently can only use basicHttp binding. The webservice will return fairly large amounts of XML data. This seems fairly wasteful from a bandwidth usage standpoint as the response, if zipped, would be smaller by a factor o...
stackexchange/codereview
Has the introduction of the .net framework made raw programming in COM and DCOM redundant ? (Except for using some COM+ services, e.g. for transaction management through the System.EnterpriseServices namespace)
stackexchange/codereview
At work, we have multiple branches that we may be working on at any time. Our solution so far as been to create multiple web-sites but you can only run one web-site at a time. This makes switching between branches more of a pain that in should be. I just want to go to the URL, mapped in my hosts file, for that branch...
stackexchange/codereview
I'm looking for more and better documentation about snapshots, flow repositories, and flow state serialization in Spring Web Flow. Available docs I've found seem pretty sparse. "Spring in Action" doesn't talk about this. The Spring Web Flow Reference Manual does mention a couple flags here: http://static.springframe...
stackexchange/codereview
ASP.NET 2.0 provides the ClientScript.RegisterClientScriptBlock() method for registering JavaScript in an ASP.NET Page. The issue I'm having is passing the script when it's located in another directory. Specifically, the following syntax does not work: ClientScript.RegisterClientScriptBlock(this.GetType(), "scriptName...
stackexchange/codereview
I'm mainly a C# developer, but I'm currently working on a project in Python. How can I represent the equivalent of an Enum in Python?
stackexchange/codereview
I would like to replicate this in python: gvimdiff <(hg cat file.txt) file.txt (hg cat file.txt outputs the most recently committed version of file.txt) I know how to pipe the file to gvimdiff, but it won't accept another file: $ hg cat file.txt | gvimdiff file.txt - Too many edit arguments: "-" Getting to the python...
stackexchange/codereview
We have a project with over 500,000 lines of VB.NET that we need to convert to C#. Any recommendations, based on experience, for tools to use? We are using Visual Studio 2008 and we're targeting 3.5 .
stackexchange/codereview
I use the jQuery extend function to extend a class prototype. For example: MyWidget = function(name_var) { this.init(name_var); } $.extend(MyWidget.prototype, { // object variables widget_name: '', init: function(widget_name) { // do initialization here this.widget_name = widget_name; }, d...
stackexchange/codereview
The eval function is a powerful and easy way to dynamically generate code, so what are the caveats?
stackexchange/codereview
I'm using CVS on Windows (with the WinCVS front end), and would like to add details of the last check in to the email from our automated build process, whenever a build fails, in order to make it easier to fix. I need to know the files that have changed, the user that changed them, and the comment. I've been trying to ...
stackexchange/codereview
What are the best conventions of naming testing-assemblies in .NET (or any other language or platform)? What I'm mainly split between are these options (please provide others!): Company.Website - the project Company.Website.Tests or Company.Website Company.WebsiteTests The problem with the first solution is that it...
stackexchange/codereview
What are the performance, security, or "other" implications of using the following form to declare a new class instance in PHP <?php $class_name = 'SomeClassName'; $object = new $class_name; ?> This is a contrived example, but I've seen this form used in Factories (OOP) to avoid having a big if/switch statement. P...
stackexchange/codereview
As a classic ASP developer about once a year since ASP.NET came out I decide I really gotta buckle down and learn this fancy new ASP.NET. A few days in and messing with code-behinds and webforms and all this other stuff. I decide the new fancy stuff is whack and go find something else to learn (PHP and Ruby and Python...
stackexchange/codereview
We have our own ORM we use here, and provide strongly typed wrappers for all of our db tables. We also allow weakly typed ad-hoc SQL to be executed, but these queries still go through the same class for getting values out of a data reader. In tweaking that class to work with Oracle, we've come across an interesting que...
stackexchange/codereview
I have two separate mercurial repositories. At this point it makes sense that they "become one" because I want to work on the two projects simultaneously. I'd really like the two projects to each be a subdirectory in the new repository. How do I merge the two projects? Is this a good idea, or should I keep them separa...
stackexchange/codereview
I understand how JS is run and I think I understand most of the DOM but I've no idea about animation. Does anybody here know of a good guide that can explain to me how it's done in Javascript? In addition, should I even consider Javascript for animation? Should I instead be looking to learn flash?
stackexchange/codereview
My scheduled reports in SQL server won't run. I checked the logs and found the job that was failing. The error message in the log was: 'EXECUTE AS LOGIN' failed for the requested login 'NT AUTHORITY\NETWORK SERVICE'. The step failed. I'm using SQL authentication for the report so it shouldn't be issues with the p...
stackexchange/codereview
I don't know when to add to a dataset a tableadapter or a query from toolbox. Does it make any difference? I also dont know where to create instances of the adapters. Should I do it in the Page_Load? Should I just do it when I'm going to use it? Am I opening a new connection when I create a new instance? This doe...
stackexchange/codereview
I am experiencing some oddities when working with a Grid component in flex, I have the following form that uses a grid to align the fields, as you can see, each GridRow has a border. My problem is that the border is still visible through GridItems that span multiple rows (observe the TextArea that spans 4 rows, the Gri...
stackexchange/codereview
What are the best practices in setting up a new instance of TFS 2008 Workgroup edition? Specifically, the constraints are as follows: Must install on an existing Windows Server 2008 64 bit TFS application layer is 32 bit only Should I install SQL Server 2008, Sharepoint and the app layer in a virtual instance of Wi...
stackexchange/codereview
If you have Subversion installed on your development machine and you don't work in a team, is there any reason why you should use the svn protocol instead of file?
stackexchange/codereview
How to create a DOM from a User's input in PHP5?
stackexchange/codereview
I'm trying to use Python with ReportLab 2.2 to create a PDF report. According to the user guide, Special TableStyle Indeces [sic] In any style command the first row index may be set to one of the special strings 'splitlast' or 'splitfirst' to indicate that the style should be used only for the last row of a split tabl...
stackexchange/codereview
I have an Ant script that performs a copy operation using the 'copy' task. It was written for Windows, and has a hardcoded C:\ path as the 'todir' argument. I see the 'exec' task has an OS argument, is there a similar way to branch a copy based on OS?
stackexchange/codereview
Trying to keep all the presentation stuff in the xhtml on this project and I need to format some values in a selectItem tag have a BigDecimal value and need to make it look like currency. Is there anyway to apply a <f:convertNumber pattern="$#,##0.00"/> Inside a <f:selectItem> tag? Any way to do this or a work around t...
stackexchange/codereview
I'm using the RxTx library over usbserial on a Linux distro. The RxTx lib seems to behave quite differently (in a bad way) than how it works over serial. My application has several threads and one of my biggest problems is that out of nowhere, I seem to be getting one to two extra bytes on my stream. I can't figure...
stackexchange/codereview
What, if any, considerations (HTML, CSS, JavaScript) should you take when designing for Google Chrome?
stackexchange/codereview
Can someone explain the mechanics of a jump table and why is would be needed in embedded systems?
stackexchange/codereview
Anyone know of a way to use SVK with perforce? The docs seem to imply it used to be possible, but some mailing list messages claim that is no longer the case?
stackexchange/codereview
I would like to "post-process" my app.config file and perform some token replacements after the project builds. Is there an easy way to do this using a VS post-build event command? (Yeah I know I could probably use NAnt or something, looking for something simple.)
stackexchange/codereview
I have a .csv file that is frequently updated (about 20 to 30 times per minute). I want to insert the newly added lines to a database as soon as they are written to the file. The FileSystemWatcher class listens to the file system change notifications and can raise an event whenever there is a change in a specified file...
stackexchange/codereview
I have a application deployed through clickonce, but How can I modify the config file on the deployment server?. I mean, once the product is tested, it should be deployed in our production server, but need to modify some of the config parameters to consume production resources?. I heard we should use MageUI.exe, but s...
stackexchange/codereview
I just did a merge using something like: svn merge -r 67212:67213 https://my.svn.repository/trunk . I only had 2 files, one of which is a simple ChangeLog. Rather than just merging my ChangeLog changes, it actually pulled mine plus some previous ones that were not in the destination ChangeLog. I noticed there was a ...
stackexchange/codereview
I'm capturing data from a tablet using Java (JPen library rocks) and would like to be able to paint a penstroke in a more natural way. Currently I'm drawing the pen stroke as straight line segments each with a different Stroke thickness. There has to be something in Java's Graphics Library that lets me to this more e...
stackexchange/codereview
I'm updating some of our legacy C++ code to use the "MFC feature pack" that Microsoft released for Visual Studio 2008. We've used the new classes to derive our application from CFrameWndEx, and are applying the Office 2007 styles to give our application a more modern appearance. This gives us gradient filled window tit...
stackexchange/codereview
I'm trying to rebuild an old metronome application that was originally written using MFC in C++ to be written in .NET using C#. One of the issues I'm running into is playing the midi files that are used to represent the metronome "clicks". I've found a few articles online about playing MIDI in .NET, but most of them se...
stackexchange/codereview
I was browsing this thread, which has good recommendation but a bit too general for me. So, if anyone has a collection of nice game programming feeds,please share them. :) (both general and specific topics are welcome)
stackexchange/codereview
What's the best way to make a linked list in Java?
stackexchange/codereview
I have been using Environment.GetFolderPath(Environment.SpecialFolder.Desktop) to get the path to the user's desktop for ages now, but since we changed our setup here at work so we use Folder Redirection to map our users' Desktop and My Documents folders to the server, it no-longer works. It still points to the De...
stackexchange/codereview
I'd like to rollback a change I made recently in TFS. In Subversion, this was pretty straightforward. However, it seems to be an incredible headache in TFS: Option 1: Get Prior Version Manually get prior version of each file Check out for edit Fail - the checkout (in VS2008) forces me to get the latest version Optio...
stackexchange/codereview
I am using js2-mode to edit Javascript in Emacs, but I can't seem to get it to stop using tabs instead of spaces for indentation. My other modes work fine, just having issues w/ js2.
stackexchange/codereview
I'm writing a wizard for an Eclipse RCP application. After doing some processing on a file and taking some user input, I don't want to let the user go back to make changes. At this point they must either accept or reject the changes they are about to make to the system. What I can't seem to find is a method call that...
stackexchange/codereview
I use TFS 2008. We run unit tests as part of our continuous integration build and integration tests nightly. What other types of testing do you automate and include in your build process? what technologies do you use to do so? I'm thinking about smoke tests, performance tests, load tests but don't know how realisti...
stackexchange/codereview
I was wondering if anyone that has experience in both this stuff can shed some light on the significant difference between the two if any? Any specific strength of each that makes it suitable for any specific case?
stackexchange/codereview
I have developed a COM component (dll) that implements an Edit() method displaying a WTL modal dialog. The complete interface to this COM component corresponds to a software standard used in the chemical process industry (CAPE-OPEN) and as a result this COM component is supposed to be usable by a range of 3rd party exe...
stackexchange/codereview
What are the steps to estimating using function points? Is there a quick-reference guide of some sort out there?
stackexchange/codereview
How do you give a C# auto-property an initial value? I either use the constructor, or revert to the old syntax. Using the Constructor: class Person { public Person() { Name = "Initial Name"; } public string Name { get; set; } } Using normal property syntax (with an initial value) private st...
stackexchange/codereview
I am setting the .Content value of a Label to a string that contains underscores; the first underscore is being interpreted as an accelerator key. Without changing the underlying string (by replacing all _ with __), is there a way to disable the accelerator for Labels?
stackexchange/codereview
I need to take a web page and extract the address information from the page. Some are easier than others. I'm looking for a firefox plugin, windows app, or VB.NET code that will help me get this done. Ideally I would like to have a web page on our admin (ASP.NET/VB.NET) where you enter a URL and it scraps the page and ...
stackexchange/codereview
I am trying to understand left outer joins in LINQ to Entity. For example I have the following 3 tables: Company, CompanyProduct, Product The CompanyProduct is linked to its two parent tables, Company and Product. I want to return all of the Company records and the associated CompanyProduct whether the CompanyProduct e...
stackexchange/codereview
Heavy emphasis on simple. I've never made an installer and I'd rather not have to learn much. A system that I could hand a pile of files to and it would make some smart guesses about where to put them would be ideal. Go ahead and answer the general question. However In my cases I'm stuck with some extra constraints. Th...
stackexchange/codereview
This is an Eclipse question, and you can assume the Java package for all these Eclipse classes is org.eclipse.core.resources. I want to get an IFile corresponding to a location String I have: "platform:/resource/Tracbility_All_Supported_lib/processes/gastuff/globalht/GlobalHTInterface.wsdl" I have the enclosing IWo...
stackexchange/codereview
I have a query where I am searching against a string: SELECT county FROM city WHERE UPPER(name) = 'SAN FRANCISCO'; Now, this works fine, but it doesn't scale well, and I need to optimize it. I have found an option along the lines of creating a generated view, or something like that, but I was hoping for a simpler sol...
stackexchange/codereview
I need to dynamically create a Video object in ActionScript 2 and add it to a movie clip. In AS3 I just do this: var videoViewComp:UIComponent; // created elsewhere videoView = new Video(); videoView.width = 400; videoView.height = 400; this.videoViewComp.addChild(videoView); Unfortunately, I can't figure out ho...
stackexchange/codereview
Does anyone know how to achieve the cover-flow effect using JavaScript to scroll through a bunch of images. I'm not talking about the 3D rotating itunes cover-art, but the effect that happens when you hit the space bar in a folder of documents, allowing you to preview them in a lightbox fashion.
stackexchange/codereview
How do you customize the Copy/Paste behavior in Visual Studio 2008? For example I create a new <div id="MyDiv"></div> and then copy and paste it in the same file. VisualStudio pastes <div id="Div1"></div> instead of the original text I copied. It is even more frustrating when I'm trying to copy a group of related div's...
stackexchange/codereview
I am trying to build an website for my college's magazine. I used the "views" module to show a block of static content I created on the front page. My question is: how can I edit the theme's css so it changes the way that block of static content is displayed? For reference, here's the link to the site (in portuguese, a...
stackexchange/codereview
I have a solution consisting of five projects, each of which compile to separate assemblies. Right now I'm code-signing them, but I'm pretty sure I'm doing it wrong. What's the best practice here? Sign each with a different key; make sure the passwords are different Sign each with a different key; use the same passwor...
stackexchange/codereview
I am performing a find and replace on the line feed character (&#10;) and replacing it with the paragraph close and paragraph open tags using the following code: <xsl:template match="/STORIES/STORY"> <component> <xsl:if test="boolean(ARTICLEBODY)"> <p> <xsl:call-template name=...
stackexchange/codereview
When loading a page for the first time (!IsPostback), I am creating a button in code and adding it to my page, then adding an event handler to the click event. However, when clicking the button, after the page reloads, my event handler does not fire. Can anyone explain why?
stackexchange/codereview
I try to externalize all strings (and other constants) used in any application I write, for many reasons that are probably second-nature to most stack-overflowers, but one thing I would like to have is the ability to automate spell checking of any user-visible strings. This poses a couple problems: Not all strings ar...
stackexchange/codereview
What is the best way to implement the singleton pattern in Python? It seems impossible to declare the constructor private or protected as is normally done with the Singleton pattern...
stackexchange/codereview
I'm in the process of maintaining a Ruby on Rails app and am looking for an easy way to find the hostname or IP address of the box I'm on (since it's a VM and new instances may have different hostnames or IP addresses). Is there a quick and easy way to do this in Ruby on Rails? Edit: The answer below is correct but the...
stackexchange/codereview