Skip to content

Instantly share code, notes, and snippets.

View mattn9x's full-sized avatar
🤹‍♂️
Research !

Matt Nguyen mattn9x

🤹‍♂️
Research !
View GitHub Profile
using QlNhanSuBenhVien.UserInterface;
using System;
using System.Windows.Forms;
namespace QlNhanSuBenhVien
{
static class Program
{
/// <summary>
@mattn9x
mattn9x / app.js
Last active July 2, 2017 05:25
Example build heroku with nodejs
let port = process.env.PORT || 8080; // config port
app.listen(port, function(){
console.log(`App listening port: ${port}`);
})
"engines": {
"node": "8.1.3",
"npm": "5.0.4"
}
@mattn9x
mattn9x / structure.json
Created July 2, 2017 05:13
Structure project
bin/
public/
routes/
views/
app.js
package.json
@mattn9x
mattn9x / Procfile
Created July 2, 2017 05:26
Config heroku example
web: node app.js
@mattn9x
mattn9x / Program.cs
Last active July 2, 2017 06:31
Phân biệt tham chiếu, tham trị
static int check;
public static void ThayDoi1()
{
check = 1;
}
public static void Thaydoi2()
{
check = 2;
}
public static void ThayDoi3()
@mattn9x
mattn9x / Program.cs
Created July 2, 2017 06:21
Test Tham Chiếu Tham Trị
public static int TestThamTri(int temp1)
{
temp1 = 4;
return temp1;
}
public static void TestThamChieu(ref int temp1, ref string temp2)
{
temp1 = 123;
temp2 = "I have test Ref";
@mattn9x
mattn9x / serialize_deserialize.js
Created July 2, 2017 06:46
Deserialize và serialize object trong javascript
// object person
var person = {
firstName: 'Nguyen',
lastName: 'Manh',
50: 'professional',
showName: function () {
console.log(this.firstName + ', ' + this.lastName);
}
};
var person = {
firstName: 'Nguyen',
lastName: 'Manh',
50: 'professional',
showName: function () {
console.log(this.firstName + ', ' + this.lastName);
}
};
@mattn9x
mattn9x / initObjectConstructer.js
Created July 2, 2017 06:54
Khởi tạo object theo cách ObjectConstructer
var psn = new Object(); // hoặc var psn = {};
psn.firstName = 'Nguyen';
psn.lastName = 'Manh';
psn.showName = function () {
console.log(this.firstName + ', ' + this.lastName);
}