Currently Viewing Posts Tagged batch

How to close Firefox windows without prompt

I have a batch file, to run the command and want to close it automatically.
Basically, I can use javascript to close it.
But it is always prompt that ask for Confirmation.
Actually I just want it run by schedule and close itself after finishing.
So, I use the Google BB (Big Buddha) to search it.
The final answer and only one answer is below.
The reason why the script is not working, is that Window is not opened by javascript. So it can not be closed by javascript automatically. It is simply concept. And the solution is also simply.

Continue reading “How to close Firefox windows without prompt”

How to add one string to all rows of one column

I have a MySQL database. There is one table has thousands rows of data. I need to add one string to every rows of one column.

It is a very popular scenario. Looks like in the middle of using one database, the developer need a new column with a default value in it.

Yes, he can setup a default value, but what about the existing data. The answer is shown below.


| fieldA |  fieldB        |  fieldC | 
|  22    |  star          |     2   |
|  23    |  super         |     2   | 
|  24    |  savemore      |     1   |
|  25    |  justtolook    |     4   |
|  26    |  bestbook      |     4   |

I add this string to all rows of fieldB, just after the existing data.

The SQL script is used to do this job shown as below

Continue reading “How to add one string to all rows of one column”

  • Archives