cursor

Vim CursorLine color change in insert mode

假如想象 提交于 2019-12-03 01:43:27
问题 There is good snippet for changing cursor color: if &term =~ "xterm\\|rxvt" " use an orange cursor in insert mode let &t_SI = "\<Esc>]12;orange\x7" " use a red cursor otherwise let &t_EI = "\<Esc>]12;red\x7" silent !echo -ne "\033]12;red\007" " reset cursor when vim exits autocmd VimLeave * silent !echo -ne "\033]112\007" " use \003]12;gray\007 for gnome-terminal endif How should I alter this that instead of cursor, CursorLine would change color for example from dark blue to blue? My complete

Difference between ContentObserver and DatasetObserver?

霸气de小男生 提交于 2019-12-03 01:41:14
问题 What is difference between ContentObserver and DatasetObserver ? When one or another should be used? I get Cursor with single row. I want to be notified about data changes - eg. when row is updated. Which observer class should I register? 回答1: If you are using a ContentProvider (via ContentResolver or Activity.managedQuery() ) to get your data, simply attach a ContentObserver to your Cursor . The code in onChange() will be called whenever the ContentResolver broadcasts a notification for the

How do I create a dynamic mouse cursor .NET without using interop?

匿名 (未验证) 提交于 2019-12-03 01:39:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have an application which I'm interested in eventually porting to mono so I'm trying to avoid using p/invoke's to accomplish this task. I would like to load a cursor dynamically, as in I have a Bitmap that is generated on the fly in the application. From what I can tell the safest way to do it without using p/invoke's is to create a .cur file which I can then load to a memory stream and use the Cursor(Stream) constructor. However I have no idea how to create a .cur file. I found this article on the Microsoft Knowledge Base which sort of

Android - Can you update a Cursor for SQLite results?

匿名 (未验证) 提交于 2019-12-03 01:39:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: One of my methods returns a Cursor from some SQLite query results. As I'm navigating through the cursor, there are some records I want to change/update. Can I update directly with the cursor? Or do I have to manually UPDATE using the record ID from the cursor? 回答1: You can not directly update records with the cursor. Read the Android Cursor doc . 回答2: You need to implement a Content Provider that allows to update the record, in short you need to override the update function in your ContentProvider class. public int update(Uri uri,

How to get function definition/signature as a string in Clang?

匿名 (未验证) 提交于 2019-12-03 01:39:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: How can I get a function's signature (or at least the entire definition?) as a string using Clang/Libclang, assuming I have its CXCursor or so? I think that the definition may be somehow obtainable by using the cursor's extents, but I don't really know how (what function to use). 回答1: You can use this simple code to get prototype of a function ( name, return type, count of arguments and arguments[name,data type]). string Convert ( const CXString & s ) { string result = clang_getCString ( s ); clang_disposeString ( s ); return

Android CursorLoader

a 夏天 提交于 2019-12-03 01:38:36
I am just starting to play with the new cursorLoader and I am running into problems. The following code is just to understand how the cursorLoader works but I keep getting: "Trying to requery and already closed cursor", when I resume this activity. The app was working fine before I started playing with the cursorLoader. Any ideas? private Cursor getSectionData(CharSequence parent_id) { String[] projection = new String[] {Titles.SECTION, Titles.TITLE, Titles._ID, Titles.CODE_RANGE,}; Uri titles = Titles.CONTENT_URI; String select = "" + Titles.PARENT_ID + " match " + parent_id + "";

how to get start time of an event from android calendar

匿名 (未验证) 提交于 2019-12-03 01:38:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: How to get StartTime and EndTime from an event from android calendar ? I am using this code for get all the data of the event but it gives me StartDate and EndDate but i need Date + Time of both Start and End . here's the code CalNames[i] = "Event" + cursor_event.getInt(0) + ": \nTitle: " + cursor_event.getString(1) + "\nDescription: " + cursor_event.getString(2) + "\nStart Date: " + new Date(cursor_event.getLong(3)) + "\nEnd Date : " + new Date(cursor_event.getLong(4)) + "\nLocation : " + cursor_event.getString(5); 回答1: Use cursor_event

Custom cursor set in Javafx

匿名 (未验证) 提交于 2019-12-03 01:34:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am aware that you can define the cursor through CSS like described in JavaFX custom css cursor or even set it globally like this: private void setCursor(Scene scene) { Dimension2D dim = ImageCursor.getBestSize(64, 64); URL url; if (dim.getWidth() > 32) { url = getClass().getResource("/icons/64/cursor.png"); } else { url = getClass().getResource("/icons/32/cursor.png"); } try { Image img = new Image(url.openStream()); scene.setCursor(new ImageCursor(img)); } catch (IOException e) { logger.warn("Failed to load cursor icon from {}", url); } }

Cursor.Current vs. this.Cursor

匿名 (未验证) 提交于 2019-12-03 01:33:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Is there a difference between Cursor.Current and this.Cursor (where this is a WinForm) in .Net? I've always used this.Cursor and have had very good luck with it but I've recently started using CodeRush and just embedded some code in a "Wait Cursor" block and CodeRush used the Cursor.Current property. I've seen on the Internet and at work where other programmers have had some problems with the Cursor.Current property. It just got me to wondering if there is a difference in the two. Thanks in advance. I did a little test. I have two winforms.

CSS custom cursor doesn&#039;t work in FF/Chrome

匿名 (未验证) 提交于 2019-12-03 01:33:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am trying to create a custom cursor using the following image: http://anuary.com/dev/hp/pad3/public/images/hand-cursor.png The image size must be retained. I've tried simply to use body { cursor: url('http://anuary.com/dev/hp/pad3/public/images/hand-cursor.png'); } , though that doesn't work in FF/Chrome. (not even checking other browsers) What's the reason for it not working? 回答1: The problem is not just with your css code lacking second argument but with the image file. If you simply resize, make it smaller (i tried 32px for testing