instruction_seed stringlengths 1 35.8k | _source stringclasses 1
value |
|---|---|
I am a C# developer. Still learning. I had not learn all the features of C# 2.0 and now the new version of c# is being released. how do we cope up with this.what is the best option to cope up with the latest programming skills.
| stackexchange/codereview |
Can someone give me some working examples of how you can create, add messages, read from, and destroy a private message queue from C++ APIs? I tried the MSDN pieces of code but i can't make them work properly.
Thanks
| stackexchange/codereview |
I'm running into an unusual problem in my unit tests. The class I'm testing creates a dependency property dynamically at runtime and the type of that dependency property can vary depending on the circumstances. While writing my unit tests, I need to create the dependency property with different types and that leads to ... | stackexchange/codereview |
I can't use the Get*Profile functions because I'm using an older version of the Windows CE platform SDK which doesn't have those. It doesn't have to be too general.
[section]
name = some string
I just need to open the file, check for the existence of "section", and the value associated with "name". Standard C++ is pre... | stackexchange/codereview |
We have a rather large SVN repository. Doing SVN updates are taking longer and longer the more we add code. We added svn:externals to folders that were repeated in some projects like the FCKeditor on various websites. This helped, but not that much.
What is the best way to reduce update time and boost SVN speed?
| stackexchange/codereview |
Without calculating them, I mean?
| stackexchange/codereview |
We have been looking at g++ versions 3.2.3 and 4.2.4. With 4.2.4, the performance improvements on some of our code base is significant.
I've tried searching the gcc buzilla database to find hints as to what bugs may have had such a dramatic improvement but I didn't find any individual bug that stood out as being a can... | stackexchange/codereview |
I have a file. I want to get its contents into a blob column in my oracle database or into a blob variable in my PL/SQL program. What is the best way to do that?
| stackexchange/codereview |
Django comes with CSRF protection middleware, which generates a unique per-session token for use in forms. It scans all incoming POST requests for the correct token, and rejects the request if the token is missing or invalid.
I'd like to use AJAX for some POST requests, but said requests don't have the CSRF token avail... | stackexchange/codereview |
In general I think I can convey most programming related concepts quite well.
Yet, I still find it hard to summarise the relationship between Fields, Classes and Packages.
How do You summarise "Fields", "Classes" and "Packages" and "Their Relationship" ?
| stackexchange/codereview |
I frequently start with a simple console application to try out an idea, then create a new GUI based project and copy the code in. Is there a better way? Can I convert my existing console application easily?
| stackexchange/codereview |
I am writing a query in SQL server2005. This is returning me a duplicate rows in the result. Can i eliminate this duplication with a particular column as the key?
| stackexchange/codereview |
Background:
I have a VB6 application I've "inherited" that generates a PDF for the user to review using unsupported Acrobat Reader OCX integration. The program generates an FDF file with the data, then renders the merged result when the FDF is merged with a PDF. It only works correctly with Acrobat Reader 4 :-(. Ins... | stackexchange/codereview |
I'm currently working on a web business application that has many entities (people,organizations) with lots of contact information ie. multiple postal addresses, email addresses, phone numbers etc.
At the moment the database schema is such that persons table has postal address columns, phone number columns as does org... | stackexchange/codereview |
I am writing an application that thus far has been written in PHP, from the interface to the daemons. I have a need to use fuse and would like to continue to use PHP just for consistency. However, there doesn't seem to be bindings for PHP. Python, Java etc have bindings, and I can code in those languages I just dont wa... | stackexchange/codereview |
I have an XML document with un-namespaced elements, and I want to use XSLT to add namespaces to them. Most elements will be in namespace A; a few will be in namespace B. How do I do this?
| stackexchange/codereview |
With what GUI framework is the Mono .NET Windows.Forms implemented?
Example: KDE, Gnome, X11 itself?
| stackexchange/codereview |
This is a follow-up to the question:
Should the folders in a solution match the namespace?
The consensus on that question was a qualified "yes": that is, folders == namespaces, generally, but not slavishly (the way java requires).
Indeed, that's how I set up projects.
But setting up source control has made me hesitate... | stackexchange/codereview |
I have been given the task of implementing a login handler. The only detail the handler captures is username and password. Initially I was going to use a JSP that posted to a servlet. Where the servlet carried out a db lookup and also validated the user credentials. Upon successful login you are redirected but unsu... | stackexchange/codereview |
Using The loader class of Adobe Flex, I load an external SWF file. However, the loaded SWF file has a different frameRate than my application.
Is it possible to have both the parent app and the loaded child app playing at different framerates? If so, how?
| stackexchange/codereview |
I need to convert SAS data tables into flat files (or "ASCII files" as they were called once, as opposed to binary files). And only one flat file for each original SAS table.
The challenging thing is that I want the flat file to contain some structural information of the original SAS table also, specifically:
Variable... | stackexchange/codereview |
I'm trying to create a UDF in SQL Server 2005 Express as below:
CREATE FUNCTION [CombineValues] ()
RETURNS VARCHAR(8000)
AS
BEGIN
DECLARE @CuisineList VARCHAR(8000);
RETURN
(
SELECT @CuisineList = COALESCE(@CuisineList + ', ', '') +
CAST(Cuisine AS varchar(20))
FROM Cuisines
)
END
Cuisines ... | stackexchange/codereview |
I heard on a recent podcast (Polymorphic) that it is possible to cache a user control as opposed to the entire page.
I think my header control which displays static content and my footer control could benefit from being cached.
How can I go about caching just those controls?
| stackexchange/codereview |
Let's say I have the following class:
public class Test<E> {
public boolean sameClassAs(Object o) {
// TODO help!
}
}
How would I check that o is the same class as E?
Test<String> test = new Test<String>();
test.sameClassAs("a string"); // returns true;
test.sameClassAs(4); // returns false;
I can't c... | stackexchange/codereview |
If you are sending work/progress reports to the project lead on a daily or weekly basis, I wondered if you would consider using Twitter or similar services for these updates.
Say if you're working remotely or with a distributed team and the project lead has a hard time getting an overview about the topics people are wo... | stackexchange/codereview |
getEmployeeNameByBatchId(int batchID)
getEmployeeNameBySSN(Object SSN)
getEmployeeNameByEmailId(String emailID)
getEmployeeNameBySalaryAccount(SalaryAccount salaryAccount)
or
getEmployeeName(int typeOfIdentifier, byte[] identifier) -> In this methods the typeOfIdentifier tells if identifier is batchID/SSN/emailID/salar... | stackexchange/codereview |
My problem is that I want to have a server application (on a remote computer) to publish certain events to several client computers. The server and client communicate using .Net-Remoting so currently I am using remoted .Net-Events to get the functionality. But there is one drawback: when the server (the event publisher... | stackexchange/codereview |
I am looking for a good way to consistently test my web applications from the end users point of view. I have all kinds of ways to check to make sure my code is working behind the scenes. I can't count the number of times that I make a change to a piece of code, test it and it works fine and then deploy it only to have... | stackexchange/codereview |
I have heard the 'shard' technique mentioned several times with regard to solving scaling problems for large websites. What is this 'shard' technique and why is it so good?
| stackexchange/codereview |
I've not used C++ very much in the past, and have recently been doing a lot of C#, and I'm really struggling to get back into the basics of C++ again. This is particularly tricky as work mandates that none of the most handy C++ constructs can be used, so all strings must be char *'s, and there is no provision for STL l... | stackexchange/codereview |
I want to create variables inside a function from a dictionary.
Let's say I have a dictionary, bar:
bar = {
'a': 1,
'b': 2,
'c': 3
}
That goes to:
def foo():
a = 1
b = 2
c = 3
I want to make new variables with the variable names as bar's keys (a, b, c), then set the values of the variables ... | stackexchange/codereview |
After the last project I've done using WebForms, I've decided to pass on using that framework in the future. It's great for getting your basic features out there...not so great when you have more complex UI logic.
I'm looking at ASP.NET MVC, and like what I see so far. Of course the issue is that you lose the server si... | stackexchange/codereview |
I'm starting a new project which involves developing an interface for a machine that measures wedge and roundness of lenses and stores the information in a database and reports on it. There's a decent chance we're going to be putting a touch screen on this machine so that it doesn't need to have a mouse or keyboard... ... | stackexchange/codereview |
Are there any commonly used patterns in Javascript for storing the URL's of endpoints that will be requested in an AJAX application?
For example would you create a "Service" class to abstract the URL's away?
| stackexchange/codereview |
I need to execute a batch file as part of the un-install process in a Windows installer project (standard OOTB VS 2008 installer project-vdproj). One cannot execute a bat file directly from the Custom Actions in the installer project, so I wrote a quick vbs script to call the required bat file.
vbs code:
Set WshShell... | stackexchange/codereview |
I am accessing custom UIComponent via SWC file from Flex 3.
This component works OK in Flash CS3, but using it from Flex gives A weird error in draw().
I have added swc component inside Sprite (with addchild) and its in LIB path.
TypeError: Error #1010: A term is undefined and has no properties.
at com.xxxx.highscore... | stackexchange/codereview |
I am currently working on a project that has been in production for over two years. The project makes extensive use of unit testing and scripted UI tests. Initialy unit tests covered the system framework, business rules and state transitions (or workflow). Test scripts are used for black box testing. However, over time... | stackexchange/codereview |
has anyone been able to serve a word doc using metro (webservices) as a mtom stream? Does anyone have example, or know where there is example code please for client and server?
| stackexchange/codereview |
I have just read this question and I really loved this answer to the question. Naturally, an interesting question popped in my head...
How to add my own events (of my own applications) in the Control Panel -> Sounds and Audio Devices -> Sounds -> Program Events?
And another related question, that I suppose should be an... | stackexchange/codereview |
I have been forced to work in Visual Studio 2005 and would like to export my fonts and colors from Visual Studio 2008. However, VS2005 complains about wrong export document version. Is there any good way to do this besides manually changing each color and font?
| stackexchange/codereview |
When using an IoC container, is it considered good design to inject other classes into them? i.e. a persistence class
| stackexchange/codereview |
When i compile the application in my laptop it runs fine but when i run the same application in the server something is wrong with the date format. But when i checked the system date time format wit my laptop and server it the same format. Can anyone tell me what is wrong.
| stackexchange/codereview |
Normally you can do this:
<select size="3">
<option>blah</option>
<option>blah</option>
<option>blah</option>
</select>
And it would render as a selectionbox where all three options are visible (without dropping down)
I'm looking for a way to set this size attribute from css.
| stackexchange/codereview |
Does anyone know any implementation of a templated cache of objects?
You use a key to find object (the same as in std::map<>)
You specify a maximum number of objects that can be in the cache at the same time
There are facilities to create an object not found in the cache
There are facilities to know when an object is ... | stackexchange/codereview |
I have this bit of javascript written with jQuery 1.2.5. It's contained inside the main function() of a plugin that I wrote. The plugin is a horizontal gallery scroller very similar to jCarousel. It does alot of auto calculating of widths and determines how many to scroll based on that and the size of the images, wh... | stackexchange/codereview |
I want to bind my UI against a collection of XElements and their properties on a webpage. Hypothetically, this could be for any object that represents an XML tree. I'm hoping that there might be a better way of doing this.
Should I use an XPath query to get out the elements of the collection and the attribute values ... | stackexchange/codereview |
In MS SQL 2000 and 2005, given a datetime such as '2008-09-25 12:34:56' what is the most efficient way to get a datetime containing only '2008-09-25'?
Duplicated here.
| stackexchange/codereview |
I'm working an a very large scale projects, where the compilation time is very long. What tools can I use (preferably open source) on Linux, to find the most heavily included files and that optimize their useages?
Just to be clearer, I need a tool which will, given the dependencies, show me which headers are the most i... | stackexchange/codereview |
What is the best open source java workflow framework (e.g. OSWorkflow, jBPM, XFlow etc.)?
| stackexchange/codereview |
What's the best library to use to generate RSS for a webserver written in Common Lisp?
| stackexchange/codereview |
Would anyone recommend a particular JavaScript charting library - specifically one that doesn't use flash at all?
| stackexchange/codereview |
I'm trying to run Selenium RC against my ASP.NET code running on a Cassini webserver.
The web application works when i browse it directly but when running through Selenium I get
HTTP ERROR: 403
Forbidden for Proxy
Running Selenium i interactive mode I start a new session with:
cmd=getNewBrowserSession&1=*iexplore&2... | stackexchange/codereview |
Is there a simple method of parsing XML files in C#? If so, what?
| stackexchange/codereview |
Note: not ASP.NET.
I've read about various methods including using SOAPClient (is this part of the standard Windows 2003 install?), ServerXMLHTTP, and building up the XML from scratch and parsing the result manually.
Has anyone ever done this? What did you use and would you recommend it?
| stackexchange/codereview |
I am looking into internationalizing a Flex application I am working on and I am curious if there are any best practices or recommendations for doing so.
Googling for such information results in a handful of small articles and blog posts, each about doing it differently, and the advantages and disadvantages are not exa... | stackexchange/codereview |
I have an Eclipse RCP app I'm working on. It has some view-specific menus and one of the menu items is an item which I would like to display a tick next to when the corresponding functionality is enabled. Similarly, the next time the item is selected, the item should become unticked to reflect that the corresponding fu... | stackexchange/codereview |
I need to create and add custom headers to an ASP.NET 2.0 application.
The case is simulation of an SSO-login in our dev/test environment.
When I try to add headers I run into the "Not supported on this platform."
error. BigJim has a nice post on the subject here:
http://bigjimindc.blogspot.com/2007/07/ms-kb928365-as... | stackexchange/codereview |
I have a rather weak understanding of any of oracle's more advanced functionality but this should I think be possible.
Say I have a table with the following schema:
MyTable
Id INTEGER,
Col1 VARCHAR2(100),
Col2 VARCHAR2(100)
I would like to write an sproc with the following
PROCEDURE InsertOrUpdateMyTable(p_id i... | stackexchange/codereview |
I'm looking for a method to assign variables with patterns in regular expressions with C++ .NET
something like
String^ speed;
String^ size;
"command SPEED=[speed] SIZE=[size]"
Right now I'm using IndexOf() and Substring() but it is quite ugly
| stackexchange/codereview |
I'd like to line up items approximately like this:
item1 item2 i3 longitemname
i4 longitemname2 anotheritem i5
Basically items of varying length arranged in a table like structure. The tricky part is the container for these can vary in size and I'd like to fit as many as I can in ea... | stackexchange/codereview |
A few years ago we started playing around with XForms from the W3C for a web app which required hundreds of custom forms.
As they aren't currently supported natively by the major browsers, what parsers/tools are you using on your projects today?
I'm not really interested in plugins - this needs to be something server s... | stackexchange/codereview |
I had an idea I was mulling over with some colleagues. None of us knew whether or not it exists currently.
The Basic Premise is to have a system that has 100% uptime but can become more efficient dynamically.
Here is the scenario: * So we hash out a system quickly to a
specified set of interfaces, it has
zero op... | stackexchange/codereview |
With Hibernate, can you create a composite ID where one of the columns you are mapping to the ID can have null values?
This is to deal with a legacy table that has a unique key which can have null values but no primary key.
I realise that I could just add a new primary key column to the table, but I'm wondering if ther... | stackexchange/codereview |
What is equivalent to the root\CIMV2\Applications\MicrosoftIE namespace on Vista/Server 2008?
The root\cimv2\Applications\MicrosoftIE namespace dates back to at least Internet Explorer 5.00.2920.0000, which happens to be the version of Internet Explorer that shipped with Windows 2000, but it looks like it is removed fr... | stackexchange/codereview |
I'm trying to setup a stress/load test using the WCAT toolkit included in the IIS Resources.
Using LogParser, I've processed a UBR file with configuration. It looks something like this:
[Configuration]
NumClientMachines: 1 # number of distinct client machines to use
NumClientThreads: 100 # number of... | stackexchange/codereview |
Is there a javascript function I can use to detect whether a specific silverlight version is installed in the current browser?
I'm particularly interested in the Silverlight 2 Beta 2 version. I don't want to use the default method of having an image behind the silverlight control which is just shown if the Silverlight ... | stackexchange/codereview |
Does anyone know of any software or a good way for developers to build up a knowledge base of business rules that are built in to the software for help desk to use?
We already have a helpdesk software but we are not looking to replace this.
| stackexchange/codereview |
I am trying to write some JavaScript RegEx to replace user inputed tags with real html tags, so [b] will become <b> and so forth. the RegEx I am using looks like so
var exptags = /\[(b|u|i|s|center|code){1}]((.){1,}?)\[\/(\1){1}]/ig;
with the following JavaScript
s.replace(exptags,"<$1>$2</$1>");
this works fine for ... | stackexchange/codereview |
How do I open multiple pages in Internet Explorer 7 with a single DOS command? Is a batch file the only way to do this?
Thanks!
| stackexchange/codereview |
I am using virtual machines for development,but each time I need a new VM, I copy the file and create a new server, but I need a new name for the server to add it to our network.
After renaming the server, the Sharepoint sites have many errors and do not run.
| stackexchange/codereview |
How does googlebot treat iframes? Does it follow the src attribute like a link? Is the iframe content analyzed as if it was part of the page where it is included?
| stackexchange/codereview |
This is more a thought experiment than anything.
I'm wondering what it would take to detect everything I legally can about the laptops in a hotspot. My first thought was to grab every MAC address I can and extract the maker from the first 24bit.
The question is would this be illegal and what else could I legally scaven... | stackexchange/codereview |
I've download the SDK to try to copy the image to my PC from the server but no cmdlet for copy just get info moving etc
any help?
| stackexchange/codereview |
Is it possible to dynamically create and modify images on a per pixel level in JavaScript (on client side)? Or has this to be done with server based languaged, such as PHP?
My use case is as follows:
The user opens webpage and loads locally stored image
A preview of the image is displayed
The user can modify the imag... | stackexchange/codereview |
I want to add a property to my User model that returns the number of rows in the Project table that have a user Id of the user.
So something like this...
def numProjects = {
/* somehow get count from Project table
The straight sql would be:
SELECT COUNT(*) FROM projects WHERE userId = <the current us... | stackexchange/codereview |
While using Struts2, I am using several annotations to do my validations inside the Model class, in the set() methods, like:
@RequiredStringValidator(message = "Name is required")
@StringLengthFieldValidator(message = "Name must be between 5 and 60 characters",
minLength = "5", maxLength ... | stackexchange/codereview |
As you can see, even after the program should have died it speaks from the grave. Is there a way to "deregister" the exitfunction in case of exceptions?
import atexit
def helloworld():
print("Hello World!")
atexit.register(helloworld)
raise Exception("Good bye cruel world!")
outputs
Traceback (most recent call ... | stackexchange/codereview |
We have a series of closed source applications and libraries, for which we think it would make sense opening up the source code.
What has been blocking us, so far, is the effort needed to clean up the code base and documenting the source before opening up.
We want to open up the source only if we have a reasonable chan... | stackexchange/codereview |
Deep down in WinDef.h there's this relic from the segmented memory era:
#define far
#define near
This obviously causes problems if you attempt to use near or far as variable names. Any clean workarounds? Other then renaming my variables?
| stackexchange/codereview |
Imagine that you have a simple site with only 2 pages: login.aspx and secret.aspx. Your site is secured using nothing but ASP.net forms authentication and an ASP.net Login server control on login.aspx. The details are as follows:
The site is configured to use the SqlMembershipProvider
The site denies all anonymous u... | stackexchange/codereview |
I am trying to configure the IPermission node as part of medium trust. However I am unable to find the valid values list for the PathDiscovery attribute on the node
<IPermission class="FileIOPermission" version="1" Read="$AppDir$" Write="$AppDir$" Append="$AppDir$" PathDiscovery="$AppDir$"/>
I need to set the permissi... | stackexchange/codereview |
I need to increment a number in a source file from an Ant build script. I can use the ReplaceRegExp task to find the number I want to increment, but how do I then increment that number within the replace attribute?
Heres what I've got so far:
<replaceregexp file="${basedir}/src/path/to/MyFile.java"
match="MY_PROPER... | stackexchange/codereview |
I have recently changed an application from storing the database username and password in a configuration file (gasp password stored in plain text in a config file).
The application now asks the user to type in her username and password before it can continue.
The new version of the application now has to interrogate t... | stackexchange/codereview |
I want to make a .NET Form as a TopMost Form for another external App (not .NET related, pure Win32) so it stays above that Win32App, but not the rest of the apps running.
I Have the handle of the Win32App (provided by the Win32App itself), and I've tried Win32 SetParent() function, via P/Invoke in C#, but then my .NET... | stackexchange/codereview |
I am looking for a text editor that will be able to load a 4+ Gigabyte file into it. Textpad doesn't work. I own a copy of it and have been to its support site, it just doesn't do it. Maybe I need new hardware, but that's a different question. The editor needs to be free OR, if its going to cost me, then no more t... | stackexchange/codereview |
I have a query form that I would like to submit as a GET request so the result page may be bookmarked and otherwise RESTful. It's your classical text field with a submit button. How do I induce Seam/JSF to use GET and include the query expression as a parameter rather than POST, the default?
| stackexchange/codereview |
I haven't used Visual Studio since VB 3 and am trying to give it a shot with ASP.NET. It seems that it should be able to connect to a website (via some sort of ftp like protocol I figure) and allow to edit without having to manually upload/download the files. Is this the way it is supposed to work or am I mis-understan... | stackexchange/codereview |
I was asked to do a code review and report on the feasibility of adding a new feature to one of our new products, one that I haven't personally worked on until now. I know it's easy to nitpick someone else's code, but I'd say it's in bad shape (while trying to be as objective as possible). Some highlights from my code ... | stackexchange/codereview |
What is the best way to get started with programming things outside of your computer?
I don't mean mainstream things like cell phones with APIs.
Please assume working knowledge of C/C++
| stackexchange/codereview |
Is it possible to install/register another local server instance in any SqlServer version, besides the default local instance, where only one SqlServer version is installed?
| stackexchange/codereview |
The prompt says that if I install the software into a directory with spaces:
the rebuild build tool used by the D Shared Source System will fail to build
and that I will be
forced to reinstall in a different location
However, I don't like random things in my C:\ drive. D, IMO, belongs in Program Files with PHP and ... | stackexchange/codereview |
I recently bought a Windows Mobile device and since I'm a developer I want to use it as a development platform. Yes, it's not supposed to be used like that but it's always with me and my laptop isn't. I know cke is a good editor for code but how can I run JavaScript/Ruby code without too much of a headache?
I probably ... | stackexchange/codereview |
What actually happens to the file system when you do a Subclipse Share Project on an Eclipse project that was externally checked out from Subversion? All the .svn folders are already in place. I get an error when I try to Share Project the right way, and I'd rather not delete and re-checkout the projects from the SVN... | stackexchange/codereview |
I know the standard answer is No. However hear out the reasons for wanting it, and then we'll go for whether it is possible to achieve the same effect as ReadyBoost via either enabling (and installing) ReadyBoost or using third party software.
Reasons for using Widows Server 2008 as a development environment on a lapto... | stackexchange/codereview |
I'm looking for an efficient way (using PHP with a Mysql Database) to suggest alternative spelling for a query.
I know I can use services such as Yahoo's Spelling Suggestion but I want the suggestions to be based on what is currently available in the database.
For example: The user has to fill a form with a "City" fie... | stackexchange/codereview |
In the KornShell (ksh) on AIX UNIX Version 5.3 with the editor mode set to vi using:
set -o vi
What are the key-strokes at the shell command line to autocomplete a file or directory name?
| stackexchange/codereview |
Some 4 years back, I followed this MSDN article for DateTime usage best practices for building a .Net client on .Net 1.1 and ASMX web services (with SQL 2000 server as the backend). I still remember the serialization issues I had with DateTime and the testing effort it took for servers in different time zones.
My quest... | stackexchange/codereview |
What's the easiest way to get the filename associated with an open HANDLE in Win32?
| stackexchange/codereview |
I'm trying to run PHP from the command line under Windows XP.
That works, except for the fact that I am not able to provide parameters to my PHP script.
My test case:
echo "param = " . $param . "\n";
var_dump($argv);
I want to call this as:
php.exe -f test.php -- param=test
But I never get the script to accept my par... | stackexchange/codereview |
I want to write a real-time analysis tool for wireless traffic.
Does anyone know how to read from a promiscuous (or sniffing) device in C?
I know that you need to have root access to do it. I was wondering if anyone knows what functions are necessary to do this. Normal sockets don't seem to make sense here.
| stackexchange/codereview |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.