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?
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?
Hello. I have a Core Data model, and was wondering if you know how to create a binding to an Entity, programmatically? Normally you use bind:toObject:withKeyPath:options: to create a binding. But I'm having a little difficulty getting this to work with Core Data, and couldn't find anything in Apple's docs regarding doing this programmatically.
…
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
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…
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…
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…
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…
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…
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…
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…
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…
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.
…
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…
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'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) {
…
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…
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 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…
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 are…
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…
Is this the correct way to convert a UTC string into local time allowing for daylight savings? It looks ok to me but you never know :)
import time
UTC_STRING = "2010-03-25 02:00:00"
stamp = time.mktime(time.strptime(UTC_STRING,"%Y-%m-%d %H:%M:%S"))
stamp -= time.timezone…
Hi, I have a legacy VB6 component that I've imported into VS using tlbimp.exe to generate my interop assembly. The VB6 component defines an event that allows me to pass messages within VB6.
Public Event Message(ByVal iMsg As Variant, oCancel As Variant)
I would really…
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…