Thứ Năm, 18 tháng 10, 2018

Các loại thẻ ngân hàng

Thẻ nội địa / ATM

  • Rút tiền mặt (phí thấp hơn thẻ quốc tế nhiều)
  • Giao dịch tại các cây ATM
  • Cà thẻ tại các cửa hàng, quán ăn, khách sạn... (bảo mật do cần nhập mã PIN)
  • Thanh toán khi đi taxi, đổ xăng
  • Chuyển khoản nhanh (chuyển tài khoản sang tài khoản)
  • Nhiều trang bán hàng online cũng có chương trình khuyến mãi khi sử dụng thẻ nội địa

Thẻ quốc tế

  • Mua hàng online trong nước
  • Mua app trên App Store, Play Store, Microsoft Store
  • Mua hàng hoặc sử dụng dịch vụ tại các website nước ngoài
  • Sử dụng để cà thẻ mua sắm khi đi nước ngoài (nhớ để ý phí chuyển đổi ngoại tệ)
  • Chuyển khoản nhanh (chuyển tài khoản sang tài khoản)
  • Sử dụng khi có khuyến mãi cho ngân hàng của bạn hoặc có hoàn tiền (cashback)

---

Mình định nghĩa trước rồi tâm sự sau nhé. Nói chung tiền trong ngân hàng có 3 thứ liên quan:
1/. tên account đăng nhập
nó như 1 cái tủ tiền - hình như mỗi người chỉ được 1 tủ ( 1 ngân hàng )
2/. số tài khoản
như là 1 trong những các ngăn trong cái tủ ở trên. Có thể là các sổ tiết kiệm nào đó
3/. thẻ ATM
thẻ này sẽ tương ứng với các ngăn tủ ở trên. Mỗi loại thẻ như debit- visa - master -... thì sẽ có tương ứng với 1 tài khoản. Và thẻ như là 1 cái chìa khoá mở ngăn tủ !

Vậy ở đây account khác tài khoản nha !

Tâm sự: đối với Vietcombank (VCB) bạn chỉ có thể khoá tạm thời cái chìa khoá - tức là vô hiệu hoá tạm thời cái thẻ ATM !
Chứ bạn không thể khoá tạm thời cái tài khoản được ! ==> hacker vẫn có thể qua iBanking rút tiển tài khoản của bạn !!
Ngân hàng VCB hiện vẫn chưa có chức năng / khả năng khoá tạm thời tài khoản.

Cách tốt nhất hiện thời là bạn phải chuyển qua sổ tiết kiệm hết - chỉ để lại 1 ít ! END





Thứ Ba, 7 tháng 8, 2018

Xóa tất cả ảnh trong file Word

Remove all pictures from document by using VBA code

Using VBA code is another easier way to remove all pictures from document. You can use a VBA code as follows to remove all pictures from document.
Step 1: Press the Alt + F11 keys to open the Microsoft Visual Basic for Application window;
Step 2: Click Insert > Module, copy and paste the following VBA code into the Module window;
Step 3: Click the Run button to apply the VBA.
VBA code: Remove all pictures from document:

Sub DitchPictures()
Dim objPic As InlineShape
For Each objPic In ActiveDocument.InlineShapes
objPic.Delete
Next objPic
End Sub

Thứ Tư, 9 tháng 5, 2018

BẢNG QUY ĐỔI CỠ GIÀY EU - VN (đv: cm)

BẢNG QUY ĐỔI CỠ GIÀY EU - VN (đv: cm)

39: 9 1/4 - 9 1/2 = 23.5 - 24.13
40: 9 5/8 - 9 3/4 = 24.45 - 24.77
41: 9 15/16 - 10 1/8 = 25.24 - 25.72
42: 10 1/8 - 10 1/4 = 25.72 - 26
43: 10 7/16 - 10 9/16 = 26.51 - 26.83

Thứ Tư, 2 tháng 5, 2018

Regex check datetime dd/mm/yyyy or d/m/yyyy

Regex: can use page https://regex101.com to check online:
^((((0?[1-9]|[12]\d|3[01])[\.\-\/](0?[13578]|1[02])[\.\-\/]((1[6-9]|[2-9]\d)?\d{2}))|((0?[1-9]|[12]\d|30)[\.\-\/](0?[13456789]|1[012])[\.\-\/]((1[6-9]|[2-9]\d)?\d{2}))|((0?[1-9]|1\d|2[0-8])[\.\-\/]0?2[\.\-\/]((1[6-9]|[2-9]\d)?\d{2}))|(29[\.\-\/]0?2[\.\-\/]((1[6-9]|[2-9]\d)?(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00)|00)))|(((0[1-9]|[12]\d|3[01])(0[13578]|1[02])((1[6-9]|[2-9]\d)?\d{2}))|((0[1-9]|[12]\d|30)(0[13456789]|1[012])((1[6-9]|[2-9]\d)?\d{2}))|((0[1-9]|1\d|2[0-8])02((1[6-9]|[2-9]\d)?\d{2}))|(2902((1[6-9]|[2-9]\d)?(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00)|00))))$

Code java:
final String regex = "^((((0?[1-9]|[12]\\d|3[01])[\\.\\-\\/](0?[13578]|1[02])[\\.\\-\\/]((1[6-9]|[2-9]\\d)?\\d{2}))|((0?[1-9]|[12]\\d|30)[\\.\\-\\/](0?[13456789]|1[012])[\\.\\-\\/]((1[6-9]|[2-9]\\d)?\\d{2}))|((0?[1-9]|1\\d|2[0-8])[\\.\\-\\/]0?2[\\.\\-\\/]((1[6-9]|[2-9]\\d)?\\d{2}))|(29[\\.\\-\\/]0?2[\\.\\-\\/]((1[6-9]|[2-9]\\d)?(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00)|00)))|(((0[1-9]|[12]\\d|3[01])(0[13578]|1[02])((1[6-9]|[2-9]\\d)?\\d{2}))|((0[1-9]|[12]\\d|30)(0[13456789]|1[012])((1[6-9]|[2-9]\\d)?\\d{2}))|((0[1-9]|1\\d|2[0-8])02((1[6-9]|[2-9]\\d)?\\d{2}))|(2902((1[6-9]|[2-9]\\d)?(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00)|00))))$";
        final String string = "1/1/2012\n"
             + "10/2/1991\n"
             + "02/12/1999\n"
             + "18/10/1992\n"
             + "30/02/2000\n"
             + "--\n"
             + "13/13/2000\n"
             + "1/13/2000\n"
             + "32/1/2000\n"
             + "30/2/2000\n"
             + "29/2/1999\n\n";

        final Pattern pattern = Pattern.compile(regex, Pattern.MULTILINE);
        final Matcher matcher = pattern.matcher(string);

        while (matcher.find()) {
            System.out.println("Full match: " + matcher.group(0));
//            for (int i = 1; i <= matcher.groupCount(); i++) {
//                System.out.println("Group " + i + ": " + matcher.group(i));
//            }
        }
Code C#:
 public static void Main() {
 string pattern = @ "^((((0?[1-9]|[12]\d|3[01])[\.\-\/](0?[13578]|1[02])[\.\-\/]((1[6-9]|[2-9]\d)?\d{2}))|((0?[1-9]|[12]\d|30)[\.\-\/](0?[13456789]|1[012])[\.\-\/]((1[6-9]|[2-9]\d)?\d{2}))|((0?[1-9]|1\d|2[0-8])[\.\-\/]0?2[\.\-\/]((1[6-9]|[2-9]\d)?\d{2}))|(29[\.\-\/]0?2[\.\-\/]((1[6-9]|[2-9]\d)?(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00)|00)))|(((0[1-9]|[12]\d|3[01])(0[13578]|1[02])((1[6-9]|[2-9]\d)?\d{2}))|((0[1-9]|[12]\d|30)(0[13456789]|1[012])((1[6-9]|[2-9]\d)?\d{2}))|((0[1-9]|1\d|2[0-8])02((1[6-9]|[2-9]\d)?\d{2}))|(2902((1[6-9]|[2-9]\d)?(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00)|00))))$";
 string input = @ "1/1/2012
 10 / 2 / 1991
 2 / 12 / 1999
 18 / 10 / 1992
 29 / 02 / 2000
  --
  13 / 13 / 2000
 1 / 13 / 2000
 32 / 1 / 2000
 30 / 2 / 2000
 29 / 2 / 1999

  ";
 RegexOptions options = RegexOptions.Multiline;

 foreach(Match m in Regex.Matches(input, pattern, options)) {
  Console.WriteLine("'{0}' found at index {1}.", m.Value, m.Index);
 }
}

Thứ Tư, 4 tháng 4, 2018

Giảm kích thước file APK khi export bản release

buildTypes {
        release {
            minifyEnabled true
            shrinkResources true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }

Thứ Hai, 19 tháng 3, 2018

Học tiếng Anh

Từ vựng

Bạn có thể học từ vựng ở Word Skills của nhà xuất bản Oxford. Bộ sách có ba quyển cho ba trình độ khác nhau, từ Basic đến Advanced. Lượng từ trong sách phong phú, hình minh họa ấn tượng và mỗi quyển đều đính kèm một CD-ROM để người học tự kiểm tra những gì đã tiếp thu.

Ngoài ra, bạn cũng nên tham khảo bộ sách dạy từ vựng của nhà xuất bản Cambridge - English Vocabulary in Use, với cấp độ từ cơ bản đến nâng cao.

Ngữ pháp

Nếu cần luyện ngữ pháp, Oxford Practice Grammar là một gợi ý. Người mới học có thể chọn Basic, trình độ cao hơn thì tìm đến Advanced. Mỗi quyển sách được đính kèm một CD ROM để người học làm các bài tập ngữ pháp trên máy vi tính và tự kiểm tra lại vốn ngữ pháp của mình.

Nghe

Tactics for Listening (The Third Edition); Target Listening; Listening to The News 1 and 2; Open Forum 1, 2 và 3; Learning To Listen 1, 2 và 3; Listen In 1, 2 và 3 phù hợp để rèn kỹ năng nghe. Việc luyện tập cần thực hiện hàng ngày, trong môi trường yên tĩnh, cộng với sự tập trung cao độ, nỗ lực trau dồi, bạn sẽ thấy mình tiến bộ dần theo thời gian.

Nói

Với những ai đang yếu kỹ năng nói có thể tham khảo bộ Let’s Talk 1, 2 và 3, 240 Speaking Topics with Sample Answers và Contemporary Topics.

Bạn cần thường xuyên luyện ngữ điệu theo người Mỹ hoặc Anh. Nên nghe một câu nhiều lần và lặp lại sao cho chất giọng của mình tương đương người bản xứ.

Bộ sách dạy luyện giọng Mỹ khá bổ ích là American Accent Training, có kèm đĩa CD.

Đọc hiểu

Bộ giáo trình luyện thi của nhà xuất bản Cambridge từ cấp độ Starters đến FCE sẽ cần thiết cho người chưa có thế mạnh đọc hiểu. Thành thạo hơn thì chuyển sang luyện thi TOEIC hoặc IELTS.

Select Reading và Reading Challenge phù hợp để luyện kỹ năng đọc hiểu.

Viết

Bạn sẽ tìm thấy nhiều thông tin bổ ích về cách hành văn trong 240 Writing Topics with Sample Essays, Learn To Write Better Academic Essays của Collins, Writing Essentials, Great Writing 1, 2, 3, 4 và 5 và Writing Academic English.

Luyện cả 4 kỹ năng nghe - nói - đọc - viết

Để luyện cả 4 kỹ năng nghe - nói - đọc - viết từ cơ bản đến nâng cao, bạn cần sớm làm quen với bộ giáo trình luyện thi của Cambridge từ cấp độ Starters đến Flyers trước. Sau đó sẽ chuyển sang luyện tiếp bộ KET và PET. Và cuối cùng là FCE và IELTS. Bộ KET và PET có format tương tự như một bài thi IELTS, nhưng dễ hơn nhiều.

Để học tiếng Anh đúng cách, bạn cần bắt đầu bằng việc đọc chính xác bảng chữ cái từ A đến Z. Sau đó đến các con số từ 0 đến 1 tỷ; từ riêng lẻ và nên học các từ này trong từ điển Oxford Picture Dictionary, Longman Photo Dictionary (The Third Edition) hoặc các phần mềm dạy từ vựng...

Chọn từ điển

Người học cần phải có một quyển từ điển Anh Việt hay hoặc từ điển Oxford Advanced Learner's Dictionary - The 9th Edition có đính kèm theo DVD. DVD dạy cách phát âm từng phụ âm, nguyên âm và các nguyên âm đôi. Nó cũng dạy bài đàm thoại ngắn về thương mại rất hay và cách viết thư tín thương mại theo kiểu hàn lâm.

Bạn nên chú ý các ví dụ từ từ điển Anh - Anh. Mỗi từ có nhiều nghĩa khác nhau, tùy theo ngữ cảnh. Bạn cần có bí quyết riêng để nhớ được dài lâu, chứ không nên học vẹt.

Việc chọn giáo trình hay giúp quá trình học tiếng Anh của bạn hiệu quả hơn. Một khi người học có nền tảng vững chắc thì việc hoàn thiện, tự trau dồi sau này dễ dàng, giống như căn nhà có nền móng tốt sẽ kiên cố.

Thứ Năm, 8 tháng 2, 2018

JavaScript check valid datetime format

HTML:

<input id="clickMe" type="button" value="clickme" onclick="isValidDate('29/102/2000');" />

JS:

function isValidDate(str) {
  var datePattern = /^(?:(?:31(\/|-|\.)(?:0?[13578]|1[02]))\1|(?:(?:29|30)(\/|-|\.)(?:0?[1,3-9]|1[0-2])\2))(?:(?:1[6-9]|[2-9]\d)?\d{2})$|^(?:29(\/|-|\.)0?2\3(?:(?:(?:1[6-9]|[2-9]\d)?(?:0[48]|[2468][048]|[13579][26])|(?:(?:16|[2468][048]|[3579][26])00))))$|^(?:0?[1-9]|1\d|2[0-8])(\/|-|\.)(?:(?:0?[1-9])|(?:1[0-2]))\4(?:(?:1[6-9]|[2-9]\d)?\d{2})$/;

  var patt = new RegExp(datePattern);
  var res = patt.test(str);
  if (!res) alert("Sai định dạng");
  else alert("Đúng định dạng");
}

Thứ Tư, 31 tháng 1, 2018

get the text of a stored procedure into a variable in SQL Server

Đưa tất cả text trong procedure vào biến chuỗi SQL:

declare @source_code varchar(max)
declare @objectid int
select @objectid=object_id('dbo.my_stored_procedure_name')
select @source_code = object_definition(@objectid )

Thứ Ba, 16 tháng 1, 2018

52 most useful apps for Android

Ace Stream Media [Ace Stream]: https://play.google.com/store/apps/details?id=org.acestream.media
AlReader [Alan.Neverland]: https://play.google.com/store/apps/details?id=com.neverland.alreader
AnkiDroid [AnkiDroid Open Source Team]: https://play.google.com/store/apps/details?id=com.ichi2.anki&hl=vi
App Backup & Restore [Trustlook Apps]: https://play.google.com/store/apps/details?id=mobi.usage.appbackup&hl=vi
Automatic Tag Editor [fillobotto]:https://play.google.com/store/apps/details?id=com.fillobotto.mp3tagger&hl=vi
BÁO MỚI [ePi Technologies, JSC]: https://play.google.com/store/apps/details?id=com.epi&hl=vi
ColorNote [Notes]: https://play.google.com/store/apps/details?id=com.socialnmobile.dictapps.notepad.color.note&hl=vi
CPU-Z [CPUID]: https://play.google.com/store/apps/details?id=com.cpuid.cpu_z&hl=vi
Diaro [Pixel Crater Ltd.]: https://play.google.com/store/apps/details?id=com.pixelcrater.Diaro&hl=vi
Dropbox [Dropbox, Inc]: https://play.google.com/store/apps/details?id=com.dropbox.android&hl=en
Duolingo [Duolingo]: https://play.google.com/store/apps/details?id=com.duolingo&hl=en
Evernote [Evernote Corp]: https://play.google.com/store/apps/details?id=com.evernote&hl=en
Facebook Lite [Facebook]: https://play.google.com/store/apps/details?id=com.facebook.lite&hl=vi
Fast Scanner [CoolMobileSolution]: https://play.google.com/store/apps/details?id=com.coolmobilesolution.fastscannerfree&hl=vi
Foody [Foody Corp]: https://play.google.com/store/apps/details?id=com.foody.vn.activity&hl=vi
FX File Explorer [NextApp, Inc]: https://play.google.com/store/apps/details?id=nextapp.fx
Google Photo [Google LLC]: https://play.google.com/store/apps/details?id=com.google.android.apps.photos&hl=vi
HERE WeGo [HERE Apps LLC]: https://play.google.com/store/apps/details?id=com.here.app.maps
Laban Key [Zalo Group]:https://play.google.com/store/apps/details?id=com.vng.inputmethod.labankey&hl=en
Lich Van Nien 2018 - Lich Viet [PPCLINK Mobile]: https://play.google.com/store/apps/details?id=com.somestudio.lichvietnam
Live Football [SKORES]: https://play.google.com/store/apps/details?id=com.sosscores.livefootball&hl=vi
Manga Reader [Manga Reader Online Offline]: https://play.google.com/store/apps/details?id=com.bigberry.mviewer&hl=vi
Memrise [Memrise]: https://play.google.com/store/apps/details?id=com.memrise.android.memrisecompanion&hl=en
Mobizen Screen Recorder [MOBIZEN]: https://play.google.com/store/apps/details?id=com.rsupport.mvagent
MoboPlayer [euphmia]: https://play.google.com/store/apps/details?id=com.clov4r.android.nil.noplug
Money Lover [Finsify]: https://play.google.com/store/apps/details?id=com.bookmark.money
Moon+ Reader [Moon+]: https://play.google.com/store/apps/details?id=com.flyersoft.moonreader&hl=en
MX Player [J2 Interactive]: https://play.google.com/store/apps/details?id=com.mxtech.videoplayer.ad
NhacCuaTui [NCT Corp]: https://play.google.com/store/apps/details?id=ht.nct&hl=en
Phonograph Music Player [Karim Abou Zeid]: https://play.google.com/store/apps/details?id=com.kabouzeid.gramophone&hl=vi
Puffin Web Browser [CloudMosa Inc]: https://play.google.com/store/apps/details?id=com.cloudmosa.puffinFree&hl=vi
QuickPic [Cheetah Mobile]: https://play.google.com/store/apps/details?id=com.alensw.PicFolder
Quoda Code Editor [Quoda]: https://play.google.com/store/apps/details?id=com.henrythompson.quoda&hl=vi
RAR [RARLAB]: https://play.google.com/store/apps/details?id=com.rarlab.rar
Samsung Internet Browser Beta [Samsung Electronics Co., Ltd]: https://play.google.com/store/apps/details?id=com.sec.android.app.sbrowser.beta
Shazam [Shazam Entertainment Limited]: https://play.google.com/store/apps/details?id=com.shazam.android&hl=vi
Skype [Skype]: https://play.google.com/store/apps/details?id=com.skype.raider&hl=en
Snapseed [Google LLC]: https://play.google.com/store/apps/details?id=com.niksoftware.snapseed&hl=vi
Sop to Http [devaward]: https://play.google.com/store/apps/details?id=com.devaward.soptohttp&hl=vi
TeamViewer [TeamViewer]: https://play.google.com/store/apps/details?id=com.teamviewer.teamviewer.market.mobile&hl=vi
TFlat [TFlat Group]: https://play.google.com/store/apps/details?id=com.vn.dic.e.v.ui
Today Weather [todayweather.co]: https://play.google.com/store/apps/details?id=mobi.lockdown.weather&hl=en
Tỉ Số Bóng Đá Trực Tiếp [Football Soccer Scores]: https://play.google.com/store/apps/details?id=holoduke.soccer_gen&hl=vi
UC Browser [UCWeb Inc]: https://play.google.com/store/apps/details?id=com.UCMobile.intl
Unit Converter [Smart Tools co.]: https://play.google.com/store/apps/details?id=kr.sira.unit&hl=vi
WPS Office [Kingsoft Office Software Corp]: https://play.google.com/store/apps/details?id=cn.wps.moffice_eng&hl=en
YouTube [Google LLC]:https://play.google.com/store/apps/details?id=com.google.android.youtube
Zalo [Zalo Group]: https://play.google.com/store/apps/details?id=com.zing.zalo&hl=en
ZEDGE™ Ringtones & Wallpapers [Zedge]: https://play.google.com/store/apps/details?id=net.zedge.android
Zing MP3 [Zalo Group]: https://play.google.com/store/apps/details?id=com.zing.mp3&hl=en
Zing TV [Zalo Group]: https://play.google.com/store/apps/details?id=com.zing.tv3&hl=en
µTorrent® [BitTorrent, Inc]: https://play.google.com/store/apps/details?id=com.utorrent.client

Tạo mã QR code đẹp

QR code Monkey: https://www.qrcode-monkey.com/

Thiết lập:
- Set color:  foreground: màu đen #000000, background màu trắng: #FFFFFF
- Customize design:
 Body Shape và : chọn hình thứ 3
 Eye Ball Shape: chọn hình thứ nhất

App thời tiết tốt nhất

Link Today Weather: CH Play
Link file bản pro APK
Vào cài đặt chọn nguồn dữ liệu lấy từ trang web Dark Sky.

µTorrent®- Torrent Downloader bản PRO

Link tải tại đây.

Thứ Hai, 15 tháng 1, 2018

How to set a default value for an existing column

Cột email của bảng Temp có giá trị mặc định là: abc@gmail.com:

ALTER TABLE Temp ADD CONSTRAINT DF_SomeName DEFAULT N'abc@gmail.com' FOR email

Thứ Năm, 11 tháng 1, 2018

Generate table with define SQL Server




I have 2 tables to manage generate real table with table name and column:
  • Table (TableID, TableName)
  • TableColumn (ColumnID, ColumnName, Datatype, Size) --(Size is size of nvarchar type, ID is auto identity(1,1))
Table:
TableID    TableName
----------------------
1          TopCity
TableColumn:
ColumnID    ColumnName    DataType    Size
-------------------------------------------
1           CityID        int         null
2           CityName      nvarchar    100
I want to write a procedure to create real table TopCity (CityID, CityName) with column details as described in TableColumn.
CREATE TABLE TopCity
(
    CityID INT IDENTITY(1,1),
    CityName NVARCHAR(100)
)

This is solution

 CREATE PROC AUTOGEN_TABLE
    @BangID int
AS

DECLARE @DanhSachTruong VARCHAR(1000), @TenBang VARCHAR(100)
        -- ,@i INT = 1, @j INT = 0
--SELECT @j = COUNT(*) FROM BANG_DULIEU

--WHILE @i <= @j
BEGIN
    SELECT @TenBang = B.TenBang FROM BANG_DULIEU B WHERE BangID = @BangID
    SELECT
        @DanhSachTruong = COALESCE(@DanhSachTruong + ', ', '') + '' +
                    tc.TenTruong
                     + ' ' +
                    tc.KieuDuLieu
                    + '' +
                    CASE WHEN tc.DoRong IS NULL
                        THEN '' ELSE CONCAT('(',CAST(tc.DoRong AS VARCHAR),')')
                    END
                    +
                    CASE WHEN RIGHT(tc.TenTruong,2)='ID'
                        THEN ' IDENTITY(1,1)'
                        ELSE ''
                    END
    FROM BANG_DULIEU t
    INNER JOIN TRUONG_DULIEU tc ON tc.BangID = t.BangID
    WHERE t.TenBang = @TenBang

    --SELECT @TenBang, @DanhSachTruong

    EXEC('CREATE TABLE  ' + @TenBang + ' (  ' + @DanhSachTruong + ' )')

    --SET @i = @i + 1

END