• This is Slide 1 Title

    This is slide 1 description. Go to Edit HTML and replace these sentences with your own words. This is a Blogger template by Lasantha - PremiumBloggerTemplates.com...

  • This is Slide 2 Title

    This is slide 2 description. Go to Edit HTML and replace these sentences with your own words. This is a Blogger template by Lasantha - PremiumBloggerTemplates.com...

  • This is Slide 3 Title

    This is slide 3 description. Go to Edit HTML and replace these sentences with your own words. This is a Blogger template by Lasantha - PremiumBloggerTemplates.com...

Thứ Bảy, 22 tháng 1, 2022

Gửi tin nhắn trong group Telegram thông qua Bot API

 Bài viết hướng dẫn gửi thông báo vào group Telegram thông qua Bot API. các phần của bài viết1. Tạo Bot Telegram2. Tạo Group Telegram , ad bot và test gửi tin nhắn3. Tạo API resfull với .net core và test bằng postmanI. TẠO BOT TRÊN TELEGRAMBước 1: Tìm BotFather tại ô tìm kiếm (Chú ý cái có tic...

Chủ Nhật, 11 tháng 7, 2021

Tạo SSL cho domain

 1. Mua SSL tại muassl.com2. Sau khi thanh toán và active 3. tải file certificate.cert và file key về (hoặc tải hết các file về)4. tạo file pfx: https://kb.pavietnam.vn/tao-file-pfx-de-import-vao-iis.html5. inport file pfx vào certificate  (import bằng pfx mới ko bị mất, chọn complete...

Thứ Năm, 15 tháng 10, 2020

Restorem database vào một database khác

 Mục dịch là save một Database cũ vào một Database mới , với tên khác, tên log và mdf khác luôn.1. Backup database muốn restore2. Vào Restore database với   - Option: Overwrite the existing database (WITH REPLACE)  - Files: Chỗ Restore As chọn tới file mdf và .ldf mới mà bạn...

Error when build IOS ionic - Upload IOS to Appstore by xcrun

I. Upload IOS to App Store by xcrun 1. Generate .ipa file with signed.     Product -> archive2. move to ipa folder3. check ipa filexcrun altool --validate-app --file "$IPA_PATH" --username "$APP_STORE_USERNAME" --password "sjjkh-asjdkh-asjkdh"password: get from appleid.apple.com/account/manageAPP-SPECIFIC...

Thứ Tư, 14 tháng 10, 2020

No version of NDK matched the requested version

Lỗi NDK : No version of NDK matched the requested version 21.0.6113669. Versions available locally: 21.3.6528147Cập nhật lại NDK version cho đúng: Trên adnroid studio: -> Tool -> SDK Manager -> Chuyển qua tab SDK tooks -> check vào NDK (Side by side) để update lên bản mới nhất.Nếu vẫn không được vào đây tải bản phù hợp: https://androidsdkoffline.blogspot.com/p/android-ndk.htmlsau đỏ bỏ...

Thứ Ba, 29 tháng 9, 2020

Validator Form In Angular

Have 2 ways validate form in angular.First Way: Use FormBuilderHTML file <form [formGroup]="angForm" novalidate> <div class="form-group"> <label class="center-block">Name: <input class="form-control" formControlName="name"> </label> </div> <div *ngIf="angForm.controls['name'].invalid && (angForm.controls['name'].dirty...

Thứ Năm, 16 tháng 7, 2020

Upload file in node js / Upload file bẳng nodejs

Các bước để tạo một API server bằng node js thì mình không làm nữa, chỉ bắt đầu bằng việc up ảnhBước 1: Tạo service upload ảnhconst multer = require('multer') // import libraryconst moment = require('moment')const q = require('q')const _ = require('underscore')var file = require('file-system');const fs = require('fs')const dir = './public'let sub = moment(moment.now()).format('YYYY-MM');/** Store file on local folder */let storage = multer.diskStorage({    destination: function (req, file, cb) {        cb(null, 'public/' + sub)    },    filename: function (req, file, cb) {        let date = moment(moment.now()).format('YYYYMMDDHHMMSS')        cb(null, date + '_' + file.originalname.replace(/-/g, '_').replace(/ /g, '_'))    }})/** Upload files  */let upload = multer({ storage: storage }).array('files')/** Exports fileUpload function */module.exports = {    fileUpload: function (req, res) {        let deferred = q.defer()        /** Create dir if not exist */        if (!fs.existsSync(dir + "/" +sub)) {            fs.mkdirSync(dir + "/" + sub)            console.log(`\n\n ${dir} dose not exist, hence created \n\n`)                    }        upload(req, res, function (err) {            if (req && (_.isEmpty(req.files))) {                deferred.resolve({ status: 200, message: 'File not attached', data: [] })            } else {                if (err) {                    deferred.reject({ status: 400, message: 'error', data: err })                } else {                    deferred.resolve({                        status: 200,                        message: 'File attached',                        filename: _.pluck(req.files,                            'filename'),                        data: req.files                    })                }            }        })        return deferred.promise    }}Bước...