text stringlengths 8 267k | meta dict |
|---|---|
Q: How to setup blending for additive color overlays? Is it possible in opengl to setup blending to achieve additive color overlays?
Red + green = yellow, cyan + magenta = white, etc.. (see diagram)
A: Simple additive blending is achieved with glBlendFunc (GL_ONE, GL_ONE). You need to be aware of the fact that OpenGL'... | {
"language": "en",
"url": "https://stackoverflow.com/questions/393785",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "14"
} |
Q: Refactor with some dynamic programming? I have a piece of code here that i really could use some help with refactoring. I need the different methods for adding relational data in a form in rails. The code is taken from http://railscasts.com/episodes/75-complex-forms-part-3, my problem is that i need to have the meth... | {
"language": "en",
"url": "https://stackoverflow.com/questions/393786",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: the Nice programming language as an alternative to Java generics I've been reading Bruce Eckel's Thinking In Java and in the chapter on generics, he briefly mentions the Nice programming language as something that handles parametrized types better than Java, but compiles into Java bytecode.
Does anyone have any expe... | {
"language": "en",
"url": "https://stackoverflow.com/questions/393793",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Accessing a webserver from a cocoa application I am writing a cocoa application in which I want to download a file from a webserver. What will be the most convenient method to go about doing this? Should I go in for NSSockets or a NSUrlRequest? Or is there any other easier way to achieve this?
A: If you want to loa... | {
"language": "en",
"url": "https://stackoverflow.com/questions/393803",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Opening another popup window from jqModal I am making a popup window using jqModal, and I have one main popup window. After clicking OK, I have to close that window and open another popup window. How do I achieve this?
Here my problem is that the click event is not working. While I am pressing a button {#b}, more th... | {
"language": "en",
"url": "https://stackoverflow.com/questions/393813",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Sql cache dependency using EntLib caching block how to implement sql cache dependency using Enterprise library application block?
A: David Hayden has a article/blog post on his site for how to do this:
http://davidhayden.com/blog/dave/archive/2006/04/30/2930.aspx
| {
"language": "en",
"url": "https://stackoverflow.com/questions/393816",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Using git with SSH and (sometimes) corkscrew I need to use git over SSH (it's a self-imposed limitation, but one I am loathe to break). If my laptop is sitting on my home network, it all works great. When I'm at work or logged in via VPN, however, I would need to use corkscrew to access my remote repository, which... | {
"language": "en",
"url": "https://stackoverflow.com/questions/393824",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Is there a size limit on a text file? Duplicate of: Is there an upper limit on .txt file size?
What is the limit to how much you can write to a text file? Any help would be appreciated.
A: There is no limit, other than the size of your disk, and your file system limitations on a file.
For example, file size limi... | {
"language": "en",
"url": "https://stackoverflow.com/questions/393833",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "16"
} |
Q: Locating the node by value containing whitespaces using XPath I need to locate the node within an xml file by its value using XPath.
The problem araises when the node to find contains value with whitespaces inside.
F.e.:
<Root>
<Child>value</Child>
<Child>value with spaces</Child>
</Root>
I can not construct th... | {
"language": "en",
"url": "https://stackoverflow.com/questions/393840",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "12"
} |
Q: Python and regular expression with Unicode I need to delete some Unicode symbols from the string 'بِسْمِ اللَّهِ الرَّحْمَٰنِ الرَّحِيمِ'
I know they exist here for sure. I tried:
re.sub('([\u064B-\u0652\u06D4\u0670\u0674\u06D5-\u06ED]+)', '', 'بِسْمِ اللَّهِ الرَّحْمَٰنِ الرَّحِيمِ')
but it doesn't work. String st... | {
"language": "en",
"url": "https://stackoverflow.com/questions/393843",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "91"
} |
Q: What is a good Linux exit error code strategy? I have several independent executable Perl, PHP CLI scripts and C++ programs for which I need to develop an exit error code strategy. These programs are called by other programs using a wrapper class I created to use exec() in PHP. So, I will be able to get an error c... | {
"language": "en",
"url": "https://stackoverflow.com/questions/393845",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: Regular Expression to Detect a Specific Query I wonder if you anyone can construct a regular expression that can detect if a person searches for something like "site:cnn.com" or "site:www.globe.com.ph/". I've been having the most difficult time figuring it out. Thanks a lot in advance!
Edit: Sorry forgot to mentio... | {
"language": "en",
"url": "https://stackoverflow.com/questions/393852",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Java: Trouble with Generics & Collection type detection I have a class called DataSet with various constructors, each specifying a different type of variable. It might look a bit like this:
public class DataSet
{
private HashSet Data;
public DataSet( DataObject obj )
{
Data = new <DataObject>H... | {
"language": "en",
"url": "https://stackoverflow.com/questions/393853",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: OSX - always hide certain files I know how to show and hide hidden files in the Terminal - but is there a way to hide certain files like .DS_STORE when showing hidden files? Make certain files super-hidden, so to speak?
A: Use chflags with the hidden option
ie: chflags hidden fileToHide to hide the file from the Fi... | {
"language": "en",
"url": "https://stackoverflow.com/questions/393868",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Scripting inside a Python application
I'd like to include Python scripting in one of my applications, that is written in Python itself.
My application must be able to call external Python functions (written by the user) as callbacks. There must be some control on code execution; for example, if the user provided c... | {
"language": "en",
"url": "https://stackoverflow.com/questions/393871",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: NSString instance reports its class as NSCFString My objective here is really simple -- I'm trying to set an NSString to some test data, then return the class, which should be NSString. Here's my code:
NSString* stringer = [NSString stringWithFormat: @"Test"];
NSLog(@"%@", [stringer class]);
The log says that the c... | {
"language": "en",
"url": "https://stackoverflow.com/questions/393873",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "20"
} |
Q: P/Invoking CreateToolhelp32Snapshot failing in Compact Framework Hey, im doing a little app for my smart phone, using Windows Mobile 6. I'm trying to get all currently running processec, but method CreateToolhelp32Snapshot always returns -1. So now im stuck. I tried to get error with invoking GetLastError() method, ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/393881",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Cross-browser techniques for disabling password caching Saving and auto-filing of username/password is a feature of most modern browsers. And the user can generally choose to disable this feature on a per domain basis. But is there a standard way for the site itself to prevent password caching?
The emphasis here is ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/393882",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "12"
} |
Q: Neatest / Fastest Algorithm for Smallest Positive Number Simple question - In c++, what's the neatest way of getting which of two numbers (u0 and u1) is the smallest positive number? (that's still efficient)
Every way I try it involves big if statements or complicated conditional statements.
Thanks,
Dan
Here's a sim... | {
"language": "en",
"url": "https://stackoverflow.com/questions/393885",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: serialize an object with its attribute to xml Exact Duplicate of: Is there a way to do object (with its attributes) serializing to xml?
Quite Ironically, it's a duplicate of the poster's previous question.
I want create an object, it contains some Validate application block attributes like:
[Serializable]
publ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/393886",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Casting error in ASP.NET I have a class declared in the App_Code folder. The class contains a public shared method that returns a type Portfolio.
When I try to call this method to initialize an object of type Portfolio in one of the ASCX controls, i get a "Value of type Jaguar.Portfolio cannot be converted to Jagua... | {
"language": "en",
"url": "https://stackoverflow.com/questions/393888",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Return link not supported by Internet Explorer 7 using jQuery I am using jQuery and Ajax, and my Ajax.php file returns the following field into the main file. While I am clicking in Mozilla and Chrome, it is working fine and gives an alert, but when I use Internet Explorer 7 (version 7.0.5730.13), it wasn't supporte... | {
"language": "en",
"url": "https://stackoverflow.com/questions/393895",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: When should I explicitly specify a StructLayout? I'm fiddling with calling DLLs from C#, and came across the need to define my own structs. Lots of articles force a sequential layout for the struct with
[StructLayout(LayoutKind.Sequential)]
struct Foo ...
So, I followed suite, and my programme worked. Now, when I t... | {
"language": "en",
"url": "https://stackoverflow.com/questions/393943",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: Object persistence strategy for desktop application I am developing a Java based desktop application. There are some data generated from the application object model that I need to persist (preferably to a file). There is also a requirement to protect the persisted file so that others can't derive the object model d... | {
"language": "en",
"url": "https://stackoverflow.com/questions/393948",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: BlackBerry - Add items to a ListField Can someone please give me a simple example on how to add three rows to a ListField so that the list shows something like this?
Item 1
Item 2
Item 3
I just want to show a list in which the user can select one of the items and the program would do something depending on the item ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/393950",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: How to convert an OpenCV IplImage to an SDL_Surface? I'm trying to write a program which takes an SDL_Surface, converts it to an IplImage, uses the cvBlobsLib to find blobs, paints the blobs as spots back over the image, then converts the output IplImage back to an SDL_Surface.
I'm almost done: only converting the I... | {
"language": "en",
"url": "https://stackoverflow.com/questions/393954",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: Java: Is there an easy, quick way to AND, OR, or XOR together sets? That is, if I had two or more sets, and I wanted to return a new set containing either:
*
*All of the elements each set has in common (AND).
*All of the elements total of each set (OR).
*All of the elements unique to each set. (XOR).
Is there... | {
"language": "en",
"url": "https://stackoverflow.com/questions/393968",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "20"
} |
Q: Restricting symbols in a Linux static library I'm looking for ways to restrict the number of C symbols exported to a Linux static library (archive). I'd like to limit these to only those symbols that are part of the official API for the library. I already use 'static' to declare most functions as static, but this ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/393980",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "32"
} |
Q: Does DDE still matter? Which are the alternatives? I'm working on a stock exchange information platform and we are thinking in provide a link between our platform and home-made Excel files. The financial market is still bound to the old DDE server approach, now does it still matter today?
Which are the alternatives ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/393996",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "10"
} |
Q: Windows application How the variables can be transferred between the Winforms? Example customer id
Thanks
A: The most important thing to note here is that a Form is nothing more than a C# class. If you think about a Form in these terms, the answer will probably jump out, by itself.
Essentially, there are two optio... | {
"language": "en",
"url": "https://stackoverflow.com/questions/394005",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How accurate is System.Diagnostics.Stopwatch? How accurate is System.Diagnostics.Stopwatch? I am trying to do some metrics for different code paths and I need it to be exact. Should I be using stopwatch or is there another solution that is more accurate.
I have been told that sometimes stopwatch gives incorrect inf... | {
"language": "en",
"url": "https://stackoverflow.com/questions/394020",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "31"
} |
Q: Simple Mapper Pattern C# Code Generation Template Can anybody recommend a decent C# Mapper Pattern code generation template that plays nicely with SQL stored procedures? I'm looking for something that generates POCO style entity objects, with a static mapper class for transferring data to/from the database through ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/394033",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How to execute a .bat file from a C# windows form app? What I need to do is have a C# 2005 GUI app call a .bat and several VBScript files at user's request. This is just a stop-gap solution until the end of the holidays and I can write it all in C#. I can get the VBScript files to execute with no problem but I am un... | {
"language": "en",
"url": "https://stackoverflow.com/questions/394036",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "12"
} |
Q: MySQL: How to search multiple tables for a string existing in any column How can I search for in table_a table_b table_c, which have a random number of columns for a string?
I know this is not proper sql but it would be something like:
SELECT * FROM users, accounts, something_else WHERE ->ANY COLUMN CONTAINS 'this_s... | {
"language": "en",
"url": "https://stackoverflow.com/questions/394041",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "11"
} |
Q: WCF RequestChannel; What Really Happens? What really happens when a person calls the Open method of IRequestChannel? For example, if I have the following code:
ChannelFactory<IRequestChannel> factory = new ChannelFactory<IRequestChannel>();
// using a netTcpBinding to a net.tcp://localhost:9999/Bar
IRequestChannel ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/394051",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Creating An Insert Statement -- Windows application Vb.Net I am doing windows appliction in vb.net. i have customer object contains save method. how do i generate insert query?
I need to save the object in relational database (SQL server). I need to know which is the correct way of doing the insertion ie,. Inside th... | {
"language": "en",
"url": "https://stackoverflow.com/questions/394053",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Critical section - to be or not to be? I`m writing a chat using WinSock2 and WinAPI functions. And I have a little trouble.
I store the std::vector of client connections on server. When new client connects, new thread starts and all work with the client is done in this new thread. I do not use classes (I know it is ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/394061",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Attach variables I want to take two variables (in and in2) and put them together, for example:
in = 1;
in2 = 3;
pin = in.in2; // I want this to set pin to 13
The arduino IDE tells me that in is not a class, so what syntax would I use to accomplish this?
EDIT: I figured out a different way to do it, you can just ta... | {
"language": "en",
"url": "https://stackoverflow.com/questions/394063",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Credibility of benchmarking within virtual machines? How credible are the benchmarks carried out within a virtual machine, as opposed to real hardware?
Let's dissect a specific situation. Assume we want to benchmark the performance impact of a recent code change. Assume for simplicity that the workload is fully CPU ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/394064",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Problem with print out to text file I am completely stumped. I have a program that pulls information stored in a database, assigns the database values to a corresponding class. The class has a print method that prints the values of it's fields. The users type in either an order id or order date range and then it fin... | {
"language": "en",
"url": "https://stackoverflow.com/questions/394071",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: C++ function that returns system date I need function in c++ that allows me to retrieve and store the system date. I have a class for storing dates.
A: Dealing with dates and time is difficult, thats why people use libraries. I prefer boost::date_time.
boost::posix_time::ptime local_time = boost::posix_time::second... | {
"language": "en",
"url": "https://stackoverflow.com/questions/394081",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Ensuring MySQL connection works in PHP function I have code with the following form:
<?php
function doSomething{
//Do stuff with MySQL
$con->tralalala();
}
$con = connectToDatabase;//This would actually be a line or two.
doSomething();
?>
This (type of) code doesn't work, because doSomething() doesn't have a co... | {
"language": "en",
"url": "https://stackoverflow.com/questions/394113",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: TClientDataset: 'Fieldtype not supported for XML.' I've got a bunch of data loaded into a TClientDataset, representing an array of complex objects. But when I try to run
Dataset.SaveToFile('c:\test.xml', dfXMLUTF8);
it doesn't like it:
Project testing.exe raised exception class EDBClient with message 'Fieldtype no... | {
"language": "en",
"url": "https://stackoverflow.com/questions/394122",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Cloning and subtracting sets - does this work? private HashMap<DataObject, HashSet> AllDataObjects;
...
/** Returns all DataObject elements that are NOT in the specified set. */
private DataObject[] invert( HashSet<DataObject> set )
{
HashSet<DataObject> keys = (HashSet) AllDataObjects.keySet();
keys = (Ha... | {
"language": "en",
"url": "https://stackoverflow.com/questions/394127",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Beginner C Programmer needs help with pointers ( I think ) I'm a beginner programmer and I'm learning my first language, C.
I'm learning mostly from Deitel and Deitel's C How to Program book, but also using example tasks and things from the university, however I am stuck on one.
I have a very very basic understandi... | {
"language": "en",
"url": "https://stackoverflow.com/questions/394133",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: What does 'Monkey Patching' exactly Mean in Ruby? According to Wikipedia, a monkey patch is:
a way to extend or modify the runtime
code of dynamic languages [...]
without altering the original source
code.
The following statement from the same entry confused me:
In Ruby, the term monkey patch was
misunder... | {
"language": "en",
"url": "https://stackoverflow.com/questions/394144",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "71"
} |
Q: Displaying polymorphic classes I have an existing app with a command-line interface that I'm adding a GUI to. One situation that often comes up is that I have a list of objects that inherit from one class, and need to be displayed in a list, but each subclass has a slightly different way of being displayed.
Not wan... | {
"language": "en",
"url": "https://stackoverflow.com/questions/394146",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Getting the Request Variables from an ASP.NET page I wrote the following function that works about 95% of the time, but I need it to work 100% (obviously):
Public Shared Function getPassedVars() As String
Const keyCount As Integer = 54 ' 54 seems to be the number of parameter keys passed by default (for this ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/394153",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "8"
} |
Q: Fastest way to determine whether a string contains a real or integer value I'm trying to write a function that is able to determine whether a string contains a real or an integer value.
This is the simplest solution I could think of:
int containsStringAnInt(char* strg){
for (int i =0; i < strlen(strg); i++) {if (s... | {
"language": "en",
"url": "https://stackoverflow.com/questions/394162",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How best to sum up lots of floating point numbers? Imagine you have a large array of floating point numbers, of all kinds of sizes. What is the most correct way to calculate the sum, with the least error? For example, when the array looks like this:
[1.0, 1e-10, 1e-10, ... 1e-10.0]
and you add up from left to right... | {
"language": "en",
"url": "https://stackoverflow.com/questions/394174",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "39"
} |
Q: Searching for a Kohana Beginner's Tutorial for PHP I am going to try to build a PHP website using a framework for the first time, and after some research here and there, I've decided to try to use Kohana
I downloaded the source from their website, and ran the downloaded stuff on my web server, and was then greeted w... | {
"language": "en",
"url": "https://stackoverflow.com/questions/394175",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "44"
} |
Q: Crystal Reports 11 deployment with Visual Studio 2008 I am using Visual Studio 2008 to create a web based report viewing page. Its working fine locally, but when i deploy it to client's web server it does not run and it gives error that crystal reports 10.5 components are missing. Client told me that server have cr... | {
"language": "en",
"url": "https://stackoverflow.com/questions/394176",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: How to query SQL Server table based on a specific date I have a table in SQL Server 2005 which has three columns:
id (int),
message (text),
timestamp (datetime)
There is an index on timestamp and id.
I am interested in doing a query which retrieves all messages for a given date, say '12/20/2008'. However I know ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/394184",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Source for updated rails engines What is the source (url) for Rails Engines that works with rails 2.2.2?
A: I'd get the current source from github and search for "engine".
A: It looks like the Rails Guides did not start until Rails 2.3.8. I could not find guides for anything less than Rails 2.3.8.
http://guides.ru... | {
"language": "en",
"url": "https://stackoverflow.com/questions/394192",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Max files per directory in S3 If I had a million images, would it be better to store them in some folder/sub-folder hierarchy or just dump them all straight into a bucket (without any folders)?
Would dumping all the images into a hierarchy-less bucket slow down LIST operations?
Is there a significant overhead in cre... | {
"language": "en",
"url": "https://stackoverflow.com/questions/394198",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "95"
} |
Q: Determining if a lat-long rect and a circle on a sphere overlap Suppose I have the following:
*
*A region defined by minimum and maximum latitude and longitude (commonly a 'lat-long rect', though it's not actually rectangular except in certain projections).
*A circle, defined by a center lat/long and a radius
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/394201",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "8"
} |
Q: a "forgot user password" standard class or script in php/mysql environment? I am hoping that there is a standard class/php script that we can use for the "forgot password" functionality. It seems almost every website has one, and I'd like to reduce the development time on it.
It appears that a common approach is:
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/394214",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: How do you decide when to upgrade a library in your project? I work on a project that uses multiple open source Java libraries. When upgrades to those libraries come out, we tend to follow a conservative strategy:
*
*if it ain't broke, don't fix it
*if it doesn't have new features we want, ignore it
We follow... | {
"language": "en",
"url": "https://stackoverflow.com/questions/394223",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: Off screen rendering when laptop shuts screen down? I have a lengthy number-crunching process which takes advantage of quite abit of OpenGL off-screen rendering. It all works well but when I leave it to work on its own while I go make a sandwich I would usually find that it crashed while I was away.
I was able to de... | {
"language": "en",
"url": "https://stackoverflow.com/questions/394227",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "11"
} |
Q: How to detect the OS from a Bash script? I would like to keep my .bashrc and .bash_login files in version control so that I can use them between all the computers I use. The problem is I have some OS specific aliases so I was looking for a way to determine if the script is running on Mac OS X, Linux or Cygwin.
What ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/394230",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "754"
} |
Q: Add Checkboxes to VB.NET WPF 3.5 TreeView Is it possible to add checkboxes to the WPF TreeView object? I'd like to have someone be able to check a specific entry for data retrieval at a later time.
Thanks for the help in advance!
JFV
A: Josh Smith has a post in his blog, with a link to a Codeproject article that c... | {
"language": "en",
"url": "https://stackoverflow.com/questions/394241",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Description of what an interface does? With regards to OOP, how would you describe an interface?
What I mean is, sub-classing can be described as "Has-A", and inheritance could be "Is-A". A member method could be "Can-Do".
Is there any way this could be extended (no pun intended) to describe what an interface does?
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/394260",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: API for named scopes I am having great difficulty reading the API for named scopes. Each "bid" has a user_id and an auction_id. I need a scope to return the auctions the user has bid on.
Auction
class Auction < ActiveRecord::Base
has_many :bids
named_scope :current, lambda {
{:conditions => ["schedule... | {
"language": "en",
"url": "https://stackoverflow.com/questions/394273",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Budget NLB policy for 3 tier website needed We have a few 'classic asp' client facing websites feeding off a central asp.net mvc site which acts as a webservice ie we query the MVC controllers directly from the ASP sites with extensive use of jquery ajax. This MVC site in turn queries sql server running on a seperat... | {
"language": "en",
"url": "https://stackoverflow.com/questions/394281",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: ASP.NET Error Handling Question I've been doing some research on how to globally handle errors in my ASP.NET application. I have settled on using the web.config file with the following code:
<customErrors mode="On" defaultRedirect="errorpage.aspx">
</customErrors>
Here is my errorpage.aspx.vb code:
Protected Sub P... | {
"language": "en",
"url": "https://stackoverflow.com/questions/394285",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Getting the row of a NSButtonCell I have a NSTableView that contains a NSButtonCell in one of the columns. I can set up the action that is called when the button is clicked in Interface Builder fine, but I can't find anyway to determine which row in the table that the button exists in. Is there any way to do this?
T... | {
"language": "en",
"url": "https://stackoverflow.com/questions/394287",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: How to disable "ActiveX Control May Be Unsafe" popup In an HTML file on My Computer, I'm trying to use the Scripting.FileSystemObject in a script. How can I disable the popup saying "Any ActiveX control on this page may be unsafe for scripting"?
The "Internet Options" Security pane allows one to set "Initialize and ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/394298",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "10"
} |
Q: Passing superclass as parameter to method expecting sub class I have an object tree that looks something like
Ball
/ \
LegalBall IllegalBall
And I have 2 methods:
class o {
AddBall(LegalBall l)
AddBall(IllegalBall i)
}
in another class I'd like to do the following:
o.AddBall(myBall);
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/394299",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: python introspection not showing functions for Lock When I try to use introspection to look at what methods are available on threading.Lock I don't see what I would expect.
Specifically I don't see acquire, release or locked. Why is this?
Here's what I do see:
>>> dir (threading.Lock)
['__call__', '__class__', '__c... | {
"language": "en",
"url": "https://stackoverflow.com/questions/394300",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Home Automation Library I'm a C# developer looking to get into home automation as a hobby. I have done a little research, but was wondering if anyone knows of a good .NET library that supports Insteon hardware. I'd rather use Insteon than X10 due to reliability issues.
My ultimate objective at this point is to hav... | {
"language": "en",
"url": "https://stackoverflow.com/questions/394303",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "17"
} |
Q: Is there a Sourcesafe API to get total lines of code in source control? I want to be able to get the projects I have in Sourcesafe and their total lines of code (perhaps also with total number of classes, etc). Is there an SDK for Sourcesafe (I use 2005 edition) which will allow me to do this?
Or is there a document... | {
"language": "en",
"url": "https://stackoverflow.com/questions/394311",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How do you talk SQL directly to MySQL from Ruby? I want to write a script in Ruby to clean up some messed up keys in several copies of the same MySQL schema. I'd like to do something like SHOW CREATE TABLE, then look at what comes back and delete keys if they exist.
I know in the Rails environment you can do this...... | {
"language": "en",
"url": "https://stackoverflow.com/questions/394316",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: Buffering a media content, while playing the other one in Windows Media Player using C# I am developing an application in C# that has a form with Windows Media Player embedded inside. There are several links to some online content in my app. and I want user to change the content from one to another with a button cli... | {
"language": "en",
"url": "https://stackoverflow.com/questions/394317",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Text specification for a tree of files? I'm looking for examples of specifying files in a tree structure, for example, for specifying the set of files to search in a grep tool. I'd like to be able to include and exclude files and directories by name matches. I'm sure there are examples out there, but I'm having a ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/394321",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Extraordinarily Simple Ruby Question: Where's My Class? [I'm just starting with Ruby, but "no question is ever too newbie," so I trudge onwards...]
Every tutorial and book I see goes from Ruby with the interactive shell to Ruby on Rails. I'm not doing Rails (yet), but I don't want to use the interactive shell. I hav... | {
"language": "en",
"url": "https://stackoverflow.com/questions/394330",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Algorithm for 'Syncing' 2 Arrays Array 1 | Array 2
=================
1 | 2
2 | 3
3 | 4
5 | 5
| 6
What is a good algorithm to 'sync' or combine Array 2 into Array 1? The following needs to happen:
*
*Integers in Array 2 but not in Array 1 should be added to Array 1.
*Int... | {
"language": "en",
"url": "https://stackoverflow.com/questions/394349",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Is it worth learning AMD-specific APIs? I'm currently learning the APIs related to Intel's parallelization libraries such as TBB, MKL and IPP. I was wondering, though, whether it's also worth looking at AMD's part of the puzzle. Or would that just be a waste of time? (I must confess, I have no clue about AMD's libra... | {
"language": "en",
"url": "https://stackoverflow.com/questions/394370",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: Finding when the ActiveApplication changes in OSX through Python Is there a way to find when the activeApplication changes in OSX through Python and AppKit? I know how to find out launchedApplication and activeApplication ( please refer to my other question here: Finding the Current Active Window in Mac OS X using P... | {
"language": "en",
"url": "https://stackoverflow.com/questions/394372",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Facebook Style API Design I am working on designing an api/application structure to mimick facebook's for a project of mine. I am wondering what the best way of going about authenticating users is.
For an app how do I give them the nessecaru credentials and how do I authenticate those credentials?
A: I would i... | {
"language": "en",
"url": "https://stackoverflow.com/questions/394374",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: How to get rows count of internal table in abap? How do I get the row count of an internal table? I guess that I can loop on it. But there must be a saner way.
I don't know if it makes a difference but the code should run on 4.6c version.
A: There is also a built-in function for this task:
variable = lines( itab_na... | {
"language": "en",
"url": "https://stackoverflow.com/questions/394375",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "39"
} |
Q: How to manage a SVN project that is spread across multiple folders? Here is what my svn repository look like:
/
/libraries
/libA
/libB
/libC
/tools
/projects
/proj1
/proj2
/website
I am making changes in libA and proj1. I want to set it up so that I can submit my changes in libA and proj1 together. Th... | {
"language": "en",
"url": "https://stackoverflow.com/questions/394379",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: McAfee deletes code from VBA module I am trying to program an Excel module where it dynamically inserts code in new objects in a form that is created at design time.
I am using this code where "Code" contains a string with the actual code that should go into the DstrFiles object.
Dim DstrFiles As Object
Set DstrFil... | {
"language": "en",
"url": "https://stackoverflow.com/questions/394382",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: In .NET, is there a need to register the DLL? Is it necessary to register a compiled DLL (written in C# .NET) on a target machine.
The target machine will have .NET installed, is it enough to simply drop the DLL onto the target machine?
A: You need to "drop" it into a directory where the application needing it wil... | {
"language": "en",
"url": "https://stackoverflow.com/questions/394388",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "12"
} |
Q: How to present your code to potential buyers? I'll do a demo of my code to slightly non-technical audience, and I need to show them what I've got in my project (about 15K lines of code). I'm trying to convince them that I've spend time on the project and it's in a good state.
These guys planning to invest money into... | {
"language": "en",
"url": "https://stackoverflow.com/questions/394399",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "10"
} |
Q: Best Practice: Animating a view into display onto iPhone If I'm looking to use Core Animation to fade a view in and out of display -- is it good practice to have the UIView in the same NIB as the view that it is being drawn into? Should I build the view in another NIB file and load it in from there? I'm looking to a... | {
"language": "en",
"url": "https://stackoverflow.com/questions/394402",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Bindings using Interface Builder (for iPhone apps) How does one bind an iPhone SDK control (say a UISlider) using Interface Builder?
Unlike regular Cocoa applications, the bindings tab does not seem to be present when the iPhone-app XIB is opened using Interface Builder
A: Declare the control as an IBOutlet in you... | {
"language": "en",
"url": "https://stackoverflow.com/questions/394408",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "10"
} |
Q: Which Factor GUI tutorial/example app? Is there a non-trivial example application written in Factor language, pregerrably for GUI application which could server as a language tutorial?
A: A little late, but theres Factor bindings for Qt in the works. They should be in a usable state reasonably soon.
A: Don't know ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/394430",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "9"
} |
Q: Python: Lock directory access under windows I'd like to be able to lock directory access under windows.
The following code work greatly with file or directory under POSIX system:
def flock(fd, blocking=False, exclusive=False):
if exclusive:
flags = fcntl.LOCK_EX
else:
flags = fcntl.LOCK_SH
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/394439",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: Strange nullreference exception So I have this code that takes care of command acknowledgment from remote computers, sometimes (like once in 14 days or something) the following line throws a null reference exception:
computer.ProcessCommandAcknowledgment( commandType );
What really bugs me is that I check for a nul... | {
"language": "en",
"url": "https://stackoverflow.com/questions/394440",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How to animate a change in css using jQuery Is it possible to animate a change in css using jquery?
If someone would be so kind as to provide me with an example i would be much obliged.
Essentially, i am trying to animate the sprites technique by manipulating the background-image in the css using jQuery. The goal i... | {
"language": "en",
"url": "https://stackoverflow.com/questions/394450",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Python POST data using mod_wsgi This must be a very simple question, but I don't seem to be able to figure out.
I'm using apache + mod_wsgi to host my python application, and I'd like to get the post content submitted in one of the forms -however, neither the environment values, nor sys.stdin contains any of this da... | {
"language": "en",
"url": "https://stackoverflow.com/questions/394465",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "15"
} |
Q: jquery select class inside parent div I'm trying to change the alt of the image, I'm clicking by
selecting the image's class (add_answer)
Note: .add_answer shows up multiple times inside different containing div's
jQuery(function(){ // Add Answer
jQuery(".add_answer").click(function(){
var count = $(... | {
"language": "en",
"url": "https://stackoverflow.com/questions/394470",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "22"
} |
Q: Serial sending weird data So I'm making a sketch that takes a two digit number from the usb port, checks the state of the pin that matches the number, then toggles the pin on/off.
Take a peek at the source
For some reason, when I send 13 through the Arduino serial monitor, I get this message back:
Pin number is g... | {
"language": "en",
"url": "https://stackoverflow.com/questions/394483",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How to convert an 8-bit OpenCV IplImage* to a 32-bit IplImage*? I need to convert an 8-bit IplImage to a 32-bits IplImage. Using documentation from all over the web I've tried the following things:
// general code
img2 = cvCreateImage(cvSize(img->width, img->height), 32, 3);
int height = img->height;
int width ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/394488",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "12"
} |
Q: Passing data to a jQuery UI Dialog I'm developing an ASP.Net MVC site and on it I list some bookings from a database query in a table with an ActionLink to cancel the booking on a specific row with a certain BookingId like this:
My bookings
<table cellspacing="3">
<thead>
<tr style="font-weight: bold;... | {
"language": "en",
"url": "https://stackoverflow.com/questions/394491",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "83"
} |
Q: Why is my ApplicationCache passing back a reference instead of a value? This is an odd thing I've just run into.
I have a web application with a small DataTable stored in the ApplicationCache to reduce the amount of queries to a separate since the data is a lookup table that doesn't change often.
I access this DataT... | {
"language": "en",
"url": "https://stackoverflow.com/questions/394492",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Is there a simple way in Python to create a file which can be written to in one thread and read in a different one? In the python program I'm writing, I've got a thread which iterates over a large structure in memory and writes it incrementally into a file-like object. I've got another thread which takes a file-lik... | {
"language": "en",
"url": "https://stackoverflow.com/questions/394500",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: jQuery .load seems to be running at an unexpected point So I'm trying to load some returned html from an .aspx page but a click event needs to fire before it doing some stuff that the AJAX request depends upon. More specifically, I'm doing this. When a user types in a text field this function is run...
function Ke... | {
"language": "en",
"url": "https://stackoverflow.com/questions/394504",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Mootools request - cannot make the examples work I've downloaded the examples for both the Request and Request.HTML and cannot make either work. I unzipped them to a folder and browsed to their index.html to execute them as is, but the response is always "The request failed." with no clues as to why.
I've played aro... | {
"language": "en",
"url": "https://stackoverflow.com/questions/394514",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Ensuring a Program Written for 32-bit Windows is Compatible with 64-bit Windows While it's my understanding that there's no fundamental reason a program written for 32-bit hardware / OSs not to run on 64-bit hardware / OSs, in practice, I've found many programs intended for 32-bit versions of Windows that will not w... | {
"language": "en",
"url": "https://stackoverflow.com/questions/394521",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "11"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.