text stringlengths 8 267k | meta dict |
|---|---|
Q: Looking for a design pattern to replace huuuge if on object Type OK so I'm looking a some code which looks roughly like this:
void DoSomething(object o)
{
if (o is Sometype1) {
//cast o to Sometype and do something to it
}
else if (o is Sometype2) {
//cast o to Sometype2 and do something to it
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306202",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "8"
} |
Q: What Happened To Java (Specifically The Language)? Back in 2000 (when .NET was unleashed upon us IIRC) it was an innovative cutting edge language (last time I used it was 2003).
From what I read though, Sun has only evolved the language exceedingly slowly. I've even read that where the language has evolved, such as ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306212",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "13"
} |
Q: JRuby and Java objects Please tell me if it is possible to do the following:
*
*create an instance of a specific class in Java
*pass it to JRuby to do something with it
*continue using the "modified" version in Java
May you provide a small working example?
EDIT: It turns out that embedding was the simplest wa... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306217",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: How to programmatically change a project's product version? I have several deployment projects. In order to deploy an application, I need to do several tasks, one of them is to change each deployment project's product version and product code.
I can't find a way to programmatically change them.
Since it's a Deployme... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306233",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "11"
} |
Q: Failure to Pass Arguments to a UDF in VBA for Excel 2007 I have a complex iterative spreadsheet in which I want to use a UDF to calculate the heat transfer coefficient of a heat exchanger. The function has 5 arguments (2 strings and 3 doubles). The strings and 1 double pass just fine. The remaining two don't seem to... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306243",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: how were the first NP-complete problems shown to be NP-complete? From the wikipedia entry on NP-Complete:
"The easiest way to prove that some new problem is NP-complete is first to prove that it is in NP, and then to reduce some known NP-complete problem to it"
I'm pretty sure that I understand this: If I have a pr... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306249",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "31"
} |
Q: How to align checkboxes and their labels consistently cross-browsers This is one of the minor CSS problems that plague me constantly.
How do folks around Stack Overflow vertically align checkboxes and their labels consistently cross-browser?
Whenever I align them correctly in Safari (usually using vertical-align: ba... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306252",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1866"
} |
Q: What is the difference between these two methods of accessing the SharePoint model? Out of the several ways of accessing the SharePoint model of a SharePoint Services 3.0 site from an ASP.NET application, two seem to be very similar:
*
*SPWeb site =
SPControl.GetContextWeb(Context);
*SPWeb site = SPContext.Curre... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306253",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Browser <-> Client Hardware API? Are there any initiatives to implement/agree upon a standard API for connectivity between web browsers and client hardware.
Example: The iPhone has a GPS/Camera/Accellerometer in it. It'd be very cool if my web app could communicate with them (rather than me having to write a thick O... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306267",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Bulk Collection Manipulation through a REST (RESTful) API I'd like some advice on designing a REST API which will allow clients to add/remove large numbers of objects to a collection efficiently.
Via the API, clients need to be able to add items to the collection and remove items from it, as well as manipulating exi... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306271",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "73"
} |
Q: How do I create a dispatch table within a class in PHP? Say I have a class with a private dispatch table.
$this->dispatch = array(
1 => $this->someFunction,
2 => $this->anotherFunction
);
If I then call
$this->dispatch[1]();
I get an error that the method is not a string. When I make it a string like thi... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306272",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Copying listeners/observers in a copy constructor I'm programming a class that implements the observable pattern (not the interface) and I'm thinking about whether or not the copy constructor should also copy the listeners.
On the one hand the copy constructor should create an instance that is as close as possible t... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306276",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Haskell Typeclass shorthand So, I have a pair of typeclasses that I'll be using a lot together, and I want to avoid specifying both each time. Basically, instead of putting
:: (Ord a, Fractional a, Ord b, Fractional b, ... Ord z, Fractional z) =>
at the beginning of all my type specifications, I'd rather put
:: (O... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306284",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "23"
} |
Q: Modifying the style attributes of selected table cells with jQuery? I'm building a pretty basic HTML table creator/editor (based on a designMode iframe) at work, using direct DOM manipulation. It's a pain, obviously due to Internet Explorer.
When in designMode, a table inserted into the editing area iframe is resiza... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306285",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Custom ASP.NET Container Control I've been trying to create a custom control that works exactly like the Panel control except surrounded by a few divs and such to create a rounded box look. I haven't been able to find a decent example of how to do this.
I need to be able to place text and controls inside the contro... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306288",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "14"
} |
Q: 4 byte unsigned int in SQL Server? Is there a 4 byte unsigned int data type in MS SQL Server?
Am I forced to use a bigint?
A: It doesn't seem so.
Here's an article describing how to create your own rules restricting an int to positive values. But that doesn't grant you positive values above 2^31-1.
http://www.juli... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306291",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "19"
} |
Q: What would make offsetParent null? I am trying to do positioning in JavaScript. I am using a cumulative position function based on the classic quirksmode function that sums offsetTop and offsetLeft for each offsetParent until the top node.
However, I am running into an issue where the element I'm interested in has ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306305",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "17"
} |
Q: "is" operator behaves unexpectedly with integers Why does the following behave unexpectedly in Python?
>>> a = 256
>>> b = 256
>>> a is b
True # This is an expected result
>>> a = 257
>>> b = 257
>>> a is b
False # What happened here? Why is this False?
>>> 257 is 257
True # Yet the lite... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306313",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "609"
} |
Q: Determine if two rectangles overlap each other? I am trying to write a C++ program that takes the following inputs from the user to construct rectangles (between 2 and 5): height, width, x-pos, y-pos. All of these rectangles will exist parallel to the x and the y axis, that is all of their edges will have slopes of ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306316",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "393"
} |
Q: ibatis.net - isqlmapper.BeforeQuery missing in 1.6.1 We are trying to upgrade to iBatis.Net DataMapper 1.6.1 (from 1.5.1). I am getting an error on this line:
( ( SqlMapDaoSession ) daoManager.GetDaoSession() ).SqlMap.BeforeQuery += new BeforeQueryDelegate ( SqlMap_BeforeQuery );
I cannot even find a reference to t... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306325",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: SVN? VSS? Why is one better than the other? I tend to get the feeling that most folks here think SVN is gold-plated goodness, whereas VSS is the worst program ever devised (at least as Version Control is concerned).
That said, why? I've used some CVS, and my current job uses VSS, and from a grunt on the team's pers... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306339",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "17"
} |
Q: ASP.NET Custom Controls How do you create a custom control (not an ASCX control) and, more importantly, use it in your project? I'd prefer not to create a separate project for it or compile it as a DLL
A: Server controls should be compiled into a DLL. There should be no reason to be afraid of having an additional a... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306381",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: C# Delegates - How Often Do You Use Them, And When? Delegates look like such a powerful language feature, but I've yet to find an opportunity to use them in anger (apart from in DALs I must say).
How often do you use them, and under what circumstances do you find them most useful?
A: I use C# Delegate the most of ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306387",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: How can I randomly select an item from a list? How do I retrieve an item at random from the following list?
foo = ['a', 'b', 'c', 'd', 'e']
A: This is the code with a variable that defines the random index:
import random
foo = ['a', 'b', 'c', 'd', 'e']
randomindex = random.randint(0,len(foo)-1)
print (foo[random... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306400",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2283"
} |
Q: Accessing parent elements in an object model efficiently I have a following object model:
- Book
-- Chapter 1
--- Page 1
---- Image 1
---- Image 2
---- Text 1
--- Page 2
...
Resources are way down at the page level. But, I need to know the full path to resources, from the resources' point of view.
One way, is ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306410",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Generating Login and Registration Forms with Contrib.Auth in Django I'm new to Django and in bouncing around the framework over the past few days I haven't been able to figure out how to properly install the django.contrib.auth app in my project.
Well, installing is probably not the right word, but configuring it fo... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306425",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: updating primary key of master and child tables for large tables I have a fairly huge database with a master table with a single column GUID (custom GUID like algorithm) as primary key and 8 child tables that have foreign key relationships with this GUID column. All the tables have approximately 3-8 million records.... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306433",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: debugging postgresql trigger I have this Trigger in Postgresql that I can't just get to work (does nothing). For understanding, there's how I defined it:
CREATE TABLE documents (
...
modification_time timestamp with time zone DEFAULT now()
);
CREATE FUNCTION documents_update_mod_time() RETURNS trigger
AS $$... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306439",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "45"
} |
Q: Fluid CSS layout and Borders In designing a fluid layout, how do you use borders without ruining the layout.
More specifically, I have a HTML widget which consists of five divs. I would like the five divs to take up all the room in the containing element. I would also like to have a 1px border around each.
I tried... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306443",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "13"
} |
Q: How to implement "Last 20 something" property in your domain class? Let's say I need to implement domain model for StackOverflow.
If I am doing ORM, how can I define (and map) property for fetching "last comments" and other "last" things?
It looks to me like this should be reflected in the domain model.
Sometimes I... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306452",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Quantum Computing - Hype Or Hyper? I have recently been web-researching quantum computing.
Will we see these in our lifetimes (ever?) (The error correction issue, for example, seems intractable to me).
A: Just looking at the results from one website, I'd say it's not that impossible:
http://arstechnica.com/journal... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306453",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How can I get a list of the running applications with GTK? How can I get a list of the running applications? I'm referring to the ones in the panel at the bottom of the screen.
A: I believe what you are looking for is libwnck
A: The panel you are referring to is the GNOME panel. So this is a GNOME question, not a ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306456",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Any clever way to fix 'string or binary data would be truncated' warning with LINQ Is there a clever way to determine which field is causing 'string or binary data would be truncated' with LINQ.
I've always ended up doing it manually by stepping through a debugger, but with a batch using 'SubmitChanges' I have to ch... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306459",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "11"
} |
Q: C#, Lotus Interop: Getting Message Information I'm using Interop.Domino.dll to retrieve E-mails from a Lotus "Database" (Term used loosely). I'm having some difficulty in retrieving certain fields and wonder how to do this properly. I've been using NotesDocument.GetFirstItem to retrieve Subject, From and Body.
My i... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306462",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: SQL Server Performance: derived table vs. common table expression (CTE) Is there any performance gain using a CTE over a derived table?
A: I've used CTEs a lot and it does actually appear to run faster in some scenarios. The server was fairly well loaded, the variation in times on runs was pretty significant, and ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306463",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "8"
} |
Q: MySQL - Skip Duplicate WordPress Entries I'm writing a script to display the 10 most recently "active" WordPress blog posts (i.e. those with the most recent comments). Problem is, the list has a lot of duplicates. I'd like to weed out the duplicates. Is there an easy way to do this by changing the MySQL query (like ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306466",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: SharePoint column default values - add 10 working days In SharePoint MOSS 2007, I have created a custom content type that I will be applying to a document library. One of the required fields is "Incoming Date" and another is the "Due Date".
The Due Date is always 10 working days from the Incoming Date. The Incom... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306475",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: MFC CSocket in a static library I am using the MFC class CSocket. Nothing complicated - open a connection to a server and send a short message. The code works fine when I link with MFC in a DLL. However, the call to CSocket::Create() crashes when I link to MFC in a static library.
I would like to use MFC in a sta... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306477",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Looping over directories in Windows XP command prompt I have the following command which will loop over all the subdirectories in a specific location and output the full path:
for /d %i in ("E:\Test\*") do echo %i
Will give me:
E:\Test\One
E:\Test\Two
But how do I get both the full path, and just the directory nam... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306482",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Finding the File Version of a COM DLL using ASP.NET I have a software diagnostic page on which I would like to list the File Version information of a couple of COM DLLs. The page is running under the normal, restricted ASP.Net account (NETWORK SERVICE).
Given the ProgIDs of a COM library, what's the best way to go a... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306488",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Lotus Notes, ID files, and how things are changing in new versions (8 and up) For those who are not aware, Lotus Notes is a cool system, which has very powerful database replication abilities, and very strong certificate management and signing.
However that strong certificate usage is itself one of Notes's downfalls... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306489",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: How can I add page numbers to the bottom of each page in a report using ActiveReports3? I'm trying to understand how you are supposed to add page numbers to the bottom of each page using ActiveReports3.
E.g.
Page 1 of 10.
Thanks,
Mo
A: Use the ReportInfo object with the following FormatString
Page {PageNumber} of... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306493",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: What should every PHP programmer know? I would like to be a PHP/MySQL programmer
What are the technologies that I must know?
Like:
*
*Frameworks
*IDEs
*Template Engines
*Ajax and CSS Frameworks
Please tell me the minimum requirements that I must know, and tell me your favourite things in the previous list?
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306497",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "24"
} |
Q: Good way to maintain ASP.NET Panel states? I'm creating a multi-part web form in ASP.NET that uses Panels for the different steps, making only the Panel for the current step visible. On Step 1, I have a drop-down list that uses a Javascript function to reconfigure some of the fields in the same Panel via "onchange"... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306504",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: What indexes should be added for a polymorphic association in Ruby on Rails? I have a polymorphic association in a Ruby on Rails model. In the migration, I have:
create_table "offer_defs" do |t|
t.integer "product_def_id"
t.string "product_def_type"
...
end
I would like to add an index for this association.... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306517",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: How would I pass additional parameters to MatchEvaluator I have a bit of code that looks like this:
text = reg.Replace(text, new MatchEvaluator(MatchEvalStuff));
I need to pass in a 2nd parameter like this:
text = reg.Replace(text, new MatchEvaluator(MatchEvalStuff, otherData));
Is this possible, and what would be... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306527",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "28"
} |
Q: What would be the right way to declare an array within a script that will be called by cron? I have written a KornShell (ksh) script that sets an array the following way:
set -A fruits Apple Orange Banana Strawberry
but when I am trying to run it from within cron, it raises the following error:
Your "cron" job on m... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306531",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How do I get a list of files in a directory in C++? How do you get a list of files within a directory so each can be processed?
A: Here's what I use:
/* Returns a list of files in a directory (except the ones that begin with a dot) */
void GetFilesInDirectory(std::vector<string> &out, const string &directory)
{
#i... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306533",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "47"
} |
Q: Selecting the Correct View for an Object Type I've had this problem many times before, and I've never had a solution I felt good about.
Let's say I have a Transaction base class and two derived classes AdjustmentTransaction and IssueTransaction.
I have a list of transactions in the UI, and each transaction is of th... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306541",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: scale fonts together with controls With WinForms, I can use Control.Scale to scale a control larger. When I do that, all child controls are repositioned and scaled correctly, but font size remains the same.
Is there an easy way to force font to scale up/down, or is the only way to manually update font for all contr... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306545",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: MS SQL 2000 - Parameters in DTSRUN using xp_cmdshell I am running the following:
master..xp_cmdshell 'dtsrun /S ricmssql02 /U admindw /P letmein /N "scott - debug"'
but also send parameters. I am seeing the following to do that:
/A global_parameter_name:typeid=value
And also that the whole thing can be repeated to ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306547",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: What is the best way open/edit a data Stream if all I have is a MIME type I am in a Windows Desktop application and I have a data stream and a mime type in the database. Is there a better way than writing it to a temp folder and launching the default editor for it?
If I have to use the temp folder how can I get the ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306551",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Passing boost::any to results of boost::bind I'm trying to figure out how to write this function:
template <typename Bound>
Bound::result_type callFromAnyList(Bound b, list<any> p)
{
}
Then, if I had some function:
double myFunc(string s, int i)
{
return -3.0;
}
I could call it by doing something like this:
li... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306559",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: What's required for Windows to update the "file modified" timestamp? Obviously it gets updated during a write operation, but are there any non-destructive operations that also force an update? Basically looking to be able to do the equivalent of the *nix touch command, but in C# programmatically.
A: System.IO.File... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306562",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: App.config - custom section not working I recently started building a console version of a web application. I copied my custom sections from my web.config. to my app.config. When I go to get config information i get this error:
An error occurred creating the configuration section handler for x/y: Could not load type... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306572",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: multiple subpackages for phpdoc Is it possible to have a file belong to multiple subpackages? For example:
/**
* Name
*
* Desc
*
* @package Core
* @subpackage Sub1
* @subpackage Sub2
*/
Thanks!
A: It appears that PHPDoc does not allow you to do it for namespacing reasons. From the PHPDoc Docs:
NOTE: ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306573",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Custom DateTime XML Serialization I would like to be able to Serialize a DateTime with a specific Time Zone that is not the server, nor is it client time. Basically, any time zone.
Is it possible to override the DateTime serialization, in .Net2.0 webservices?
I compile an xmlschema using xsd.exe, so I made an attemp... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306579",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: How to get the children of the $(this) selector? I have a layout similar to this:
<div id="..."><img src="..."></div>
and would like to use a jQuery selector to select the child img inside the div on click.
To get the div, I've got this selector:
$(this)
How can I get the child img using a selector?
A: Here's a f... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306583",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2386"
} |
Q: VB.NET and ASP.NET DLL line numbers don't appear in production error logs I can see line numbers in my error logs in our development environment, in which VB.NET 2005 and ASP.NET components are compiled in debug mode, with PDB files copied to the server on deployment.
I don't see line numbers in production, where th... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306589",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: How to send cookies with file_get_contents I'm trying to get the contents from another file with file_get_contents (don't ask why).
I have two files: test1.php and test2.php. test1.php returns a string, bases on the user that is logged in.
test2.php tries to get the contents of test1.php and is being executed by the... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306591",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "18"
} |
Q: How important is backwards-compatibility? When you are considering an upgrade in a development tool, how important is backwards-compatibility to you? Would you still purchase Visual Studio 2010 if it required significant changes to your source code? Where is the tipping point for you in terms of trading backwards ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306594",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: End of Stream encountered before parsing was completed? I am trying to deserialize a stream but I always get this error "End of Stream encountered before parsing was completed"?
Here is the code:
//Some code here
BinaryFormatter b = new BinaryFormatter();
return (myObject)b.Deserialize(s);//s... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306596",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "47"
} |
Q: In C# is there any significant performance difference for using UInt32 vs Int32 I am porting an existing application to C# and want to improve performance wherever possible. Many existing loop counters and array references are defined as System.UInt32, instead of the Int32 I would have used.
Is there any significan... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306602",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "17"
} |
Q: Convert Speex files to MP3, programatically? Is is there some sort of library that would allow me to convert a speex file to an mp3 file? If it were do-able from php that would be even better, but really anything would probably work.
A: If you have gstreamer available on your platform, it can do it for you provided... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306622",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How to decide test cases for unit tests? I'm just getting into unit testing, and have written some short tests to check if function called isPrime() works correctly.
I've got a test that checks that the function works, and have some test data in the form of some numbers and the expected return value.
How many should... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306625",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "11"
} |
Q: Scrolling with Multiple ListViews for Android I'm completely stumped on this one. I have three different lists that need to be displayed on the screen. It's completely possible that the lists will extend past the bottom edge of the screen, so I would need scrolling.
I've tried using a ScrollView with a LinearLayout... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306626",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "35"
} |
Q: Representing parent-child relationships in SharePoint lists I need to create some functionality in our SharePoint app that populates a list or lists with some simple hierarchical data. Each parent record will represent a "submission" and each child record will be a "submission item." There's a 1-to-n relationship ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306639",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "12"
} |
Q: Recommendations on how to implement a validation class? I am implementing a validation class in classic ASP. How should the validation class interface with my other classes?
My current setup:
The User class's set methods call the appropriate validation method in the validation class. Any errors that occur are store... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306641",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How do I query raw data from a Proficy Historian? How can I retrieve raw time-series data from a Proficy Historian/iHistorian?
Ideally, I would ask for data for a particular tag between two dates.
A: A coworker of mine put this together:
In web.config:
<add name="HistorianConnectionString"
providerName="ihOLE... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306642",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "13"
} |
Q: Writing queries in code behind vs. SqlDataSource I always have this notion that writing SQL queries in the code behind is not good compared to writing it using a SqlDataSource
SqlDataAdapter ad = new SqlDataAdapter("SELECT * FROM Categories", myConnection);
DataSet ds = new DataSet();
ad.Fill(ds, "Categories");
m... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306644",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: ASP.NET Application to authenticate to Active Directory or SQL via Windows Authentication or Forms Authentication I am in the process of writing an application that will need multiple forms of authentication.
The application will need to support authentication to Active Directory, but be able to fail back to a SQL M... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306652",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "14"
} |
Q: Are Parameters really enough to prevent Sql injections? I've been preaching both to my colleagues and here on SO about the goodness of using parameters in SQL queries, especially in .NET applications. I've even gone so far as to promise them as giving immunity against SQL injection attacks.
But I'm starting to wonde... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306668",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "87"
} |
Q: module to create python object representation from xml I'm searching for an easy to handle python native module to create python object representation from xml.
I found several modules via google (one of them is XMLObject) but didn't want to try out all of them.
What do you think is the best way to do such things?
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306671",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "8"
} |
Q: asp.net help resource location I have a relatively simple site that I'm working up for an intranet environment. The pages have a hook to display a simple bit of text (possibly with a bit of HTML for markup purposes) for help when the user clicks a link on the page. I'm debating whether to put the help snippets in th... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306672",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Is there something like ? If I send this request to a page:
http://www.server.com/show.xml?color=red&number=two
Can I do something like this?:
I like the color <xsl:url-param name="color" /> and the number <xsl:url-param name="number" />.
If you need clarification of the question, lemme know
Thanks for any answer... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306678",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: WPF richTextBox question If a line of text is wrapped to an additional line, how do I determine programmatically the point in the string where it was broken.
Example: Input string = "This is a test of a wrapped line of text".
Based on the width of the richTextBox it could display:
This is a test ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306679",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: MSMQ throws away messages if the destination queue does not exist? I've encountered a weird situation:
Messages are sent from ServerA to ServerB. It goes into ServerA outgoing queue and then sent to ServerB's queue.
ServerB crashed. We had to reformat. When we brought it up, we forgot to install the MSMQ Service.
Me... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306684",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: css overflow in a:hover tag I have an image(a map) with some points of interest placed using position: absolute and the coordinates of each poi. I want it to expand the info of each POI on mouseover using:
.poi a {
width: 32px;
height: 32px;
overflow: hidden
}
.poi a:hover {
width: 128px;
height... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306697",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Is there a way to create a private key using CryptoAPI and seed it? We have a need to create a private key that is seeded from 2 plaintext keys. The 2 plaintext keys are maintained by different managers. This is to satisfy a dual-control key requirements that we have. We can combine the two keys into a single seed. ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306703",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: How does disabling a core affect running processes? I have this application installed on my Macbook Pro that allows me to disable a core on my CPU. It got me wondering: How does disabling a core affect the running processes?
I am also interested if disabling a core has an affect on the following
*
*Battery Life
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306705",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "10"
} |
Q: SVN checkout with SVN protocol I've been using SVN a lot as a single user on a single computer
Now I'd like to share my stuff across multiple computers
So far I've been checking out from file://c:/myproject
I'd like to checkout from svn://mycomputer/myproject
How can I map the first into the second?
A: The reposito... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306709",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "9"
} |
Q: Collections.emptyList() returns a List? I'm having some trouble navigating Java's rule for inferring generic type parameters. Consider the following class, which has an optional list parameter:
import java.util.Collections;
import java.util.List;
public class Person {
private String name;
private List<String> n... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306713",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "283"
} |
Q: Why does MyEclipse's Hibernate Reverse-engineering creates multiple classes when mapping certain tables? I have a table in my MYSQL database which does not have a primary key, but has a unique key on two columns. When using MyEclipse's Hibernate reverse engineer tool to create a mapping for that table, it generates... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306722",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: How to check if a variable exists in a FreeMarker template? I have a Freemarker template which contains a bunch of placeholders for which values are supplied when the template is processed. I want to conditionally include part of the template if the userName variable is supplied, something like:
[#if_exists userName... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306732",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "201"
} |
Q: How to detect duplicate rows in a SQL Server table? What is the most efficient way to detect duplicates in a 10 column / 50K row table? I'm using MSSQL 8.0
A: Try this
Select * From Table
Group By [List all fields in the Table here]
Having Count(*) > 1
A: To show an example of what others have been describing:
SE... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306743",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "43"
} |
Q: Frogger for iPhone Most of my programming experience has either been using forms (Windows Forms, or ASP.NET) or small embedded projects interfacing hardware. Recently I began going through some tutorials for iPhone development. I'm interested in learning Objective-C and the iPhone sdk.
I wanted to make a small frog... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306755",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: .NET Framework: Are objects apartment bound? Given: Constructing an ADO Connection object from one thread and giving it to another thread is forbidden. The two threads are different apartments, and even though the first thread will never touch it again (not even maintain a reference to it!), it doesn't matter.
Tha... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306757",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: Redialing a PPPOE connection programmatically I have a PPPOE connection on a computer. That computer has two LAN cards and I activated ICS on it. The problem is, the connection kinda degrades over time (don't know why), and a redial would be nice, hourly maybe. I was thinking of writing an AutoIT script that would d... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306779",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: SQL date comparison How do I check if the timestamp date of a record is before midnight today?
datediff is driving me nuts...
A: Try:
WHERE dtColumn < DATEADD(dd, 0, DATEDIFF(dd, 0, GETDATE()))
A: Here is how to get 0 hour of today in SQL
SELECT (CAST(FLOOR(CAST(GETDATE() as FLOAT)) AS DateTime))
Just compare yo... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306788",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: What is the best way to provide "search as you type"? I'm porting a Forms app to a VB.NET web app, and one of the feature the users really liked was the ability to narrow the possible choices as the user typed in a search box. The search itself goes against multiple tables and columns (and takes several seconds), so... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306795",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Generate word 2003 document I have data in XHTML and plain text in SQL Server 2005. I need to generate a Word 2003 document from this data. I was thinking of using Word XML 2003 to do this. Are there any good tools to generate Word XML 2003?
A: If you want to use XML with Word 2003 you can use a SDK from Microsoft... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306801",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Hibernate: Automatically creating/updating the db tables based on entity classes I have the following entity class (in Groovy):
import javax.persistence.Entity
import javax.persistence.Id
import javax.persistence.GeneratedValue
import javax.persistence.GenerationType
@Entity
public class ServerNode {
@Id
@Gene... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306806",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "106"
} |
Q: With Python, how can I ensure that compression of a folder takes place within a particular folder? I have been able to zip the contents of my folder. But I would like the zipped file to remain in the folder that was just compressed. For example, I've zipped a folder called test in my C: drive. But I would like my "t... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306811",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: How do I create a web application where I do not have access to the data? Premise: The requirements for an upcoming project include the fact that no one except for authorized users have access to certain data. This is usually fine, but this circumstance is not usual. The requirements state that there be no way for e... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306830",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "8"
} |
Q: WPF XAML Global Reference Is there a way to reuse a 3rd party control reference?
For example, I have this referenced in my App.xaml
xmlns:cust="clr-namespace:ThirdParty.Controls;assembly=ThirdParty.Controls"
I don't want to repeat this 3rd party control xml namespace on each page/control that needs a control from t... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306839",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Create a makefile for multiple OSes, this make (ext?) doesn't work? I have a working makefile that builds with mingw32. Now i renamed that makefile to Makefile.w32 (source -> http://pastie.org/319964)
Now i have a Makefile with the following. The problem is, it does not build my source
all:
make mingw32
clean:
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306840",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Building a bulk mail sender I want to build an application that will allow my customers to send marketing information by e-mail. This will be a carefully monitored tool used for legitimate bulk mailing only. It's going to have all of the necessary 'unsubscribe' functionality etc.
The solution will be built using VB.... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306844",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: In C#, how would I capture the SOAP used in a web service call? I have a C# application that is a client to a web service. One of my requirements is to allow capturing the SOAP that I send, so that if there is a problem, I can either fix the bug, or demonstrate that the problem is in the service I am calling.
My We... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306852",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "16"
} |
Q: ToolStripMenuItem not in visible area when selected/highlighted I have a ContextMenuStrip that contains a submenu of dynamically generated ToolStripMenuItems. There are up to 80 sub menu items. Pressing the first letter of a desired menu item selects it correctly, but if the item happens to be out of the visible r... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306859",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Does using final for variables in Java improve garbage collection? Today my colleagues and me have a discussion about the usage of the final keyword in Java to improve the garbage collection.
For example, if you write a method like:
public Double doCalc(final Double value)
{
final Double maxWeight = 1000.0;
fi... | {
"language": "en",
"url": "https://stackoverflow.com/questions/306862",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "90"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.