Github repo for the Course: Stanford Machine Learning (Coursera)
Quiz Needs to be viewed here at the repo (because the image solutions cant be viewed as part of a gist)
True or False | Statement | Explanation
#include <LCD.h> | |
sbit IR=P1^0; | |
// intuitive code | |
void main() | |
{ | |
LCD_INIT(); | |
while(1) { | |
if(IR == 0) { |
Github repo for the Course: Stanford Machine Learning (Coursera)
Quiz Needs to be viewed here at the repo (because the image solutions cant be viewed as part of a gist)
True or False | Statement | Explanation
The connection failed because by default psql
connects over UNIX sockets using peer
authentication, that requires the current UNIX user to have the same user name as psql
. So you will have to create the UNIX user postgres
and then login as postgres
or use sudo -u postgres psql database-name
for accessing the database (and psql
should not ask for a password).
If you cannot or do not want to create the UNIX user, like if you just want to connect to your database for ad hoc queries, forcing a socket connection using psql --host=localhost --dbname=database-name --username=postgres
(as pointed out by @meyerson answer) will solve your immediate problem.
But if you intend to force password authentication over Unix sockets instead of the peer method, try changing the following pg_hba.conf
* line:
from
#!/bin/bash | |
# About: Bash script to create new Jekyll posts | |
# Author: @AamnahAkram | |
# URL: https://gist.github.com/aamnah/f89fca7906f66f6f6a12 | |
# Description: This is a more advanced version of the script which can | |
# - take options | |
# - has color coded status messages | |
# - improved code | |
# - lowercase permalinks | |
# - usage message |
// config/passport.js | |
// load all the things we need | |
var LocalStrategy = require('passport-local').Strategy; | |
var mysql = require('mysql'); | |
var connection = mysql.createConnection({ | |
host : 'localhost', | |
user : 'root', |