instruction_seed stringlengths 1 35.8k | _source stringclasses 1
value |
|---|---|
I have a simple 2-column layout with a footer that clears both the right and left div in my markup. My problem is that I can't get the footer to stay at the bottom of the page in all browsers. It works if the content pushes the footer down, but that's not always the case.
| stackexchange/codereview |
What is the best way to create a lock on a file in Perl?
Is it best to flock on the file or to create a lock file to place a lock on and check for a lock on the lock file?
| stackexchange/codereview |
Is it possible to do 3.1 or 5.1 audio using Flash? We're starting a project here for an interactive kiosk, and we've been told to use Flash. However, we also have a requirement to support either 3.1 or 5.1 audio (where 5.1 is the most wanted feature).
I haven't done any high-tech audio stuff using Flash, so I was w... | stackexchange/codereview |
I've seen quite a few posts on changes in .NET 3.5 SP1, but stumbled into one that I've yet to see documentation for yesterday. I had code working just fine on my machine, from VS, msbuild command line, everything, but it failed on the build server (running .NET 3.5 RTM).
[XmlRoot("foo")]
public class Foo
{
static... | stackexchange/codereview |
How do I convert the RGB values of a pixel to a single monochrome value?
| stackexchange/codereview |
I was wondering if there are any alternatives to Microsoft's SQL Server Management Studio?
Not there's anything wrong with SSMS, but sometimes it just seem too big an application where all I want todo is browse/edit tables and run queries.
| stackexchange/codereview |
ASP.NET server-side controls postback to their own page. This makes cases where you want to redirect a user to an external page, but need to post to that page for some reason (for authentication, for instance) a pain.
An HttpWebRequest works great if you don't want to redirect, and JavaScript is fine in some cases, bu... | stackexchange/codereview |
my SSRS DataSet returns a field with HTML, e.g.
<b>blah blah </b><i> blah </i>.
how do i strip all the HTML tags? has to be done with inline VB.NET
Changing the data in the table is not an option.
Solution found ... = System.Text.RegularExpressions.Regex.Replace(StringWithHTMLtoStrip, "<[^>]+>","")
| stackexchange/codereview |
I am using the Photoshop's javascript API to find the fonts in a given PSD.
Given a font name returned by the API, I want to find the actual physical font file that font name corresponds to on the disc.
This is all happening in a python program running on OSX so I guess I'm looking for one of:
Some Photoshop javascrip... | stackexchange/codereview |
I've been writing a few web services for a .net app, now I'm ready to consume them. I've seen numerous examples where there is homegrown code for consuming the service as opposed to using the auto generated methods that Visual Studio creates when adding the web reference.
Is there some advantages to this?
| stackexchange/codereview |
Assume you are doing something like the following
List<string> myitems = new List<string>
{
"Item 1",
"Item 2",
"Item 3"
};
ComboBox box = new ComboBox();
box.DataSource = myitems;
ComboBox box2 = new ComboBox();
box2.DataSource = myitems
So now we have 2 combo boxes bound to that array, and everything w... | stackexchange/codereview |
I have an if statement with two conditions (separated by an OR operator), one of the conditions covers +70% of situations and takes far less time to process/execute than the second condition, so in the interests of speed I only want the second condition to be processed if the first condition evaluates to false.
if I or... | stackexchange/codereview |
Any good suggestions? Input will be the name of a header file and output should be a list (preferably a tree) of all files including it directly or indirectly.
| stackexchange/codereview |
Admittedly this might not be a problem on larger screens, but my employer is abit tight and refuses to buy monitors larger than 19inch, this means that I dont have much screen real estate to view all the Visual Studio windows and my code at the same time, or two pieces of code at once. Is there anything that allows me ... | stackexchange/codereview |
I would like to rename files and folders recursively by applying a string replacement operation.
E.g. The word "shark" in files and folders should be replaced by the word "orca".
C:\Program Files\Shark Tools\Wire Shark\Sharky 10\Shark.exe
should be moved to:
C:\Program Files\Orca Tools\Wire Orca\Orcay 10\Orca.exe
The ... | stackexchange/codereview |
We have to connect to a third party SOAP service and we are using WCF to do so. The service was developed using Apache AXIS, and we have no control over it, and have no influence to change how it works.
The problem we are seeing is that it expects the requests to be formatted using Web Services Security, so we are doi... | stackexchange/codereview |
Is it possible to compile and run OpenGL programs from under Cygwin? If yes, how?
| stackexchange/codereview |
I have a Flex swf hosted at http://www.a.com/a.swf.
I have a flash code on another doamin that tries loading the SWF:
_loader = new Loader();
var req:URLRequest = new URLRequest("http://services.nuconomy.com/n.swf");
_loader.contentLoaderInfo.addEventListener(Event.COMPLETE,onLoaderFinish);
_loader.load(req);
On the o... | stackexchange/codereview |
In SQL Server how do you query a database to bring back all the tables that have a field of a specific name?
| stackexchange/codereview |
What are your opinions on developing for the command line first, then adding a GUI on after the fact by simply calling the command line methods?
eg.
W:\ todo AddTask "meeting with John, re: login peer review" "John's office" "2008-08-22" "14:00"
loads todo.exe and calls a function called AddTask that does some val... | stackexchange/codereview |
I have got the following situation. On a machine there is a Fritz ISDN card. There is a process that is responsible for playing a certain wave file on this device's wave out (ISDN connection is made at startup and made persistent). The scenario is easy, whenever needed the process calls waveOutWrite() on the previously... | stackexchange/codereview |
When building projects in C++, I've found debugging linking errors to be tricky, especially when picking up other people's code. What strategies do people use for debugging and fixing linking errors?
| stackexchange/codereview |
I've been using Emacs's sql interactive mode to talk to the MySQL db server and gotten to enjoy it. A developer has set up another db on a new non-default port number but I don't know how to access it using sql-mysql.
How do I specify a port number when I'm trying to connect to a database?
It would be even better if Em... | stackexchange/codereview |
I need to access the OpenGL state variables (such as the MVP matrices) in my Cg shader program. I'm passing these values to my Cg shader program manually using calls such as cgGLSetStateMatrixParameter() in my C/C++ code. Is there an easier way to do this?
| stackexchange/codereview |
What recommendations can you give for a system which must do the following:
Load Plugins (and eventually execute them) but have 2 methods of loading these plugins:
Load only authorized plugins
(developed by the owner of the
software)
Load all plugins
And we need to be reasonably secure that the authorized plugins a... | stackexchange/codereview |
Here's a perfect example of the problem: Classifier gem breaks Rails.
** Original question: **
One thing that concerns me as a security professional is that Ruby doesn't have a parallel of Java's package-privacy. That is, this isn't valid Ruby:
public module Foo
public module Bar
# factory method for new Bar imp... | stackexchange/codereview |
I want a data structure that will allow querying how many items in last X minutes. An item may just be a simple identifier or a more complex data structure, preferably the timestamp of the item will be in the item, rather than stored outside (as a hash or similar, wouldn't want to have problems with multiple items havi... | stackexchange/codereview |
In a macro for Visual Studio 6, I wanted to run an external program, so I typed:
shell("p4 open " + ActiveDocument.FullName)
Which gave me a type mismatch runtime error. What I ended up having to type was this:
Dim wshShell
Set wshShell = CreateObject("WScript.Shell")
strResult = wshShell.Run("p4 open " + ActiveDocume... | stackexchange/codereview |
I have a .NET application, which is using an open source C++ compression library for compressing images. We are accessing the C++ library via managed C++. I'm seeing heap corruption during compression. A call to _CrtIsValidHeapPointer is finding an error on a call to free() when cleaning up after compression.
Are th... | stackexchange/codereview |
The company I work for is starting to have issues with their current branching model and I was wondering what different kinds of branching strategies the community has been exposed to?
Are there any good ones for different situations? What does your company use? What are the advantages and disadvantages of them??
| stackexchange/codereview |
I have a protocol that requires a length field up to 32-bits, and it must be
generated at runtime to describe how many bytes are in a given packet.
The code below is kind of ugly but I am wondering if this can be refactored to
be slightly more efficient or easily understandable. The problem is that the
code will only ... | stackexchange/codereview |
I'm writing a simple app that's going to have a tiny form sitting in one corner of the screen, updating itself.
I'd really love for that form to be transparent and to have the transparency be user-configurable.
Is there any easy way to achieve this?
| stackexchange/codereview |
I'm looking into writing a audio syntesizer in Java, and was wondering if anybody has any advice or good resources for writing such a program. I'm looking for info on generating raw sound waves, how to output them into a usable form (playing over speakers), as well as general theory on the topic. Thanks guys.
| stackexchange/codereview |
I currently use subversion for my version control via AhnkSVN and Visual Studio. I recently started using Tree Surgeon to set up my projects. It creates a build script automatically using NAnt. I would like to be able to automate builds regularly projects within SVN. I like the idea of doing a build on every check ... | stackexchange/codereview |
How and at what stage is a valid OpenGL context created in my code? I'm getting errors on even simple OpenGL code.
| stackexchange/codereview |
From what information I could find, they both solve the same problems - more esoteric operations like array containment and intersection (&&, @>, <@, etc). However I would be interested in advice about when to use one or the other (or neither possibly).
The PostgreSQL documentation has some information about this:
GIN... | stackexchange/codereview |
Is it easy to create GLUT pop-up menus for my OpenGL application? If yes, how?
| stackexchange/codereview |
I am converting from existing CVS repository to SVN repository. CVS repository has few brances and I'd like to rename branches while converting.
Wanted conversion is like this:
CVS branch SVN branch
HEAD -> branches/branchX
branchA -> trunk
branchB -> branches/branchB
branchC -> ... | stackexchange/codereview |
I'm using repository pattern with LINQ, have IRepository.DeleteOnSubmit(T Entity). It works fine, but when my entity class has interface, like this:
public interface IEntity { int ID {get;set;} }
public partial class MyEntity: IEntity {
public int ID {
get { return this.IDfield; }
set { this.ID... | stackexchange/codereview |
I'm the second dev and a recent hire here at a PHP/MySQL shop. I was hired mostly due to my experience in wrangling some sort of process out of a chaotic mess. At least, that's what I did at my last company. ;)
Since I've been here (a few months now), I've brought on board my boss, my product manager and several othe... | stackexchange/codereview |
I am trying to iterate over all the elements of a static array of strings in the best possible way. I want to be able to declare it on one line and easily add/remove elements from it without having to keep track of the number. Sounds really simple, doesn't it?
Possible non-solutions:
vector<string> v;
v.push_back("abc"... | stackexchange/codereview |
We have some really old code that calls WebServices using behaviours (webservice.htc), and we are having some strange problems... since they've been deprecated a long time ago, I want to change the call.
What's the correct way of doing it? It's ASP.NET 1.1
| stackexchange/codereview |
I'm using ASP.NET MVC Preview 4 and would like to know how to use the routing engine for form submissions.
For example, I have a route like this:
routes.MapRoute(
"TestController-TestAction",
"TestController.mvc/TestAction/{paramName}",
new { controller = "TestController", action = "... | stackexchange/codereview |
Are there any handy general items you put in your .procmailrc file?
| stackexchange/codereview |
I'm looking to hear others experiences with SVG + Javascript Frameworks.
Things that I'd like the framework to handle - DOM creation, event handling and minimal size.
Jquery SVG plugin - http://keith-wood.name/svg.html seems to be the only one I can find.
| stackexchange/codereview |
I want to start using Python for small projects but the fact that a misplaced tab or indent can throw a compile error is really getting on my nerves. Is there some type of setting to turn this off?
I'm currently using NotePad++. Is there maybe an IDE that would take care of the tabs and indenting?
| stackexchange/codereview |
I've moved from TFS to SVN (TortoiseSVN) with my current company. I really miss the "Shelve" feature of TFS. I've read various articles on how to "Shelve" with SVN, but I've read nothing that gives a very simple experience to "shelve" work.
Ideally, I'd like extra items added to the TortoiseSVN context menu - "Shelve" ... | stackexchange/codereview |
By looking at our DB's error log, we found that there was a constant stream of almost successful SQL injection attacks. Some quick coding avoided that, but how could I have setup a monitor for both the DB and Web server (including POST requests) to check for this? By this I mean if there are off the shelf tools for sc... | stackexchange/codereview |
I've had this long term issue in not quite understanding how to implement a decent Lucene sort or ranking. Say I have a list of cities and their populations. If someone searches "new" or "london" I want the list of prefix matches ordered by population, and I have that working with a prefix search and an sort by field ... | stackexchange/codereview |
I'm tired of opening Dia and creating a database diagram at the beginning of every project. Is there a tool out there that will let me select specific tables and then create a database diagram for me based on a MySQL database? Preferably it would allow me to edit the diagram afterward since none of the foreign keys are... | stackexchange/codereview |
I have an Access database in which I drop the table and then create the table afresh. However, I need to be able to test for the table in case the table gets dropped but not created (i.e. when someone stops the DTS package just after it starts -roll-eyes- ). If I were doing this in the SQL database I would just do:
I... | stackexchange/codereview |
What strategies have you used with Model Based Testing?
Do you use it exclusively for
integration testing, or branch it
out to other areas
(unit/functional/system/spec verification)?
Do you build focused "sealed" models or do you evolve complex onibus models over time?
When in the product cycle do you invest in crea... | stackexchange/codereview |
Here we go again, the old argument still arises...
Would we better have a business key as a primary key, or would we rather have a surrogate id (i.e. an SQL Server identity) with a unique constraint on the business key field?
Please, provide examples or proof to support your theory.
| stackexchange/codereview |
When a previous Vim session crashed, you are greeted with the "Swap file ... already exists!" for each and every file that was open in the previous session.
Can you make this Vim recovery prompt smarter? (Without switching off recovery!) Specifically, I'm thinking of:
If the swapped version does not contain unsaved ch... | stackexchange/codereview |
Hey everyone, I'm using Virtual PC and working with a virtual hard disk (*.vhd) that is only sized at 8.2 GB. I would like to double the size to something like 16-20GB. I see options for compacting the VHD but nothing to expand it. It's set to "dynamically expand" but I'm installing some software and it doesn't seem to... | stackexchange/codereview |
After reading this question, I was reminded of when I was taught Java and told never to call finalize() or run the garbage collector because "it's a big black box that you never need to worry about". Can someone boil the reasoning for this down to a few sentences? I'm sure I could read a technical report from Sun on th... | stackexchange/codereview |
Does anyone have links to documentation or guides on making the decision between REST vs. SOAP? I understand both of these but am looking for some references on the key decision points, eg, security, which may make you lean towards one or the other.
| stackexchange/codereview |
Is it possible to get a breakdown of CPU utilization by database?
I'm ideally looking for a Task Manager type interface for SQL server, but instead of looking at the CPU utilization of each PID (like taskmgr) or each SPID (like spwho2k5), I want to view the total CPU utilization of each database. Assume a single SQL in... | stackexchange/codereview |
I'm trying to parse an INI file using C++. Any tips on what is the best way to achieve this? Should I use the Windows API tools for INI file processing (with which I am totally unfamiliar), an open-source solution or attempt to parse it manually?
| stackexchange/codereview |
Test Driven Development has been the rage in the .NET community for the last few years. Recently, I have heard grumblings in the ALT.NET community about BDD. What is it? What makes it different from TDD?
| stackexchange/codereview |
I have a web reference for our report server embedded in our application. The server that the reports live on could change though, and I'd like to be able to change it "on the fly" if necessary.
I know I've done this before, but can't seem to remember how. Thanks for your help.
I've manually driven around this for the ... | stackexchange/codereview |
I am prototyping some C# 3 collection filters and came across this.
I have a collection of products:
public class MyProduct
{
public string Name { get; set; }
public Double Price { get; set; }
public string Description { get; set; }
}
var MyProducts = new List<MyProduct>
{
new MyProduct
... | stackexchange/codereview |
I have 2 SQLite databases, one downloaded from a server (server.db), and one used as storage on the client (client.db). I need to perform various sync queries on the client database, using data from the server database.
For example, I want to delete all rows in the client.db tRole table, and repopulate with all rows in... | stackexchange/codereview |
I honestly have only started recently researching this so my knowledge is limited. I was approached about adapting some Pocket PC software to operate on the Windows 6 platform. After considering how I would go about doing that in the Compact Framework I received more details.
It seems there is a desire to utilize (re-u... | stackexchange/codereview |
I am developing a mid-size application with VB2008. To better test my application I am following a MVP/Supervising Controller approach.
My question is: What are your recommendations to separate responsibilites? So far I've come up with a winform with an instance of a controller and with an instance of my class. The con... | stackexchange/codereview |
I'm trying to find the best design for the following scenario - an application to store results of dance competitions.
An event contains multiple rounds, each round contains a number of performances (one per dance). Each performance is judged by many judges, who return a scoresheet.
There are two types of rounds, a fi... | stackexchange/codereview |
I get the following error pretty regularly when compiling in Visual Studio and running my web application:
"Unable to start debugging on the web server. The web server did not respond in a timely manner. This may be because another debugger is already attached to the web server."
Normally this is after having debug th... | stackexchange/codereview |
My product has several components: ASP.NET, Windows Forms App and Windows Service. 95% or so of the code is written in VB.NET.
For Intellectual Property reasons, I need to obfuscate the code, and until now I have been using a version of dotfuscator which is now over 5 years old. I'm thinking it is time to move to a new... | stackexchange/codereview |
How can I find out which node in a tree list the context menu has been activated? For instance right-clicking a node and selecting an option from the menu.
I can't use the TreeViews' SelectedNode property because the node is only been right-clicked and not selected.
| stackexchange/codereview |
How do you disable autocomplete in the major browsers for a specific input (or form field)?
| stackexchange/codereview |
I am trying to block Google Reader:
reader.google.com
www.google.com/reader
The hard part is blocking the reader directory
I blocked reader.google.com by changing my /etc/hosts file (this is for a Mac)
Is there any way to block www.google.com/reader without buying software?
Note this is for Safari so Greasemonkey won'... | stackexchange/codereview |
What are good libraries for C with datastructures like vectors, deques, stacks, hashmaps, treemaps, sets, etc.? Plain C, please, and platform-independent.
| stackexchange/codereview |
I would like to add a DataGridViewTextBoxCell cell to a DataGridViewCell control, but as well as being able to type in the text cell as normal it must also contain a '...' button that once clicks brings up the OpenFileDialog window to allow the user to select a file. Once selected, the text cell will be populated with ... | stackexchange/codereview |
I want to use the mouse scrollwheel in my OpenGL GLUT program to zoom in and out of a scene? How do I do that?
| stackexchange/codereview |
With the Visual Studio 2005 C++ compiler, I get the following warning when my code uses the fopen() and such calls:
1>foo.cpp(5) : warning C4996: 'fopen' was declared deprecated
1> c:\program files\microsoft visual studio 8\vc\include\stdio.h(234) : see declaration of 'fopen'
1> Message: 'This function or... | stackexchange/codereview |
I'm aware of FusionCharts, are there other good solutions, or APIs, for creating charts in Adobe Flash?
| stackexchange/codereview |
What is the Reuse/Release Equivalence Principle and why is it important?
| stackexchange/codereview |
What does it mean when you get or create a date in UTC format in JavaScript?
| stackexchange/codereview |
I'm just about to make my first trip into the world of JNI (Java Native Interface) to provide file system change notifications from platform specific C/C++ code to Java. That is unless someone suggest some brilliant library for doing this that I've missed.
Being new to JNI I've managed to find much documentation on the... | stackexchange/codereview |
A quick glance at the present-day internet would seem to indicate that Adobe Flash is the obvious choice for embedding video in a web page. Is this accurate, or are they other effective choices? Does the choice of ASP.NET as a platform influence this decision?
| stackexchange/codereview |
Should be available to non-U.S. companies, easy to setup, reliable, cheap, customizable, etc. What are your experiences?
| stackexchange/codereview |
I got a webserver with a running application. There's a webpage with a form: some text data and a file upload field. Now, what I would like to have is it working like this:
The file is sent to the dedicated server, diffrent then the one application is running on. The server should return some kind of path (or anything ... | stackexchange/codereview |
I see many user interface control libraries for .NET, but where can I get similar stuff for win32 using simply C/C++?
Things like prettier buttons, dials, listviews, graphs, etc.
Seems every Win32 programmers' right of passage is to end up writing his own collection. :/
No MFC controls please. I only do pure C/C++. ... | stackexchange/codereview |
While working in a Java app, I recently needed to assemble a comma-delimited list of values to pass to another web service without knowing how many elements there would be in advance. The best I could come up with off the top of my head was something like this:
public String appendWithDelimiter( String original, String... | stackexchange/codereview |
Any good recommendations for a platform agnostic (i.e. Javascript) grid control/plugin that will accept pasted Excel data and can emit Excel-compliant clipboard data during a Copy?
I believe Excel data is formatted as CSV during "normal" clipboard operations.
dhtmlxGrid looks promising, but the online demo's don't act... | stackexchange/codereview |
So basically I'm building an app for my company and it NEEDS to be built using MS Access and it needs to be built on SQL Server.
I've drawn up most of the plans but am having a hard time figuring out a way to handle the auditing system.
Since it is being used internally only and you won't even be able to touch the db f... | stackexchange/codereview |
I am trying to upload a file or stream of data to our web server and I cant find a decent way of doing this. I have tried both WebClient and WebRequest both have their problems.
WebClient
Nice and easy but you do not get any notification that the asynchronous upload has completed, and the UploadProgressChanged event ... | stackexchange/codereview |
It's not just a capture I'm looking to do here. I want to first capture the packet, then in real time, check the payload for specific data, remove it, inject a signature and reinject the packet into the stack to be sent on as before.
I had a read of the ipfw divert sockets using IPFW and it looks very promising. What a... | stackexchange/codereview |
Say I have an application that wants a persistent connection to a server. How do I implement connection/re-connection logic so that I'm not wasting resources (power/bandwidth) and I have fast reconnect time when connectivity appears/improves? If I only use connectivity notifications, I can get stuck on problems not rel... | stackexchange/codereview |
I want to create my Rails application with MySQL, because I like it so much. How can I do that in the latest version of Rails instead of the default SQLite?
| stackexchange/codereview |
I need to create a backup of a SQL Server 2005 Database that's only the structure...no records, just the schema. Is there any way to do this?
EDIT: I'm trying to create a backup file to use with old processes, so a script wouldn't work for my purposes, sorry
| stackexchange/codereview |
I've had an app doing prefix searches for a while. Recently the index size was increased and it turned out that some prefixes were too darned numerous for lucene to handle. It kept throwing me a Too Many Clauses error, which was very frustrating as I kept looking at my JARs and confirming that none of the included cod... | stackexchange/codereview |
As a programmer I need a place to store my stuff. I've been running a server in my parents closet for a long time, but I recently came across a decent 2U server.
I have no experience dealing with hosting companies, beyond the very cheap stuff, and I'm wondering what I should look for in a colo or if I should just keep ... | stackexchange/codereview |
I need to try to lock on an object, and if its already locked just continue (after time out, or without it).
The C# lock statement is blocking.
| stackexchange/codereview |
I once had the task of determining the following performance parameters from inside a running application:
Total virtual memory available
Virtual memory currently used
Virtual memory currently used by my process
Total RAM available
RAM currently used
RAM currently used by my process
% CPU currently used
% CPU currentl... | stackexchange/codereview |
In Flex, I have an xml document such as the following:
var xml:XML = <root><node>value1</node><node>value2</node><node>value3</node></root>
At runtime, I want to create a TextInput control for each node under root, and have the values bound to the values in the XML. As far as I can tell I can't use BindingUtils to bin... | stackexchange/codereview |
Curious if others feel the same as me. To me, controls such as datagrid/gridview/formview/etc. are great for presentations or demo's only. To take the time and tweak this controls, override their default behavior (hooking into their silly events etc.) is a big headache. The only control that I use is the repeater, si... | stackexchange/codereview |
I'm trying to implement something like this:
<div>
<table>
<thead>
<tr>
<td>Port name</td>
<td>Current port version</td>
<td>New port version</td>
<td>Update</td>
</tr>
</thead>
<% foreach (var ip in Port... | stackexchange/codereview |
Does any know a good rule of thumb for the appropriate pagefile size for a Windows 2003 server running SQL Server?
| stackexchange/codereview |
How do I write the results from a mysql query to file? I just need something quick. Output can be CSV, XML, HTML, etc.
| stackexchange/codereview |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.