cursor

Android SimpleCursorAdapter results not displaying in AlertDialog

别来无恙 提交于 2019-12-04 21:06:06
I was looking for an alternative to a spinner, since the first item is always selected (which causes me issues), and I found some examples for using an AlertDialog with a list instead. I am having two problems: The list is displaying and is formatted ok, but there are no values in it. I know the query is returning, and the cursor/adapter has the data in it. This may be a symptom of #1 - but when I select a blank row, the Cursor cursor2 = (Cursor) ((AdapterView) dialog).getItemAtPosition(which); statement causes a crash (it's a ClassCastException). I had similar code previously which set the

Hide a form's client area (but let the title bar be visible) when mouse is not over the title bar

拈花ヽ惹草 提交于 2019-12-04 21:03:05
I'm looking for a way to develop this: (source: hostingpics.net ) When the mouse is over the form's title bar (rectange 1 on the picture) the form content (the rectangle 2) is visible & when the mouse is not over, it disappears but the rectangle 1 must remain visible! How could i manage to do that ? Thanks in advance There are some mouse events related to the non-client area of the forms ( WM_NCMOUSEMOVE , WM_NCMOUSELEAVE , ...) that can be used for this purpose. But this is not simple, because they are not included in Windows Forms. To use this events, you should override WndProc of your form

how to GET the SINGLE ROW with cursor in android?

为君一笑 提交于 2019-12-04 19:53:51
i want to get the row from databas which name = jiten but is gives error in syntax can anyone tell me what is the right syntax for getting the single row here is my code for database class public void getdata() { Cursor cursor = myDataBase.query("emp", new String[] {"email","name"}, " name='jiten'",new String[]{}, null, null, null); Log.e("running", "cursor run"); if(cursor!=null) { Log.e("running", "curosr is not null"); while(cursor.moveToFirst()) { Log.e("running", "curosr while loop enter"); String temp = (cursor.getString(cursor.getColumnIndex(email))); String temp2 =(cursor.getString

Create a semi-transparent cursor from an image

≡放荡痞女 提交于 2019-12-04 18:51:03
问题 Is it possible to create a cursor from an image and have it be semi-transparent? I'm currently taking a custom image and overylaying the mouse cursor image. It would be great if I could make this semi-transparent, but not necessary. The sales guys love shiny. Currently doing something like this: Image cursorImage = customImage.GetThumbnailImage(300, 100, null, IntPtr.Zero); cursorImage.SetResolution(96.0F, 96.0F); int midPointX = cursorImage.Width / 2; int midPointY = cursorImage.Height / 2;

css cursor效果图

↘锁芯ラ 提交于 2019-12-04 18:28:54
效果图: <!DOCTYPE html> <html lang="zh-cmn-Hans"> <head> <meta charset="utf-8" /> <title>cursor_CSS参考手册_web前端开发参考手册系列</title> <meta name="author" content="Joy Du(飘零雾雨), dooyoe@gmail.com, www.doyoe.com" /> <style> .test { width: 400px; border-collapse: collapse; font: 14px/1.5 georgia, arial, serif, sans-serif; } .test td { padding: 2px 10px; border: 1px solid #ddd; } .test td:hover { background: #eee; } .auto { cursor: auto; } .default { cursor: default; } .none { cursor: none; } .context-menu { cursor: context-menu; } .help { cursor: help; } .pointer { cursor: pointer; } .progress { cursor:

javascript selecting a custom cursor (svg)

好久不见. 提交于 2019-12-04 18:16:33
I'm dynamically changing a cursor to a local svg on hover with $(element).on('mouseover', function () { $(this).css('cursor', 'url(svgs/pointer.svg) 9 30 auto'); }; Thats working fine but I'd like to select that svg to manipulate its fill color. Is there any way to do this so I don't have to make a bunch of different svgs with different fills? Thanks You can use inline SVG. Just open your SVG file with your text editor. Copy the XML and use it instead. Just change the fill value and reassign it to the element. cursor: url('data:image/svg+xml;utf8,<svg fill="%23FF0000" height="48" viewBox="0 0

WPF: drawing own cursor - nontrivial problem

主宰稳场 提交于 2019-12-04 18:11:55
i need to implement a cursor with some very specific features: it has to be animated because after n seconds it automatically clicks - so the animation is feedback for the user when the click will happen it has to snap to some of our controls it has to work outside of our application the approaches so far: render my WPF-control into a bitmap, make a cursor-struct out of it and use user32.dll/SetSystemCursor to set it PRO the cursor has no delay after the mouse since it's a real cursor CON snapping is quite hard, especially since we have absolute and relative inputdevices and i would have to

How to change text cursor color in Tkinter?

谁说我不能喝 提交于 2019-12-04 17:25:59
问题 I have a text widget with dark background and I can't see the cursor's position. Is there any way to change the (blinking) text cursor's color? 回答1: You can change the insertbackground option of the text widget to whatever you want. 回答2: Option for text cursor color in Tk is -insertbackground . textWidget.config(insertbackground=...) 来源: https://stackoverflow.com/questions/14284492/how-to-change-text-cursor-color-in-tkinter

How to get matched Rows from MySQLdb.cursors.Cursor python2.6

元气小坏坏 提交于 2019-12-04 17:17:17
I'm working with python2.6 and MySQLdb. I have a table with this data +----+--------+ | id | status | +----+--------+ | 1 | A | | 2 | B | | 3 | B | +----+--------+ I want to do an mysql update like this example: UPDATE my_table SET status = "A" where id in (1,2,3,10001); Query OK, 2 rows affected (0.03 sec) Rows matched: 3 Changed: 2 Warnings: 0 And I need to know if all the ids in the update exits in the database. My idea to get this information was to compare the number of items I tried to update vs the number of matched rows. In the example the numbers are 4 vs 3. The problem is that i don

Python MySQLdb failing to insert

时间秒杀一切 提交于 2019-12-04 16:52:04
I'm trying title = "Title here" url = "http://www.mysite.com/url-goes-here" cursor.execute("""INSERT INTO `videos_justicevids` (`title`, `pageurl`) VALUES (%s, %s)""",(title, url)) I'm not getting an error, but it's not inserting into the database. You need to commit it. connection.commit() 来源: https://stackoverflow.com/questions/12984607/python-mysqldb-failing-to-insert