-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
661 changed files
with
93,394 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
const { Person } = require("./iface/person"); | ||
|
||
module.exports = class BusinessPerson extends Person { | ||
constructor(name, age, country, job) { | ||
super(name, age, country); | ||
this.job = job | ||
} | ||
|
||
sayHello() { | ||
super.sayHello(); | ||
console.log(`I'm work as ${this.job}.`); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
class Person { | ||
constructor(name, age, country) { | ||
this.name = name; | ||
this.age = age; | ||
this.country = country; | ||
} | ||
|
||
sayHello() { | ||
console.log(`Hello, my name is ${this.name}.`); | ||
console.log(`I'm ${this.age} years old.`); | ||
console.log(`I'm live in ${this.country}.`); | ||
} | ||
} | ||
|
||
module.exports = { Person }; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
const BusinessPerson = require("./business_person"); | ||
|
||
|
||
let bzp = new BusinessPerson("satoshi", 14, "Japan", "Student"); | ||
bzp.sayHello(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
const mysql = require('mysql') | ||
|
||
const conn = mysql.createConnection({ | ||
host: 'localhost', | ||
user: 'root', | ||
password: 'password', | ||
database: 'employee_db' | ||
}); | ||
|
||
conn.connect((err) => { | ||
if (err) { | ||
console.log('connection establish is failed.' + err.stack()); | ||
return; | ||
} | ||
console.log('connection established.'); | ||
}); | ||
|
||
conn.query('DELETE FROM users WHERE id=?', | ||
[5], (error, results) => { | ||
console.log(results); | ||
} | ||
); | ||
|
||
console.log('deleting data is success.'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
const mysql = require('mysql') | ||
|
||
const conn = mysql.createConnection({ | ||
host: 'localhost', | ||
user: 'root', | ||
password: 'password', | ||
database: 'employee_db' | ||
}); | ||
|
||
conn.connect((err) => { | ||
if (err) { | ||
console.log('connection failed. ' + err.stack); | ||
return; | ||
} | ||
console.log('connection success.'); | ||
}); | ||
|
||
conn.query('INSERT INTO users(id, department_id, email, first_name, last_name) VALUES (?,?,?,?,?)' | ||
, [5, '1', '[email protected]', 'J.M', 'Weston'], (error, results) => { | ||
console.log(results); | ||
}) | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.