text stringlengths 8 267k | meta dict |
|---|---|
Q: How should anonymous types be used in C#? I've seen lots of descriptions how anonymous types work, but I'm not sure how they're really useful. What are some scenarios that anonymous types can be used to address in a well-designed program?
A: From LINQ in action (page 76 section 2.6.3):
... anonymous types [are] ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/48668",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "19"
} |
Q: Are there any tools out there to compare the structure of 2 web pages? I receive HTML pages from our creative team, and then use those to build aspx pages. One challenge I frequently face is getting the HTML I spit out to match theirs exactly. I almost always end up screwing up the nesting of <div>s between my page... | {
"language": "en",
"url": "https://stackoverflow.com/questions/48669",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: Copy a file without using the windows file cache Anybody know of a way to copy a file from path A to path B and suppressing the Windows file system cache?
Typical use is copying a large file from a USB drive, or server to your local machine. Windows seems to swap everything out if the file is really big, e.g. 2GiB.
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/48679",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: Winforms c# - Set focus to first child control of TabPage Say I have a Textbox nested within a TabControl.
When the form loads, I would like to focus on that Textbox (by default the focus is set to the TabControl).
Simply calling textbox1.focus() in the Load event of the form does not appear to work.
I have been... | {
"language": "en",
"url": "https://stackoverflow.com/questions/48680",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "20"
} |
Q: How to save persistent objects databound to a DataLayoutControl (DevExpress tools)? I have a small form displaying the DataLayoutControl component.
If I use a GridControl the objects get saved. If I use the DataLayoutControl (which shows them individually) they do not get saved after they are changed. The underlyin... | {
"language": "en",
"url": "https://stackoverflow.com/questions/48688",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: How to maintain Hibernate cache consistency running two Java applications? Our design has one jvm that is a jboss/webapp (read/write) that is used to maintain the data via hibernate (using jpa) to the db. The model has 10-15 persistent classes with 3-5 levels of depth in the relationships.
We then have a separate jv... | {
"language": "en",
"url": "https://stackoverflow.com/questions/48733",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "10"
} |
Q: Finding the phone numbers in 50,000 HTML pages How do you find the phone numbers in 50,000 HTML pages?
Jeff Attwood posted 5 Questions for programmers applying for jobs:
In an effort to make life simpler for phone screeners, I've put together
this list of Five Essential Questions
that you need to ask during an ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/48744",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "20"
} |
Q: When should a method be static? In addition, are there any performance advantages to static methods over instance methods?
I came across the following recently: http://www.cafeaulait.org/course/week4/22.html :
When should a method be static?
*
*Neither reads from nor writes to instance fields
*Independe... | {
"language": "en",
"url": "https://stackoverflow.com/questions/48755",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "34"
} |
Q: Unhandled exceptions filter in a windows service I am creating a windows service and want to know best practices for this. In all my windows Program I have a form that asks the user if he wants to report the error and if he answers yes I created a case in FogBugz. What should I do in a windows service.
A: Since yo... | {
"language": "en",
"url": "https://stackoverflow.com/questions/48757",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: How do I create a foreign key in SQL Server? I have never "hand-coded" object creation code for SQL Server and foreign key decleration is seemingly different between SQL Server and Postgres. Here is my sql so far:
drop table exams;
drop table question_bank;
drop table anwser_bank;
create table exams
(
exam_id u... | {
"language": "en",
"url": "https://stackoverflow.com/questions/48772",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "258"
} |
Q: Adding extra information to a custom exception I've created a custom exception for a very specific problem that can go wrong. I receive data from another system, and I raise the exception if it bombs while trying to parse that data. In my custom exception, I added a field called "ResponseData", so I can track exactl... | {
"language": "en",
"url": "https://stackoverflow.com/questions/48773",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "12"
} |
Q: Boolean Expressions in Shell Scripts What's the "right" way to do the following as a boolean expression?
for i in `ls $1/resources`; do
if [ $i != "database.db" ]
then
if [ $i != "tiles" ]
then
if [ $i != "map.pdf" ]
then
if [ $i != "map.png" ]
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/48774",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "11"
} |
Q: Python: No module named core.exceptions I'm trying to get Google AppEngine to work on my Debian box and am getting the following error when I try to access my page:
<type 'exceptions.ImportError'>: No module named core.exceptions
The same app works fine for me when I run it on my other Ubuntu box, so I know it's n... | {
"language": "en",
"url": "https://stackoverflow.com/questions/48777",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: TinyMCE vs Xinha I have to choose an online WYSIWYG editor. I'm pending between TinyMCE and Xinha. My application is developed in Asp.Net 3.5. Could you help me with with some pros and cons?
A: Haven't tried Xihna myself, but I have experience with TinyMCE and FCKeditor. In my company we switched to TinyMce (from ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/48782",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Html.RenderPartial call from masterpage Here is a scenario: Let's say I have site with two controllers responsible for displaying different type of content - Pages and Articles. I need to embed Partial View into my masterpage that will list pages and articles filtered with some criteria, and be displayed on each pag... | {
"language": "en",
"url": "https://stackoverflow.com/questions/48794",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "8"
} |
Q: How do you access browser history? Some e-Marketing tools claim to choose which web page to display based on where you were before. That is, if you've been browsing truck sites and then go to Ford.com, your first page would be of the Ford Explorer.
I know you can get the immediate preceding page with HTTP_REFERRER, ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/48805",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "28"
} |
Q: Where to find resources on Refactoring? Refactoring is the process of improving the existing system design without changing its behavior.
Besides Martin Fowler's seminal book "Refactoring - Improving the design of existing code" and Joshua Kerievsky's book "Refactoring to Patterns", are there any good resources on r... | {
"language": "en",
"url": "https://stackoverflow.com/questions/48817",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: Is the Mono Developer Support from Novell worth it? My company are thinking about using Mono for an upcoming product, so we were thinking about the $12,995 Mono Kickstart support from Novell.
Anybody here used it, is it worth it?
A: if i were you i'd probably start the project and then only if i needed support for ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/48844",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Detecting Client Disconnects in Web Services I'm using the Apache CXF Web Services stack. When a client times out or disconnects from the server before the operation is complete, the server keeps running the operation until it is complete. I would like to have the server detect when the client disconnects and handle... | {
"language": "en",
"url": "https://stackoverflow.com/questions/48859",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: What is this Icarus thing that comes with MbUnit? I've had to install MbUnit multiple times now and it keeps coming with something called the
Gallilo Icarus GUI Test Runner
I have tried using it thinking it was just an update to the MbUnit GUI but it won't detect my MbUnit tests and sometimes won't even open the ass... | {
"language": "en",
"url": "https://stackoverflow.com/questions/48864",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Why/when should you use nested classes in .net? Or shouldn't you? In Kathleen Dollard's 2008 blog post, she presents an interesting reason to use nested classes in .net. However, she also mentions that FxCop doesn't like nested classes. I'm assuming that the people writing FxCop rules aren't stupid, so there must be... | {
"language": "en",
"url": "https://stackoverflow.com/questions/48872",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "104"
} |
Q: Choosing between Ajax, Flex and Silverlight Ajax, Flex and Silverlight are a few ways to make more interactive web applications. What kinds of factors would you consider when deciding which to use for a new web application?
Does any one of them offer better cross-platform compatibility, performance, developer too... | {
"language": "en",
"url": "https://stackoverflow.com/questions/48877",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "11"
} |
Q: Fundeps and GADTs: When is type checking decidable? I was reading a research paper about Haskell and how HList is implemented and wondering when the techniques described are and are not decidable for the type checker. Also, because you can do similar things with GADTs, I was wondering if GADT type checking is alway... | {
"language": "en",
"url": "https://stackoverflow.com/questions/48905",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "16"
} |
Q: How Do Sockets Work in C? I am a bit confused about socket programming in C.
You create a socket, bind it to an interface and an IP address and get it to listen. I found a couple of web resources on that, and understood it fine. In particular, I found an article Network programming under Unix systems to be very info... | {
"language": "en",
"url": "https://stackoverflow.com/questions/48908",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "21"
} |
Q: Multi-threaded splash screen in C#? I want a splash screen to show while the application is loading. I have a form with a system tray control tied to it. I want the splash screen to display while this form loads, which takes a bit of time since it's accessing a web service API to populate some drop-downs. I also wan... | {
"language": "en",
"url": "https://stackoverflow.com/questions/48916",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "62"
} |
Q: Make the web browser scroll to the top? What is the JavaScript to scroll to the top when a button/link/etc. is clicked?
A: <a href="javascript:scroll(0, 0)">Top</a>
A: If you had an anchor link at the top of the page, you could do it with anchors too.
<a name="top"></a>
<a href='#top">top</a>
It'll work in brows... | {
"language": "en",
"url": "https://stackoverflow.com/questions/48919",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: How to read bound hover callback functions in jQuery I used jQuery to set hover callbacks for elements on my page. I'm now writing a module which needs to temporarily set new hover behaviour for some elements. The new module has no access to the original code for the hover functions.
I want to store the old hover fu... | {
"language": "en",
"url": "https://stackoverflow.com/questions/48931",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: How do I list loaded plugins in Vim? Does anybody know of a way to list up the "loaded plugins" in Vim?
I know I should be keeping track of this kind of stuff myself but
it would always be nice to be able to check the current status.
A: The problem with :scriptnames, :commands, :functions, and similar Vim commands,... | {
"language": "en",
"url": "https://stackoverflow.com/questions/48933",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "329"
} |
Q: In Delphi 7, why can I assign a value to a const? I copied some Delphi code from one project to another, and found that it doesn't compile in the new project, though it did in the old one. The code looks something like this:
procedure TForm1.CalculateGP(..)
const
Price : money = 0;
begin
...
Price := 1.0;
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/48934",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "21"
} |
Q: How can I register a global hot key to say CTRL+SHIFT+(LETTER) using WPF and .NET 3.5? I'm building an application in C# using WPF. How can I bind to some keys?
Also, how can I bind to the Windows key?
A: This is a full working solution, hope it helps...
Usage:
_hotKey = new HotKey(Key.F9, KeyModifier.Shift | KeyMo... | {
"language": "en",
"url": "https://stackoverflow.com/questions/48935",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "53"
} |
Q: How do I implement a callback in PHP? How are callbacks written in PHP?
A: With PHP 5.3, you can now do this:
function doIt($callback) { $callback(); }
doIt(function() {
// this will be done
});
Finally a nice way to do it. A great addition to PHP, because callbacks are awesome.
A: well... with 5.3 on the ho... | {
"language": "en",
"url": "https://stackoverflow.com/questions/48947",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "191"
} |
Q: Is there a way to make WatiN click a link before the page finishes loading We're using WatiN for testing our UI, but one page (which is unfortunately not under our teams control) takes forever to finish loading. Is there a way to get WatiN to click a link on the page before the page finishes rendering completely?
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/48984",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: Linking combo box (JQuery preferrably) I am wondering if anyone has any experience using a JQuery plugin that converts a html
<select>
<option> Blah </option>
</select>
combo box into something (probably a div) where selecting an item acts the same as clicking a link.
I guess you could probably use javascript ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/48993",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: Getting DIV id based on x & y position The problem I'm trying to solve is "What's at this position?"
It's fairly trivial to get the x/y position (offset) of a DIV, but what about the reverse? How do I get the id of a DIV (or any element) given an x/y position?
A: Unfortunately, triggering a manufactured/simulated m... | {
"language": "en",
"url": "https://stackoverflow.com/questions/48999",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "9"
} |
Q: Prefer composition over inheritance? Why prefer composition over inheritance? What trade-offs are there for each approach? When should you choose inheritance over composition?
A: When you want to "copy"/Expose the base class' API, you use inheritance. When you only want to "copy" functionality, use delegation.
On... | {
"language": "en",
"url": "https://stackoverflow.com/questions/49002",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1940"
} |
Q: REST how to handle query parameters when put to resource? I have a REST data service where I want to allow the users to create new items with HTTP PUT using different formats like json,xml,csv. I'm unsure how to best handle the format specification in the url:
PUT /ressource/ID/json
PUT /ressource/ID/xml
or
PUT /re... | {
"language": "en",
"url": "https://stackoverflow.com/questions/49011",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Programmatically retrieve database table creation script in .NET I need to be able to retrieve a CREATE TABLE script to recreate a specific table in a SQL Server (2000) database, programmatically (I'm using C#). Obviously you can do this with Enterprise Manager but I would like to automate it.
I've been playing aro... | {
"language": "en",
"url": "https://stackoverflow.com/questions/49014",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: What does the const operator mean when used with a method in C++? Given a declaration like this:
class A {
public:
void Foo() const;
};
What does it mean?
Google turns up this:
Member functions should be declared with the const keyword after them if they can operate on a const (this) object. If the function is... | {
"language": "en",
"url": "https://stackoverflow.com/questions/49035",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "8"
} |
Q: Different sizeof results Why does n not equal to 8 in the following function?
void foo(char cvalue[8])
{
int n = sizeof (cvalue);
}
But n does equal to 8 in this version of the function:
void bar()
{
char cvalue[8];
int n = sizeof (cvalue);
}
A: Because you can't pass entire arrays as function parameters in... | {
"language": "en",
"url": "https://stackoverflow.com/questions/49046",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "17"
} |
Q: Renaming the containing project folder in VS.net under TFS I have a vs.net project, and after some refactoring, have modified the name of the project. How can I easily rename the underlying windows folder name to match this new project name under a TFS controlled project and solution?
Note, I used to be able to do ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/49066",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "68"
} |
Q: Adding command recall to a Unix command line application I'm working on a command line application for Solaris, written in Java6. I'd like to be able to scroll through a history of previous commands using the up and down arrows like many Unix tools allow (shells, VIM command mode prompt, etc).
Is there any standard ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/49075",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Where WCF and ADO.Net Data services stand? I am bit confused about ADO.Net Data Services.
Is it just meant for creating RESTful web services? I know WCF started in the SOAP world but now I hear it has good support for REST. Same goes for ADO.Net data services where you can make it work in an RPC model if you cannot ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/49089",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: Online Interactive Consoles Where can I find an online interactive console for programming language or api?
*
*Ruby
*Python
*Groovy
*PHP?
*Perl?
*Scheme
*Java
*C?
A: @kuszi Put a great answer as a comment to the question, but I almost missed it because it was a comment rather than the answer.
This link g... | {
"language": "en",
"url": "https://stackoverflow.com/questions/49092",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "33"
} |
Q: Can cout alter variables somehow? So I have a function that looks something like this:
float function(){
float x = SomeValue;
return x / SomeOtherValue;
}
At some point, this function overflows and returns a really large negative value. To try and track down exactly where this was happening, I added a cout... | {
"language": "en",
"url": "https://stackoverflow.com/questions/49098",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "9"
} |
Q: What's the cleanest way to simulate pass-by-reference in Actionscript 3.0? Actionscript 3.0 (and I assume Javascript and ECMAScript in general) lacks pass-by-reference for native types like ints. As a result I'm finding getting values back from a function really clunky. What's the normal pattern to work around this... | {
"language": "en",
"url": "https://stackoverflow.com/questions/49107",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "13"
} |
Q: How do I write a 'for' loop in Bash? I'm looking for the basic loop like:
for(int i = 0; i < MAX; i++) {
doSomething(i);
}
but for Bash.
A: for ((i = 0 ; i < max ; i++ )); do echo "$i"; done
A: #! /bin/bash
function do_something {
echo value=${1}
}
MAX=4
for (( i=0; i<MAX; i++ )) ; {
do_something ${i}
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/49110",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "118"
} |
Q: What's the best .NET library for OpenID and ASP.NET MVC? I'm looking at using OpenID for my authentication scheme and wanted to know what the best .NET library is to use for MVC specific applications?
thx
A: There's another library called ExtremeSwank. This article by Andrew Arnott, a dotnetopenid developer, might ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/49134",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "30"
} |
Q: Calling python from a c++ program for distribution I would like to call python script files from my c++ program.
I am not sure that the people I will distribute to will have python installed.
A: Use system call to run a python script from C++
#include<iostream>
#include <cstdlib>
using namespace std;
int main ()
{
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/49137",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "65"
} |
Q: Storing MD5 Hash in SQL Server In SQL Server would a varbinary(16) be the most efficient way of storing an MD5 hash? Won't be doing anything with it except returning it in a linq query.
A: Null values change things:
A null varbinary(16) is 2 bytes.
A null binary(16) is 16 bytes.
16 bytes stored in varbinary(16) ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/49138",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "13"
} |
Q: How can I make an EXE file from a Python program? I've used several modules to make EXEs for Python, but I'm not sure if I'm doing it right.
How should I go about this, and why? Please base your answers on personal experience, and provide references where necessary.
A: Auto PY to EXE - A .py to .exe converter usi... | {
"language": "en",
"url": "https://stackoverflow.com/questions/49146",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "117"
} |
Q: How do I create a MessageBox in C#? I have just installed C# for the first time, and at first glance it appears to be very similar to VB6. I decided to start off by trying to make a 'Hello, World!' UI Edition.
I started in the Form Designer and made a button named "Click Me!" proceeded to double-click it and typed i... | {
"language": "en",
"url": "https://stackoverflow.com/questions/49147",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "23"
} |
Q: Importing JavaScript in JSP tags I have a .tag file that requires a JavaScript library (as in a .js file).
Currently I am just remembering to import the .js file in every JSP that uses the tag but this is a bit cumbersome and prone to error.
Is there a way to do the importing of the .js inside the JSP tag?
(for cach... | {
"language": "en",
"url": "https://stackoverflow.com/questions/49156",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "8"
} |
Q: GreaseMonkey script to auto login using HTTP authentication I've got quite a few GreaseMonkey scripts that I wrote at my work which automatically log me into the internal sites we have here. I've managed to write a script for nearly each one of these sites except for our time sheet application, which uses HTTP auth... | {
"language": "en",
"url": "https://stackoverflow.com/questions/49158",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: How do I turn a python program into an .egg file? How do I turn a python program into an .egg file?
A: Also, if you need to get an .egg package off a single .py file app, check this link: EasyInstall - Packaging others projects as eggs.
A: Setuptools is the software that creates .egg files. It's an extension of th... | {
"language": "en",
"url": "https://stackoverflow.com/questions/49164",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "21"
} |
Q: Connecting to registry remotely, and getting exceptions I've inherited a hoary old piece of code (by hoary, I mean warty with lots of undocumented bug fixes than WTF-y) and there's one part that's giving me a bit of trouble. Here's how it connects to the remote registry to get the add/remove programs key:
try
{
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/49166",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How can I embed Perl inside a C++ application? I would like to call Perl script files from my c++ program.
I am not sure that the people I will distribute to will have Perl installed.
Basically I'm looking for a .lib file that I can use that has an Apache like distribution license.
A: I'm currently writing a librar... | {
"language": "en",
"url": "https://stackoverflow.com/questions/49168",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: MFC: MessageBox during a Drag-Drop I need to display an error message on rejecting a drop in my application.
I tried this in the OnDrop() but then the source application hangs until my message box is dismissed.
How can I do that?
A: You can always call PostMessage with a private message in the WM_APP range and in t... | {
"language": "en",
"url": "https://stackoverflow.com/questions/49183",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: ASP.NET MVC Preview 4 - Stop Url.RouteUrl() etc. using existing parameters I have an action like this:
public class News : System.Web.Mvc.Controller
{
public ActionResult Archive(int year)
{
/ *** /
}
}
With a route like this:
routes.MapRoute(
"News-Archive", ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/49194",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: What language should I learn as a bridge to C (and derivatives) The first language I learnt was PHP, but I have more recently picked up Python. As these are all 'high-level' languages, I have found them a bit difficult to pick up. I also tried to learn Objective-C but I gave up.
So, what language should I learn to ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/49195",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Storing third-party libraries in source control Should libraries that the application relies on be stored in source control? One part of me says it should and another part say's no. It feels wrong to add a 20mb library that dwarfs the entire app just because you rely on a couple of functions from it (albeit rather h... | {
"language": "en",
"url": "https://stackoverflow.com/questions/49196",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "87"
} |
Q: Is there a FLASH editor that supports autocomplete & step-into debugging? I'm considering using Flash but I'm pretty addicted to autocomplete and Step-at-a-time debugging.
A: By using Eclipse with the ActionScript plugin you get full code hinting in the same format that you do with intellisense.
Or you can use Fla... | {
"language": "en",
"url": "https://stackoverflow.com/questions/49199",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Cycle count measurement I have a MS Visual Studio 2005 application solution. All the code is in C. I want to measure the number of cycles taken for execution by particular functions. Is there any Win32 API which I can use to get the cycle count?
I have used gettimeofday() to get time in micro seconds, but I want to ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/49207",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: How can I use a key blob generated from Win32 CryptoAPI in my .NET application? I have an existing application that is written in C++ for Windows. This application uses the Win32 CryptoAPI to generate a TripleDES session key for encrypting/decrypting data. We're using the exponent of one trick to export the session ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/49211",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Populating a list of integers in .NET I need a list of integers from 1 to x where x is set by the user. I could build it with a for loop eg assuming x is an integer set previously:
List<int> iList = new List<int>();
for (int i = 1; i <= x; i++)
{
iList.Add(i);
}
This seems dumb, surely there's a more elegant w... | {
"language": "en",
"url": "https://stackoverflow.com/questions/49214",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "84"
} |
Q: How can I map a list of strings to my entity using NHibernate? I've got two tables in my database: Articles and Tags
The Tags tables consist of ArticleID (foreign key) and a Tag (varchar).
Now I need to map an articles tags into a readonly collection on Article entity, either using IList Tags or ReadOnlyCollection T... | {
"language": "en",
"url": "https://stackoverflow.com/questions/49220",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: 128 bit data encryption using Java I need to store some sensitive data by encrypting it with atleast 128 bit key. I investigated into javax.crypto package and found that there are certain Cipher names, like
PBEWithMD5AndDES or PBEWithSHA1AndDESede which provides encryption upto 56 bit and 80 bit (http://en.wikipedi... | {
"language": "en",
"url": "https://stackoverflow.com/questions/49226",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: Crash reporting in C for Linux Following this question:
Good crash reporting library in c#
Is there any library like CrashRpt.dll that does the same on Linux? That is, generate a failure report including a core dump and any necessary environment and notify the developer about it?
Edit: This seems to be a duplicate ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/49251",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: ruby method names For a project I am working on in ruby I am overriding the method_missing method so that I can set variables using a method call like this, similar to setting variables in an ActiveRecord object:
Object.variable_name= 'new value'
However, after implementing this I found out that many of the variabl... | {
"language": "en",
"url": "https://stackoverflow.com/questions/49252",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: What is the cleanest way to direct wxWidgets to always use wxFileConfig? I am writing my first serious wxWidgets program. I'd like to use the wxConfig facility to make the program's user options persistent. However I don't want wxConfigBase to automatically use the Windows registry. Even though I'm initially targeti... | {
"language": "en",
"url": "https://stackoverflow.com/questions/49258",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Deploying a project using LINQ to SQL I am working on a winforms application using LINQ to SQL - and am building the app using a SQL Express instance on my workstation. The final installation of the project will be on a proper SQL Server 2005.
The database has the same name, and all tables are identical but the ho... | {
"language": "en",
"url": "https://stackoverflow.com/questions/49260",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Approximate string matching algorithms Here at work, we often need to find a string from the list of strings that is the closest match to some other input string. Currently, we are using Needleman-Wunsch algorithm. The algorithm often returns a lot of false-positives (if we set the minimum-score too low), sometimes ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/49263",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "46"
} |
Q: Embedded custom-tag in dynamic content (nested tag) not rendering Embedded custom-tag in dynamic content (nested tag) not rendering.
I have a page that pulls dynamic content from a javabean and passes the list of objects to a custom tag for processing into html. Within each object is a bunch of html to be output tha... | {
"language": "en",
"url": "https://stackoverflow.com/questions/49267",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Reading default application settings in C# I have a number of application settings (in user scope) for my custom grid control. Most of them are color settings. I have a form where the user can customize these colors and I want to add a button for reverting to default color settings. How can I read the default settin... | {
"language": "en",
"url": "https://stackoverflow.com/questions/49269",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "30"
} |
Q: Safe integer parsing in Ruby I have a string, say '123', and I want to convert it to the integer 123.
I know you can simply do some_string.to_i, but that converts 'lolipops' to 0, which is not the effect I have in mind. I want it to blow up in my face when I try to convert something invalid, with a nice and painful ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/49274",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "167"
} |
Q: File downloads in IE6 I've come across a rather interesing (and frustrating) problem with IE6. We are serving up some server generated pdfs and then simply setting headers in PHP to force a browser download of the file. Works fine and all, except in IE6 but only if the windows user account is set to standard user (i... | {
"language": "en",
"url": "https://stackoverflow.com/questions/49284",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Will PRISM help? I am considering building a application using PRISM (Composite WPF Guidance/Library). The application modules will be vertically partitioned (i.e. Customers, Suppliers, Sales Orders, etc). This is still all relatively easy... I also have a Shell with a main region were all the work will happen but n... | {
"language": "en",
"url": "https://stackoverflow.com/questions/49299",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How to Identify Postback event in Page_Load We have some legacy code that needs to identify in the Page_Load which event caused the postback.
At the moment this is implemented by checking the Request data like this...
if (Request.Form["__EVENTTARGET"] != null
&& (Request.Form["__EVENTTARGET"].IndexOf("BaseGrid") > -... | {
"language": "en",
"url": "https://stackoverflow.com/questions/49302",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: Can parallel traversals be done in MATLAB just as in Python? Using the zip function, Python allows for loops to traverse multiple sequences in parallel.
for (x,y) in zip(List1, List2):
Does MATLAB have an equivalent syntax? If not, what is the best way to iterate over two parallel arrays at the same time using MAT... | {
"language": "en",
"url": "https://stackoverflow.com/questions/49307",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "14"
} |
Q: Sharepoint scheduling with SSRS issue I have some scheduled SSRS reports (integrated mode) that get emailed by subscription.
All of a sudden the reports have stopped being emailed. I get the error:
Failure sending mail: Report Server has encountered a SharePoint error.
I don't even know where to start to look as I... | {
"language": "en",
"url": "https://stackoverflow.com/questions/49316",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: VS 2005 & 2008 library linking Is it correct to link a static library (.lib) compiled with VS 2005 with a program which is compiled with VS 2008? Both library and my program are written in C++. This program is run on Windows Mobile 6 Professional emulator.
This seems to work, there are no linking errors. However the... | {
"language": "en",
"url": "https://stackoverflow.com/questions/49330",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Querying collections of value type in the Criteria API in Hibernate In my database, I have an entity table (let's call it Entity). Each entity can have a number of entity types, and the set of entity types is static. Therefore, there is a connecting table that contains rows of the entity id and the name of the entit... | {
"language": "en",
"url": "https://stackoverflow.com/questions/49334",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How to prevent a hyperlink from linking Is it possible to prevent an asp.net Hyperlink control from linking, i.e. so that it appears as a label, without actually having to replace the control with a label? Maybe using CSS or setting an attribute?
I know that marking it as disabled works but then it gets displayed di... | {
"language": "en",
"url": "https://stackoverflow.com/questions/49346",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: Practical solution to center vertically and horizontally in HTML that works in FF, IE6 and IE7 What can be a practical solution to center vertically and horizontally content in HTML that works in Firefox, IE6 and IE7?
Some details:
*
*I am looking for solution for the entire page.
*You need to specify only width... | {
"language": "en",
"url": "https://stackoverflow.com/questions/49350",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: How to make cruisecontrol only build one project at a time I have just set up cruise control.net on our build server, and I am unable to find a setting to tell it to only build one project at a time.
Any ideas?
A: If you are using CruiseControl 1.3 or later you can use an Integration Queue
These allow you to contro... | {
"language": "en",
"url": "https://stackoverflow.com/questions/49352",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Oracle Application Server SSL Certificates preventing connection to Apache service We've got an Apache instance deployed through Oracle Application Server. It's currently installed with the default wallet, and, the self-signed certificate. We've got a GEOTRUST certificiate, imported the Trusted Roots and imported th... | {
"language": "en",
"url": "https://stackoverflow.com/questions/49355",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: What is a good repository layout for releases and projects in Subversion? We have the standard Subversion trunk/branches/tags layout. We have several branches for medium- and long-term projects, but none so far for a release. This is approaching fast.
Should we:
*
*Mix release branches and project branches togeth... | {
"language": "en",
"url": "https://stackoverflow.com/questions/49356",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: CSS2 Attribute Selectors with Regex CSS Attribute selectors allow the selection of elements based on attribute values. Unfortunately, I've not used them in years (mainly because they're not supported by all modern browsers). However, I remember distinctly that I was able to use them to adorn all external links with ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/49368",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "30"
} |
Q: Deploy MySQL Server + DB with .Net application HI All,
We have a .Net 2.0 application which has a MySQL backend. We want to be able to deploy MySQl and the DB when we install the application and im trying to find the best solution. The current setup is to copy the required files to a folder on the local machine and... | {
"language": "en",
"url": "https://stackoverflow.com/questions/49378",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "9"
} |
Q: How to lock compiled Java classes to prevent decompilation? How do I lock compiled Java classes to prevent decompilation?
I know this must be very well discussed topic on the Internet, but I could not come to any conclusion after referring them.
Many people do suggest obfuscator, but they just do renaming of classes... | {
"language": "en",
"url": "https://stackoverflow.com/questions/49379",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "104"
} |
Q: What are the preferred conventions in naming attributes, methods and classes in different languages? Are the naming conventions similar in different languages? If not, what are the differences?
A: Each language has a specific style. At least one.
Each project adopts a specific style. At least, they should. This can... | {
"language": "en",
"url": "https://stackoverflow.com/questions/49382",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Creating batch jobs in PowerShell Imagine a DOS style .cmd file which is used to launch interdependent windowed applications in the right order.
Example:
1) Launch a server application by calling an exe with parameters.
2) Wait for the server to become initialized (or a fixed amount of time).
3) Launch client applic... | {
"language": "en",
"url": "https://stackoverflow.com/questions/49402",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: How do you parse a filename in bash? I have a filename in a format like:
system-source-yyyymmdd.dat
I'd like to be able to parse out the different bits of the filename using the "-" as a delimiter.
A: Depending on your needs, awk is more flexible than cut. A first teaser:
# echo "system-source-yyyymmdd.dat" \
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/49403",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "27"
} |
Q: SQL Query to get latest price I have a table containing prices for a lot of different "things" in a MS SQL 2005 table. There are hundreds of records per thing per day and the different things gets price updates at different times.
ID uniqueidentifier not null,
ThingID int NOT NULL,
PriceDateTime datetime NOT NULL,
P... | {
"language": "en",
"url": "https://stackoverflow.com/questions/49404",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "12"
} |
Q: GSM Modems, PCs, SMS and Telephone Calls What all would be the requirements for the following scenario:
A GSM modem connected to a PC running
a web based (ASP.NET) application. In
the application the user selects a
phone number from a list of phone nos.
When he clicks on a button named the
PC should call ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/49416",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How to shortcut time before data after first hit in browser We have a couple of large solutions, each with about 40 individual projects (class libraries and nested websites). It takes about 2 minutes to do a full rebuild all.
A couple of specs on the system:
*
*Visual Studio 2005, C#
*Primary project is a Web Ap... | {
"language": "en",
"url": "https://stackoverflow.com/questions/49421",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: How do you manage your app when the database goes offline? Take a .Net Winforms App.. mix in a flakey wireless network connection, stir with a few users who like to simply pull the blue plug out occasionally and for good measure, add a Systems Admin that decides to reboot the SQL server box without warning now and a... | {
"language": "en",
"url": "https://stackoverflow.com/questions/49426",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: Animation Extender Problems I have just started working with the AnimationExtender. I am using it to show a new div with a list gathered from a database when a button is pressed. The problem is the button needs to do a postback to get this list as I don't want to make the call to the database unless it's needed. ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/49430",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Trigger UpdatePanel on mouse over (as tooltip) I need to display additional information, like a tooltip, but it's a lot of info (about 500 - 600 characters) on the items in a RadioButtonList.
I now trigger the update on a PanelUpdate when the user selects an item in the RadioButtonList, using OnSelectedIndexChanged ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/49431",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: When to create Interface Builder plug-in for custom view? When do you recommend integrating a custom view into Interface Builder with a plug-in? When skimming through Apple's Interface Builder Plug-In Programming Guide I found:
*
*Are your custom objects going to be used by only one application?
*Do your custom ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/49442",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "9"
} |
Q: How to make a WCF service STA (single-threaded) I have a WCF service which includes UI components, which forces me to be in STA mode.
How do I set the service behaviour to STA-mode?
The service uses a reference to a WPF DLL file which opens a UI window (used as view port) for picture analysis. When the service is t... | {
"language": "en",
"url": "https://stackoverflow.com/questions/49445",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "10"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.