Sunday, 30 July 2017

Type errors when using VLOOKUP

When using VLOOKUP it will only find matches of the same data type as source.

The link below has some solutions;

https://exceljet.net/formula/vlookup-with-numbers-and-text

TL;DR,

=IFERROR(VLOOKUP(id,planets,3,0),VLOOKUP(id&"",planets,3,0))

Sunday, 9 July 2017

Useful Docker and LXD info

Documentation

Developer documentation of using docker inside LXD
There are problems using docker inside LXD, many applications cannot run inside a LXD, this can in part be mitigated by applying the docker profile provided by LXD but this does not work for many applications.

Good example of bridging containers onto LAN, including setting up static ip's

Start container at boot time

Snippets

  • #!/bin/bash
  • # Delete all containers
  • docker rm $(docker ps -a -q)
  • # Delete all images
  • docker rmi $(docker images -q)

Sunday, 9 October 2016

Use OLE DB (Excel Spreadsheet) in SSRS

I have been learning a lot of SSRS and SQL server recently and have wondered how to apply the awesome toolset of SSRS to some other problems I have found.

From most of the resources I have found it is usually quoted that the only way to use excel as a datasource for SSRS is by adding the excel document as a ODBC, however in lots of environments that will not be possible due to security settings. 

In the back of my mind I was sure that I had seen excel used with OLE DB data source before. 

Finally I found an example of it working here;

Essentially you use the following connection string
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\MyExcel.xls;Extended Properties="Excel 8.0;HDR=Yes;IMEX=1";

and all works as hoped 




Success!

The only other point to make is that you need to reference the sheet name with a $ suffix,
SELECT
F1 AS rowNum
,F2 AS theValue
FROM
[Data3$]

More resources: 

I wish I found these earlier! 

Connection strings,
https://www.connectionstrings.com/excel-2007/

Stack exchange question about the same problem:
http://stackoverflow.com/questions/24499299/connecting-excel-2013-to-ssrs-2012-to-use-as-a-datasource



Monday, 8 August 2016

Regenerate TS3 priv key

If you need to regenerate the ts3 priv key you can start the server with a temp admin key using

ts3server_minimal.sh serveradmin_password=YourNewPassWord
(http://shawnhyde.com/post/2010/01/12/How-to-recover-serveradmin-access-of-teamspeak3ts3-server-after-system-reload)

Login with:
login serveradmin password

Then generate key with:
use 1 tokenadd tokentype=0 tokenid1=6 tokenid2=0

(https://freevps.us/thread-11350.html)

Friday, 12 February 2016

Checksums in Windows

For a while I have been meaning to find a good checksum tool that I can use within windows but have gotten around to doing it properly.

SuperUser to the rescue:
http://superuser.com/questions/166233/is-there-a-built-in-method-for-computing-an-sha-1-or-md5-hash-in-windows-7
http://superuser.com/questions/245775/is-there-a-built-in-checksum-utility-on-windows-7

These led me to this:
http://code.kliu.org/hashcheck/

There is another alternative named HashTab but after reading this and looking at each of the options I ended preferring the look of Hashcheck.



Saturday, 5 July 2014

Thursday, 19 June 2014

ARMA 3 List of Squad Commands

I went looking for a list of ARMA 3 squad commands and couldn't find one, so here is my list. 

Quick Menu
·         Move/Engage
·         Stop/Regroup
·         Hold/Open Fire
·         Team
·         Support
·         Supports

1        Move
1-1   Return to formation
1-2   Advance
1-3   Stay Back
1-4   Flank Left
1-5   Flank Right
1-6   Stop
1-7   Wait for me
1-8   Find cover
1-9   Next waypoint


2         Target
2-1  

3        Engage
3-1   Open Fire
3-2   Hold Fire
3-3   Fire
3-4   Engage
3-5   Engage at Will
3-6   Disengage
3-7   Scan Horizon
3-8   Watch Direction
3-9   Suppressive Fire

4        Mount
4-1  

5        Status
5-1   Call Suport
5-2   Fuel Low
5-3   Ammo Low
5-4   Injured
5-5   Report Status
5-6   I'm under fire
5-7   Ne Less
5-8   … is down


6        Action
6-1 

7        Combat Mode
7-1   Stealth
7-2   Combat
7-3   Aware
7-4   Relax
7-5   Stand Up
7-6   Stay crouched
7-7   Go Prone
7-8   Copy my stance

8        Formation
8-1   Collumn
8-2   Stagger Col.
8-3   Wedge
8-4   Echelon L
8-5   Echelon R
8-6   Vee
8-7   Line
8-8   File
8-9   Diamond

9        Assign
9-1   Assign Red
9-2   Assign Green
9-3   Assign Blue
9-4   Assign Yellow
9-5   Assign White

10    Reply
10-1           Done
10-2           Negative
10-3           Ready to fire
10-4           Connot Fire
10-5           Repeat
10-6           Copy
10-7           Supports
10-8           Custom
10-9           Radio