automation

How to delete mysql row after time passes?

别来无恙 提交于 2019-12-17 06:31:43
问题 I have no idea where to start with this one: I have a database that stores postID and Date . What I want to do is have my website auto delete all rows where Date is less than today. This script can't have any user input at all. No button clicks, nothing. The script must run every day at midnight. I've been looking all over the place for something that does this and I've found absolutely nothing. 回答1: You can use PHP script and use cron job on your cpanel. Example: cronjobcommand.php <?php

JMeter : How to record HTTPS traffic?

做~自己de王妃 提交于 2019-12-17 05:11:51
问题 I'm using Apache JMeter 2.3, which now supports "attempt HTTPS spoofing" under the Proxy Server element. I've tried this on several different servers, and have had no success. Has anyone been able to successfully record from an HTTPS source with this setting? Or barring successfully recording, can anyone share a work-around? When available, I simply have HTTPS turned off at the server level, but this is not always feasible. Thoughts? 回答1: Starting from JMeter 3.0 default port for the HTTP(S)

How to get the range of occupied cells in excel sheet

百般思念 提交于 2019-12-17 03:42:26
问题 I use C# to automate an excel file. I was able to get the workbook and the sheets it contains. If for example I have in sheet1 two cols and 5 rows. I wanted o get the range for the occupied cells as A1:B5. I tried the following code but it did not give the correct result. the columns # and row # were much bigger and the cells were empty as well. Excel.Range xlRange = excelWorksheet.UsedRange; int col = xlRange.Columns.Count; int row = xlRange.Rows.Count; Is there another way I can use to get

How can I automate the “generate scripts” task in SQL Server Management Studio 2008?

痴心易碎 提交于 2019-12-17 03:23:39
问题 I'd like to automate the script generation in SQL Server Management Studio 2008. Right now what I do is : Right click on my database, Tasks, "Generate Scripts..." manually select all the export options I need, and hit select all on the "select object" tab Select the export folder Eventually hit the "Finish" button Is there a way to automate this task? Edit : I want to generate creation scripts, not change scripts. 回答1: What Brann is mentioning from the Visual Studio 2008 SP1 Team Suite is

Matlab: Running an m-file from command-line

丶灬走出姿态 提交于 2019-12-17 02:41:58
问题 Suppose that; I have an m-file at location: C:\M1\M2\M3\mfile.m And exe file of the matlab is at this location: C:\E1\E2\E3\matlab.exe I want to run this m-file with Matlab, from command-line, for example inside a .bat file. How can I do this, is there a way to do it? 回答1: A command like this runs the m-file successfully: "C:\<a long path here>\matlab.exe" -nodisplay -nosplash -nodesktop -r "run('C:\<a long path here>\mfile.m');" 回答2: I think that one important point that was not mentioned in

How can I login to a website with Python?

隐身守侯 提交于 2019-12-17 02:25:44
问题 How can I do it? I was trying to enter some specified link (with urllib), but to do it, I need to log in. I have this source from the site: <form id="login-form" action="auth/login" method="post"> <div> <!--label for="rememberme">Remember me</label><input type="checkbox" class="remember" checked="checked" name="remember me" /--> <label for="email" id="email-label" class="no-js">Email</label> <input id="email-email" type="text" name="handle" value="" autocomplete="off" /> <label for=

Why is my IE browser getting launched twice with Selenium and Cucumber?

。_饼干妹妹 提交于 2019-12-14 04:14:15
问题 I am writing very basic automation test with Selenium-Cucumber that is launching an IE browser and closing it at the end. The problem is that the browser gets launched twice. The test does not have much it other than few System.out statements. I am kind of new to both selenium -based automation testing and Cucumber and not able to understand why is it getting launched twice. Please guide. BrowserConfig.java public class BrowserConfig { private static final String IE_DRIVER_EXE = "drivers

how to work in selenium with testNG in Netbeans IDE?

孤街醉人 提交于 2019-12-14 03:58:31
问题 I am new in automation testing. I know that how to configure testNG with eclipse IDE but I did not get that how to configure testNG with netbeans IDE. I have already included selenium webdriver library files in netbeans. can anyone help me? Thanks Rohit Joshi 回答1: Download latest version of NetBeans Download the TestNG plugin for NetBeans If you are going to use Maven then get the TestNG Maven plugin for NetBeans Start NetBeans IDE and go to Tools -> Plugins NetBeans IDE Go to Downloaded tab

How can I read from a website? C# [duplicate]

落爺英雄遲暮 提交于 2019-12-14 03:33:42
问题 This question already has an answer here : How can I read from a website? [closed] (1 answer) Closed 5 years ago . I'm trying to make a bot, how can I read the value like the 1800 / 1800 from a website? Console.WriteLine("Health: ") Console.WriteLine("Energy: ") Console.WriteLine("Cash: ") Console.WriteLine("Level: ") I'm making a console application, trying to get the value. Like if the health is lower then 1000/1800 then it's going to execute a send key. Like send the key "0" to the website

Call a method every x minutes

我只是一个虾纸丫 提交于 2019-12-14 03:12:34
问题 currently I have a application which can send notifications, I would like this application to be able to send these notifications automatically every x minutes (for example, 15 minutes is the default). The app may or may not be currently running when this notification should be sent. After some reading, I've determined that an AlarmManager would be used here, but I cannot figure out how to call a method from it. I already have the notification code, I just need a way to call it every x