Michael Kuzmin

personal blog

Batch convert XLSX to XLS with VBS

February16

If you have Excel 2007 installed  and you are looking for a way to convert XLSX ->XLS using windows shell (batch script, etc.) here’s the perfect solution:

1) copy this code and save it is as xlsx2xls.vbs  OR simply download it

Set objExcel = CreateObject("Excel.Application")
Set objWorkbook = objExcel.Workbooks.Open(Wscript.Arguments(0))
objExcel.Application.Visible = False
objExcel.Application.DisplayAlerts = False
objExcel.ActiveWorkbook.SaveAs Wscript.Arguments(1), 56
objExcel.ActiveWorkbook.Close
objExcel.Application.DisplayAlerts = True
objExcel.Application.Quit
WScript.Quit

2) in your batch script you can call it by doing this

c:\xlsx2xls.vbs "C:\inputdocument.xlsx" "C:\outputdocument.xls"

don’t mix up the order, don’t mix up file extensions, don’t mix up file paths because if you do it will overwrite your existing stuff without prompting.. and of course you will have to write this last command in one line ;-)

  
Tagged with:
| 2 Comments »

YorkU AutoLogin (Greasemonkey script)

June9

(click on the image above to go to the installation page)
(click on the image above to go to the installation page)

This script has only been tested on Firefox 3 running under Windows 7.
¡Attention! if you are updating the script make sure to remove it first. I may be adding new URLs or fixing it up in other ways. Make sure you click on [Manage User Scripts...], then select [YorkU AutoLogin] on the left and hit the [Uninstall] button. Then click [Install] on this page again. Otherwise the URLs will NOT get updated.

Auto-login for a variety of York University websites. That includes Moodle, Passport York and AirYork.

You must have your username & password saved with Firefox!
——————————————————————————————–
This script is simply another one applied to specific URLs. The original script can be found here:
http://userscripts.org/scripts/show/750

YorkU AutoLogin (Firefox plugin)

If for some reason you don’t wanna use Greasemonkey I have also used this to compile a Firefox plugin for you.

  

Prisoner’s Dilema: Bonnie & Clyde (alternative story)

May26

Bonnie Parker (October 1, 1910 – May 23, 1934) and Clyde Barrow (March 24, 1909 – May 23, 1934) were well known outlaws, robbers, and criminals who, with their gang, travelled the Central United States during the Great Depression. (Wikipedia)

Bonnie & Clyde: this twosome is very well known; and so is the concept of the prisoner’s dilemma. A couple of weeks ago I was on a bus from Toronto to Guelph and I’ve been reading a book on game theory and thinking about relationships. So here is a game I came up with.

Bonnie and Clyde are two young people in a romantic relationship. At a certain point of their relationship, the police is after them. Clyde says to Bonnie: “Honey, you and I, we both know that we have much better chances to be caught while we are together. For now, I want you to take half of all the money that we have. Let us part right now and think about our future. Should we want to stay together, we will meet each other tomorrow, at noon, at this very spot.”
Each of them now has two options: to show up and stay in the relationship or leave. The two individuals have very similar characters, thereby their utility functions are the same. The key assumption is that

U(staying together) = – U(being left behind)

The other important feature is that both individuals are indifferent between separating mutually and leaving the partner.  The utility values in both cases are zero. The payoff matrix is self-explanatory.

Bonnie and Clyde: payoff matrix

Think about this, I will write more about this game in a week from now, when I’m finished with my finals.

  
Tagged with:
| No Comments »

vw

April18

VW
man, this thing is so addictive. the key, i mean ^^ seriously thou, i keep playing with it in my pocket all day long… it’s just so.. amusing)) it comes out..and goes back in.. out..in..out..in..out..in..out….ahhh! here, i’m already doing it again! no! bad misha! put the key down))

  
Tagged with:
| No Comments »

yours to discover

April13


flickr
last weekend we went hiking across several provincial parks in eastern ontario. this is Georian Bay. some random guy is fishing while sitting in his yellow pontiac.
by the way pontiac is possibly one of the worst cars ever. we rented it when we went on a road trip in canadian rockies a couple of years ago. it consumed more gass than BMW and it’s engine resembled a 5-year-old girl on a bicycle.

  
Tagged with:
| No Comments »

Game theory

February25

This is my first academic paper in economics and my first real and independent academic paper overall. I will just go ahead and post it.

“A Simple Way to Prove The Fundamental Theorem of Game Theory”.
(Michael Kuzmin. Glendon College. 2009.)

the flash viewer is clickable. if fact, i recommend that you do click on it) if you’d rather download a PDF version please click here.

  
Tagged with:
| 5 Comments »