user-interaction

Disable user interaction for NSImageView

﹥>﹥吖頭↗ 提交于 2019-12-10 22:59:29
问题 I have 2 sets of images. One set contains draggable ones and other is a static set. I have implemented drag-drop functionality for the draggable images. This is because the images needs to be dragged to static ones which contains matches. Now after placing the dragged image on the static one, there is nothing to do with it, hence I want to disable user interaction for image (since it's still draggable). I have explored several solutions and SO questions here and there , but none of the

Android Spinner OnItemSelected ONLY on User Interaction

与世无争的帅哥 提交于 2019-12-10 18:53:59
问题 I know that this question has been answered multiple times, but I have not found any of them satisfactory and certainly not elegant. The issue is that OnItemSelected gets fired not only when the user selects an item, but also when the selection is programmatically set. Some answers propose setting a flag for times when the programmer is setting a value for the spinner. However sometimes other android code will set the value outside of your code. A common place for android to set the value is

Ncurses: how to refresh a menu without losing current position?

六眼飞鱼酱① 提交于 2019-12-10 18:26:51
问题 How can I reload the data in a menu without losing the current position? For example, when a user "selects" an item, and an action is performed that changes the data. (Either updating the item, removing it, or adding a new item to the menu.) I'd like to reload the menu but still keep the cursor on the item that was just selected. What's the best way to do this? For reference, this question seemed very close, but I don't think it covers the add/remove issue: How to replace a string menu item

Simplest way to get an interactive console for my app

蹲街弑〆低调 提交于 2019-12-08 10:04:34
问题 I want a simple, interactive way to demo middle-tier features of my app which have not had a UI created yet. I want an interactive console. When my application (WPF but it shouldn't matter) boots up I would like to also start a console window. This window should run powershell (or ruby, or python, but preferably powershell) and have its scope set to access my ServiceLocator. Alternately, I could start up my app and attach to the process appdomain from an external powershell window and grab a

jQuery: Control page reloads or moving away from the current page

流过昼夜 提交于 2019-12-08 07:06:31
问题 If a user moves away from the current page by using mouse (clicking on a link) or keyboard (hitting enter while having a form element focused) interactions, i want to do be able to run JavaScript/jQuery commands beforehand. Exemplary workflow: User clicks on any link or hits a key which will result in loading a new page in the browser A JavaScript event gets fired and does something (for example console.log() ) Finally, the page load is executed Furthermore, it would be great if that also

How to detect Ctrl+V in Silverlight 4?

老子叫甜甜 提交于 2019-12-07 07:46:17
问题 What is the best way to detect Ctrl + V in Silverlight? I want to detect Ctrl + V , to get access to the Clipboard. 回答1: EDIT To capture the CTRL + V keypress globally in your silverlight application, is fraught with difficulty. Events start at the child elements and bubble down to the parent controls, so simply handling KeyDown on your root UIElement will not work. Any text input control will first get the event and smother it (by setting Handled to true on the event args.) I think that if

C# For how long was user inactive

徘徊边缘 提交于 2019-12-06 21:05:00
问题 Some background: I am writing a application with several forms, etc. Users have to log in in order to use most of the features, and this worked fine until now. However, now, client has requested that the user would be logged out after a certain amount of inactive time. The problem is that the user can still be active on the computer, just not in my application,. To be clear, I have to log the user out when he is inactive in my application, even if he is still interacting with the desktop.

Selecting record date with selectInput in shiny R

孤街醉人 提交于 2019-12-06 06:07:31
I am very new to R programming and I am trying to build an shiny r app that takes in data on shark attack data and builds a bar chart that specifies the frequency of a kind of attack e.g. Provoked, Unprovoked, Boating etc. I want to be able to filter by the region however. Here is a sample of the dataset. CaseNumber Year Type Country Area OriginalOrder Region 1642.00.00 1642 Unprovoked USA New York 136 Northeast 1779.00.00 1779 Unprovoked USA Hawaii 152 West 1805.09.00 1805 Invalid USA New York 160 Northeast 1816.09.03 1816 Unprovoked USA Rhode Island 164 Northeast 1817.06.24 1817 Unprovoked

android detect user inactivity after key pressed

拟墨画扇 提交于 2019-12-05 15:05:48
In my mediaplayer I've added a view that is shown if menu key is pressed, I want it to be hidden after some time i.e user don't want to see the view, The view is horizontal and i want it to hide after some seconds that user won't press right or left key. I've place my logic here but it didn't worked out: "Similar is my view to be shown" @Override public boolean onKeyDown(int keyCode, KeyEvent event) { super.onKeyDown(keyCode, event); lastUsed = System.currentTimeMillis(); case KeyEvent.KEYCODE_MENU: similar.setVisibility(View.VISIBLE); similar.bringToFront(); similar.requestFocus(); similar

C# For how long was user inactive

半腔热情 提交于 2019-12-05 02:12:55
Some background: I am writing a application with several forms, etc. Users have to log in in order to use most of the features, and this worked fine until now. However, now, client has requested that the user would be logged out after a certain amount of inactive time. The problem is that the user can still be active on the computer, just not in my application,. To be clear, I have to log the user out when he is inactive in my application, even if he is still interacting with the desktop. First I thought this would be fairly simple. Just remember the time of the last action, compare it