cursor

Why does IE 8 make the cursor jump to the end of the textarea for this JS?

回眸只為那壹抹淺笑 提交于 2019-12-05 02:05:24
问题 http://jsfiddle.net/tYXTX/ In Firefox, with the above script (included inline below), you can edit the textarea's contents at any point either by clicking in the middle of the string and typing, or using the keyboard back keys (and ctrl+left arrow). In IE, the cursor always jumps to the end. Why is this, and how can I prevent it? HTML: <textarea id="bob" name="bob">Some textarea content</textarea> <div id="debug"></div> JS: $(document).ready(function(){ $("#bob").keyup(function(){ $("#bob")

Can I do this in SQL function without a cursor?

僤鯓⒐⒋嵵緔 提交于 2019-12-05 01:06:02
问题 I'm working on a timesheet database. In simple terms, the TimesheetEntries table has four columns ID int (identity, 1, 1) StaffID int ClockedIn datetime ClockedOut datetime I've been asked to write a report to show staff attendance by date range. The user puts in a date, and the report outputs the clocking in and out times of all attending staff members together with their duration on-site. However, and this is where it gets tricky, staff members sometimes clock out to leave the site for

Method invocation may produce java NullpointerException

江枫思渺然 提交于 2019-12-05 01:01:24
I have a code: public String getNameUpdateEvent(long id) { Cursor mCursor = db.rawQuery("select name from events WHERE _id=" + id + ";", null); if (mCursor != null) { mCursor.moveToFirst(); } String updateNameEvent; updateNameEvent = mCursor.getString(mCursor.getColumnIndex("name")); return updateNameEvent; } and I´m getting a warning Warning:(173, 45) Method invocation 'mCursor.getColumnIndex("name")' may produce 'java.lang.NullPointerException' How i can fix it pls? Orest Savchak Your cursor can not be null , it will always have any value. But cursor can be empty, so you should firstly go to

Change the color of the cursor of an EditText in Android 3.0

点点圈 提交于 2019-12-05 00:53:55
I have to have an EditText in my application with a white background. I did this in my theme.xml file <style name="myEditText" parent="@android:style/Widget.EditText"> <item name="android:background">#ffffffff</item> <item name="android:textColor">#ff000000</item> </style> The problem now is that the cursor is still white and therefore not visible. I did some googling and found this question here on StackOverflow: Set EditText cursor color The way it's done there is the android:textCursorDrawable key. But this key does seem to be only available with a 3.2 target. But our clients wants a 3.0

Sort a list in ascending order by date from sqlite

会有一股神秘感。 提交于 2019-12-05 00:17:17
I am having a code for retrieving data like this. I wanted to get records with the dates in the ascending order.I tried using "KEY_DATE_TIME ASC" . but it didnt work. public Cursor fetchAllReminders() { return mDb.query(DATABASE_TABLE, new String[] {KEY_ROWID, KEY_TITLE, KEY_BODY, KEY_PHONE,KEY_DATE_TIME}, null, null, null, null, null); } Assuming that KEY_DATE_TIME is a String constant holding the name of the db field, the following should work: return mDb.query(DATABASE_TABLE, new String[] {KEY_ROWID, KEY_TITLE, KEY_BODY, KEY_PHONE,KEY_DATE_TIME}, null, null, null, null, KEY_DATE_TIME + "

Setting cursor to default for elements with is-inactive class

柔情痞子 提交于 2019-12-05 00:16:21
Objective Once the maximum number of players (two goalies, six defensemen, twelve forwards) in each of their categories have been chosen, the remaining players picked with the class is-inactive should been set to cursor:default Clarification of the problem All the players have the class is-inactive as a default, and what I'm trying to do is trying to set cursor: default only after other players have been picked and have had their class switched to is-active . ie. Two goalies are picked and now have the class of is-active and take the cursor:pointer behaviour on hover. There are a total of ten

Add the contents of one Cursor to another Cursor

前提是你 提交于 2019-12-05 00:10:02
问题 I want to join two cursors so that the contents of the second Cursor shall also appear in first Cursor after joining. Precisely here is my code, public final Uri AllImage_URI_Int = MediaStore.Images.Media.INTERNAL_CONTENT_URI; public final Uri AllAudio_URI = MediaStore.Audio.Media.EXTERNAL_CONTENT_URI; cContentList = managedQuery(AllImage_URI_Int, null, null, null, MediaStore.Images.ImageColumns.TITLE); cList_Int = managedQuery(AllImage_URI, null, null, null, MediaStore.Images.ImageColumns

Axios recursion for paginating an api with a cursor

不问归期 提交于 2019-12-04 23:18:33
问题 How can I paginate an API with a cursor using axios ? I would like to recursively call this function until response.data.length < 1 and return the entire array with all items in the collection when it is done. Also, worth noting, I would have to pass the cursor into subsequent calls. function getUsers () { return axios.get('/users') // API supports a cursor param (?after=) .then(response => { // returns an array with a cursor // see response below console.log(response.data) }) } Example

C# Winforms - change cursor icon of mouse

故事扮演 提交于 2019-12-04 22:29:08
How to change cursor icon to the 'busy icon' usually shown on the desktop? How can i set Animated files (.gif,.ani) instead of cursor ? CARLOS LOTH Try to do the following: System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.WaitCursor; More information is available at Cursors Class documentation Cursor class doesn't support GIF files or animated cursors (.ANI). You can load a custom cursor doing Cursor.Current = new Cursor("C:\\ic.cur"); Maybe you can convert yout GIF file to cursor format using a tool like Microangelo . In addition, there is another thread related to it. How

MySQL stored procedure, handling multiple cursors and query results

若如初见. 提交于 2019-12-04 21:54:36
问题 How can I use two cursors in the same routine? If I remove the second cursor declaration and fetch loop everthing works fine. The routine is used for adding a friend in my webapp. It takes the id of the current user and the email of the friend we want to add as a friend, then it checks if the email has a corresponding user id and if no friend relation exists it will create one. Any other routine solution than this one would be great as well. DROP PROCEDURE IF EXISTS addNewFriend; DELIMITER //