Wednesday, 30 May 2018

Word Count examples

In applying for some jobs, rather than sending in a CV, some posts require you to fill out an Evidence Questionnaire as a demonstration of your skills. Typically, each question could require you to use up to 100 words.

I searched the Internet to look web sites which give examples of what N words look like. For example, what 50, 100, 150 words etc look like. One site I came across was Word Count examples.

It's certainly useful to see what these amount of words (say 100) look like before putting pen to paper or keyboard to word processor.



Keywords: word count exmaples


Saturday, 26 May 2018

Posting code

The web site at the following URL can be used to format code suitable for posting in this blog.

http://codeformatter.blogspot.co.uk/



Keywords: posting code java powershell

List files for a specific date

There often comes a time when I'd like to list (select) files for a specific date. For example, if I'm looking for log files for a particular date.

The following PowerShell code can be used for this purpose.


1:  $path = 'C:\Family\powershell';
2:  $targetDate = '2018-04-09';
3:
4:  Get-ChildItem -Path $path -File |
5:    Where-Object {$_.LastWriteTime.ToString("yyyy-MM-dd") -eq $targetDate}
6:
7:  Write-Host 'All done now';
8:


In this example, I'm looking for files with a LastWriteTime of 2018-04-09. All other files will be ignored.


Keywords: powershell files lastwritetime target date

PowerShell about_Scopes

The following published Microsoft article explains the concept of scope in Windows PowerShell and shows how to set and change the scope of elements.

PowerShell Scopes

  • Global:
  • Local:
  • Script:
  • Private:
  • Numbered Scopes:


Click here to read the full article.



Keywords: powershell scopes