Showing posts with label Work. Show all posts
Showing posts with label Work. Show all posts

Friday, 3 June 2016

Sparkline

So today at work I came across a really cool feature in Microsoft Excel 2013. Enter the Sparkline.

Probably more of a gimmick but they look cool. They are a little chart that is just inside a cell. It can be a line,column or win/loss. They are easy to create and could be used if you don't the all of the features and hassle of a full chart.

Here's how to create a sparkline in excel:
Start by putting you data into one column. There aren't any labels so they don't really matter for this.
Then in the Insert tab on the ribbon find the Sparkline section and choose the style you want. This time we will create a win/loss style.
This will open the Sparkline dialog.
Select the data range. Make sure you don't select any labels as this will give an error.
When the Sparkline is created it will be small, the size of your cell so you will probably want to make the cell bigger.
And there you have it.

Probably just a gimmick but might be useful eventually.

Cheers,
Rex

Monday, 12 October 2015

Marble Madness

During my cleanup the other weekend I found this old Logitech Marble Mouse among my collection. I have used this in the past and I vaguely recollected that it was fairly nice to use. To see if that was still the case I have been using it at work for the last week or so. To see how I've been getting along with it follow along after the break.

Tuesday, 25 August 2015

Inception computers


So I managed to get the remote desktop connection working to my work computer. Unfortunately as you can see, that required a few layers. At the bottom of the screen is my Debian taskbar, then running within virtualbox is the windows install on the other partition of this computer. Then within that is an RDP connection to my work computer at the office.

Probably the most impressive thing about this whole setup is how good the performance was. It felt like I would still be able to use it for doing actual work.

I am in the process of finding an alternative that will run natively within my Linux install and I have found this program http://remmina.org/ that will do RDP through a TS Gateway which is causing my headaches. Unfortunately the ppa I found for it is only for newer versions of Ubuntu than the version of Debian I am using. So I can either compile from scratch and probably have to sort out a whole lot of dependencies. Or I can update in place this install of Debian I am using now. Or I move to a distro with rolling updates like Gentoo which I was going to use but then needed a working install far to quickly.

I'll let you know what I end up doing. And particularly if it is a bit interesting I will do a writeup on it. If anybody has a suggestion as to how I should proceed let me know what you think and why.

Cheers,
REx

Wednesday, 12 August 2015

Code Today: Create a kml file with VBA

Hi, another nerdy post today. The other day I came across some code I had written that generates a .kml file that points to a street address. It is a little kludgy but it has worked for the last few years. First I will show the code, explain it, then I'll talk about what I'd do differently if I were to do it now.

Sub Create_kml()
       
    Dim Name, Details, Address As String
    'Get job details into RAM
    Name = Range("Q3") & Range("R3")
    Details = Range("M3")
    Address = Range("K4")
   
    'Open kml file
    Dim fso, tf
    Set fso = CreateObject("Scripting.FileSystemObject")
    Set tf = fso.CreateTextFile("File Location" & Name & ".kml", True)
    'Write actual kml file
    tf.Writeline ("<?xml version=""1.0"" encoding=""UTF-8""?>")
    tf.Writeline ("<kml xmlns=""http://www.opengis.net/kml/2.2"" xmlns:gx=""http://www.google.com/kml/ext/2.2"" xmlns:kml=""http://www.opengis.net/kml/2.2"" xmlns:atom=""http://www.w3.org/2005/Atom"">")
    tf.Writeline ("<Document>")
    tf.Writeline ("    <Placemark>")
    tf.Writeline ("        <name>" & Name & "</name>")
    tf.Writeline ("        <description>" & Details & "</description>")
    tf.Writeline ("        <address>" & Address & "</address>")
    tf.Writeline ("        <styleUrl>#m_ylw-pushpin</styleUrl>")
    tf.Writeline ("    </Placemark>")
    tf.Writeline ("</Document>")
    tf.Writeline ("</kml>")
    'Clear buffer and finalise file
    tf.Close
End Sub

So I may have to look into better ways of displaying code in Blogger. But I think you get the gist of this. The Name variable is used for the name of the waypoint in the kml. The Details variable is used for the description of the waypoint and the address is the street address for the pin to get put on. Looking at it you can probably omit the fso object as it is only used once so you would just have a longer command to set the text file object.

The tf object is created with a specified file. Then writing it is just a case of pushing lines to it. The only way I know of to use a template for writing a file like this is by coding it in place like this.

The biggest thing I would do differently knowing what I know now is that rather than hard coding the locations to get the variables (Name, Details & Address) from. I would pass them to the sub(or write it as a function) so I can copy the code and re-use it without any modification.

Any questions or comments are appreciated.

I hope this helps someone with a project somewhere along the line.

Cheers,
Rex

Thursday, 18 June 2015

Bypass ".docx" Password Protection

If you're just here for the how to, skip down to the pictures after the break.

Now I know that bypassing passwords is something that not everyone likes to do. However sometimes you can forget the password for a critical file or someone has sent you a file and forgotten to tell you the password to edit it.

Microsoft office's new (can I still call it that) xml based document formats have capacity for accidental write protection. Some of these include password protection. While this is great, particularly if sending spreadsheets to a customer; it isn't so great when HR send a file that needs to be edited and even they can't remember the password. That was the problem and thanks to Horatio and this Superuser answer. I was able to save the day and remove the password protection.