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
function isValidIranianNationalCode(input) { | |
if (!/^\d{10}$/.test(input)) | |
return false; | |
var check = parseInt(input[9]); | |
var sum = 0; | |
var i; | |
for (i = 0; i < 9; ++i) { | |
sum += parseInt(input[i]) * (10 - i); | |
} |
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
[ | |
"The program has never collected that information", | |
"That wasn't in the original specification", | |
"The project manager told me to do it that way", | |
"There's currently a problem with our hosting company", | |
"Well done, you found my easter egg!", | |
"That feature would be outside of the scope", | |
"This code was not supposed to go in to production yet", | |
"The client must have been hacked", | |
"I'm still working on that as we speak", |
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
var DATABASE_NAME = 'test_db'; | |
var DB_USERNAME = 'abc'; | |
var DB_PASSWORD = 'abc@123'; | |
var Sequelize = require('sequelize'); | |
var FS = require('fs'); | |
var sequelize = new Sequelize( | |
DATABASE_NAME, | |
DB_USERNAME, |