text stringlengths 8 267k | meta dict |
|---|---|
Q: Should Local Variable Initialisation Be Mandatory? The maintenance problems that uninitialised locals cause (particularly pointers) will be obvious to anyone who has done a bit of c/c++ maintenance or enhancement, but I still see them and occasionally hear performance implications given as their justification.
It's ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/139686",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "11"
} |
Q: Does the latest release May 2008 of .NET enterprise library have the updater app block? Does the latest version of the enterprise library (http://msdn.microsoft.com/en-us/library/cc512464.aspx) come with the updater application block?
A: Looks like it doesn't:
http://msdn.microsoft.com/en-us/library/cc511823.aspx
I... | {
"language": "en",
"url": "https://stackoverflow.com/questions/139700",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Indirect Typelib not imported well from Debug dll Using VC2005, I have 3 projects to build:
*
*libA (contains a typelib, results in libA.dll): IDL has a line library libA { ...
*libB (contains a typelib importing libA, results in libB.dll): IDL has a line importlib( "libA " );
*libC (imports libB): one of the... | {
"language": "en",
"url": "https://stackoverflow.com/questions/139705",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: PHP parse_ini_file() - where does it look? if I call php's parse_ini_file("foo.ini"), in what paths does it look for foo.ini ?
the include path? the function's documentation doesn't mention it.
A: The filename argument for parse_ini_file is a standard php filename, so the same rules will apply as opening a file us... | {
"language": "en",
"url": "https://stackoverflow.com/questions/139721",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Which Javascript Framework is the simplest and most powerful? I've been using various javascript frameworks including mootools, jquery, prototype and scriptaculous and have found them all good, but difficult to extend to more complex ideas.
If I am going to knuckle down and learn one, which is the simplest to extend... | {
"language": "en",
"url": "https://stackoverflow.com/questions/139723",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Which syntax is better for return value? I've been doing a massive code review and one pattern I notice all over the place is this:
public bool MethodName()
{
bool returnValue = false;
if (expression)
{
// do something
returnValue = MethodCall();
}
else
{
// do somethi... | {
"language": "en",
"url": "https://stackoverflow.com/questions/139739",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: When to use partial mocks? I'm starting to get comfortable with the idea of fakes, stubs, mocks, and dynamic mocks. But I am still a little iffy in my understanding of when to use partial mocks.
It would seem that if you're planning on mocking a service and need to resort to a partial mock then it is a sign of ba... | {
"language": "en",
"url": "https://stackoverflow.com/questions/139752",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: CVS: List all files changed between tags (or dates) Is there any way to list all the files that have changed between two tags in CVS?
Every time we do a release we apply a tag to all the files in that release. I want to find all the files that changed between releases.
It would also work if I could find all files th... | {
"language": "en",
"url": "https://stackoverflow.com/questions/139759",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "57"
} |
Q: Are there alternatives to CGI (and do I really need one)? I am designing an application that is going to consist of 3-4 services that run as separate processes and are linked by a suitable IPC. The system is going to have a web interface and I want to use whatever webserver is there.
The web interface should be acce... | {
"language": "en",
"url": "https://stackoverflow.com/questions/139760",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Can I get the path of the PHP file originally called within an included file? Let's say we have index.php and it is stored in /home/user/public/www and index.php calls the class Foo->bar() from the file inc/app/Foo.class.php.
I'd like the bar function in the Foo class to get a hold of the path /home/user/public/www... | {
"language": "en",
"url": "https://stackoverflow.com/questions/139794",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Sending messages to WCF host process I have a Console application hosting a WCF service. I would like to be able to fire an event from a method in the WCF service and handle the event in the hosting process of the WCF service. Is this possible? How would I do this? Could I derive a custom class from ServiceHost?... | {
"language": "en",
"url": "https://stackoverflow.com/questions/139809",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "17"
} |
Q: Algorithm to score similarness of sets of numbers What is an algorithm to compare multiple sets of numbers against a target set to determine which ones are the most "similar"?
One use of this algorithm would be to compare today's hourly weather forecast against historical weather recordings to find a day that had si... | {
"language": "en",
"url": "https://stackoverflow.com/questions/139811",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Why results of map() and list comprehension are different? The following test fails:
#!/usr/bin/env python
def f(*args):
"""
>>> t = 1, -1
>>> f(*map(lambda i: lambda: i, t))
[1, -1]
>>> f(*(lambda: i for i in t)) # -> [-1, -1]
[1, -1]
>>> f(*[lambda: i for i in t]) # -> [-1, -1]
[1, ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/139819",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "12"
} |
Q: Bare Minimum Configuration for RESTful WCF What is the bare minimum I need to put in web.config to get WCF working with REST? I have annotated my methods with [WebGet], but they are not getting the message.
A: I discovered that you can add the following to the ServiceHost directive in the *.svc file, and it will au... | {
"language": "en",
"url": "https://stackoverflow.com/questions/139821",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: Track Data Execution Prevention (DEP) When running one of our software, a tester was faced with the data execution prevention dialog of Windows.
We try to reproduce this situation on a developer computer for debugging purposes : with no success.
Does anyone know how to find what may cause the DEP protection to kill ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/139826",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: StringReplace alternatives to improve performance I am using StringReplace to replace > and < by the char itself in a generated XML like this:
StringReplace(xml.Text,'>','>',[rfReplaceAll]) ;
StringReplace(xml.Text,'<','<',[rfReplaceAll]) ;
The thing is it takes way tooo long to replace every occurence of... | {
"language": "en",
"url": "https://stackoverflow.com/questions/139833",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "10"
} |
Q: How can I open a window's system menu by code? I have a C# WinForms borderless window, for which I override WndProc and handle the WM_NCHITTEST message. For an area of that form, my hit test function returns HTSYSMENU. Double-clicking that area successfully closes the form, but right-clicking it does not show the wi... | {
"language": "en",
"url": "https://stackoverflow.com/questions/139835",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Is there a practical example of how they have used attributes on method parameters in .NET? I know it's possible, and I've seen simple examples in the documentation, but are they being used in the wild?
I use attributes at the class and method level all the time, but have never used them on method parameters. What ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/139837",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "8"
} |
Q: Cursor verus while loop - what are the advantages/disadvantages of cursors? Is it a good idea to use while loop instead of a cursor?
What are the advantages/disadvantages of cursors?
A: Some of these depends on the DBMS, but generally:
Pros:
*
*Outperform loops when it comes to row-by-row processing
*Works reas... | {
"language": "en",
"url": "https://stackoverflow.com/questions/139843",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "20"
} |
Q: Can Delphi 2009 be installed on the same machine as Delphi 2006 or Delphi 2007? Is there any conflict?
A: I am running 2007 and 2009 on the same machine (this machine) just fine. The only problem you might have is if you are compiling components to the same directory - you will just need to rebuild all your DCU's ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/139844",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "11"
} |
Q: WCF customheader or messagebody for context? I'm witting a WCF service for a customer to send part information to our application. We have multiple customers that will have one or many locations, and part information is scoped to each location for the customer. When the customer calls our service they will need to s... | {
"language": "en",
"url": "https://stackoverflow.com/questions/139852",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Is MEF about UI? If not, why are all examples about GUI composition? The MEF team keep saying it is about plug-in model. So, are we talking about UI plugins? How can we use this stuff in non-UI code?
I downloaded the code and the examples are all about GUI. Am I guessing it wrong?
A: Ilya
MEF is absolutely not onl... | {
"language": "en",
"url": "https://stackoverflow.com/questions/139853",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: Setting the thread /proc/PID/cmdline? On Linux/NPTL, threads are created as some kind of process.
I can see some of my process have a weird cmdline:
cat /proc/5590/cmdline
hald-addon-storage: polling /dev/scd0 (every 2 sec)
Do you have an idea how I could do that for each thread of my process? That would be very h... | {
"language": "en",
"url": "https://stackoverflow.com/questions/139859",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: Is there an open source java enum of ISO 3166-1 country codes Does anyone know of a freely available java 1.5 package that provides a list of ISO 3166-1 country codes as a enum or EnumMap? Specifically I need the "ISO 3166-1-alpha-2 code elements", i.e. the 2 character country code like "us", "uk", "de", etc. Crea... | {
"language": "en",
"url": "https://stackoverflow.com/questions/139867",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "94"
} |
Q: How do I disable referential integrity in Postgres 8.2? Google results on this one are a bit thin, but suggest that it is not easily possible.
My specific problem is that I need to renumber the IDs in two tables that are related to each other such that table B has an "table_a_id" column in it. I can't renumber table... | {
"language": "en",
"url": "https://stackoverflow.com/questions/139884",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "36"
} |
Q: Multiple domains for one site: alias or redirect? I'm setting up a number sites right now and many of them have multiple domains. The question is: do I alias the domain (with ServerAlias) or do I Redirect the request?
Obviously ServerAlias is better/easier from a readability or scripting perspective. I have heard... | {
"language": "en",
"url": "https://stackoverflow.com/questions/139889",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "20"
} |
Q: What's the foolproof way to tell which version(s) of .NET are installed on a production Windows Server? This question is not so much programming related as it is deployment related.
I find myself conversing a lot with the group in my company whose job it is to maintain our production Windows servers and deploy our c... | {
"language": "en",
"url": "https://stackoverflow.com/questions/139891",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "99"
} |
Q: Java Multicast Time To Live is always 0 I have a problem with setting the TTL on my Datagram packets. I am calling the setTTL(...) method on the packet before sending the packet to the multicastSocket but if I capture the packet with ethereal the TTL field is always set to 0
A: Basically you have to set an special... | {
"language": "en",
"url": "https://stackoverflow.com/questions/139909",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "8"
} |
Q: How to submit form with data before logging someone out? I'm using the document.form.submit() function for a rather large input form (hundreds of fields, it's an inventory application). I'm calling this after the user has been idle for a certain amount of time and I would like to save any data they've typed. When ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/139921",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Regular expression to match common SQL syntax? I was writing some Unit tests last week for a piece of code that generated some SQL statements.
I was trying to figure out a regex to match SELECT, INSERT and UPDATE syntax so I could verify that my methods were generating valid SQL, and after 3-4 hours of searching and... | {
"language": "en",
"url": "https://stackoverflow.com/questions/139926",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "17"
} |
Q: Is there a buffered version of CComBSTR that makes string concatenation more efficient? I have several projects where I need to append strings to a BSTR/CComBSTR/_bstr_t object (e.g. building a dynamic SQL statement). Is there an out-of-the-box type in the WinAPI to buffer the concatenation (like StringBuilder in .... | {
"language": "en",
"url": "https://stackoverflow.com/questions/139927",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: ASP.NET Validation Controls and Javascript Confirm boxes I have a page using .NETs server-side input validation controls. This page also has a javascript confirm box that fires when the form is submitted. Currently when the Submit button is selected, the javascript confirm box appears, and once confirmed the ASP.N... | {
"language": "en",
"url": "https://stackoverflow.com/questions/139948",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Need some ASP.NET MVC Routing Help I've started with ASP.NET MVC recently, reading blogs, tutorials, trying some routes, etc. Now, i've stumbled on a issue where i need some help.
Basically, i have an URL like /products.aspx?categoryid=foo&productid=bar
Most tutorials/examples propose to map this to something like: ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/139954",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: MSBuild directory structure limit workarounds Does anyone have a method to overcome the 260 character limit of the MSBuild tool for building Visual Studio projects and solutions from the command line? I'm trying to get the build automated using CruiseControl (CruiseControl.NET isn't an option, so I'm trying to tie i... | {
"language": "en",
"url": "https://stackoverflow.com/questions/139964",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "18"
} |
Q: SqlParameter Size - negative effects of setting to max size? I have a SqlCommand that I want to call Prepare() on whose CommandType = Text (it cannot be a stored procedure).
In order to do this, I need to set the Size attribute on the parameters to be non-zero otherwise an exception is thrown. Are there any negative... | {
"language": "en",
"url": "https://stackoverflow.com/questions/139971",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Committing a Directory to Subversion Kind of a newbie question, but I am having problems using SNVKit.
I am using SVNKit in an application to commit changes to files. I have it successfully adding the files and folders to the working copy, but I am having problems committing it to the respository.
The command I am ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/139972",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "11"
} |
Q: Do generic interfaces in C# prevent boxing? (.NET vs Mono performance) I have a C# interface with certain method parameters declared as object types. However, the actual type passed around can differ depending on the class implementing the interface:
public interface IMyInterface
{
void MyMethod(object arg);
}
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/139979",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: Advice for someone who wants to start in Business Intelligence? What advice would you have for someone who wants to start in the BI (Business Intelligence) domain?
I where and what I should start with: Books, Blogs, WebCasts...
What I should pay attention to and what I should stay away from.
Are the Microsoft techn... | {
"language": "en",
"url": "https://stackoverflow.com/questions/139988",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "17"
} |
Q: How do I make my colleagues not despise SVN? Many of my colleagues use SVN in groups of 1-5 people partly working on the specific project. Half of them are inexperienced students. In fact non of us are real software developers with year-long experience. Most of them use Eclipse and subclipse to read and write their ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/139989",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "13"
} |
Q: prototyping functions in SML I have two functions, f and g, which call each other recursively. Unfortunately, when f calls g, it has not yet been declared, so I get an "unbound variable" error. How can I prototype (or whatever the equivalent vocabulary is) this function in SML/NJ?
A: Use and:
fun f x = ...
and g ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/139991",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: How to best serialize a java.awt.Image? I have a Serializable object which is supposed to hold a java.awt.Image as its member. How should I go about serializing it?
(Edited from a not so clear first version, sorry.)
A: javax.swing.ImageIcon, as a part of Swing, does not guarantee to have compatible serialised form ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/139996",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "12"
} |
Q: How do I change the Status labels in Bugzilla I don't want to change how the Status field works I just want to change the labels to
the states that the old system uses. (the old systems consists of spreadsheets and paper :P
We are using 3.0
* UNCONFIRMED --> PRELIMARY
* NEW --> DESIGN REVIEW
* ASSIGNED ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/140000",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: VBScript: How to utiliize a dictionary object returned from a function? I'm trying to return a dictionary from a function. I believe the function is working correctly, but I'm not sure how to utilize the returned dictionary.
Here is the relevant part of my function:
Function GetSomeStuff()
'
' Get a recordset...... | {
"language": "en",
"url": "https://stackoverflow.com/questions/140002",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "10"
} |
Q: Checking ftp return codes from Unix script I am currently creating an overnight job that calls a Unix script which in turn creates and transfers a file using ftp. I would like to check all possible return codes. The man page for ftp doesn't list return codes. Does anyone know where to find a list? Anyone with ex... | {
"language": "en",
"url": "https://stackoverflow.com/questions/140012",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Writing a Domain Specific Language for selecting rows from a table I'm writing a server that I expect to be run by many different people, not all of whom I will have direct contact with. The servers will communicate with each other in a cluster. Part of the server's functionality involves selecting a small subset of... | {
"language": "en",
"url": "https://stackoverflow.com/questions/140026",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: Possible causes of Java VM EXCEPTION_ACCESS_VIOLATION? When a Java VM crashes with an EXCEPTION_ACCESS_VIOLATION and produces an hs_err_pidXXX.log file, what does that indicate? The error itself is basically a null pointer exception. Is it always caused by a bug in the JVM, or are there other causes like malfunction... | {
"language": "en",
"url": "https://stackoverflow.com/questions/140030",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "38"
} |
Q: boost::shared_ptr standard container Assume I have a class foo, and wish to use a std::map to store some boost::shared_ptrs, e.g.:
class foo;
typedef boost::shared_ptr<foo> foo_sp;
typeded std::map<int, foo_sp> foo_sp_map;
foo_sp_map m;
If I add a new foo_sp to the map but the key used already exists, will the ex... | {
"language": "en",
"url": "https://stackoverflow.com/questions/140033",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: Loop through all Resources in ResourceManager - C# How do I loop into all the resources in the resourcemanager?
Ie:
foreach (string resource in ResourceManager)
//Do something with the recource.
Thanks
A: Use ResourceManager.GetResourceSet() for a list of all resources for a given culture. The returned ResourceSe... | {
"language": "en",
"url": "https://stackoverflow.com/questions/140043",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "18"
} |
Q: RightNow CRM XML API - Anyone familiar with it? I need to create a user control in either vb.net or c# to search a RightNow CRM database. I have the documentation on their XML API, but I'm not sure how to post to their parser and then catch the return data and display it on the page.
Any sample code would be greatly... | {
"language": "en",
"url": "https://stackoverflow.com/questions/140044",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: AVR or PIC to start programming Microcontroller? Which family should I start to learn? (Never did any programming on microcontroller)
A: I would suggest AVR. It has far surpassed PIC as the microcontroller platform of choice for general hobbyist projects. Most notably, consider the Arduino (and other *duino) plat... | {
"language": "en",
"url": "https://stackoverflow.com/questions/140049",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "37"
} |
Q: Using InstallUtil and silently setting a windows service logon username/password I need to use InstallUtil to install a C# windows service. I need to set the service logon credentials (username and password). All of this needs to be done silently.
Is there are way to do something like this:
installutil.exe myservice... | {
"language": "en",
"url": "https://stackoverflow.com/questions/140054",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "51"
} |
Q: Java: Advice on handling large data volumes. (Part Deux) Alright. So I have a very large amount of binary data (let's say, 10GB) distributed over a bunch of files (let's say, 5000) of varying lengths.
I am writing a Java application to process this data, and I wish to institute a good design for the data access. T... | {
"language": "en",
"url": "https://stackoverflow.com/questions/140056",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: When to use dynamic vs. static libraries When creating a class library in C++, you can choose between dynamic (.dll, .so) and static (.lib, .a) libraries. What is the difference between them and when is it appropriate to use which?
A: Ulrich Drepper's paper on "How to Write Shared Libraries" is also good resource t... | {
"language": "en",
"url": "https://stackoverflow.com/questions/140061",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "498"
} |
Q: Where should a Subversion repository be? Should it be on the development servers or a Subversion server?
I suppose this could be expanded to any client-server version control system.
A: The physical repository should be on a stable system that gets regular backups.
Generally, a development server does not fit this... | {
"language": "en",
"url": "https://stackoverflow.com/questions/140090",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "11"
} |
Q: Is MVC-ARS preferable to classic MVC to prevent overloading? The popular design pattern MVC (Model/View/Controller) has an extended cousin MVC-ARS (Action/Representation/State). The added components all live within the database layer and while are not part of the model, they are invoked by it. Details are as follo... | {
"language": "en",
"url": "https://stackoverflow.com/questions/140098",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: How can I return a custom HTTP status code from a WCF REST method? If something goes wrong in a WCF REST call, such as the requested resource is not found, how can I play with the HTTP response code (setting it to something like HTTP 404, for example) in my OperationContract method?
A: If you need to return a reaso... | {
"language": "en",
"url": "https://stackoverflow.com/questions/140104",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "91"
} |
Q: Sending an arbitrary Signal in Windows? Linux supports sending an arbitrary Posix-Signal such as SIGINT or SIGTERM to a process using the kill-Command. While SIGINT and SIGTERM are just boring old ways to end a process in a friendly or not-so-friendly kind of way, SIGQUIT is meant to trigger a core dump. This can b... | {
"language": "en",
"url": "https://stackoverflow.com/questions/140111",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "37"
} |
Q: Consume Webservice using https protocol I want to consume a web service over https from a java client.
What steps will i need to take in order to do this?
A: Really, there shouldn't much different from consuming a web service over HTTP. The big thing is that the process calling the web service will have to trust th... | {
"language": "en",
"url": "https://stackoverflow.com/questions/140113",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Reading hidden share in C# So I have a small C# app that needs to periodically check the contents of directories on multiple machines on the network. I thought I could just read \hostname\C$ as a directory path, but with the normal Directory class there doesn't seem to be a way to authenticate against the other ser... | {
"language": "en",
"url": "https://stackoverflow.com/questions/140115",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: Available space left on drive - WinAPI - Windows CE I've forgotten the WinAPI call to find out how much space is remaining on a particular drive and pinvoke.net isn't giving me any love.
It's compact framework by the way, so I figure coredll.dll.
Can anyone with a better memory jog mine?
A: GetDiskFreeSpaceEx. That... | {
"language": "en",
"url": "https://stackoverflow.com/questions/140117",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Invoking Web Services From a Java Client I have a simple web app that runs inside Tomcat. I need to call a web service from this web app and I'm not sure how to go about it. It seems there are two methods depending on whether you are using a managed or unmanaged environment:
JNDI service lookup (managed)
and
JAX-R... | {
"language": "en",
"url": "https://stackoverflow.com/questions/140127",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Convert a string representation of a hex dump to a byte array using Java? I am looking for a way to convert a long string (from a dump), that represents hex values into a byte array.
I couldn't have phrased it better than the person that posted the same question here.
But to keep it original, I'll phrase it my own w... | {
"language": "en",
"url": "https://stackoverflow.com/questions/140131",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "439"
} |
Q: How would I raise an event (jQuery or vanilla Javascript) when a popup window is closed? I want to raise an event when a popup window is closed, or preferably, just before closing. I'm storing the popup window object as an object, but I don't know of any way to bind to the close event, or an event just before the wi... | {
"language": "en",
"url": "https://stackoverflow.com/questions/140133",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "12"
} |
Q: Creating a custom error page in Umbraco CMS I'm working on a client site who is using Umbraco as a CMS. I need to create a custom 404 error page. I've tried doing it in the IIS config but umbraco overrides that.
Does anyone know how to create a custom 404 error page in Umbraco?
Is there a way to create a custom err... | {
"language": "en",
"url": "https://stackoverflow.com/questions/140137",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "8"
} |
Q: Deleting Windows performance counter categories I have a custom performance counter category. Visual Studio Server Explorer refuses to delete it, claiming it is 'not registered or a system category'. Short of doing it programmatically, how can I delete the category? Is there a registry key I can delete?
A: As far a... | {
"language": "en",
"url": "https://stackoverflow.com/questions/140149",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "25"
} |
Q: How to access Subversion from Oracle PL/SQL? For a governmental agency, we build a release management system developped in PHP and Oracle. The data for this application is stored in database tables and is processed with PL/SQL packages and procedures.
The release management process is extensively based on metadata c... | {
"language": "en",
"url": "https://stackoverflow.com/questions/140153",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "9"
} |
Q: What triggers ConstraintException when loading DataSet? 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.
A: When you use a s... | {
"language": "en",
"url": "https://stackoverflow.com/questions/140161",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "36"
} |
Q: java.lang.String in jndi default context with Apache Geronimo - How? 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 Websph... | {
"language": "en",
"url": "https://stackoverflow.com/questions/140162",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Regular expressions but for writing in the match When using regular expressions we generally, if not always use them to extract some kind of information. What I need is to replace the match value with some other value...
Right now I'm doing this...
def getExpandedText(pattern, text, replaceValue):
"""
O... | {
"language": "en",
"url": "https://stackoverflow.com/questions/140182",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Best method to have a C++ member function get called by a C callback ? Given a typical class:
struct Whatever
{
void Doit();
};
Whatever w;
what is the best way to get the member function to be called by a C void* based callback such as pthread_create() or a signal handler ?
pthread_t pid;
pthread_create(&p... | {
"language": "en",
"url": "https://stackoverflow.com/questions/140204",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Combining split date ranges in a SQL query I'm working on a query that needs to have some data rows combined based on date ranges. These rows are duplicated in all the data values, except the date ranges are split. For example the table data may look like
StudentID StartDate EndDate Field1 Field2
1 ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/140205",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: How do you use gdb to debug your code? As a developer, how do you use gdb to track down bugs within your code? What techniques tricks do you use to make your life easier?
A: Some hints:
*
*use a graphical frontend (kdbg is quite good, ddd is at least better than command-line gdb, kdevelop has a nice gdb fronten... | {
"language": "en",
"url": "https://stackoverflow.com/questions/140217",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "12"
} |
Q: Reusable code / class Repositories I've got several modules containing functions, classes and templates that I keep in a directory called (hah!) 'reuse'. I know the content reasonably well, so to find a particular class or bit of code doesn't take too long, but it is slowly growing in size and I need some sensible m... | {
"language": "en",
"url": "https://stackoverflow.com/questions/140224",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Which issue trackers support sub-tickets, and how well do they work for bridging the gap between project managers and developers? There's a feature that I'd like to see in issue tracking software that just doesn't seem to be all that common, and that is the ability to divide a ticket (bug, feature request, etc) into... | {
"language": "en",
"url": "https://stackoverflow.com/questions/140236",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "22"
} |
Q: Targeting .NET Framework 3.5, Using .NET 2.0 Runtime. Caveats? I'm developing an application that is targeting the .NET 3.5 Framework. The application's setup installs the .NET 2.0 runtime on the target machine. So far I haven't had any issues with doing this, but I'm wondering what problems I'm going to have down t... | {
"language": "en",
"url": "https://stackoverflow.com/questions/140239",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: Will the Javascript performance improvements from Trace Trees find their way into other interpreted languages? It sounds like Mozilla is having good luck improving JavaScript performance with TraceMonkey. See also Andreas Gal's paper on Trace Trees.
Are these improvements available to other interpreters/compilers an... | {
"language": "en",
"url": "https://stackoverflow.com/questions/140241",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: How can I simulate ext3 filesystem corruption? I would like to simulate filesystem corruption for the purpose of testing how our embedded systems react to it and ultimately have them fail as gracefully as possible. We use different kinds of block device emulated flash storage for data which is modified often and uns... | {
"language": "en",
"url": "https://stackoverflow.com/questions/140253",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "16"
} |
Q: Is there a way to return different types from a WCF REST method? I am trying to write a web service to spec and it requires a different response body depending on whether the method completes successfully or not. I have tried creating two different DataContract classes, but how can I return them and have them serial... | {
"language": "en",
"url": "https://stackoverflow.com/questions/140255",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: Catching 'external drive inserted' event in a windows service I'm trying to write a super-simple podcast-to-device downloading service to use for running. I imagine that it'll like this:
Whenever a particular device is plugged in (via USB), it:
*
*Deletes everything from the device
*Checks for all the latest e... | {
"language": "en",
"url": "https://stackoverflow.com/questions/140287",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Using locale.setlocale in embedded Python without breaking file parsing in C thread We're using a third-party middleware product that allows us to write code in an embedded Python interpreter, and which exposes an API that we can call into. Some of these API calls allow us to load various kinds of file, and the load... | {
"language": "en",
"url": "https://stackoverflow.com/questions/140295",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: ASP.NET: Unable to validate data What is the cause of this exception in ASP.NET? Obviously it is a viewstate exception, but I can't reproduce the error on the page that is throwing the exception (a simple two TextBox form with a button and navigation links).
FWIW, I'm not running a web farm.
Exception
Error Messag... | {
"language": "en",
"url": "https://stackoverflow.com/questions/140303",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "10"
} |
Q: How to prevent Visual Studio 2008 from expanding excluded folders when opening solution? We just migrated to Visual Studio 2008 from 2005. Now whenever I open our project solution the solution explorer auto expands every directory that is excluded or contains an excluded file.
A: I'm not sure why it would expand e... | {
"language": "en",
"url": "https://stackoverflow.com/questions/140313",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: How can I redirect to a page when the user session expires? I am currently working on an web application that uses ASP.NET 2.0 framework. I need to redirect to a certain page, say SessionExpired.aspx, when the user session expires. There are lot of pages in the project, so adding code to every page of the site is no... | {
"language": "en",
"url": "https://stackoverflow.com/questions/140329",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "12"
} |
Q: Nullable entity projection in Entity Framework I have a following SQL Server 2005 database schema:
CREATE TABLE Messages (
MessageID int,
Subject varchar(500),
Text varchar(max) NULL,
UserID NULL
)
The column "UserID" - which can be null - is a foreign key and links to the table
CREATE TABLE Users (
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/140331",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: How do I read a file in C++? I am having some problems reading from a file. I have two header files: a and b. b is derived from a,and c is derived from b. Now i want to open a text file.
The whole format is like this:
A john
A johnee
P 123
If the first charcter is 'a' and 'p' is also there, then print the second l... | {
"language": "en",
"url": "https://stackoverflow.com/questions/140337",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Win32/MFC Get window rect from client rect I know there is a function somewhere that will accept a client rect and it will convert it into a window rect for you. I just can't find / remember it!
Does anyone know what it is?
It will do something similar to:
const CRect client(0, 0, 200, 200);
const CRect window = Cli... | {
"language": "en",
"url": "https://stackoverflow.com/questions/140347",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: What are the advantages and disadvantages of using XML schemas? We are utilizing the XML data type in Microsoft SQL Server 2005 for a project. Some members of the team and I feel that we should also use XSDs while members of the other camp feel that we should keep the XMLs ad hoc and not treat them as "types".
The X... | {
"language": "en",
"url": "https://stackoverflow.com/questions/140355",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: Data Protection and Web 2.0 Web sites 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 tro... | {
"language": "en",
"url": "https://stackoverflow.com/questions/140365",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: How can I programmatically determine how to fit smaller boxes into a larger package? Does anyone know of existing software or algorithms to calculate a package size for shipping multiple items?
I have a bunch of items in our inventory database with length, width and height dimesions defined. Given these dimensions ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/140406",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "50"
} |
Q: Why avoid pessimistic locking in a version control system? Based on a few posts I've read concerning version control, it seems people think pessimistic locking in a version control system is a bad thing. Why? I understand that it prevents one developer from submitting a change while another has the file checked ou... | {
"language": "en",
"url": "https://stackoverflow.com/questions/140409",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "14"
} |
Q: How do I translate 8bit characters into 7bit characters? (i.e. Ü to U) I'm looking for pseudocode, or sample code, to convert higher bit ascii characters (like, Ü which is extended ascii 154) into U (which is ascii 85).
My initial guess is that since there are only about 25 ascii characters that are similar to 7bit ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/140422",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "25"
} |
Q: Authenticating against active directory using python + ldap How do I authenticate against AD using Python + LDAP. I'm currently using the python-ldap library and all it is producing is tears.
I can't even bind to perform a simple query:
import sys
import ldap
Server = "ldap://my-ldap-server"
DN, Secret, un = sys.a... | {
"language": "en",
"url": "https://stackoverflow.com/questions/140439",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "96"
} |
Q: Continuous Integration Servers My company is considering changing continuous integration servers (I won't say which one we have now, so I won't skew your responses in anyway :) ) I wondering if anybody has any recommendations? Best user experience, level of difficulty to maintain, etc...
Our code is all in java, an... | {
"language": "en",
"url": "https://stackoverflow.com/questions/140453",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "78"
} |
Q: Client/JS Framework for "Unsaved Data" Protection? We have a typical web application that is essentially a data entry application with lots of screens some of which have some degree of complexity. We need to provide that standard capability on making sure if the user forgets to click the "Save" button before naviga... | {
"language": "en",
"url": "https://stackoverflow.com/questions/140460",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "21"
} |
Q: Testing for multiple screens with javascript Is it possible to tell if the user of a website is using multiple monitors? I need to find the position of a popup but it's quite likely the user will have a multiple monitor setup. Whilst window.screenX etc. will give the position of the browser window it's useless for ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/140462",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "9"
} |
Q: What is the maximum possible length of a .NET string? What is the longest string that can be created in .NET? The docs for the String class are silent on this question as far as I can see, so an authoritative answer might require some knowledge of internals. Would the maximum change on a 64-bit system?
[This is aske... | {
"language": "en",
"url": "https://stackoverflow.com/questions/140468",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "268"
} |
Q: Base constructor in C# - Which gets called first? Which gets called first - the base constructor or "other stuff here"?
public class MyExceptionClass : Exception
{
public MyExceptionClass(string message, string extrainfo) : base(message)
{
//other stuff here
}
}
A: As others have said, the base... | {
"language": "en",
"url": "https://stackoverflow.com/questions/140490",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "140"
} |
Q: Workaround for J2ME Hessian limitations? The official J2ME implementation of Hessian seems to have serious limitations : complex objects are not supported. This limitation is not mentioned anywhere on the online documentation, but if you google "hessian j2me" you will find posts about this problem. No solutions foun... | {
"language": "en",
"url": "https://stackoverflow.com/questions/140510",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: What options do you recommend for language translation on content driven Web sites? Please read the whole question. I'm not looking for an approach to managing multi-lingual content, but I'm looking for a way to actually get that multi-lingual content. This usually falls within technical recommendations on most proj... | {
"language": "en",
"url": "https://stackoverflow.com/questions/140522",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Tips, Guides and/or Tutorials on writing a Windows desktop app for a PHP programmer by trade Yup, long title. I've been programming in PHP for the last 6 years or so for work and personal projects, but I've got an idea for a desktop app (which incidentally, uses a web REST api).
I'm debating on how to approach this... | {
"language": "en",
"url": "https://stackoverflow.com/questions/140529",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.