Q: How do I obtain Microsoft Office for personal own computer to use at home?

Microsoft's Home Use Program (HUP), is a benefit available to employees at the University of British Columbia. Employees who use the covered licenses at work are eligible to purchase Office applications for use on a personal device for the duration of the term of their employment at UBC.
Eligible employees are allowed to purchase a single license of each product available according to the terms of their organization’s Software Assurance benefit. You can learn what is covered by visiting:
https://it.ubc.ca/ubc-it-guide-working-campus
MS Office UBC license media/download  available from StatNet IT are for deploying only for qualified UBC-owned computers, or purchase by faculty's grant.  Your personal computer will need to purchase this, HUP, home use license.
Instructions

  1. Go to microsoft.com/en-us/home-use-program
  2. Enter your UBC email address (emails ending in @admin-at-stat.ubc.ca or @mail.ubc.ca only)
  3. Click Submit
  4. Check your inbox for an email from Microsoft, with a link to subscribe to Office 365 with 30% discount
Q: How to setup Outlook 2019 for StatNet email account

Please see this pdf file.

Q: How to access UBC OneDrive and Office 365 on the Cloud?

UBC OneDrive info/howto:
https://it.ubc.ca/services/web-servers-storage/microsoft-onedrive

Basically OneDrive is similar to our ownCloud/Nextcloud or Dropbox services.
You will have 2 ways to access it:

a) Cloud access
Faculty and staff who meet the service requirements will be able to access the tools at https://portal.office.com by signing in with their alias.
Login: firstname.lastname [at] ubc.ca
Password: your CWL password
and going through the UBC multi-factor authentication process.
From there, they can use the web-based versions or download the OneDrive software to install it onto your desktop/laptop locally.

b) Direct access as a local drive on your desktop/laptop
You will need to install an OneDrive software, download after you login "Cloud access", onto your device so it can sync data with the OneDrive on the Cloud.

Q: How to deploy a Shiny app to shiny-apps.stat.ubc.ca?

Please click here to view in pdf

Q: Do you have anti-virus software that I can download and use free of charge?

Yes.  UBC ITServices has a software license for the Cisco Advanced Malware Protection (AMP), please refer to UBC "malware-protection" web page for more information:

     https://it.ubc.ca/services/cybersecurity-services/malware-protection

The software license is applied to:

  • UBC-owned devices: Supported by a Faculty, Department of Research IT Department
  • Personal-owned devices: Used for University Business

We retain a copy of the latest version of UBC cybersecurity software which we can distribute locally to qualified users via our Nextcloud service, also known as owncloud.stat.ubc.ca.  Please contact the department IT staff for support.

Q: emacs

General Note (by Jenny Bryan): Everything like this has a learning curve, but, for all of the above, the ultimate benefits make this painful phase worth enduring.

External Resources


AUCTeX: editing LaTeX files in Emacs

AUCTeX is an Emacs package that makes editing LaTeX documents so much easier. It has been installed and configured on StatNet servers (as of November 1, 2005). However, if you want to use it on your own computer, you'll need to download the package and install it yourself (it doesn't come with Emacs by default).

When emacs opens a file with a .tex extension, the additional menus are named LaTeX and Command

  • From the LaTeX menu you can select many environments without typing them (e.g. begin{enumerate} ... end{enumerate}). There are also convenient shortcuts to make typing mouse-free and even faster (e.g. C-c C-e to insernt an environment).
  • From the Command menu, you can run the latex, xdvi and pdflatex programs, etc, and do a spell check that ignores latex commands. Shortcuts are also available and are, in fact, quite smart: it only takes a couple of rounds of C-c C-c to compile the file and open the result in xdvi.

This tip is provided by Harry Joe. Seconded by Mike Danilov.

ESS: Emacs Speaks Statistics

ESS a GNU Emacs and XEmacs mode for interactive statistical programming and data analysis. It is particulary good for R and S-PLUS. It has been installed and configured on StatNet servers (as of November 1, 2005) but you'll need to install it yourself if you want to use it on your own computer.

ESS can be used to save/edit interactive sessions in Splus and R (as well as SAS, stata and other statistical packages).

  1. To start R in emacs, type: Alt-X R (assuming Alt is your Meta key).
  2. Within the R command prompt, hit Alt-P to access previous R commands and Alt-N to access next R commands (which can then be edited); the list of previous commands is cyclic, so the first hit of Alt-N will lead to the first command of your present session. Note: in a properly configured environment Shift-UpArrow and Shift-DownArrow work as well.
  3. Requesting help on a function will bring the help documentation in a split screen, so that you can copy and paste the examples to run etc
  4. There is function name completion with TAB (similar to command/filename completion in the bash shell)
  5. more details about ESS, consult the help ess info within emacs (Crtl-h m, when in ESS)

This tip is provided by Harry Joe. Seconded by Jenny Bryan and Mike Danilov.

UltraTex and Lightning Completion

The UltraTex and Lightning Completion packages (play very nicely with AucTeX) will also really speed up writing LaTeX and will make it virtually impossible to have mismatched parentheses, opened/closed environments, references to non-existent figures/table/sections, etc. (and many other maddening mistakes).

This tip is provided by Jenny Bryan.

Go to Top

Q: Regular expressions: examples illustrating common uses

Most common regular expressions

[0-9] digit
[a-z] lower case letter
[A-Z] upper case letter
[0-9a-zA-Z] digit or letter
[ ] space
[ t] space or tab
[^0-9a-zA-Z] not digit or letter
[0-9][a-z] digit followed by letter
[0-9]{3,5} (vi, grep, emacs) 3 to 5 digits in a sequence
[0-9]{3,5} (perl) 3 to 5 digits in a sequence
[ ]+ (vi, grep) one of more spaces in a sequence
[ ]+ (emacs/viper, perl) one of more spaces in a sequence
. any symbol but n (end of line)
z.{2}o (grep, vi, emacs) z followed by 2 chars followed by o
^ beginning of line
$ end of line
^[ ]*$ line with zero or more spaces and nothing else (vi, perl, grep, emacs)
^$ empty line
^[^0-9a-zA-Z t] line beginning with non-digit,letter,space
[0-9][0-9]/[0-9][0-9]/[0-9]{4} (vi, emacs, grep) mm/dd/yyyy date format
(vim) word beginning with doc
bdoc (perl, emacs/viper, grep) word beginning with doc
ment> (vim) word ending with ment
mentb (perl, emacs/viper, grep) word ending with ment

Using regular expressions

GREP USAGE

put regexp in quotes, e.g. grep "^[ ]*$" files

VI USAGE

for search use / or ? followed by regexp, for replacement, use something like :10,35s/regexp1/regexp2/g where the two numbers indicate the line range; this also works in 'sed' (stream editing/batch mode of vi), and no line range for sed means all lines (i.e, :1,$ )

EMACS USAGE

ESC C-r or ESC C-s for searching for regexp M-x replace-regexp for replacement of regexp1 with regexp2

Complex regexp editing may be best done from sed or perl scripts.

Summary of perl regular expressions (from a perl book)

/abc/ matches 'abc' anywhere in string
/^abc/ matches 'abc' at beginning of string
/abc$/ matches 'abc' at end of string
/a|b/ matches 'a' or 'b'
/ab{2,4}c/ matches 'a' followed by 2-4 'b's followed by 'c'
/ab*c/ matches 'a' followed by 0 or more 'b's followed by 'c'
/ab+c/ matches 'a' followed by 1 or more 'b's followed by 'c'
/ab?c/ matches 'a' followed by 0-1 'b's followed by 'c'
/./ matches any character except 'n'
/[abc]/ matches any of the characters within []
/[^abc]/ matches a character not within [^]
/(abc)/ matches 'abc' anywhere in string, parentheses as a memory, storing 'abc' in the variables ,,, etc e.g. /name=(.*)&user=1/
/abc/i matches 'abc' ignoring case
/d/ or /[0-9]/ matches a digit
/w/ or /[a-zA-Z0-9_]/ matches a character classified as a word
/s/ or /[ rtnf]/ matches a character classified as whitespace
/b/ matches a word boundary or a backspace
/D/ or /[^0-9]/ matches a character that is not a digit
/W/ or /[^a-zA-Z0-9_]/ matches a character that is not a word
/S/ or /[^ rtnf]/ matches a character that is not whitespace
/helloB/ requires that there is not word boundary (after hello)
/*/ matches *

Submitted by Harry Joe, 2006-04-21

Q: Where are the informal computing seminars from 2000?

Note: to untar a file, type tar -xvf (filename)

   UNIX Tools and VI: 

[TXT] UsingVi.txt             20-Jan-2000 14:48     3k  

[TXT] UsingViEnh.txt          20-Jan-2000 14:48     5k  
[TXT] Using_at_.txt           20-Jan-2000 14:48     2k  
[TXT] Using_grep_.txt         20-Jan-2000 14:48     1k  
[TXT] Using_tar_.txt          20-Jan-2000 14:48     1k  
[TXT] ViFAQ.txt               20-Jan-2000 14:48     2k  
[   ] atdemo.s                20-Jan-2000 14:48     1k  
[   ] atdemoscript            20-Jan-2000 14:48     1k  
[   ] example.dat             20-Jan-2000 14:48     2k  
[   ] format.pl               20-Jan-2000 14:48     1k  
[   ] list.tex                20-Jan-2000 14:48     2k  
[   ] mailscript              20-Jan-2000 14:48     1k  
[   ] mailscript1             20-Jan-2000 14:48     1k  
[   ] seminar.tar             20-Jan-2000 16:54    75k  
[   ] students                20-Jan-2000 14:48    38k  
[   ] table2html.pl           20-Jan-2000 14:48     1k  
[   ] table2tex.pl            20-Jan-2000 14:48     1k  
 

#README #Informal Computing Seminar - January 20, 2000 UsingVi.txt How to Use VI UsingViEnh.txt How to Use some of VIM's features (and Harry's Perl scripts) Using_at_.txt Using at - a process scheduler Using_grep_.txt Using grep - a pattern matcher Using_tar_.txt Using tar - a file packager ViFAQ.txt FAQ for VI atdemo.s File Used for demo of at atdemoscript File Used for demo of at example.dat Data file for illustration format.pl Harry's Perl script to format text list.tex An example TeX file mailscript File Used for demo of at mailscript1 File Used for demo of at students An example file for grep table2html.pl Harry's Perl script to convert table to HTML table2tex.pl Harry's Perl script to convert table to TEX

Speaker: Mark Robinson

Date:        January 20, 2000

   C stuff

Speaker: Mark Robinson

Date:        June 1, 2000

Pages