simulate

Is it possible to simulate closures in PHP 5.2.x not using globals?

Is it possible to simulate closures in PHP 5.2.x not using globals? I could think of a way that would pass the desired variables as extra parameters to the closure but that just doesn't feel like best practice. Any ideas? ...

Simulate button click c#

Hey, I am trying to make a simulation of a button click for a password form, basically the form1 loads and shows form2 as a dialogue, and if it does not give back DialogResult.OK, then it closes the application. So far I have in the button: if (txtpass.Text == "") { MessageBox.Show("You need to enter a pass...

Android emulator: disconnect GPS device from provider

I am developing a GPS enabled application on Android. There is no problem with the map display, but I want to test how my code would react to the situation in which the user enters a room, basement or a cave, so that the device would stop receiving any signal. My question is whether I can simulate this programatically or by using the DDM...

jQuery: Triggering a click on an img not working

I'm testing in Chrome. I have a bunch of 'add item' icons on screen that the user can click in order to add that one item to the database. I also have a button at the botton of that list, which should add the whole list of items. It seems to me that the easiest way to do this is to trigger the 'click' event for all these icons (the re...

Simulating Key Press event using Python for Linux

Hi, I am writing a script to automate running a particular model. When the model fails, it waits for a user input (Enter key). I can detect when the model has failed, but I am not able to use python (on linux) to simulate a key press event. Windows has the SendKeys library to do this but I was wondering if there is a similar library for...

How do you simulate typing using jQuery?

Like how the click() can be used to trigger a click event on an element, is there any way to simulate the typing of a string? ...

simulate backspace key with java.awt.Robot

There seems to be an issue simulating the backspace key with java.awt.Robot. This thread seems to confirm this but it does not propose a solution. This works: Robot rob = new Robot(); rob.keyPress(KeyEvent.VK_A); rob.keyRelease(KeyEvent.VK_A); This doesn't: Robot rob = new Robot(); rob.keyPress(KeyEvent.VK_BACK_SPACE); rob.keyRelea...

C# Stress Test - Simulate multiple access to a given shared resource

How can you simulate/stress test about 100 users accessing a given shared resource (e.g. Database) in a c# unit test? ...

Testing WIA without having a scanner/camera device

Hello, I wrote a simple scanning code using WIA. I don't have a scanner device so I can't test it. Can I simulate a WIA device to testing it ? ...

How to simulate multimedia key press (in C)?

Modern keyboards have special multimedia keys, e.g. 'Pause/Play' or 'Open Web Browser'. Is it possible to write a program that "presses" these keys? I would prefer solution in C, but I would accept a language agnostic solution, too. ...

How can i simulate a slow network connection

Hi, I have a Bet Server which sends bet data to a game terminal I would like to simulate a slow network connection. i want the network to be really busy, heavily loaded so i can see how the bet server performs and if it times out when there is a heavy load on the network. Are there any tools i can use to do this? Thanks for any help....

Simulate multiple MAC addresses on same network adapter

Hi, I have a network management software which profiles network devices based on their MAC addresses. I want to write a tool to stress test this software by using virtual MAC addresses (simulate thousands of devices each having a different MAC address). I played around with WinPCap and found that I can send a packet with spoofed up MAC...

Simulating keypresses in Visual C++

Ok so I might be totally barking up the wrong tree here as I'm not that up to date on Windows programming but here goes. I'm trying to initiate a simulated keypress in a C++ project in Visual Studio 2010. Essentially when the program receives a specific code string from another application (which is all being worked via many if stateme...

Simulate a class of type enum

Hello, how can I do to simulate a class of type enum in java <5.0 ..?? public final class Week { private static final Day[] _week = {Day.MONDAY, Day.TUESDAY, Day.WEDNESDAY, Day.THURSDAY, Day.FRIDAY, Day.SATURDAY, Day.SUNDAY}; public static Day getDayOfWeek(final int index) { if (index >= 1 && index <= 7) { ...

remote desktop connection programatically simulate windows c++

My question is: How you can create same basic functionality with the remote computer, like using the same mouse, so when i take move on my computer that will appear at same moment on remote computer, like on the team viewer. Can anyone explain what is the philosophy behind all remote desktop shared programs, how i can see what I'm done o...

Is it possible to simulate a shared folder without changing the name of the computer?

I need run a local demo of a program that have a harcoded path to a .mbd database in the format: \\ComputerName\SharedFolder\db.mbd I can't change the name of local machine because is needed for logging purposes. Thanks in advance ...

How to call a WCF Service methods on a test server (without VS2010) in C#

i created a WCF service that also writes into a log file. i put it On the IIS and run the SVC file to check if it runs ok and it does. how do i simulate its methods? do i create another web site that calls its methods, and use the log file to trace its steps ? can i install WCFTestClient on the test server ? what is the best way to si...

simulate mouse move in php ?

Is it possible to simulate mouse's move in PHP ? By that I mean to do something like : $mouse->moveToCoordinate($x,$Y); // will move the screen to to the coordinate $X, $Y of the screen $mouse->moveVector($x,$Y); // will move from the current point to the (current X + $X, current Y + $Y); $mouse->click(); // will simulate a mouse clic...