Cover photo
Suzanne McAnanama-Brereton
1,269 followers|153,842 views



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('')
    loadProps.Name = 'ReadOnly'
    loadProps.Value = True
    oDoc = deskT.loadComponentFromURL(loadURL, '_blank', 0, loadProps)

and this is the error I get:

Message: <class ''>: 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?
Suzanne McAnanama-Brereton's profile photo
It worked! Thank you so much! 
Add a comment...
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):;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!;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) and
Viv Richards in 1987 against India (109 not out at 98.19, 4th innings)

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.
Simon B's profile photo
Simon B
+ESPNcricinfo should hire you for the stats department :)
Add a comment...
Simon B's profile photoSuzanne McAnanama-Brereton's profile photo
I'm deciding what to do with the ink. Any suggestions?
Add a comment...
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.
Add a comment...
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?
( -- With the aim to make it easier to launch spacecraft into low Earth orbit (LEO), two researchers have turned to maglev technology to catapult a payload hundreds of miles above the Eart...
Add a comment...
I feel like an idiot for not knowing or trying this, but I'm still kind of new to linux and was trying to install a copy of Molden ( on my laptop running debian and kept getting this error:

error while loading shared libraries: cannot open shared object file: No such file or directory

I first tried linking the new library to molden but that didn't work (of course not...).
I googled the error and found about 3 links to forums with the same problem, all from about 2008-2009. Two didn't solve the problem, and another just told the OP to recompile. It seemed to work for that person so I tried it. I even tried downloading the library, but there were so many dependencies, I probably would have been better off installing an earlier version of debian (I even went so far as to delete my graphics driver because it wouldn't have been supported by the older files...Not a very good idea).

So anyway, I emailed the developers and Gijs Schaftenaar emailed me back with a very simple solution to my problem: download the ubuntu executable.

After (hopefully) getting back all the newer files I had downgraded in order to make the missing library file work, I installed the ubuntu version and it worked!

I just wanted to put this out there because, well, this explains it best:
Simon B's profile photoSuzanne McAnanama-Brereton's profile photoRana Tahir's profile photo
So they are as smart as I am :)
Add a comment...
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. 
Damilola Oni's profile photoSuzanne McAnanama-Brereton's profile photoSimon B's profile photo
Simon B
I can't say that I want to see the tainted goods that is Andre Villas-boas. He may come good in a few years, but he moved from Portugal too soon. I think the real mistake is in letting the manager (who hasn't done badly, even if he hasn't excelled and had some mis-steps along the way) go before (or without) a pool of quality from which to recruit.
#youllneverwalkalone #kingkenny
Add a comment...
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.
Add a comment...
Interesting way forward for pharmaceutical companies, not to mention a different way of looking at computational chemistry:

especially since the average cost of a new drug is $4,000,000,000.

Now that research budgets have for the most part been cut, looks like this is what could replace the current methods.
Simon B's profile photo
Simon B
You make a more serious point, but this illustration was funny.
Add a comment...
Coolest (geekiest) abstract to a paper I've ever seen...
Log In Register Cart. ACS; Journals; C&EN; CAS. ACS Publications. Publications A–Z Home|Authors & Reviewers|Librarians|ACS Members|Mobile|Help. Anywhere, Title, Author, Abstract. J. Phys. Chem...
Suzanne McAnanama-Brereton's profile photoSimon B's profile photoBryan Wong's profile photo
I'm glad someone appreciated my title!
Add a comment...
Physical Chemist
I'm a physical chemist who's discovered the wonders of Linux and open-source everything.
Basic Information