Profile

Cover photo
Suzanne McAnanama-Brereton
1,253 followers|6,202 views
AboutPostsPhotosVideos

Stream

 
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?
2
Suzanne McAnanama-Brereton's profile photoTiziano Lattisi's profile photo
7 comments
 
You are welcome!
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):
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.
2
Simon B's profile photo
Simon B
 
+ESPNcricinfo should hire you for the stats department :)
Add a comment...
1
Suzanne McAnanama-Brereton's profile photoSimon B's profile photo
2 comments
 
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.

http://www.guardian.co.uk/commentisfree/2012/mar/25/public-apologies-gingrich-de-niro
2
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?

http://www.physorg.com/news/2012-03-maglev-track-spacecraft-orbit.html
2
Add a comment...
2
1
Suzanne McAnanama-Brereton's profile photoSimon B's profile photoBryan Wong's profile photo
4 comments
 
I'm glad someone appreciated my title!
Add a comment...
Have her in circles
1,253 people
 
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. 
2
Suzanne McAnanama-Brereton's profile photoSimeon Greene's profile photoSimon B's profile photoDamilola Oni's profile photo
10 comments
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.
2
Add a comment...
 
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.
2
3
Simon B's profile photo
Simon B
 
You make a more serious point, but this illustration was funny.
https://plus.google.com/117312149612592125001/posts/EZ7P4xQctgx
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 (http://www.cmbi.ru.nl/molden/) on my laptop running debian and kept getting this error:

error while loading shared libraries: libgfortran.so.1: 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...).
So...
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:
http://xkcd.com/979/
2
1
Suzanne McAnanama-Brereton's profile photoRana Tahir's profile photoSimon B's profile photo
5 comments
 
So they are as smart as I am :)
Add a comment...
People
Have her in circles
1,253 people
Basic Information
Gender
Female
Story
Tagline
Physical Chemist
Introduction
I'm a physical chemist who's discovered the wonders of Linux and open-source everything.