instruction_seed stringlengths 1 35.8k | _source stringclasses 1
value |
|---|---|
How can I find out which column and value is violating the constraint? The exception message isn't helpful at all:
Failed to enable constraints. One or
more rows contain values violating
non-null, unique, or foreign-key
constraints.
| stackexchange/codereview |
I have created a namespace extension that is rooted under Desktop. The main purpose of the extension is to provide a virtual list of ZIP files that represent a list of configurable directories. When the user clicks one of the those items the contents of the related directory are zipped in place and the resulting ZIP fi... | stackexchange/codereview |
We need to get data out of some Hyperion cubes (databases) using SSIS. Are there any connection managers available for this? Has anyone done this?
| stackexchange/codereview |
Is it possible in PHP (as it is in C++) to declare a class method OUTSIDE the class definition?
| stackexchange/codereview |
I've found mention of a data application block existing for ODBC, but can't seem to find it anywhere. If i didn't have a copy of the Access DB application block I wouldn't believe it ever existed either.
Anyone know where to download either the DLL or the code-base from?
--UPDATE: It is NOT included in either the v1,... | stackexchange/codereview |
I have implemented this Graph:
ListenableDirectedWeightedGraph<String, MyWeightedEdge> g =
new ListenableDirectedWeightedGraph<String, MyWeightedEdge>(MyWeightedEdge.class);
In order to show what the class name says; a simple listenable directed weighted graph. I want to change the label of the edges and instea... | stackexchange/codereview |
In several web application projects I've been a part of, the client asks to be able to create their own forms. The question arises on how to store their form definitions, and then how to store user inputted values into those custom forms.
I've seen it done two ways:
Assuming that the client only defines how many field... | stackexchange/codereview |
If I have a control, within a FormView, that is bound using a <% #Bind(...)%> expression. At run time, is there any way of retrieving the name of the field the control is bound to.
To be clear, if the expression is <% #Bind("UserName") %>
I want to return the string "UserName".
| stackexchange/codereview |
I want to create an NSOpenPanel that can select any kind of file, so I do this
NSOpenPanel* panel = [NSOpenPanel openPanel];
if([panel runModalForTypes:nil] == NSOKButton) {
// process files here
}
which lets me select all files except symbolic links.
They're simply not selectable and the obvious setResolvesAl... | stackexchange/codereview |
For a new project with Flash I was looking for something along the lines of standard libraries for basic programming needs, along the lines of Python or Ruby standard libraries. But the only thing I found was a dead project on Sourceforge.
Thus is there no standard library for flash? Does everyone reinvent the wheel ea... | stackexchange/codereview |
I'm using ASP.NET WebClient.DownloadFile(url) to obtain images from the Image Servers of several of our clients. The 'url' is usually simple, like "http://somewhere.com/images/image01.jpg".
This works great for 99% of our clients. But one is giving me a "An existing connection was forcibly closed by the remote host". ... | stackexchange/codereview |
How do I write a regular expression to find all lines containing 665 and not having .pdf
I can't seem to find how to do not in regex. This is for Notepad++ syntax if it matters.
Thanks
| stackexchange/codereview |
I load a single instance of a window on php-gtk, I have a button named "Cancel" that hide(); the window, so when the window is needed again I just show();.
But when I click on the close button instead of the cancel button the window is destroyed. Even when I redirect the event (I'm not sure if i'm doing it right) it ca... | stackexchange/codereview |
I use Lucene.Net to index some documents. I want to show the user a couple of lines as to why that document is in the result set. just like when you use google to search and it shows the link and followed by the link there are a few lines with the keywords highlighted.
any ideas?
| stackexchange/codereview |
Here's my situation - I want to create a resized jpeg image from a user uploaded image, and then send it to S3 for storage, but am looking to avoid writing the resized jpeg to the disk and then reloading it for the S3 request.
Is there a way to do this completely in memory, with the image data JPEG formatted, saved in ... | stackexchange/codereview |
I am trying to create a Tab Control in WPF that has the tabs arranged down the right side of the control, with the text rotated 90 degrees The look is similar to those plastic tabs you can buy and use in a notebook. I have tried changing the TabStripPlacement to Right, but it just stacks the tabs up on the top right si... | stackexchange/codereview |
I'm using the jQuery Form plugin to upload an image. I've assigned a fade animation to happen the beforeSubmit callback, but as I'm running locally, it doesn't have time to finish before the success function is called.
I am using a callback function in my fade(); call to make sure that one fade completes, before the n... | stackexchange/codereview |
I am responsible for the User Interface of an application written completely in Visual C++ using MFC and some third-part controls. I would like to use C# (WinForms or even better WPF) to improve the application look&feel.
I would like some advices about how to do it. Links, articles, examples...
Right now the user int... | stackexchange/codereview |
I want to intercept a request in a filter/servlet and add a few parameters to it. However, the request does not expose a 'setParameter' method and the parameter map when manipulated throws an error saying it is locked. Is there an alternative I can try?
| stackexchange/codereview |
I'm hoping to find out what tools folks use to synchronize data between databases. I'm looking for a JDBC solution that can be used as a command-line tool.
There used to be a tool called Sync4J that used the SyncML framework but this seems to have fallen by the wayside.
| stackexchange/codereview |
I have found some libraries or web services in PHP that does the job. The problem is that the conversion is done when the page is fully loaded, I would like to convert the page to PDF after some content dynamically added via AJAX in onload event.
Thank you very much,
Omar
| stackexchange/codereview |
With a view to avoiding the construction of further barriers to migration whilst
enhancing an existing vb6 program.
Is there a way to achieve the same functionality as control arrays in vb6 without using them?
| stackexchange/codereview |
See code:
var file1 = "50.xsl";
var file2 = "30.doc";
getFileExtension(file1); //returns xsl
getFileExtension(file2); //returns doc
function getFileExtension(filename) {
/*TODO*/
}
| stackexchange/codereview |
I saw Scott Meyers' "Effective C++" third edition book having a small section on "Template Programming".
Any other book/links containing information on "effective" usage of templates ?
| stackexchange/codereview |
I need lucene to search for synonyms as well as the actual keyword. that is if I search for "CI", I want it to search for CI OR "continues integration". at the moment I search for keywords I have the synonyms for and replace them with the "OR-ed" version, but I suspect there should be a better way to do this. my method... | stackexchange/codereview |
Is it possible to have multiple view of the same display object? (e.g. same-computer multi-player game using split screen)
The sample code that failed to work follows:
var content: Sprite = new Sprite();
var v1: Sprite = new Sprite();
var v2: Sprite = new Sprite();
with(content.graphics) {
line... | stackexchange/codereview |
I am trying to bind an event to a "method" of a particular instance of a Javascript "class" using jQuery. The requirement is that I in the event handler should be able to use the "this" keyword to refer to the instance I originally bound the event to.
In more detail, say I have a "class" as follows:
function Car(owner)... | stackexchange/codereview |
In a servlet I do the following:
Context context = new InitialContext();
value = (String) context.lookup("java:comp/env/propertyName");
On an Apache Geronimo instance (WAS CE 2.1) how do i associate a value with the key propertyName?
In Websphere AS 6 i can configure these properties for JNDI lookup under the "Nam... | stackexchange/codereview |
Maybe this is an overarching question as I've seen similar bugs in Firefox and I'd like to know how to avoid coding them.
For no apparent reason, the function keys, arrow keys (de-numlocked numpad as well), the 6 keys over the arrows, and backspace stop working. Every other key seems to work leading me to think it's s... | stackexchange/codereview |
How can I round a decimal number (floating point) to the nearest integer?
e.g.
1.2 = 1
1.7 = 2
| stackexchange/codereview |
I have a few combo-boxes and double spin boxes on my Qt Dialog. Now I need a "ResetToDefault" item on a menu that comes up when you right click on the widget (spin box or combo box).
How do i get it. Is there some way I can have a custom menu that comes up on right click or Is there a way i can add items to the menu t... | stackexchange/codereview |
Just wondering if there is an easy way to add the functionality to duplicate an existing listing in the admin interface?
In data entry we have run into a situation where a lot of items share generic data with another item, and to save time it would be very nice to quickly duplicate an existing listing and only alter th... | stackexchange/codereview |
I'm new to jquery and asp.net so please forgive if this is an obvious question. I'm using a jquery autocomplete plugin which requires that the page it looks up asynchronously for data is in this format as pure text only:
product1|price1
product2|price2
product3|price3
WITHOUT ANY OTHER HTML MARKUP. Any other html tags ... | stackexchange/codereview |
Here's my situation.
I have a button on my ASP.NET webform. This button creates a new browser window pointing to a page which has a lot of hidden fields (which are dynamically generated). This form submits itself to SQL Reporting Services on the bodies onload event. This works fine and the report is displayed in this n... | stackexchange/codereview |
If I avoid referencing assemblies that don't exist in the silverlight 2.0 runtime, will the.Net 2.0 library dlls I create with VS2008 work with silverlight without recompilation or other alteration?
| stackexchange/codereview |
Using .Net 3.0 and VS2005.
The objects in question are consumed from a WCF service then serialized back into XML for a legacy API. So rather than serializing the TestObject, it was serializing .TestObject which was missing the [XmlRoot] attribute; however, all the [Xml*] attributes for the child elements were in the g... | stackexchange/codereview |
I have to write something in vbscript that need to use a unique set. I am looking for something akin to Java's HashSet, is this already in vbscript or do I have to write my own?
| stackexchange/codereview |
We've used the no-longer-supported RichTextBox control as part of our (ASP.NET-based) CMS for a long time, and we'd like to replace it with something lighter-weight and with better cross-browser support. We were originally looking at various ASP.NET components, but I'm wondering if we'd be better off just using an open... | stackexchange/codereview |
I have a .net interop project that uses an app.config file. When I am running the VB6 project that is using the interop control in Debug mode, the ConfigurationManager cannot find the app.config file. When I make the VB6 project into an exe and rename the app.config file to (VB6 binary name).exe.config, the Configurati... | stackexchange/codereview |
How do we decide on the best implementation of hashCode() method for a collection (assuming that equals method has been overridden correctly) ?
| stackexchange/codereview |
I distribute software online, and always wonder if there is a proper way to better define version numbers.
Let's assume A.B.C.D in the answers. When do you increase each of the components?
Do you use any other version number tricks such as D mod 2 == 1 means it is an in house release only?
Do you have beta releases wi... | stackexchange/codereview |
Does anyone know how in ASP.Net's TreeView control, to have a custom style applied to an Expanded node? I have many root nodes and want the Expanded nodes to have a different background.
| stackexchange/codereview |
Okay, this is just a crazy idea I have. Stack Overflow looks very structured and integrable into development applications. So would it be possible, even useful, to have a Stack Overflow plugin for, say, Eclipse?
Which features of Stack Overflow would you like to have directly integrated into your IDE so you can use it... | stackexchange/codereview |
What are the possibilities to enforce restrictions on the package dependencies in a Java build system? For example, the myapp.server.bl.Customer class should not be allowed to refer to the myapp.client.ui.customlayout package.
I'm interested in either Ant-based or IDE-specific solutions.
I'd like to get an error messa... | stackexchange/codereview |
does it matter at all what order the <link> or <script> or <meta> tags are in in the <head></head>?
(daft question but one of those things i've never given any thought to until now.)
| stackexchange/codereview |
Over the past year or so my production platform has been plagued by an odd TCP/IP issue. I've spent zillions of hours working with competent & knowledgeable sysadmins, scouring the net, reading source code, been jerked around by RH's pathetic support, and crying tears of blood! To no avail. (Google 'unkn-4' and you'... | stackexchange/codereview |
Can anyone recommend a decent C image library?
I'm after loaders for bmp, gif, jpg, png and tga.
I want to use this for programming my Sony Playstation Portable, so opensource would be very handy.
After some googleing I've found FreeImage and CImg, but both feel rather heavy, and CImg is C++ not C.
| stackexchange/codereview |
I have a problem with a data-bound DataGrid control, in that despite each column having its Wrap property set to false, the text still wraps. It seems to only do this on IE, and not FF.
| stackexchange/codereview |
How can I run background tasks on App Engine?
| stackexchange/codereview |
While writing a file using ofstream, how do I know when the file's size has reached the OS' maximum file size - more specifically linux's maximum file size - ??
| stackexchange/codereview |
I have an application which is a portal application and I want to allow other users add their applications to it. In order to do this I need some way to be able to access their applications in mine. Is this possible?
| stackexchange/codereview |
I have the following VB.net interface that I need to port to C#. C# does not allow enumerations in interfaces. How can I port this without changing code that uses this interface?
Public Interface MyInterface
Enum MyEnum
Yes = 0
No = 1
Maybe = 2
End Enum
ReadOnly Property Number()... | stackexchange/codereview |
I got a bunch of servlet context listeners in my Java webapp, each of them gathering some information about the environment.
Some of them depend on information which is gathered by another listener. But I can't determine the order in which the listeners are registered and called, so I have to duplicate code.
I understa... | stackexchange/codereview |
I would like to track metrics that can be used to improve my team’s software development process, improve time estimates, and detect special case variations that need to be addressed during the project execution.
Please limit each answer to a single metric, describe how to use it, and vote up the good answers.
| stackexchange/codereview |
I am looking for a way to take a user uploaded image that is currently put in a temporary location ex: /tmp/jkhjkh78 and create a php image from it, autodetecting the format.
Is there a more clever way to do this than a bunch of try/catching with imagefromjpeg, imagefrompng, etc?
| stackexchange/codereview |
I'm trying to return a transparent GIF from an .aspx page for display within a web page. I am trying to get the image to have transparency, but I just keep getting Black being where the image should be Transparent.
Does anyone know what I'm doing wrong?
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.... | stackexchange/codereview |
When you tap a row in a UITableView, the row is highlighted and selected. Is it possible to disable this so tapping a row does nothing?
| stackexchange/codereview |
I'm moving an old VBScript web site over to ASP.NET, so I'm starting to use master pages instead of #includeing lots of other files with server side VBScript in them.
How can I stop the pages (as in the ones that are based on master pages) from being generated once and then stored? If I make a change to the master pag... | stackexchange/codereview |
I've run into a problem where I'm getting two printouts of my /etc/motd file on Gentoo Linux. sshd is doing one of the printouts, and I can toggle that by configuring /etc/ssh/sshd_config, but I can't find out who's printing the second copy. I can't disable sshd from printing out the motd due to an audit requirement.... | stackexchange/codereview |
I have a DataGridView which shows the content of a DataTable.
I want to set the backcolor of a row based on the value of a cell in this row.
Note that the cell in question is in a column which is not displayed in the DataGridView (Visible=False).
| stackexchange/codereview |
I am writing a UDF for Excel 2007 which I want to pass a table to, and then reference parts of that table in the UDF. So, for instance my table called "Stock" may look something like this:
Name Cost Items in Stock
Teddy Bear £10 10
Lollipops 20p 1000
I have a... | stackexchange/codereview |
I'm writing some server code that talks to a client process via STDIN. I'm trying to write a snippet of perl code that asynchronously receives responses from the client's STDOUT. The blocking version of the code might look like this:
sub _read_from_client
{
my ($file_handle) = @_;
while (my $line = <$file_handle>... | stackexchange/codereview |
How do you model your customer address data and what techinques are you using to ensure the quality of the data?
Things like deduplication algorithms, duplicate matches, making sure that packages and invoices can actually be delived and such? Esepcially in systems handling customers in multiple countries.
| stackexchange/codereview |
I have the following string:
$_='364*84252';
The question is: how to replace * in the string with something else? I've tried s/\*/$i/, but there is an error: Quantifier follows nothing in regex. On the other hand s/'*'/$i/ doesn't cause any errors, but it also doesn't seem to have any effect at all.
| stackexchange/codereview |
I need to do a join across two different database servers (IPs 10.0.0.50 and 10.0.0.51). What's the best way?
| stackexchange/codereview |
I'm having a problem with some mail merge code that is supposed to produce letters within our application. I'm aware that this code is a bit rough at the moment, but we're in the "Get something working" phase before we tidy it up.
Now the way this is supposed to work, and the way it works when we do it manually, is we ... | stackexchange/codereview |
When I type 'from' (in a LINQ query) after importing System.Linq namespace, it is understood as a keyword. How does this magic happen?
Is 'from' a extension method on some type?
| stackexchange/codereview |
I'm looking for a way to create an "it will look cool" effect for a full screen WPF application I'm working on - a "screen glint" effect that animates or moves across the whole screen to give off a shiny display experience. I'm thinking of creating a large rectangle with a highlighted-gradient and transparent backgroun... | stackexchange/codereview |
I've just set up a new build server with the Windows 2008 .NET 3.5 SDK, and for some reason it hasn't installed c:\Program Files\Common Files\Microsoft Shared\TextTemplating so I can't run t4 templates on it. I had a look at the install options in add/remove programs and every single option is checked.
Any ideas why i... | stackexchange/codereview |
Designing a new system from scratch. I'll be using the STL to store lists and maps of certain long-live objects.
Question: Should I ensure my objects have copy constructors and store copies of objects within my STL containers, or is it generally better to manage the life & scope myself and just store the pointers to ... | stackexchange/codereview |
I've currently got a set of reports with a number of common functions sitting in code blocks within the .rdl files. This obviously presents a maintainability issue and I as wondering if anyone knew a way for these different reports to share a library of common code?
Ideally I'd like to have a .Net Assembly attached to ... | stackexchange/codereview |
I'm using MS Sql Server 2000, and for many queries when I run a query in Query Analyzer, with the statistics turned on, the numbers reported in the statistics tab are extremely different from the values shown in the Query Profiler. When the profiler and the analyzer are running at the same time, some queries report 20... | stackexchange/codereview |
Did anyone of you ever find a way of getting the Microsoft Report Viewer Control (Web) to work from within an Ajax UpdatePanel?
| stackexchange/codereview |
I have an script that receives an encrypted url and from that generates a download, the most critic par of the script is this:
$MimeType = new MimeType();
$mimetype = $MimeType->getType($filename);
$basename = basename($filename);
header("Content-type: $mimetype");
header("Content-Disposition: attachment; filename=\"$b... | stackexchange/codereview |
When adding an EditItemTemplate of some complexity (mulitple fields in one template), and then parsing the controls from the RowUpdating event, the controls that were manually entered by the user have no values. My guess is there is something going on with when the data is bound, but I've had instances where simply add... | stackexchange/codereview |
The IT department where I work is trying to move to 100% virtualized servers, with all the data stored on a SAN. They haven't done it yet, but the plan eventually calls for moving the existing physical SQL Server machines to virtual servers as well.
A few months ago I attended the Heroes Happen Here launch event, and ... | stackexchange/codereview |
I'm trying to write an interface between a home-grown project management system and Serena Mariner. (The bigwigs like to read Mariner, the worker bees like to write to the home grown system.)
How can I (programmatically?) figure out what Attribute Keys are available?
I'm actually writing the interface in PHP, but any ... | stackexchange/codereview |
How can I detect if the internet connection is offline in JavaScript?
| stackexchange/codereview |
According to the answers to this question, I cannot embed a file version in my .msi file.
The installer that I give the client needs to have a file version.
So, what I want to do is create a self-extracting executable containing the msi file and the setup.exe generated by Visual Studio, and put the file version on th... | stackexchange/codereview |
What are some useful Oracle optimizations one can use for an Application that mostly writes (updates) to an Oracle database?
The general usage pattern here is not web-serving or logging, as is most cases, but instead to persist complex state of a system, so the only times reading is needed is when the system starts up... | stackexchange/codereview |
I want to create a script that parses or makes sense of apache's error log to see what the most recent error was. I was wondering if anyone out there has something that does this or has any ideas where to start?
| stackexchange/codereview |
I am running Visual Studio Team Edition 2008.
When I create a new website, I get a new file I've never seen before: vwd.webinfo.
The contents of this file is as follows:
<?xml version="1.0" encoding="UTF-8"?>
<VisualWebDeveloper>
<!-- Visual Studio global web project settings. -->
<StartupServices>
<... | stackexchange/codereview |
Weve recently been trying to work on an application that uses pandastream to encode our videos, we are sending the videos successfully, and the response that we get back is in YAML, however the only tool that we can find (YAML for .NET) is not parsing the file. Has anyone else ran into this, or have any insight on the... | stackexchange/codereview |
When I try to test the AutoLotWCFService using "wcftestclient", I get the following error. What am I doing wrong? Any insight will help. This is a simple Web Service that has wshttpbinding with interface contract and the implementation in the service. Here is the long error message: The Web.Config file has 2 endpoints ... | stackexchange/codereview |
Just wanted to get an idea for ways (web) developers get round the short fall of (most) WYSIWYG editors, whereby the users that are editing the text aren't always HTML literate enough to produce good/great results.
In the past we have resigned ourselves to either locking down the editor or simply not supplying one.
Wha... | stackexchange/codereview |
My team is trying to setup an Apache reverse proxy from a customer's site into one of our web applications.
http://www.example.com/app1/some-path maps to http://internal1.example.com/some-path
Inside our application we use struts and have redirect = true set on certain actions in order to provide certain functionalit... | stackexchange/codereview |
How does one check if a directory is already present in the PATH environment variable? Here's a start. All I've managed to do with the code below, though, is echo the first directory in %PATH%. Since this is a FOR loop you'd think it would enumerate all the directories in %PATH%, but it only gets the first one.
Is ther... | stackexchange/codereview |
A large international company deploys a new web and MOTO (Mail Order and Telephone Order) handling system. Among other things you are tasked to design format for both order and customer identification numbers.
What would be the best format in your opinion? Please list any assumptions and considerations.
Accepted Answe... | stackexchange/codereview |
I have an asp.net application that should access data from two SQL Servers. One of the SQL Servers is present on the same machine as IIS (let us call it SQLSERVER1) whereas the other SQL server is present on another machine (SQLSERVER2).
The connection strings are trusted for both the SQL servers. Impersonation has bee... | stackexchange/codereview |
This question discusses encrypting data on the iPhone using the crypt() function. As an alternative, is there a keychain on the iPhone and if so, what code would I use to access it in order to store login details and then retrieve them for us in an application?
| stackexchange/codereview |
I am totally new to SQL. I have a simple select query similar to this:
SELECT COUNT(col1) FROM table1
There are some 120 records in the table and shown on the GUI.
For some reason, this query always returns a number which is less than the actual count.
Can somebody please help me?
| stackexchange/codereview |
I've got a bunch of servers running this Linux app. I'd like for them to be able to generate a GUID with a low probability of collision. I'm sure I could just pull 128 bytes out of /dev/urandom and that would probably be fine, but is there a simple & easy way to generate a GUID that is more equivalent to the Win32 on... | stackexchange/codereview |
Is there some code or a library that lets me control the 7-Zip unpacking functionality from C# code?
| stackexchange/codereview |
So I've got an application whose window behavior I would like to behave more like Photoshop CS. In Photoshop CS, the document windows always stay behind the tool windows, but are still top level windows. For MDI child windows, since the document window is actually a child, you can't move it outside of the main window. ... | stackexchange/codereview |
I'm using Webbrowser control to login to HTTPS site with "untrusted certificate".
but I get popup such standart window "Security Alert" about untrusted certificate:
I have to find this window by title and send it Alt+Y to press Yes:
int iHandle = NativeWin32.FindWindow(null, "Security Alert");
NativeWin32.SetForegroun... | stackexchange/codereview |
We are trying to bind a Linux machine (debian 4.0) to W2k3 AD. We have configured kerberos properly so that we can get TGTs. And users authenticate properly. However, PAM seems to be the sticky wicket. For example when we try to SSH to the linux machine as one of the AD users, the authentication succeeds (as per th... | stackexchange/codereview |
exact code will be helpful. I assume the DirectoryServices namespace does it but I can't find the method that does it.
I need actual C# code. All the samples I found so far are VB or VBScript. The C# examples I found are for reading/setting ADSI properties. A command like backup seems to have a certain .NET syntax whi... | stackexchange/codereview |
I know it is not recommended, but is it at all possible to pass the user's password to scp?
I'd like to copy a file via scp as part of a batch job and the receiving server does, of course, need a password and, no, I cannot easily change that to key-based authentication.
| stackexchange/codereview |
I would like to use an add-in like simple-modal or the dialog add-in in the UI kit. However, how do I use these or any other and get a result back. Basically I want the modal to do some AJAX interaction with the server and return the result for the calling code to do some stuff with.
| stackexchange/codereview |
I would like to upgrade my web projects on an IIS 5 server from .NET 2.0 to .NET 3.5. These web applications live on a server with other web applications that will not be upgraded to .NET 3.5. The server administrator is reluctant to install .NET 3.5 because he is afraid it will break the applications on that machine... | stackexchange/codereview |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.