Monday, March 06, 2017

Quickly add some text for testing

Sometimes I need a lot of text in a control to test something. For something very short I'll just mash the keyboard a few times but when I need something longer a bit more effort is required.
I thought there needs to be something that can generate some text (say, some Lorem Ipsum) when it's needed.
My initial reaction was 'how hard can it be to make such a thing'? But then I caught myself and realized someone must have done this already.
It turns out there are a few.

I chose to use NLipsum.

It's really easy to get it to return some text. Just the following is enough.

NLipsum.Core.LipsumGenerator.Generate(2)


In case it wasn't obvious, this was a quick post to remind me about this and I thought it was cool and useful enough to tell others about.

Tuesday, February 28, 2017

What is 5G?

An innocent question from a "normob" recently and I thought it was worth answering publicly.


5G is the fifth generation (the 'G' stands for Generation) of mobile data network. This is the way that data (rather than voice) is transmitted between mobile devices.
It will allow for even faster data transfer (think of really fast downloads and high-quality video streaming) and better support more devices in a small area (Useful for very crowded areas and IoT devices.)

For reference, previous generations are:

4G - The highest version currently in widespread use. Also known as 'LTE' which stood for Long Term Evolution. (You may see this represented as an '4'.)
3.5G - Slightly faster than 3G. Also known as High-Speed Data packet Access or HSDPA. (You may see this represented as an 'H'.)
3G - The third generation brought speeds fast enough to support video calls and streaming to a wide audience. (You may see this represented as an '3'.)
2.5G - Slightly faster than 2G. Also known as Edge. (You may see this represented as an 'E'.)
2G - The first popular technology for data transfer. (You may see this represented as a 'G'.)


Monday, January 16, 2017

Launch a store installed app from the command line

How to launch an app from the store

Use the name of the install folder: ">start shell:AppsFolder\{folder}!App". e.g '>start shell:AppsFolder\Microsoft.WindowsStore_8wekyb3d8bbwe!App'

Or, if it has one, use the app's one own URI scheme: ">start {scheme}:". e.g '>start ms-settings:'

Applies To : Windows 10



Starting a normal app from the command line (or a script, or a scheduled task) is easy. Just start the executable.
But apps that are installed from the Windows Store don't have executables. So how do you start them?

The simplest way is if the app has a custom URI scheme. If it does then it's just a case of calling 'start' and then the scheme. So, you could do something like this:

>start ms-settings:

If you want to add a custom protocol to your app see https://docs.microsoft.com/en-gb/windows/uwp/launch-resume/handle-uri-activation

If the app doesn't have its own custom URI Scheme then you'll have to launch it via the shell. Actually, the shell has its own scheme (helpfully called 'shell') so you can do this:

>start shell:AppsFolder\Microsoft.WindowsStore_8wekyb3d8bbwe!App

Here "Microsoft.WindowsStore_8wekyb3d8bbwe" is the PFN (Product Family Name) of the app to launch. Fortunately, these names are easy to find as there are folders with these names for each of the installed apps at "C:\Users\[username]\AppData\Local\Packages"

That folder also includes some things you can't call directly plus some folders that are actually part of other experiences so you can't use everything there.

Enjoy.

Wednesday, January 04, 2017

Tuesday, January 03, 2017