simulation

Detecting simulated keyboard/mouse input

谁都会走 提交于 2019-12-18 07:18:57
问题 Is there a way to detect simulated keyboard/mouse input on Windows. For example, a user types something on his keyboard vs sendKeys/PostMessage/On-screen keyboard. Is there a way that I can distinguish between the two? EDIT: Perhaps an example would help. I am making a game and want to distinguish between real input vs WinAPI synthesizing keyboard/mouse messages. 回答1: I might be wrong, but the on-screen keyboard (and other applications that simulate user input) most probably uses the

JQuery click() on a div button won't fire

跟風遠走 提交于 2019-12-18 04:09:20
问题 I am trying to emulate a user's click on a site who's code I do not control. The element I am trying to engage with a div acting as button. <div role="button" class="c-T-S a-b a-b-B a-b-Ma oU v2" aria-disabled="false" style="-webkit-user-select: none;" tabindex="0"> Generate </div> The event listeners that are associated with element (according to Chrome's inspector) are: And I am simply trying to click the button using: var button = $('.c-T-S.a-b.a-b-B.a-b-Ma.oU.v2') button.click() ... but

An efficient way to simulate many particle collisions?

梦想的初衷 提交于 2019-12-17 23:34:59
问题 I would like to write a small program simulating many particle collisions, starting first in 2D (I would extend it to 3D later on), to (in 3D) simulate the convergence towards the Boltzmann distribution and also to see how the distribution evolves in 2D. I have not yet started programming, so please don't ask for code samples, it is a rather general question that should help me get started. There is no problem for me with the physics behind this problem, it is rather the fact that I will have

How to set fake GPS location on IOS real device

元气小坏坏 提交于 2019-12-17 17:44:08
问题 Currently I have to test app and set the different fake GPS locations on real IOS 7 devices. On Android I use 'My Fake Location'. Unfortunately, I didn't find the same app for IOS 7. Any ideas to solve my problem? 回答1: Of course ios7 prohibits creating fake locations on real device. For testing purpose there are two approches: 1) while device is connected to xcode, use the simulator and let it play a gpx track. 2) for real world testing, not connected to simu, one possibility is that your app

source of historical stock data [closed]

风格不统一 提交于 2019-12-17 15:00:40
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . I'm trying to make a stock market simulator (perhaps eventually growing into a predicting AI), but I'm having trouble finding data to use. I'm looking for a (hopefully free) source of historical stock market data. Ideally, it would be a very fine-grained (second or minute interval) data set with price and volume

Simulate keyboard input in C#

佐手、 提交于 2019-12-17 10:40:28
问题 I need to know how to simulate keyboard input for keys W , S , A , D . I've used SendKeys with no avail as well as the InputSimulator library with no fix. What I'm trying to do is make it to where applications such as games (Battlefield, Natural Selection, ect. Newer FPS games) will register these simulated keys as real keystrokes. I'm trying to make a virtual controller program where external controls will register as keyboard inputs for these games. Is there a way to manually simulate

How to simulate a mouse movement

♀尐吖头ヾ 提交于 2019-12-17 08:59:21
问题 How can I simulate a mouse event causing the pointer to move 500 pixels to the left, then click using C++. How would I do something like this? 回答1: Here's some modified Win32 code I had lying around: #define WIN32_LEAN_AND_MEAN #define _WIN32_WINNT 0x0500 #include <stdio.h> #include <stdlib.h> #include <time.h> #include <conio.h> #include <string.h> #include <windows.h> #define X 123 #define Y 123 #define SCREEN_WIDTH 1024 #define SCREEN_HEIGHT 800 void MouseSetup(INPUT *buffer) { buffer-

Android: Is there a way to simulating D-Pad Events (API 10)?

谁说胖子不能爱 提交于 2019-12-14 00:23:41
问题 The problem is very simple. I have to simulate the dpad events (UP,DOWN,RIGHT,LEFT,CENTER) for navigate in my GUI that consists of a lot of buttons and other elements. With the simulator D-Pad I can without a line code navigate throw this GUI. But how can I do this programmatically? I have tried a lot with no success: KeyEvent event = new KeyEvent(KeyEvent.ACTION_DOWN,KeyEvent.KEYCODE_DPAD_LEFT); View.dispatchKeyEvent(event); Nothing happens (the focus should move one element to right) I have

How to determine characteristics for a genome?

十年热恋 提交于 2019-12-13 18:06:15
问题 In AI, are there any simple and/or very visual examples of how one could implement a genome into a simulation? Basically, I'm after a simple walkthrough (not a tutorial, but rather something of a summarizing nature) which details how to implement a genome which changes the characteristics in an 'individual' in a sumlation. These genes would not be things like: Mass Strength Length, Etc.. But rather they should be the things defining the above things, abstracting the genome from the actual

VHDL - iSIM output uninitialised, doesn't change states

China☆狼群 提交于 2019-12-13 14:48:57
问题 Hi I am a new Xilinx user and been having trouble with how to write stimulus/simulate in a test bench. My output(Kd) isn't giving me any sensible values and gives 'u' for the first few clock cycles before moving and staying at '1' throughout. Not sure if I have written the correct stimulus but hoping someone would help me out here! My VHDL code library IEEE; use IEEE.STD_LOGIC_1164.ALL; entity codeFig2b is Port ( R0 : in STD_LOGIC; R1 : in STD_LOGIC; R2 : in STD_LOGIC; R3 : in STD_LOGIC; Kd :