text stringlengths 8 267k | meta dict |
|---|---|
Q: NUnit test DateTime without .Net Timespan or DateTime function What is the C# optimised version of the following, without using .Net's Timespan or DateTime. How would I NUnit test it?
TimeSpan ts = Date1 - Date2;
int numberOfDays = ts.Days;
A: You could convert the dates to ticks, substract, then convert the tick... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337327",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Javascript Marquee to replace tags I'm hopeless at Javascript. This is what I have:
<script type="text/javascript">
function beginrefresh(){
//set the id of the target object
var marquee = document.getElementById("marquee_text");
if(marquee.scrollLeft >= marquee.scrollWidth - parseInt(... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337330",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "13"
} |
Q: How would I insert data into an Access table using vb.net? I want to insert a new row into an Access database. I'm looking at doing something like:
oConnection = new Connection("connectionstring")
oTable = oCennection.table("Orders")
oRow = oTable.NewRow
oRow.field("OrderNo")=21
oRow.field("Customer") = "ABC001"
oT... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337333",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: How do I serialize an anonymous object for sending over a SOAP web service? I am trying to send an anonymous object over a web service. Is there anyway I can do this without manually creating a class and casting it to that class? Currently its throwing an exception saying Anonymous object could not be serialized.
//... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337334",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: Oracle table change monitor I have a java application that is connected to a view on a remote Oracle db.
Does anyone know of a way in Java to monitor this table for changes? I.e. if there are inserts of updates etc I would need to react.
A: You can place a INSERT/UPDATE/DELETE trigger on the table to perform some ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337335",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: Pros/cons of document-based databases vs. relational databases I've been trying to see if I can accomplish some requirements with a document based database, in this case CouchDB. Two generic requirements:
*
*CRUD of entities with some fields which have unique index on it
*ecommerce web app like eBay (better... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337344",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "80"
} |
Q: JQuery: Build HTML in 'memory' rather than DOM Is there a way to 'pre-build' a snippet of HTML before adding it to the DOM?
For example:
$mysnippet.append("<h1>hello</h1>");
$mysnippet.append("<h1>world</h1>");
$("destination").append($mysnippet);
where $mysnippet doesnt exist in the DOM. I'd like to dynamically bu... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337352",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "37"
} |
Q: *Not* using navigation properties with Entity Framework? Does anyone know if it's possible to not use the navigation properties feature of the entity framework for tables linked with a foreign key?
for example, if my client table has an AddressId, I want that AddressId in my model, I don't want it to have a .Address... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337353",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: JavaScript: Bitwise shift of long long number I need to bitwise shift a value 64 times in JavaScript. But JavaScript starts rounding after 32.
For example:
for(var j = 0; j < 64; j++)
{
mask = mask << 1;
console.log(mask);
}
This prints value from 0 to 1073741824 but then rounds of and starts printing 0.
A... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337355",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "22"
} |
Q: .NET 2.0: Sending email to a distribution group Good day,
We just converted our web application .NET 1.1 to .NET 2.0. We have a major problem sending emails.
We are using distribution group (eg: WebDeveloppersGroup) to send emails to all the developpers in the company. These groups don't end with '@ something.com'... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337363",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: OLE Excel object manipulation causes run-time error '91' I am maintaining an application that was written in Visual Basic 6.0 and makes use of the several OLE controls with Excel.Sheet.8 class objects. Several users are getting the following error when they reach a point in code that attempts to manipulate the excel... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337364",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Updating Assembly information with MSBuild failing All
i am trying to automatically update the assembly information of a project using AssemblyInfo task, before build however the target appears to do nothing (no failure/error) just no update/creation
Below is the build.proj file I am using (obviously some contents ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337368",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Data Structure Brushup (Java) This should be easy for many of you, but for me it's just another bit of rust needing to be chipped away as I get back into basic Java coding. Using bloody associative arrays for so long in other languages have turned me nice and spoiled. :P
My problem is simple: I'm storing a set of o... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337389",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: What's the easiest way to test PHP in Windows XP Professional? I want to test some PHP on my local machine running Windows XP Professional. I'm familiar with coding PHP for upload, but not with running a web server.
What is the easiest way to set up a test environment? Step-by-step instructions would be great if you... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337405",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Collapsing Related Files in Visual Studio In Visual Studio as most of you will have noticed that related file can be collapsed in to one. E.G.
*
*Form1.cs
*
*Form1.Designer.cs
I'm creating a DAL library and will be splitting partial classes in to several files such as:
*
*SomeTableClass.cs
*
*SomeTab... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337406",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "10"
} |
Q: How to I launch an on-screen keyboard from my application on Mac OSX? I know there is an on-screen keyboard which you can access on Mac OSX, however I need to add a toolbar button to launch it from within my application.
Does anybody know how I can do this?
A: You can launch KeyboardViewerServer.app in whatever way... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337412",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Earley parser generator for Java I'm looking for an Earley parser generator that is able to generate Java output code,
i.e. that generates Java code for the lexer and parser, and allows to include actions
(realised as Java code) that are performed for the grammar rules.
I looked at two Earley parser generators that ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337414",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: What is the best way to ascertain the length (in characters) of the longest element in an array? What is the best way to ascertain the length (in characters) of the longest element in an array?
I need to find the longest element in an array of option values for a select box so that I can set the width dynamically.
... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337419",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: How to UDP Broadcast with C in Linux? How to UDP Broadcast with C in Linux?
A: In many IP stack, such as Linux, this code does not work. Your socket must have broadcast permissions. Try this:
bcast_sock = socket(AF_INET, SOCK_DGRAM, 0);
int broadcastEnable=1;
int ret=setsockopt(bcast_sock, SOL_SOCKET, SO_BROADCAST,... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337422",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "35"
} |
Q: Removing code from Release build in .NET I've been doing some performance testing around the use of System.Diagnostics.Debug, and it seems that all code related to the static class Debug gets completely removed when the Release configuration is built. I was wondering how the compiler knows that. Maybe there is some ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337431",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "15"
} |
Q: How does one declare an array of constant function pointers in C? I need to declare an array of pointers to functions like so:
extern void function1(void);
extern void function2(void);
...
void (*MESSAGE_HANDLERS[])(void) = {
function1,
function2,
...
};
However, I want the the array to be declared as con... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337449",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "25"
} |
Q: How can I create and start a parameterized thread in .NET 1.1? .NET 1.1 lacks ParameterizedThreadStart (I have to use 1.1 because it's the last one supporting NT 4.0)
In .NET 2.0, I would simply write:
Thread clientThread = new Thread(new ParameterizedThreadStart(SomeThreadProc));
clientThread.Start(someThreadParams... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337452",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: COM Registration without Version Identifier Is it possible to register a COM interface independent of assembly version?
Right now I get a registry key like
MyIfaceName, Version=1.0.3259.17799, Culture=neutral, PublicKeyToken=1234567890abcdef
But since the assembly has auto-versioning (1.0.*.*), every day I do a new... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337453",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: If I have an mssql varchar[1024] that is always empty in a table, how much actual bytes will be wasted? If I have an mssql varchar[1024] that is always empty in a table, how much actual bytes will be wasted in the db file on disk per row?
Please let me know the size for both:
*
*NULLs allowed storing ''
*
*NUL... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337454",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Annoying duplication in derived classes In every form we derive from FormBaseControl, we have the following code. I'm sure there is a better way to type the controller object than this, but at the moment we have it included in every page. In the example below, base.Controller is of type BaseController, from which ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337459",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Limit Java Console heap footprint? I have a Java applet (an actual <APPLET>) which generates frequent log messages to System.out. If the Java Console is enabled in the user's browser, it will of course retain references to all of these strings and prevent them from being garbage collected. The problem is the number ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337463",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: WPF: Update a label in a listbox item I have a ListBox where the number of items is added based on and integer property set by a user. The items are created from a ControlTemplate resource that which is comprised of a Label and a TextBox inside of a DockPanel. The label is not data bound but I would like for it to h... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337476",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Make available as download with JavaScript I create a file in JavaScript. Now I want to be able to make it available to the user as a download is this possible?
To be exact it is a KML File I create so its basic XML.
A: no. Not sipmly with JavaScript.
What determines the browser to automatically prompt you for savi... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337478",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How to get a row-by-row MySQL ResultSet in python MySQL ResultSets are by default retrieved completely from the server before any work can be done. In cases of huge result sets this becomes unusable. I would like instead to actually retrieve the rows one by one from the server.
In Java, following the instructions he... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337479",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "49"
} |
Q: Print Dialog in servlet/jsp I want to display print dialog in servlet/jsp. Below is my code:
DocFlavor flavor = DocFlavor.BYTE_ARRAY.AUTOSENSE;
PrintRequestAttributeSet pras = new HashPrintRequestAttributeSet () ;
PrintService printService[] = PrintServiceLookup.lookupPrintServices(flavor, pras);
PrintService defaul... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337482",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Tracking of messages from external program to biztalk and back I have an external program that will generate an xml document out from the db and pass it to BizTalk. Is it possible to create a transaction id or something(the id the message as in the DB) so I can keep track of the message in BizTalk, and store informa... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337487",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Looking for a Postgresql community I need to learn about Postgresql. I'm trying to branch an application framework which is dependent on Oracle to use Postgresql. I can easily find communities of Java and JavaScript programmers via the web. Oracle communities a little more difficult, but between OTN and AskTom, I do... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337499",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: What's the best practice for primary keys in tables? When designing tables, I've developed a habit of having one column that is unique and that I make the primary key. This is achieved in three ways depending on requirements:
*
*Identity integer column that auto increments.
*Unique identifier (GUID)
*A short ch... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337503",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "280"
} |
Q: Changing a flash file I am trying to develop a way to change a flash file displayed on the screen to another file by clicking a button. I have been able to do this with jpg images, but I can't get it to work with flash files. Can anyone help? I would greatly appreciate it.
Below are two html's: the first one changes... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337505",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: How can I upload a file using Catalyst? I am working on an internal web based application for storing and cataloging photos. How should I retrieve, and save these files to the server?
Note: I want to save the files to the file system, not to a database.
Similar to How can I handle HTTP file uploads?
A: Start with y... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337507",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "7"
} |
Q: What tools are available to determine which .NET assemblies have changed since the last build? With a seriously big .NET site/solution (100's of assemblies), are there any tools available to recognise which assemblies have changed since the last build (using something more intelligent than file dates that will alway... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337514",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: Paypal and reseller commission I have a web site that is a customer to customer (C2C) service. Example, a user is looking for a hockey card of Gordie Howe and another customer wants to sell a Gordie Howe hockey card. If they sell the card 100$, I'd like to have 90$ that goes to the seller and 10$ that goes to me for... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337518",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Redirect joomla url's to wordpress I moved an ex-site based on joomla to wordpress. Import worked fine but the problem is that the old links don't work anymore.
Because there is only 50 or so articles, i thought will be a good idea to put a rule for each post (in .htaccess).
Well... Not always things are like you wa... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337519",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: How to delete N files of X type from Y subfolders from a Windows batch file? I'm trying to write a windows batch file that can delete files from subdirectories. I would rather not hard code the directory structure in, so I can use this process with other projects.
*
*I need to delete files of X type,
*I have th... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337522",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "17"
} |
Q: Reading xml file from a resource I am trying to load an xml file that is stored as a resource in my C# project so I can perform various LINQ queries. However at runtime an "Illegal characters in path" exception is thrown. This is how I am loading the file:
XDocument doc = XDocument.Load(MyProject.Properties.Resour... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337535",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: What software tools did Apple use to make the iTunes Store? I've enjoyed using the iTunes Store but I'm curious on what it was developed on (PHP & MySQL, Something Custom?).
A: Joe Nuxoll former apple employee on the java posse pod cast has mentioned that they use web objects.
A: WebObjects. It comes with XCode t... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337541",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Visual Studio IDE layout tips I've never found an "ideal" layout for coding in Visual Studio. I have a three-monitor setup, but it seems that the solution explorer/properties/output/errors/whatever panes are always getting in the way or hogging screen space. It's a bit open-ended, sure, but do you have an "ideal" la... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337551",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Changing flash files on screen by clicking a button I am trying to develop a way to change a flash file displayed on the screen to another file by clicking a button. I have been able to do this with jpg images, but I can't get it to work with flash files. Can anyone help? I would greatly appreciate it.
Below are two... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337569",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Is it worth it to code different functionality for users with javascript disabled? I'm currently building a project and I would like to make use of some simple javascript - I know some people have it disabled to prevent XSS and other things. Should I...
a) Use the simple javascript, those users with it disabled are ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337570",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "21"
} |
Q: How to display reporting services record set in a collection of textboxes I have a recordset that contains only 1 record but I need to display the result (10 fields)
in 2 columns with matching label
the textbox doesn't have a datasetname property.
how can i display 10 fields in 2 columns ?
A: I found it
right clic... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337571",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Is there a Collection that works like a Dictionary without the values? I need a collection that works just like a Dictionary/Hashtable in a sense that it will only contain 1 instance of a given object at any time. A generic class would be preferable, but I'll take what I can get. Does this collection live somewhere ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337574",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "8"
} |
Q: XML attribute ordering of namespaces A related question to one I asked earlier...
Just checking on something: Should the order of the xmlns, xmlns:xsi and xsi:schemaLocation attributes in an XML file matter?
I'm finding that it does - at least when using XML Notepad 2007 to view the XML file. For example (assuming ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337575",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: "Slider" type label as seen on Facebook and AP Mobile News Please pardon my lack of Photoshop skills, but I'm curious what type of strategy Apps like Facebook and AP Mobile News are using for the 'label slider' in their applications. Here's a quick snippet outlining what I'm talking about as I'm sure the name I'm la... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337576",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Where should I do the rowcount when checking for existence: sql or php? In the case when I want to check, if a certain entry in the database exists I have two options.
I can create an sql query using COUNT() and then check, if the result is >0...
...or I can just retrieve the record(s) and then count the number of r... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337581",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Trigger event after GDirections.loadFromWaypoints in Google Maps API I'm attempting to add some text to the directions results the Google Maps API returns to the specified div (directionsPanel). This code below would work fine, except that the jQuery line fires before loadFromWaypoints has finished modifying the DO... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337585",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: How can I get the primary and other groups of the currently logged on user in Perl? According to this site I can simply write
$user = getlogin();
but the group handling functions seem not to be able to accept a username/userid as a parameter. Should I really iterate over all the /etc/group file lines and parse the... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337588",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Overriding and Inheritance in C# Ok, bear with me guys and girls as I'm learning. Here's my question.
I can't figure out why I can't override a method from a parent class. Here's the code from the base class (yes, I pilfered the java code from an OOP book and am trying to rewrite it in C#).
using System;
public c... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337598",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "28"
} |
Q: How to Debug .NET Mobile Device Application using multiple instances of Device Emulator I would like to Debug .NET Mobile Device Application using multiple instances of Device Emulator. If I right click the project and go to Debug -> Start new instance in Visual Studio 2008 when an instance is already running I get... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337600",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Stored Procedures to .sql files Is there a simple process in SQL 2005 for spitting all of my stored procedures out to individual .sql files. I'd like to move them into VSS, but am not too excited by the prospect of clicking on each one to get the source, dumping it into a text file and so on..
A: You can run this... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337601",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "6"
} |
Q: Search using Windows for files ending in jsp I'm trying to search using the windows search one of my web directories for any uses of scriptlets. However, the search seems to be ignoring all files ending in .jsp. I searched for plain words, and that didn't work either. Is there a reason Windows ignores these files wh... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337602",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Optimal map routing with Google Maps Is there a way using the Google Maps API to get back an "optimized" route given a set of waypoints (in other words, a "good-enough" solution to the traveling salesman problem), or does it always return the route with the points in the specified order?
A: It always gives them in ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337607",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "20"
} |
Q: How find the source code for an eval'd function in PHP? I am trying to find a way to get the source code for (user defined) PHP functions in a string.
For normal code this is easy, using reflection I can find the file and line numbers where the function is defined; then I can open the file and read the function sour... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337608",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Matrix Template Library matrix inversion I'm trying to inverse a matrix with version Boost boost_1_37_0 and MTL mtl4-alpha-1-r6418. I can't seem to locate the matrix inversion code. I've googled for examples and they seem to reference lu.h that seems to be missing in the above release(s). Any hints?
@Matt suggested ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337620",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Accessing same name elements for multiple sources I am parsing a document using XSLT. Within the XSLT I am loading a reference document using the document() function, and I can access items from both documents. Both the source document and the reference document have an attribute called name. How do I compare one... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337621",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: How to access each byte in a bitmap image Say I have a bitmap image, is it possible to iterate through all the individual bytes in the image? If yes, how?
A: I found this: http://channel9.msdn.com/forums/TechOff/108813-Bitmap-to-byte-array/
Saying that you could use a Memorystream and the .Save method it'd look li... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337631",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: When does a code base become large and unwieldy? When do you start to consider a code base to be getting too large and unwieldy?
A: -when a significant amount of your coding time is devoted to "where do I put this code?"
-when reasoning about side-effects starts to become really hard.
-when there's a significant a... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337642",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Resetting a Windows Forms form's elements to an initialized state (C#/.NET) I'm building a Windows Forms form in C# with various elements in a panel that starts out either invisible, disabled, or set to null (labels, combo boxes, grids, etc.). As the user goes through and makes choices, these elements are populated,... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337649",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: How can I troubleshoot my custom URL scheme? I set up a simple event handler as mentioned here, but it appears that the selector isn't called. I put the code in my AppDelegate class and wired up the delegate in IB. Tried putting in some NSLog()s and breakpoints in the selector I expect to be called, but none of it i... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337656",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: How the basic link process works for ELF and PE I've always been confused about how the linker works, and it's a difficult subject to search for.
To demonstrate my question and to provide a framework for an answer, I'll put down what I know (or think I know) so far. I may be very wrong. :)
First, each .cpp file is b... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337659",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Encrypting connection string in classic asp Is it possible to store encrypted connection string so it can be used from server-side vbscript?
Was there an equivalent of web.config in 'the good old days'?
A: As I dust off the ol' memory banks...
I recall that in classic ASP systems, we would put the connection string... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337663",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Counting inversions in an array I'm designing an algorithm to do the following: Given array A[1... n], for every i < j, find all inversion pairs such that A[i] > A[j]. I'm using merge sort and copying array A to array B and then comparing the two arrays, but I'm having a difficult time seeing how I can use this to f... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337664",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "126"
} |
Q: How do I override the title of a bookmark for a web page? When adding a bookmark or favorite the browser uses the TITLE tag of the page to automatically populate the title of the bookmark. However, my web pages use SEO-friendly titles which are not really user-friendly. Is there a method to override the title when t... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337669",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: Dynamic Keyword Arguments in Python? Does python have the ability to create dynamic keywords?
For example:
qset.filter(min_price__usd__range=(min_price, max_price))
I want to be able to change the usd part based on a selected currency.
A: Yes, It does. Use **kwargs in a function definition.
Example:
def f(**kwargs... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337688",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "56"
} |
Q: Regex - replace only last part of an expression I'm attempting to find the best methodology for finding a specific pattern and then
replace the ending portion of the pattern. Here is a quick example (in C#):
//Find any year value starting with a bracket or underscore
string patternToFind = "[[_]2007";
Regex yearF... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337691",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Is there a more efficient way of creating a list of years/months? On a page I want to dynamically list years and all the months in each year so an archive for each month can be viewed. I want to show the current year first but the current year may not be over yet so I only want to show the months that have passed, a... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337694",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: Configure apache to treat static resources with "?" character in filename For various reasons, I have a bunch of static resources all with the following naming format:
xxxxx?yyyyy
where the x's are regular letter chars, and the y's numbers 0-9.
Apache is truncating the filename in the GET request at the "?" - as th... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337698",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: How to implement one "catch'em all" exception handler with resume? I wonder how can I write a catch'em all exception handler in the application level which will give the user the option to resume the application flow?
A: Use below code in your program.cs class. It will automatically Send mail when exception occurs.... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337702",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "30"
} |
Q: Parameterize an SQL IN clause How do I parameterize a query containing an IN clause with a variable number of arguments, like this one?
SELECT * FROM Tags
WHERE Name IN ('ruby','rails','scruffy','rubyonrails')
ORDER BY Count DESC
In this query, the number of arguments could be anywhere from 1 to 5.
I would prefer ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337704",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1124"
} |
Q: Crystal Reports in ASP.NET 2.0 app - report changes not showing I'm developing an ASP.NET 2.0 application that includes Crystal Reports (version 10, included with VS 2005). Originally, the reports were working properly, both when run from my machine using the ASP.NET development web server, and also when deployed t... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337713",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Setting up IIS7 as a basic web host (website w/ attached ftp site) Am I becoming a lazy researcher? If I don't find good answers via Google, instead of continuing to try various research methodologies, here I am at SO again...
I want to host a few websites on IIS7 on Windows Server 2008. I am familiar with how to se... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337715",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: handling GUI element properties per app state I was thinking of centralizing this functionality by having a single method that gets passed an AppState argument and it deals with changing the properties of all GUI elements based on this argument. Every time the app changes its state (ready, busy, downloading so parti... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337729",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Best way to display a game score on iPhone with cocos2d? I am looking to persistently display a game score in an iPhone app using cocos2d. Going off the code that cocos2d shows the FPS the app is running at:
-(void) showFPS
{
frames++;
accumDt += dt;
if ( accumDt > 0.1) {
frameRate = frames/ac... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337732",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "9"
} |
Q: Merge XML nodes using XSLT Is it possible to merge elements using XSLT.
If I have the following XML
<data>
<item column="left" value="1" />
<item column="left" value="2" />
<item column="right" value="3" />
<item column="left" value="4" />
<item column="right" value="5" />
<item column="right" value="6" />
<item col... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337734",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "4"
} |
Q: Anything wrong with adding the PUT,DELETE verbs to the .aspx extension in IIS? I'm using PUT and DELETE more and more w/ my ajax work and wanted to see if it would be a "bad idea" to add these verbs to the .aspx application extension in IIS.
A: If your AJAX operations are taking advantage of a RESTful API then I wo... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337737",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: How to log something in Rails in an independent log file? In rails I want to log some information in a different log file and not the standard development.log or production.log. I want to do this logging from a model class.
A: Update
I made a gem based on the solution below, called multi_logger. Just do this in the... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337739",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "168"
} |
Q: What's your approach for optimizing large tables (+1M rows) on SQL Server? I'm importing Brazilian stock market data to a SQL Server database. Right now I have a table with price information from three kind of assets: stocks, options and forwards. I'm still in 2006 data and the table has over half million records. I... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337744",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "14"
} |
Q: Making a Service Layer call from Presentation layer I have to choose a technology to connect my Application/Presentation Layer (Java Based) with the Service Layer (Java Based). Basically looking up appropriate Spring Service from the Business Delegate Object.
There are so many options out there that it is confusing ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337751",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "5"
} |
Q: What is a good embeddable Java LDAP server? I'm working on a Java web application that integrates with a few other external applications that are deployed along with it. Authentication information must be synchronized across everything and the other applications want to authenticate against LDAP. The application wil... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337756",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "25"
} |
Q: Create an Array of the Last 30 Days Using PHP I am trying to create an array starting with today and going back the last 30 days with PHP and I am having trouble. I can estimate but I don’t know a good way of doing it and taking into account the number of days in the previous month etc. Does anyone have a good sol... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337760",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "12"
} |
Q: LINQ to SQL: Multiple / Single .dbml per project? I've read Rick Strahl's article on Linq to SQL DataContext Lifetime Management hoping to find some answers on how I would manage my .dbml files since they are so closely related to DataContext. Unfortunately, Rick's article seems to be focused on DataContext lifetim... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337763",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "13"
} |
Q: How to use $.each loop through json code in JQuery Due to the way my serverside script outputs I receive multiple JSON objects. {jsonhere}{jsonhere1}{jsonhere2}{jsonhere3} etc.. They aren't seperated by anything. If I would do a split based }{ I would lose those brackets. So is there an outerloop I can put over the ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337766",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Why does Oracle require TO_NCHAR when binding SQL_C_WCHAR text via ODBC I use the following statement prepared and bound in ODBC:
SELECT (CASE profile WHEN ? THEN 1 ELSE 2 END) AS profile_order
FROM engine_properties;
Executed in an ODBC 3.0 connection to an Oracle 10g database in AL32UTF8 charset, even after bind... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337769",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Creating custom URL tokens in ASP.NET (a la MOSS) In ASP.NET, the tilde (~) is treated as a token in URLs and treats paths prefixed with that as relative to the application root. This is well-known functionality.
In MOSS, there are other tokens, such as ~sitecollection/mypath... which behaves in a similar way, but t... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337781",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "1"
} |
Q: Accessing Windows Forms 2.0 combobox or AXComboBox I have created a mutli-column combobox in VB.net 2008 using windows forms 2.0. I am having trouble accessing data once selected to use in the remainder of the form. There does not seem to be a selected event to use in conjunction with the winform 2.0 combobox.
Does ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337784",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: How to map Image type in NHibernate? I have at my SQL Server 2000 Database a column with type Image. How can I map it into NHibernate?
A: We used BinaryBlob on the mapping config file, and byte[] on the property.
A: Below is the sample code that i have used to map an image field. Where BlogImage was a column of Im... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337789",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "14"
} |
Q: Textbox with a popup in Silverlight I'd like to build an own control, but therefore I need to know if its possible to combine a Textbox event with a Popup more or less like the Datepicker Control.
Or is there a better way to do this than with a Popup?
Greets
Patrick
A: Sure you could do this. In fact look at the D... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337791",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Can I force generation of a JVM crash log file? The log file from a JVM crash contains all sorts of useful information for debugging, such as shared libraries loaded and the complete environment. Can I force the JVM to generate one of these programmatically; either by executing code that crashes it or some other way... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337793",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "11"
} |
Q: Adding new row to datatable's top When we use datatable.newrow command, a new empty row added to bottom of rows. However I want newrow to added to top of datatable. How can I make it?
A: You use the NewRow to create a row with the same columns. To actually get it into the DataTable, you've got to do
myDataTable.Ro... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337797",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "40"
} |
Q: How do I get the actual resource from a ComponentResourceKey? I have a ComponentResourceKey defined in my resource dictionary like this:
<Style x:Key="{ComponentResourceKey TypeInTargetAssembly={x:Type local:Resources}, ResourceId=BaseControlStyle}" TargetType="{x:Type FrameworkElement}">
<Setter Property="Margi... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337803",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: How can I change features in Windows Vista programatically? I'm looking for a way to programatically change features ("Programs and Features" -> "Turn Windows Features on or off") in Windows Vista (and newer Redmond OS, e.g. Server 2008).
Ideal solution would be in the form of a Powershell script (Get-Features, Set-... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337811",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "2"
} |
Q: how do you pull in the html from a URL? I have one site that is displaying html content that needs to be displayed on another site (first site is front end to content management system).
So site1 page = http://site1/pagecontent
and on site 2 (http://site2/pagecontent) I need to be able to display the contents shown ... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337816",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: VB6 Program Crashing: Part 2. Advice on fixing Access Violation (0xC00000005) Related to this question. Any advice on fixing the problem below?
After a lot of experimentation with the program, I have discovered several things.
*
*It crashes relatively consistently (90% of the time or so) upon running the line of... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337835",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: Handling ASP postbacks from Javascript Widget I am trying to make a small, data-driven widget that is populated with data from a database on the fly. I can load it initially just fine, but when the index of an ASP DropDownMenu is changed, the widget returns a 404.
This could be a symptom of how I am using the Javas... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337849",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Q: NUnit with night build, how to get errors easily? We have a lot of unit tests but they aren't run every night. I have setup some batch files that compile all the code from the SVN repository and I would like to run NUnit. This is not a big problem because I can call it from the batch file after the compilation BUT t... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337853",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "3"
} |
Q: One site, multiple clients ui I have an Asp.net Mvc site where I want to give a separate access and user interface to different clients like:
http://company1.mysite.com
http://company2.mysite.com
http://company3.mysite.com
Each client will have a different ui but practically same functionality (or with some feature... | {
"language": "en",
"url": "https://stackoverflow.com/questions/337856",
"timestamp": "2023-03-29T00:00:00",
"source": "stackexchange",
"question_score": "0"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.