instruction_seed
stringlengths
1
35.8k
_source
stringclasses
1 value
I have the vmware server with this error, anyone knows how to fix it?VMware Server Error http://soporte.cardinalsystems.com.ar/errorvmwareserver.jpg
stackexchange/codereview
I have a databound TextBox in my application like so: (The type of Height is decimal?) <TextBox Text="{Binding Height, UpdateSourceTrigger=PropertyChanged, ValidatesOnExceptions=True, Converter={StaticResource NullConverter}}" /> public class NullableCo...
stackexchange/codereview
What could be the cause of JVM thread dumps that show threads waiting to lock on a monitor, but the monitors do not have corresponding locking threads? Java 1.5_14 on Windows 2003
stackexchange/codereview
I'm working with a support person who is supposed to be able to install SSL certs on a web server he maintains. He has local admin rights to the server via a domain security group. He also has permissions on our internal CA running Windows 2003 Server Certificate Authority: "Request cert" and "Issue and Manage certs"...
stackexchange/codereview
As an exercise for myself, I was translating a sample program into various languages. Starting in C#, I had a visitor-pattern interface like so: interface Visitor { void Accept(Bedroom x); void Accept(Bathroom x); void Accept(Kitchen x); void Accept(LivingRoom x); } Moving to ...
stackexchange/codereview
I'm trying to be better about unit testing my code, but right now I'm writing a lot of code that deals with remote systems. SNMP, WMI, that sort of thing. With most classes I can mock up objects to test them, but how do you deal with unit testing a real system? For example, if my class goes out and gets the Win32_Lo...
stackexchange/codereview
I have a Nintendo Wii, and I've got devkitpro working to load some simple programs. The example source code that I've been able to find is very simplistic, such as drawing and rotating a simple shape. I've been looking for more in depth tutorials, and I haven't been able to find much. Most of the applications avail...
stackexchange/codereview
Many countries now have data protection legislation which afford individuals the rights to: request that an organization hand over all information they hold on the individual and to request that any information held on the individual is destroyed Facebook got into trouble over the second part of this in the UK as it...
stackexchange/codereview
How should I run another program from within my C program? I need to be able to write data into STDIN of the launched program (and maybe read from it's STDOUT) I am not sure if this is a standard C function. I need the solution that should work under Linux.
stackexchange/codereview
What advantage, if any, is provided by formatting C code as follows: while(lock_file(lockdir)==0) { count++; if(count==20) { fprintf(stderr,"Can't lock dir %s\n",lockdir); exit(1); } sleep(3); } if(rmdir(serverdir)!=0) { switch(errno) { case EE...
stackexchange/codereview
I like putting shortcuts of the form "g - google.lnk" in my start menu so google is two keystrokes away. Win, g. My eight or so most frequent applications go there. I also make links to my solution files I am always opening "x - Popular Project.lnk" Are there any better ways to automate opening frequently used applicat...
stackexchange/codereview
In Python, given a module X and a class Y, how can I iterate or generate a list of all subclasses of Y that exist in module X?
stackexchange/codereview
What sort of database schema would you use to store email messages, with as much header information as practical/possible, into a database? Assume that they have been fed into a script from the MTA and parsed into the relevant headers/body/attachments. Would you store the message body whole in the database table, or sp...
stackexchange/codereview
I have built a basic data entry application allowing users to browse external content in iframe and enter data quickly from the same page. One of the data variables is the URL. Ideally I would like to be able to load the iframes current url into a textbox with javascript. I realize now that this is not going to happen ...
stackexchange/codereview
So, I was reading the Google testing blog, and it says that global state is bad and makes it hard to write tests. I believe it--my code is difficult to test right now. So how do I avoid global state? The biggest things I use global state (as I understand it) for is managing key pieces of information between our devel...
stackexchange/codereview
I have a dict, that looks like this: { 'foo': { 'opt1': 1, 'opt2': 2, }, 'foo/bar': { 'opt3': 3, 'opt4': 4, }, 'foo/bar/baz': { 'opt5': 5, 'opt6': 6, } } And I need to get it to look like: { 'foo': { 'opt1': 1, ...
stackexchange/codereview
How can I mount a floppy image file using cygwin. I would like to mount the image, copy a file to the mounted drive, and then unmount it from the command line. I know you can use Virtual Floppy Drive in windows, but is there a way to do this in Cygwin?
stackexchange/codereview
We're deploying some new WCF calls in our SQL 2005 DB using the CLR. In testing, I hardcoded in the code the endpoint to connect to, and deployed it to our test server. When we go to deploy this to production, we will be deploying it to many different SQL DBs, and using different endpoints to connect to (same service r...
stackexchange/codereview
I have an idea for a simple application which will monitor a group of folders, index any files it finds. A gui will allow me quickly tag new files and move them into a single database for storage and also provide an easy mechanism for querying the db by tag, name, file type and date. At the moment I have about 100+ GB ...
stackexchange/codereview
I am the web guy for a large TV station. Our site is cached by Akamai. Pages render perfectly in our testing environment (not cached) and on our "origin" page (again, not cached), but when they are viewed on our live environment (the cached site), they do not render exactly the same as how I coded them. Maybe it's a ti...
stackexchange/codereview
I am experimenting with using the FaultException and FaultException<T> to determine the best usage pattern in our applications. We need to support WCF as well as non-WCF service consumers/clients, including SOAP 1.1 and SOAP 1.2 clients. FYI: using FaultExceptions with wsHttpBinding results in SOAP 1.2 semantics wherea...
stackexchange/codereview
Is it really viable to use GCJ to publish server-side applications? Webapps? My boss is convinced that compiling our (my) webapp into a binary executable is a brilliant idea. (Then again, he likes nice, small simple things with blinky lights that he can understand.) He instinctively sees no issues with this, while...
stackexchange/codereview
How do you shade alternating rows in a SQL Server Reporting Services report? Edit: There are a bunch of good answers listed below--from quick and simple to complex and comprehensive. Alas, I can choose only one...
stackexchange/codereview
I am looking for a method of reading emails using Pop3 in C# 2.0. Currently, I am using code found in CodeProject. However, this solution is less than ideal. The biggest problem is that it doesn't support emails written in unicode.
stackexchange/codereview
When I try to display the contents of a LOB (large object) column in SQL*Plus, it is truncated. How do I display the whole thing?
stackexchange/codereview
I am parsing text that has a heading and then data that applies to that heading. I need to break each data field into groups, and have the heading also apply to those groups. Here's an example: (Update: The text below has been updated to better reflect it's current layout, and to indicate an annotation.) Heading 1...
stackexchange/codereview
The set up for apache-jmeter allows for a URL to be sent to a web-server on multiple threads. I'm interested in first determining if the response codes are 200-500 and then whether the returned content is the expected content. Is this detailed configuration possible?
stackexchange/codereview
VB 6.0 does not have any global handler.To catch runtime errors,we need to add a handler in each method where we feel an error can occur.But, still some places might be left out.So,we end up getting runtime errors.Adding error handler in all the methods of an application,the only way?
stackexchange/codereview
I'm writing a web application that I want to be able to use forms authentication pointing to a SQL database, or use integrated authentication in different installations of the web app. I'm authenticating users just fine with either provider but I have a question on how to architect my database. Currently what I'm doin...
stackexchange/codereview
If all of my __init__.py files are empty, do I have to store them into version control, or is there a way to make distutils create empty __init__.py files during installation?
stackexchange/codereview
What experience can you share about using multiple AJAX libraries? There are useful features in Prototype, some in jQuery, the Yahoo library, etc. Is it possible to include all libraries and use what you want from each, do they generally all play nicely together with name spaces, etc. For the sake of speed is there a p...
stackexchange/codereview
This is related to another question I asked. In summary, I have a special case of a URL where, when a form is POSTed to it, I can't rely on cookies for authentication or to maintain the user's session, but I somehow need to know who they are, and I need to know they're logged in! I think I came up with a solution to my...
stackexchange/codereview
SVN keyword substition gives is not pretty. E.g., Last updated: $Date$ by $Author$ yields Last updated: $Date: 2008-09-22 14:38:43 -0400 (Mon, 22 Sep 2008) $ by $Author: cconway $" Does anybody have a Javascript snippet that prettifies things and outputs some HTML? The result should be more like: Last update: ...
stackexchange/codereview
We have a SharePoint site on it's own domain and are debating using Forms Authentication or Active Directory. Really we would like the power of kerberos with the flexibility and transparancy of a forms authentication (like storing the users in sqlserver using sqlmembershipprovider in asp.net). Is there any way to for...
stackexchange/codereview
What's the best way for a running C or C++ program that's been launched from the command line to put itself into the background, equivalent to if the user had launched from the unix shell with '&' at the end of the command? (But the user didn't.) It's a GUI app and doesn't need any shell I/O, so there's no reason to ...
stackexchange/codereview
I have a string which starts with //#... goes upto the newline characater. I have figured out the regex for the which is this ..#([^\n]*). My question is how do you remove this line from a file if the following condition matches
stackexchange/codereview
I have a MemoryStream with the contents of a Font File (.ttf) and I would like to be able to create a FontFamily WPF object from that stream WITHOUT writing the contents of the stream to disk. I know this is possible with a System.Drawing.FontFamily but I cannot find out how to do it with System.Windows.Media.FontFamil...
stackexchange/codereview
I use Eclipse, Maven, and Java in my development. I use Maven to download dependencies (jar files and javadoc when available) and Maven's eclipse plug-in to generate the .project and .classpath files for Eclipse. When the dependency downloaded does not have attached javadoc I manually add a link for the javadoc in the ...
stackexchange/codereview
Expanding on this question, what is the best way to develop against both SQL Server 2005 and SQL Server 2008? I'd like to see if I could just use Orcas technology on my current Vista 64 machine and since SQL Server 2005 wants to install a stub version of Visual Studio 2005, I'd like to avoid using it. However, most pla...
stackexchange/codereview
I've got a sign up form that requires the user to enter their email and password, both are in two separate text boxes. I want to provide a button that the user can click so that the password (which is masked) will appear in a popup when the user clicks the button. Currently my JavaScript code for this is as follows: ...
stackexchange/codereview
I've written this very simple function to replace a file extension using LINQ in C#.NET 3.5 however I have a feeling that there's a more elegant way to do this. (I'm not committed to using LINQ here - just looking for a more elegant approach.) Ideas? private string ReplaceFileExtension(string fileName, string newEx...
stackexchange/codereview
I would like to generate a random floating point number between 2 values. What is the best way to do this in C#?
stackexchange/codereview
I'm trying to wrap my head around creating a toolbar (a tool band in a rebar) in MFC for Internet Explorer using COM. Is it possible to get the address of the currently viewed page (i.e., https://stackoverflow.com/questions/ask in my case :-) ) from the toolbar? If so, what should I look in to? Thanks!
stackexchange/codereview
I have a graphical app that needs to test the resolution of the display it is starting up on in Mac OS X to ensure it is not larger than the resolution. This is done before the window itself is initialized. If there is more than one display, it needs to be the primary display. This is the display that hardware acce...
stackexchange/codereview
Can some one specify the windows API, one need to use in order to be able to change programmatically the screen refresh rate?
stackexchange/codereview
I have a web application developed with ASP.net and C# that is running on my companies' intranet. Because all the users for this application are all using Microsoft Outlook without exception, I would like for the the application to open up an Outlook message on the client-side. I understand that Office is designed t...
stackexchange/codereview
I have a small to medium project that is in C++/CLI. I really hate the syntax extensions of C++/CLI and I would prefer to work in C#. Is there a tool that does a decent job of translating one to the other? EDIT: When I said Managed c++ before I apparently meant c++/CLI
stackexchange/codereview
Currently, I am working on a new version control system as part of a final year project at University. The idea is to make it highly adaptable and pluggable. We're using the OSGi framework (Equinox implementation) to manage our plug ins. My problem is that I can't find a simple & easy to use method for testing OSGi bun...
stackexchange/codereview
I build websites for a small-ish media company. Unfortunately, around 45-50% of our client base uses IE6, while the other half are pretty much equally split between Firefox and Webkit-based browsers, with a sprinkling of Opera users. I start every one of my sites with a reset stylesheet similar to Eric Meyer's, with a ...
stackexchange/codereview
Each of our production web servers maintains its own cache for separate web sites (ASP.NET Web Applications). Currently to clear a cache we log into the server and "touch" the web.config file. Does anyone have an example of a safe/secure way to remotely reset the cache for a specific web application? Ideally we'd be...
stackexchange/codereview
Can I use the ClickOnce deployment method to deploy and auto update applications targeted for the windows mobile platform (eg smartphone or pocket pc)?
stackexchange/codereview
I understand the difference between String and StringBuilder (StringBuilder being mutable) but is there a large performance difference between the two? The program I’m working on has a lot of case driven string appends (500+). Is using StringBuilder a better choice?
stackexchange/codereview
When Visual Studio (2005) has Options -> Text Editor -> C/C++ -> Tabs -> Indenting set to Smart it will automatically indent code blocks and line up squiggly brackets, {}, as expected. However, if you hit enter inside a code block, move the cursor to another line, and then move it back, the inserted tabs are gone and t...
stackexchange/codereview
How can I construct my ajaxSend call, this seems like the place to put it, to preview what is being passed back to the broker? also, can I stop the ajax call in ajaxSend?..so I can perfect my url string before dealing with errors from the broker? This is the complete URL that, when passed to the broker, will return the...
stackexchange/codereview
First of all, I don't need a textual comparison so Beyond Compare doesn't do what I need. I'm looking for a util that can report on the differences between two files, at the byte level. Bare minimum is the need to see the percentage change in the file, or a report on affected bytes/sectors. Is there anything availab...
stackexchange/codereview
What principles do you generally follow when doing class design?
stackexchange/codereview
I'm working on serial port, transmitting and receiving data to some hardware at 8bit data. I would like to store it as string to facilitate comparison, and preset data are stored as string or hex format in xml file. I found out that only when using Encoding.Default which is ANSI encoding then the 8bit data is converted...
stackexchange/codereview
I see a lot of example code for C# classes that does this: public class Point { public int x { get; set; } public int y { get; set; } } Or, in older code, the same with an explicit private backing value and without the new auto-implemented properties: public class Point { private int _x; private int _y...
stackexchange/codereview
We are attempting to use a SQL Server 2003 database for our test records and want a quick way to take NUnit and NAnt output and produce SQL schema and data. Is there a simple way to generate SQL Schema using the XSD file describing these XML documents?
stackexchange/codereview
I've got a web application working using VB and Ajax. I'm using updatepanels to avoid the irritating "flicker" on postbacks to the server. I would like to have a button control defined within the updatepanel itself (tried moving it outside and got some catastrophic error, so left it there) that makes the current pane...
stackexchange/codereview
Is it possible to send my own developed exceptions over Soap to a client using http.sys??
stackexchange/codereview
What's the best framework for writing modules -- ExtUtils::MakeMaker (h2xs) or Module::Build?
stackexchange/codereview
How can I pre pend (insert at beginning of file) a file to all files of a type in folder and sub-folders using Powershell? I need to add a standard header file to all .cs and was trying to use Powershell to do so, but while I was able to append it in a few lines of code I was stuck when trying to pre-pend it.
stackexchange/codereview
Has anyone run into issues serializing components into a file and reading them back, specifically in the area where the component vendor upgrades the VCL components. For example a file serialized with DelphiX and then years later read back with delphiY. Do the serialization formats change and if so what can be done t...
stackexchange/codereview
How does one handle a DateTime with a NOT NULL? I want to do something like this: SELECT * FROM someTable WHERE thisDateTime IS NOT NULL But how?
stackexchange/codereview
How would you go about producing reports by user selected date ranges in a rails app? What are the best date range pickers? edit in response to patrick : I am looking for a bit of both widget and active record advice but what I am really curious about is how to restfully display a date ranged list based on user selec...
stackexchange/codereview
One of our developers is continually writing code and putting it into version control without testing it. The quality of our code is suffering as a result. Besides getting rid of the developer, how can I solve this problem? EDIT I have talked to him about it number of times and even given him written warning
stackexchange/codereview
When you are learning a new language, what is there a particularly good/effective exercise to help get the hang of it? And why? EDIT: Preferably looking for things that are more complicated that 'Hello World'.
stackexchange/codereview
I am using the example on the AJAX website for the DropDownExtender. I'm looking to make the target control (the label) have the DropDown image appear always, instead of just when I hover over it. Is there any way to do this?
stackexchange/codereview
I'm a Java programmer, and I like my compiler, static analysis tools and unit testing frameworks as tools that help me quickly deliver robust and efficient code. The JRE is pretty much everywhere I would work, too. Given that situation, I can't see a reason why I would ever choose to use shell scripting, vb scripting e...
stackexchange/codereview
This is an ASP.Net 2.0 web app. The Item template looks like this, for reference: <ItemTemplate> <tr> <td class="class1" align=center><a href='url'><img src="img.gif"></a></td> <td class="class1"><%# DataBinder.Eval(Container.DataItem,"field1") %></td> <td class="class1"><%# DataBinder.Eval(Container.Data...
stackexchange/codereview
Most sites are either fully released, or in beta. But what happens if you have a large site, and some of the parts are still in Beta, and other parts aren't. How do you effectively communicate this to the customer?
stackexchange/codereview
Given a path such as "mydir/myfile.txt", how do I find the file's absolute path in Python? E.g. on Windows, I might end up with: "C:/example/cwd/mydir/myfile.txt"
stackexchange/codereview
I am in a position where I could become a team leader of a team distributed over two countries. This team would be the tech. team for a start up company that we plan to bootstrap on limited funds. So I am trying to find out ways to minimize upfront expenses. Right now we are planning to use Java and will have a lot ...
stackexchange/codereview
I'm currently playing around with HTML_QuickForm for generating forms in PHP. It seems kind of limited in that it's hard to insert my own javascript or customizing the display and grouping of certain elements. Are there any alternatives to QuickForm that might provide more flexibility?
stackexchange/codereview
We've seen an issue where one of our installers (msi) returns the error code 2908, which is used to indicate that an assembly failed to register. Later in the installation, we get the following (sanitized) error: MyAssemblyName, version="1.0.1.1", culture="neutral", publicKeyToken="119EFC79848A50". Please refer...
stackexchange/codereview
Given a small set of entities (say, 10 or fewer) to insert, delete, or update in an application, what is the best way to perform the necessary database operations? Should multiple queries be issued, one for each entity to be affected? Or should some sort of XML construct that can be parsed by the database engine be use...
stackexchange/codereview
Every time I publish the application in ClickOnce I get get it to update the revision number by one. Is there a way to get this change automatically to change the version number in AssemblyInfo.cs file (all our error reporting looks at the Assembly Version)?
stackexchange/codereview
How can I iterate over each file in a directory using a for loop? And how could I tell if a certain entry is a directory or if it's just a file?
stackexchange/codereview
I have mixed data i nvarchar column (words and numbers). Which is fastest way to sort data in this column in Numeric Order. Result example: 1 2 3 ... 10 11 ... aaaa aaab b ba ba ...
stackexchange/codereview
Is there an XSLT library that is pure Python? Installing libxml2+libxslt or any similar C libraries is a problem on some of the platforms I need to support. I really only need basic XSLT support, and speed is not a major issue.
stackexchange/codereview
Given an small Excel VBA app (single form, small amount of records saved in single worksheet) that runs quite happily locally on the workstation, what would be the easiest and quickest way of providing the same app on the web? Re-writing the app is an option but I thought it was worth checking if there was a quicker s...
stackexchange/codereview
I'm trying to convert a multipage color tiff file to a c# CompressionCCITT3 tiff in C#. I realize that I need to make sure that all pixels are 1 bit. I have not found a useful example of this online.
stackexchange/codereview
For this directory structure: . |-- README.txt |-- firstlevel.rb `-- lib |-- models | |-- foo | | `-- fourthlevel.rb | `-- thirdlevel.rb `-- secondlevel.rb 3 directories, 5 files The glob would match: firstlevel.rb lib/secondlevel.rb lib/models/thirdlevel.rb lib/models/foo/fourthlevel.r...
stackexchange/codereview
I want to be able to run a single spec file's tests — for the one file I'm editing, for example. rake spec executes all the specs. My project is not a Rails project, so rake spec:doc doesn't work. Don't know if this matters, but here is my directory structure. ./Rakefile ./lib ./lib/cushion.rb ./lib/cushion ./lib/cu...
stackexchange/codereview
I have a matrix in SQL reporting and I would like it to print on an A4 page. If the matrix has less than 4 columns then it fits but for more than 4 columns I would like the matrix to wrap and show only 4 columns per page. Is this possible? I am using SQL Reporting 2005 in localmode.
stackexchange/codereview
My understanding of the MVC is as follows (incase it's horribly wrong, I am afterall new to it) Models are the things that interface with the database Views are the design/layout of the page Controllers are where everything starts and are essentially the page logic I'm using CodeIgniter but I would hazard a guess it'...
stackexchange/codereview
I know there's some JAVA_OPTS to set to remotely debug a Java program. What are they and what do they mean ?
stackexchange/codereview
I have a ASP.NET 2.0 webpage with 2 UserControls (.ascx). Each UserControl contains a bunch of validators. Placing a ValidationSummary on the page will display all validation errors, of both UserControl's. Placing a ValidationSummary in each UserControl will display all the errors of both controls twice. What I want i...
stackexchange/codereview
In continuation of the my previous question, are the any good controls for text diffs visualization? Something like StackOverflow's revision diff viewer but for WinForms or WPF Requirements: free, preferably open-source based on WPF or WinForms No apps please, only components. I'm not interested in OSS diff tools
stackexchange/codereview
Is there someway to have a part of the page that renders like a little sub-page, like components? For example, if I have a shopping cart on all my pages?
stackexchange/codereview
Ok, do you do Business.Name or Business.BusinessName SubCategory.ID or SubCategory.SubCategoryID What about in your database? Why? I'm torn with both. Would love there to be a "right answer"
stackexchange/codereview
How do you generate C# classes for accessing WMI?
stackexchange/codereview
Our company has multiple domains set up with one website hosted on each of the domains. At this time, each domain has its own authentication which is done via cookies. When someone logged on to one domain needs to access anything from the other, the user needs to log in again using different credentials on the other w...
stackexchange/codereview
On JavaFX's Wikipedia In May 2008 (...) Sun Also announced a multi-year agreement with On2 Technologies to bring comprehensive video capabilities to the JavaFX product family using the company's TrueMotion Video codec. Do you know if it will include encoding capabilities for Webcam Video like Flash or jus...
stackexchange/codereview
Are there any tools that will spider an asp.net website and create a static site?
stackexchange/codereview
My side question is there really any difference between tinyblob & tinytext? Buy my real question is what reason, if any, would I choose varchar(255) over tinyblob or tinytext?
stackexchange/codereview
Sometimes we deploy applications behind customer firewall and we need read only access to their DB for debugging issues as sometimes their IT people are not SQL savvy. We want to bundle our application with some web based application that will expose the database and allow us to fire adhoc SQL queries and show their ou...
stackexchange/codereview
I'm writing a Delphi expert. I need to be able to write a value to a property on a property which is an object. E.g. I have a GroupBox on the form and I want to edit the Margins.Left property. I'm using the following procedure to do it but if gives an AV on the marked line. The procedure takes a component from the (pro...
stackexchange/codereview
I would like to write small console based applications on Windows Mobile. What console applications might I use?
stackexchange/codereview