I'm confused as to when one would choose AsyncTask over a Handler. Say I have some code I want to run every n seconds which will update the UI. Why would I choose one over the other?
I am adding some user controls dynamically to a PlaceHolder server control. My user control consists of some labels and some textbox controls.
When I submit the form and try to view the contents of the textboxes (within each user control) on the server, they are empty.
When the postback completes, the textboxes have the data that I entered…
When I added some CSS stuff to my page, the page got wider and and horizontal appeared even the content is very minimal and does not require to scroll. How can I remove it. I used the following to remove it but it appears as a hack and I am just playing around with CSS, so is there a proper way to do this
Greetings,
I would like to place an image over a surfaceview. However I would like the image to be transparent so you can see the image and also the undlying surfaceview. Can anyone suggest how I could do this?
This started happening when I upgraded my Springsource Toolsuite from 2.3 to 2.3.1. Essentially whenever I do anything, such as open a file, change a file, etc, I have to do a clean. Everything works fine when I do mvn commands on the command line, which leads me to believe that Eclipse is looking in the wrong place for compiled code or…
One of the things that annoys me working with SQL in OO languages is having to define SQL statements in strings.
When I used to work on IBM mainframes, the languages used an SQL preprocessor to parse SQL statements out of the native code, so the statements could be written in cleartext SQL without the obfuscation of strings, for instance…
Problem is that i cant convert to string
Dim path As String = "..\..\..\Tier1 downloads\CourseVB\"
If countNumberOfFolders > 0 Then 'if there is a folder then
' make a reference to a directory
Dim di As New IO.DirectoryInfo(path)
Dim diar1 As IO.DirectoryInfo() = di.GetDirectories()
Dim dra As IO.DirectoryInfo
…
I'm hoping that someone can help me understand how to overcome a performance problem I'm running into with the latest version of the Entity Framework. In my test, I created my model from a database consisting of around 80 tables.
The problem that I'm running into is that the cost of the very first query I run on a thread is very…
I have followed the instructions Apple publishes for unit testing applications on iPhone and things work great when I set the active SDK to "iPhone Simulator". I have it configured to always build and run my tests as part of building the application itself.
Apple implies (by omission) that this should work all of the time, but the…
I understand basically how IoC frameworks work, however one thing I don't quite get is how code-based config is supposed to work. With XML I understand how you could add a new assembly to a deployed application, then change the config in XML to include it. If the application is already deployed (i.e., compiled in some form) then…
Another thanks to SLaks for helping me get the code this far.
I'm not quite sure if my last step is even possible with the way I have things set up.
A live version of the gallery can be seen here: http://www.studioimbrue.com/index2.php
Currently, everything works appropriately. The image and its thumbnail are currently tied…
In C# it is possible to create weak references to objects as described here:
WeakReference Class
In .net some classes also implement the IDisposable interface. Calling the Dispose method of this interface is performed to manually dispose of any managed or unmanaged resources currently being held onto. An example might be a…
This is a C# Winform question. I have a DataGridView which is bounded to a DataTable. I construct the DataTable myself, which several DataColumn instances. When the DataTable is bound to the DataGridView, by default, every column is sortable by clicking the headers of the DataGridView.
But the sorting behavior is something…
I have a domain object, where I created a method to return a text color based on the internal state of the domain object.
I have defined the colors in a color.xml file as resources. The problem I have now, is that I would like to return a Color object instead of a resource ID from the domain object method.
This way I can…
If my .gitignore file has tmp\ in it and I do a git add file.test from tmp, Git adds file.test to the repository. If file.test never changes, than this is as good as a one time add to the repository, right? Say for static files that I want to be in version control. You want the file in an initial clone and that's it.
I…
How can I draw a string centred within a rect?
I've started off with: (an extract from the drawRect method of my custom view)
NSString* theString = ...
[theString drawInRect:theRect withAttributes:0];
[theString release];
Now I'm assuming I need to set up some attributes. I've had a look through Apple's Cocoa…
Mixed-mode DLL called from native C application fails to load:
An unhandled exception of type 'System.IO.FileLoadException' occurred in Unknown Module.
Additional information: Could not load file or assembly 'XXSharePoint, Version=0.0.0.0, Culture=neutral, PublicKeyToken=e0fbc95fd73fff47' or one of its…
Hi I have multiple elements with the same structure in my application. Second div element's id varies as per the comment id in the db which is unique. There are elements with the id 'vote_up' and 'vote_down'. This gets repeated for each comment.What happens is that, as I mentioned, there are multiple…
I have a Silverlight 3 project I am trying to convert to Silverlight 4. I use the autocompletebox. I cannot find the correct namespace/reference for this in Silverlight 4. Has it moved? What reference do I need? Thanks in advance.
I've got an HTML page that needs to make requests to a CAS-protected (Central Authentication Service) web service using the jQuery AJAX functions. I've got the following code:
$.ajax({
type: "GET",
url: request,
dataType: "json",
complete: function(xmlHttp) {
…
I looked at this post http://stackoverflow.com/questions/547468/assembly-references-wont-resolve-properly-on-our-build-server but it didn't help the issue.
I am (extremely) new to TFS, and just installed 2010 on a VM. I imported a project and got everything working-ish. I went to…
This is a minor, esoteric problem and not a showstopper, but I'm wondering what other VS2008 idiosyncrasies are out there.
If you make a web app, add a textbox and run a focus function for the textbox on page load, it works when you run VS not as administrator from a Vista…
I need to make a Java component that turns the background a certain colour when a process passed, and another colour when the process failed.
My first thought was: green for success, red for failure.
But then I read that 10% of males can't differentiate between these two…
We are seeing extremely strange results where StyleCop will correctly report violations when run from within Visual Studio 2010. However, when we run msbuild on the command line (e.g., "MSBuild.exe mySolution.sln") it reports "No violations encountered" when clearly there…
I can't for the life of me get RJS to replace an element's innerHTML with an instance variable's attribute, i.e. something like @thing.name
I'll show all the code (simplified from the actual project, but still complete), and I hope the solution will be forehead-slap…