text stringlengths 8 267k | meta dict |
|---|---|
Q: How much resources do sleeping and waiting threads consume I'm wondering, how expensive it is to have many threads in waiting state in java 1.6 x64.
To be more specific, I'm writing application which runs across many computers and sends/receives data from one to another. I feel more comfortable to have separate thre... | {
"language": "en",
"url": "https://stackoverflow.com/questions/100707",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "19"
} |
Q: Determine when application cache item will timeout? In ASP.NET, when storing a value in the application cache with absolute expiry is there a method to retrieve the date/time when the item will expire? The application cache item will be refreshed if expired based on user requests.
A: There is a method signature on... | {
"language": "en",
"url": "https://stackoverflow.com/questions/100717",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: DirectoryInfo.GetDirectories() and attributes I am using DirectoryInfo.GetDirectories() recursively to find the all the sub-directories under a given path.
However, I want to exclude the System folders and there is no clear way for that.
In FindFirstFile/FindNextFile things were clearer with the attributes.
A: @rsl... | {
"language": "en",
"url": "https://stackoverflow.com/questions/100721",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: Why is "if not someobj:" better than "if someobj == None:" in Python? I've seen several examples of code like this:
if not someobj:
#do something
But I'm wondering why not doing:
if someobj == None:
#do something
Is there any difference? Does one have an advantage over the other?
A: PEP 8 -- Style Guide f... | {
"language": "en",
"url": "https://stackoverflow.com/questions/100732",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "147"
} |
Q: How can I access the classes loaded by Java Web Start when dynamically compiling code? I am dynamically compiling code in my client application. When I start the application with Java Web Start I get an exception. The exception only occurs when it is run through Java Web Start.
//The exception
evolver.core.model.cha... | {
"language": "en",
"url": "https://stackoverflow.com/questions/100737",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Organic growth with Lindenmayer Systems I'm looking for a good way to represent organic growth - especially trees and flowers - using code.
I've found Lindenmayer Systems as a reasonable way to portray this, but need a good place to start programming this.
Any good suggestions?
A: Start by looking at Laurens Lapre'... | {
"language": "en",
"url": "https://stackoverflow.com/questions/100747",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Communication Gap: User vs Analyst-Designer Normal practice is to use case studies, construct work- and data-flows, etc. But this does not necessarily create a shared vocabulary between the user/sponsor and the analyst-designer: one or the other, both normally, will have to acquire terms and views of the "internals"... | {
"language": "en",
"url": "https://stackoverflow.com/questions/100767",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: javascript XSLTProcessor occasionally not working The following JavaScript supposes to read the popular tags from an XML file and applies the XSL Stylesheet and output to the browser as HTML.
function ShowPopularTags() {
xml = XMLDocLoad("http://localhost/xml/tags/popular.xml?s=94987898");
xsl = XMLDocLoad("ht... | {
"language": "en",
"url": "https://stackoverflow.com/questions/100774",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: MySQL Training videos Hi were can I find training videos for MySQL ?
A: In youtube you find somethings like
mysql install: http://www.youtube.com/watch?v=KQcFP3GcQ0s
mysql trainning: http://www.youtube.com/watch?v=BHq-bORKncA
Google presentation about mysql tunning (hot) http://www.youtube.com/watch?v=u70mkgDnDd... | {
"language": "en",
"url": "https://stackoverflow.com/questions/100780",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "-3"
} |
Q: SQL Server locks explained Below is a list of locks that SQL Server 2000 is meant to support. I am a bit confused as to what the "intent" locks actually mean. I've looked around on the Web and the answers seem to be a bit cryptic.
Further to getting an answer to my specific question, I am hoping to use this questio... | {
"language": "en",
"url": "https://stackoverflow.com/questions/100789",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "10"
} |
Q: How do I unit-test inheriting objects? When you use composition, then you can mock the other objects
from which your class-under-test depends, but when you use
inheritance, you can't mock the base class. (Or can you?)
I generally try to prefer composition over inheritance,
but sometimes inheritance really seems like... | {
"language": "en",
"url": "https://stackoverflow.com/questions/100795",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: Receiving multipart POST data requests in PHP I want to receive the following HTTP request in PHP:
Content-type: multipart/form-data;boundary=main_boundary
--main_boundary
Content-type: text/xml
<?xml version='1.0'?>
<content>
Some content goes here
</content>
--main_boundary
Content-type: multipart/mixed;boundary... | {
"language": "en",
"url": "https://stackoverflow.com/questions/100808",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: How do I undo "svn switch" on a subdirectory? Not for the first time, I've accidentally done "svn switch" from somewhere below the root of my project. This switches that subdirectory only, but how do I undo this?
If I try switching the subdirectory back to the original branch I get:
"svn: Directory 'subdir\_svn' con... | {
"language": "en",
"url": "https://stackoverflow.com/questions/100812",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "13"
} |
Q: How do I retrieve the selected rows of a woodstock table I have a JSF woodstock table with checkboxes. When a row is selected I want to do some processing with those items. I managed to get a selection of RowKey objects but can't find out how to get the original objects I put in back. The table is populated by an Ob... | {
"language": "en",
"url": "https://stackoverflow.com/questions/100820",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Is there a better way to explain the behaviour differences between structs and classes in .net? The code below shows a sample that I've used recently to explain the different behaviour of structs and classes to someone brand new to development. Is there a better way of doing so? (Yes - the code uses public fields - ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/100824",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Spawning an interactive telnet session from a shell script I'm trying to write a script to allow me to log in to a console servers 48 ports so that I can quickly determine what devices are connected to each serial line.
Essentially I want to be able to have a script that, given a list of hosts/ports, telnets to the ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/100829",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "11"
} |
Q: Can you record audio with a Java Midlet on a Nokia phone (N80/N95) without the JVM leaking memory? I would like to repeatedly capture snippets of audio on a Nokia mobile phone with a Java Midlet. My current experience is that using the code in Sun's documentation (see: http://java.sun.com/javame/reference/apis/jsr13... | {
"language": "en",
"url": "https://stackoverflow.com/questions/100832",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Artificially create a connection timeout error I've had a bug in our software that occurs when I receive a connection timeout. These errors are very rare (usually when my connection gets dropped by our internal network). How can I generate this kind of effect artificially so I can test our software?
If it matters t... | {
"language": "en",
"url": "https://stackoverflow.com/questions/100841",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "374"
} |
Q: How do you cast an IEnumerable or IQueryable to an EntitySet? In this situation I am trying to perform a data import from an XML file to a database using LINQ to XML and LINQ to SQL.
Here's my LINQ data model:
public struct Page
{
public string Name;
public char Status;
public EntitySet<PageContent> Page... | {
"language": "en",
"url": "https://stackoverflow.com/questions/100851",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "12"
} |
Q: What is the difference between the <%# and <%= opening tags? While editing an aspx file I found both these opening tags used for seemingly the same thing. Is there a difference and if yes, what is it?
A: <%= is a equivalent to <% Repsonse.Write()
You can write any content out here: for example
<%=myProperty + " ad... | {
"language": "en",
"url": "https://stackoverflow.com/questions/100853",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: Reuse define statement from .h file in C# code I have C++ project (VS2005) which includes header file with version number in #define directive. Now I need to include exactly the same number in twin C# project. What is the best way to do it?
I'm thinking about including this file as a resource, then parse it at a run... | {
"language": "en",
"url": "https://stackoverflow.com/questions/100854",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: Help needed for extending Asp.Net As most of you would know, if I drop a file named app_offline.htm in the root of an asp.net application, it takes the application offline as detailed here.
You would also know, that while this is great, IIS actually returns a 404 code when this is in process and Microsoft is not goi... | {
"language": "en",
"url": "https://stackoverflow.com/questions/100860",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Browser Detection What's the best / simplest / most accurate way to detect the browser of a user?
Ease of extendability and implementation is a plus.
The less technologies used, the better.
The solution can be server side, client side, or both. The results should eventually end up at the server, though.
The solution... | {
"language": "en",
"url": "https://stackoverflow.com/questions/100898",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "10"
} |
Q: How can I overcome inconsistent behaviour of snprintf in different UNIX-like operating systems? Per man pages, snprintf is returning number of bytes written from glibc version 2.2 onwards. But on lower versions of libc2.2 and HP-UX, it returns a positive integer, which could lead to a buffer overflow.
How can one ov... | {
"language": "en",
"url": "https://stackoverflow.com/questions/100904",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Can you access a Delphi DBIV database without it creating lock files? I'm trying to read data from a Delphi DBIV database, every time I access the database it creates a Paradox.lck and a Pdoxusrs.lck file. I'm using only a TQuery Object to do this (nothing else). can I access a Delphi DBIV database without it crea... | {
"language": "en",
"url": "https://stackoverflow.com/questions/100917",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: ASP.NET: Syncing client and server-side validation rules Are there any easy, smart ways to keep your client and server-side validation-rules synchronized?
On the client side we have JavaScript, maybe some kind of framework like jQuery or YUI.
On the server-side we have ASP.NET WebForms or ASP.NET MVC.
What is valida... | {
"language": "en",
"url": "https://stackoverflow.com/questions/100919",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "8"
} |
Q: Default constructor vs IOC container Can someone explain to me the advantages of using an IOC container over simply hardcoding the default implementation into a default constructor?
In other words, what is wrong about this code?
public class MyClass
{
private IMyInterface _myInterface;
public MyClass()
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/100922",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "12"
} |
Q: How do you stop MySQL on a Mac OS install? I installed MySQL via MacPorts. What is the command I need to stop the server (I need to test how my application behave when MySQL is dead)?
A: On my mac osx yosemite 10.10. This command worked:
sudo launchctl load -w /Library/LaunchDaemons/com.mysql.mysql.plist
sudo launc... | {
"language": "en",
"url": "https://stackoverflow.com/questions/100948",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "239"
} |
Q: Mac SQLite editor I am aware of CocoaMySQL but I have not seen a Mac GUI for SQLite, is there one?
My Google search didn't turn up any Mac related GUI's which is why I'm asking here rather than Google.
A: I use Liya from the Mac App Store, it's free, does the job, and the project is maintained (a month or so betwee... | {
"language": "en",
"url": "https://stackoverflow.com/questions/100959",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "217"
} |
Q: AMD 64 bit Dual Core Optimization We have a graphics intensive application that seems to be experiencing problems on AMD 64 bit Dual Core platforms that are not apparent on Intel platforms.
Running the application causes the CPU to run at 100%, in particular when using code for shadows and lighting (Open GL).
Does a... | {
"language": "en",
"url": "https://stackoverflow.com/questions/100960",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Blocking https url's in a embedded gecko browser I have an application in which a gecko browser is embedded. The application is crashing when I try to access any https url's because nss is not properly initialised at this point. The crash is in PK11_TokenExists(). I want to block my browser from rendering https site... | {
"language": "en",
"url": "https://stackoverflow.com/questions/100976",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Subclass a MonthCal control in Win32 Objective: use the standard Win32 MonthCal control, and paint days such as holidays in RED.
It seems like the Win32's native approach would be use the MCN_GETDAYSTATE notification, which seems to allow only painting specific days in Bold.
Possible (but declined) solution would be... | {
"language": "en",
"url": "https://stackoverflow.com/questions/100989",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: spring & web service client - Fault Detail How could I get the Fault Detail sent by a SoapFaultClientException ?
I use a WebServiceTemplate as shown below :
WebServiceTemplate ws = new WebServiceTemplate();
ws.setMarshaller(client.getMarshaller());
ws.setUnmarshaller(client.getUnMarshaller());
try {
MyResponse r... | {
"language": "en",
"url": "https://stackoverflow.com/questions/100990",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: RMI vs. Web Services. What's best for Java2Java remoting? I'm new to both Web Services and RMI and I wonder which is the better way to do remoting between different web applications, when these applications are all written in Java, that is when different programming languages don't matter (which would be the advanta... | {
"language": "en",
"url": "https://stackoverflow.com/questions/100993",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "47"
} |
Q: What is domain driven design? So I got this question from one of the developers in my team: What is domain driven design? I could of course point to the book from Evans but is that actually an answer?
How would you explain DDD in a few sentences to junior software engineers in your team?
A: In the process of disco... | {
"language": "en",
"url": "https://stackoverflow.com/questions/100995",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "50"
} |
Q: Delphi 7 and Windows Vista I have a simple software that is made in Delphi 7, and it crashes on Vista after a while. These are totally random crashes, nothing is written in any crash log, just stops working and then Vista tries to find a solution.
Does anyone have any ideas ?
A: Try one of the exception catchers, ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/100998",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Choosing XPath version for .net IIS apps We've got a .net CMS running on IIS 6 which uses XSLT templates. It seems to be running XPath 1.0 (as we can't use any 2.0 functionality).
How do we go about installing or specifying that IIS should use XPath 2.0? Is it installed per server, or can we specify which version to... | {
"language": "en",
"url": "https://stackoverflow.com/questions/101004",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Customising the generic Rails error message Our rails app is designed as a single code base linking to multiple client databases. Based on the subdomain the app determines which db to connect to.
We use liquid templates to customise the presentation for each client. We are unable to customise the generic 'We're Sorr... | {
"language": "en",
"url": "https://stackoverflow.com/questions/101012",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: How to get notified of Windows process maximizing CPU? Is there a tool for Windows XP and Vista (built-in or otherwise ideally freeware/OSS) that can notify the user when the CPU is above a (configurable) threshold for some (configurable) duration?
I am particularly interested in a minimalist tool that fits the foll... | {
"language": "en",
"url": "https://stackoverflow.com/questions/101021",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How to choose the max thread count for an HTTP servlet container? I'm developing a restful Web service that runs as a servlet (using blocking IO) in Jetty. Figuring out the optimal setting for max threads seems hard.
Is there a researched formula for deciding the max number of threads from some easily measurable cha... | {
"language": "en",
"url": "https://stackoverflow.com/questions/101024",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: One-click compilers Do you know of any compilers that only requires one or two clicks on the source code to compile? Having to configure it to do it doesn't count, nor does having to go to a terminal and write a word or two.
Extra points are given if you can give your own view as to why so few compilers have a gui i... | {
"language": "en",
"url": "https://stackoverflow.com/questions/101029",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "-1"
} |
Q: How to return multiple rows from the stored procedure? (Oracle PL/SQL) I want to create a stored procedure with one argument which will return different sets of records depending on the argument. What is the way to do this? Can I call it from plain SQL?
A: You may use Oracle pipelined functions
Basically, when you... | {
"language": "en",
"url": "https://stackoverflow.com/questions/101033",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "47"
} |
Q: Win32 TreeCtrl TVN_ENDLABELEDIT memory allocation I have a Win32 TreeCtrl where the user can rename the tree labels. I process the TVN_ENDLABELEDIT message to do this.
In certain cases I need to change the text that the user entered. Basically the user can enter a short name during edit and I want to replace it with... | {
"language": "en",
"url": "https://stackoverflow.com/questions/101038",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Oracle OCI array fetch of simple data types? I cannot understand the Oracle documentation. :-(
Does anybody know how to fetch multiple rows of simple data from Oracle via OCI?
I currently use OCIDefineByPos to define single variables (I only need to do this for simple integers -- SQLT_INT/4-byte ints) and then fetch... | {
"language": "en",
"url": "https://stackoverflow.com/questions/101046",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: When is a language considered a scripting language? What makes a language a scripting language? I've heard some people say "when it gets interpreted instead of compiled". That would make PHP (for example) a scripting language. Is that the only criterion? Or are there other criteria?
See also:
*
*What’s the differe... | {
"language": "en",
"url": "https://stackoverflow.com/questions/101055",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "107"
} |
Q: Building Python C extension modules for Windows I have a C extension module and it would be nice to distribute built binaries. Setuptools makes it easy to build extensions modules on OS X and GNU/Linux, since those OSs come with GCC, but I don't know how to do it in Windows.
Would I need to buy a copy of Visual Stud... | {
"language": "en",
"url": "https://stackoverflow.com/questions/101061",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "12"
} |
Q: What little things do I need to do before deploying a rails application EDIT
What small things which are too easy to overlook do I need to do before deploying a rails application?
I have set up another question for any task that takes more than a minute or two, and so ought to be scheduled into a deployment process... | {
"language": "en",
"url": "https://stackoverflow.com/questions/101066",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: What is an ideal variable naming convention for loop variables? If you are writing a simple little loop, what should you name the counter?
Provide example loops!
A: Always try to name the variable something meaningful and in context.
If you cannot decide, then use "index", if only so that someone else (maybe you!) ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/101070",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "51"
} |
Q: Java: Why aren't NullPointerExceptions called NullReferenceExceptions? Was this an oversight? Or is it to do with the JVM?
A: In Java they use the nomenclature REFERENCE for referring to dynamically created objects. In previous languages, it is named POINTER. Just as the naming of METHODS in object oriented langua... | {
"language": "en",
"url": "https://stackoverflow.com/questions/101072",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "34"
} |
Q: SQL Server Management Studio – tips for improving the TSQL coding process I used to work in a place where a common practice was to use Pair Programming. I remember how many small things we could learn from each other when working together on the code. Picking up new shortcuts, code snippets etc. with time significan... | {
"language": "en",
"url": "https://stackoverflow.com/questions/101079",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "42"
} |
Q: How to move mails from one linked Exchange mailbox to another in MS Access I have an Exchange mailbox linked as a table in an MS Access app. This is primarily used for reading, but I would also like to be able to "move" messages to another folder.
Unfortunately this is not as simple as writing in a second linked ma... | {
"language": "en",
"url": "https://stackoverflow.com/questions/101096",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How you setup a greenfield project I'm setting yup a Greenfield (yeeea!) web application just now was wondering how other people first setup their project with regards to automated/CI build?
I generally follow this:
*
*Create SVN Repository with basic layout (trunk, braches, lib, etc.)
*Create basic solution str... | {
"language": "en",
"url": "https://stackoverflow.com/questions/101099",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: CSV API for Java Can anyone recommend a simple API that will allow me to use read a CSV input file, do some simple transformations, and then write it.
A quick google has found http://flatpack.sourceforge.net/ which looks promising.
I just wanted to check what others are using before I couple myself to this API.
A: ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/101100",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "171"
} |
Q: Force browser to use new CSS Is there a way to check if the user has a different version of the CSS cached by their browser and if so force their browser to pull the new version?
A: Without using js, you can just keep the css filename in a session variable. When a request is made to the Main Page, you simply compos... | {
"language": "en",
"url": "https://stackoverflow.com/questions/101125",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "10"
} |
Q: How do I read text from the Windows clipboard in Python? How do I read text from the (windows) clipboard with python?
A: you can easily get this done through the built-in module Tkinter which is basically a GUI library. This code creates a blank widget to get the clipboard content from OS.
from tkinter import Tk #... | {
"language": "en",
"url": "https://stackoverflow.com/questions/101128",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "142"
} |
Q: Check if XML Element exists How can someone validate that a specific element exists in an XML file? Say I have an ever changing XML file and I need to verify every element exists before reading/parsing it.
A: if(doc.SelectSingleNode("//mynode")==null)....
Should do it (where doc is your XmlDocument object, obviou... | {
"language": "en",
"url": "https://stackoverflow.com/questions/101145",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "43"
} |
Q: Anything better than PHPDoc out there? Does anybody use anything else to document their PHP code than PHPDoc?
Are there any tools that read the same documentation syntax but give richer output?
A: You could try DocBlox; which is intended to be an alternative for phpDocumentor but with support for additional feature... | {
"language": "en",
"url": "https://stackoverflow.com/questions/101146",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "24"
} |
Q: What is the unit testing strategy for method call forwarding? I have the following scenario:
public class CarManager
{
..
public long AddCar(Car car)
{
try
{
string username = _authorizationManager.GetUsername();
...
long id = _carAccessor.AddCar(username, car.Id, car.N... | {
"language": "en",
"url": "https://stackoverflow.com/questions/101151",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Count images in some folder on WEB server (ASP.NET) I need to count and check how much of some images is placed in folder od web server.
Example- images get names from user_id, and on example I have user_id 27, and my images are:
27_1.jpg, 27_2.jpg, 27_3.jpg, ...
How to check and write to database this thing?
Thank... | {
"language": "en",
"url": "https://stackoverflow.com/questions/101156",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: JSON and ASP.NET MVC How do you return a serialized JSON object to the client side using ASP.NET MVC via an AJAX call?
A: From the controller you can just return a JsonResult:
public ActionResult MyAction()
{
... // Populate myObject
return new JsonResult{ Data = myObject };
}
The form of the Ajax call wil... | {
"language": "en",
"url": "https://stackoverflow.com/questions/101162",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "15"
} |
Q: SQL Server 2005 Fulltext indexing prevents backups Whenever I try to backup a database it goes until 90% and gets stuck there until I manually kill (because it doesn't stop if I try to stop it) the msftesql process.
That clearly means that something makes a conflict between the fulltext indexing and the backup proce... | {
"language": "en",
"url": "https://stackoverflow.com/questions/101168",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Is there a zip-like method in .Net? In Python there is a really neat function called zip which can be used to iterate through two lists at the same time:
list1 = [1, 2, 3]
list2 = ["a", "b", "c"]
for v1, v2 in zip(list1, list2):
print v1 + " " + v2
The above code should produce the following:
1 a
2 b
3 c
I wond... | {
"language": "en",
"url": "https://stackoverflow.com/questions/101174",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "13"
} |
Q: Which is the best .Net XML-RPC library? I need to communicate with an XML-RPC server from a .NET 2.0 client. Can you recommend any libraries?
EDIT: Having tried XML-RPC.Net, I like the way it generates dynamic proxies, it is very neat. Unfortunately, as always, things are not so simple. I am accessing an XML-RPC ser... | {
"language": "en",
"url": "https://stackoverflow.com/questions/101180",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "9"
} |
Q: MOSS 2007 Crawl I'm trying to get crawl to work on two separate farms I have but can't get it to work on either one. They both have two WFE's with an additional WFE configured as an Index server. There is one more server dedicated for Query and two clustered SQL 2005 back end servers for the database. I have unsu... | {
"language": "en",
"url": "https://stackoverflow.com/questions/101182",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: How can I confirm a database is Oracle & what version it is using SQL? I'm building an installer for an application. The user gets to select a datasource they have configured and nominate what type of database it is. I want to confirm that the database type is indeed Oracle, and if possible, what version of Oracle ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/101184",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "173"
} |
Q: Hudson FindBugs plugin: how make the job fail if any problems? I'm playing with the wonderful FindBugs plugin for Hudson. Ideally, I'd like to have the build fail if FindBugs finds any problems. Is this possible?
Please, don't try and tell me that "0 warnings" is unrealistic with FindBugs. We've been using FindBugs ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/101195",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Triggering a .NET garbage collection externally Is there a way to trigger a garbage collection in a .NET process from another process or from inside WinDBG?
There are the Managed Debugging Assistants that force a collection as you move across a native/managed boundary, and AQTime seems to have button that suggests i... | {
"language": "en",
"url": "https://stackoverflow.com/questions/101196",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "27"
} |
Q: How can I confirm a database is Postgres & what version it is using SQL? I'm building an installer for an application. The user gets to select a datasource they have configured and nominate what type of database it is. I want to confirm that the database type is indeed Postgres, and if possible, what version of Pos... | {
"language": "en",
"url": "https://stackoverflow.com/questions/101198",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: Is there a more user friendly alternative to Net::HTTP for interacting with REST APIs? Net::HTTP can be rather cumbersome for the standard use case!
A: rest-open-uri is the one that is used heavily throughout the RESTful Web Services book.
gem install rest-open-uri
Example usage:
response = open('https://wherever/... | {
"language": "en",
"url": "https://stackoverflow.com/questions/101212",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "19"
} |
Q: Programmatically exclude page items in olap pivot I have a pivot table on an olap cube. I can go into a page field and manually deselect multiple items. How can I do this in VBA based on a list of items I need excluded? (n.b. I do not have a corrresponding list of items I need included)
I know how to exclude these i... | {
"language": "en",
"url": "https://stackoverflow.com/questions/101223",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Letting several assemblies access the same text file I've got many assemblies/projects in the same c#/.net solution. A setting needs to be saved by people using the web application gui, and then a console app and some test projects need to access the same file. Where should I put the file and how to access it?
I've ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/101238",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: What command(s) control the behavior of /etc/rc*.d on Redhat/CentOS? /etc/init.d/*
/etc/rc{1-5}.d/*
A: /sbin/chkconfig — The /sbin/chkconfig utility is a simple command line tool for maintaining the /etc/rc.d/init.d/ directory hierarchy.
A: As mentioned by px, the proper way to manage the links to scripts from... | {
"language": "en",
"url": "https://stackoverflow.com/questions/101244",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: In Vim, is there a way to paste text in the search line? I want to search for $maximumTotalAllowedAfterFinish and replace it with $minimumTotalAllowedAfterFinish. Instead of typing the long text:
:%s/$maximumTotalAllowedAfterFinish/$minimumTotalAllowedAfterFinish/g
Is there a way to COPY these long variable names d... | {
"language": "en",
"url": "https://stackoverflow.com/questions/101258",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "127"
} |
Q: Why is there no ForEach extension method on IEnumerable? Inspired by another question asking about the missing Zip function:
Why is there no ForEach extension method on the IEnumerable interface? Or anywhere? The only class that gets a ForEach method is List<>. Is there a reason why it's missing, maybe performance?
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/101265",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "466"
} |
Q: Is there any way to define a constant value to Java at compile time When I used to write libraries in C/C++ I got into the habit of having a method to return the compile date/time. This was always a compiled into the library so would differentiate builds of the library. I got this by returning a #define in the code:... | {
"language": "en",
"url": "https://stackoverflow.com/questions/101267",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "13"
} |
Q: Hidden features of Python What are the lesser-known but useful features of the Python programming language?
*
*Try to limit answers to Python core.
*One feature per answer.
*Give an example and short description of the feature, not just a link to documentation.
*Label the feature using a title as the first line... | {
"language": "en",
"url": "https://stackoverflow.com/questions/101268",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1416"
} |
Q: Vim errorformat for Visual Studio I want to use Vim's quickfix features with the output from Visual Studio's devenv build process or msbuild.
I've created a batch file called build.bat which executes the devenv build like this:
devenv MySln.sln /Build Debug
In vim I've pointed the :make command to that batch file:
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/101270",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "34"
} |
Q: Big things to do when deploying a rails app In the question What little things do I need to do before deploying a rails application I am getting a lot of answers that are bigger than "little things". So this question is slighly different.
What reasonably major steps do I need to take before deploying a rails applic... | {
"language": "en",
"url": "https://stackoverflow.com/questions/101275",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "9"
} |
Q: How many bits are there in a nibble? binary question :)
A: 0b100 bits, actually.
A: I always understood a nybble to be 4 bits. Spelling intentional as a nybble was half a byte.
A: A nibble (often, nybble) is the computing term for a four-bit aggregation, or half an octet (an octet being an 8-bit byte).
A: The a... | {
"language": "en",
"url": "https://stackoverflow.com/questions/101290",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: If I were to build a new operating system, what kind of features would it have? I am toying with the idea of creating an completely new operating system and would like to hear what everyone on this forums take is on that? First is it too late are the big boys so entrenched in our lives that we will never be able to... | {
"language": "en",
"url": "https://stackoverflow.com/questions/101294",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "30"
} |
Q: IronClad equivalent for Jython For IronPython there is a project - IronClad, that aims to transparently run C extensions in it. Is there a similiar project for Jython?
A: You can probably use Java's loadLibrary to do that (provided it works in your platform's java). It is in the java library: java.System.loadLibrar... | {
"language": "en",
"url": "https://stackoverflow.com/questions/101301",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: How to manage concurrent Input/Output access to a XML file from multiple instances of an EXE, using Delphi. I have a command line tool, written in Delphi, which job is to insert a node in a XML file and then immediately exit. I need to make it possible several instances of the tool to be executed simultaneously and ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/101316",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: IIS Wildcard Mapping not working for ASP.NET I've set up wildcard mapping on IIS 6, by adding "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll", and ensured "Verify that file exists" is not checked :
*
*on the "websites" directory in IIS
*on the website
However, after a iisreset, when I go to ht... | {
"language": "en",
"url": "https://stackoverflow.com/questions/101326",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: If classes with virtual functions are implemented with vtables, how is a class with no virtual functions implemented? In particular, wouldn't there have to be some kind of function pointer in place anyway?
A: The virtual methods are required when you want to use polymorphism. The virtual modifier puts the method... | {
"language": "en",
"url": "https://stackoverflow.com/questions/101329",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: The ultimate MySQL legacy database nightmare Table1:
Everything including the kitchen sink. Dates in the wrong format (year last so you cannot sort on that column), Numbers stored as VARCHAR, complete addresses in the 'street' column, firstname and lastname in the firstname column, city in the lastname column, incom... | {
"language": "en",
"url": "https://stackoverflow.com/questions/101333",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "10"
} |
Q: What is the difference between a non-secure random number generator and a secure random number generator? As the title says: What is the difference between a non-secure random number generator and a secure random number generator?
A: A secure random number should not be predictable even given the list of previously... | {
"language": "en",
"url": "https://stackoverflow.com/questions/101337",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "27"
} |
Q: Is it valid to have a 'choice' of 'group' elements when defining an XML Schema (XSD) Is it valid to have a 'choice' of 'group' elements when defining an XML Schema (XSD)
i.e. is the following valid
<xs:complexType name="HeaderType">
<xs:sequence>
<xs:element name="reservation-number" type="ReservationNumberTyp... | {
"language": "en",
"url": "https://stackoverflow.com/questions/101338",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "10"
} |
Q: What's the best way to port an application from ActionScript2 to ActionScript3? Our application is written in ActionScript2 and has about 50.000+ lines of code. We want to port it to ActionScript3 and we're trying to find out what our options are. Do we have to do it manually or can we use a converter, and what prob... | {
"language": "en",
"url": "https://stackoverflow.com/questions/101347",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: How do you generate passwords? How do you generate passwords?
*
*Random Characters?
*Passphrases?
*High Ascii?
Something like this?
cat /dev/urandom | strings
A: Mac OS X's "Keychain Access" application gives you access to the nice OS X password generator. Hit command-N and click the key icon. You get to ch... | {
"language": "en",
"url": "https://stackoverflow.com/questions/101362",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "35"
} |
Q: How do I do Dependency Injection in a test project (TFS 2008) using Castle I'm using Castle Windsor for dependency injection in my test project. I'm trying to create an instance one of my 'Repository' classes. "It works fine on my machine", but when I run a nightly build in TFS, my tests are not able to load said cl... | {
"language": "en",
"url": "https://stackoverflow.com/questions/101363",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Dynamic class variables Does PHP have a method of having auto-generated class variables? I think I've seen something like this before but I'm not certain.
public class TestClass {
private $data = array();
public function TestClass() {
$this->data['firstValue'] = "cheese";
}
}
The $this->data ar... | {
"language": "en",
"url": "https://stackoverflow.com/questions/101386",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: Is there any free tool for monitoring BizTalk applications remotely? whether command line or GUI, I'd be interested in testing every of them.
A: Your question is very generic and all the answers above assumed various things. When it comes to BizTalk monitoring its means different things to different people. Your Bi... | {
"language": "en",
"url": "https://stackoverflow.com/questions/101394",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: What are the best open source Nagios interfaces? (best in your own eyes) Most features? Coolest Features? Slickest Design?
Centreon?
NagVis?
Other?
A: Icinga (a forked Nagios)
A: Centreon is the best ! We use it in our company. Have a look at FAN(Fully automated Nagios) ! best best best.. and don't forget to use... | {
"language": "en",
"url": "https://stackoverflow.com/questions/101414",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Thumbnail image from .3gp file Does anybody know how to get thumbnail (still image) from 3gb video file? First frame or something like that. I'm using .net, but solution can be in any language (managed or native), or third-party product.
A: This is using ffmpeg on Linux and called from PHP, but if you can use ffmpe... | {
"language": "en",
"url": "https://stackoverflow.com/questions/101415",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Multiple local connections in flash - what's the better architecture? I'm using localConnection in AS3 to allow several flash applications to interact with a central application. (Some are AS2, some AS3).
The central application must use a seperate localConnection variable for each receiving connection (otherwise th... | {
"language": "en",
"url": "https://stackoverflow.com/questions/101416",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Encoding spaces with the javascript encodeURIComponent function Why does the JavaScript function encodeURIComponent encode spaces to the hex Unicode value %20 instead of +. Should URI parameters not spaces to +?
A: Spaces encode to %20, I believe that's their ASCII character code.
Howe... | {
"language": "en",
"url": "https://stackoverflow.com/questions/101422",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: How do you continue to improve your SQL skills? How do SQL developers go about keeping up on current techniques and trends in the SQL world? Are there any blogs, books, articles, techniques, etc that are being used to keep up to date and in the know?
There are a lot of opportunities out their for OO, procedural, an... | {
"language": "en",
"url": "https://stackoverflow.com/questions/101423",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "15"
} |
Q: Flex and crossdomain.xml I was wondering are there any security concerns with adding crossdomain.xml to the root of an application server? Can it be added to any other parts of the server and are you aware of any work arounds that dont require the server to have this file in place?
Thanks
Damien
A: By adding the cr... | {
"language": "en",
"url": "https://stackoverflow.com/questions/101427",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: The most efficient way to implement an integer based power function pow(int, int) What is the most efficient way given to raise an integer to the power of another integer in C?
// 2^3
pow(2,3) == 8
// 5^5
pow(5,5) == 3125
A: Note that exponentiation by squaring is not the most optimal method. It is probably the b... | {
"language": "en",
"url": "https://stackoverflow.com/questions/101439",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "300"
} |
Q: Has anyone got NVelocity working with ASP.NET MVC Preview 5? I'm guessing I need to implement an NVelocityViewEngine and NVelocityView - but before I do I wanted to check to see if anyone has already done this.
I can't see anything in the trunk for MVCContrib.
I've already seen the post below - I'm looking specifica... | {
"language": "en",
"url": "https://stackoverflow.com/questions/101449",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.