text stringlengths 8 267k | meta dict |
|---|---|
Q: Is reading /dev/urandom thread-safe? This is the code:
unsigned int number;
FILE* urandom = fopen("/dev/urandom", "r");
if (urandom) {
size_t bytes_read = fread(&number, 1, sizeof(number), urandom);
DCHECK(bytes_read == sizeof(number));
fclose(urandom);
} else {
NOTREACHED();
}
If not, ho... | {
"language": "en",
"url": "https://stackoverflow.com/questions/133546",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "10"
} |
Q: .NET Windows Integrated Authentication I'm looking for the best/easiest way to add extensions to an existing protocol (can't change the actual protocol easily) to allow the user to do windows authentication (NTLM?) in .NET. I looked at the AuthenticationManager class already but it requires that I use Web(Http)Reque... | {
"language": "en",
"url": "https://stackoverflow.com/questions/133549",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Good idea to access session in observer or not? I want to log user's actions in my Ruby on Rails application.
So far, I have a model observer that inserts logs to the database after updates and creates. In order to store which user performed the action that was logged, I require access to the session but that is pro... | {
"language": "en",
"url": "https://stackoverflow.com/questions/133558",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: How do I use a remote MSMQ transactionally? I am writing a Windows service that pulls messages from an MSMQ and posts them to a legacy system (Baan). If the post fails or the machine goes down during the post, I don't want to loose the message. I am therefore using MSMQ transactions. I abort on failure, and I commit... | {
"language": "en",
"url": "https://stackoverflow.com/questions/133559",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "8"
} |
Q: Good examples of UK postcode lookup flow I'm looking for a good, well designed flow of a UK postcode lookup process as part of registration for an eCommerce account.
We're redesigning ours and want to see what is out there and how I can make it as friendly as possible.
--Update--
Basically our current design was a m... | {
"language": "en",
"url": "https://stackoverflow.com/questions/133567",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Hashtable in C++? I usually use C++ stdlib map whenever I need to store some data associated with a specific type of value (a key value - e.g. a string or other object). The stdlib map implementation is based on trees which provides better performance (O(log n)) than the standard array or stdlib vector.
My questions... | {
"language": "en",
"url": "https://stackoverflow.com/questions/133569",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "57"
} |
Q: How to convert multiple tag to a single tag in php Wanted to convert
<br/>
<br/>
<br/>
<br/>
<br/>
into
<br/>
A: Enhanced readability, shorter, produces correct output regardless of attributes:
preg_replace('{(<br[^>]*>\s*)+}', '<br/>', $input);
A: Thanks all..
Used Jakemcgraw's (+1) version
Just added the ca... | {
"language": "en",
"url": "https://stackoverflow.com/questions/133571",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "15"
} |
Q: Setting Radio Button enabled/disabled via CSS Is there a way to make a Radio Button enabled/disabled (not checked/unchecked) via CSS?
I've need to toggle some radio buttons on the client so that the values can be read on the server, but setting the 'enabled' property to 'false' then changing this on the client via ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/133596",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Can regular expressions be used to match nested patterns? Is it possible to write a regular expression that matches a nested pattern that occurs an unknown number of times? For example, can a regular expression match an opening and closing brace when there are an unknown number of open/close braces nested within the... | {
"language": "en",
"url": "https://stackoverflow.com/questions/133601",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "239"
} |
Q: Sure Google Appengine scales, but is it also fast? I want to know if responsetimes are good, not just if it scales. Anyone with experiences?
A: A scalable architecture like GAE is not the same as one based on optimizing speed. A different approach is needed.
The DataStore isn't designed to be super fast at the smal... | {
"language": "en",
"url": "https://stackoverflow.com/questions/133608",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Balancing a Binary Tree (AVL) Ok, this is another one in the theory realm for the CS guys around.
In the 90's I did fairly well in implementing BST's. The only thing I could never get my head around was the intricacy of the algorithm to balance a Binary Tree (AVL).
Can you guys help me on this?
A: I've been doing s... | {
"language": "en",
"url": "https://stackoverflow.com/questions/133610",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "14"
} |
Q: How do you return from 'gf' in Vim I am using Vim for windows installed in Unix mode. Thanks to this site I now use the gf command to go to a file under the cursor.
I'm looking for a command to either:
*
*return to the previous file (similar
to Ctrl+T for ctags), or
*remap gf
to automatically launch the new fi... | {
"language": "en",
"url": "https://stackoverflow.com/questions/133626",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "203"
} |
Q: Insert a fixed number of rows 2000 at a time in sql server I want to insert say 50,000 records into sql server database 2000 at a time. How to accomplish this?
A: You can use the SELECT TOP clause: in MSSQL 2005 it was extended allowing you to use a variable to specify the number of records (older version allowed o... | {
"language": "en",
"url": "https://stackoverflow.com/questions/133648",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: How can I access a mapped network drive with System.IO.DirectoryInfo? I need to create a directory on a mapped network drive. I am using a code:
DirectoryInfo targetDirectory = new DirectoryInfo(path);
if (targetDirectory != null)
{
targetDirectory.Create();
}
If I specify the path like "\\\\ServerName\\Directo... | {
"language": "en",
"url": "https://stackoverflow.com/questions/133660",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "39"
} |
Q: Format Date On Binding (ASP.NET MVC) In my ASP.net MVC app I have a view that looks like this:
...
<label>Due Date</label>
<%=Html.TextBox("due")%>
...
I am using a ModelBinder to bind the post to my model (the due property is of DateTime type). The problem is when I put "01/01/2009" into the textbox, and the post ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/133671",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "35"
} |
Q: Red eye reduction algorithm I need to implement red eye reduction for an application I am working on.
Googling mostly provides links to commercial end-user products.
Do you know a good red eye reduction algorithm, which could be used in a GPL application?
A: a great library to find eyes is openCV.
it is very rich w... | {
"language": "en",
"url": "https://stackoverflow.com/questions/133675",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "42"
} |
Q: Determine SLOC and complexity of C# and C++ from .NET I have been using SourceMonitor on my project for a couple of years to keep records of source-code complexity and basic SLOC (including comments) for C# and C++ components. These are used for external reporting to our customer, so I'm not in a position to argue ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/133679",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: spawn a new xterm window When I am using Bitvise Tunnelier and I spawn a new xterm window connecting to our sun station everything works nicely. We have visual slick edit installed on the sun station and I have been instructed to open it using the command vs&. When I do this I get the following:
fbm240-1:/home/users... | {
"language": "en",
"url": "https://stackoverflow.com/questions/133680",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Profiling PHP code I'd like to find a way to determine how long each function in PHP, and each file in PHP is taking to run. I've got an old legacy PHP application that I'm trying to find the "rough spots" in and so I'd like to locate which routines and pages are taking a very long time to load, objectively.
Are t... | {
"language": "en",
"url": "https://stackoverflow.com/questions/133686",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "37"
} |
Q: .NET - How to hide invalid choices in a DateTimePicker I've set the MaxDate and MinDate properties of a DateTimePicker. However, when I test the control at runtime, there is no way to tell the invalid dates from the valid ones. The only difference is that clicking on an invalid date does nothing.
This is not very in... | {
"language": "en",
"url": "https://stackoverflow.com/questions/133690",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: How to resize the Asp.Net Page based on the screen resolution I am developing a web application which has Chart Controls.
I have developed a common chart User Control to use across the application.
I am looking for an elegent way to set the Chart control's along with other control's width, height based on the scre... | {
"language": "en",
"url": "https://stackoverflow.com/questions/133691",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "8"
} |
Q: Why does fatal error "LNK1104: cannot open file 'C:\Program.obj'" occur when I compile a C++ project in Visual Studio? I've created a new C++ project in Visual Studio 2008. No code has been written yet; Only project settings have been changed.
When I compile the project, I receive the following fatal error:
fatal... | {
"language": "en",
"url": "https://stackoverflow.com/questions/133698",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "131"
} |
Q: How do you create an HTML table with adjustable columns? I want to know how to create a table where you can adjust the column widths. I have not figured out how to do this. If you know the secret sauce to this technique please let me know.
A: Add this CSS to make your table's column widths adjustable...
th {resize... | {
"language": "en",
"url": "https://stackoverflow.com/questions/133703",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "12"
} |
Q: Ant and the available task - what if something is not available? When I use the task, the property is only set to TRUE if the resource (say file) is available. If not, the property is undefined.
When I print the value of the property, it gives true if the resource was available, but otherwise just prints the proper... | {
"language": "en",
"url": "https://stackoverflow.com/questions/133710",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: How can I read a password from the command line in Ruby? I am running Ruby and MySQL on a Windows box.
I have some Ruby code that needs to connect to a MySQL database a perform a select. To connect to the database I need to provide the password among other things.
The Ruby code can display a prompt requesting the p... | {
"language": "en",
"url": "https://stackoverflow.com/questions/133719",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "35"
} |
Q: Move a file in CVS without resetting the revision number Lately I've be moving source files around in our source tree. For example placing a bunch of files into a common assembly. I've been doing this my deleting the file from CVS and then adding it again in the new spot. The problem is the revision number of the f... | {
"language": "en",
"url": "https://stackoverflow.com/questions/133721",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "10"
} |
Q: Custom ROLAP Data Source in SSAS I am trying to build an OLAP datasource from a bunch of binary files, and our current model just isn't working. We are using SSAS as our analysis / reporting model for our results, but aren't able to get the performance we want out of SQL.
Our main constraints are:
*
*The datab... | {
"language": "en",
"url": "https://stackoverflow.com/questions/133751",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: How do I deserialize an XML file into a class with a read only property? I've got a class that I'm using as a settings class that is serialized into an XML file that administrators can then edit to change settings in the application. (The settings are a little more complex than the App.config allows for.)
I'm using... | {
"language": "en",
"url": "https://stackoverflow.com/questions/133772",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Concurrent Access to RRD (RRDTool) I am using RRDTool (http://oss.oetiker.ch/rrdtool/) as a graphing back-end for storing performance metrics. This is done via the RRDTool CLI from a Python script.
My problem is that the script is multithreaded and each thread updates the RRD at a pretty rapid pace. Sometimes an u... | {
"language": "en",
"url": "https://stackoverflow.com/questions/133774",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: SVN Project(s) organization: per-module or per-project I have a subversion repository that contains a number so subfolders, corresponding to the various applications, configuration files, DLLs, etc (I'll call them 'modules') that make up my project. Now we are starting to "branch" into several related projects. Th... | {
"language": "en",
"url": "https://stackoverflow.com/questions/133777",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: Is it possible to use Castle MonoRail Routing feature with IIS 5? Do I have to go with IIS 6 or higher to use Castle MonoRail Routing feature?
I know casini work but practically we not gonna deploy web app with casini, or do we?
A: Usually the configuration change required is to make requests for all file extensio... | {
"language": "en",
"url": "https://stackoverflow.com/questions/133806",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: What can be better way to send WBXML data to web server? Please could you help me in sending a data from Mobile appication to Web Server in WBXML format ? I have got a bit to convert xml to wbxml but not getting how to send that to web server in efficient way ?
A: I'm not sure I fully understand your question but h... | {
"language": "en",
"url": "https://stackoverflow.com/questions/133815",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: c++ boost lambda libraries What might be the best way to start programming using boost lambda libraries.
A: Depends. Are you already well versed in functional programming concepts? If not, I'd suggest that you start in a language that is designed for functional programming instead of a procedural language with func... | {
"language": "en",
"url": "https://stackoverflow.com/questions/133837",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Why shouldn't Helpers have html in them? I have heard that it's best not to actually have any html in your helpers; my question is, Why not? And furthermore, if you were trying to generate an html list or something like that, how can I avoid actual tags?
Thanks!
-fREW
A: I don't see that there's anything wrong wit... | {
"language": "en",
"url": "https://stackoverflow.com/questions/133840",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "8"
} |
Q: Responsibility without Authority is Meaningless - a technical-based solution? My dad always says "Responsibility without Authority is meaningless".
However, I find that as developers, we get stuck in situations all the time where we are:
*
*Responsible for ensuring the software is "bug free", but don't have the a... | {
"language": "en",
"url": "https://stackoverflow.com/questions/133847",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: AOL and outlook address book grabber how can i get the aol or outlook address books when the user inserts his username and password
I saw many programns that do it
maybe someone has the source code?
I found a very nice one for yahoo gmail and hotmail
https://sourceforge.net/projects/opencontactsnet/
A: You can't g... | {
"language": "en",
"url": "https://stackoverflow.com/questions/133851",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Running subversion under apache and mod_python My Apache server runs on some non-default (not-root) account. When it tries to run a python script which in turn executes a subversion check-out command, 'svn checkout' fails with the following error message:
svn: Can't open file '/root/.subversion/servers': Permission ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/133860",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: How to access button positions from codebehind? I have one third party Popup to display message. It has two properties OffsetX and OffsetY. To set its position in browser.
Now i am invoking this Popup on Button Click event. I need this popup just next to my Button and for that i have to set above mentioned OffsetX a... | {
"language": "en",
"url": "https://stackoverflow.com/questions/133865",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How should one go about choosing a default TCP/IP port for a new service? When developing an app that will listen on a TCP/IP port, how should one go about selecting a default port? Assume that this app will be installed on many computers, and that avoiding port conflicts is desired.
A: If by widely-used, you mean... | {
"language": "en",
"url": "https://stackoverflow.com/questions/133879",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "132"
} |
Q: Reddit's commenting system (hierarchial) For those of you who have looked at Reddit's source code, where exactly is the logic where it manages the comments hierarchial structure?
I downloaded the code, but couldn't even find the database structure let alone where the reads and writes are for the commenting.
Is it do... | {
"language": "en",
"url": "https://stackoverflow.com/questions/133880",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Stop and Start a service via batch or cmd file? How can I script a bat or cmd to stop and start a service reliably with error checking (or let me know that it wasn't successful for whatever reason)?
A: Instead of checking codes, this works too
net start "Apache tomcat" || goto ExitError
:End
exit 0
:ExitError... | {
"language": "en",
"url": "https://stackoverflow.com/questions/133883",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "311"
} |
Q: Efficiently match multiple regexes in Python Lexical analyzers are quite easy to write when you have regexes. Today I wanted to write a simple general analyzer in Python, and came up with:
import re
import sys
class Token(object):
""" A simple Token structure.
Contains the token type, value and position... | {
"language": "en",
"url": "https://stackoverflow.com/questions/133886",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "17"
} |
Q: Creating a multi-dimensional hashtable with generics in VB ASP.NET? I need to create a multi-dimensional (nested) hashtable/dictionary so that I can use syntax like
val = myHash("Key").("key")
I know I need to use Generics but I can't figure out the correct syntax using VB in ASP.NET 2.0, there are plenty of c# ex... | {
"language": "en",
"url": "https://stackoverflow.com/questions/133887",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: How do you find a point at a given perpendicular distance from a line? I have a line that I draw in a window and I let the user drag it around. So, my line is defined by two points: (x1,y1) and (x2,y2). But now I would like to draw "caps" at the end of my line, that is, short perpendicular lines at each of my end po... | {
"language": "en",
"url": "https://stackoverflow.com/questions/133897",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "54"
} |
Q: C/C++ strip chart Just a quick question.
I'm looking for a simple strip chart (aka. graphing) control similar to the windows task manager 'Performance' view. And have found a few, but they all rely on MFC or .NET :(
Am hoping that someone here might have or know where to get a simple strip chart Win32 control tha... | {
"language": "en",
"url": "https://stackoverflow.com/questions/133899",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Do you know of any .NET components for creating Distance Matrices / Routing graphs? Based on geographical data in classic GIS formats. These matrices are a basic input for different vehicle routing problems and such. They can usually be produced an best time or shortest distance basis.
A: QuickGraph
A: ThinkGeo ha... | {
"language": "en",
"url": "https://stackoverflow.com/questions/133916",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How best to integrate several systems? Ok where I work we have a fairly substantial number of systems written over the last couple of decades that we maintain.
The systems are diverse in that multiple operating systems (Linux, Solaris, Windows), Multiple Databases (Several Versions of oracle, sybase and mysql), and... | {
"language": "en",
"url": "https://stackoverflow.com/questions/133919",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "9"
} |
Q: Execute a dynamic SQL Query against MS Access 2003 This is a super basic question but I'm trying to execute a Query that I'm building via some form values against the MS Access database the form resides in. I don't think I need to go through ADO formally, but maybe I do.
Anyway, some help would be appreciated. Sor... | {
"language": "en",
"url": "https://stackoverflow.com/questions/133922",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: JavaScript post request like a form submit I'm trying to direct a browser to a different page. If I wanted a GET request, I might say
document.location.href = 'http://example.com/q=a';
But the resource I'm trying to access won't respond properly unless I use a POST request. If this were not dynamically generated, I... | {
"language": "en",
"url": "https://stackoverflow.com/questions/133925",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1731"
} |
Q: Should the Enter key always trigger the default button, no matter which child control has the focus I have a form with a default OK button, and a Cancel button. I have a treeview with nodes that can be edited, i.e. you can double-click them or press F2 to open another form.
Now, I've never liked that F2 shortcut, an... | {
"language": "en",
"url": "https://stackoverflow.com/questions/133932",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Is there a way to have PHP print the data to a web browser in real time? For example, if I have an echo statement, there's no guarantee that the browser might display it right away, might display a few dozen echo statements at once, and might wait until the entire page is done before displaying anything.
Is there a ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/133935",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "9"
} |
Q: Castle-Windsor swapping service at runtime Let say we defined an interface for tax service as ITaxService, and we got more than one implementation of TaxService (by region) however I wanted to attach a specific tax implementation to a specific customer from the spcific region.
Will DI help in this scenario? How? "co... | {
"language": "en",
"url": "https://stackoverflow.com/questions/133945",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Sharing GDI handles between processes in Windows CE 6.0 I know that GDI handles are unique and process specific in 'Big Windows' but do they work the same way in Windows CE 6.0?
For example:
I've got a font management service that several other services and applications will be using. This service has a list of vali... | {
"language": "en",
"url": "https://stackoverflow.com/questions/133948",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: What are the best/most popular ways to do aspect-oriented programming (AOP) in C#/.Net? What are the best/most popular ways to do aspect-oriented programming (AOP) in C#/.Net?
A: *
*DynamicProxy from Castle is
probably the most used tool for
doing AOP on the CLR.
*Spring framework also offers
AOP capabilities thr... | {
"language": "en",
"url": "https://stackoverflow.com/questions/133950",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Firing a SharePoint Workflow by updating a list item through List Webservice I am developing, a simple SharePoint Sequential Workflow which should be bound to a document library. When associating the little workflow to a document library, I checked these options
*
*Allow this workflow to be manually
started by a... | {
"language": "en",
"url": "https://stackoverflow.com/questions/133953",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "16"
} |
Q: Parsing XML With Single Quotes? I am currently running into a problem where an element is coming back from my xml file with a single quote in it. This is causing xml_parse to break it up into multiple chunks, example: Get Wired, You're Hired!
Is then enterpreted as 'Get Wired, You' being one object, the single quote... | {
"language": "en",
"url": "https://stackoverflow.com/questions/133956",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: unlockbits, lockbits, and try-finally I'm calling some code that uses the BitmapData class from .NET. I've hit something where I can't find a definitive answer on Googlespace.
Because it seems that LockBits and UnlockBits must always be called in a pair, I'm using this:
System.Drawing.Imaging.BitmapData tem... | {
"language": "en",
"url": "https://stackoverflow.com/questions/133958",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: In ASP.NET MVC, how to write model so checkbox in view corresponds to integer in database? I have a database column "WantsReply" that logically holds a boolean (bit) but is unfortunately implemented as an integer. Any nonzero value means "yes" and zero means "no".
If I write
class Entry {
[Column] public int Wan... | {
"language": "en",
"url": "https://stackoverflow.com/questions/133964",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Find CRLF in Notepad++ How can I find/replace all CR/LF characters in Notepad++?
I am looking for something equivalent to the ^p special character in Microsoft Word.
A: I've not had much luck with \r\n regular expressions from the find/replace window.
However, this works in Notepad++ v4.1.2:
*
*Use the "View | S... | {
"language": "en",
"url": "https://stackoverflow.com/questions/133965",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "337"
} |
Q: How does "this" keyword work within a function? I just came across an interesting situation in JavaScript. I have a class with a method that defines several objects using object-literal notation. Inside those objects, the this pointer is being used. From the behavior of the program, I have deduced that the this p... | {
"language": "en",
"url": "https://stackoverflow.com/questions/133973",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "255"
} |
Q: Is there .Net replacement for GetAsyncKeyState? In VB6, I used a call to the Windows API, GetAsyncKeyState, to determine if the user has hit the ESC key to allow them to exit out of a long running loop.
Declare Function GetAsyncKeyState Lib "user32" (ByVal nVirtKey As Long) As Integer
Is there an equivalent in pure... | {
"language": "en",
"url": "https://stackoverflow.com/questions/133977",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Visio Stencils for MS SQL Server Does anyone have a good set of Visio Stencils for MS SQL Server?
A: Some versions of Visio have database support built in. There are a couple of links on the MVP site for Visio:
New URL: http://visio.mvps.org/3rdParty/default.html
Old URL: http://visio.mvps.org/3rdparty.htm
Hope th... | {
"language": "en",
"url": "https://stackoverflow.com/questions/133986",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: which tools are helpful in determining the cyclomatic complexity of a given C source code I want to know which tool can be used to measure the cyclomatic complexity of a C source.
I have seen other post which ask the same question but I want to know specific tool for C source only.
A: http://www.spinroot.com/static... | {
"language": "en",
"url": "https://stackoverflow.com/questions/133987",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Synchronizing on String objects in Java I have a webapp that I am in the middle of doing some load/performance testing on, particularily on a feature where we expect a few hundred users to be accessing the same page and hitting refresh about every 10 seconds on this page. One area of improvement that we found we cou... | {
"language": "en",
"url": "https://stackoverflow.com/questions/133988",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "59"
} |
Q: "loader constraints violated when linking javax/xml/namespace/QName class" from webapp on Oracle 10g We have a web application that can be deployed on many application servers, including Oracle 10g. On that platform, however, we are having classpath issues. The webapp uses JAXB 2, but Oracle 10g ships with JAXB 1,... | {
"language": "en",
"url": "https://stackoverflow.com/questions/133993",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: What assemblies are loaded by default when you create a new ASP.NET 2.0 Web Application Project? What assemblies are loaded by default when you create a new ASP.NET 2.0 Web Application Project ?
A: The ones you reference plus the mandatory ones like : mscorlib, System, System.Web, System.Xml
To check which assembli... | {
"language": "en",
"url": "https://stackoverflow.com/questions/133999",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: How can I load the contents of a text file into a batch file variable? I need to be able to load the entire contents of a text file and load it into a variable for further processing.
How can I do that?
Here's what I did thanks to Roman Odaisky's answer.
SetLocal EnableDelayedExpansion
set content=
for /F "delims... | {
"language": "en",
"url": "https://stackoverflow.com/questions/134001",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "37"
} |
Q: Problem with adding graphics to TLabel I'm trying to create with Delphi a component inherited from TLabel, with some custom graphics added to it on TLabel.Paint. I want the graphics to be on left side of text, so I overrode GetClientRect:
function TMyComponent.GetClientRect: TRect;
begin
result := inherited GetCli... | {
"language": "en",
"url": "https://stackoverflow.com/questions/134018",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: wxwidgets setup.h "no such file" A quick Google search of this issue shows it's common, I just can't for the life of me figure out the solution in my case.
I have a straight forward install of wxWidgets 2.8.8 for Windows straight from the wxWidgets website.
Whenever I try to compile anything (such as the sample app ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/134029",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "18"
} |
Q: how do I get a handle to a custom component in Flex? I have a custom login component in Flex that is a simple form that dispatches a custom LoginEvent when a user click the login button:
<?xml version="1.0" encoding="utf-8"?>
<mx:Form xmlns:mx="http://www.adobe.com/2006/mxml" defaultButton="{btnLogin}">
<mx:Me... | {
"language": "en",
"url": "https://stackoverflow.com/questions/134034",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: iPod touch for iPhone development I am thinking about buying an iPod touch to make some money on developing apps for the iPhone. I like the concept of the App Store and had a quick look at it with iTunes.
Looks like applications are categorized, to be iPhone OR iPod applications.
Some apps which are free for the iPo... | {
"language": "en",
"url": "https://stackoverflow.com/questions/134048",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "19"
} |
Q: Database Duplicate Value Issue ( Filtering Based on Previous Value) Earlier this week I ask a question about filtering out duplicate values in sequence at run time. Had some good answers but the amount of data I was going over was to slow and not feasible.
Currently in our database, event values are not filtered. Re... | {
"language": "en",
"url": "https://stackoverflow.com/questions/134049",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Good ISAM library or other simple file manager for large files on Windows x64 We have some very large data files (5 gig to 1TB) where we need quick read/write access. Since we have a fixed record size it seems like some form of ISAM would be the way to go. But would be happy to hear other suggestions.
Ideally the... | {
"language": "en",
"url": "https://stackoverflow.com/questions/134052",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Alter a column length I need to alter the length of a column column_length in say more than 500 tables and the tables might have no of records ranging from 10 records to 3 or 4 million records.
*
*The column may just be a normal column
CREATE TABLE test(column_length varchar(10))
*The column might contain non-... | {
"language": "en",
"url": "https://stackoverflow.com/questions/134058",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Why are 'out' parameters in .NET a bad idea? Why are 'out' parameters in .NET a bad idea?
I was recently asked this, but I had no real answer besides it's simply unnecessarily complicating an application. What other reasons are there?
A: Out - Parameter are a bad idea in my opinion. They increase the risk of side e... | {
"language": "en",
"url": "https://stackoverflow.com/questions/134063",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "40"
} |
Q: "Reuse existing types" is ignored when adding a service reference I am adding a service reference to one of my projects in Visual Studio 2008. On the "Service Reference Settings" screen I am selecting the default option which says "Reuse types in all referenced assemblies". I have referenced the project for which ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/134064",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: Are there any decent UI components for touch screen web applications? For various reasons a web application would be best suite a project that I am working on but I am worried about the user interface. There will be a lot of pick and choose options that could be handled by check lists, combo boxes, etc… and to a le... | {
"language": "en",
"url": "https://stackoverflow.com/questions/134067",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: ListBox+WrapPanel arrow key navigation I'm trying to achieve the equivalent of a WinForms ListView with its View property set to View.List. Visually, the following works fine. The file names in my Listbox go from top to bottom, and then wrap to a new column.
Here's the basic XAML I'm working with:
<ListBox Name="the... | {
"language": "en",
"url": "https://stackoverflow.com/questions/134068",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: What strategies and tools are useful for finding memory leaks in .NET? I wrote C++ for 10 years. I encountered memory problems, but they could be fixed with a reasonable amount of effort.
For the last couple of years I've been writing C#. I find I still get lots of memory problems. They're difficult to diagnose and ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/134086",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "158"
} |
Q: What's the best practice to fork an open source project? I need to customize an open-source project. The changes are for a specific organization and will not be useful to the public project. The code changes include disabling features not needed by the organization (affecting 5% of the code), customizing other featu... | {
"language": "en",
"url": "https://stackoverflow.com/questions/134090",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "9"
} |
Q: Developing N-Tier App. In what direction? Assuming the you are implementing a user story that requires changes in all layers from UI (or service facade) to DB.
In what direction do you move?
*
*From UI to Business Layer to Repository to DB?
*From DB to Repository to Business Layer to UI?
*It depends. (On what ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/134094",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Are PDO prepared statements sufficient to prevent SQL injection? Let's say I have code like this:
$dbh = new PDO("blahblah");
$stmt = $dbh->prepare('SELECT * FROM users where username = :username');
$stmt->execute( array(':username' => $_REQUEST['username']) );
The PDO documentation says:
The parameters to prepar... | {
"language": "en",
"url": "https://stackoverflow.com/questions/134099",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "734"
} |
Q: How do you search the text of changelist descriptions in Perforce? On occasion, I find myself wanting to search the text of changelist descriptions in Perforce. There doesn't appear to be a way to do this in P4V. I can do it by redirecting the output of the changes command to a file...
p4 changes -l > p4changes.tx... | {
"language": "en",
"url": "https://stackoverflow.com/questions/134103",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "73"
} |
Q: Sharepoint: How to set the permission to edit WSS user profile I'm running a SharePoint Application on a MOSS 2007 with a form based user authentication without using the MySite feature. So all the settings on the SSP administration site which only concern the user profile on the MySites should normally not affect t... | {
"language": "en",
"url": "https://stackoverflow.com/questions/134110",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Positioning three divs with css I have three divs:
<div id="login" />
<div id="content" />
<div id="menu" />
How would I define the CSS styles (without touching the HTML) to have the menu-div as the left column, the login-div in the right column and the content-div also in the right column but below the login-d... | {
"language": "en",
"url": "https://stackoverflow.com/questions/134125",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Problem with datagridview and AddNew I've created a VB 2008 program to track work requests. It all works perfectly on a VISTA box, but I am having an issue with the program on an XP environment with adding new records.
Basically I've got 2 tabs: TAB 1 holds a datagridview with limited info and a calendar. Selecti... | {
"language": "en",
"url": "https://stackoverflow.com/questions/134127",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: ASP.NET MVC CTP5 Crashing IDE I've recently installed the MVC CTP5 and VS is now crashing on me when I try to open an aspx, I get the following error in event viewer:
.NET Runtime version 2.0.50727.3053 - Fatal Execution Engine Error (7A035E00) (80131506)
I was able to find This post on the asp.net forums relating ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/134131",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Do assemblies placed in the GAC gain full trust? I've been hearing conflicting facts about this topic. What is correct?
A: You've been hearing conflicting views because it's a topic of great confusion, even among senior engineers. In short, simply placing an assembly in the GAC does implicitly give it full trust, b... | {
"language": "en",
"url": "https://stackoverflow.com/questions/134148",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: How would you sort 1 million 32-bit integers in 2MB of RAM? Please, provide code examples in a language of your choice.
Update:
No constraints set on external storage.
Example: Integers are received/sent via network. There is a sufficient space on local disk for intermediate results.
A: 1 million 32-bit integers = ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/134158",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "14"
} |
Q: Migrating web application to asp.net mvc I need your advice regarding migration. I want to migrate existing project to ASP.NET MVC and I can figure out the proccess except of url rewriting issue:
for example how can I make following route:
http://www.eireads.com/ireland/mayo/cars-3/1263-used-cars-citroen-c5-for-sal... | {
"language": "en",
"url": "https://stackoverflow.com/questions/134159",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Obtaining a collection of constructed subclassed types using reflection I want to create a class which implements IEnumerable<T> but, using reflection, generates T's and returns them via IEnumerable<T>, where T' is a entirely constructed subclass of T with some properties hidden and others read-only.
Okay., that ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/134161",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: diff and merge of XML Can anyone recommend a good XML diff and merge tool?
A: Project: Merge - Not free, but not expensive either.
A: I like Oxygen.
| {
"language": "en",
"url": "https://stackoverflow.com/questions/134169",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Linq output as an Interface? Here's the code that I'm attempting to do:
public IList<IOperator> GetAll()
{
using (var c = new MyDataContext())
{
return c.Operators.ToList();
}
}
Operator implements IOperator, but I'm getting the following compilation error:
Cannot implicitly convert type... | {
"language": "en",
"url": "https://stackoverflow.com/questions/134182",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Create a method call in .NET based on a string value Right now, I have code that looks something like this:
Private Sub ShowReport(ByVal reportName As String)
Select Case reportName
Case "Security"
Me.ShowSecurityReport()
Case "Configuration"
Me.ShowConfigurationReport()
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/134214",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "10"
} |
Q: Generating an Xml Serialization assembly as part of my build This code produces a FileNotFoundException, but ultimately runs without issue:
void ReadXml()
{
XmlSerializer serializer = new XmlSerializer(typeof(MyClass));
//...
}
Here is the exception:
A first chance exception of type 'System.IO.FileNotFound... | {
"language": "en",
"url": "https://stackoverflow.com/questions/134224",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "69"
} |
Q: Is there any good Markdown Javascript library or control? I want to build a site where the user can enter text and format it in Markdown. The reason I'd like a Javascript solution is because I want to display a live preview, just like on StackOverflow.
My site is not targeted at developers, however, so an editor con... | {
"language": "en",
"url": "https://stackoverflow.com/questions/134235",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "92"
} |
Q: Why can't you use the keyword 'this' in a static method in .Net? I'm trying to use the this keyword in a static method, but the compiler won't allow me to use it.
Why not?
A: As an additional note, from a Static method, you can access or static members of that class. Making the example below valid and at times quit... | {
"language": "en",
"url": "https://stackoverflow.com/questions/134237",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "32"
} |
Q: Retrieving an Record Problem Okay, that may not be the best subject...
I am setting up an approval workflow within an application. I pass the username and the dollar amount to the subprocedure and figure out what workflow I need to use for the approval process. I thought I had this working until I try to handle the ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/134244",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Does Anyone Have Experience Creating an Occasionally-Connected Browser App With NHibernate? We need to make our enterprise ASP.NET/NHibernate browser-based application able to function when connected to or disconnected from the customer's server. Has anyone done this? If so, how did you do it? (Technology, architect... | {
"language": "en",
"url": "https://stackoverflow.com/questions/134245",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: C# Exception Handling continue on error I have a basic C# console application that reads a text file (CSV format) line by line and puts the data into a HashTable. The first CSV item in the line is the key (id num) and the rest of the line is the value. However I've discovered that my import file has a few duplicate ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/134251",
"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.