Profile cover photo
Profile photo
Suzanne McAnanama-Brereton
1,242 followers -
Physical Chemist
Physical Chemist

1,242 followers
About
Posts

Hi

I'm trying to create a macro in LibreOffice using Python, but seeing as how the documentation is extremely sparse I haven't been able to open a spreadsheet from another one. Ultimately, what I want to do is copy and paste cells from one spreadsheet into another. Here is the code:


    deskT = XSCRIPTCONTEXT.getDesktop()
    loadProps = uno.createUnoStruct('com.sun.star.beans.PropertyValue')
    loadProps.Name = 'ReadOnly'
    loadProps.Value = True
    oDoc = deskT.loadComponentFromURL(loadURL, '_blank', 0, loadProps)

and this is the error I get:

Message: <class 'ooo_script_framework.com.sun.star.script.CannotConvertException'>: conversion not possible!
... [oDoc = deskT.loadComponentFromURL(loadURL, '_blank', 0, loadProps)]...

I can't copy and paste it so let me know if that's not enough info. I tried using double quotes but that didn't seem to matter. I also tried making both Name and Value tuples, lists, and dicts. If I use lists or dicts, it gives another error about not having the attribute "getTypes". Does anyone have any tips, suggestions, or resources I can look up?

Post has attachment
I don't usually speak my mind about sports tactics without stats to back me up, but I hope Liverpool don't hire him. I just have a gut feeling it's not going to work out. I mean, the guy has taken the team to the brink of relegation only to have them pull themselves out of danger at the very last moment for at least two seasons in a row. Now, is that who they really think will be able to shape the team into a Champions League side?

I know he's been working on a smaller budget at Wigan, but I'd like to see numbers showing he was more effective with the money he used than other managers.

I'd have liked to have seen Kenny stay for another year because Carroll seemed to be getting better every week under him, he was bringing in youth squad players, and he had to start building a team from almost scratch with Hodgson having gutted the squad like a fish in the short amount of time he was there.

Rant being over, I will happily be proven wrong by anyone who knows more than I do, and I may even start looking at stats this week to corroborate/disprove what I've just said.
Add a comment...

Post has attachment
For those who follow cricket:

I was impressed by the way in which Kevin Pietersen got his 151 at a strike rate of 91.51 against Sri Lanka the other day, so I decided to see if it was really that significant. It is the 5th highest strike rate of English players in Asia with over 50 runs and the highest with over 100 runs (in Tests):
http://stats.espncricinfo.com/ci/engine/stats/index.html?class=1;continent=2;filter=advanced;orderby=batting_strike_rate;runsmin2=50;runsval2=runs;team=1;template=results;type=batting;view=innings

It's also the 37th overall highest strike rate in Asia with over 100 runs in Tests!
http://stats.espncricinfo.com/ci/engine/stats/index.html?class=1;continent=2;filter=advanced;orderby=batting_strike_rate;runsmin2=100;runsval2=runs;template=results;type=batting;view=innings

But to me it seemed more special because he did it when no one else up until then had gotten over 20 runs with a strike rate over 50. I found two other tests where a batsman had gotten over 100 runs in Asia with a strike rate over 90 when no other batsman in the first 2 innings was able to get over 20 runs with a strike rate over 50:
Mohammad Azharuddin in 1993 against England (182 at 92.38, 1st innings)
http://www.espncricinfo.com/ci/engine/match/63598.html and
Viv Richards in 1987 against India (109 not out at 98.19, 4th innings)
http://www.espncricinfo.com/ci/engine/match/63466.html

As it happened, KP was able to get 42 more runs from 28 balls in the 4th innings to bring his total to 193 runs from 193 balls, a feat not matched by either of the above batsmen (but Viv was so close).

After a really disappointing winter for England fans, it's nice to be able to end on a high note.
Add a comment...

Post has attachment
The boyfriend bought some pants online, which came with the security ink tag attached. Instead of enduring the hassle of having to send them back across the country, reordering (and hoping that they'd still be in stock when reordered), and having to pay for shipping for what was clearly their mistake, I volunteered to take it off for him.

I looked online and found a few websites from a couple of years ago that showed a simple, easy-to-disassemble device with ball bearings, so I took out my Dremel and started cutting off the plastic casing.

Unfortunately, it seems that the security tag people have gotten a little smarter. I cut off the tab-like part of the side without the ink and, to my surprise, found nothing like the spring and ball bearings I expected. Instead, I found a thin metal plate that locked onto an inverted tack using notches on the stem of the tack.

Not a problem. My awesomely amazing, underutilized Dremel has an attachment for cutting metal and I finally got to use it. So I put on my safety glasses and cut through the metal, creating a lot of sparks. Once I had gotten about 3/4 of the way through, it gave way enough for me to safely pull apart the tag.

I also decided to take apart the side containing the ink just to see what it looked like. Pictures below.

PS Stealing is bad. I do not condone stealing.
Photo
Photo
5 Photos - View album
Add a comment...

Post has attachment
Photo
Add a comment...

Post has attachment

This reminds me of a training session I had to do for one of the companies I worked for where they specifically stated that if anyone in the company thought what you said was offensive, regardless of what you actually meant, it was considered offensive and should be apologized for immediately. Now, I understand it was to accommodate the different cultures of the people working there, but it seemed like using a hammer to crack a nut, as well as giving license to hide behind a "culture". For instance, I had a disagreement with a coworker about how she treated other people in the lab. She was always yelling and was intolerant of mistakes, and when this was brought up to our manager, the manager excused it as "her culture". An apology may have helped in that situation, but not if it was forced and insincere. Like David Mitchell said, it's not the apology that matters, it's whether the person apologizing means it.

http://www.guardian.co.uk/commentisfree/2012/mar/25/public-apologies-gingrich-de-niro
Add a comment...

Post has attachment
Interesting way forward for pharmaceutical companies, not to mention a different way of looking at computational chemistry:
http://www.physorg.com/news/2012-03-chemistry.html

especially since the average cost of a new drug is $4,000,000,000.
http://www.forbes.com/forbes/2012/0312/strategies-pharmaceuticals-lilly-stagger-cost-inventing-new-drugs.html

Now that research budgets have for the most part been cut, looks like this is what could replace the current methods.
Add a comment...

Post has attachment
Monorail to space? Seems the most feasible, cost-effective way to do what this country's been fixated on for about 50 years. The biggest problem I have with these commercial transports to space is that it would require structures much larger than we've ever built just to hold it up. Plus, how would those who don't like the look of windmills that can power their city react to a gigantic tube to outer space hanging around?

http://www.physorg.com/news/2012-03-maglev-track-spacecraft-orbit.html
Add a comment...

Post has attachment
Wait while more posts are being loaded