I had a situation come up that required running a lambda expression on the UI thread after a delay. I thought of several ways to do this and finally settled on this approach
Task.Factory.StartNew(() => Thread.Sleep(1000))
.ContinueWith((t) => textBlock.Text="Done",TaskScheduler.FromCurrentSynchronizationContext());
But I'm wondering if…
The code below allows me to change a preview image outside the carousel widget so that it matches the element under the mouse. For example, if the user mouses over image2's thumbnail, the script updates .selectedImage so that it displays image2's full size version.
I'd like to enhance it so that the #myThumbs options listing updates its "selected"…
With the recent announcement of .NET 4.0 and Visual Studio 2010, it is becoming ever more difficult to keep track of what .NET Framework versions build on what version of the CLR and belong with which version(s) of Visual Studio.
Is there a definative table that shows these relationships?
I am currently using Telerik's carousel control, but it is lacking many features and is buggy. Is there a good control out there that looks the the coverflow control in itunes?
Hi,
I am getting the following error: Invalid authorization specification
I've narrowed down the error to my connection string. I have verified the server name, database, user & password are correct. Here is the string:
"Provider=SQLOLEDB;Server=xxxxx.db.12345.hostedresource.com;Database=foo;UID=fooUser;PWD=fooPW"
The SQL server is hosted…
I have an existing web service I need to expand, but it has not gone into production yet. So, I am free to change the contracts as I see fit. But I am not sure of the best way to define the methods.
I am leaning towards Method 2 for no other reason than I cannot think of good names to give the parameters classes!
Are there any major disadvantages…
I've implemented a simple example of the Twitter @anywhere api to display user hovercards. The example works great in Internet Explorer and Chrome. However, whenever I the page loads in Firefox I receive the following message in an alert window:
To set up @anywhere, please provide a
client ID
Surely if the results are correct in Chrome and…
We have an Intranet website, and a WPF windows executable installed on every workstation.
How can we create a hyperlink on the intranet website that will launch the locally installed executable?
Ideally we want the launch to be seamless. Is there a way of setting the browsers trust settings so that it won't display a security warning dialog for…
Hi,
I found out that Oracle Database 10g and 11g treat the following PL/SQL block differently (I am using scott schema for convenience):
DECLARE
v_ename bonus.ename%TYPE;
BEGIN
SELECT b.ename
INTO v_ename
FROM bonus b
JOIN emp e ON b.ename = e.ename
JOIN dept d ON d.deptno = e.deptno
WHERE b.ename = 'Scott'
FOR…
I need to move or copy a simple text file from one web site to another web site.
I have administrator rights to both web sites. The first web site has a large data file (again, just a text file), certain records are selected and written to a team file (for entry into a tournament). Next I go through paypal and pay for the entries. The…
How do I resize and image using jQuery but keep its aspect ratio the same?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>CrossSlide - A jQuery plugin to create pan and cross-fade…
I want to write an app that a parent can use to disable phone functionality to prevent their child from using it. One way the child could circumvent this is by uninstalling the app.
Is there a way to prevent application uninstall on the Android?
Which features do you wish were being pencilled in for future .Net releases? I'm curious to see what other language features I'm not currently aware of.
Hi:
This feed (snippit of it) needs to look exactly like this:
<AmazonEnvelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="amzn-envelope.xsd">
what do I add to this C# code to add that extra xmlns, xsi junk:
writer.WriteStartDocument();…
I'm using custom WordPress categories for some probably unintended functions, I will admit (things like marking a post no/index just by adding it to my custom "no-index" category, etc). But it sucks that WordPress does not enable pages with all the little extras you get with posts.
For example, while…
I ran the Visual Studio 2008 profiler against my ASP.NET application and came up with the following result set.
CURRENT FUNCTION TIME (msec)
---------------------------------------------------|--------------
Data.GetItem(params) | …
We have a WPF windows application that contains a stackpanel control, that I want to be visible only for testing, but not when it is in production.
We'd like to store the visibility value of that stackpanel in the application configuration file (app.config).
What is the WPF way of achieving this?
This is a followup to my last question.
I now have a byte[] of values for my bitmap image. Eventually I will be passing a string to the print spooler of the format String.Format("GW{0},{1},{2},{3},", X, Y, stride, _Bitmap.Height) + my binary data; I am using the SendBytesToPrinter command from…
I am trying to render a JSON into a HTML table. But the difficulty is making it so it loops through JSON and renders multiple columns if necessary.
For the example below, what I want is this:
Result wanted
Result Wanted
<table>
<tr><th>AppName</th><td>App…