acceleration

How to detect mouse acceleration in javascript?

心不动则不痛 提交于 2020-03-20 23:06:10
问题 I'm logging the mouse movements in a web app. I'd like to detect the mouse acceleration on a platform (e.g. Windows). Is it possible to do it from javascript, even just in an approximated way? I could ask the user to check their settings with a questionnaire, but it would be much better to detect it automatically. Cheers 回答1: Check distance the mouse has moved over a set interval of time: var mX:Number = _xmouse; var mY:Number = _ymouse; function checkDistance() { clear(); //trace('new

Windows: Programatically determine if hardware acceleration can be disabled

好久不见. 提交于 2020-01-05 07:13:21
问题 Our application includes a screen capture capability. Some applications use overlay surfaces to display video so we included an option to disable hardware acceleration in order to force those applications into software rendering mode so that we can screen cap them. This worked fine under Windows XP. However, under Windows 7 it appears, from my research, that very few display drivers support the ability to disable hardware acceleration since the DWM uses DirectX9 rendering. On those sysetms

Unexplained Xeon-Phi Overhead

隐身守侯 提交于 2020-01-03 01:22:45
问题 I am trying to run this code with these different n sizes on an Xeon Phi KNC. I am getting the timings as shown in the table, but I have no idea why I am experiencing those fluctuations. Can you please guide me through it? Thanks in advance. CODE: program prog integer, allocatable :: arr1(:), arr2(:) integer :: i, n, time_start, time_end n=481 do while (n .le. 481000000) allocate(arr1(n),arr2(n)) call system_clock(time_start) !dir$ offload begin target(mic) !$omp SIMD do i=1,n arr1(i) = arr1

Slowing mouse speed

℡╲_俬逩灬. 提交于 2019-12-23 16:15:36
问题 Any ideas on how I can slow down the mouse speed in a wpf application. Google didn't come up with anything. Should this be dealt with native events from Win32. 回答1: here SPI_GETMOUSESPEED = 112 decimal SPI_SETMOUSESPEED = 113 decimal source OnAppStart -> get system current mouse speed OnMouseEnter -> set to slow OnMouseLeave -> set to system OnAppShutdown -> set to system EDIT Additional Reference 来源: https://stackoverflow.com/questions/8594513/slowing-mouse-speed

Get Device Moving Direction without GPS

匆匆过客 提交于 2019-12-18 05:23:33
问题 With Which Sensor I Can Detect when device is moving to a direction In Absolute Coordinate(for example moving to +x or -x). I need accurate data,so i cannot use GPS . the Complete Task is to plot in paint(in computer) with android device sensors and this part of task in unknown for me. 回答1: I'm a little confused about what you're asking. Do you want to put a device in your pocket and walk around, and make a plot of everywhere you walked? Or do you want to wave the device around in your hand

Android: Scrollbar Accelerator?

假如想象 提交于 2019-12-13 01:24:38
问题 I'm writing an Android application that contains lots of long lists and I need to accelerate scrolling somehow. The Android Contacts application for example uses a list of letters to allow quick scrolling to a certain spot in the list ... it's not exactly what I'm looking for though. I've seen other applications use a handle (or paddle) that appears when you start scrolling and allows you to easily drag the scrollbars to a specific location, that might be a better solution for me. I'm

Which is the fastest way to retrieve all items in SQLite?

偶尔善良 提交于 2019-12-10 20:07:56
问题 I am programming on windows, I store my infors into sqlite. However I find to get all items is a bit slow. I am using the following way: select * from XXX; retrieving all items in 1.7MB SQLite DB takes about 200-400ms. It is too slow. Can Anyone Help! Many Thanks! Thanks for your answers! I have to do a complex operation on the data, so everytime, when I open the app, I need to read all information from DB. 回答1: I would try the following: Vacuum your database by running the " vacuum " command

speed or acceleration of motion event android

老子叫甜甜 提交于 2019-12-10 17:32:22
问题 Is it possible to get the speed or velocity or acceleration of touch event in android with the existing api? I have gone through MotionEvent class and none of the fields in that class seem to retrieve information that i need. Any help would be greatly appreciated 回答1: MotionEvent does not help you in this case. You can use VelocityTracker class. It gets MotionEvent instances and calculates velocity of recent touch events. You can take a look at its documentation here: http://developer.android

Can't accelerate pixel-modified BufferedImages

萝らか妹 提交于 2019-12-09 18:43:51
问题 For quite a long time, 1-2 months, I have been trying to find an answer to this particular problem: I can't get my image hardware accelerated! I've been searching on the net, created my own methods, hit my head with the keyboard (still feel the pain) but no success. Although I hate libraries other than Java SDK, I tried LWJGL and JOGL but for some stupid reason they dont work on my computer. I tried using System.setProperty("Dsun.java2d.opengl", "True") , I used VolatileImage but I can't draw

android - detect downward acceleration, specifically an elevator

混江龙づ霸主 提交于 2019-12-06 10:31:11
问题 I want to be able to detect a situation where the phone has an acceleration towards the ground (probably means that the Gravity sensor has to be used here also). I have read a lot about this topic in the Android docs, about High and Low pass filters and other posts, and right now what I have is a code sample that gets the acceleration in the X, Y and Z axis after stripping the gravity: if (event.sensor.getType() == Sensor.TYPE_ACCELEROMETER) { final float alpha = (float) 0.8; gravity[0] =