instruction_seed stringlengths 1 35.8k | _source stringclasses 1
value |
|---|---|
I've created a new C++ project in Visual Studio 2008. No code has been written yet; Only project settings have been changed.
When I compile the project, I receive the following fatal error:
fatal error LNK1104: cannot open file 'C:\Program.obj'
| stackexchange/codereview |
I want to know how to create a table where you can adjust the column widths. I have not figured out how to do this. If you know the secret sauce to this technique please let me know.
| stackexchange/codereview |
When I use the task, the property is only set to TRUE if the resource (say file) is available. If not, the property is undefined.
When I print the value of the property, it gives true if the resource was available, but otherwise just prints the property name.
Is there a way to set the property to some value if the res... | stackexchange/codereview |
I'm running a SQL query on SQL Server 2005, and in addition to 2 columns being queried from the database, I'd also like to return 1 column of random numbers along with them. I tried this:
select column1, column2, floor(rand() * 10000) as column3
from table1
Which kinda works, but the problem is that this query return... | stackexchange/codereview |
I need to create a really basic Adobe Illustrator file on the clipboard that I can paste in Adobe Illustrator or Expression Design. I'm looking for code samples on how to programmatically generate Adobe Illustrator Files, preferably from C# or some other .NET language (but at the moment any language goes).
I have found... | stackexchange/codereview |
The question says it all. I can't seem to find any recent rails tutorials or whatever to set up an OpenID authentication system. I found RestfulOpenIDAuthentication but it's so much older than the vanilla Restful Authentication and the docs don't even mention Rails 2 that I am pretty wary. Does anyone have any tips?... | stackexchange/codereview |
I am running Ruby and MySQL on a Windows box.
I have some Ruby code that needs to connect to a MySQL database a perform a select. To connect to the database I need to provide the password among other things.
The Ruby code can display a prompt requesting the password, the user types in the password and hits the Enter k... | stackexchange/codereview |
Lately I've be moving source files around in our source tree. For example placing a bunch of files into a common assembly. I've been doing this my deleting the file from CVS and then adding it again in the new spot. The problem is the revision number of the file resets back to 1.1. Is there some simple way to move thi... | stackexchange/codereview |
In the admin interface and newforms there is the brilliant helper of being able to define choices. You can use code like this:
APPROVAL_CHOICES = (
('yes', 'Yes'),
('no', 'No'),
('cancelled', 'Cancelled'),
)
client_approved = models.CharField(choices=APPROVAL_CHOICES)
to create a drop down box in your for... | stackexchange/codereview |
We are setting up a Selenium test campaign on a big web application.
The first thing we've done was to build a framework which initialize SQL data in database before the test, launch the test, archive results and then clear data.
We've integrate that in a Maven 2 process, run every day by TeamCity on a dedicated databa... | stackexchange/codereview |
We currently have code like this:
Dim xDoc = XDocument.Load(myXMLFilePath)
The only way we know how to do it currently is by using a file path and impersonation (since this file is on a secured network path).
I've looked at XDocument.Load on MSDN, but I don't see anything.
| stackexchange/codereview |
How do you perform delete and put operations restfully in rails? I have read the documentation and thought I was doing everything properly, but I can't seem to get it to work.
For example, if I wanted to delete an employee I would create a controller called "EmployeesController" and create a destroy method to perform t... | stackexchange/codereview |
Ok, I'm developing an application that has been in pretty much continous development over the last 16 years, from C in DOS, through various flavours of C++ and now is largely based around C++ with MFC and StingRay GUIs and various other SDKs.
While I use VS 2005 for the release builds, I still use MSVC 6 for much of th... | stackexchange/codereview |
I have my web browsers set to save what I type into text boxes on forms. I have a lot of search terms stored in the text box of my browser and would like to get at it via a program of some sort before I clear these values out. There are far too many for me to go through one at a time.
The web browser must store thi... | stackexchange/codereview |
If i make a label in TFS, and later make a new label with the same name... then the old label is replaced by the new one.
How do I prevent TFS from overwriting a label?
| stackexchange/codereview |
What tools do you use to find unused/dead code in large java projects? Our product has been in development for some years, and it is getting very hard to manually detect code that is no longer in use. We do however try to delete as much unused code as possible.
Suggestions for general strategies/techniques (other than ... | stackexchange/codereview |
I want to put users into an instance of ADAM so that ADAM looks similar to a typical, real, Active Directory server.
I'm developing an application that integrates with LDAP. I've tested with OpenLDAP and its core.schema. Now I'd like to test with with Active Directory, but the closest I can get to that using my equ... | stackexchange/codereview |
I am attempting to use Ant's XMLValidate task to validate an XML document against a DTD. The problem is not that it doesn't work, but that it works too well. My DTD contains an xref element with an "@linkend" attribute of type IDREF. Most of these reference IDs outside of the current document. Because of this, my b... | stackexchange/codereview |
I ran into an issue when installing Team Foundation Server 2008 Workgroup Edition. I have a Windows Server 2003 SP2 machine that's practically new. I have installed SQL Server 2008 with almost all of the options. When I run through the TFS installation, it allows me to enter my SQL instance name and then goes through t... | stackexchange/codereview |
Is there an IE6/PNG fix that is officially developed by the jQuery team?
If not which of the available plugins should I use?
| stackexchange/codereview |
For example, referencing something as System.Data.Datagrid as opposed to just Datagrid. Please provide examples and explanation. Thanks.
| stackexchange/codereview |
Would it be useful to include the class name and variable name in any NullPointerException message? I know that it might not always be possible because of changes made by a JIT but is seems like the info should be available often (class members, etc).
From: http://jamesjava.blogspot.com/2005/04/what-was-null.html
| stackexchange/codereview |
What if a Java allow both static and dynamic types. That might allow the best of both worlds. i.e.:
String str = "Hello";
var temp = str;
temp = 10;
temp = temp * 5;
Would that be possible?
Would that be beneficial?
Do any languages currently support both and how well does it work out?
Here is a better example (gene... | stackexchange/codereview |
I'm not talking about the kind you get in college, but rather implementing progress reports on the Job for developers.
My thoughts in organizing a development team is encouraging and, to some extend, requiring regular progress updates were developers would report on what they did in the last hour or few hours and how l... | stackexchange/codereview |
I have a table with game scores, allowing multiple rows per account id: scores (id, score, accountid). I want a list of the top 10 scorer ids and their scores.
Can you provide an sql statement to select the top 10 scores, but only one score per account id?
Thanks!
| stackexchange/codereview |
Our CF server occasionally stops processing mail. This is problematic, as many of our clients depend on it.
We found suggestions online that mention zero-byte files in the undeliverable folder, so I created a task that removes them every three minutes. However, the stoppage has occurred again.
I am looking for sugg... | stackexchange/codereview |
I'd like to create a "universal" debug logging function that inspects the JS namespace for well-known logging libraries.
For example, currently, it supports Firebug's console.log:
var console = window['console'];
if (console && console.log) {
console.log(message);
}
Obviously, this only works in ... | stackexchange/codereview |
I just noticed that Chromium was installed in AppData in both Vista and XP. If Google does that and if other applications does this, than is that becuase there is some form of protection? Should we write installers that does the same thing as Google?
| stackexchange/codereview |
With the recent buzz on multicore programming is anyone exploring the possibilities of using MPI ?
| stackexchange/codereview |
Does anyone know of a good tool for debugging JSPs from within Eclipse? I'd like to be able to set and watch breakpoints, step through the Java code/tags, etc within Eclipse while the app is running (under JBoss in my case).
Presumably, it's reasonably straightforward to debug the servlet class that's generated from a ... | stackexchange/codereview |
I would like to do full-text searching of data in my Ruby on Rails application. What options exist?
| stackexchange/codereview |
I am writing a coding standards document for a team of about 15 developers with a project load of between 10 and 15 projects a year. Amongst other sections (which I may post here as I get to them) I am writing a section on code formatting. So to start with, I think it is wise that, for whatever reason, we establish som... | stackexchange/codereview |
I am trying to build an OLAP datasource from a bunch of binary files, and our current model just isn't working. We are using SSAS as our analysis / reporting model for our results, but aren't able to get the performance we want out of SQL.
Our main constraints are:
The database is very large. We have huge dimensio... | stackexchange/codereview |
When programmatically issuing HTTP POST requests, what timeout values would be sensible?
In my case, I'm looking to set 'sensible' timeout values when making POST requests in PHP, however this applies to any language.
I need to be able to issue a set of requests, each to a user-specified URL. If I do need to process re... | stackexchange/codereview |
Possible Duplicate:
What does map(&:name) mean in Ruby?
I was watching a railscast and saw this code.
[Category, Product].(&:delete_all)
In regards to clearing a database.
I asked about the line in IRC and was told
(&:delete_all)
was a shortcut for
{|model| model.delete_all}
I tested this with the following
cla... | stackexchange/codereview |
Is there any way to track the status of a posted upload in AS3? There is a ProgressEvent, but it gives data back about the response, not the actual POST upload. I'm posting binary data for an image, so it's usually in the 50-100kb range.
The image data was generated inside Flash itself, so I can't use the upload metho... | stackexchange/codereview |
The Weblogic servers we are using have been configured to allow JNDI datasource names like "appds".
For development (localhost), we might be running Tomcat and when declared in the <context> section of server.xml, Tomcat will hang JNDI datasources on "java:comp/env/jdbc/*" in the JNDI tree.
Problem: in Weblogic, the JN... | stackexchange/codereview |
There are several web applications which allow you to send photos from your mobile phone and post them to web site/application. How do these work and what sort of technologies would one use to implement such a feature? Is it an MMS server or does one need to get into socket programming? For example, some applications... | stackexchange/codereview |
I'm looking for a standard way to connect to databases in PHP. We've all been there - first start with some rudimentary code to connect/query/iterate/insert/disconnect, then the code grew as the program grew, and it ended up with a mess that's hardly reusable.
I know there are many PEAR, PECL, and other PHP libraries/c... | stackexchange/codereview |
We have some COBOL programs running on our mainframe and we need one of those to communicate with our back end vault through a Java API. Is there any way a Cobol program can invoke the Java program?
Would it be possible to use a Web Service from Cobol? How would I integrate a Cobol program with anything else?
| stackexchange/codereview |
I need a way to update the month value on a dateTime field in my db. I'm being past an int value for the month and need to use that for the update.
Is it possible to do this in the sql statement or would I be best doing it in c# in the webservice?
| stackexchange/codereview |
I've been writing PHP web applications for some time, and have come across very nice Javascript frameworks, such as JQuery, ExtJS, Scriptaculous, etc. I can't say the same about the PHP side - I always coded that part of the client-server dialog from scratch.
I've used CodeIgniter (http://codeigniter.com/) and it is ni... | stackexchange/codereview |
So is there a way to initialize and start a command line Spring app without writing a main method. It seems like all such main methods have the same form
public static void main(final String[] args) throws Exception {
ApplicationContext ctx = new ClassPathXmlApplicationContext("context.xml", Boot.class);
FooSer... | stackexchange/codereview |
I'm using SQL Server 2005, and creating ftp tasks within SSIS.
Sometimes there will be files to ftp over, sometimes not. If there are no files, I don't want the task nor the package to fail. I've changed the arrow going from the ftp task to the next to "completion", so the package runs through. I've changed the al... | stackexchange/codereview |
Currently my app uses just Direct3D9 for graphics, however in the future I' m planning to extend this to D3D10 and possibly OpenGL. The question is how can I do this in a tidy way?
At present there are various Render methods in my code
void Render(boost::function<void()> &Call)
{
D3dDevice->BeginScene();
Call()... | stackexchange/codereview |
It's gotta be free. It's hobby, after all, not a business!. Creating for-profit software isn't an issue, but anything that requires a hardware mod is out.
| stackexchange/codereview |
I've got a class that I'm using as a settings class that is serialized into an XML file that administrators can then edit to change settings in the application. (The settings are a little more complex than the App.config allows for.)
I'm using the XmlSerializer class to deserialize the XML file, and I want it to be ab... | stackexchange/codereview |
I'm trying to perform a bitwise NOT in SQL Server. I'd like to do something like this:
update foo
set Sync = NOT @IsNew
Note: I started writing this and found out the answer to my own question before I finished. I still wanted to share with the community, since this piece of documentation was lacking on MSDN (until I ... | stackexchange/codereview |
I cannot seem to compile mod_dontdothat on Windows. Has anybody managed to achieve this?
Edit:
I've tried compiling the file according to the readme on the site and I've tried to add extra libs to reduce the link errors. Ive got the following installed:
Apache 2.2.9
Visual Studio 2008
ActivePerl
apxs-win32 from Apache... | stackexchange/codereview |
I need to rearrange some content in various directories but it's a bit of a pain. In order to debug the application I'm working on (a ruby app) I need to move my gems into my gem folder one at a time (long story; nutshell: one is broken and I can't figure out which one).
So I need to do something like:
sudo mv backup/g... | stackexchange/codereview |
The JPEG compression encoding process splits a given image into blocks of 8x8 pixels, working with these blocks in future lossy and lossless compressions. [source]
It is also mentioned that if the image is a multiple 1MCU block (defined as a Minimum Coded Unit, 'usually 16 pixels in both directions') that lossless alte... | stackexchange/codereview |
I know about the "cooperative" threading of ruby using green threads. How can I create real "OS-level" threads in my application in order to make use of multiple cpu cores for processing?
| stackexchange/codereview |
Are there any utilities out there which can draw pictures of the merge history of a subversion repo - we always commit merges with a (fairly) consistent log message, and it would be handy to be able to automatically extract this info into a single picture that shows what branches occurred when, and what the state of me... | stackexchange/codereview |
Whilst refactoring some legacy C++ code I found that I could potentially remove some code duplication by somehow defining a variable that could point to any class method that shared the same signature. After a little digging, I found that I could do something like the following:
class MyClass
{
protected:
bool Cas... | stackexchange/codereview |
I am using RRDTool (http://oss.oetiker.ch/rrdtool/) as a graphing back-end for storing performance metrics. This is done via the RRDTool CLI from a Python script.
My problem is that the script is multithreaded and each thread updates the RRD at a pretty rapid pace. Sometimes an update fails because one thread is acce... | stackexchange/codereview |
I have a subversion repository that contains a number so subfolders, corresponding to the various applications, configuration files, DLLs, etc (I'll call them 'modules') that make up my project. Now we are starting to "branch" into several related projects. That is, each high-level project will use a number of the mo... | stackexchange/codereview |
We want to be able to advance our business by utilizing both of the power of KOFAX and SharePoint 2007. Any pointers Development-wise?
| stackexchange/codereview |
I've implemented a basic search for a research project. I'm trying to make the search more efficient by building a suffix tree. I'm interested in a C# implementation of the Ukkonen algorith. I don't want to waste time rolling my own if such implementation exists.
| stackexchange/codereview |
I want to migrate from Embarcadero Delphi to Visual Studio, but without a TClientDataset class it is very difficult.
This class represents an in-memory dataset.
I can't find any class like TClientDataset.
Can anyone help me find something like this please?
| stackexchange/codereview |
When I save a file with an .htm or .html extension, which one is correct and what is different?
| stackexchange/codereview |
how can you dynamically add items to a combobox using the datagridview virtual mode?
| stackexchange/codereview |
For example:
root.Nodes.Add(new TNode() { Foo1 = bar1, Foo2 = bar2, Foo3 = bar3 });
or:
root.Nodes.Add(new TNode() { Foo1 = bar1,
Foo2 = bar2,
Foo3 = bar3 });
| stackexchange/codereview |
How do I replace the HEAD of a CVS repository with a branch?
| stackexchange/codereview |
I am trying to implement position-sensitive zooming inside a JScrollPane. The JScrollPane contains a component with a customized paint that will draw itself inside whatever space it is allocated - so zooming is as easy as using a MouseWheelListener that resizes the inner component as required.
But I also want zooming i... | stackexchange/codereview |
I have a nested class. I want to access the outer and nested classes in other class.
How to access both class properties and methods and my condition is i want to create object for only one class
plz provide the code snippet
| stackexchange/codereview |
Is it possible to make a site with ASP.NET MVC Framework using .NET 2.0? I am limited to using .NET 2.0 (we use VS 2008, but we have to use the 2.0 Framework) and I really want to try out the MVC Framework.
| stackexchange/codereview |
Do I have to go with IIS 6 or higher to use Castle MonoRail Routing feature?
I know casini work but practically we not gonna deploy web app with casini, or do we?
| stackexchange/codereview |
Please could you help me in sending a data from Mobile appication to Web Server in WBXML format ? I have got a bit to convert xml to wbxml but not getting how to send that to web server in efficient way ?
| stackexchange/codereview |
I've always been able to allocate 1400 megabytes for Java SE running on 32-bit Windows XP (Java 1.4, 1.5 and 1.6).
java -Xmx1400m ...
Today I tried the same option on a new Windows XP machine using Java 1.5_16 and 1.6.0_07 and got the error:
Error occurred during initialization of VM
Could not reserve enough space for... | stackexchange/codereview |
I need to make sure that user can run only one instance of my program at a time.
Which means, that I have to check programatically, whether the same program is already running, and quit in such case.
The first thing that came to my mind was to create a file somewhere, when the program starts. Then, each other instance ... | stackexchange/codereview |
Even after all the hotfixes and updates that are supposed to fix this, my properties window in Visual Studio 2008 is still SLOW! What happens is a click on a table cell or something similar in the web editor, and regardless of the size of the page I'm working on, it takes a second or two for the properties window to s... | stackexchange/codereview |
I'm writing a log file viewer for a web application and I want to paginate through the lines of the log file. The items in the file are line based with the newest item at the bottom.
So I need a tail() method that can read n lines from the bottom and support an offset. This is what I came up with:
def tail(f, n, offs... | stackexchange/codereview |
What might be the best way to start programming using boost lambda libraries.
| stackexchange/codereview |
I have heard that it's best not to actually have any html in your helpers; my question is, Why not? And furthermore, if you were trying to generate an html list or something like that, how can I avoid actual tags?
Thanks!
-fREW
| stackexchange/codereview |
My dad always says "Responsibility without Authority is meaningless".
However, I find that as developers, we get stuck in situations all the time where we are:
Responsible for ensuring the software is "bug free", but don't have the authority to implement a bug tracking system
Responsible for hitting project deadlines,... | stackexchange/codereview |
I need to get access to the iTunes tags in an RSS feed using PHP. I've used simplepie before for podcast feeds, but I'm not sure how to get the iTunes tags using it. Is there a way to use simplepie to do it or is there a better way?
Okay I tried Simple XML.
All this (the code below) seems to work
$feed = simplexml_loa... | stackexchange/codereview |
I've executed a JDBC query to obtain a resultset. Before iterating over it, I'd like to quickly find out how many rows were returned. How can I do this with high performance?
I'm using Java 6, Oracle 11g, and the latest Oracle JDBC drivers.
| stackexchange/codereview |
I've been battling PHP's email reading functions for the better part of two days. I'm writing a script to read emails from a mailbox and save any attachments onto the server. If you've ever done something similar, you might understand my pain: PHP doesn't play well with email!
I've connected to the POP3 server and I ca... | stackexchange/codereview |
how can i get the aol or outlook address books when the user inserts his username and password
I saw many programns that do it
maybe someone has the source code?
I found a very nice one for yahoo gmail and hotmail
https://sourceforge.net/projects/opencontactsnet/
| stackexchange/codereview |
I'm about to deal with managing and running my first Internet connected Apache webserver and I was wondering if there are any sys admins and developers out there that would like to share some of their knowledge regarding security and optimization tips for running Apache webserver.
Maybe you can share your top five (or ... | stackexchange/codereview |
Yesterday, I asked this question and never really got an answer I was really happy with. I really would like to know how to generate a list of N unique random numbers using a functional language such as Ruby without having to be extremely imperative in style.
Since I didn't see anything I really liked, I've written the... | stackexchange/codereview |
Has anybody tried programming on the EEE Pc in Visual Studio?
I'm considering buying one so I can show some apps on the fly, but also make small changes to them if necessary, without the inconvenience of a large laptop.
Some key points I'm after:
How fast it is
Would it suit the needs of a developer making small chang... | stackexchange/codereview |
I need to be able to merge two (very simple) JavaScript objects at runtime. For example I'd like to:
var obj1 = { food: 'pizza', car: 'ford' }
var obj2 = { animal: 'dog' }
obj1.merge(obj2);
//obj1 now has three properties: food, car, and animal
Is there a built in way to do this? I do not need recursion, and I do no... | stackexchange/codereview |
Does anyone have experience using makefiles for Visual Studio C++ builds (under VS 2005) as opposed to using the project/solution setup. For us, the way that the project/solutions work is not intuitive and leads to configuruation explosion when you are trying to tweak builds with specific compile time flags.
Under Uni... | stackexchange/codereview |
I have a project which is source controlled using Subversion and VisualSVN. Since the version of web.config is different on the server and the developers' computers I want the file to remain on the computers but to be ignored by Subversion. I added it to the svn:ignore but it still remains (and still has a red exclamat... | stackexchange/codereview |
I want to write some JavaScript that will change the onmousedown of a div at runtime. So on load a mouse down on the div will do one thing and if a JavaScript function is called a mouse down on the div will do something else. Is this possible?
| stackexchange/codereview |
In git, it is up to each user to specify the correct author in their local git config file. When they push to a centralized bare repository, the commit messages on the repository will have the author names that they used when committing to their own repository.
Is there a way enforce that a set of known authors for co... | stackexchange/codereview |
I have some WCF methods that are used to transmit information from a server application to a website frontend for use in binding. I'm sending the result as an XElement that is a root of an XML tree containing the data I want to bind against.
I'd like to create some tests that examine the data and ensure it comes acros... | stackexchange/codereview |
When I print "\[\e[34m\]sometext" I get some text in blue, but can I specify the shade of blue somewhere?
| stackexchange/codereview |
Has anyone ever heard of a UNIX shell written in a reasonable language, like Python?
| stackexchange/codereview |
Which one performs better to run a game main loop?
| stackexchange/codereview |
Is there an easy way to marshal a PHP associative array to and from XML? For example, I have the following array:
$items = array("1", "2",
array(
"item3.1" => "3.1",
"item3.2" => "3.2"
"isawesome" => true
)
);
How would I turn it into something similar to the following XML in as few lin... | stackexchange/codereview |
How to test if a line segment intersects an axis-aligned rectange in 2D? The segment is defined with its two ends: p1, p2. The rectangle is defined with top-left and bottom-right points.
| stackexchange/codereview |
How to I get the Fixnum returned by the following:
"abc"[2]
Back into a character?
| stackexchange/codereview |
Having integrated merb_auth_password_slice as per the README, I can successfully login as redirect_after_login is being triggered, although session.authenticated? returns false.
Just trying the basic auth strategy for now (password form), can't seem to get it working, any ideas?
My init file:
require 'dm-validations'
... | stackexchange/codereview |
Is there a way for me to add logging so that entering and exiting methods gets logged along with parameters automatically somehow for tracing purposes? How would I do so?
I am using Log4Net.
| stackexchange/codereview |
I'm writing a php script where I call
$lines = file('base_list.txt');
to break a file up into an array. The file has over 100,000 lines in it, which should be 100,000 elements in the array, but when I run
print_r($lines);
exit;
the array only contains 7280 elements.
So I'm curious, WTF? Is there a limit on the amo... | stackexchange/codereview |
I just fell in love with NHibernate and the fluent interface. The latter enables very nice mappings with refactoring support (no more need for xml files).
But nobody is perfect, so I am missing the many-to-any mapping in fluent. Does anybody know if it is already there? If so, a simple line of code would be nice.
But t... | stackexchange/codereview |
I'm trying to do some custom UI behavior on a Windows Forms PropertyGrid control. I'd like to be able to respond to clicks and double-clicks on the GridItems to change the state. For example, to flip a binary or ternary variable through its states.
I can get at the underlying view by looking up a child of typename "Pro... | stackexchange/codereview |
Is VBA going to go away any time soon, like VB6 has? Should I not develop new Office applications with VBA? Or should I be developing all new Office Apps with VSTO?
Update: Recently read this article.
| stackexchange/codereview |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.