Canadian permanent residency application – do I need to stay in the country during application processing? [migrated]

I am an American citizen living in Québec for the past 3.5 years. The first 6 months were under a student visa, and the last 3 years have been under two separate work visas (under NAFTA). I have submitted my application to the Québec government to obtain a CSQ, I should receive my CSQ within the next few weeks.

Next step will be to submit my application to the federal government under the Quebec Skilled Worker Class track (I’ve read that the average application processing time, for this application track, is roughly 15 months).

I plan to travel for roughly a year, starting this December. My question is, must I remain in Canada for any/all of the time while my application with the federal government is pending?

Why should we ask the password twice during registration?

It would be easier to ask for a user’s password only once during registration.

The problem: The user could make a mistake while typing the password once because of hiding letters.

The solution: The user could have a toggle button for showing or hiding the password.

unmask password

Working example with toggling the visibility of the password. This approach could be used on the registration or login page.

Are there any benefits to asking a user’s password twice during registration vs just not masking the password? Why would you ask twice?

P.S. Jakob Nielsen about unmasking the password:

  • Users make more errors when they can’t see what they’re typing while filling in a form. They therefore feel less confident. This double degradation of the user experience means that people are more likely to give up and never log in to your site at all, leading to lost business. (Or, in the case of intranets, increased support calls.)
  • The more uncertain users feel about typing passwords, the more likely they are to (a) employ overly simple passwords and/or (b) copy-paste passwords from a file on their computer. Both behaviors lead to a true loss of security.

Update: I created a WordPress plugin which unmasks the password field. So you may use it if you want to.

unmask password

Update 2: WordPress.com use same technique to show and hide password.

Update 3: Internet Explorer 10 added a toggle password visibility icon. It looks like this:

IE 10 password

Update 4: Article about unmask password on smashingmagazine.

Update 5: Example with unmasking password on focus.

Server error when during version release but travis compiles

I recently updated to python 3 and we are going for a new release. However, our website has a server error even after travis has successfully deployed. This is our code for app.yaml:

runtime: python37 entrypoint: gunicorn -b :$  PORT ubyssey:/ubyssey/wsgi.py env_variables:    PORT: "8000"  automatic_scaling:   target_cpu_utilization: .65   max_instances: 100   min_idle_instances: 2  handlers: - url: /robots.txt   static_files: robots.txt   upload: robots.txt - url: /service-worker.js   static_files: service-workers/service-worker.js   upload: service-workers/service-worker.js - url: .*   script: auto   secure: always 

Any hints?

Server error when during version release but travis compiles

I recently updated to python 3 and we are going for a new release. However, our website has a server error even after travis has successfully deployed. This is our code for app.yaml:

runtime: python37 entrypoint: gunicorn -b :$  PORT ubyssey:/ubyssey/wsgi.py env_variables:    PORT: "8000"  automatic_scaling:   target_cpu_utilization: .65   max_instances: 100   min_idle_instances: 2  handlers: - url: /robots.txt   static_files: robots.txt   upload: robots.txt - url: /service-worker.js   static_files: service-workers/service-worker.js   upload: service-workers/service-worker.js - url: .*   script: auto   secure: always 

I think our error occurred in the line entry point. Any hints?

Package exiv not found during meson build ubuntu 19.04

Can anyone explain the following ?

user@system:~/gexiv2-0.11.0/build$   exiv2 --version  exiv2 0.27.1  This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.  This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.  You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA   user@system:~/gexiv2-0.11.0/build$   meson --prefix=/usr ..  The Meson build system Version: 0.49.0 Source dir: /home/user/gexiv2-0.11.0 Build dir: /home/user/gexiv2-0.11.0/build Build type: native build Project name: gexiv2 Project version: 0.11.0 Native C compiler: cc (gcc 8.3.0 "cc (Ubuntu 8.3.0-6ubuntu1) 8.3.0") Native C++ compiler: c++ (gcc 8.3.0 "c++ (Ubuntu 8.3.0-6ubuntu1) 8.3.0") Build machine cpu family: x86_64 Build machine cpu: x86_64 Found pkg-config: /usr/bin/pkg-config (0.29.1) Found CMake: /usr/bin/cmake (3.13.4) Dependency exiv2 found: NO (tried pkgconfig)  meson.build:13:0: ERROR:  Dependency "exiv2" not found, tried pkgconfig  A full log can be found at /home/user/gexiv2-0.11.0/build/meson-logs/meson-log.txt 

given that exiv2 version 0.27 does not exist for ubuntu in general

(it stops at v0.25)

I did the following :

  1. I went to the exiv website : www.exiv2.org
  2. I grabbed the link for the linux build of exiv 0.27
  3. I ran the following

    wget https://www.exiv2.org/builds/exiv2-0.27.1-Linux64.tar.gz sudo tar xzf exiv2-0.27.1-Linux64.tar.gz -C /usr/local/lib/ sudo nano /etc/environment

  4. added :/usr/local/lib/exiv2-0.27.1-Linux64/bin 5.source /etc/environment

  5. restarted the terminal.

and then exiv is correctly usable.

but meson does not detect it is there during the build.

To be clear : the package gexiv2 Version 0.10.9 shipped for ubuntu 19.04 is inferior to my needed version of 0.11.0 at least.

Using automator with python script that requires user input during Spotify API authentication process

I have a script that gets name, artist, and spotify ID of the currently playing song, and add the track to a pre-defined spotify playlist.

To make the process of running the script a bit easier, I wanted to use an Automator workflow to run the script and post a notification saying that the song has been added.

For reference, the python script looks like this (with private info taken out)

import spotipy import spotipy.util from pprint import pprint  # Log in client_id = "" client_secret = "" redirect_uri = "http://google.com/" username = "" scope = ["playlist-modify-private",          "user-read-currently-playing"]  scope = " ".join(scope) token = spotipy.util.prompt_for_user_token(username, scope, client_id=client_id, client_secret=client_secret, redirect_uri=redirect_uri) sp = spotipy.Spotify(auth=token)  # Get current song and add it to the playlist plid = "" track = sp.current_user_playing_track()  if track:     tid = track["item"]["id"]     name = track["item"]["name"]     artist = track["item"]["album"]["artists"][0]["name"]     msg = "Added '{}' by '{}' to the playlist!".format(name, artist) else:     msg = "No song playing"  print(msg) sp.user_playlist_add_tracks(username, plid, [tid]) 

The authentication gives a token, but the first time I need to interact with the browser to agree to that the script can perform the actions defined by the scopes. I am redirected in to a URL, and I need to copy this URL back to the script to complete the authentication. I thought I could simply do this manually by running the script from the terminal when I arrive at work, and then simply invoke the Automator workflow whenever a good song was playing.

The problem seems to be that the Automator workflow starts a new session (or whatever the terminology is), and I need to interact with the browser again, and it throws this error (with my username removed):

The action “Run Shell Script” encountered an error: “Traceback (most recent call last):   File "/Users/.../Documents/github/personal_scripts/add_playing_track_to_playlist.py", line 14, in <module>     token = spotipy.util.prompt_for_user_token(username, scope, client_id=client_id, client_secret=client_secret, redirect_uri=redirect_uri)   File "/Users/.../anaconda2/lib/python2.7/site-packages/spotipy/util.py", line 80, in prompt_for_user_token     response = raw_input("Enter the URL you were redirected to: ") EOFError: EOF when reading a line” 

Is there a way to get the Automator workflow to work?

Accidentally borked system by pressing Ctrl + C during sudo apt upgrade. How do I fix it?

Was attempting to run sudo apt upgradeand hit Ctrl c when it gave me a prompt that I could not figure out how to get out of.

Tried to rerun sudo apt upgrade. Got a message about some kind of lock process being occupied. Foolishly, tried to restart it. This happens after selecting Ubuntu to start. http://imgur.com/anZYAsd Any ideas on how to fix that?

Error 200 during WebSocket handshake: Aws load balancer + ec2 websocket

I’m using load balancer in front of an aws ec2 instance(I will have more in future). In this ec2, I have a website being served by nginx on port 80, a nodejs app listening on 8080 and the websocket on 4555.

My nginx.conf has rules to pass the requests based on location / as you can see:

server {         listen       80 default_server;         listen       [::]:80 default_server;         server_name  localhost;         root         /var/www/html;          # Load configuration files for the default server block.         include /etc/nginx/default.d/*.conf;         #try_files $  uri $  uri/ @rewrite;        # location @rewrite {        #    rewrite ^/(.*)$   /index.php?param=$  1;        #}      location /api {                proxy_pass http://127.0.0.1:8080;                proxy_http_version 1.1;                proxy_set_header Upgrade $  http_upgrade;                proxy_set_header Connection 'upgrade';                proxy_set_header Host $  host;                proxy_cache_bypass $  http_upgrade;         }      location /chat {                 proxy_pass http://127.0.0.1:4555;                 proxy_http_version 1.1;                 proxy_set_header Upgrade $  http_upgrade;                 proxy_set_header Connection 'upgrade';                 proxy_set_header Host $  host;                 proxy_cache_bypass $  http_upgrade;         } } 

It was working when I was redirectioning the connection directly to the instance but now that we have the loadbalancer in the front it doesn’t work anymore.

web application output:

WebSocket connection to ‘wss://www.domain.com/socket.io/?EIO=3&transport=websocket’ failed: Error during WebSocket handshake: Unexpected response code: 200