iPad Pro With Bluetooth Keyboard Joy

I’ve owned a 12.9” iPad Pro since they came out and whilst I love the large screen estate (for some things) the on screen keyboard in use doesn’t always hit the mark. I have looked at the Apple and Logitech offerings for hardware keyboards, designed as cases, and have not been impressed by the price - indeed the Apple keyboard with case combo comes up just short of £200 - extortion !

Whilst I could simply pair my bluetooth mac keyboard with my iPad Pro it really isn’t quite the same as something that attaches as a more ‘permanent’ case, so imagine my joy when I discovered the TeckNet iPad Pro keyboard on Amazon. This thin keyboard attaches to the iPad Pro and uses bluetooth (not the iPad Pro’s connectors) to provide hardware keyboard capability. It folds with the iPad and protects the screen in the closed position. The reviewers are right - for £25 or thereabouts you are getting a great tool for your iPad that is robustly built and is designed well.

Well done TeckNet !

Ubuntu 16.04 - My Favourite Feature

So the latest version of Ubuntu isn’t an earth-shattering release, full of never before seen new features, but there’s one very small tweak that pleases me no end! It would seem that the maintainers of the Apt Package Management system, have decided to shorten the package name in it’s use, so that instead of having to type:

1
sudo apt-get install package

It has become possible to instead type:

1
sudo apt install package

They do say that small things please little minds!

An iOS Space Saving Trick

Update - this no longer works in iOS 10 as Apple has finally implemented playing movies from iCloud. If you try this trick now you will end up renting the movie regardless of whether you have the physical space available or not

I came across this great trick for saving space on an iOS (updated to iOS 9.3) device the other day - and having used it on my 16Gb iPad Air 2 I was able to move from having 650Mb free to 3Gb free without deleting any content !

The trick involves navigating to the iTunes Store using the iTunes Store app, having first noted down the amount of available space you have (under settings >> general), and then going to Movies and attempting to rent a movie that is sized over the amount of free space you have. You can determine the size of a movie download by scrolling down and reviewing it’s details - HD movies are normally a few GB in size at least. When you select “Rent This Movie” your device will complain that there isn’t enough space and provide you with a pop up message that advises you this and suggests you go to Settings - if you follow the route to your device settings you will notice that, as if by magic, your available space has now increased slightly !

Simply repeating this process will incrementally increase the available space on your device - I did this about 6 times to get from the 650Mb to 3Gb free. You don’t actually end up spending any cash on renting the movie - just make sure the size of the movie is always more than the free space you already have !

A great tip courtesy of iMore.

Textastic for iOS

I’ve been playing around with Textastic, a great text editor for iOS with syntax highlighting, ability to connect to remote servers to grab files for editing, and a host of editor-like functions. It’s just been updated to provide support for the iPad Pro, and on this large tablet it feels truly like a desktop editor replacement.

Hosting Your Hexo Site on Github - a Lesson Learned

I absolutely love Hexo - it does a great job of creating a basic blog with static pages written in Markdown, that can be deployed to any host and easily updated from a command line or any text editor capable of reading and writing markdown (so just about any text editor then).

I decided to host my new blog at Github Pages and found a really interesting little quirk if using a custom domain with that service.

There are a clear set of instructions on how to deploy to Github in the Hexo documentation, and Github also maintains a useful help file for managing a custom domain for your Github Pages. I managed to follow all of these instructions, and also the DNS update instructions at my domain registrar and eventually ended up with my pages hosted on Github under this very domain.

More...

How to Pivot Data in SQL Server

Sometimes it just makes sense to output a pivoted table, instead of purely columnar data, when running a T-SQL select query. It’s easy to think of pivoting as a complex process when being implemented in code (as opposed to the visual environment of Excel for example), however it’s actually quite simple once you get the basic premise. Here’s a brief example:-

1
2
3
4
5
6
7
8
9
10
11
SELECT * FROM (
SELECT
month(date_value) as partition, -- This will determine the column headings
field1 as grouping, -- This will determine the row headings
field2 as value
FROM database
) SRC
PIVOT (
sum(value), FOR partition IN ([1],[2],[3],[4],[5],[6],[7],[8],[9],
[10],[11],[12])
) PIV

To make this work it’s necessary to ensure that all of the possible ‘partition’ values (normally months or weeks etc.) are contained within the ‘IN’ part of the statement. Naturally you can perform any mathematical function on the ‘value’ in the pivot. Go on - try it.

Start or End of Year in SQL Server

If you need to measure the start or end of a year then the following sql commands should be very helpful:-

1
2
3
4
SELECT
DATEADD(yy, DATEDIFF(yy,0,getdate()), 0) AS StartOfYear,
DATEADD(yy, DATEDIFF(yy,0,getdate()) + 1, -1) AS LastDayOfYear,
DATEADD(yy, DATEDIFF(yy,0,getdate()) + 1, 0) AS FirstOfNextYear

Naturally you can modify these to find start of two years ahead etc. Enjoy !

Finding the Start of a Week in SQL Server

I came across a little gem the other week and use it all the time when I need to measure results over a period of weeks - this identifies the start of the current week so can be easily used in a variable, for example, as an ‘end date’ parameter in my query. It goes like this:-

1
SELECT DATEADD(ww, DATEDIFF(ww,0,GETDATE()), 0)

I often use it in a variable in the following way:-

1
2
3
4
5
6
DECLARE @start as DATE
DECLARE @end as DATE
SET @start = '04/01/2016' -- The start of the current year using the ISOWEEK numbering scheme
SET @end = SELECT DATEADD(ww, DATEDIFF(ww,0,GETDATE()), 0)

SELECT * FROM Database WHERE CreatedDate >= @start and CreatedDate < @end

And there you go - hopefully helpful to you.

Working for Nothing


When I said to my boss “Of course Tony - I can do that no problem”, I didn’t envisage working all of Sunday morning simply trying to get the right angle to make my slides ‘pop’ and bring a story to life.

Of course - to many their working lives are full of such outcomes - ‘popping’, lively slide packs, meant to bring life to - well, what exactly ?

You see I am starting to develop a little theory that the real purpose of the ubiquitous slide pack is to mainly demonstrate one’s own skills at saying the right things, in the right way, to the right people. Not that these people don’t already have the knowledge that your slides will be imparting, and not that the audience is unable to disseminate the right bits of info to take the right kinds of action without your intervention. The slide pack / deck has become the ultimate tool to show people that you really are working, and that you can say things really nicely, with pretty pictures - regardless of whether you need to or not. They are a measure of your value, a way for people to judge you.

More...