northwind database webapp example


references

sources

https://github.com/jinahya/northwind-database-webapp-example

MySQL

run the script

$ ls
Northwind.MySQL5.sql
$ mysql -u root -p
Enter password: 
...

mysql> source Northwind.MySQL5.sql
Query OK, 0 rows affected, 1 warning (0.00 sec)
...
Query OK, 0 rows affected (0.00 sec)

mysql> 

create a new user and grant for selection

mysql> create user 'northwind'@'%' identified by 'somepass...';
Query OK, 0 rows affected (0.00 sec)

mysql> grant select on northwind.* to 'northwind'@'%';
Query OK, 0 rows affected (0.00 sec)

mysql> 

Java EE

Oracle Maven Repository – Index now available – more to come


Should I thank for this? Anyway the wind blows.

RedStack

I am happy to announce that we now have an index available for the Oracle Maven Repository.  This is a standard Maven index, built with the Maven Core Indexer code (donated by Sonatype to Maven – thanks!) and is available at https://maven.oracle.com/.index/nexus-maven-repository-index.properties and https://maven.oracle.com/.index/nexus-maven-repository-index.gz.

The easiest way to view it is to use an IDE like NetBeans, as shown below:

repo-index

We are actively working with Maven Repository Manager and IDE teams to make this work for you across a variety of common tools you may use.

View original post

sharing dot files between computers using git


create a repository

As anyone might know, Bitbucket permits private repositories.

$ git pull git@bitbucket:<username>/dot-files.git

put dot files in it

$ cd dot-files/
$ mv ~/.shuttle.json .
$ mkdir .m2
$ cd .m2
$ mv ~/.m2/settings.xml .
$ mv ~/.m2/settings-security.xml .
$ cd ..
$ git add \*
$ git commit -m "dot files added"
$ git push

link dot files

$ cd ~
$ ln -s /path/to/the/dot-files/.shuttle.json
$ cd .m2
$ ln -s /path/to/the/dot-files/.m2/settings.xml
$ ln -s /path/to/the/dot-files/.m2/settings-security.xml

installing northwindextended mysql


download the script

~/tmp$ wget https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/northwindextended/Northwind.MySQL5.sql

connect to mysql

~/tmp$ mysql -u root -p
Enter password:
...
mysql >

execute the script

mysql> source Northwind.MySQL5.sql
...
mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| northwind          |
| performance_schema |
+--------------------+
5 rows in set (0.00 sec)

mysql> 

create a user and grant

mysql> create user 'northwind'@'%' identified by 'northwind';
Query OK, 0 rows affected (0.01 sec)

mysql> grant select on northwind.* to 'northwind'@'%';
Query OK, 0 rows affected (0.00 sec)

mysql> quit

list the tables

onacit@VM1451490420734:~/tmp$ mysql -u northwind -p
Enter password: 
...

mysql> use northwind;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> show tables;
+--------------------------------+
| Tables_in_northwind            |
+--------------------------------+
| Alphabetical list of products  |
| Categories                     |
| Category Sales for 1997        |
| Current Product List           |
| Customer and Suppliers by City |
| CustomerCustomerDemo           |
| CustomerDemographics           |
| Customers                      |
| EmployeeTerritories            |
| Employees                      |
| Invoices                       |
| Order Details                  |
| Order Details Extended         |
| Order Subtotals                |
| Orders                         |
| Orders Qry                     |
| Product Sales for 1997         |
| Products                       |
| Products Above Average Price   |
| Products by Category           |
| Quarterly Orders               |
| Region                         |
| Sales Totals by Amount         |
| Sales by Category              |
| Shippers                       |
| Summary of Sales by Quarter    |
| Summary of Sales by Year       |
| Suppliers                      |
| Territories                    |
+--------------------------------+
29 rows in set (0.00 sec)

mysql> 

Using a Colon As A Bash Null Operator


references

The title of this entry is came from the referent entry.
본 entry의 제목은 위에 언급된 페이지의 것을 사용하였음을 밝힌다.

:

shellscript를 하나 만들 던 중 if 구문에서 thenelse 사이에 아무것도 하고싶지 않을 때 : 을 사용하면 되는 것을 배웠다.

if <condition>; then
    # todo...
    :
else
    echo i'm in else
fi