instruction_seed stringlengths 1 35.8k | _source stringclasses 1
value |
|---|---|
Has anyone got a working solution without some Java/COM-bridge? E.g. process the Email as a file (.msg) rather than locating the data that is referenced in the Clipboard?
| stackexchange/codereview |
I'm trying to redirect all requests to my domain to another domain using mod_rewrite in an Apache 2.2 VirtualHost declaration. There is one exception to this -- I'd like all requests to the /audio path not to be redirected.
I've written a RewriteCond and RewriteRule to do this but it's not quite right and I can't figu... | stackexchange/codereview |
The .NET IDisposable Pattern implies that if you write a finalizer, and implement IDisposable, that your finalizer needs to explicitly call Dispose.
This is logical, and is what I've always done in the rare situations where a finalizer is warranted.
However, what happens if I just do this:
class Foo : IDisposable
{
... | stackexchange/codereview |
I need to deploy a few files that were checked in sometime ago (can't remember the exact ones), so I'm looking to get a list so I can deploy just those files. What is the svn command to do this?
| stackexchange/codereview |
When executing SubmitChanges to the DataContext after updating a couple properties with a LINQ to SQL connection (against SQL Server Compact Edition) I get a "Row not found or changed." ChangeConflictException.
var ctx = new Data.MobileServerDataDataContext(Common.DatabasePath);
var deviceSessionRecord = ctx.Sessions.F... | stackexchange/codereview |
What is the fastest method of parsing an XML file in C#? I'm using .Net 2.0
| stackexchange/codereview |
We have a SharePoint list setup with history enabled so the Comments field keeps all the past values. When it displays, the Comments field is void of all line breaks. However, when SharePoint e-mails the change to us, the line breaks are in there. The Description field also shows the line breaks.
So, something must be... | stackexchange/codereview |
As per this comment in a related thread, I'd like to know why Levenshtein distance based methods are better than Soundex.
| stackexchange/codereview |
In SQL Server 2005, the query analyzer has told me many times to create a non-clustered index on a primary ID column of a table which already has a clustered index. After following this recommendation, the query execution plan reports that the query should be faster.
Why would a Non-Clustered index on the same column ... | stackexchange/codereview |
I am looking for simple straightforward solution for accessing EXIF information of jpeg images in .Net. Does anybody has experience with this?
| stackexchange/codereview |
I have a bunch of latitude/longitude pairs that map to known x/y coordinates on a (geographically distorted) map.
Then I have one more latitude/longitude pair. I want to plot it on the map as best is possible. How do I go about doing this?
At first I decided to create a system of linear equations for the three nearest ... | stackexchange/codereview |
It's about PHP but I've no doubt many of the same comments will apply to other languages.
Simply put, what are the differences in the different types of loop for PHP? Is one faster/better than the others or should I simply put in the most readable loop?
for ($i = 0; $i < 10; $i++)
{
# code...
}
foreach ($array as... | stackexchange/codereview |
I know there is a registry key indicating the install directory, but I don't remember what it is off-hand.
I am currently interested in Visual Studio 2008 install directory, though it wouldn't hurt to list others for future reference.
| stackexchange/codereview |
I frequently work with multiple instances of Visual Studio, often working on different branches of the same solution.
Visual C++ 6.0 used to display the full path of the current source file in its title bar, but Visual Studio 2005 doesn't appear to do this. This makes it slightly more awkward than it should be to work ... | stackexchange/codereview |
I would like to think that some of the software I'm writing today will be used in 30 years. But I am also aware that a lot of it is based upon the UNIX tradition of exposing time as the number of seconds since 1970.
#include <stdio.h>
#include <time.h>
#include <limits.h>
void print(time_t rt) {
struct tm * t = gm... | stackexchange/codereview |
Using PyObjC, you can use Python to write Cocoa applications for OS X. Can I write native iPhone apps using Python and if so, how?
| stackexchange/codereview |
One of the things that get me thoroughly confused is the use of session.Flush,in conjunction with session.Commit, and session.Close.
Sometimes session.Close works, e.g., it commits all the changes that I need. I know I need to use commit when I have a transaction, or a unit of work with several creates/updates/deletes,... | stackexchange/codereview |
The default shell in Mac OS X is bash, which I'm generally happy to be using. I just take it for granted. It would be really nice if it auto-completed more stuff, though, and I've heard good things about zsh in this regard. But I don't really have the inclination to spend hours fiddling with settings to improve my comm... | stackexchange/codereview |
Here is a simplification of my database:
Table: Property
Fields: ID, Address
Table: Quote
Fields: ID, PropertyID, BespokeQuoteFields...
Table: Job
Fields: ID, PropertyID, BespokeJobFields...
Then we have other tables that relate to the Quote and Job tables individually.
I now need to add a Message table where users c... | stackexchange/codereview |
I was reading the example chapter from the book by Ayende and on the website of the Boo language I saw a reference to the Specter BDD Framework.
I am wondering if anybody is using it in their project, how that works out and if there are more examples and/or suggested readings.
Just in case you are wondering, I'm a C# d... | stackexchange/codereview |
I wondered if anyone uses virtualized desktop PCs (running WinXP Pro or older) to have some old applications that are seldom used available for some ongoing tasks.
Say you have a really old project that every once in a while needs a document update in a database system or something like that. The database application i... | stackexchange/codereview |
I would like to filter an array of items by using the map() function. Here is a code snippet:
var filteredItems = items.map(function(item)
{
if( ...some condition... )
{
return item;
}
});
The problem is that filtered out items still uses space in the array and I would like to completely wipe them ... | stackexchange/codereview |
I'm having trouble with events in Internet Explorer 7.
When I have a form with two or more input[type=text] and I press enter, the events occurs in this order:
submit button (onClick)
form (onSubmit)
Sample code:
<form onSubmit="{alert('form::onSubmit'); return false;}">
<input type="text">
<input type="text"... | stackexchange/codereview |
I have a ASP.NET application that we've written our own logging module for.
My question is, where is the standard place to write a log file to? I.e. the website will be running as the anonymous user identity (e.g. IUSR on IIS7) and I need a place where I know it'll have permission to write to.
Cheers,
| stackexchange/codereview |
I've spent a good amount of time coming up with solution to this problem, so in the spirit of this post, I'm posting it here, since I think it might be useful to others.
If anyone has a better script, or anything to add, please post it.
Edit: Yes guys, I know how to do it in Management Studio - but I needed to be able... | stackexchange/codereview |
I want to know what a "virtual base class" is and what it means.
Let me show an example:
class Foo
{
public:
void DoSomething() { /* ... */ }
};
class Bar : public virtual Foo
{
public:
void DoSpecific() { /* ... */ }
};
| stackexchange/codereview |
Multisampling is a way of applying full screen anti-aliasing (FSAA) in 3D applications. I need to use multisampling in my OpenGL program, which is currently embedded in a wxWidgets GUI. Is there a way to do this? Please respond only if you know the detailed steps to achieve this.
I'm aware of enabling multisampling usi... | stackexchange/codereview |
I ended up writing a quick little script for this in Python, but I was wondering if there was a utility you could feed text into which would prepend each line with some text -- in my specific case, a timestamp. Ideally, the use would be something like:
cat somefile.txt | prepend-timestamp
(Before you answer sed, I tr... | stackexchange/codereview |
I've been banging my head against SQL Server 2005 trying to get a lot of data out. I've been given a database with nearly 300 tables in it and I need to turn this into a MySQL database. My first call was to use bcp but unfortunately it doesn't produce valid CSV - strings aren't encapsulated, so you can't deal with an... | stackexchange/codereview |
I have a pretty standard table set-up in a current application using the .NET XSD DataSet and TableAdapter features. My contracts table consists of some standard contract information, with a column for the primary department. This column is a foreign key to my Departments table, where I store the basic department name,... | stackexchange/codereview |
I'm wondering how to make a release build that includes all necessary DLL files into the .exe so the program can be run on a non-development machine without having to install the Microsoft redistributable on the target machine.
Without doing this you get the error message that the application configuration is not corre... | stackexchange/codereview |
I want to write C/C++ programs that take input from a MIDI device.
The MIDI device connects to my PC using a USB connector.
I'm looking for a (C/C++ implemented) library that I can use to read the MIDI signals from the MIDI device through the USB port.
I'm happy manipulating the MIDI data once I get it, I just don't wa... | stackexchange/codereview |
How would one display any add content from a "dynamic" aspx page? Currently I am working on using the System.Web.HttpResponse "Page.Response" to write a file that is stored on a web server to a web request.
This would allow people to hit a url to the type http://www.foo.com?Image=test.jpg and have the image display in ... | stackexchange/codereview |
Not very technical, but... I have to implement a bad words filter in a new site we are developing. So I need a "good" bad words list to feed my db with... any hint / direction? Looking around with google I found this one, and it's a start, but nothing more.
Yes, I know that this kind of filters are easily escaped... bu... | stackexchange/codereview |
I'm trying to parse a grammar in ocamlyacc (pretty much the same as regular yacc) which supports function application with no operators (like in Ocaml or Haskell), and the normal assortment of binary and unary operators. I'm getting a reduce/reduce conflict with the '-' operator, which can be used both for subtraction ... | stackexchange/codereview |
I'm curious to hear the experiences of those who are currently running their SVN server on Windows.
Jeff Atwood has a post on how to setup SVN as a Windows service. It's a great first step, but it doesn't touch on other topics, such as:
What to use for a web-based repository browser? WebSVN can work on Windows, but i... | stackexchange/codereview |
Is there an automatic way in SQL Server 2005 to create a database from several tables in another database? I need to work on a project and I only need a few tables to run it locally, and I don't want to make a backup of a 50 gig DB.
UPDATE
I tried the Tasks -> Export Data in Management studio, and while it created a ne... | stackexchange/codereview |
Is there any reason not to use the bitwise operators &, |, and ^ for "bool" values in C++?
I sometimes run into situations where I want exactly one of two conditions to be true (XOR), so I just throw the ^ operator into a conditional expression. I also sometimes want all parts of a condition to be evaluated whether th... | stackexchange/codereview |
I'm trying to fetch Wikipedia pages using LWP::Simple, but they're not coming back. This code:
#!/usr/bin/perl
use strict;
use LWP::Simple;
print get("http://en.wikipedia.org/wiki/Stack_overflow");
doesn't print anything. But if I use some other webpage, say http://www.google.com, it works fine.
Is there some other ... | stackexchange/codereview |
I've been programming in C# and Java recently and I am curious where the best place is to initialize my class fields.
Should I do it at declaration?:
public class Dice
{
private int topFace = 1;
private Random myRand = new Random();
public void Roll()
{
// ......
}
}
or in a constructor?:
p... | stackexchange/codereview |
In LINQ to SQL, is it possible to check to see if an entity is already part of the data context before trying to attach it?
A little context if it helps...
I have this code in my global.asax as a helper method. Normally, between requests, this isn't a problem. But right after signing in, this is getting called more t... | stackexchange/codereview |
I'm not clear on the differences between the "current" version of Ruby (1.8) and the "new" version (1.9). Is there an "easy" or a "simple" explanation of the differences and why it is so different?
| stackexchange/codereview |
This past summer I was developing a basic ASP.NET/SQL Server CRUD app, and unit testing was one of the requirements. I ran into some trouble when I tried to test against the database. To my understanding, unit tests should be:
stateless
independent from each other
repeatable with the same results i.e. no persisting ... | stackexchange/codereview |
I have a script that has a part that looks like that:
for file in `ls *.tar.gz`; do
echo encrypting $file
gpg --passphrase-file /home/$USER/.gnupg/backup-passphrase \
--simple-sk-checksum -c $file
done
For some reason if I run this script manually, works perfectly fine and all files are encrypted. If I run thi... | stackexchange/codereview |
What data structures would you use to represent a chessboard for a computer chess program?
| stackexchange/codereview |
Is it a deliberate design decision or a problem with our current day browsers which will be rectified in the coming versions?
| stackexchange/codereview |
I'm working on a quick setup program in Visual Studio and wanted to change the banner bitmap. Anyone know off-hand what the ideal (or the required) dimensions are for the new banner image? Thanks.
| stackexchange/codereview |
How do you retrieve selected text using Regex in C#?
I am looking for C# code that is equivalent to this Perl code:
$indexVal = 0;
if($string =~ /Index: (\d*)/){$indexVal = $1;}
| stackexchange/codereview |
Note: This was posted when I was starting out C#. With 2014 knowledge, I can truly say that auto-properties are among the best things that ever happened to the C# language.
I am used to create my properties in C# using a private and a public field:
private string title;
public string Title
{
get { return title; }
... | stackexchange/codereview |
From what I've read, VS 2008 SP1 and Team Foundation Server SP1 packages are traditional service packs that require you to first install the original versions before you will be able to install the SP.
Is there a way, supported or not, to slipstream the install?
| stackexchange/codereview |
Plug-in systems in C++ are hard because the ABI is not properly defined, and each compiler (or version thereof) follows its own rules. However, COM on Windows shows that it's possible to create a minimal plug-in system that allows programmers with different compilers to create plug-ins for a host application using a s... | stackexchange/codereview |
I'm using the Yahoo Uploader, part of the Yahoo UI Library, on my ASP.Net website to allow users to upload files. For those unfamiliar, the uploader works by using a Flash applet to give me more control over the FileOpen dialog. I can specify a filter for file types, allow multiple files to be selected, etc. It's grea... | stackexchange/codereview |
Is there a Box Plot graph, or box and whisker graph available for Reporting Services 2005? From the looks of the documentation there doesn't seem to be one out of the box; so I am wondering if there is a third party that has the graph, or a way to build my own?
| stackexchange/codereview |
What is the configuration setting for modifying the default homepage in a Grails application to no longer be appName/index.gsp? Of course you can set that page to be a redirect but there must be a better way.
| stackexchange/codereview |
So far I have encountered adjacency list, nested sets and nested intervals as models for storing tree structures in a database. I know these well enough and have migrated trees from one to another.
What are other popular models? What are their characteristics? What are good resources (books, web, etc) on this topic?
I'... | stackexchange/codereview |
I did some tests a while ago and never figured out how to make this work.
The ingredients:
COM+ transactional object (developed in VB6)
.Net web application (with transaction) in IIS that...
makes a call to the COM+ component
updates a row in a SQL database
Testing:
Run the .Net application and force an exceptio... | stackexchange/codereview |
What is the difference between using angle brackets and quotes in an include directive?
#include <filename>
#include "filename"
| stackexchange/codereview |
Possible Duplicate:
What are the most important functional differences between C# and VB.NET?
Other than syntax, what are the major differences between C# and vb.net?
| stackexchange/codereview |
Is there any good way to deal with the class renaming refactor from Resharper when the file is under source control and TortoiseSVN is the client. I have am trying VisualSVN right now but I haven't had the need to rename anything recently. I don't want to change our repository just to try this out.
Also not sure if t... | stackexchange/codereview |
I want to programatically create an NSTextView. How can I determine the correct frame height so that the view displays one line of text in the current default font?
| stackexchange/codereview |
Is there any way to apply an attribute to a model file in ASP.NET Dynamic Data to hide the column?
For instance, I can currently set the display name of a column like this:
[DisplayName("Last name")]
public object Last_name { get; set; }
Is there a similar way to hide a column?
Edit: Many thanks to Christian Hagelid f... | stackexchange/codereview |
Wondering if there is a better why in the WHERE clause of choosing records when you need to look at effective start and end dates?
Currently this how I've done it in the past on MS SQL Server. Just worried about the date and not the time. I'm using SQL Server 2005.
AND Convert(datetime, Convert(char(10), ep.EffectiveS... | stackexchange/codereview |
I need to see the contents of the viewstate of an asp.net page. I looked for a viewstate decoder, found Fridz Onion's ViewState Decoder but it asks for the url of a page to get its viewstate. Since my viewstate is formed after a postback and comes as a result of an operation in an update panel, I cannot provide a url. ... | stackexchange/codereview |
I know the following libraries for drawing charts in an SWT/Eclipse RCP application:
Eclipse BIRT Chart Engine (Links to an article on how to use it)
JFreeChart
Which other libraries are there for drawing pretty charts with SWT? Or charts in Java generally? After all, you can always display an image...
| stackexchange/codereview |
I have been developing web/desktop applications for about 6 years now. During the course of my career, I have come across application that were heavily written in the database using stored procedures whereas a lot of application just had only a few basic stored procedures (to read, insert, edit and delete entity record... | stackexchange/codereview |
We have a deployment system at my office where we can automatically deploy a given build of our code to a specified dev environment (dev01, dev02, etc.).
These dev environments are generalized virtual machines, so our system has to configure them automatically. We have a new system requirement with our next version; w... | stackexchange/codereview |
I have a .NET 2.0 windows forms app, which makes heavy use of the ListView control.
I've subclassed the ListView class into a templated SortableListView<T> class, so it can be a bit smarter about how it displays things, and sort itself.
Unfortunately this seems to break the Visual Studio Forms Designer, in both VS2005 ... | stackexchange/codereview |
How do you create a static class in C++? I should be able to do something like:
cout << "bit 5 is " << BitParser::getBitAt(buffer, 5) << endl;
Assuming I created the BitParser class. What would the BitParser class definition look like?
| stackexchange/codereview |
Unit testing and ASP.NET web applications are an ambiguous point in my group. More often than not, good testing practices fall through the cracks and web applications end up going live for several years with no tests.
The cause of this pain point generally revolves around the hassle of writing UI automation mid-develo... | stackexchange/codereview |
Is there a method of accessing an Exchange server that does not have IMAP or POP3 enabled without Outlook?
It does not appear that Outlook Express supports Exchange (only IMAP and POP3).
| stackexchange/codereview |
I've got a group of inter-related classes that are all overridden together to create a particular implementation. I'm wondering if it is a good idea to enclose the interrelated subclasses in a namespace.
For example purposes, consider the following namespaces and classes:
namespace Protocol
{
public abstract class Me... | stackexchange/codereview |
In a C++ Windows (XP and NT, if it makes a difference) application I'm working on, I need to get the network name associated with the computer the code is executing on, so that I can convert local filenames from C:\filename.ext to \\network_name\C$\filename.ext. How would I do this?
Alternatively, if there's a function... | stackexchange/codereview |
I need to create an ASP page (classic, not ASP.NET) which runs remote shell scripts on a UNIX server, then captures the output into variables in VBScript within the page itself.
I have never done ASP or VBScipt before. I have tried to google this stuff, but all I find are references to remote server side scripting, not... | stackexchange/codereview |
Recently I have been investigating the possibilities of caching in ASP.NET.
I rolled my own "Cache", because I didn't know any better, it looked a bit like this:
public class DataManager
{
private static DataManager s_instance;
public static DataManager GetInstance()
{
}
private Data[] ... | stackexchange/codereview |
What is the the best way to write a form to submit some data in ASP.NET MVC? Is it as Scott Guthrie demonstrates here? Are there better approaches? Perhaps with less using of strings?
| stackexchange/codereview |
How do you configure tomcat to bind to a single ip address (localhost) instead of all addresses?
| stackexchange/codereview |
Whenever I show a ModalPopupExtender on my Sharepoint site, the popup shown creates both horizontal and vertical scrollbars. If you scroll all the way to the end of the page, the scrollbar refreshes, and there is more page to scroll through. Basically, I think the popup is setting its bounds beyond the end of the pag... | stackexchange/codereview |
Basically I want tools which generate source code visualization like:
function call graph
dependency graph
...
| stackexchange/codereview |
I'm writing an interpreter for an experimental language. Three of the main constructs of the language are definitions, statements, and expressions. Definitions can contain statements and expressions, statements can contain definitions and expressions, and one kind of expression can contain statements. I represent all o... | stackexchange/codereview |
How much should one DataSet represent? Using the example of an ordering system: While showing your order I also show a list of items similar to one of yours as well as a list of our most popular items.
While your items are tangled in a web of relationships involving you and your past orders, preferred suppliers, and t... | stackexchange/codereview |
What is Lazy Loading?
[Edit after reading a few answers]
Why do people use this term so often?
Say you just use a ASP/ADO recordset and load it with data or ADO.NET Datasource for a gridview.
I guess I should have asked why people use the term Lazy Loading, what "other" types are their?
| stackexchange/codereview |
I am learning Python for a class now, and we just covered tuples as one of the data types. I read the Wikipedia page on it, but, I could not figure out where such a data type would be useful in practice. Can I have some examples, perhaps in Python, where an immutable set of numbers would be needed? How is this differen... | stackexchange/codereview |
Using ASP.NET MVC there are situations (such as form submission) that may require a RedirectToAction.
One such situation is when you encounter validation errors after a form submission and need to redirect back to the form, but would like the URL to reflect the URL of the form, not the action page it submits to.
As I... | stackexchange/codereview |
Most people with a degree in CS will certainly know what Big O stands for.
It helps us to measure how well an algorithm scales.
But I'm curious, how do you calculate or approximate the complexity of your algorithms?
| stackexchange/codereview |
We use a data acquisition card to take readings from a device that increases its signal to a peak and then falls back to near the original value. To find the peak value we currently search the array for the highest reading and use the index to determine the timing of the peak value which is used in our calculations.
Th... | stackexchange/codereview |
What is the best way to use PyGame (SDL) within a PyGTK application?
I'm searching for a method that allows me to have a drawing area in the GTK window and at the same time being able to manage both GTK and SDL events.
| stackexchange/codereview |
Is there any python module to convert PDF files into text? I tried one piece of code found in Activestate which uses pypdf but the text generated had no space between and was of no use.
| stackexchange/codereview |
What fonts do you use for programming, and for what language/IDE? I use Consolas for all my Visual Studio work, any other recommendations?
| stackexchange/codereview |
I'm trying to generate a sitemap.xml on the fly for a particular asp.net website.
I found a couple solutions:
chinookwebs
cervoproject
newtonking
Chinookwebs is working great but seems a bit inactive right now and it's impossible to personalize the "priority" and the "changefreq" tags of each and every page, they all... | stackexchange/codereview |
One of the articles I really enjoyed reading recently was Quality Control by Last.FM. In the spirit of this article, I was wondering if anyone else had favorite monitoring setups for web type applications. Or maybe if you don't believe in Log Monitoring, why?
I'm looking for a mix of opinion slash experience here I gue... | stackexchange/codereview |
In order to fully use LinqToSql in an ASP.net 3.5 application, it is necessary to create DataContext classes (which is usually done using the designer in VS 2008). From the UI perspective, the DataContext is a design of the sections of your database that you would like to expose to through LinqToSql and is integral in ... | stackexchange/codereview |
Is there a way to specify a child's initial window position in Qt?
I have an application that runs on Linux and Windows and it looks like the default behavior of Qt lets the Window Manager determine the placement of the child windows.
On Windows, this is in the center of the screen the parent is on which seems reaso... | stackexchange/codereview |
I am writing a client-side Swing application (graphical font designer) on Java 5. Recently, I am running into java.lang.OutOfMemoryError: Java heap space error because I am not being conservative on memory usage. The user can open unlimited number of files, and the program keeps the opened objects in the memory. After ... | stackexchange/codereview |
I have my Wordpress install and MediaWiki sharing the same login information. Unfortunately, users need to log into both separately, but at least they use the same credentials.
What I would like to do is cause a successful login on the Wordpress blog to also cause a login for MediaWiki (ideally both directions). Th... | stackexchange/codereview |
If I create a class like so:
// B.h
#ifndef _B_H_
#define _B_H_
class B
{
private:
int x;
int y;
};
#endif // _B_H_
and use it like this:
// main.cpp
#include <iostream>
#include <vector>
class B; // Forward declaration.
class A
{
public:
A() {
std::cout << v.size() << std::endl;
}
priva... | stackexchange/codereview |
How can I permanently enable line numbers in IntelliJ IDEA?
| stackexchange/codereview |
I'm missing something here:
$objSearcher = New-Object System.DirectoryServices.DirectorySearcher
$objSearcher.SearchRoot = New-Object System.DirectoryServices.DirectoryEntry
$objSearcher.Filter = ("(objectclass=computer)")
$computers = $objSearcher.findall()
So the question is why do the two following outputs ... | stackexchange/codereview |
Is there a function like document.getElementById("FirstDiv").clear()?
| stackexchange/codereview |
So I'm not quite convinced about OpenID yet, and here is why:
I already have an OpenID because I have a Blogger account. But I discovered that Blogger seems to be a poor provider when I tried to identify myself on the altdotnet page and recieved the following message:
You must use an OpenID persona that specifies a v... | stackexchange/codereview |
I have a .net web application that has a Flex application embedded within a page. This flex application calls a .net webservice. I can trace the execution proccess through the debugger and all looks great until I get the response:
soap:ReceiverSystem.Web.Services.Protocols.SoapException: Server was unable to process... | stackexchange/codereview |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.