robot

Allowing Google to bypass CAPTCHA verification - sensible or not?

旧街凉风 提交于 2019-12-19 09:17:17
问题 My web site has a database lookup; filling out a CAPTCHA gives you 5 minutes of lookup time. There is also some custom code to detect any automated scripts. I do this as I don't want someone data mining my site. The problem is that Google does not see the lookup results when it crawls my site. If someone is searching for a string that is present in the result of a lookup, I would like them to find this page by Googling it. The obvious solution to me is to use the PHP variable $_SERVER['HTTP

Python 'list indices must be integers, not tuple" error

a 夏天 提交于 2019-12-18 08:56:18
问题 I'm working on moving a robot around a 2d grid room of 8 x 8, and one part is initialising the sensors which consist of the closest 5 tiles around the robot. self.sensors = [0 for x in xrange(5)] here I'm creating an empty of array of 5 elements. but when I attempt to set the value of sensors like this: if self.heading == 'East': self.sensors[0] = self.room[self.x, self.y-1] self.sensors[1] = self.room[self.x+1, self.y-1] self.sensors[2] = self.room[self.x+1, self.y] self.sensors[3] = self

OutputStream.write() never ends

人走茶凉 提交于 2019-12-13 08:02:08
问题 I have a car with a bluetooth interface that I connect to using my android app. Robot is programmed so that when he gets a digit 1-5, he makes an action. 1 - drive forward 2 - drive backward 3 - turn left 4 - turn right 5 - stop I have 5 buttons in my app. Their events' look like this public void button1(View view){ socket.write("1"); } where socket is the class that holds BluetoothSocket and makes a connection and has write function: public void write(String signal) { try { OutputStream

Screenshot capture in Window 8 OS

半世苍凉 提交于 2019-12-12 06:45:48
问题 To capture screen shot in my java application i have write following code Rectangle screenRect = new Rectangle(Toolkit.getDefaultToolkit().getScreenSize()); BufferedImage capture = new Robot().createScreenCapture(screenRect); ImageIO.write(capture, "png", new File("resources/img/screenshot.png")); This is working successfully and capture screen shot but this is not working in windows 8 operating system. any one else who have face this type of problem and get soluction? 回答1: my application is

Serial port communication Arduino VC++

社会主义新天地 提交于 2019-12-12 04:54:22
问题 I am not able to write a string on to my Arduino using Visual C++. I am somehow able to open the COM port but not able to send data to the Arduino. What would the problem actually be in my case? int main() { HANDLE hComm; hComm = CreateFileA("\\\\.\\COM11", GENERIC_READ | GENERIC_WRITE, 0, 0, OPEN_EXISTING, FILE_FLAG_OVERLAPPED, 0); if (hComm == INVALID_HANDLE_VALUE) { printf("com not opened"); } else { printf("COM OPENED"); } COMMTIMEOUTS cto = { 1, 100, 1000, 0, 0 }; DCB dcb; memset(&dcb,0

Robot.mouseMove(1000,1000) moves mouse to random locations on screen… why?

狂风中的少年 提交于 2019-12-11 17:00:06
问题 public class MoveCursor extends Application { public static void main(String[] args) { launch(args); } @Override public void start(Stage stage) throws Exception { Button b = new Button("X"); b.setOnAction((event) -> { try { new Robot().mouseMove(1000, 1000); } catch (AWTException ex) { Logger.getLogger(MoveCursor.class.getName()).log(Level.SEVERE, null, ex); } }); stage.setScene(new Scene(b)); stage.show(); } } this should move the mouse cursor over to position 1000x1000 on my/your screen (i

Python UIPath - Unable to read arguments from UIPath and pass it to the python code

こ雲淡風輕ζ 提交于 2019-12-11 16:09:18
问题 Here is an image showing Python scope activity: I am trying to execute a script in UIPath using Python scope, Python load activity, invoke python method and get python object which is mentioned below: The execution is getting completed without any errors/exceptions. But there is no .xlsx file written. The code is not getting executed/ the arguments are not passed correctly. Kindly help. import sys import pandas as pd import xlsxwriter def excel_data (arg1,arg2,arg3,arg4): df = pd.DataFrame({

How to prevent bots from creating sessions in CodeIgniter?

Deadly 提交于 2019-12-11 09:43:35
问题 I am using CodeIgniter with sessions stored in my database. Over a short period of time, a large amount of sessions are created by bots/spiders, etc. Is there a way of preventing this? Perhaps via .htaccess? 回答1: First and foremost you should create a robots.txt file in the web root of the domain to address two issues. First to control the rate at which the website is being crawled which can help prevent a bot/spider from creating a massive number of database connections at the same time.

avoiding automatic software to control web services?

烂漫一生 提交于 2019-12-11 07:00:35
问题 Let's imagine I build a web service, and a client application that call this web service. Is there any way to prevent other software than mine to make call to the web service ? For example, imagine a game where a player can gain some money by clicking on an icon, only available once per hour. If the user is connected, well. If the user is not connected, he "loose" the time window to get the money. In a standard web services + client, it would be quite easy for any teenager to build a script

Robot Model drops off the floor after running the simulation

拟墨画扇 提交于 2019-12-10 18:51:54
问题 I imported a model in webots simulation from URDFs in ROS. The robot is a tricycle drive with 3 castor wheels. I have followed the wheel style as in the webots style guide and changed accordingly. My problem is that when I run the simulation the robot's wheels drops off the floor and is not able to move. Just chassis is on the floor and the wheels hangs down. 回答1: Your robot is probably too heavy for the physics configuration. You can fix this by changing the fields values of the WorldInfo