cursor

Hiding the cursor in Windows CE

I have a fullscreen application running on Windows CE 6.0 which will only be manipulated using the finger or a stylus. So I don't need the mouse cursor, which I'm hiding using Cursor.Hide(). However, when I use the stylus to manipulate something on the screen, the mouse cursor is printed while the stylus touch the screen. Is there a wa...

Queries and Cursors

Will queries internal having one or more subquery result in cursors at SQL Server level. In otherwords I am not explicitly using cursors but i have query with a sub query. Now for processing this query will SQL server create cursors internally. ...

Extended ContentProvider not behaving properly

I'm trying to implement a ContentProvider wrapped around an SQLite database. I've followed the tutorial here in building my ContentProvider: tutorial I want to test what I have; so I'm attempting to instantiate my new ContentProvider, retrieve a Cursor from the query handler, and attach it to my CursorAdapter. Currently, I'm doing th...

CursorIndexOutOfBoundsException caused by Uri

Here is my LogCat log: 08-25 22:35:27.989: ERROR/AndroidRuntime(327): Caused by: android.database.CursorIndexOutOfBoundsException: Index -1 requested, with a size of 3 Here is the onCreate(Bundle) method where I get the cursor: private static final String[] PROJECTION = { Formulas._ID, Formulas.TITLE, Formulas.FORMULA }; @Ove...

WPF: image click

Hi, in WPF I draw an image with an Image Control: <Image x:Name="Image1" Width="150" Height="180" VerticalAlignment="Bottom" HorizontalAlignment="Center" Stretch="None"/> Sometimes, the image is smaller than the control. So, what would be the best solution to show an Hand cursor (and get Click-Events) only if the mouse is on the imag...

Cursors.Hand does not display the Link Select cursor

I have the following code in my project to change mouse cursor when the user is hovering over a custom button: protected override void OnMouseEnter(EventArgs e) { this.Cursor = Cursors.Hand; base.OnMouseEnter(e); } protected override void OnMouseLeave(EventArgs e) { this.Cursor = Cursors.Default; base.OnMouseLeave(e); }...

change cursor on web page

I am trying to change cursor with .gif image. It will be shown on whole page not only one link. I made it like <style type="text/css"> body { cursor:url(Butterfly.gif); } </style> it does not work. I have also .cur file. It works on IE but not on Firefox. ...

Android; I only have 2 contacts, yet I can obtain 5 from a query, why?

I have setup 2 test contacts in my emulator. I'm running the following query, it should pick them both out, populate my domain object, and add to a list. The output at the bottom should therefore be 2, but it is 5, why is this? (cursor.getCount() is 5 instead of 2) I have stepped through each iteration of the while loop and it is retre...

managedQuery always returns the same result

In my onItemClick method I have: public void onItemClick(AdapterView<?> parent, View view, int position, long id) { Uri formula = ContentUris.withAppendedId(Formulas.CONTENT_URI, id); Cursor formulaCursor = managedQuery(formula, PROJECTION, null, null, null); formulaCursor.moveToFirst(); searchBar.setText(formulaCursor...

Search requires data from multiple cursors/tables

Hi again all, I'm still trying to implement a search function into my Android app. So far it's going ok, although currently the search can only query one table and display the results for this table (its a ListView using SimpleCursorAdapter). What I want is to be able to search multiple tables, but I'm not sure how to get this all into...

GAE Query counter (+1000)

How to implement this query counter into existing class? The main purpose is i have datastore model of members with more than 3000 records. I just want to count its total record, and found this on app engine cookbook: def query_counter (q, cursor=None, limit=500): if cursor: q.with_cursor (cursor) count = q.count (limit=...

Changing values from Cursor using SimpleCursorAdapter

Hey guys!! I have database table with the columns {Name, Time (UTC format) , Latitude, Longitude} I display the table using a ListActivity with a SimpleCursorAdapter. I would like that the column Time show the time in a human readable format (13-07-2010 10:40) rather than in UTC format (18190109089). How can I specify that the values...

Maximum stored procedure, function, trigger, or view nesting level exceeded in Visual Studio (ado.net) but not in SQL server.

I have a problem with a recursive SQL function. The original problem is that I've got a list of employees, each of them has various trainings. Each of these trainings has some pre requirements. For example to have your Class 1 drivers license you must have your Class 5. If I remove the Class 5 I need to check disable the Class 1. Now as...

JavaScript Change Cursor Icon

I already have the conditions and everything worked out, only thing I need is the syntax in JavaScript to change the cursor to the hand, like the user has moused-over a link, and then I need the syntax to change the cursor to the arrow, like they moused-out of the link. Not much to it, just need the JavaScript syntax for changing cursors...

"Whack a checkbox" game with ListView

I have a ListActivity that was originally using an ArrayAdapter. Each item in my ListView contains a checkbox. I changed Adapters to a CursorAdapter. Everything is working fine except checkboxes are out of control. For example: When I click the checkbox in position 1, the checkbox in position 4 gets checked. If I click the checkbox ...

JDBC connection to very busy SQL 2000: selectMethod=cursor vs selectMethod=direct?

In the process of trying to help out an app dev team with performance issues on a SQL 2000 server (from a bunch of Java applications on separate app servers), I ran a SQL trace and discovered that all calls to the database are full of API Server Cursor statements (sp_cursorprepexec, sp_cursorfetch, sp_cursorclose). Looks like they're s...

Android Edittext Cursor and Highlight Problem Options

I am trying to implement a textview which has select text/copy and paste functionality. I tried to do this by making an Edittext with the following properties. I currently have the following Edittext: <EditText style="?android:attr/textViewStyle" android:editable="false" ...

Complex Cursors for returning multiple rows

Each row in a cursor should be joined with another table and the whole result should be returned a one cursor Say cursor1 return 5 rows. Each of these 5 rows should be joined with table1. and the final result for all the 5 rows should be returned a 1 row. Plz help ...

Sybase CURSOR UPDATE extremeley slow / locking up

I have a temp table with 13,000 rows. Most of the rows have a numeric price (100) but some are quoted in 32nds, i.e. 100-30 = 100 + 30/32 = 100.9375. (Some even have fractions of a 32th) I am opening a cursor FOR UPDATE and iterating over the temp table. It takes so long to execute, I am not even sure it is working (my DBA says the exec...

Best way to migrate a MySQL table with dupes to another table with a UNIQUE constraint

I am trying to work out the best approach for a data migration. I am migrating some data (~8000 rows) from a table like this: CREATE TABLE location ( location_id INT NOT NULL AUTO_INCREMENT UNIQUE PRIMARY KEY, addr VARCHAR(1000) NOT NULL, longitude FLOAT(11), latitude FLOAT(11) ) Engine = InnoDB, DEFAULT CHARSET=UTF8; ...